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.15 by greg, Sat Jun 7 05:09:46 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>
25 < #endif
20 > #include  <time.h>
21 > #include  "platform.h"
22   #include  "color.h"
23   #include  "resolu.h"
24  
29 extern char  *malloc();
30
25   double  gamcor = 2.2;                   /* gamma correction */
26  
27   int  bradj = 0;                         /* brightness adjustment */
28  
35 char  *progname;
36
29   int  xmax, ymax;
30  
31  
# Line 44 | Line 36 | char  *argv[];
36          int  reverse = 0;
37          int  i;
38          
39 <        progname = argv[0];
39 >        fixargv0(argv[0]);
40  
41          for (i = 1; i < argc; i++)
42                  if (argv[i][0] == '-')
# Line 78 | Line 70 | char  *argv[];
70                                  progname, argv[i+1]);
71                  exit(1);
72          }
73 < #ifdef MSDOS
74 <        setmode(fileno(stdin), O_BINARY);
83 <        setmode(fileno(stdout), O_BINARY);
84 < #endif
73 >        SET_FILE_BINARY(stdin);
74 >        SET_FILE_BINARY(stdout);
75          setcolrgam(gamcor);             /* set up gamma correction */
76          if (reverse) {
77                                          /* get their image resolution */
78                  read_skel_head(&xmax, &ymax);
79                                          /* put our header */
80 +                newheader("RADIANCE", stdout);
81                  printargs(i, argv, stdout);
82                  fputformat(COLRFMT, stdout);
83                  putchar('\n');
# Line 149 | Line 140 | skel2ra()              /* convert 24-bit scanlines to Radiance pic
140                          quiterr("error writing Radiance picture");
141          }
142                                                  /* free scanline */
143 <        free((char *)scanout);
143 >        free((void *)scanout);
144   }
145  
146  
# Line 178 | Line 169 | ra2skel()              /* convert Radiance scanlines to 24-bit */
169                          quiterr("error writing skel file");
170          }
171                                                  /* free scanline */
172 <        free((char *)scanin);
172 >        free((void *)scanin);
173   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines