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 2.1 by greg, Tue Nov 12 16:05:33 1991 UTC vs.
Revision 2.5 by schorsch, Thu Jun 5 19:29:34 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1991 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  paintjet.c - program to dump pixel file to HP PaintJet color printer.
6   *
# Line 11 | Line 8 | static char SCCSid[] = "$SunId$ LBL";
8   */
9  
10   #include  <stdio.h>
11 + #include  <time.h>
12  
13 + #include  "platform.h"
14   #include  "color.h"
15   #include  "resolu.h"
16  
17 < #define  NCOLS          1440            /* 8" at 180 dpi */
17 > #define  NCOLS          1440            /* 8" at 180 dpi */
18  
19  
20   main(argc, argv)
# Line 23 | Line 22 | int  argc;
22   char  *argv[];
23   {
24          int  i, status = 0;
25 <        
25 >        SET_DEFAULT_BINARY();
26 >        SET_FILE_BINARY(stdin);
27 >        SET_FILE_BINARY(stdout);
28          if (argc < 2)
29                  status = printp(NULL) == -1;
30          else
# Line 113 | Line 114 | register int  x;
114   register int  a;
115   {
116          static int  cerr[NCOLS][3];
117 <        static int  err[3], errp[3];
118 <        int  b;
117 >        static int  err[3];
118 >        int  b, errp;
119          register int  ison;
120  
121          b = col[a];
122 <        errp[a] = err[a];
122 >        errp = err[a];
123          err[a] += b + cerr[x][a];
124          ison = err[a] > 128;
125          if (ison) err[a] -= 256;
126          err[a] /= 3;
127 <        cerr[x][a] = err[a] + errp[a];
127 >        cerr[x][a] = err[a] + errp;
128          return(ison);
129   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines