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

Comparing ray/src/rt/rxtmain.cpp (file contents):
Revision 2.3 by greg, Tue Apr 30 23:16:23 2024 UTC vs.
Revision 2.5 by greg, Sat Aug 3 01:54:46 2024 UTC

# Line 299 | Line 299 | main(int  argc, char  *argv[])
299                          goto badopt;
300                  }
301          }
302 +                                        /* set/check spectral sampling */
303 +        rval = setspectrsamp(CNDX, WLPART);
304 +        if (rval < 0)
305 +                error(USER, "unsupported spectral sampling");
306 +        if (out_prims != NULL) {
307 +                if (!rval)
308 +                        error(WARNING, "spectral range incompatible with color output");
309 +        } else if (NCSAMP == 3)
310 +                out_prims = stdprims;   /* 3 samples do not a spectrum make */
311                                          /* set up signal handling */
312          sigdie(SIGINT, "Interrupt");
313   #ifdef SIGHUP
# Line 342 | Line 351 | main(int  argc, char  *argv[])
351          if (outform != 'a')
352                  SET_FILE_BINARY(stdout);
353          if (doheader) {                 /* print header? */
354 <                static char     fmt[] = OCTFMT;
355 <                FILE *          octfp = fopen(argv[i], "rb");
356 <                if (checkheader(octfp, fmt, stdout) < 0)
348 <                        error(USER, "bad octree header");
349 <                fclose(octfp);
354 >                newheader("RADIANCE", stdout);
355 >                const char *    ohdr = myRTmanager.GetHeader();
356 >                if (ohdr) fputs(ohdr, stdout);
357                  printargs(i, argv, stdout);
358                  printf("SOFTWARE= %s\n", VersionID);
359                  fputnow(stdout);
# Line 355 | Line 362 | main(int  argc, char  *argv[])
362                  if ((outform == 'f') | (outform == 'd'))
363                          fputendian(stdout);
364                  fputformat(formstr(outform), stdout);
365 <                putchar('\n');
365 >                fputc('\n', stdout);    /* end of header */
366          }
367          rtrace(NULL, nproc);            /* trace rays */
368          quit(0);                        /* clean up & exit */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines