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

Comparing ray/src/rt/rc2.c (file contents):
Revision 2.4 by greg, Tue Jun 12 17:20:44 2012 UTC vs.
Revision 2.8 by greg, Wed Aug 7 05:10:09 2013 UTC

# Line 8 | Line 8 | static const char RCSid[] = "$Id$";
8  
9   #include "rcontrib.h"
10   #include "resolu.h"
11 < #include "platform.h"
11 > #include <ctype.h>
12  
13   /* Close output stream and free record */
14   static void
# Line 183 | Line 183 | getostream(const char *ospec, const char *mname, int b
183                  }
184          }
185          if (!noopen && sop->ofp == NULL) {      /* open output stream */
186                long            i;
186                  if (oname[0] == '!')            /* output to command */
187                          sop->ofp = popen(oname+1, "w");
188                  else                            /* else open file */
# Line 213 | Line 212 | getostream(const char *ospec, const char *mname, int b
212                          sop->xr = xres; sop->yr = yres;
213                  }
214                  printresolu(sop->ofp, sop->xr, sop->yr);
216 #if 0
217                                                /* play catch-up */
218                for (i = accumulate > 0 ? lastdone/accumulate : 0; i--; ) {
219                        int     j = sop->reclen;
220                        if (j <= 0) j = 1;
221                        while (j--)
222                                put_contrib(nocontrib, sop->ofp);
223                        if (outfmt == 'a')
224                                putc('\n', sop->ofp);
225                }
226 #endif
215                  if (waitflush > 0)
216                          fflush(sop->ofp);
217          }
# Line 364 | Line 352 | void
352   end_record()
353   {
354          --waitflush;
355 <        lu_doall(&ofiletab, puteol, NULL);
355 >        lu_doall(&ofiletab, &puteol, NULL);
356          if (using_stdout & (outfmt == 'a'))
357                  putc('\n', stdout);
358          if (!waitflush) {
# Line 514 | Line 502 | reload_output()
502                          *(STREAMOUT *)oent->data = sout;
503                  }
504          }
505 <        lu_doall(&ofiletab, myclose, NULL);     /* close all files */
505 >        lu_doall(&ofiletab, &myclose, NULL);    /* close all files */
506   }
507  
508  
# Line 670 | Line 658 | recover_output()
658          }
659                                                  /* seek on all files */
660          nvals = lastout * outvsiz;
661 <        lu_doall(&ofiletab, myseeko, &nvals);
661 >        lu_doall(&ofiletab, &myseeko, &nvals);
662                                                  /* skip repeated input */
663 +        lastout *= accumulate;
664          for (nvals = 0; nvals < lastout; nvals++) {
665                  FVECT   vdummy;
666                  if (getvec(vdummy) < 0 || getvec(vdummy) < 0)
667                          error(USER, "unexpected EOF on input");
668          }
669 <        lastray = lastdone = (RNUMBER)lastout * accumulate;
669 >        lastray = lastdone = (RNUMBER)lastout;
670          if (raysleft)
671                  raysleft -= lastray;
672   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines