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

Comparing ray/src/px/normtiff.c (file contents):
Revision 3.6 by schorsch, Sun Jul 27 22:12:03 2003 UTC vs.
Revision 3.7 by schorsch, Fri Jan 2 11:42:37 2004 UTC

# Line 8 | Line 8 | static const char      RCSid[] = "$Id$";
8   #include <stdio.h>
9   #include <math.h>
10   #include <time.h>
11 + #include <string.h>
12 +
13   #include "tiffio.h"
14   #include "color.h"
15   #include "tonemap.h"
# Line 44 | Line 46 | extern PICTURE *openpicture();
46  
47   #define closepicture(p)         (fclose((p)->fp),free((void *)(p)))
48  
49 + static gethfunc headline;
50  
51 < main(argc, argv)
52 < int     argc;
53 < char    *argv[];
51 >
52 > int
53 > main(
54 >        int     argc,
55 >        char    *argv[]
56 > )
57   {
58          PICTURE *pin = NULL;
59          TIFF    *tin = NULL;
# Line 126 | Line 132 | userr:
132   }
133  
134  
135 < int
136 < headline(s, pp)                         /* process line from header */
137 < char    *s;
138 < register PICTURE        *pp;
135 > static int
136 > headline(                               /* process line from header */
137 >        char    *s,
138 >        void *pp
139 > )
140   {
141          register char   *cp;
142  
# Line 137 | Line 144 | register PICTURE       *pp;
144                  if (*cp & 0x80)
145                          return(-1);     /* non-ascii in header */
146          if (isaspect(s))
147 <                pp->pa *= aspectval(s);
147 >                ((PICTURE *)pp)->pa *= aspectval(s);
148          else
149 <                formatval(pp->fmt, s);
149 >                formatval(((PICTURE *)pp)->fmt, s);
150          return(0);
151   }
152  
# Line 170 | Line 177 | char   *fname;
177                  return(NULL);           /* serious error -- should exit? */
178          pp->fp = fp; pp->fmt[0] = '\0'; pp->pa = 1.;
179                                          /* load header */
180 <        if (getheader(fp, headline, (char *)pp) < 0) {
180 >        if (getheader(fp, headline, pp) < 0) {
181                  closepicture(pp);
182                  return(NULL);
183          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines