216 |
|
/* prepare output */ |
217 |
|
if (outspec != NULL) { |
218 |
|
sprintf(fname, outspec, fn); |
219 |
< |
if (freopen(fname, "w", stdout) == NULL) { |
219 |
> |
if (freopen(fname, "wb", stdout) == NULL) { |
220 |
|
sprintf(errmsg, "cannot open output \"%s\"", fname); |
221 |
|
error(SYSTEM, errmsg); |
222 |
|
} |
287 |
|
int n; |
288 |
|
off_t nextloc; |
289 |
|
/* open holodeck file */ |
290 |
< |
if ((fp = fopen(hdkfile, "r")) == NULL) { |
290 |
> |
if ((fp = fopen(hdkfile, "rb")) == NULL) { |
291 |
|
sprintf(errmsg, "cannot open \"%s\" for reading", hdkfile); |
292 |
|
error(SYSTEM, errmsg); |
293 |
|
} |
317 |
|
|
318 |
|
|
319 |
|
void |
320 |
< |
eputs(s) /* put error message to stderr */ |
321 |
< |
char *s; |
320 |
> |
eputs(const char *s) /* put error message to stderr */ |
321 |
|
{ |
322 |
|
static int midline = 0; |
323 |
|
|