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

Comparing ray/src/rt/rcmain.c (file contents):
Revision 2.17 by greg, Thu Nov 30 23:31:34 2017 UTC vs.
Revision 2.29 by greg, Sat Feb 25 16:17:11 2023 UTC

# Line 43 | Line 43 | int    using_stdout = 0;               /* are we using stdout? */
43   int     imm_irrad = 0;                  /* compute immediate irradiance? */
44   int     lim_dist = 0;                   /* limit distance? */
45  
46 < const char      *modname[MAXMODLIST];   /* ordered modifier name list */
47 < int             nmods = 0;              /* number of modifiers */
46 > int     report_intvl = 0;               /* reporting interval (seconds) */
47  
48 + char    **modname = NULL;               /* ordered modifier name list */
49 + int     nmods = 0;                      /* number of modifiers */
50 + int     modasiz = 0;                    /* allocated modifier array size */
51 +
52   void    (*addobjnotify[8])() = {ambnotify, NULL};
53  
54 < char    RCCONTEXT[] = "RC";             /* our special evaluation context */
54 > char    RCCONTEXT[] = "RC.";            /* our special evaluation context */
55  
56 + #if defined(_WIN32) || defined(_WIN64)
57 + #define RCONTRIB_FEATURES       "Accumulation\nSummation\nRecovery\n" \
58 +                                "ValueContribution\nImmediateIrradiance\n" \
59 +                                "ProgressReporting\nDistanceLimiting\n" \
60 +                                "Outputs=V,W\n"
61 + #else
62 + #define RCONTRIB_FEATURES       "Multiprocessing\n" \
63 +                                "Accumulation\nSummation\nRecovery\n" \
64 +                                "ValueContribution\nImmediateIrradiance\n" \
65 +                                "ProgressReporting\nDistanceLimiting\n" \
66 +                                "Outputs=V,W\n"
67 + #endif
68  
69   static void
70   printdefaults(void)                     /* print default values to stdout */
# Line 180 | Line 195 | main(int argc, char *argv[])
195          progname = argv[0] = fixargv0(argv[0]);
196          gargv = argv;
197          gargc = argc;
198 < #if defined(_WIN32) || defined(_WIN64)
199 <        _setmaxstdio(2048);             /* increase file limit to maximum */
198 >                                        /* feature check only? */
199 >        strcat(RFeatureList, RCONTRIB_FEATURES);
200 >        if (argc > 1 && !strcmp(argv[1], "-features"))
201 >                return feature_status(argc-2, argv+2);
202 > #if defined(_WIN32) || defined(_WIN64)  /* increase file limit to maximum */
203 >        for (i = 8192; i > _IOB_ENTRIES; i >>= 1)
204 >                if (_setmaxstdio(i) == 0)
205 >                        break;
206   #endif
207                                          /* initialize calcomp routines early */
208          initfunc();
209 <        setcontext(RCCONTEXT);
209 >        calcontext(RCCONTEXT);
210                                          /* option city */
211          for (i = 1; i < argc; i++) {
212                                                  /* expand arguments */
# Line 295 | Line 316 | main(int argc, char *argv[])
316                          check(2,"s");
317                          addmodfile(argv[++i], curout, prms, binval, bincnt);
318                          break;
319 +                case 't':                       /* reporting interval */
320 +                        check(2,"i");
321 +                        report_intvl = atoi(argv[++i]);
322 +                        break;
323                  default:
324                          goto badopt;
325                  }
# Line 379 | Line 404 | badopt:
404  
405   void
406   wputs(                          /* warning output function */
407 <        char    *s
407 >        const char      *s
408   )
409   {
410          int  lasterrno = errno;
# Line 390 | Line 415 | wputs(                         /* warning output function */
415  
416   void
417   eputs(                          /* put string to stderr */
418 <        char  *s
418 >        const char  *s
419   )
420   {
421          static int  midline = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines