home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_200 / 250_01 / plotf.c < prev    next >
Text File  |  1987-10-29  |  768b  |  38 lines

  1. #include <stdio.h>
  2.  
  3. #define void     VOID
  4. #define READFAIL (-1)
  5.  
  6. /* ------------------------------------------------------------------------- */
  7.  
  8. main(argc, argv)
  9. int   argc;
  10. char  *argv[];
  11. {
  12.    FILE   *fopenb(),
  13.           *infile;
  14.  
  15.    register int   c;
  16.  
  17.  
  18.  
  19.    if (argc != 2)
  20.    {
  21.       fprintf(stderr, "%s", "usage: plotf <picture file>");
  22.       exit(1);
  23.    }
  24.  
  25.    if ( !(infile = fopenb(argv[1], "r")) )
  26.    {
  27.       fprintf(stderr, "%s%s", "unable to open ", argv[1]);
  28.       exit(1);
  29.    }
  30.  
  31.    while ( (c = getc(infile)) != READFAIL )
  32.       pputc(c);
  33.  
  34.    fclose(infile);
  35. }
  36.  
  37. /* ------------------------------------------------------------------------- */
  38.