13 |
|
#include "rtmath.h" |
14 |
|
#include "normcodec.h" |
15 |
|
|
16 |
– |
char *progname; /* set in main() */ |
16 |
|
|
18 |
– |
|
17 |
|
/* Report usage error and exit */ |
18 |
|
static void |
19 |
|
usage_exit(int code) |
223 |
|
int unbuffered = 0; |
224 |
|
NORMCODEC nc; |
225 |
|
int a; |
226 |
< |
|
227 |
< |
progname = argv[0]; |
226 |
> |
/* set global progname */ |
227 |
> |
fixargv0(argv[0]); |
228 |
|
set_nc_defaults(&nc); |
229 |
|
nc.hdrflags = HF_ALL; |
230 |
|
for (a = 1; a < argc && argv[a][0] == '-'; a++) |
340 |
|
fputs(": cannot open for writing\n", stderr); |
341 |
|
return 1; |
342 |
|
} |
343 |
< |
SET_FILE_BINARY(dc.finp); /* starting assumption */ |
343 |
> |
SET_FILE_BINARY(nc.finp); /* starting assumption */ |
344 |
|
SET_FILE_BINARY(stdout); |
345 |
|
#ifdef getc_unlocked /* avoid stupid semaphores */ |
346 |
|
flockfile(nc.finp); |