| 173 |
|
static char *altname[] = {"rview","rpict",VIEWSTR,NULL}; |
| 174 |
|
register char **an; |
| 175 |
|
|
| 176 |
< |
if (!strncmp(s, "EXPOSURE=", 9)) |
| 177 |
< |
exposure *= atof(s+9); |
| 176 |
> |
if (isexpos(s)) |
| 177 |
> |
exposure *= exposval(s); |
| 178 |
|
else |
| 179 |
|
for (an = altname; *an != NULL; an++) |
| 180 |
|
if (!strncmp(*an, s, strlen(*an))) { |
| 185 |
|
} |
| 186 |
|
|
| 187 |
|
|
| 188 |
– |
char * |
| 189 |
– |
sskip(s) /* skip a word */ |
| 190 |
– |
register char *s; |
| 191 |
– |
{ |
| 192 |
– |
while (isspace(*s)) s++; |
| 193 |
– |
while (*s && !isspace(*s)) s++; |
| 194 |
– |
return(s); |
| 195 |
– |
} |
| 196 |
– |
|
| 197 |
– |
|
| 188 |
|
init() /* get data and open window */ |
| 189 |
|
{ |
| 190 |
|
register int i; |
| 374 |
|
switch (*cp) { |
| 375 |
|
case '\n': |
| 376 |
|
case '\r': /* radiance */ |
| 377 |
< |
sprintf(buf, "%-3g", intens(cval)/exposure); |
| 377 |
> |
sprintf(buf, "%.3f", intens(cval)/exposure); |
| 378 |
|
break; |
| 379 |
|
case 'l': /* luminance */ |
| 380 |
< |
sprintf(buf, "%-3gn", bright(cval)*683.0/exposure); |
| 380 |
> |
sprintf(buf, "%.0fn", bright(cval)*683.0/exposure); |
| 381 |
|
break; |
| 382 |
|
case 'c': /* color */ |
| 383 |
|
comp = pow(2.0, (double)scale); |
| 660 |
|
if (getscan(y) < 0) |
| 661 |
|
quiterr("cannot seek for picreadline"); |
| 662 |
|
/* convert scanline */ |
| 663 |
< |
if (scale != 0) |
| 663 |
> |
if (scale) |
| 664 |
|
for (i = 0; i < xmax; i++) |
| 665 |
< |
if (scanline[i][EXP]+scale >= 0) |
| 665 |
> |
if (scanline[i][EXP]) |
| 666 |
|
scanline[i][EXP] += scale; |
| 667 |
|
normcolrs(scanline, xmax); |
| 668 |
|
for (i = 0; i < xmax; i++) { |