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

Comparing ray/src/gen/xform.c (file contents):
Revision 2.49 by greg, Tue Feb 2 18:02:32 2016 UTC vs.
Revision 2.51 by greg, Sun Dec 2 16:30:30 2018 UTC

# Line 18 | Line 18 | static const char RCSid[] = "$Id$";
18   #include  "object.h"
19   #include  "otypes.h"
20  
21 #ifdef getc_unlocked            /* avoid horrendous overhead of flockfile */
22 #undef getc
23 #define getc    getc_unlocked
24 #endif
25
21   int  xac;                               /* global xform argument count */
22   char  **xav;                            /* global xform argument pointer */
23   int  xfa;                               /* start of xf arguments */
# Line 214 | Line 209 | doargf(                        /* take argument list from file */
209                  }
210                  n = 0;                  /* count number of lines in file */
211                  while (fgetline(argbuf,sizeof(argbuf),argfp) != NULL)
212 <                        n += argbuf[0] && argbuf[0] != '#';
212 >                        n += (argbuf[0] != '\0') & (argbuf[0] != '#');
213                  if (!n) {
214                          fprintf(stderr, "%s: empty argument file \"%s\"\n",
215                                          av[0], av[fi+1]);
216                          exit(1);
217                  }
223                nrept *= n;
218                  rewind(argfp);
219          }
220 +        nrept *= n;
221          err = 0; k = 0;                 /* read each arg list and call main */
222          while (fgetline(argbuf,sizeof(argbuf),argfp) != NULL) {
223 <                if (!argbuf[0] || argbuf[0] == '#')
223 >                if (!argbuf[0] | (argbuf[0] == '#')) {
224 >                        printf("%s\n", argbuf);
225                          continue;
226 +                }
227                  avp = newav+2;
228                  avp[0] = av[0];
229                  for (i = 1; i < fi; i++)
# Line 557 | Line 554 | m_glow(                        /* transform arguments for proximity light *
554  
555          if (readfargs(&fa, fin) != 1)
556                  return(-1);
557 <        if (fa.nsargs != 0  || fa.nfargs != 4)
557 >        if ((fa.nsargs != 0) | (fa.nfargs != 4))
558                  return(-1);
559          printf("0\n0\n4");
560          printf(" %18.12g %18.12g %18.12g",
# Line 578 | Line 575 | m_spot(                        /* transform arguments for spotlight */
575  
576          if (readfargs(&fa, fin) != 1)
577                  return(-1);
578 <        if (fa.nsargs != 0  || fa.nfargs != 7)
578 >        if ((fa.nsargs != 0) | ( fa.nfargs != 7))
579                  return(-1);
580          printf("0\n0\n7");
581          printf(" %18.12g %18.12g %18.12g %18.12g\n",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines