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.6 by greg, Tue Sep 21 17:09:59 1993 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 180 | 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 263 | 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 275 | 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 361 | 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 379 | 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