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

Comparing ray/src/px/ra_skel.c (file contents):
Revision 2.8 by greg, Thu Nov 18 09:55:24 1993 UTC vs.
Revision 2.12 by schorsch, Thu Jun 5 19:29:34 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1992 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   *  Skeletal 24-bit image conversion program.  Replace "skel"
6   *  in this file with a more appropriate image type identifier.
7   *
8 < *  The Makefile entry should look something like this:
8 > *  The Rmakefile entry should look something like this:
9   *      ra_skel:        ra_skel.o
10   *              cc $(CFLAGS) -o ra_skel ra_skel.o -lrt -lm
11   *      ra_skel.o:      ../common/color.h ../common/resolu.h
# Line 20 | Line 17 | static char SCCSid[] = "$SunId$ LBL";
17  
18   #include  <stdio.h>
19   #include  <math.h>
20 < #ifdef MSDOS
21 < #include  <fcntl.h>
22 < #endif
20 > #include  <time.h>
21 >
22 > #include  "platform.h"
23   #include  "color.h"
24   #include  "resolu.h"
25  
29 extern char  *malloc();
30
26   double  gamcor = 2.2;                   /* gamma correction */
27  
28   int  bradj = 0;                         /* brightness adjustment */
# Line 78 | Line 73 | char  *argv[];
73                                  progname, argv[i+1]);
74                  exit(1);
75          }
76 < #ifdef MSDOS
77 <        setmode(fileno(stdin), O_BINARY);
83 <        setmode(fileno(stdout), O_BINARY);
84 < #endif
76 >        SET_FILE_BINARY(stdin);
77 >        SET_FILE_BINARY(stdout);
78          setcolrgam(gamcor);             /* set up gamma correction */
79          if (reverse) {
80                                          /* get their image resolution */
81                  read_skel_head(&xmax, &ymax);
82                                          /* put our header */
83 +                newheader("RADIANCE", stdout);
84                  printargs(i, argv, stdout);
85                  fputformat(COLRFMT, stdout);
86                  putchar('\n');
# Line 149 | Line 143 | skel2ra()              /* convert 24-bit scanlines to Radiance pic
143                          quiterr("error writing Radiance picture");
144          }
145                                                  /* free scanline */
146 <        free((char *)scanout);
146 >        free((void *)scanout);
147   }
148  
149  
# Line 178 | Line 172 | ra2skel()              /* convert Radiance scanlines to 24-bit */
172                          quiterr("error writing skel file");
173          }
174                                                  /* free scanline */
175 <        free((char *)scanin);
175 >        free((void *)scanin);
176   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines