ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/calcomp.h
(Generate patch)

Comparing ray/src/common/calcomp.h (file contents):
Revision 2.7 by greg, Tue Feb 25 02:47:21 2003 UTC vs.
Revision 2.15 by greg, Mon Aug 4 19:20:26 2003 UTC

# Line 2 | Line 2
2   /*
3   *  calcomp.h - header file for expression parser.
4   */
5 + #ifndef _RAD_CALCOMP_H_
6 + #define _RAD_CALCOMP_H_
7  
8 < #include "copyright.h"
8 > #include <stdio.h>
9  
10 + #ifdef __cplusplus
11 + extern "C" {
12 + #endif
13 +
14   #define  VAR            1
15   #define  NUM            2
16   #define  UMINUS         3
# Line 43 | Line 49 | typedef struct epnode {
49  
50   typedef struct vardef  VARDEF;  /* a variable definition */
51  
52 < #define  MAXWORD        127             /* maximum word/id length */
52 > #define  RMAXWORD       127             /* maximum word/id length */
53   #define  CNTXMARK       '`'             /* context mark */
54  
55   #define  isid(c)        (isalnum(c) || (c) == '_' || \
# Line 59 | Line 65 | typedef struct vardef  VARDEF; /* a variable definitio
65   #define  E_RCONST       020
66   #define  E_REDEFW       040
67  
68 < extern double  (*eoper[])();
68 > extern double  (*eoper[])(EPNODE *);
69   extern unsigned long  eclock;
70   extern unsigned int  esupport;
71   extern EPNODE   *curfunc;
72   extern int  nextc;
73  
74 < #ifdef NOPROTO
74 >                                        /* defined in biggerlib.c */
75 > extern void biggerlib(void);
76  
70 extern void     fcompile();
71 extern void     scompile();
72 extern double   varvalue();
73 extern double   evariable();
74 extern void     varset();
75 extern void     dclear();
76 extern void     dremove();
77 extern int      vardefined();
78 extern char     *setcontext();
79 extern char     *pushcontext();
80 extern char     *popcontext();
81 extern char     *qualname();
82 extern int      incontext();
83 extern void     chanout();
84 extern void     dcleanup();
85 extern EPNODE   *dlookup();
86 extern VARDEF   *varlookup();
87 extern VARDEF   *varinsert();
88 extern void     varfree();
89 extern EPNODE   *dfirst();
90 extern EPNODE   *dnext();
91 extern EPNODE   *dpop();
92 extern void     dpush();
93 extern void     addchan();
94 extern void     getstatement();
95 extern EPNODE   *getdefn();
96 extern EPNODE   *getchan();
97 extern EPNODE   *eparse();
98 extern double   eval();
99 extern int      epcmp();
100 extern void     epfree();
101 extern EPNODE   *ekid();
102 extern int      nekids();
103 extern void     initfile();
104 extern void     initstr();
105 extern void     getscanpos();
106 extern int      scan();
107 extern char     *long2ascii();
108 extern void     syntax();
109 extern void     addekid();
110 extern char     *getname();
111 extern int      getinum();
112 extern double   getnum();
113 extern EPNODE   *getE1();
114 extern EPNODE   *getE2();
115 extern EPNODE   *getE3();
116 extern EPNODE   *getE4();
117 extern EPNODE   *getE5();
118 extern EPNODE   *rconst();
119 extern int      isconstvar();
120 extern int      isconstfun();
121 extern int      fundefined();
122 extern double   funvalue();
123 extern void     funset();
124 extern int      nargum();
125 extern double   argument();
126 extern VARDEF   *argf();
127 extern char     *argfun();
128 extern double   efunc();
129 extern LIBR     *liblookup();
130 extern void     libupdate();
131 extern void     eprint();
132 extern void     dprint();
133 extern char     *savestr();
134 extern void     freestr();
135 extern int      shash();
136 extern char     *emalloc();
137 extern char     *ecalloc();
138 extern char     *erealloc();
139 extern void     efree();
140 extern void     eputs();
141 extern void     wputs();
142 extern void     quit();
143
144 extern double   chanvalue();
145
146 #else
77                                          /* defined in caldefn.c */
78   extern void     fcompile(char *fname);
79   extern void     scompile(char *str, char *fname, int ln);
# Line 158 | Line 88 | extern char    *pushcontext(char *ctx);
88   extern char     *popcontext(void);
89   extern char     *qualname(char *nam, int lvl);
90   extern int      incontext(char *qn);
91 < extern void     chanout(int (*cs)());
91 > extern void     chanout(void (*cs)(int n, double v));
92   extern void     dcleanup(int lvl);
93   extern EPNODE   *dlookup(char *name);
94   extern VARDEF   *varlookup(char *name);
# Line 169 | Line 99 | extern EPNODE  *dnext(void);
99   extern EPNODE   *dpop(char *name);
100   extern void     dpush(char *nm, EPNODE *ep);
101   extern void     addchan(EPNODE *sp);
102 < extern void     getstatement();
103 < extern EPNODE   *getdefn();
104 < extern EPNODE   *getchan();
102 > extern void     getstatement(void);
103 > extern EPNODE   *getdefn(void);
104 > extern EPNODE   *getchan(void);
105                                          /* defined in calexpr.c */
106   extern EPNODE   *eparse(char *expr);
107   extern double   eval(char *expr);
# Line 220 | Line 150 | extern char    *emalloc(unsigned int n);
150   extern char     *ecalloc(unsigned int ne, unsigned int es);
151   extern char     *erealloc(char *cp, unsigned int n);
152   extern void     efree(char *cp);
223                                        /* miscellaneous */
224 extern void     eputs(char *s);
225 extern void     wputs(char *s);
226 extern void     quit(int code);
153                                          /* defined by client */
154   extern double   chanvalue(int n);
155  
156 +
157 + #ifdef __cplusplus
158 + }
159   #endif
160 + #endif /* _RAD_CALCOMP_H_ */
161 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines