| 116 |
|
fputs("NCOMP=3\n", fout); /* always RGB */ |
| 117 |
|
if (info != NULL) /* add extra info if given */ |
| 118 |
|
fputs(info, fout); |
| 119 |
+ |
if ((outfmt == 'f') | (outfmt == 'd')) |
| 120 |
+ |
fputendian(fout); |
| 121 |
|
fputformat(formstr(outfmt), fout); |
| 122 |
|
fputc('\n', fout); /* empty line ends header */ |
| 123 |
|
} |
| 143 |
|
LUENT *lep; |
| 144 |
|
STREAMOUT *sop; |
| 145 |
|
char *cp; |
| 146 |
< |
|
| 146 |
> |
|
| 147 |
> |
info[0] = '\0'; |
| 148 |
|
if (ospec == NULL) { /* use stdout? */ |
| 149 |
|
if (!noopen & !using_stdout) { |
| 150 |
|
if (outfmt != 'a') |
| 151 |
|
SET_FILE_BINARY(stdout); |
| 152 |
+ |
#ifdef getc_unlocked |
| 153 |
+ |
flockfile(stdout); /* avoid lock/unlock overhead */ |
| 154 |
+ |
#endif |
| 155 |
|
if (header) { |
| 156 |
|
cp = info; |
| 157 |
|
if (yres > 0) { |
| 168 |
|
if (waitflush > 0) |
| 169 |
|
fflush(stdout); |
| 170 |
|
stdos.xr = xres; stdos.yr = yres; |
| 165 |
– |
#ifdef getc_unlocked |
| 166 |
– |
flockfile(stdout); /* avoid lock/unlock overhead */ |
| 167 |
– |
#endif |
| 171 |
|
using_stdout = 1; |
| 172 |
|
} |
| 173 |
|
stdos.ofp = stdout; |