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

Comparing ray/src/rt/rpmain.c (file contents):
Revision 2.17 by schorsch, Sun Mar 6 01:13:18 2016 UTC vs.
Revision 2.27 by greg, Tue Aug 15 01:19:37 2023 UTC

# Line 55 | Line 55 | extern double  dblur;                  /* depth-of-field blur paramet
55   static void onsig(int signo);
56   static void sigdie(int  signo, char  *msg);
57   static void printdefaults(void);
58 +                                        /* rpict additional features */
59 + #ifdef PERSIST
60 + #define RPICT_FEATURES  "Persist\nParallelPersist\n" \
61 +                "ParticipatingMedia=Mist\n" \
62 +                "Recovery\nIrradianceCalc\nViewTypes=v,l,a,h,s,c\n" \
63 +                "HessianAmbientCache\nAmbientAveraging\nAmbientValueSharing\n" \
64 +                "PixelJitter\nPixelSampling\nPixelMotion\nPixelDepthOfField\n" \
65 +                "SmallSourceDrawing\nViewSequence\nProgressReporting\n" \
66 +                "AdaptiveShadowTesting\nOutputs=v,l\n"
67 + #else
68 + #define RPICT_FEATURES  "Recovery\nIrradianceCalc\nViewTypes=v,l,a,h,s,c\n" \
69 +                "ParticipatingMedia=Mist\n" \
70 +                "HessianAmbientCache\nAmbientAveraging\nAmbientValueSharing\n" \
71 +                "PixelJitter\nPixelSampling\nPixelMotion\nPixelDepthOfField\n" \
72 +                "SmallSourceDrawing\nViewSequence\nProgressReporting\n" \
73 +                "AdaptiveShadowTesting\nOutputs=v,l\n"
74 + #endif
75  
76  
77   int
# Line 63 | Line 80 | main(int  argc, char  *argv[])
80   #define  check(ol,al)           if (argv[i][ol] || \
81                                  badarg(argc-i-1,argv+i+1,al)) \
82                                  goto badopt
83 < #define  bool(olen,var)         switch (argv[i][olen]) { \
83 > #define  check_bool(olen,var)           switch (argv[i][olen]) { \
84                                  case '\0': var = !var; break; \
85                                  case 'y': case 'Y': case 't': case 'T': \
86                                  case '+': case '1': var = 1; break; \
# Line 84 | Line 101 | main(int  argc, char  *argv[])
101          tstart = time((time_t *)NULL);
102                                          /* global program name */
103          progname = argv[0] = fixargv0(argv[0]);
104 +                                        /* feature check only? */
105 +        strcat(RFeatureList, RPICT_FEATURES);
106 +        if (argc > 1 && !strcmp(argv[1], "-features"))
107 +                return feature_status(argc-2, argv+2);
108                                          /* option city */
109          for (i = 1; i < argc; i++) {
110                                                  /* expand arguments */
# Line 209 | Line 230 | main(int  argc, char  *argv[])
230   #endif
231                  case 'w':                               /* warnings */
232                          rval = erract[WARNING].pf != NULL;
233 <                        bool(2,rval);
233 >                        check_bool(2,rval);
234                          if (rval) erract[WARNING].pf = wputs;
235                          else erract[WARNING].pf = NULL;
236                          break;
# Line 286 | Line 307 | main(int  argc, char  *argv[])
307   #endif
308          if (outfile != NULL)
309                  openheader();
289 #if defined(_WIN32) || defined(_WIN64)
310          SET_FILE_BINARY(stdout);
311          if (octname == NULL)
312                  SET_FILE_BINARY(stdin);
293 #endif
313          readoct(octname, loadflags, &thescene, NULL);
314          nsceneobjs = nobjects;
315  
# Line 305 | Line 324 | main(int  argc, char  *argv[])
324  
325          setambient();                   /* initialize ambient calculation */
326          
327 +        fflush(stdout);                 /* in case we're duplicating header */
328 +
329   #ifdef  PERSIST
330          if (persist) {
310                fflush(stdout);
331                  if (outfile == NULL) {          /* reconnect stdout */
332                          dup2(duped1, fileno(stdout));
333                          close(duped1);
# Line 371 | Line 391 | badopt:
391          return 1; /* pro forma return */
392  
393   #undef  check
394 < #undef  bool
394 > #undef  check_bool
395   }
396  
397  
398   void
399   wputs(                          /* warning output function */
400 <        char    *s
400 >        const char      *s
401   )
402   {
403          int  lasterrno = errno;
# Line 388 | Line 408 | wputs(                         /* warning output function */
408  
409   void
410   eputs(                          /* put string to stderr */
411 <        register char  *s
411 >        const char  *s
412   )
413   {
414          static int  midline = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines