home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 September / PCO_0998.ISO / filesbbs / dos / sbbs_src.exe / SBBS / UTI / UTILIST.C < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-13  |  716 b   |  38 lines

  1. /* UTILIST.C */
  2.  
  3. /* Developed 1990-1997 by Rob Swindell; PO Box 501, Yorba Linda, CA 92885 */
  4.  
  5. #include "sbbs.h"
  6. #include "uti.h"
  7.  
  8. int main(int argc, char **argv)
  9. {
  10.     char str[256];
  11.     int i,j,file;
  12.  
  13. PREPSCREEN;
  14.  
  15. printf("Synchronet UTILIST v%s\n",VER);
  16.  
  17. if(argc<2)
  18.     exit(1);
  19.  
  20. uti_init("UTILIST",argc,argv);
  21.  
  22. if((file=nopen(argv[1],O_CREAT|O_TRUNC|O_WRONLY))==-1)
  23.     exit(2);
  24.  
  25. for(j=0;j<total_grps;j++)
  26.     for(i=0;i<total_subs;i++) {
  27.         if(sub[i]->grp!=j)
  28.             continue;
  29.         sprintf(str,"%s\r\n%s\r\n",sub[i]->code,sub[i]->code);
  30.         write(file,str,strlen(str));
  31.         sprintf(str,"%s\r\n",sub[i]->lname);
  32.         write(file,str,strlen(str)); }
  33. close(file);
  34. printf("\nDone.\n");
  35. bail(0);
  36. return(0);
  37. }
  38.