home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / SBBS1B00.ZIP / XTRN.EXE / XTRN / SBJ / SBJCLEAN.C < prev    next >
C/C++ Source or Header  |  1992-05-08  |  820b  |  35 lines

  1. /* SBJCLEAN.C */
  2.  
  3. /* Clean-up program for Synchronet Blackjack Online External Program */
  4.  
  5. #define SBJCLEAN
  6.  
  7. #include "sbj.c"
  8.  
  9.  
  10. int main(int argc, char **argv)
  11. {
  12.  
  13. if(argc<2) {            /* node directory not specified */
  14.     printf("usage: sbjclean <node directory>\r\n");
  15.     getch();
  16.     return(1); }
  17. strcpy(node_dir,argv[1]);
  18. if(node_dir[strlen(node_dir)-1]!='\\')  /* make sure node_dir ends in '\' */
  19.     strcat(node_dir,"\\");
  20.  
  21. initdata();                                 /* read XTRN.DAT and more */
  22.  
  23. if((gamedab=open("GAME.DAB",O_RDWR|O_DENYNONE|O_BINARY))==-1) {
  24.     printf("Error opening GAME.DAB\r\n");                /* open deny none */
  25.     return(1); }
  26. getgamedat(1);
  27. node[node_num-1]=0;
  28. status[node_num-1]=0;
  29. putgamedat();
  30. if(curplayer==node_num)
  31.     nextplayer();
  32. close(gamedab);
  33. return(0);
  34. }
  35.