Annotation of sbbs/sbbs2/sbj/sbjclean.c, revision 1.1.1.1

1.1       root        1: /* SBJCLEAN.C */
                      2: 
                      3: /* Developed 1990-1997 by Rob Swindell; PO Box 501, Yorba Linda, CA 92885 */
                      4: 
                      5: /* Clean-up program for Synchronet Blackjack Online External Program */
                      6: 
                      7: #define SBJCLEAN
                      8: 
                      9: #include "sbj.c"
                     10: 
                     11: 
                     12: int main(int argc, char **argv)
                     13: {
                     14:        char *p;
                     15:        int i;
                     16: 
                     17: node_dir[0]=0;
                     18: for(i=1;i<argc;i++)
                     19:        if(!stricmp(argv[i],"/L"))
                     20:                logit=1;
                     21:        else strcpy(node_dir,argv[i]);
                     22: 
                     23: p=getenv("SBBSNODE");
                     24: if(!node_dir[0] && p)
                     25:        strcpy(node_dir,p);
                     26: 
                     27: if(!node_dir[0]) {       /* node directory not specified */
                     28:        printf("usage: sbjclean <node directory>\r\n");
                     29:        getch();
                     30:        return(1); }
                     31: 
                     32: if(node_dir[strlen(node_dir)-1]!='\\')  /* make sure node_dir ends in '\' */
                     33:     strcat(node_dir,"\\");
                     34: 
                     35: initdata();                                 /* read XTRN.DAT and more */
                     36: 
                     37: if((gamedab=open("GAME.DAB",O_RDWR|O_DENYNONE|O_BINARY))==-1) {
                     38:        printf("Error opening GAME.DAB\r\n");                /* open deny none */
                     39:     return(1); }
                     40: getgamedat(1);
                     41: node[node_num-1]=0;
                     42: status[node_num-1]=0;
                     43: putgamedat();
                     44: if(curplayer==node_num)
                     45:        nextplayer();
                     46: close(gamedab);
                     47: return(0);
                     48: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.