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

Comparing ray/src/rt/x11.c (file contents):
Revision 2.5 by greg, Thu Jun 18 14:55:24 1992 UTC vs.
Revision 2.6 by greg, Wed Jun 24 09:12:50 1992 UTC

# Line 23 | Line 23 | static char SCCSid[] = "$SunId$ LBL";
23   #include  "x11twind.h"
24   #include  "x11icon.h"
25  
26 < #define GAMMA           2.2             /* exponent for color correction */
26 > #define GAMMA           2.2             /* default exponent correction */
27  
28   #define MINWIDTH        (32*COMCW)      /* minimum graphics window width */
29   #define MINHEIGHT       MINWIDTH        /* minimum graphics window height */
# Line 82 | Line 82 | struct driver *
82   x11_init(name, id)              /* initialize driver */
83   char  *name, *id;
84   {
85 +        extern char  *getenv();
86 +        char  *gv;
87          int  nplanes;
88          XSetWindowAttributes    ourwinattr;
89          XWMHints  ourxwmhints;
# Line 117 | Line 119 | char  *name, *id;
119                  ourblack = BlackPixel(ourdisplay,ourscreen);
120                  ourwhite = WhitePixel(ourdisplay,ourscreen);
121          }
122 <        make_gmap(GAMMA);
123 <        /* open window */
122 >                                        /* set gamma */
123 >        if ((gv = getenv("GAMMA")) != NULL)
124 >                make_gmap(atof(gv));
125 >        else
126 >                make_gmap(GAMMA);
127 >                                        /* open window */
128          ourwinattr.background_pixel = ourblack;
129          ourwinattr.border_pixel = ourblack;
130                                          /* this is stupid */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines