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

Comparing ray/src/cal/ev.c (file contents):
Revision 1.3 by schorsch, Sun Jul 27 22:12:01 2003 UTC vs.
Revision 1.8 by greg, Thu Feb 9 21:54:10 2023 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9  
10   #include  <stdlib.h>
11   #include  <stdio.h>
12 + #include  <errno.h>
13  
14   #include  "calcomp.h"
15   #include  "rterror.h"
16  
17  
18 < main(argc, argv)
19 < int  argc;
19 < char  *argv[];
18 > int
19 > main(int argc, char *argv[])
20   {
21        extern int  errno;
21          int  i;
22  
23          esupport |= E_FUNCTION;
# Line 32 | Line 31 | char  *argv[];
31          for (i = 1; i < argc; i++)
32                  printf("%.9g\n", eval(argv[i]));
33  
34 +        if (errno != EDOM && errno != ERANGE)
35 +                errno = 0;
36 +
37          quit(errno ? 2 : 0);
38 +        return (errno ? 2 : 0); /* pro forma return */
39   }
40  
41  
42   void
43 < eputs(msg)
41 < char  *msg;
43 > eputs(const char *msg)
44   {
45          fputs(msg, stderr);
46   }
47  
48  
49   void
50 < wputs(msg)
49 < char  *msg;
50 > wputs(const char *msg)
51   {
52          eputs(msg);
53   }
54  
55  
56   void
57 < quit(code)
57 < int  code;
57 > quit(int code)
58   {
59          exit(code);
60   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines