ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/aedimage.c
(Generate patch)

Comparing ray/src/px/aedimage.c (file contents):
Revision 1.10 by greg, Thu Apr 18 14:35:03 1991 UTC vs.
Revision 2.6 by schorsch, Fri Jan 2 12:47:01 2004 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1986 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  aedimage.c - RADIANCE driver for AED 512 terminal.
6   *
# Line 12 | Line 9 | static char SCCSid[] = "$SunId$ LBL";
9   */
10  
11   #include  <stdio.h>
12 <
12 > #include  <math.h>
13   #include  <signal.h>
17
14   #include  <sys/ioctl.h>
15  
16   #include  "pic.h"
17 <
17 > #include  "resolu.h"
18   #include  "color.h"
19  
20  
# Line 97 | Line 93 | FILE  *fin;
93   extern long  ftell();
94   long  scanpos[NROWS];
95  
100 extern double  atof();
96   double  exposure = 1.0;
97   int  wrong_fmt = 0;
98  
99 + static gethfunc checkhead;
100  
101 +
102   main(argc, argv)
103   int  argc;
104   char  *argv[];
105   {
106 <        int  onintr(), checkhead();
106 >        int  onintr();
107          char  sbuf[256];
108          register int  i;
109          
# Line 145 | Line 142 | char  *argv[];
142          if (wrong_fmt)
143                  quitmsg("input must be a Radiance picture");
144                                  /* get picture dimensions */
145 <        if (fgetresolu(&xmax, &ymax, fin) != (YMAJOR|YDECR))
145 >        if (fgetresolu(&xmax, &ymax, fin) < 0)
146                  quitmsg("bad picture size");
147          if (xmax > NCOLS || ymax > NROWS)
148                  quitmsg("resolution mismatch");
# Line 169 | Line 166 | userr:
166   }
167  
168  
169 < checkhead(line)                         /* deal with line from header */
170 < char  *line;
169 > static int
170 > checkhead(                              /* deal with line from header */
171 >        char  *line,
172 >        void    *p
173 > )
174   {
175          char    fmt[32];
176  
# Line 180 | Line 180 | char  *line;
180                  formatval(fmt, line);
181                  wrong_fmt = strcmp(fmt, COLRFMT);
182          }
183 +        return(0);
184   }
185  
186  
# Line 244 | Line 245 | char  *err;
245   }
246  
247  
248 + void
249   eputs(s)
250   char  *s;
251   {
# Line 251 | Line 253 | char  *s;
253   }
254  
255  
256 + void
257   quit(status)
258   int  status;
259   {
# Line 520 | Line 523 | int  offset[3];
523   picreadcm(map)                  /* do gamma correction */
524   colormap  map;
525   {
523        extern double  pow();
526          register int  i, val;
527  
528          for (i = 0; i < 256; i++) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines