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.59 by greg, Wed Jan 12 21:07:39 2022 UTC vs.
Revision 2.65 by greg, Wed Aug 21 16:18:54 2024 UTC

# Line 59 | Line 59 | main(
59   #define unguard()      
60   #endif
61  
62 extern char  *strerror();
63
62                                  /* rpict command */
63   char  *rpargv[128] = {"rpict", "-S", "1"};
64   int  rpargc = 3;
# Line 155 | Line 153 | main(
153                                          ++i;
154                                          continue;
155                                  }
156 +                                if (argv[i][2] == 'X') {
157 +                                        fprintf(stderr, "%s: -pXYZ unsupported\n",
158 +                                                argv[0]);
159 +                                        ++i;
160 +                                        continue;
161 +                                }
162 +                                if (argv[i][2] == 'c') {
163 +                                        fprintf(stderr, "%s: -pc unsupported\n",
164 +                                                argv[0]);
165 +                                        i += 9;
166 +                                        continue;
167 +                                }
168                                  if (argv[i][2] != 'a' || argv[i][3])
169                                          break;
170                                  pixaspect = atof(argv[++i]);
171                                  continue;
172 +                        case 'S':
173 +                                fprintf(stderr, "%s: -S unsupported\n", argv[0]);
174 +                                i++;
175 +                                continue;
176                          case 'T':               /* time limit (hours) */
177                                  if (argv[i][2])
178                                          break;
# Line 286 | Line 300 | init(                  /* set up output file and start rpict */
300          sprintf(vrbuf, "%d", vres);
301          rpargv[rpargc++] = "-y"; rpargv[rpargc++] = vrbuf;
302          rpargv[rpargc++] = "-pa"; rpargv[rpargc++] = "0";
303 +        rpargv[rpargc++] = "-pm"; rpargv[rpargc++] = "0";
304          rpargv[rpargc++] = av[ac-1];
305          rpargv[rpargc] = NULL;
306                                          /* open output file */
# Line 302 | Line 317 | init(                  /* set up output file and start rpict */
317                  fputnow(fp);
318                  if (pixaspect < .99 || pixaspect > 1.01)
319                          fputaspect(pixaspect, fp);
320 +                fputprims(stdprims, fp);
321                  fputformat(COLRFMT, fp);
322                  fputc('\n', fp);
323                  fprtresolu(hres*hmult, vres*vmult, fp);
# Line 553 | Line 569 | int    ypos
569          if (lseek(outfd, (off_t)fls.l_start, SEEK_SET) < 0)
570                  filerr("seek");
571          if (hmult == 1) {
572 <                if (writebuf(outfd, (char *)pbuf,
572 >                if (writebuf(outfd, pbuf,
573                                  vr*hr*sizeof(COLR)) != vr*hr*sizeof(COLR))
574                          filerr("write");
575          } else
576                  for (y = 0; y < vr; y++) {
577 <                        if (writebuf(outfd, (char *)(pbuf+y*hr),
577 >                        if (writebuf(outfd, pbuf+y*hr,
578                                          hr*sizeof(COLR)) != hr*sizeof(COLR))
579                                  filerr("write");
580                          if (y < vr-1 && lseek(outfd,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines