| 112 |
|
FILE *infp, *outfp; |
| 113 |
|
long ifpos; |
| 114 |
|
/* open files for i/o */ |
| 115 |
< |
if ((infp = fopen(infn, "r")) == NULL) { |
| 115 |
> |
if ((infp = fopen(infn, "rb")) == NULL) { |
| 116 |
|
sprintf(errmsg, "cannot open \"%s\" for reading", infn); |
| 117 |
|
error(SYSTEM, errmsg); |
| 118 |
|
} |
| 120 |
|
sprintf(errmsg, "output file \"%s\" already exists!", outfn); |
| 121 |
|
error(USER, errmsg); |
| 122 |
|
} |
| 123 |
< |
if ((outfp = fopen(outfn, "w+")) == NULL) { |
| 123 |
> |
if ((outfp = fopen(outfn, "wb+")) == NULL) { |
| 124 |
|
sprintf(errmsg, "cannot open \"%s\" for writing", outfn); |
| 125 |
|
error(SYSTEM, errmsg); |
| 126 |
|
} |
| 248 |
|
|
| 249 |
|
|
| 250 |
|
void |
| 251 |
< |
eputs(s) /* put error message to stderr */ |
| 252 |
< |
char *s; |
| 251 |
> |
eputs(const char *s) /* put error message to stderr */ |
| 252 |
|
{ |
| 253 |
|
static int midline = 0; |
| 254 |
|
|