Revision: 41440
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41440&view=rev
Author:   davidloman
Date:     2010-11-23 16:00:59 +0000 (Tue, 23 Nov 2010)

Log Message:
-----------
Clean up comment types.  C++ -> C style comments.

Modified Paths:
--------------
    rt^3/trunk/src/libNet/NetMsgFactory.cxx
    rt^3/trunk/src/libNet/NetMsgRouter.cxx
    rt^3/trunk/src/libNet/Portal.cxx
    rt^3/trunk/src/libNet/PortalManager.cxx
    rt^3/trunk/src/libNet/RouteMsgJob.cxx

Modified: rt^3/trunk/src/libNet/NetMsgFactory.cxx
===================================================================
--- rt^3/trunk/src/libNet/NetMsgFactory.cxx     2010-11-23 15:57:28 UTC (rev 
41439)
+++ rt^3/trunk/src/libNet/NetMsgFactory.cxx     2010-11-23 16:00:59 UTC (rev 
41440)
@@ -82,7 +82,7 @@
 
   QDataStream* qds = new QDataStream(data);
 
-  //TODO Replace this with a map for registration scheme
+  /* TODO Replace this with a map for registration scheme */
   switch (msgType)
     {
   case TEST_GENERIC_4BYTE_MSG:
@@ -117,10 +117,10 @@
 
   case NEWNODEONNET:
     return new GenericOneStringMsg(qds, origin);
-    //    case FULL_NODE_LISTREQ:
-    // return new NetMsg(qds, origin);
-    //    case FULL_NODE_LIST:
-    // return new NetMsg(qds, origin);
+    /*     case FULL_NODE_LISTREQ: */
+    /*         return new NetMsg(qds, origin); */
+    /*     case FULL_NODE_LIST: */
+    /*         return new NetMsg(qds, origin); */
 
   case NEWSESSIONREQ:
     return new NewSessionReqMsg(qds, origin);
@@ -134,7 +134,7 @@
   case GEOMETRYCHUNK:
     return new GeometryChunkMsg(qds, origin);
 
-    //Admin commands
+    /* Admin commands */
   case CMD_SHUTDOWN:
     return new TypeOnlyMsg(qds, origin);
 
@@ -143,10 +143,12 @@
     }
 }
 
-// Local Variables: ***
-// mode: C++ ***
-// tab-width: 8 ***
-// c-basic-offset: 2 ***
-// indent-tabs-mode: t ***
-// End: ***
-// ex: shiftwidth=2 tabstop=8
+/*
+ * Local Variables:
+ * mode: C
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */

Modified: rt^3/trunk/src/libNet/NetMsgRouter.cxx
===================================================================
--- rt^3/trunk/src/libNet/NetMsgRouter.cxx      2010-11-23 15:57:28 UTC (rev 
41439)
+++ rt^3/trunk/src/libNet/NetMsgRouter.cxx      2010-11-23 16:00:59 UTC (rev 
41440)
@@ -48,7 +48,7 @@
 }
 
 bool NetMsgRouter::registerType(quint16 type, INetMsgHandler* handler) {
-       //First get the appropriate list:
+       /* First get the appropriate list: */
        QList<INetMsgHandler*>* list = this->getListOfHandlers(type);
        list->append(handler);
 
@@ -56,7 +56,7 @@
 }
 
 bool NetMsgRouter::routeMsg(NetMsg* msg) {
-       //First get the appropriate list:
+       /* First get the appropriate list: */
        QList<INetMsgHandler*>* list = 
this->getListOfHandlers(msg->getMsgType());
 
        QString s("Got a message whos origin is Portal: ");
@@ -71,7 +71,7 @@
        Logger::getInstance()->logINFO("NetMsgRouter", s);
 
        if (list->length() == 0) {
-               //If no routing table, send back an error
+               /* If no routing table, send back an error */
                TypeOnlyMsg* tom = new TypeOnlyMsg(UNHANDLED_MSG_TYPE);
                origin->send(tom);
                return false;
@@ -81,7 +81,7 @@
                        list->at(i)->handleNetMsg(msg);
                }
        }
-       //Now delete msg
+       /* Now delete msg */
        delete msg;
        return true;
 }
@@ -102,14 +102,16 @@
 void
 NetMsgRouter::registerInternalTypes()
 {
-       //TODO add in any type<->Handler associations that should be 
automatically mapped here.
+       /* TODO add in any type<->Handler associations that should be 
automatically mapped here. */
 }
 
-// Local Variables:
-// tab-width: 8
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: t
-// c-file-style: "stroustrup"
-// End:
-// ex: shiftwidth=4 tabstop=8
+/*
+ * Local Variables:
+ * mode: C
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */
+

Modified: rt^3/trunk/src/libNet/Portal.cxx
===================================================================
--- rt^3/trunk/src/libNet/Portal.cxx    2010-11-23 15:57:28 UTC (rev 41439)
+++ rt^3/trunk/src/libNet/Portal.cxx    2010-11-23 16:00:59 UTC (rev 41440)
@@ -39,7 +39,7 @@
 {
        this->remoteNodeName = "NotSetYet-" + QUuid::createUuid().toString();
 
-       //set the struct's userdata
+       /* set the struct's userdata */
        this->callbackTable[0].pks_user_data = this;
 }
 
@@ -87,13 +87,13 @@
 Portal::read() {
        int retval = 0;
 
-       //recv first
+       /* recv first */
        retval = this->pkgClient->processData();
        if (retval < 0) {
                this->log->logERROR("Portal",
                                "Unable to process packets? Weird. (1) ");
                return retval;
-       }//TODO do we need to check for ==0 ?
+       }/* TODO do we need to check for ==0 ? */
 
        retval = this->pkgClient->pullDataFromSocket();
        if (retval < 0) {
@@ -110,7 +110,7 @@
        if (retval < 0) {
                this->log->logERROR("Portal", "Unable to process packets? 
Weird. (2)");
                return retval;
-       }//TODO do we need to check for ==0 ?
+       }/* TODO do we need to check for ==0 ? */
 
        return 1;
 }
@@ -136,8 +136,8 @@
                        QString s("Recv-ed a RemoteNodename: ");
                        s.append(this->remoteNodeName);
                        this->log->logDEBUG("Portal", s);
+               }
 
-               }
                delete msg;
                return true;
        } else if (type == RUALIVE) {
@@ -157,7 +157,7 @@
        /* Check to see if we got a good Buffer and Portal Object */
        if (buf == 0) {
                log->logERROR("Portal", "pkg callback returned a NULL buffer!");
-               //      bu_bomb("pkg callback returned a NULL buffer!\n");
+               /*      bu_bomb("pkg callback returned a NULL buffer!\n"); */
                return;
        }
 
@@ -187,13 +187,13 @@
 
        /* Route */
 
-       //give the Portal first dibs on the netmsg
+       /* give the Portal first dibs on the netmsg */
        if (p->handleNetMsg(msg)) {
                return;
        }
 
-       //Fire off a Job.  This keeps the selector loop from
-       //delivering all the Msg copies personally.
+       /* Fire off a Job.  This keeps the selector loop from */
+       /* delivering all the Msg copies personally.*/
        RouteMsgJob* job = new RouteMsgJob(msg);
        job->submit();
 }
@@ -204,10 +204,12 @@
        this->pm->disconnect(this);
 }
 
-// Local Variables: ***
-// mode: C++ ***
-// tab-width: 8 ***
-// c-basic-offset: 2 ***
-// indent-tabs-mode: t ***
-// End: ***
-// ex: shiftwidth=2 tabstop=8
+/*
+ * Local Variables:
+ * mode: C
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */

Modified: rt^3/trunk/src/libNet/PortalManager.cxx
===================================================================
--- rt^3/trunk/src/libNet/PortalManager.cxx     2010-11-23 15:57:28 UTC (rev 
41439)
+++ rt^3/trunk/src/libNet/PortalManager.cxx     2010-11-23 16:00:59 UTC (rev 
41440)
@@ -99,7 +99,7 @@
        bool readyException = false;
 
        while (this->runCmd) {
-               //Set values EVERY loop since select() on *nix modifies this.
+               /* Set values EVERY loop since select() on *nix modifies this. 
*/
                timeout.tv_sec = 0;
                timeout.tv_usec = 50 * 1000 * 2;
 
@@ -108,7 +108,7 @@
                exceptionfds = masterfds;
                this->masterFDSLock.unlock();
 
-               //Shelect!!
+               /* Shelect!! */
                int retVal = select(fdmax + 1, &readfds, NULL, &exceptionfds, 
&timeout);
 
 
@@ -122,13 +122,8 @@
                this->log->logINFO("PortalManager", out);
                }
 
-               //Save time on the loop:
-               if (retVal == 0) {
-                       //continue;
-               }
-
                if (retVal < 0) {
-                       //got a selector error
+                       /* got a selector error */
 
                        this->log->logERROR("PortalManager", "Selector Error: " 
+ QString::number(errno));
 
@@ -138,33 +133,33 @@
                for (int i = 0; i <= fdmax; ++i) {
                        bool isaFD = FD_ISSET(i, &masterfds);
 
-                       //Don't muck with an FD that isn't ours!
+                       /* Don't muck with an FD that isn't ours!*/
                        if (!isaFD) {
                                continue;
                        }
 
-                       //Simplify switching later with bools now
+                       /* Simplify switching later with bools now*/
                        isListener = (i == listener);
-//                     readyRead = FD_ISSET(i, &readfds) && !isListener;
-                       readyRead = true; //Hotwire for now.
+/*                     readyRead = FD_ISSET(i, &readfds) && !isListener;*/
+                       readyRead = true; /* Hotwire for now.*/
                        readyAccept = FD_ISSET(i, &readfds) && isListener;
                        readyException = FD_ISSET(i, &exceptionfds);
 
-                       //If nothing to do, then continue;
+                       /* If nothing to do, then continue;*/
                        if (!readyRead && !readyAccept && !readyException) {
                                continue;
                        }
 
-                       //Handle exceptions
+                       /* Handle exceptions */
                        if (readyException) {
-                               //TODO handle exceptions
+                               /* TODO handle exceptions */
                                perror("Exception on FileDescriptor");
                        }
 
                        Portal* p = NULL;
-                       //Accept new connections:
+                       /* Accept new connections: */
                        if (readyAccept) {
-                               //log->logINFO("PortalManager", "Accept");
+                               /* log->logINFO("PortalManager", "Accept"); */
 
                                struct pkg_switch* table = 
this->makeNewSwitchTable();
 
@@ -176,26 +171,26 @@
                                        log->logERROR("PortalManager",
                                                        "Error on accepting new 
client.");
                                } else {
-                                       //Handle new client here.
+                                       /* Handle new client here. */
                                        p = this->makeNewPortal(client, table);
                                }
                        }
 
-                       //the only thing we want to do on the listener loop is 
accept
+                       /* the only thing we want to do on the listener loop is 
accept */
                        if (isListener) {
                                continue;
                        }
 
-                       //If we didnt get a portal from accepting, then get one 
from the map
+                       /* If we didnt get a portal from accepting, then get 
one from the map */
                        if (p == 0 && this->fdPortalMap->contains(i)) {
                                this->portalsLock->lock();
                                p = this->fdPortalMap->value(i);
                                this->portalsLock->unlock();
                        }
 
-                       //Check, again, if we have a good portal.
+                       /* Check, again, if we have a good portal. */
                        if (p == 0) {
-                               //Deal with unmapped file Descriptor
+                               /* Deal with unmapped file Descriptor */
                                QString s("FD ");
                                s.append(QString::number(i));
                                s.append(" not associated with a Portal, 
dropping connection.");
@@ -203,9 +198,9 @@
                                continue;
                        }
 
-                       //read
+                       /* read */
                        if (readyRead) {
-                               //this->log->logINFO("PortalManager", "Read");
+                               /* this->log->logINFO("PortalManager", "Read"); 
*/
 
                                int readResult = p->read();
 
@@ -217,10 +212,10 @@
                                        continue;
                                }
                        }
-               } //end FOR
-       } //end while
+               } /* end FOR */
+       } /* end while */
        this->log->logINFO("PortalManager", "Shutdown");
-}//end fn
+}/* end fn */
 
 Portal*
 PortalManager::makeNewPortal(PkgTcpClient* client, struct pkg_switch* table) {
@@ -230,7 +225,7 @@
                return 0;
        }
 
-       //Obtain lock and then map this new portal
+       /* Obtain lock and then map this new portal */
        this->portalsLock->lock();
        int newFD = p->pkgClient->getFileDescriptor();
        this->fdPortalMap->insert(newFD, p);
@@ -240,7 +235,7 @@
        s.append(QString::number(newFD));
        log->logDEBUG("PortalManager", s);
 
-       //Check maxFD and update if needed.
+       /* Check maxFD and update if needed. */
        if (newFD > fdmax) {
                this->masterFDSLock.lock();
                FD_SET(newFD, &masterfds);
@@ -313,20 +308,21 @@
 {
        Portal* origin = msg->getOrigin();
 
-       //validate incoming data
+       /* validate incoming data */
        if (origin == 0) {
-               //TODO Figure out how to how to handle NULL Portal
+               /* TODO Figure out how to how to handle NULL Portal */
                log->logERROR("PortalManager", "handleDisconnectReqMsg(): NULL 
Portal!");
                return;
        }
 
        this->disconnect(origin);
 }
-
-// Local Variables:
-// tab-width: 8
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: t
-// End:
-// ex: shiftwidth=4 tabstop=8
+/*
+ * Local Variables:
+ * mode: C
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */

Modified: rt^3/trunk/src/libNet/RouteMsgJob.cxx
===================================================================
--- rt^3/trunk/src/libNet/RouteMsgJob.cxx       2010-11-23 15:57:28 UTC (rev 
41439)
+++ rt^3/trunk/src/libNet/RouteMsgJob.cxx       2010-11-23 16:00:59 UTC (rev 
41440)
@@ -37,11 +37,13 @@
        NetMsgRouter::getInstance()->routeMsg(this->msg);
 }
 
-// Local Variables:
-// tab-width: 8
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: t
-// c-file-style: "stroustrup"
-// End:
-// ex: shiftwidth=4 tabstop=8
+
+/*
+ * Local Variables:
+ * mode: C
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to