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

Comparing ray/src/rt/rv2.c (file contents):
Revision 2.3 by greg, Thu Dec 19 14:54:55 1991 UTC vs.
Revision 2.4 by greg, Mon Dec 23 23:18:31 1991 UTC

# Line 22 | Line 22 | static char SCCSid[] = "$SunId$ LBL";
22  
23   #include  <ctype.h>
24  
25 < #define  CTRL(c)        ('c'-'@')
25 > #define  CTRL(c)        ((c)-'@')
26  
27   extern char  VersionID[];
28   extern char  *progname;
# Line 75 | Line 75 | char  *s;
75          sprintf(buf, "view type (%c): ", ourview.type);
76          (*dev->comout)(buf);
77          (*dev->comin)(buf, NULL);
78 <        if (buf[0] == CTRL(C)) return;
78 >        if (buf[0] == CTRL('C')) return;
79          if (buf[0] && buf[0] != ourview.type) {
80                  nv.type = buf[0];
81                  change++;
# Line 85 | Line 85 | char  *s;
85                          ourview.vp[0], ourview.vp[1], ourview.vp[2]);
86          (*dev->comout)(buf);
87          (*dev->comin)(buf, NULL);
88 <        if (buf[0] == CTRL(C)) return;
88 >        if (buf[0] == CTRL('C')) return;
89          if (sscanf(buf, "%lf %lf %lf", &nv.vp[0], &nv.vp[1], &nv.vp[2]) == 3)
90                  change++;
91          else
# Line 94 | Line 94 | char  *s;
94                          ourview.vdir[0], ourview.vdir[1], ourview.vdir[2]);
95          (*dev->comout)(buf);
96          (*dev->comin)(buf, NULL);
97 <        if (buf[0] == CTRL(C)) return;
97 >        if (buf[0] == CTRL('C')) return;
98          if (sscanf(buf,"%lf %lf %lf",&nv.vdir[0],&nv.vdir[1],&nv.vdir[2]) == 3)
99                  change++;
100          else
# Line 103 | Line 103 | char  *s;
103                          ourview.vup[0], ourview.vup[1], ourview.vup[2]);
104          (*dev->comout)(buf);
105          (*dev->comin)(buf, NULL);
106 <        if (buf[0] == CTRL(C)) return;
106 >        if (buf[0] == CTRL('C')) return;
107          if (sscanf(buf,"%lf %lf %lf",&nv.vup[0],&nv.vup[1],&nv.vup[2]) == 3)
108                  change++;
109          else
# Line 112 | Line 112 | char  *s;
112                          ourview.horiz, ourview.vert);
113          (*dev->comout)(buf);
114          (*dev->comin)(buf, NULL);
115 <        if (buf[0] == CTRL(C)) return;
115 >        if (buf[0] == CTRL('C')) return;
116          if (sscanf(buf, "%lf %lf", &nv.horiz, &nv.vert) == 2)
117                  change++;
118          else {
# Line 122 | Line 122 | char  *s;
122                          ourview.hoff, ourview.voff);
123          (*dev->comout)(buf);
124          (*dev->comin)(buf, NULL);
125 <        if (buf[0] == CTRL(C)) return;
125 >        if (buf[0] == CTRL('C')) return;
126          if (sscanf(buf, "%lf %lf", &nv.hoff, &nv.voff) == 2)
127                  change++;
128          else {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines