home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!nigel.msen.com!ilium!sycom!rkushner
- From: rkushner@sycom.mi.org (Ronald Kushner)
- Newsgroups: comp.sys.amiga.datacomm
- Subject: Re: What is the best BBS?
- Distribution: world
- X-BBS-Software: EXCELSIOR! v0.95r
- Message-ID: <rkushner.3hx4@sycom.mi.org>
- Date: 30 Jul 92 22:53:56 EST
- Organization: Michigan Information eXchange
- Lines: 104
-
-
- In an article, eodell@nyx.cs.du.edu (Eugene O'Dell) writes:
- >Why does C-Net need to be rewritten? It's fast, and the code holds
- >up well.
-
- Not to my standards. Here is a piece of source code out of C-Net Amiga. I
- just cut out some of the major gotos and labels. Choose for yourself if
- it's
- good code. This is basically the conferencing module. If you were to
- compair the features of the EXCELSIOR! conferencing and the C-Net
- conferencing, they have simular features - but they way we did it in code
- and the way C-Net did it in code is night and day.
-
- I really don't like gotos, and there isn't one in the EXCELSIOR! source.
-
- /* line 55 */
- void main( int argc, char **argv )
- {
- .
- .
- .
- /* line 106 */
- if( !myp->NumRooms ) {
- PutText( bm[1270] );
- goto ex;
- }
- .
- .
- .
- /* line 117 */
- renter: u.Room = -1; /* no room selected */
-
- if( u.DefRoom ) /* try Private room? */
- MoveToRoom( -1 );
-
- if( CRoom[0] ) /* if there is one */
- if( u.Room < 0 ) /* how about the "lobby?" */
- MoveToRoom( 0 );
-
- if( !u.DefRoom ) /* haven't tried this yet */
- if( u.Room < 0 ) /* how about your private? */
- MoveToRoom( -1 );
-
- if( u.Room < 0 )
- goto ex;
-
- rmove: HereWithYou();
-
- if( r->rc.Creator == z->id ) {
- PutText( bm[1272] );
- PutText( bm[1273] );
- }
-
- .
- .
- .
- /* line 531 */
- if( MoveToRoom( num ) )
- goto rmove;
- break;
-
- case 4:
- u.Quit = TRUE;
- break;
-
- case 5:
- if( z->user1.MyPrivs.ABits & CONFCON_FLAG ) {
- ConTransmit( bm[1355],0,0 );
- strcpy( r->rc.Name, z->user1.Handle );
- r->rc.Creator = z->id;
- }
- else goto ddef;
- break;
- .
- .
- .
- /* line 695 */
-
- case 0:
- ddef: PutText( bm[1375] );
- break;
-
-
- .
- .
- .
- /* line 753 */
- if( u.Quit == 2 ) {
- PutText( bm[1378] );
- goto renter;
- }
-
- PutText( bm[1379] );
-
- ex: z->ConfMode = FALSE;
- myp->CUser[ z->InPort ] = (struct RoomUser *)0;
-
- CallHost( 0 );
-
- err: DeletePort( replyp );
- exit(0);
- }
-
-
-