97 |
|
int argc; |
98 |
|
char *argv[]; |
99 |
|
{ |
100 |
+ |
extern char *getenv(); |
101 |
+ |
char *gv; |
102 |
|
int headline(); |
103 |
|
int i; |
104 |
|
|
105 |
|
progname = argv[0]; |
106 |
+ |
if ((gv = getenv("DISPLAY_GAMMA")) != NULL) |
107 |
+ |
gamcor = atof(gv); |
108 |
|
|
109 |
|
for (i = 1; i < argc; i++) |
110 |
|
if (argv[i][0] == '-') |
171 |
|
} |
172 |
|
|
173 |
|
|
174 |
+ |
int |
175 |
|
headline(s) /* get relevant info from header */ |
176 |
|
char *s; |
177 |
|
{ |
173 |
– |
static char *altname[] = {"rview","rpict",VIEWSTR,NULL}; |
174 |
– |
register char **an; |
178 |
|
char fmt[32]; |
179 |
|
|
180 |
|
if (isexpos(s)) |
182 |
|
else if (isformat(s)) { |
183 |
|
formatval(fmt, s); |
184 |
|
wrongformat = strcmp(fmt, COLRFMT); |
185 |
< |
} else |
186 |
< |
for (an = altname; *an != NULL; an++) |
187 |
< |
if (!strncmp(*an, s, strlen(*an))) { |
185 |
< |
if (sscanview(&ourview, s+strlen(*an)) > 0) |
186 |
< |
gotview++; |
187 |
< |
return; |
188 |
< |
} |
185 |
> |
} else if (isview(s) && sscanview(&ourview, s) > 0) |
186 |
> |
gotview++; |
187 |
> |
return(0); |
188 |
|
} |
189 |
|
|
190 |
|
|
646 |
|
if (fseek(fin, scanpos[y], 0) == -1) |
647 |
|
quiterr("fseek error"); |
648 |
|
cury = y; |
649 |
< |
} else if (scanpos != NULL) |
649 |
> |
} else if (scanpos != NULL && scanpos[y] == -1) |
650 |
|
scanpos[y] = ftell(fin); |
651 |
|
|
652 |
|
if (freadcolrs(scanline, xmax, fin) < 0) |