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

Comparing ray/src/px/ra_bn.c (file contents):
Revision 2.2 by greg, Thu Dec 19 14:52:07 1991 UTC vs.
Revision 2.6 by greg, Sun Feb 27 10:17:10 1994 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1991 Regents of the University of California */
1 > /* Copyright (c) 1992 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 12 | Line 12 | static char SCCSid[] = "$SunId$ LBL";
12  
13   #include  <stdio.h>
14  
15 + #ifdef MSDOS
16 + #include  <fcntl.h>
17 + #endif
18 +
19 + #include  <math.h>
20 +
21   #include  "color.h"
22  
23   #include  "resolu.h"
24  
25 < extern double  pow();
25 > extern char  *malloc();
26  
27 < double  gamma = 2.0;                    /* gamma correction */
27 > double  gamcor = 2.0;                   /* gamma correction */
28  
29   int  bradj = 0;                         /* brightness adjustment */
30  
# Line 37 | Line 43 | char  *argv[];
43   {
44          int  reverse = 0;
45          int  i;
46 <        
46 > #ifdef MSDOS
47 >        extern int  _fmode;
48 >        _fmode = O_BINARY;
49 >        setmode(fileno(stdin), O_BINARY);
50 >        setmode(fileno(stdout), O_BINARY);
51 > #endif
52          progname = argv[0];
53  
54          for (i = 1; i < argc; i++)
55                  if (argv[i][0] == '-')
56                          switch (argv[i][1]) {
57                          case 'g':
58 <                                gamma = atof(argv[++i]);
58 >                                gamcor = atof(argv[++i]);
59                                  break;
60                          case 'r':
61                                  reverse = !reverse;
# Line 60 | Line 71 | char  *argv[];
71                  else
72                          break;
73                                                  /* set gamma correction */
74 <        setcolrgam(gamma);
74 >        setcolrgam(gamcor);
75  
76          if (reverse) {
77                  if (i > argc-1 || i < argc-2)
# Line 77 | Line 88 | char  *argv[];
88                          quiterr(errmsg);
89                  }
90                                          /* put header */
91 +                newheader("RADIANCE", stdout);
92                  printargs(i, argv, rafp);
93                  fputformat(COLRFMT, rafp);
94                  putc('\n', rafp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines