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

Comparing ray/src/px/x11image.c (file contents):
Revision 2.35 by greg, Mon Nov 22 11:33:18 1993 UTC vs.
Revision 2.38 by greg, Tue Sep 20 15:48:15 1994 UTC

# Line 113 | Line 113 | char  *progname;
113  
114   char  errmsg[128];
115  
116 < extern BYTE  clrtab[256][3];            /* global color map */
116 > BYTE  clrtab[256][3];                   /* global color map */
117  
118   extern long  ftell();
119  
# Line 276 | Line 276 | char **argv;
276          if (gamstr == NULL)             /* get it from the X server */
277                  gamstr = XGetDefault(thedisplay, "radiance", "gamma");
278          if (gamstr == NULL)             /* get it from the environment */
279 <                gamstr = getenv("GAMMA");
279 >                gamstr = getenv("DISPLAY_GAMMA");
280          if (gamstr != NULL)
281                  gamcor = atof(gamstr);
282                                  /* get best visual for default screen */
# Line 366 | Line 366 | char  *err;
366          if (es = err != NULL)
367                  fprintf(stderr, "%s: %s: %s\n", progname,
368                                  fname==NULL?"<stdin>":fname, err);
369 <        if (parent > 0 & wind != 0) {
370 <                XDestroyWindow(thedisplay, wind);
371 <                XFlush(thedisplay);
372 <        } else if (parent < 0 & sigrecv == 0)
369 >        if (thedisplay != NULL)
370 >                XCloseDisplay(thedisplay);
371 >        if (parent < 0 & sigrecv == 0)
372                  kill(getppid(), SIGCONT);
373          while (parent > 0 && wait(&cs) != -1) { /* wait for any children */
374                  if (es == 0)
# Line 1000 | Line 999 | getmapped()                    /* get color-mapped data */
999                                          /* set gamma correction */
1000          setcolrgam(gamcor);
1001                                          /* make histogram */
1002 <        new_histo();
1002 >        if (new_histo((long)xmax*ymax) == -1)
1003 >                quiterr("cannot initialize histogram");
1004          for (y = 0; y < ymax; y++) {
1005                  if (getscan(y) < 0)
1006                          break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines