1 |
< |
/* Copyright (c) 1997 Silicon Graphics, Inc. */ |
1 |
> |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ SGI"; |
29 |
|
|
30 |
|
#undef NOPROTO |
31 |
|
#define NOPROTO 1 |
32 |
+ |
#include "color.h" |
33 |
|
#include "tonemap.h" |
34 |
|
#include "view.h" |
35 |
|
#include "x11raster.h" |
36 |
|
#include "random.h" |
37 |
|
#include "resolu.h" |
38 |
|
|
38 |
– |
#ifndef int4 |
39 |
– |
#define int4 int /* most int's are 32-bit */ |
40 |
– |
#endif |
41 |
– |
|
39 |
|
#define FONTNAME "8x13" /* text font we'll use */ |
40 |
|
|
41 |
|
#define CTRL(c) ((c)-'@') |
91 |
|
int xmax, ymax; /* picture dimensions */ |
92 |
|
int width, height; /* window size */ |
93 |
|
char *fname = NULL; /* input file name */ |
94 |
< |
FILE *fin = stdin; /* input file */ |
94 |
> |
FILE *fin = NULL; /* input file */ |
95 |
|
long *scanpos = NULL; /* scan line positions in file */ |
96 |
|
int cury = 0; /* current scan location */ |
97 |
|
|
143 |
|
int pid; |
144 |
|
|
145 |
|
progname = argv[0]; |
146 |
+ |
fin = stdin; |
147 |
|
|
148 |
|
for (i = 1; i < argc; i++) |
149 |
|
if (argv[i][0] == '-') |
251 |
|
} |
252 |
|
|
253 |
|
|
254 |
+ |
int |
255 |
|
headline(s) /* get relevant info from header */ |
256 |
|
char *s; |
257 |
|
{ |
263 |
|
wrongformat = strcmp(fmt, COLRFMT); |
264 |
|
else if (isview(s) && sscanview(&ourview, s) > 0) |
265 |
|
gotview++; |
266 |
+ |
return(0); |
267 |
|
} |
268 |
|
|
269 |
|
|
736 |
|
case 't': /* trace */ |
737 |
|
return(traceray(ekey->x, ekey->y)); |
738 |
|
case 'a': /* auto exposure */ |
739 |
+ |
if (fname == NULL) |
740 |
+ |
return(-1); |
741 |
|
tmflags = TM_F_CAMERA; |
742 |
|
strcpy(buf, "auto exposure..."); |
743 |
|
goto remap; |
744 |
|
case 'h': /* human response */ |
745 |
+ |
if (fname == NULL) |
746 |
+ |
return(-1); |
747 |
|
tmflags = TM_F_HUMAN; |
748 |
|
strcpy(buf, "human exposure..."); |
749 |
|
goto remap; |