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

Comparing ray/src/hd/genrhgrid.c (file contents):
Revision 3.8 by schorsch, Thu Jan 1 11:21:55 2004 UTC vs.
Revision 3.12 by greg, Sat Jun 7 05:09:46 2025 UTC

# Line 5 | Line 5 | static const char      RCSid[] = "$Id$";
5   * Generate renderable grids from a holodeck file
6   */
7  
8 #include <stdio.h>
9
8   #include "platform.h"
9   #include "resolu.h"
10   #include "holo.h"
11  
14 char    *progname;              /* global argv[0] */
15
12   char    *mat, *name;            /* material and object id */
13   double  rad;                    /* grid line radius */
14  
# Line 29 | Line 25 | main(
25   {
26          int     sect;
27  
28 <        progname = argv[0];
28 >        fixargv0(argv[0]);
29          if ((argc < 5) | (argc > 6))
30                  goto userr;
31          mat = argv[1];
# Line 59 | Line 55 | gridsect(              /* get specified section(s) and print grids
55          int32   nextloc;
56          int     n;
57                                          /* open holodeck file */
58 <        if ((fp = fopen(fname, "r")) == NULL) {
58 >        if ((fp = fopen(fname, "rb")) == NULL) {
59                  sprintf(errmsg, "cannot open \"%s\"", fname);
60                  error(SYSTEM, errmsg);
61          }
# Line 85 | Line 81 | gridsect(              /* get specified section(s) and print grids
81  
82   void
83   putgrid(                        /* run through holodeck section grid lines */
84 <        register HOLO   *hp
84 >        HOLO    *hp
85   )
86   {
87 <        register int    w, i;
87 >        int     w, i;
88          int     g0, g1;
89          FVECT   wp[2], mov;
90          double  d;
# Line 135 | Line 131 | putgrid(                       /* run through holodeck section grid lines
131  
132   void
133   putline(                /* put out a line */
134 <        register FVECT  wp[2]
134 >        FVECT   wp[2]
135   )
136   {
137          static int      cnt = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines