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.13 by greg, Thu Apr 23 17:42:04 2015 UTC vs.
Revision 2.15 by schorsch, Thu Mar 10 18:25:46 2016 UTC

# Line 62 | Line 62 | main(int argc, char *argv[])
62   #define  check(ol,al)           if (argv[i][ol] || \
63                                  badarg(argc-i-1,argv+i+1,al)) \
64                                  goto badopt
65 < #define  bool(olen,var)         switch (argv[i][olen]) { \
65 > #define  check_bool(olen,var)           switch (argv[i][olen]) { \
66                                  case '\0': var = !var; break; \
67                                  case 'y': case 'Y': case 't': case 'T': \
68                                  case '+': case '1': var = 1; break; \
# Line 148 | Line 148 | main(int argc, char *argv[])
148                          }
149                          break;
150                  case 'b':                               /* grayscale */
151 <                        bool(2,greyscale);
151 >                        check_bool(2,greyscale);
152                          break;
153                  case 'p':                               /* pixel */
154                          switch (argv[i][2]) {
# Line 172 | Line 172 | main(int argc, char *argv[])
172                          break;
173                  case 'w':                               /* warnings */
174                          rval = erract[WARNING].pf != NULL;
175 <                        bool(2,rval);
175 >                        check_bool(2,rval);
176                          if (rval) erract[WARNING].pf = wputs;
177                          else erract[WARNING].pf = NULL;
178                          break;
# Line 198 | Line 198 | main(int argc, char *argv[])
198                                                  /* set up signal handling */
199          sigdie(SIGINT, "Interrupt");
200          sigdie(SIGTERM, "Terminate");
201 < #ifndef _WIN32
201 > #if !defined(_WIN32) && !defined(_WIN64)
202          sigdie(SIGHUP, "Hangup");
203          sigdie(SIGPIPE, "Broken pipe");
204          sigdie(SIGALRM, "Alarm clock");
# Line 245 | Line 245 | badopt:
245          return 1; /* pro forma return */
246  
247   #undef  check
248 < #undef  bool
248 > #undef  check_bool
249   }
250  
251  
# Line 291 | Line 291 | onsig(                         /* fatal signal */
291          if (gotsig++)                   /* two signals and we're gone! */
292                  _exit(signo);
293  
294 < #ifndef _WIN32
294 > #if !defined(_WIN32) && !defined(_WIN64)
295          alarm(15);                      /* allow 15 seconds to clean up */
296          signal(SIGALRM, SIG_DFL);       /* make certain we do die */
297   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines