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.62 by greg, Mon Jul 7 17:21:51 2003 UTC vs.
Revision 2.65 by schorsch, Fri Jan 2 12:47:01 2004 UTC

# Line 128 | Line 128 | int  sigrecv;
128  
129   void  onsig(int i) { sigrecv++; }
130  
131 + static gethfunc headline;
132  
133 +
134   main(argc, argv)
135   int  argc;
136   char  *argv[];
137   {
136        int  headline();
138          int  i;
139          int  pid;
140          
# Line 246 | Line 247 | userr:
247   }
248  
249  
250 < int
251 < headline(s)             /* get relevant info from header */
252 < char  *s;
250 > static int
251 > headline(               /* get relevant info from header */
252 >        char    *s,
253 >        void    *p
254 > )
255   {
256          char  fmt[32];
257  
# Line 384 | Line 387 | char  *err;
387          register int  es;
388          int  cs;
389  
390 <        if (es = err != NULL)
390 >        if ( (es = err != NULL) )
391                  fprintf(stderr, "%s: %s: %s\n", progname,
392                                  fname==NULL?"<stdin>":fname, err);
393          if (thedisplay != NULL)
394                  XCloseDisplay(thedisplay);
395 <        if (parent < 0 & sigrecv == 0)
395 >        if ((parent < 0) & (sigrecv == 0))
396                  kill(getppid(), SIGCONT);
397          while (parent > 0 && wait(&cs) != -1) { /* wait for any children */
398                  if (es == 0)
# Line 494 | Line 497 | static char  vistype[][12] = {
497          if (viscmp(&xvi[i],&ourvis) > 0)
498                  quiterr("inadequate visuals on this screen");
499                                          /* OK, we'll use it */
500 <        copystruct(&ourvis, &xvi[i]);
500 >        ourvis = xvi[i];
501   #ifdef DEBUG
502          fprintf(stderr, "Selected visual type %s, depth %d\n",
503                          vistype[ourvis.class], ourvis.depth);
# Line 537 | Line 540 | getras()                               /* get raster file */
540                  if (ourras == NULL)
541                          goto fail;
542                  getmono();
543 <        } else if (ourvis.class == TrueColor | ourvis.class == DirectColor) {
543 >        } else if ((ourvis.class == TrueColor) | (ourvis.class == DirectColor)) {
544                  int  datsiz = ourvis.depth>16 ? sizeof(int32) : sizeof(int16);
545                  ourdata = (unsigned char *)malloc(datsiz*xmax*ymax);
546                  if (ourdata == NULL)
# Line 585 | Line 588 | getevent()                             /* process the next event */
588                  map_rcolors(ourras, wind);
589                  if (fast)
590                          make_rpixmap(ourras, wind);
591 <                if (!sequential & parent < 0 & sigrecv == 0) {
591 >                if ((!sequential) & (parent < 0) & (sigrecv == 0)) {
592                          kill(getppid(), SIGCONT);
593                          sigrecv--;
594                  }
# Line 794 | Line 797 | XKeyPressedEvent  *ekey;
797                  free_rpixmap(ourras);
798                  return(0);
799          case '0':                               /* recenter origin */
800 <                if (xoff == 0 & yoff == 0)
800 >                if ((xoff == 0) & (yoff == 0))
801                          return(0);
802                  xoff = yoff = 0;
803                  XClearWindow(thedisplay, wind);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines