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

Comparing ray/src/rt/rvmain.c (file contents):
Revision 2.9 by greg, Thu Aug 21 07:05:59 2008 UTC vs.
Revision 2.13 by greg, Thu Apr 23 17:42:04 2015 UTC

# Line 18 | Line 18 | static const char      RCSid[] = "$Id$";
18   #include  "random.h"
19   #include  "paths.h"
20   #include  "view.h"
21 + #include  "pmapray.h"
22  
23   extern char  *progname;                 /* global argv[0] */
24  
# Line 196 | Line 197 | main(int argc, char *argv[])
197                  error(USER, err);
198                                                  /* set up signal handling */
199          sigdie(SIGINT, "Interrupt");
199        sigdie(SIGHUP, "Hangup");
200          sigdie(SIGTERM, "Terminate");
201 + #ifndef _WIN32
202 +        sigdie(SIGHUP, "Hangup");
203          sigdie(SIGPIPE, "Broken pipe");
204          sigdie(SIGALRM, "Alarm clock");
205 + #endif
206                                          /* open error file */
207          if (errfile != NULL) {
208                  if (freopen(errfile, "a", stderr) == NULL)
# Line 225 | Line 228 | main(int argc, char *argv[])
228                                          /* set up output & start process(es) */
229          SET_FILE_BINARY(stdout);
230          
231 <        ray_pinit(octnm, 0);
232 <
231 >        ray_init(octnm);                /* also calls ray_init_pmap() */
232 >        
233          rview();                        /* run interactive viewer */
234  
235          devclose();                     /* close output device */
236  
237 +        /* PMAP: free photon maps */
238 +        ray_done_pmap();
239 +        
240          quit(0);
241  
242   badopt:
# Line 285 | Line 291 | onsig(                         /* fatal signal */
291          if (gotsig++)                   /* two signals and we're gone! */
292                  _exit(signo);
293  
294 + #ifndef _WIN32
295          alarm(15);                      /* allow 15 seconds to clean up */
296          signal(SIGALRM, SIG_DFL);       /* make certain we do die */
297 + #endif
298          eputs("signal - ");
299          eputs(sigerr[signo]);
300          eputs("\n");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines