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

Comparing ray/src/rt/rxpiece.cpp (file contents):
Revision 2.11 by greg, Tue Apr 22 17:12:25 2025 UTC vs.
Revision 2.12 by greg, Wed Jun 4 20:32:25 2025 UTC

# Line 19 | Line 19 | static const char      RCSid[] = "$Id$";
19   #include  "pmapray.h"
20   #include  "random.h"
21  
22 extern char  *progname;                 /* argv[0] */
22   const char  *sigerr[NSIG];              /* signal error messages */
23  
24   VIEW  ourview = STDVIEW;                /* global view parameters */
# Line 99 | Line 98 | main(int  argc, char  *argv[])
98          int  outfmt = 'c';
99          int  rval;
100          int  i;
101 <                                        /* global program name */
102 <        progname = argv[0];
101 >                                        /* set global program name */
102 >        fixargv0(argv[0]);
103                                          /* feature check only? */
104          strcat(RFeatureList, RXPIECE_FEATURES);
105          if (argc > 1 && !strcmp(argv[1], "-features"))
# Line 638 | Line 637 | rpiece(char *pout, RenderDataType dt, char *zout)
637                  pixaspect = .0;                 // need to leave this as is
638                  myRPmanager.NewHeader(pout);    // get prev. header info
639                  const char *    tval = myRPmanager.GetHeadStr("TILED=");
640 <                if (tval) sscanf(tval, "%d %d", &tileGrid[0], &tileGrid[1]);
640 >                if (!tval || sscanf(tval, "%d %d", &tileGrid[0], &tileGrid[1]) != 2)
641 >                        error(USER, "existing picture must be tiled");
642                  CHECK(myRPmanager.GetView()==NULL,
643                                  USER, "missing view in picture file");
644                  ourview = *myRPmanager.GetView();
# Line 747 | Line 747 | rpiece(char *pout, RenderDataType dt, char *zout)
747                  ndone++;
748          }
749          if (!ndone)
750 <                error(WARNING, "no tiles need rendering, exit");
750 >                error(WARNING, "no tiles to render, exiting");
751          /*
752          munmap(pixMap, pmlen);                  // technically unnecessary...
753          if (zdMap) munmap(zdMap, zmlen);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines