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

Comparing ray/src/px/paintjet.c (file contents):
Revision 1.6 by greg, Mon May 6 13:14:26 1991 UTC vs.
Revision 2.2 by greg, Mon Dec 23 22:35:34 1991 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1989 Regents of the University of California */
1 > /* Copyright (c) 1991 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 13 | Line 13 | static char SCCSid[] = "$SunId$ LBL";
13   #include  <stdio.h>
14  
15   #include  "color.h"
16 + #include  "resolu.h"
17  
18   #define  NCOLS          1440            /* 8" at 180 dpi */
19  
# Line 53 | Line 54 | char  *fname;
54                  return(-1);
55          }
56                                  /* get picture dimensions */
57 <        if (fgetresolu(&xres, &yres, input) != (YMAJOR|YDECR)) {
57 >        if (fgetresolu(&xres, &yres, input) < 0) {
58                  fprintf(stderr, "%s: bad picture size\n", fname);
59                  return(-1);
60          }
# Line 112 | Line 113 | register int  x;
113   register int  a;
114   {
115          static int  cerr[NCOLS][3];
116 <        static int  err[3], errp[3];
117 <        int  b;
116 >        static int  err[3];
117 >        int  b, errp;
118          register int  ison;
119  
120          b = col[a];
121 <        errp[a] = err[a];
121 >        errp = err[a];
122          err[a] += b + cerr[x][a];
123          ison = err[a] > 128;
124          if (ison) err[a] -= 256;
125          err[a] /= 3;
126 <        cerr[x][a] = err[a] + errp[a];
126 >        cerr[x][a] = err[a] + errp;
127          return(ison);
128   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines