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.8 by schorsch, Tue Oct 21 19:19:28 2003 UTC vs.
Revision 2.9 by schorsch, Tue Mar 30 16:13:01 2004 UTC

# Line 12 | Line 12 | static const char      RCSid[] = "$Id$";
12  
13   #include  "platform.h"
14   #include  "rtprocess.h" /* getpid() */
15 + #include  "resolu.h"
16   #include  "ray.h"
17   #include  "source.h"
18   #include  "ambient.h"
# Line 26 | Line 27 | static const char      RCSid[] = "$Id$";
27   #endif
28  
29   char  *progname;                        /* argv[0] */
29
30   char  *octname;                         /* octree name */
31
31   char  *sigerr[NSIG];                    /* signal error messages */
33
32   char  *shm_boundary = NULL;             /* boundary of shared memory */
35
33   char  *errfile = NULL;                  /* error output file */
34  
35   extern char  *formstr();                /* string from format */
# Line 49 | Line 46 | extern int  lim_dist;                  /* limit distance? */
46   extern char  *tralist[];                /* list of modifers to trace (or no) */
47   extern int  traincl;                    /* include == 1, exclude == 0 */
48  
49 < void    onsig(int);
50 < void    sigdie(int, char*);
51 < void    printdefaults(void);
49 > static void onsig(int  signo);
50 > static void sigdie(int  signo, char  *msg);
51 > static void printdefaults(void);
52  
53  
54   int
55 < main(argc, argv)
59 < int  argc;
60 < char  *argv[];
55 > main(int  argc, char  *argv[])
56   {
57   #define  check(ol,al)           if (argv[i][ol] || \
58                                  badarg(argc-i-1,argv+i+1,al)) \
# Line 349 | Line 344 | runagain:
344   badopt:
345          sprintf(errmsg, "command line error at '%s'", argv[i]);
346          error(USER, errmsg);
347 +        return 1; /* pro forma return */
348  
349   #undef  check
350   #undef  bool
# Line 356 | Line 352 | badopt:
352  
353  
354   void
355 < wputs(s)                                /* warning output function */
356 < char    *s;
355 > wputs(                          /* warning output function */
356 >        char    *s
357 > )
358   {
359          int  lasterrno = errno;
360          eputs(s);
# Line 366 | Line 363 | char   *s;
363  
364  
365   void
366 < eputs(s)                                /* put string to stderr */
367 < register char  *s;
366 > eputs(                          /* put string to stderr */
367 >        register char  *s
368 > )
369   {
370          static int  midline = 0;
371  
# Line 385 | Line 383 | register char  *s;
383   }
384  
385  
386 < void
387 < onsig(signo)                            /* fatal signal */
388 < int  signo;
386 > static void
387 > onsig(                          /* fatal signal */
388 >        int  signo
389 > )
390   {
391          static int  gotsig = 0;
392  
# Line 405 | Line 404 | int  signo;
404   }
405  
406  
407 < void
408 < sigdie(signo, msg)                      /* set fatal signal */
409 < int  signo;
410 < char  *msg;
407 > static void
408 > sigdie(                 /* set fatal signal */
409 >        int  signo,
410 >        char  *msg
411 > )
412   {
413          if (signal(signo, onsig) == SIG_IGN)
414                  signal(signo, SIG_IGN);
# Line 416 | Line 416 | char  *msg;
416   }
417  
418  
419 < void
419 > static void
420   printdefaults(void)                     /* print default values to stdout */
421   {
422          register char  *cp;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines