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

Comparing ray/src/gen/replmarks.c (file contents):
Revision 2.20 by greg, Tue Apr 22 14:51:29 2025 UTC vs.
Revision 2.23 by greg, Sat Jun 7 05:09:45 2025 UTC

# Line 14 | Line 14 | static const char RCSid[] = "$Id$";
14  
15   #include "platform.h"
16   #include "rtio.h"
17 #include "paths.h"
17   #include "fvect.h"
18  
19   #ifdef  M_PI
# Line 46 | Line 45 | int    nmarkers = 0;           /* number of markers */
45  
46   int     expand;                 /* expand commands? */
47  
49 char    *progname;
50
48   static void convert(char *name, FILE *fin);
49   static void cvcomm(char *fname, FILE *fin);
50   static void cvobject(char *fname, FILE *fin);
# Line 66 | Line 63 | main(
63          FILE    *fp;
64          int     i, j;
65  
66 <        progname = argv[0];
66 >        fixargv0(argv[0]);              /* sets global progname */
67          i = 1;
68          while (i < argc && argv[i][0] == '-') {
69                  do {
# Line 139 | Line 136 | userr:
136   void
137   convert(                /* replace marks in a stream */
138          char    *name,
139 <        register FILE   *fin
139 >        FILE    *fin
140   )
141   {
142 <        register int    c;
142 >        int     c;
143  
144          while ((c = getc(fin)) != EOF) {
145                  if (isspace(c))                         /* blank */
# Line 172 | Line 169 | cvcomm(                /* convert a command */
169   )
170   {
171          FILE    *pin;
172 <        char    buf[512], *fgetline();
172 >        char    buf[512];
173  
174          fgetline(buf, sizeof(buf), fin);
175          if (expand) {
# Line 198 | Line 195 | cvobject(              /* convert an object */
195          FILE    *fin
196   )
197   {
201        extern char     *fgetword();
198          char    buf[128], typ[16], nam[128];
199          int     i, n;
200 <        register int    j;
200 >        int     j;
201  
202          if (fgetword(buf, sizeof(buf), fin) == NULL ||
203                          fgetword(typ, sizeof(typ), fin) == NULL ||
# Line 246 | Line 242 | readerr:
242   void
243   replace(                /* replace marker */
244          char    *fname,
245 <        register struct mrkr    *m,
245 >        struct mrkr     *m,
246          char    *mark,
247          FILE    *fin
248   )
# Line 300 | Line 296 | edgecmp(                       /* compare two edges, descending order */
296  
297   int
298   buildxf(                /* build transform for marker */
299 <        register char   *xf,
299 >        char    *xf,
300          double  markscale,
301          FILE    *fin
302   )
# Line 310 | Line 306 | buildxf(               /* build transform for marker */
306          FVECT   xvec, yvec, zvec;
307          double  xlen;
308          int     n;
309 <        register int    i;
309 >        int     i;
310          /*
311           * Read and sort vectors:  longest is hypotenuse,
312           *      second longest is x' axis,
# Line 383 | Line 379 | buildxf(               /* build transform for marker */
379  
380   int
381   addrot(         /* compute rotation (x,y,z) => (xp,yp,zp) */
382 <        register char   *xf,
382 >        char    *xf,
383          FVECT xp,
384          FVECT yp,
385          FVECT zp

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines