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

Comparing ray/src/px/pcond2.c (file contents):
Revision 3.17 by greg, Thu Sep 8 22:29:47 2005 UTC vs.
Revision 3.19 by greg, Wed Sep 11 18:56:11 2024 UTC

# Line 38 | Line 38 | static void cwscan(COLOR *sl, int len, WARP3D *wp);
38   static void getmbcalfile(char *fn, struct mbc *mb);
39  
40  
41 < extern double
41 > double
42   rgblum(         /* compute (scotopic) luminance of RGB color */
43          COLOR   clr,
44          int     scotopic
# Line 53 | Line 53 | rgblum(                /* compute (scotopic) luminance of RGB color
53   }
54  
55  
56 < extern double
56 > double
57   cielum(         /* compute (scotopic) luminance of CIE color */
58          COLOR   xyz,
59          int     scotopic
# Line 67 | Line 67 | cielum(                /* compute (scotopic) luminance of CIE color
67   }
68  
69  
70 < extern COLOR *
70 > COLOR *
71   nextscan(void)                          /* read and condition next scanline */
72   {
73          if (nread >= numscans(&inpres)) {
# Line 78 | Line 78 | nextscan(void)                         /* read and condition next scanline
78          }
79          if (what2do&DO_ACUITY)
80                  acuscan(scanbuf, nread);
81 <        else if (freadscan(scanbuf, scanlen(&inpres), infp) < 0) {
81 >        else if (fread2scan(scanbuf, scanlen(&inpres), infp,
82 >                                NCSAMP, WLPART) < 0) {
83                  fprintf(stderr, "%s: %s: scanline read error\n",
84                                  progname, infn);
85                  exit(1);
# Line 102 | Line 103 | nextscan(void)                         /* read and condition next scanline
103   }
104  
105  
106 < extern COLOR *
106 > COLOR *
107   firstscan(void)                         /* return first processed scanline */
108   {
109          if (mbcalfile != NULL)          /* load macbethcal file */
# Line 127 | Line 128 | firstscan(void)                                /* return first processed scanline
128  
129   static void
130   sfscan(                 /* apply scalefactor to scanline */
131 <        register COLOR  *sl,
131 >        COLOR   *sl,
132          int     len,
133          double  sf
134   )
# Line 159 | Line 160 | greypoint(                     /* compute gamut mapping grey target */
160  
161   static void
162   matscan(                        /* apply color matrix to scaline */
163 <        register COLOR  *sl,
163 >        COLOR   *sl,
164          int     len,
165          COLORMAT        mat
166   )
# Line 176 | Line 177 | static void
177   mbscan(                 /* apply macbethcal adj. to scaline */
178          COLOR   *sl,
179          int     len,
180 <        register struct mbc     *mb
180 >        struct mbc      *mb
181   )
182   {
183          double  d;
184 <        register int    i, j;
184 >        int     i, j;
185  
186          while (len--) {
187                  colortrans(sl[0], mb->cmat, sl[0]);
# Line 225 | Line 226 | cwscan(                        /* apply color space warp to scaline */
226   static void
227   getmbcalfile(                   /* load macbethcal file */
228          char    *fn,
229 <        register struct mbc     *mb
229 >        struct mbc      *mb
230   )
231   {
232          char    buf[128];
233          FILE    *fp;
234          int     inpflags = 0;
235 <        register int    i;
235 >        int     i;
236  
237          if ((fp = fopen(fn, "r")) == NULL)
238                  syserror(fn);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines