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.4 by greg, Fri Oct 20 12:07:08 1989 UTC vs.
Revision 1.5 by greg, Fri Oct 20 13:53:58 1989 UTC

# Line 67 | Line 67 | char  *fname;
67                  return(-1);
68          }
69                                  /* set line spacing (overlap for knitting) */
70 <        fputs("\0333\036", stdout);
70 >        fputs("\0333\042", stdout);
71                                  /* put out scanlines */
72          for (i = yres-1; i >= 0; i--) {
73                  if (freadscan(scanline, xres, input) < 0) {
# Line 95 | Line 95 | int  y;
95          register long  c;
96          register int  i, j;
97  
98 <        if (bpos = y % 20) {
98 >        if (bpos = y % 23) {
99  
100 <                if (y > 20 & bpos < 4)                  /* knit bits */
101 <                        for (j = 0; j < 3; j++)
102 <                                for (i = 0; i < len; i++)
103 <                                        pat[i][j] |= (long)colbit(scan[i],i,j)
104 <                                                << (i+j & 4 ? bpos+24 : bpos);
105 <                else
106 <                        for (j = 0; j < 3; j++)
107 <                                for (i = 0; i < len; i++)
108 <                                        pat[i][j] |= (long)colbit(scan[i],i,j)
109 <                                                        << bpos;
100 >                for (j = 0; j < 3; j++)
101 >                        for (i = 0; i < len; i++)
102 >                                pat[i][j] |= (long)colbit(scan[i],i,j) << bpos;
103  
104          } else {
105  
# Line 114 | Line 107 | int  y;
107  
108                  for (j = 0; j < 3; j++) {
109                          fputs("\033%O", stdout);
110 <                        putchar(len & 0xff);
110 >                        putchar(len & 255);
111                          putchar(len >> 8);
112                          for (i = 0; i < len; i++) {
113 <                                c = pat[i][j];
114 <                                pat[i][j] = c>>4 & 0xf00000;
115 <                                if (i+j & 4)            /* knit last bit */
116 <                                        pat[i][j] |= colbit(scan[i],i,j) << 20;
117 <                                else
118 <                                        c |= colbit(scan[i],i,j);
126 <                                putchar(c>>16 & 0xff);
127 <                                putchar(c>>8 & 0xff);
128 <                                putchar(c & 0xff);
113 >                                c = pat[i][j] | colbit(scan[i],i,j);
114 >                                                        /* repeat this row */
115 >                                pat[i][j] = (c & 1) << 23;
116 >                                putchar(c>>16);
117 >                                putchar(c>>8 & 255);
118 >                                putchar(c & 255);
119                          }
120                          putchar('\r');
121                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines