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

Comparing ray/src/rt/rcontrib.c (file contents):
Revision 2.8 by greg, Sat Jun 16 17:09:49 2012 UTC vs.
Revision 2.13 by greg, Fri Jun 22 22:03:02 2012 UTC

# Line 7 | Line 7 | static const char RCSid[] = "$Id$";
7   */
8  
9   #include "rcontrib.h"
10 #include "source.h"
10   #include "otypes.h"
12 #include "platform.h"
11  
12   char    *shm_boundary = NULL;           /* boundary of shared memory */
13  
# Line 137 | Line 135 | addmodifier(char *modn, char *outf, char *binv, int bi
135   }
136  
137  
138 < /* add modifiers from a file list */
138 > /* Add modifiers from a file list */
139   void
140   addmodfile(char *fname, char *outf, char *binv, int bincnt)
141   {
# Line 159 | Line 157 | quit(                  /* quit program */
157   )
158   {
159          if (nchild > 0)         /* close children if any */
160 <                end_children();
160 >                end_children(code != 0);
161          exit(code);
162   }
163  
# Line 188 | Line 186 | rcinit()
186          if ((account = accumulate) > 1)
187                  raysleft *= accumulate;
188          waitflush = (yres > 0) & (xres > 1) ? 0 : xres;
191                                        /* tracing to sources as well */
192        for (i = 0; i < nsources; i++)
193                source[i].sflags |= SFOLLOW;
189  
190          if (nproc > 1 && in_rchild())   /* forked child? */
191                  return;                 /* return to main processing loop */
# Line 336 | Line 331 | rcontrib()
331                  if (raysleft && !--raysleft)
332                          break;          /* preemptive EOI */
333          }
334 <        if ((accumulate <= 0) | (account < accumulate)) {
334 >        if (nchild != -1 && (accumulate <= 0) | (account < accumulate)) {
335                  if (account < accumulate) {
336                          error(WARNING, "partial accumulation in final record");
337                          accumulate -= account;
# Line 344 | Line 339 | rcontrib()
339                  account = 1;            /* output accumulated totals */
340                  done_contrib();
341          }
342 +        lu_done(&ofiletab);             /* close output files */
343          if (raysleft)
344                  error(USER, "unexpected EOF on input");
349        lu_done(&ofiletab);             /* close output files */
345   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines