home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource4
/
250_01
/
plotf.c
< prev
next >
Wrap
Text File
|
1987-10-29
|
768b
|
38 lines
#include <stdio.h>
#define void VOID
#define READFAIL (-1)
/* ------------------------------------------------------------------------- */
main(argc, argv)
int argc;
char *argv[];
{
FILE *fopenb(),
*infile;
register int c;
if (argc != 2)
{
fprintf(stderr, "%s", "usage: plotf <picture file>");
exit(1);
}
if ( !(infile = fopenb(argv[1], "r")) )
{
fprintf(stderr, "%s%s", "unable to open ", argv[1]);
exit(1);
}
while ( (c = getc(infile)) != READFAIL )
pputc(c);
fclose(infile);
}
/* ------------------------------------------------------------------------- */