| 14 |
|
|
| 15 |
|
#ifdef MSDOS |
| 16 |
|
#include <fcntl.h> |
| 17 |
+ |
extern int _fmode; |
| 18 |
|
#endif |
| 19 |
|
|
| 20 |
|
extern int fputs(); |
| 21 |
|
|
| 22 |
|
|
| 23 |
+ |
int |
| 24 |
|
tabstr(s) /* put out line followed by tab */ |
| 25 |
|
register char *s; |
| 26 |
|
{ |
| 30 |
|
} |
| 31 |
|
if (*--s == '\n') |
| 32 |
|
putchar('\t'); |
| 33 |
+ |
return(0); |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
|
| 37 |
|
main(argc, argv) |
| 38 |
|
int argc; |
| 39 |
< |
char *argv[]; |
| 39 |
> |
char **argv; |
| 40 |
|
{ |
| 41 |
|
int dim = 0; |
| 42 |
|
FILE *fp; |
| 45 |
|
if (argc > 1 && !strcmp(argv[1], "-d")) { |
| 46 |
|
argc--; argv++; |
| 47 |
|
dim = 1; |
| 48 |
+ |
#ifdef MSDOS |
| 49 |
+ |
setmode(fileno(stdin), _fmode = O_BINARY); |
| 50 |
+ |
#endif |
| 51 |
|
} else if (argc == 2 && !strcmp(argv[1], "-")) { |
| 52 |
|
#ifdef MSDOS |
| 53 |
|
setmode(fileno(stdin), O_BINARY); |
| 54 |
|
setmode(fileno(stdout), O_BINARY); |
| 55 |
|
#endif |
| 56 |
< |
getheader(stdin, NULL); |
| 56 |
> |
getheader(stdin, NULL, NULL); |
| 57 |
|
copycat(); |
| 58 |
|
exit(0); |
| 59 |
|
} |
| 90 |
|
int j; |
| 91 |
|
register int c; |
| 92 |
|
|
| 93 |
< |
getheader(fp, NULL); /* skip header */ |
| 93 |
> |
getheader(fp, NULL, NULL); /* skip header */ |
| 94 |
|
|
| 95 |
|
switch (c = getc(fp)) { |
| 96 |
|
case '+': /* picture */ |
| 122 |
|
copycat() /* copy input to output */ |
| 123 |
|
{ |
| 124 |
|
register int c; |
| 125 |
< |
|
| 125 |
> |
|
| 126 |
|
while ((c = getchar()) != EOF) |
| 127 |
|
putchar(c); |
| 128 |
|
} |