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

Comparing ray/src/util/rpiece.c (file contents):
Revision 2.52 by greg, Fri May 28 22:36:19 2010 UTC vs.
Revision 2.53 by greg, Sat Jan 21 22:04:02 2012 UTC

# Line 78 | Line 78 | int  nforked = 0;
78  
79   char  *progname;
80   int  verbose = 0;
81 + int  nowarn = 0;
82   unsigned  timelim = 0;
83   int  rvrlim = -1;
84  
# Line 114 | Line 115 | main(
115                  }
116                  if (argv[i][0] == '-')
117                          switch (argv[i][1]) {
118 +                        case 'w':
119 +                                if (!argv[i][2])
120 +                                        nowarn = !nowarn;
121 +                                else if (argv[i][2] == '+')
122 +                                        nowarn = 0;
123 +                                else if (argv[i][2] == '-')
124 +                                        nowarn = 1;
125 +                                break;
126                          case 'v':
127                                  switch (argv[i][2]) {
128                                  case '\0':      /* verbose option */
# Line 195 | Line 204 | main(
204                                          break;
205                                  outfile = argv[++i];
206                                  continue;
207 <                        } else if (i >= argc-1)
208 <                                break;
207 >                        }
208 >                else if (i >= argc-1)
209 >                        break;
210                  rpargv[rpargc++] = argv[i];
211          }
212          if (i >= argc) {
# Line 253 | Line 263 | init(                  /* set up output file and start rpict */
263                  sflock(F_UNLCK);
264          }
265                                          /* compute piece size */
266 +        hr = hres; vr = vres;
267 +        if (pixaspect > FTINY)
268 +                normaspect(viewaspect(&ourview), &pixaspect, &hr, &vr);
269          hres /= hmult;
270          vres /= vmult;
271          if (hres <= 0 || vres <= 0) {
# Line 260 | Line 273 | init(                  /* set up output file and start rpict */
273                  exit(1);
274          }
275          normaspect(viewaspect(&ourview)*hmult/vmult, &pixaspect, &hres, &vres);
276 +        if (!nowarn && (hr != hres*hmult) | (vr != vres*vmult))
277 +                fprintf(stderr,
278 +                "%s: warning - resolution changed from %dx%d to %dx%d\n",
279 +                                progname, hr, vr, hres*hmult, vres*vmult);
280          sprintf(hrbuf, "%d", hres);
281          rpargv[rpargc++] = "-x"; rpargv[rpargc++] = hrbuf;
282          sprintf(vrbuf, "%d", vres);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines