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

Comparing ray/src/px/oki20c.c (file contents):
Revision 1.8 by greg, Fri Jan 26 08:17:33 1990 UTC vs.
Revision 1.9 by greg, Tue Jul 10 09:07:48 1990 UTC

# Line 24 | Line 24 | static char SCCSid[] = "$SunId$ LBL";
24  
25   #define  sub_add(sub)   (2-(sub))       /* map subtractive to additive pri. */
26  
27 + #ifdef  BSD
28 + #define  clearlbuf()    bzero((char *)lpat, sizeof(lpat))
29 + #else
30 + #define  clearlbuf()    (void)memset((char *)lpat, 0, sizeof(lpat))
31 + #endif
32  
33 + long  lpat[NCOLS][3];
34 +
35 +
36   main(argc, argv)
37   int  argc;
38   char  *argv[];
# Line 68 | Line 76 | char  *fname;
76          }
77                                  /* set line spacing (overlap for knitting) */
78          fputs("\0333\042", stdout);
79 +                                /* clear line buffer */
80 +        clearlbuf();
81                                  /* put out scanlines */
82          for (i = yres-1; i >= 0; i--) {
83                  if (freadcolrs(scanline, xres, input) < 0) {
# Line 91 | Line 101 | COLR  scan[];
101   int  len;
102   int  y;
103   {
94        static long  pat[NCOLS][3];
104          int  bpos;
105          register long  c;
106          register int  i, j;
# Line 100 | Line 109 | int  y;
109  
110                  for (j = 0; j < 3; j++)
111                          for (i = 0; i < len; i++)
112 <                                pat[i][j] |= (long)colbit(scan[i],i,j) << bpos;
112 >                                lpat[i][j] |= (long)colbit(scan[i],i,j) << bpos;
113  
114          } else {
115  
# Line 111 | Line 120 | int  y;
120                          putchar(len & 255);
121                          putchar(len >> 8);
122                          for (i = 0; i < len; i++) {
123 <                                c = pat[i][j] | colbit(scan[i],i,j);
123 >                                c = lpat[i][j] | colbit(scan[i],i,j);
124                                                          /* repeat this row */
125 <                                pat[i][j] = (c & 1) << 23;
125 >                                lpat[i][j] = (c & 1) << 23;
126                                  putchar(c>>16);
127                                  putchar(c>>8 & 255);
128                                  putchar(c & 255);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines