64 |
|
"SOFTWARE", |
65 |
|
"CAPDATE", |
66 |
|
"GMT", |
67 |
+ |
"FRAME", |
68 |
|
NULL /* terminator */ |
69 |
|
}; |
70 |
|
/* header variable settings */ |
110 |
|
static int |
111 |
|
read_line(LINEBUF *bp, FILE *fp) |
112 |
|
{ |
113 |
+ |
static int doneWarn = 0; |
114 |
+ |
|
115 |
|
bp->len = 0; |
116 |
|
if (!bp->str) { |
117 |
|
bp->str = (char *)malloc(bp->siz = 512); |
124 |
|
break; /* found EOL */ |
125 |
|
if (bp->len < bp->siz - 4) |
126 |
|
continue; /* at EOF? */ |
127 |
< |
if (bp->siz >= MAXBUF) |
128 |
< |
break; /* don't go to extremes */ |
127 |
> |
if (bp->siz >= MAXBUF) { |
128 |
> |
if ((report >= REP_WARN) & !doneWarn) { |
129 |
> |
fprintf(stderr, |
130 |
> |
"%s: warning - input line(s) past %ld MByte limit\n", |
131 |
> |
progname, MAXBUF>>20); |
132 |
> |
doneWarn++; |
133 |
> |
} |
134 |
> |
break; /* return MAXBUF partial line */ |
135 |
> |
} |
136 |
|
if ((bp->siz += bp->siz/2) > MAXBUF) |
137 |
|
bp->siz = MAXBUF; |
138 |
|
bp->str = (char *)realloc(bp->str, bp->siz); |
200 |
|
{ |
201 |
|
int p; |
202 |
|
|
203 |
< |
if (!real_check(colval(c1,RED)+colval(c1,GRN)+colval(c1,BLU)*(1./3.), |
204 |
< |
colval(c2,RED)+colval(c2,GRN)+colval(c2,BLU))*(1./3.)) |
203 |
> |
if (!real_check((colval(c1,RED)+colval(c1,GRN)+colval(c1,BLU))*(1./3.), |
204 |
> |
(colval(c2,RED)+colval(c2,GRN)+colval(c2,BLU))*(1./3.))) |
205 |
|
return(0); |
206 |
|
|
207 |
|
p = (colval(c1,GRN) > colval(c1,RED)) ? GRN : RED; |
778 |
|
ign_header |= !has_header(typ1); /* check headers if indicated */ |
779 |
|
if (!ign_header && !headers_match()) |
780 |
|
return(1); |
781 |
< |
lu_done(&hdr1); lu_done(&hdr2); |
781 |
> |
lu_done(&hdr1); lu_done(&hdr2); /* done with header info. */ |
782 |
|
if (!ign_header & (report >= REP_WARN)) { |
773 |
– |
if (typ1 == TYP_UNKNOWN) |
774 |
– |
printf("%s: warning - unrecognized format, comparing as binary\n", |
775 |
– |
progname); |
783 |
|
if (lin1cnt != lin2cnt) |
784 |
|
printf("%s: warning - headers are different lengths\n", |
785 |
+ |
progname); |
786 |
+ |
if (typ1 == TYP_UNKNOWN) |
787 |
+ |
printf("%s: warning - unrecognized format\n", |
788 |
|
progname); |
789 |
|
} |
790 |
|
if (report >= REP_VERBOSE) |