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

Comparing ray/src/px/mt160r.c (file contents):
Revision 2.7 by schorsch, Thu Jun 5 19:29:34 2003 UTC vs.
Revision 2.8 by schorsch, Sun Mar 28 20:33:14 2004 UTC

# Line 16 | Line 16 | static const char      RCSid[] = "$Id$";
16  
17   #define  NCOLS          880             /* for wide carriage */
18  
19 + static int printp(char  *fname);
20 + static void plotscan(COLR  scan[], int  len, int  y);
21 + static int bit(COLR  clr, int  x);
22  
23 < main(argc, argv)
24 < int  argc;
25 < char  *argv[];
23 >
24 > int
25 > main(
26 >        int  argc,
27 >        char  *argv[]
28 > )
29   {
30          int  i;
31          int  status = 0;
# Line 35 | Line 41 | char  *argv[];
41   }
42  
43  
44 < printp(fname)                           /* print a picture */
45 < char  *fname;
44 > static int
45 > printp(                         /* print a picture */
46 >        char  *fname
47 > )
48   {
49          FILE  *input;
50          int  xres, yres;
# Line 84 | Line 92 | char  *fname;
92   }
93  
94  
95 < plotscan(scan, len, y)                  /* plot a scanline */
96 < COLR  scan[];
97 < int  len;
98 < int  y;
95 > static void
96 > plotscan(                       /* plot a scanline */
97 >        COLR  scan[],
98 >        int  len,
99 >        int  y
100 > )
101   {
102          static BYTE  pat[NCOLS];
103          int  bpos;
104          register int  i;
105  
106 <        if (bpos = y & 7) {
106 >        if ((bpos = y & 7)) {
107  
108                  for (i = 0; i < len; i++)
109                          pat[i] |= bit(scan[i], i) << bpos;
# Line 116 | Line 126 | int  y;
126   }
127  
128  
129 < bit(clr, x)                             /* return bit for color at x */
130 < COLR  clr;
131 < register int  x;
129 > static int
130 > bit(                            /* return bit for color at x */
131 >        COLR  clr,
132 >        register int  x
133 > )
134   {
135          static int  cerr[NCOLS];
136          static int  err;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines