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

Comparing ray/src/rt/rtmain.c (file contents):
Revision 2.2 by greg, Tue Feb 25 02:47:23 2003 UTC vs.
Revision 2.5 by schorsch, Thu Jun 26 00:58:10 2003 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7  
8   #include "copyright.h"
9  
10 < #include  "ray.h"
10 > #include  <sys/types.h>
11 > #include  <signal.h>
12  
13 + #include  "platform.h"
14 + #include  "ray.h"
15   #include  "source.h"
13
16   #include  "ambient.h"
15
17   #include  "random.h"
17
18   #include  "paths.h"
19  
20 #include  <sys/types.h>
21
22 #include  <signal.h>
20                                          /* persistent processes define */
21   #ifdef  F_SETLKW
22   #define  PERSIST        1               /* normal persist */
# Line 176 | Line 173 | char  *argv[];
173                                  }
174                                  if (argv[i][2] == 'I') {        /* file */
175                                          rval = wordfile(tralp,
176 <                                        getpath(argv[++i],getlibpath(),R_OK));
176 >                                        getpath(argv[++i],getrlibpath(),R_OK));
177                                          if (rval < 0) {
178                                                  sprintf(errmsg,
179                                  "cannot open trace include file \"%s\"",
# Line 198 | Line 195 | char  *argv[];
195                                  }
196                                  if (argv[i][2] == 'E') {        /* file */
197                                          rval = wordfile(tralp,
198 <                                        getpath(argv[++i],getlibpath(),R_OK));
198 >                                        getpath(argv[++i],getrlibpath(),R_OK));
199                                          if (rval < 0) {
200                                                  sprintf(errmsg,
201                                  "cannot open trace exclude file \"%s\"",
# Line 237 | Line 234 | char  *argv[];
234          initurand(2048);
235                                          /* set up signal handling */
236          sigdie(SIGINT, "Interrupt");
237 + #ifdef SIGHUP
238          sigdie(SIGHUP, "Hangup");
239 + #endif
240          sigdie(SIGTERM, "Terminate");
241 + #ifdef SIGPIPE
242          sigdie(SIGPIPE, "Broken pipe");
243 + #endif
244 + #ifdef SIGALRM
245          sigdie(SIGALRM, "Alarm clock");
246 + #endif
247   #ifdef  SIGXCPU
248          sigdie(SIGXCPU, "CPU limit exceeded");
249          sigdie(SIGXFSZ, "File size exceeded");
# Line 274 | Line 277 | char  *argv[];
277                  openheader();
278          }
279   #endif
280 < #ifdef  MSDOS
280 > #ifdef  _WIN32
281          if (outform != 'a')
282 <                setmode(fileno(stdout), O_BINARY);
282 >                SET_FILE_BINARY(stdout);
283          if (octname == NULL)
284 <                setmode(fileno(stdin), O_BINARY);
284 >                SET_FILE_BINARY(stdin);
285   #endif
286          readoct(octname, loadflags, &thescene, NULL);
287          nsceneobjs = nobjects;
# Line 390 | Line 393 | int  signo;
393          if (gotsig++)                   /* two signals and we're gone! */
394                  _exit(signo);
395  
396 + #ifdef SIGALRM
397          alarm(15);                      /* allow 15 seconds to clean up */
398          signal(SIGALRM, SIG_DFL);       /* make certain we do die */
399 + #endif
400          eputs("signal - ");
401          eputs(sigerr[signo]);
402          eputs("\n");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines