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.6 by greg, Thu Jul 25 10:59:05 1991 UTC vs.
Revision 1.9 by greg, Thu Jul 25 15:31:30 1991 UTC

# Line 15 | Line 15 | static char SCCSid[] = "$SunId$ LBL";
15   #include  <ctype.h>
16  
17                                  /* default parameters */
18 < #define  SAMPDENS       128             /* points per projected steradian */
18 > #define  SAMPDENS       48              /* points per projected steradian */
19   #define  NSAMPS         32              /* samples per point */
20   #define  DFLMAT         "illum_mat"     /* material name */
21                                  /* selection options */
# Line 89 | Line 89 | char   *argv[];
89          rtargv[rtargc] = NULL;
90                                  /* just asking for defaults? */
91          if (!strcmp(argv[gargc-1], "-defaults")) {
92 +                printopts(); fflush(stdout);
93                  rtpath = getpath(rtargv[0], getenv("PATH"), X_OK);
94                  if (rtpath == NULL) {
95                          eputs(rtargv[0]);
# Line 268 | Line 269 | char   *nm;
269                  case 'e':                       /* exclude material */
270                          if (cp[1] != '=')
271                                  break;
272 <                        matselect = (*++cp == 'i') ? S_ELEM : S_COMPL;
273 <                        atos(matcheck, MAXSTR, ++cp);
272 >                        matselect = (*cp == 'i') ? S_ELEM : S_COMPL;
273 >                        cp += 2;
274 >                        atos(matcheck, MAXSTR, cp);
275                          cp = sskip(cp);
276                          continue;
277                  case 'a':                       /* use everything */
# Line 340 | Line 342 | char   *nm;
342                          doneheader = 0;
343                          continue;
344                  case '!':                       /* processed file! */
345 <                        sprintf(errmsg, "(%s): processed by mkillum already!",
344 <                                        nm);
345 >                        sprintf(errmsg, "(%s): already processed!", nm);
346                          error(WARNING, errmsg);
347 +                        matselect = S_NONE;
348                          return;
349                  }
350          opterr:                                 /* skip faulty option */
# Line 362 | Line 364 | char   *nm;
364          }
365                                                  /* print pure comment */
366          printf("# %s", s+2);
367 + }
368 +
369 +
370 + printopts()                     /* print out option default values */
371 + {
372 +        printf("m=%s\t\t\t# material name\n", thisillum.matname);
373 +        printf("f=%s\t\t\t# data file name\n", thisillum.datafile);
374 +        printf("c=n\t\t\t\t# color none\n");
375 +        printf("d=%d\t\t\t\t# density of points\n", thisillum.sampdens);
376 +        printf("s=%d\t\t\t\t# samples per point\n", thisillum.nsamps);
377   }
378  
379  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines