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 1.5 by greg, Wed Jul 24 16:48:22 1991 UTC vs.
Revision 1.6 by greg, Thu Jul 25 10:59:05 1991 UTC

# Line 58 | Line 58 | int    doneheader = 0;         /* printed header yet? */
58   int     warnings = 1;           /* print warnings? */
59  
60   extern char     *fgetline(), *fgetword(), *sskip(),
61 <                *atos(), *iskip(), *fskip();
61 >                *atos(), *iskip(), *fskip(), *strcpy();
62   extern FILE     *popen();
63  
64  
# Line 158 | Line 158 | init()                         /* start rtrace and set up buffers */
158          if (rt.buf == NULL || rt.dest == NULL)
159                  error(SYSTEM, "out of memory in init");
160          rt.nrays = 0;
161 +                                        /* set up urand */
162 +        initurand(2048);
163   }
164  
165  
# Line 253 | Line 255 | char   *nm;
255                          if (*++cp != '=')
256                                  break;
257                          if (!*++cp) {
258 +                                strcpy(thisillum.datafile,thisillum.matname);
259                                  thisillum.flags &= ~IL_DATCLB;
260                                  continue;
261                          }
# Line 263 | Line 266 | char   *nm;
266                          continue;
267                  case 'i':                       /* include material */
268                  case 'e':                       /* exclude material */
269 <                        matselect = (*cp == 'i') ? S_ELEM : S_COMPL;
267 <                        if (*++cp != '=')
269 >                        if (cp[1] != '=')
270                                  break;
271 +                        matselect = (*++cp == 'i') ? S_ELEM : S_COMPL;
272                          atos(matcheck, MAXSTR, ++cp);
273                          cp = sskip(cp);
274                          continue;
# Line 282 | Line 285 | char   *nm;
285                                  break;
286                          switch (*++cp) {
287                          case 'a':                       /* average */
288 <                                thisillum.flags |= IL_COLAVG;
289 <                                thisillum.flags &= ~IL_COLDST;
288 >                                thisillum.flags = (thisillum.flags|IL_COLAVG)
289 >                                                        & ~IL_COLDST;
290                                  break;
291                          case 'd':                       /* distribution */
292                                  thisillum.flags |= (IL_COLDST|IL_COLAVG);
# Line 336 | Line 339 | char   *nm;
339                          }
340                          doneheader = 0;
341                          continue;
342 +                case '!':                       /* processed file! */
343 +                        sprintf(errmsg, "(%s): processed by mkillum already!",
344 +                                        nm);
345 +                        error(WARNING, errmsg);
346 +                        return;
347                  }
348          opterr:                                 /* skip faulty option */
349                  cp = sskip(cp);
# Line 366 | Line 374 | register char  **av;
374                  putchar(' ');
375                  fputs(*av++, stdout);
376          }
377 <        putchar('\n');
377 >        fputs("\n#@mkillum !\n", stdout);
378   }
379  
380  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines