15 |
|
#include "copyright.h" |
16 |
|
|
17 |
|
#include "platform.h" |
18 |
< |
#include "rtprocess.h" |
18 |
> |
#include "paths.h" |
19 |
|
#include "rterror.h" |
20 |
|
#include "color.h" |
21 |
|
#include "resolu.h" |
22 |
|
|
23 |
+ |
#ifdef getc_unlocked /* avoid horrendous overhead of flockfile */ |
24 |
+ |
#undef getc |
25 |
+ |
#define getc getc_unlocked |
26 |
+ |
#endif |
27 |
+ |
|
28 |
|
#define MAXFILE 1024 |
29 |
|
|
30 |
|
#define HASMIN 1 |
91 |
|
} else |
92 |
|
wrongformat = 1; |
93 |
|
} else if (echoheader) { |
94 |
< |
putc('\t', stdout); |
94 |
> |
fputc('\t', stdout); |
95 |
|
fputs(s, stdout); |
96 |
|
} |
97 |
|
return(0); |
248 |
|
input[nfile].name); |
249 |
|
quit(1); |
250 |
|
} |
251 |
< |
if (ncolumns > 0) { |
252 |
< |
if (curcol >= ncolumns) { |
251 |
> |
if (ncolumns) { |
252 |
> |
if (curcol >= abs(ncolumns)) { |
253 |
|
cury = ymax + spacing; |
254 |
|
curx = x0; |
255 |
|
curcol = 0; |
302 |
|
ysiz = ymax; |
303 |
|
else if (ysiz > ymax) |
304 |
|
ymax = ysiz; |
305 |
+ |
if (ncolumns < 0) { /* reverse rows if requested */ |
306 |
+ |
int i = nfile; |
307 |
+ |
while (i--) |
308 |
+ |
input[i].yloc = ymax - input[i].yres - input[i].yloc; |
309 |
+ |
} |
310 |
|
/* add new header info. */ |
311 |
|
printargs(argc, argv, stdout); |
312 |
|
if (strcmp(ourfmt, PICFMT)) |