home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / amiga / datacomm / 5506 < prev    next >
Encoding:
Text File  |  1992-07-30  |  2.3 KB  |  116 lines

  1. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!nigel.msen.com!ilium!sycom!rkushner
  2. From: rkushner@sycom.mi.org (Ronald Kushner)
  3. Newsgroups: comp.sys.amiga.datacomm
  4. Subject: Re: What is the best BBS?
  5. Distribution: world
  6. X-BBS-Software: EXCELSIOR! v0.95r
  7. Message-ID: <rkushner.3hx4@sycom.mi.org>
  8. Date: 30 Jul 92 22:53:56 EST
  9. Organization: Michigan Information eXchange
  10. Lines: 104
  11.  
  12.  
  13. In an article, eodell@nyx.cs.du.edu (Eugene O'Dell) writes:
  14. >Why does C-Net need to be rewritten?  It's fast, and the code holds
  15. >up well.
  16.  
  17. Not to my standards. Here is a piece of source code out of C-Net Amiga. I
  18. just cut out some of the major gotos and labels. Choose for yourself if
  19. it's
  20. good code. This is basically the conferencing module. If you were to
  21. compair the features of the EXCELSIOR! conferencing and the C-Net
  22. conferencing, they have simular features - but they way we did it in code
  23. and the way C-Net did it in code is night and day.
  24.  
  25. I really don't like gotos, and there isn't one in the EXCELSIOR! source.
  26.  
  27. /* line 55 */
  28. void main( int argc, char **argv )
  29. {
  30.   .
  31.   .
  32.   .
  33. /* line 106 */
  34.     if( !myp->NumRooms ) {
  35.         PutText( bm[1270] );
  36.         goto ex;
  37.     }
  38.   .
  39.   . 
  40.   .
  41. /* line 117 */
  42. renter:    u.Room = -1;                /* no room selected */
  43.  
  44.     if( u.DefRoom )                /* try Private room? */
  45.         MoveToRoom( -1 );
  46.  
  47.     if( CRoom[0] )                /* if there is one */
  48.     if( u.Room < 0 )            /* how about the "lobby?" */
  49.         MoveToRoom( 0 );
  50.  
  51.     if( !u.DefRoom )            /* haven't tried this yet */
  52.     if( u.Room < 0 )            /* how about your private? */
  53.         MoveToRoom( -1 );
  54.  
  55.     if( u.Room < 0 )
  56.         goto ex;
  57.  
  58. rmove:    HereWithYou();
  59.  
  60.     if( r->rc.Creator == z->id ) {
  61.         PutText( bm[1272] );
  62.         PutText( bm[1273] );
  63.     }
  64.  
  65.   .
  66.   .
  67.   .
  68. /* line 531 */
  69.                     if( MoveToRoom( num ) )
  70.                         goto rmove;
  71.                     break;
  72.  
  73.                     case 4:
  74.                     u.Quit = TRUE;
  75.                     break;
  76.  
  77.                     case 5:
  78.         if( z->user1.MyPrivs.ABits & CONFCON_FLAG ) {
  79.             ConTransmit( bm[1355],0,0 );
  80.             strcpy( r->rc.Name, z->user1.Handle );
  81.             r->rc.Creator = z->id;
  82.         }
  83.         else    goto ddef;
  84.                     break;
  85. .
  86. .
  87. .
  88. /* line 695 */ 
  89.  
  90.                     case 0:
  91. ddef:                    PutText( bm[1375] );
  92.                     break;
  93.  
  94.  
  95.   .
  96.   .
  97.   .
  98. /* line 753 */
  99.     if( u.Quit == 2 ) {
  100.         PutText( bm[1378] );
  101.         goto renter;
  102.     }
  103.  
  104.     PutText( bm[1379] );
  105.  
  106. ex:    z->ConfMode = FALSE;
  107.     myp->CUser[ z->InPort ] = (struct RoomUser *)0;
  108.  
  109.     CallHost( 0 );
  110.  
  111. err:    DeletePort( replyp );
  112.     exit(0);
  113. }
  114.  
  115.  
  116.