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

Comparing ray/src/px/ra_t8.c (file contents):
Revision 2.16 by greg, Sat Dec 28 18:05:14 2019 UTC vs.
Revision 2.17 by greg, Thu Feb 9 21:54:11 2023 UTC

# Line 152 | Line 152 | userr:
152  
153   static int
154   getint2(                        /* get a 2-byte positive integer */
155 <        register FILE   *fp
155 >        FILE    *fp
156   )
157   {
158 <        register int  b1, b2;
158 >        int  b1, b2;
159  
160          if ((b1 = getc(fp)) == EOF || (b2 = getc(fp)) == EOF)
161                  quiterr("read error");
# Line 166 | Line 166 | getint2(                       /* get a 2-byte positive integer */
166  
167   static void
168   putint2(                        /* put a 2-byte positive integer */
169 <        register int  i,
170 <        register FILE   *fp
169 >        int  i,
170 >        FILE    *fp
171   )
172   {
173          putc(i&0xff, fp);
# Line 189 | Line 189 | quiterr(               /* print message and exit */
189  
190  
191   void
192 < eputs(s)
193 < char *s;
192 > eputs(const char *s)
193   {
194          fputs(s, stderr);
195   }
196  
197  
198   void
199 < quit(code)
201 < int code;
199 > quit(int code)
200   {
201          exit(code);
202   }
# Line 208 | Line 206 | static int
206   getthead(               /* read header from input */
207          struct hdStruct  *hp,
208          char  *ip,
209 <        register FILE  *fp
209 >        FILE  *fp
210   )
211   {
212          int     nidbytes;
# Line 243 | Line 241 | static int
241   putthead(               /* write header to output */
242          struct hdStruct  *hp,
243          char  *ip,
244 <        register FILE  *fp
244 >        FILE  *fp
245   )
246   {
247          if (ip != NULL)
# Line 271 | Line 269 | putthead(              /* write header to output */
269  
270   static int
271   getrhead(                       /* load RADIANCE input file header */
272 <        register struct hdStruct  *h,
272 >        struct hdStruct  *h,
273          FILE  *fp
274   )
275   {
# Line 312 | Line 310 | tg2ra(                 /* targa file to RADIANCE file */
310          } map;
311          COLR  ctab[256];
312          COLR  *scanline;
313 <        register int  i, j;
313 >        int  i, j;
314  
315                                          /* get color table */
316          if ((hp->CMapBits==24 ? fread((char *)(map.c3+hp->mapOrig),
# Line 359 | Line 357 | getmapped(             /* read in and quantize image */
357   )
358   {
359          long  fpos;
360 <        register int  y;
360 >        int  y;
361  
362          setcolrgam(gamv);
363          fpos = ftell(stdin);
# Line 408 | Line 406 | getgrey(                       /* read in and convert to greyscale image *
406   )
407   {
408          int  y;
409 <        register uby8  *dp;
410 <        register int  x;
409 >        uby8  *dp;
410 >        int  x;
411  
412          setcolrgam(gamv);
413          dp = tarData+xmax*ymax;;
# Line 443 | Line 441 | writetarga(            /* write out targa data */
441          FILE  *fp
442   )
443   {
444 <        register int  i, j;
444 >        int  i, j;
445  
446          for (i = 0; i < h->mapLength; i++)      /* write color map */
447                  for (j = 2; j >= 0; j--)
# Line 464 | Line 462 | readtarga(             /* read in targa data */
462          FILE  *fp
463   )
464   {
465 <        register int  cnt, c;
466 <        register uby8   *dp;
465 >        int  cnt, c;
466 >        uby8    *dp;
467  
468          if (h->dataType == IM_CMAP) {           /* uncompressed */
469                  if (fread((char *)data,h->x*sizeof(uby8),h->y,fp) != h->y)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines