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

Comparing ray/src/rt/x11twind.c (file contents):
Revision 2.10 by greg, Thu May 23 22:45:05 2024 UTC vs.
Revision 2.12 by greg, Tue Dec 3 19:36:58 2024 UTC

# Line 29 | Line 29 | static const char      RCSid[] = "$Id$";
29   #define Height(f)               ((f)->ascent + (f)->descent)
30   #define YStart(f)               ((f)->ascent)
31  
32 < static void  togglecurs();
32 > static void  togglecurs(TEXTWIND  *t);
33  
34  
35   TEXTWIND *
# Line 70 | Line 70 | char  *fontname
70                  Width(t->f);            /* number of columns */
71          t->nr = height /
72                  Height(t->f);           /* number of rows */
73 <        if (t->nc < 1 || t->nr < 1)
73 >        if ((t->nc < 1) | (t->nr < 1))
74                  return(NULL);
75          if ((t->lp = (char **)calloc(t->nr, sizeof(char *))) == NULL)
76                  return(NULL);
# Line 143 | Line 143 | int  r
143          char  *cp;
144          int  i;
145  
146 <        if (r < 0 || r >= t->nr)
146 >        if ((r < 0) | (r >= t->nr))
147                  return;
148          checkcurs(t);
149                                          /* move lines */
# Line 172 | Line 172 | int  r
172          char  *cp;
173          int  i;
174  
175 <        if (r < 0 || r >= t->nr)
175 >        if ((r < 0) | (r >= t->nr))
176                  return;
177          checkcurs(t);
178                                          /* move lines */
# Line 225 | Line 225 | TEXTWIND  *t,
225   int  r, int c
226   )
227   {
228 <        if (r < 0 || c < 0 || r >= t->nr || c >= t->nc)
228 >        if ((r < 0) | (c < 0) | (r >= t->nr) | (c >= t->nc))
229                  return;
230          checkcurs(t);
231          t->r = r;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines