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

Comparing ray/src/gen/mkillum.c (file contents):
Revision 2.39 by greg, Sat Oct 13 20:15:43 2012 UTC vs.
Revision 2.42 by greg, Thu Sep 15 22:34:41 2016 UTC

# Line 8 | Line 8 | static const char RCSid[] = "$Id$";
8   #include  <signal.h>
9   #include  <ctype.h>
10  
11 < #include  "rtprocess.h" /* win_popen() */
11 > #include  "paths.h"             /* win_popen() */
12   #include  "mkillum.h"
13  
14                                  /* default parameters */
# Line 24 | Line 24 | static const char RCSid[] = "$Id$";
24  
25   struct illum_args  thisillum = {        /* our illum and default values */
26                  0,
27                0.,
27                  DFLMAT,
28                  DFLDAT,
29                  0,
# Line 46 | Line 45 | int    doneheader = 0;         /* printed header yet? */
45   int     warnings = 1;           /* print warnings? */
46  
47   void init(char *octnm, int np);
48 < void filter(register FILE       *infp, char     *name);
48 > void filter(FILE        *infp, char     *name);
49   void xoptions(char      *s, char        *nm);
50   void printopts(void);
51 < void printhead(register int  ac, register char  **av);
51 > void printhead(int  ac, char  **av);
52   void xobject(FILE  *fp, char  *nm);
53  
54  
# Line 62 | Line 61 | main(          /* compute illum distributions using rtrace */
61          int     nprocs = 1;
62          FILE    *fp;
63          int     rval;
64 <        register int    i;
64 >        int     i;
65                                  /* set global arguments */
66          gargv = argv;
67          progname = gargv[0];
# Line 149 | Line 148 | init(char *octnm, int np)              /* start rendering process(
148  
149   void
150   eputs(                          /* put string to stderr */
151 <        register char  *s
151 >        char  *s
152   )
153   {
154          static int  midline = 0;
# Line 185 | Line 184 | int    ec;
184  
185   void
186   filter(         /* process stream */
187 <        register FILE   *infp,
187 >        FILE    *infp,
188          char    *name
189   )
190   {
191          char    buf[512];
192          FILE    *pfp;
193 <        register int    c;
193 >        int     c;
194  
195          while ((c = getc(infp)) != EOF) {
196                  if (isspace(c))
# Line 223 | Line 222 | xoptions(                      /* process options in string s */
222          char    *nm
223   )
224   {
226        extern FILE     *freopen();
225          char    buf[64];
226          int     negax;
227          int     nerrs = 0;
228 <        register char   *cp;
228 >        char    *cp;
229  
230          if (strncmp(s, "#@mkillum", 9) || !isspace(s[9])) {
231                  fputs(s, stdout);               /* not for us */
# Line 360 | Line 358 | xoptions(                      /* process options in string s */
358                          }
359                          doneheader = 0;
360                          continue;
363                case 't':                       /* object thickness */
364                        if (*++cp != '=')
365                                break;
366                        if (!isfltd(++cp, " \t\n\r"))
367                                break;
368                        thisillum.thick = atof(cp);
369                        if (thisillum.thick < .0)
370                                thisillum.thick = .0;
371                        cp = sskip(cp);
372                        continue;
361                  case '!':                       /* processed file! */
362                          sprintf(errmsg, "(%s): already processed!", nm);
363                          error(WARNING, errmsg);
# Line 415 | Line 403 | printopts(void)                        /* print out option default values *
403          printf("d=%d\t\t\t\t# density of directions\n", thisillum.sampdens);
404          printf("s=%d\t\t\t\t# samples per direction\n", thisillum.nsamps);
405          printf("b=%f\t\t\t# minimum average brightness\n", thisillum.minbrt);
418        printf("t=%f\t\t\t# object thickness\n", thisillum.thick);
406   }
407  
408  
409   void
410   printhead(                      /* print out header */
411 <        register int  ac,
412 <        register char  **av
411 >        int  ac,
412 >        char  **av
413   )
414   {
415          putchar('#');

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines