| 16 |
|
|
| 17 |
|
#include "resolu.h" |
| 18 |
|
|
| 19 |
< |
#define MAXFILE 32 |
| 19 |
> |
#define MAXFILE 64 |
| 20 |
|
|
| 21 |
|
/* output picture size */ |
| 22 |
|
int xsiz = 0; |
| 116 |
|
goto userr; |
| 117 |
|
} |
| 118 |
|
dofiles: |
| 119 |
+ |
if (ysiz > 0 & ncolumns > 0) { |
| 120 |
+ |
fprintf(stderr, "%s: -a option incompatible with -y\n", |
| 121 |
+ |
progname); |
| 122 |
+ |
quit(1); |
| 123 |
+ |
} |
| 124 |
|
for (nfile = 0; an < argc; nfile++) { |
| 125 |
|
if (nfile >= MAXFILE) |
| 126 |
|
goto toomany; |
| 127 |
< |
if (autolabel) |
| 123 |
< |
thislabel = argv[an]; |
| 124 |
< |
else |
| 125 |
< |
thislabel = NULL; |
| 127 |
> |
thislabel = NULL; |
| 128 |
|
input[nfile].hasmin = input[nfile].hasmax = 0; |
| 129 |
|
while (an < argc && (argv[an][0] == '-' || argv[an][0] == '+')) |
| 130 |
|
switch (argv[an][1]) { |
| 161 |
|
getfile: |
| 162 |
|
if (argc-an < (ncolumns ? 1 : 3)) |
| 163 |
|
goto userr; |
| 164 |
+ |
if (autolabel && thislabel == NULL) |
| 165 |
+ |
thislabel = argv[an]; |
| 166 |
|
if (!strcmp(argv[an], "-")) { |
| 167 |
|
input[nfile].name = "<stdin>"; |
| 168 |
|
input[nfile].fp = stdin; |
| 222 |
|
goto toomany; |
| 223 |
|
input[nfile].name = "<Label>"; |
| 224 |
|
input[nfile].hasmin = input[nfile].hasmax = 0; |
| 225 |
+ |
input[nfile].xres = input[nfile-1].xres; |
| 226 |
+ |
input[nfile].yres = labelht; |
| 227 |
|
if ((input[nfile].fp = lblopen(thislabel, |
| 228 |
|
&input[nfile].xres, |
| 229 |
|
&input[nfile].yres)) == NULL) |
| 344 |
|
char com[128]; |
| 345 |
|
FILE *fp; |
| 346 |
|
|
| 347 |
< |
sprintf(com, "psign -h %d '%.30s' | pfilt -1 -x /2 -y /2", |
| 342 |
< |
2*labelht, s); |
| 347 |
> |
sprintf(com, "psign -s -.15 -a 2 -x %d -y %d '%.90s'", *xp, *yp, s); |
| 348 |
|
if ((fp = popen(com, "r")) == NULL) |
| 349 |
|
return(NULL); |
| 350 |
|
if (checkheader(fp, COLRFMT, NULL) < 0) |
| 361 |
|
quit(code) /* exit gracefully */ |
| 362 |
|
int code; |
| 363 |
|
{ |
| 364 |
+ |
int status; |
| 365 |
+ |
|
| 366 |
+ |
if (code == 0) /* reap any children */ |
| 367 |
+ |
while (wait(&status) != -1) |
| 368 |
+ |
if (code == 0) |
| 369 |
+ |
code = status>>8 & 0xff; |
| 370 |
|
exit(code); |
| 371 |
|
} |