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.5 by greg, Thu Nov 19 20:27:48 1992 UTC vs.
Revision 2.10 by gregl, Mon Oct 20 16:37:14 1997 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1991 Regents of the University of California */
1 > /* Copyright (c) 1995 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 30 | Line 30 | char  *rtargv[64] = { "rtrace", "-dj", ".25", "-dr", "
30                  "-ab", "2", "-ad", "256", "-as", "128", "-aa", ".15", };
31   int  rtargc = 14;
32                                  /* overriding rtrace options */
33 < char  *myrtopts[] = { "-I-", "-i-", "-ov", "-h-", "-fff", "-y", "0", NULL };
33 > char  *myrtopts[] = { "-I-", "-i-", "-ld-", "-ov", "-h-",
34 >                        "-fff", "-y", "0", NULL };
35  
36   struct rtproc   rt;             /* our rtrace process */
37  
# Line 76 | Line 77 | char   *argv[];
77          gargv = argv;
78                                  /* set up rtrace command */
79          for (i = 1; i < argc; i++) {
80 <                if (argv[i][0] == '<' && !argv[i][1])
80 >                if (argv[i][0] == '<' && argv[i][1] == '\0')
81                          break;
82                  rtargv[rtargc++] = argv[i];
83                  if (argv[i][0] == '-' && argv[i][1] == 'w')
84 <                        warnings = !warnings;
84 >                        switch (argv[i][2]) {
85 >                        case '\0':
86 >                                warnings = !warnings;
87 >                                break;
88 >                        case '+':
89 >                        case 'T': case 't':
90 >                        case 'Y': case 'y':
91 >                        case '1':
92 >                                warnings = 1;
93 >                                break;
94 >                        case '-':
95 >                        case 'F': case 'f':
96 >                        case 'N': case 'n':
97 >                        case '0':
98 >                                warnings = 0;
99 >                                break;
100 >                        }
101          }
102          gargc = i;
103          rtargc--;
# Line 164 | Line 181 | init()                         /* start rtrace and set up buffers */
181                  error(SYSTEM, "out of memory in init");
182          rt.nrays = 0;
183                                          /* set up urand */
184 <        initurand(2048);
184 >        initurand(16384);
185   }
186  
187  
# Line 247 | Line 264 | char   *nm;
264                  case 'm':                       /* material name */
265                          if (*++cp != '=')
266                                  break;
267 <                        if (!*++cp)
267 >                        if (!*++cp || isspace(*cp))
268                                  break;
269                          atos(thisillum.matname, MAXSTR, cp);
270                          cp = sskip(cp);
# Line 259 | Line 276 | char   *nm;
276                  case 'f':                       /* data file name */
277                          if (*++cp != '=')
278                                  break;
279 <                        if (!*++cp) {
279 >                        if (!*++cp || isspace(*cp)) {
280                                  strcpy(thisillum.datafile,thisillum.matname);
281                                  thisillum.dfnum = 0;
282                                  thisillum.flags &= ~IL_DATCLB;
# Line 345 | Line 362 | char   *nm;
362                  case 'o':                       /* output file */
363                          if (*++cp != '=')
364                                  break;
365 <                        if (!*++cp)
365 >                        if (!*++cp || isspace(*cp))
366                                  break;
367                          atos(buf, sizeof(buf), cp);
368                          cp = sskip(cp);
# Line 363 | Line 380 | char   *nm;
380                          return;
381                  }
382          opterr:                                 /* skip faulty option */
383 <                cp = sskip(cp);
383 >                while (*cp && !isspace(*cp))
384 >                        cp++;
385                  nerrs++;
386          }
387                                                  /* print header? */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines