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.1 by greg, Tue Nov 12 16:04:23 1991 UTC vs.
Revision 2.4 by greg, Tue Apr 28 09:40:32 1992 UTC

# Line 34 | Line 34 | static char SCCSid[] = "$SunId$ LBL";
34  
35   #define  FONTNAME       "8x13"          /* text font we'll use */
36  
37 < #define  CTRL(c)        ('c'-'@')
37 > #define  CTRL(c)        ((c)-'@')
38  
39   #define  BORWIDTH       5               /* border width */
40  
# Line 105 | Line 105 | extern long  ftell();
105  
106   extern char  *malloc(), *calloc();
107  
108 < extern double  atof(), pow(), log();
108 > extern double  pow(), log();
109  
110   Display  *thedisplay;
111  
# Line 192 | Line 192 | userr:
192   headline(s)             /* get relevant info from header */
193   char  *s;
194   {
195        static char  *altname[] = {"rview","rpict","pinterp",VIEWSTR,NULL};
196        register char  **an;
195          char  fmt[32];
196  
197          if (isexpos(s))
# Line 201 | Line 199 | char  *s;
199          else if (isformat(s)) {
200                  formatval(fmt, s);
201                  wrongformat = strcmp(fmt, COLRFMT);
202 <        } else
203 <                for (an = altname; *an != NULL; an++)
206 <                        if (!strncmp(*an, s, strlen(*an))) {
207 <                                if (sscanview(&ourview, s+strlen(*an)) > 0)
208 <                                        gotview++;
209 <                                return;
210 <                        }
202 >        } else if (isview(s) && sscanview(&ourview, s) > 0)
203 >                gotview++;
204   }
205  
206  
# Line 419 | Line 412 | XKeyPressedEvent  *ekey;
412          com = buf[0];
413          switch (com) {                  /* interpret command */
414          case 'q':
415 <        case CTRL(D):                           /* quit */
415 >        case CTRL('D'):                         /* quit */
416                  quit(0);
417          case '\n':
418          case '\r':
# Line 493 | Line 486 | XKeyPressedEvent  *ekey;
486                  free_raster(ourras);
487                  getras();
488          /* fall through */
489 <        case CTRL(R):                           /* redraw */
490 <        case CTRL(L):
489 >        case CTRL('R'):                         /* redraw */
490 >        case CTRL('L'):
491                  unmap_rcolors(ourras);
492                  XClearWindow(thedisplay, wind);
493                  map_rcolors(ourras, wind);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines