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.3 by gwlarson, Tue Oct 27 08:54:37 1998 UTC vs.
Revision 3.4 by greg, Sat Feb 22 02:07:27 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1998 Silicon Graphics, Inc. */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ SGI";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Tone map SGILOG TIFF or Radiance picture and output 24-bit RGB TIFF
6   */
7  
11 #undef NOPROTO
12 #define NOPROTO 1
13
8   #include <stdio.h>
9   #include <math.h>
10 + #include <time.h>
11   #include "tiffio.h"
12   #include "color.h"
13   #include "tonemap.h"
# Line 47 | Line 42 | typedef struct {
42  
43   extern PICTURE  *openpicture();
44  
45 < #define closepicture(p)         (fclose((p)->fp),free((char *)(p)))
45 > #define closepicture(p)         (fclose((p)->fp),free((void *)(p)))
46  
47  
48   main(argc, argv)
# Line 175 | Line 170 | char   *fname;
170                  return(NULL);           /* serious error -- should exit? */
171          pp->fp = fp; pp->fmt[0] = '\0'; pp->pa = 1.;
172                                          /* load header */
173 <        if (getheader(fp, headline, pp) < 0) {
173 >        if (getheader(fp, headline, (char *)pp) < 0) {
174                  closepicture(pp);
175                  return(NULL);
176          }
# Line 204 | Line 199 | register PICTURE       *pp;
199                  return(-1);
200                                          /* figure out TIFF orientation */
201          for (orient = 8; --orient; )
202 <                if (ortab[orient] == pp->rs.or)
202 >                if (ortab[orient] == pp->rs.rt)
203                          break;
204          orient++;
205                                          /* put out our image */
# Line 212 | Line 207 | register PICTURE       *pp;
207                          72., 72./pp->pa, 2, pix) != 0)
208                  return(-1);
209                                          /* free data and we're done */
210 <        free((char *)pix);
210 >        free((void *)pix);
211          return(0);
212   }
213  
# Line 250 | Line 245 | TIFF   *tp;
245                          xres, yres, resunit, pix) != 0)
246                  return(-1);
247                                          /* free data and we're done */
248 <        free((char *)pix);
248 >        free((void *)pix);
249          return(0);
250   }
251  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines