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

Comparing ray/src/px/pinterp.c (file contents):
Revision 2.26 by greg, Sat Sep 16 10:30:52 1995 UTC vs.
Revision 2.30 by gregl, Mon Oct 20 16:36:32 1997 UTC

# Line 39 | Line 39 | static char SCCSid[] = "$SunId$ LBL";
39  
40   #define PACKSIZ         256             /* max. calculation packet size */
41  
42 < #define RTCOM           "rtrace -h- -ovl -fff "
42 > #define RTCOM           "rtrace -h- -ovl -fff -ld- -i- -I- "
43  
44   #define ABS(x)          ((x)>0?(x):-(x))
45  
# Line 76 | Line 76 | COLR   backcolr = BLKCOLR;             /* background color */
76   COLOR   backcolor = BLKCOLOR;           /* background color (float) */
77   double  backz = 0.0;                    /* background z value */
78   int     normdist = 1;                   /* i/o normalized distance? */
79 + char    ourfmt[LPICFMT+1] = PICFMT;     /* original picture format */
80   double  ourexp = -1;                    /* original picture exposure */
81   int     expadj = 0;                     /* exposure adjustment (f-stops) */
82   double  rexpadj = 1;                    /* real exposure adjustment */
# Line 251 | Line 252 | char   *argv[];
252                                  rexpadj = pow(2.0, (double)expadj);
253                  }
254                                                  /* set view */
255 <        if (nextview(doblur ? stdin : NULL) == EOF) {
255 >        if (nextview(doblur ? stdin : (FILE *)NULL) == EOF) {
256                  fprintf(stderr, "%s: no view on standard input!\n",
257                                  progname);
258                  exit(1);
# Line 308 | Line 309 | char   *argv[];
309                  ourexp = rexpadj;
310          if (ourexp < .995 | ourexp > 1.005)
311                  fputexpos(ourexp, stdout);
312 <        fputformat(COLRFMT, stdout);
312 >        if (strcmp(ourfmt, PICFMT))             /* print format if known */
313 >                fputformat(ourfmt, stdout);
314          putc('\n', stdout);
315                                                          /* write picture */
316          writepicture();
# Line 334 | Line 336 | char   *s;
336          if (isheadid(s))
337                  return;
338          if (formatval(fmt, s)) {
339 <                wrongformat = strcmp(fmt, COLRFMT);
339 >                if (globmatch(ourfmt, fmt)) {
340 >                        wrongformat = 0;
341 >                        strcpy(ourfmt, fmt);
342 >                } else
343 >                        wrongformat = 1;
344                  return;
345          }
346          if (nvavg < 2) {
# Line 1163 | Line 1169 | clearqueue()                           /* process queue */
1169          }
1170                                          /* mark end and get results */
1171          bzero((char *)fbp, 6*sizeof(float));
1172 <        if (process(PDesc, fbuf, fbuf, 4*sizeof(float)*queuesiz,
1172 >        if (process(PDesc, fbuf, fbuf, 4*sizeof(float)*(queuesiz+1),
1173                          6*sizeof(float)*(queuesiz+1)) !=
1174 <                        4*sizeof(float)*queuesiz) {
1174 >                        4*sizeof(float)*(queuesiz+1)) {
1175                  fprintf(stderr, "%s: error reading from rtrace process\n",
1176                                  progname);
1177                  exit(1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines