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

Comparing ray/src/px/ra_ps.c (file contents):
Revision 2.31 by greg, Sat Dec 28 18:05:14 2019 UTC vs.
Revision 2.32 by greg, Mon Jul 27 01:25:33 2020 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9   #include  <ctype.h>
10  
11   #include  "platform.h"
12 + #include  "paths.h"
13   #include  "rtio.h"
14   #include  "color.h"
15   #include  "resolu.h"
# Line 58 | Line 59 | typedef void putprimf_t(COLR *scn, int pri);
59   static gethfunc headline;
60   static putprimf_t Aputprim, Bputprim, Cputprim;
61  
62 < static double unit2inch(register char *s);
62 > static double unit2inch(char *s);
63   static int matchid(char *name, char *id);
64   static void parsepaper(char *ps);
65   static void quiterr(char *err);
# Line 94 | Line 95 | main(int  argc, char  *argv[])
95          int  i;
96          double  d;
97          
98 <        progname = argv[0];
98 >        progname = fixargv0(argv[0]);
99  
100          for (i = 1; i < argc; i++)
101                  if (argv[i][0] == '-')
# Line 196 | Line 197 | userr:
197  
198   static double
199   unit2inch(              /* determine unit */
200 <        register char   *s
200 >        char    *s
201   )
202   {
203          static struct unit {char n; float f;} u[] = {
# Line 204 | Line 205 | unit2inch(             /* determine unit */
205                  {'m', 1./25.4},
206                  {'c', 1./2.54},
207                  {'\0',0} };
208 <        register struct unit    *up;
208 >        struct unit     *up;
209  
210          while (*s && !isalpha(*s))
211                  s++;
# Line 218 | Line 219 | unit2inch(             /* determine unit */
219   static int
220   matchid(        /* see if name matches id (case insensitive) */
221          char    *name,
222 <        register char   *id
222 >        char    *id
223   )
224   {
225 <        register char   *s = name;
225 >        char    *s = name;
226  
227          while (*s) {
228                  if (isalpha(*s)) {
# Line 261 | Line 262 | parsepaper(            /* determine paper size from name */
262                  {"DL", 4.33, 8.66},
263                  {"hagaki", 3.94, 5.83},
264                  {"",0.0,0.0} };
265 <        register struct psize   *pp;
266 <        register char   *s = ps;
265 >        struct psize    *pp;
266 >        char    *s = ps;
267          double  d;
268  
269          if (isdigit(*s)) {              /* check for WWxHH specification */
# Line 425 | Line 426 | PSprocdef(                     /* define PS procedure to read image */
426   )
427   {
428          short  itab[128];
429 <        register int  i;
429 >        int  i;
430                                  /* assign code values */
431          for (i = 0; i < 128; i++)       /* clear */
432                  itab[i] = -1;
# Line 464 | Line 465 | PSprocdef(                     /* define PS procedure to read image */
465   static void
466   ra2ps(void)                             /* convert Radiance scanlines to 6-bit */
467   {
468 <        register COLR   *scanin;
468 >        COLR    *scanin;
469          int     y;
470                                                  /* allocate scanline */
471          scanin = (COLR *)malloc(xmax*sizeof(COLR));
# Line 503 | Line 504 | Aputprim(              /* put out hex ASCII primary from scanline
504   {
505          static char     hexdigit[] = "0123456789ABCDEF";
506          static int      col = 0;
507 <        register int    x, c;
507 >        int     x, c;
508  
509          for (x = 0; x < xmax; x++) {
510                  if (pri == GRY)
# Line 527 | Line 528 | Bputprim(              /* put out binary primary from scanline */
528          int     pri
529   )
530   {
531 <        register int    x, c;
531 >        int     x, c;
532  
533          for (x = 0; x < xmax; x++) {
534                  if (pri == GRY)
# Line 546 | Line 547 | Cputprim(              /* put out compressed primary from scanline
547          int     pri
548   )
549   {
550 <        register int    c;
551 <        register int    x;
550 >        int     c;
551 >        int     x;
552          int     lastc, cnt;
553  
554          lastc = -1; cnt = 0;
# Line 572 | Line 573 | Cputprim(              /* put out compressed primary from scanline
573  
574   static void
575   putrle(         /* put out cnt of cod */
576 <        register int    cnt,
577 <        register int    cod
576 >        int     cnt,
577 >        int     cod
578   )
579   {
580          static int      col = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines