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.14 by schorsch, Sun Mar 6 01:13:18 2016 UTC vs.
Revision 2.16 by schorsch, Sat Mar 19 12:51:36 2016 UTC

# Line 55 | Line 55 | static void onsig(int  signo);
55   static void sigdie(int  signo, char  *msg);
56   static void printdefaults(void);
57  
58
59 int
58   main(int argc, char *argv[])
59   {
60   #define  check(ol,al)           if (argv[i][ol] || \
61                                  badarg(argc-i-1,argv+i+1,al)) \
62                                  goto badopt
63 < #define  bool(olen,var)         switch (argv[i][olen]) { \
63 > #define  check_bool(olen,var)           switch (argv[i][olen]) { \
64                                  case '\0': var = !var; break; \
65                                  case 'y': case 'Y': case 't': case 'T': \
66                                  case '+': case '1': var = 1; break; \
# Line 148 | Line 146 | main(int argc, char *argv[])
146                          }
147                          break;
148                  case 'b':                               /* grayscale */
149 <                        bool(2,greyscale);
149 >                        check_bool(2,greyscale);
150                          break;
151                  case 'p':                               /* pixel */
152                          switch (argv[i][2]) {
# Line 172 | Line 170 | main(int argc, char *argv[])
170                          break;
171                  case 'w':                               /* warnings */
172                          rval = erract[WARNING].pf != NULL;
173 <                        bool(2,rval);
173 >                        check_bool(2,rval);
174                          if (rval) erract[WARNING].pf = wputs;
175                          else erract[WARNING].pf = NULL;
176                          break;
# Line 230 | Line 228 | main(int argc, char *argv[])
228          
229          ray_init(octnm);                /* also calls ray_init_pmap() */
230          
231 + /* temporary shortcut, until winrview is refactored into a "device" */
232 + #ifndef WIN_RVIEW
233          rview();                        /* run interactive viewer */
234  
235 +
236          devclose();                     /* close output device */
237 + #endif
238  
239          /* PMAP: free photon maps */
240          ray_done_pmap();
241          
242 + #ifdef WIN_RVIEW
243 +        return 1;
244 + #endif
245          quit(0);
246  
247   badopt:
# Line 245 | Line 250 | badopt:
250          return 1; /* pro forma return */
251  
252   #undef  check
253 < #undef  bool
253 > #undef  check_bool
254   }
255  
256  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines