| 317 |
|
static int |
| 318 |
|
setheadvar(char *val, void *p) |
| 319 |
|
{ |
| 320 |
+ |
char newval[128]; |
| 321 |
|
LUTAB *htp = (LUTAB *)p; |
| 322 |
|
LUENT *tep; |
| 323 |
|
char *key; |
| 360 |
|
return(-1); /* memory allocation error */ |
| 361 |
|
if (!tep->key) |
| 362 |
|
tep->key = strcpy(malloc(kln+1), key); |
| 363 |
< |
if (tep->data) |
| 363 |
> |
if (tep->data) { /* check for special cases */ |
| 364 |
> |
if (!strcmp(key, "EXPOSURE")) { |
| 365 |
> |
sprintf(newval, "%f", atof(tep->data)*atof(val)); |
| 366 |
> |
vln = strlen(val = newval); |
| 367 |
> |
} |
| 368 |
|
free(tep->data); |
| 369 |
+ |
} |
| 370 |
|
tep->data = strcpy(malloc(vln+1), val); |
| 371 |
|
return(1); |
| 372 |
|
} |
| 475 |
|
} |
| 476 |
|
if (c) |
| 477 |
|
return(TYP_BINARY); |
| 472 |
– |
SET_FILE_TEXT(fin); /* originally set to binary */ |
| 478 |
|
return(TYP_TEXT); |
| 479 |
|
badeof: |
| 480 |
|
if (report != REP_QUIET) { |
| 559 |
|
fputs(progname, stdout); |
| 560 |
|
fputs(": comparing inputs as ASCII text\n", stdout); |
| 561 |
|
} |
| 562 |
+ |
SET_FILE_TEXT(f1in); /* originally set to binary */ |
| 563 |
+ |
SET_FILE_TEXT(f2in); |
| 564 |
|
init_line(&l1buf); init_line(&l2buf); /* compare a line at a time */ |
| 565 |
|
while (read_line(&l1buf, f1in)) { |
| 566 |
|
lin1cnt++; |