ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/ev.c
Revision: 1.8
Committed: Thu Feb 9 21:54:10 2023 UTC (14 months, 2 weeks ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad5R4, HEAD
Changes since 1.7: +5 -10 lines
Log Message:
fix: compile error fixes related to redeclaration of eputs() and wputs()

File Contents

# Content
1 #ifndef lint
2 static const char RCSid[] = "$Id: ev.c,v 1.7 2008/09/11 05:34:47 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(int argc, char *argv[])
20 {
21 int i;
22
23 esupport |= E_FUNCTION;
24 esupport &= ~(E_VARIABLE|E_INCHAN|E_OUTCHAN|E_RCONST);
25
26 #ifdef BIGGERLIB
27 biggerlib();
28 #endif
29
30 errno = 0;
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(const char *msg)
44 {
45 fputs(msg, stderr);
46 }
47
48
49 void
50 wputs(const char *msg)
51 {
52 eputs(msg);
53 }
54
55
56 void
57 quit(int code)
58 {
59 exit(code);
60 }