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.9 by greg, Sun Feb 27 10:17:18 1994 UTC vs.
Revision 2.14 by greg, Fri Jun 6 19:11:21 2025 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
10 > *              cc $(CFLAGS) -o ra_skel ra_skel.o -lrtrad -lm
11   *      ra_skel.o:      ../common/color.h ../common/resolu.h
12   *
13   *  If you like to do things the hard way, you can link directly
14   *  to the object files "color.o colrops.o resolu.o header.o" in
15 < *  the common subdirectory instead of using the -lrt library.
15 > *  the common subdirectory instead of using the -lrtrad library.
16   */
17  
18   #include  <stdio.h>
19   #include  <math.h>
20 < #ifdef MSDOS
21 < #include  <fcntl.h>
22 < #endif
20 > #include  <time.h>
21 > #include  "paths.h"
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 */
29  
35 char  *progname;
36
30   int  xmax, ymax;
31  
32  
# Line 44 | Line 37 | char  *argv[];
37          int  reverse = 0;
38          int  i;
39          
40 <        progname = argv[0];
40 >        fixargv0(argv[0]);
41  
42          for (i = 1; i < argc; i++)
43                  if (argv[i][0] == '-')
# Line 78 | Line 71 | char  *argv[];
71                                  progname, argv[i+1]);
72                  exit(1);
73          }
74 < #ifdef MSDOS
75 <        setmode(fileno(stdin), O_BINARY);
83 <        setmode(fileno(stdout), O_BINARY);
84 < #endif
74 >        SET_FILE_BINARY(stdin);
75 >        SET_FILE_BINARY(stdout);
76          setcolrgam(gamcor);             /* set up gamma correction */
77          if (reverse) {
78                                          /* get their image resolution */
# Line 150 | Line 141 | skel2ra()              /* convert 24-bit scanlines to Radiance pic
141                          quiterr("error writing Radiance picture");
142          }
143                                                  /* free scanline */
144 <        free((char *)scanout);
144 >        free((void *)scanout);
145   }
146  
147  
# Line 179 | Line 170 | ra2skel()              /* convert Radiance scanlines to 24-bit */
170                          quiterr("error writing skel file");
171          }
172                                                  /* free scanline */
173 <        free((char *)scanin);
173 >        free((void *)scanin);
174   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines