home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / c / cops_104.zip / cops_104 / src / clearfiles.c < prev    next >
C/C++ Source or Header  |  1992-03-10  |  702b  |  46 lines

  1. /* Copyright 1985 Robert W. Baldwin */
  2. /* Copyright 1986 Robert W. Baldwin */
  3. static    char    *notice85 = "Copyright 1985 Robert W. Baldwin";
  4. static    char    *notice86 = "Copyright 1986 Robert W. Baldwin";
  5.  
  6. /*
  7.  * Reset the info files used by Kuang.
  8.  */
  9.  
  10.  
  11. #include    <stdio.h>
  12.  
  13. char    *filelist[] = {
  14.     "uids.k",
  15.     "Success",
  16.     "uids.k",
  17.     "uids.p",
  18.     "uids.n",
  19.     "uids.x",
  20.     "gids.k",
  21.     "gids.p",
  22.     "gids.n",
  23.     "gids.x",
  24.     "files.k",
  25.     "files.p",
  26.     "files.n",
  27.     "files.x",
  28.     "",
  29.     };
  30.  
  31. main(argc, argv)
  32. int    argc;
  33. char    *argv[];
  34. {
  35.     int    i;
  36.  
  37.     for (i = 0 ; filelist[i][0] != NULL ; i++)  {
  38.         if (freopen(filelist[i], "w", stdout) == NULL)  {
  39.             fprintf(stderr, "%s: can't open %s.\n",
  40.                 argv[0], filelist[i]);
  41.             exit(1);
  42.             }
  43.         }
  44. }
  45.  
  46.