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 |
|
} |