ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/ev.c
Revision: 1.6
Committed: Fri Nov 14 17:31:24 2003 UTC (20 years, 11 months ago) by schorsch
Content type: text/plain
Branch: MAIN
CVS Tags: rad3R7P2, rad3R7P1, rad3R6, rad3R6P1, rad3R8, rad3R9
Changes since 1.5: +3 -1 lines
Log Message:
Reduced compile warnings.

File Contents

# Content
1 #ifndef lint
2 static const char RCSid[] = "$Id: ev.c,v 1.5 2003/10/14 16:46:20 greg Exp $";
3 #endif
4 /*
5 * ev.c - program to evaluate expression arguments
6 *
7 * 1/29/87
8 */
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 int
19 main(argc, argv)
20 int argc;
21 char *argv[];
22 {
23 int i;
24
25 esupport |= E_FUNCTION;
26 esupport &= ~(E_VARIABLE|E_INCHAN|E_OUTCHAN|E_RCONST);
27
28 #ifdef BIGGERLIB
29 biggerlib();
30 #endif
31
32 errno = 0;
33 for (i = 1; i < argc; i++)
34 printf("%.9g\n", eval(argv[i]));
35
36 quit(errno ? 2 : 0);
37 return (errno ? 2 : 0); /* pro forma return */
38 }
39
40
41 void
42 eputs(msg)
43 char *msg;
44 {
45 fputs(msg, stderr);
46 }
47
48
49 void
50 wputs(msg)
51 char *msg;
52 {
53 eputs(msg);
54 }
55
56
57 void
58 quit(code)
59 int code;
60 {
61 exit(code);
62 }