| 16 |
|
|
| 17 |
|
#include "platform.h" |
| 18 |
|
#include "rtprocess.h" |
| 19 |
+ |
#include "rterror.h" |
| 20 |
|
#include "color.h" |
| 21 |
|
#include "resolu.h" |
| 22 |
|
|
| 23 |
< |
#define MAXFILE 64 |
| 23 |
> |
#define MAXFILE 512 |
| 24 |
|
|
| 25 |
|
#define HASMIN 1 |
| 26 |
|
#define HASMAX 2 |
| 40 |
|
|
| 41 |
|
int checkthresh = 0; /* check threshold value */ |
| 42 |
|
|
| 43 |
+ |
char StandardInput[] = "<stdin>"; |
| 44 |
|
char Command[] = "<Command>"; |
| 45 |
|
char Label[] = "<Label>"; |
| 46 |
|
|
| 60 |
|
char ourfmt[LPICFMT+1] = PICFMT; |
| 61 |
|
int wrongformat = 0; |
| 62 |
|
|
| 61 |
– |
FILE *lblopen(); |
| 62 |
– |
void quit(); |
| 63 |
|
|
| 64 |
+ |
static gethfunc tabputs; |
| 65 |
+ |
static void compos(void); |
| 66 |
+ |
static int cmpcolr(COLR c1, COLR c2); |
| 67 |
+ |
static FILE * lblopen(char *s, int *xp, int *yp); |
| 68 |
|
|
| 69 |
< |
tabputs(s) /* print line preceded by a tab */ |
| 70 |
< |
char *s; |
| 69 |
> |
|
| 70 |
> |
|
| 71 |
> |
static int |
| 72 |
> |
tabputs( /* print line preceded by a tab */ |
| 73 |
> |
char *s, |
| 74 |
> |
void *p |
| 75 |
> |
) |
| 76 |
|
{ |
| 77 |
|
char fmt[32]; |
| 78 |
|
|
| 92 |
|
} |
| 93 |
|
|
| 94 |
|
|
| 95 |
< |
main(argc, argv) |
| 96 |
< |
int argc; |
| 97 |
< |
char *argv[]; |
| 95 |
> |
int |
| 96 |
> |
main( |
| 97 |
> |
int argc, |
| 98 |
> |
char *argv[] |
| 99 |
> |
) |
| 100 |
|
{ |
| 101 |
|
int ncolumns = 0; |
| 102 |
|
int autolabel = 0; |
| 213 |
|
if (autolabel && thislabel == NULL) |
| 214 |
|
thislabel = argv[an]; |
| 215 |
|
if (!strcmp(argv[an], "-")) { |
| 216 |
< |
input[nfile].name = "<stdin>"; |
| 216 |
> |
input[nfile].name = StandardInput; |
| 217 |
|
input[nfile].fp = stdin; |
| 218 |
|
} else { |
| 219 |
|
if (argv[an][0] == '!') { |
| 321 |
|
labelerr: |
| 322 |
|
fprintf(stderr, "%s: error opening label\n", progname); |
| 323 |
|
quit(1); |
| 324 |
+ |
return 1; /* pro forma return */ |
| 325 |
|
} |
| 326 |
|
|
| 327 |
|
|
| 328 |
< |
compos() /* composite pictures */ |
| 328 |
> |
static void |
| 329 |
> |
compos(void) /* composite pictures */ |
| 330 |
|
{ |
| 331 |
|
COLR *scanin, *scanout; |
| 332 |
|
int y; |
| 380 |
|
quit(1); |
| 381 |
|
} |
| 382 |
|
} |
| 383 |
+ |
/* read remainders from streams */ |
| 384 |
+ |
for (i = 0; i < nfile; i++) |
| 385 |
+ |
if (input[i].name[0] == '<') |
| 386 |
+ |
while (getc(input[i].fp) != EOF) |
| 387 |
+ |
; |
| 388 |
|
return; |
| 389 |
|
memerr: |
| 390 |
|
perror(progname); |
| 392 |
|
} |
| 393 |
|
|
| 394 |
|
|
| 395 |
< |
int |
| 396 |
< |
cmpcolr(c1, c2) /* compare two colr's (improvisation) */ |
| 397 |
< |
register COLR c1, c2; |
| 395 |
> |
static int |
| 396 |
> |
cmpcolr( /* compare two colr's (improvisation) */ |
| 397 |
> |
register COLR c1, |
| 398 |
> |
register COLR c2 |
| 399 |
> |
) |
| 400 |
|
{ |
| 401 |
|
register int i, j; |
| 402 |
|
|
| 408 |
|
} |
| 409 |
|
|
| 410 |
|
|
| 411 |
< |
FILE * |
| 412 |
< |
lblopen(s, xp, yp) /* open pipe to label generator */ |
| 413 |
< |
char *s; |
| 414 |
< |
int *xp, *yp; |
| 411 |
> |
static FILE * |
| 412 |
> |
lblopen( /* open pipe to label generator */ |
| 413 |
> |
char *s, |
| 414 |
> |
int *xp, |
| 415 |
> |
int *yp |
| 416 |
> |
) |
| 417 |
|
{ |
| 418 |
|
char com[PATH_MAX]; |
| 419 |
|
FILE *fp; |