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.16 by greg, Mon Aug 4 22:37:53 2003 UTC vs.
Revision 2.24 by greg, Tue Sep 26 18:33:14 2023 UTC

# Line 17 | Line 17 | extern "C" {
17   #define  CHAN           4
18   #define  FUNC           5
19   #define  ARG            6
20 < #define  TICK           7
20 > #define  CLKT           7
21   #define  SYM            8
22                                  /* also: '+', '-', '*', '/', '^', '=', ':' */
23  
# Line 29 | Line 29 | typedef struct {
29   }  LIBR;                /* a library function */
30  
31   typedef struct epnode {
32    int  type;                  /* node type */
33    struct epnode  *sibling;    /* next child this level */
32      union {
33          struct epnode  *kid;    /* first child */
34          double  num;            /* number */
# Line 45 | Line 43 | typedef struct epnode {
43              struct vardef  *next;       /* next in hash list */
44          }  *ln;                 /* link */
45      } v;                /* value */
46 +    struct epnode  *sibling;    /* next child this level */
47 +    int  type;                  /* node type */
48   }  EPNODE;      /* an expression node */
49  
50   typedef struct vardef  VARDEF;  /* a variable definition */
# Line 57 | Line 57 | typedef struct vardef  VARDEF; /* a variable definitio
57  
58   #define  evalue(ep)     (*eoper[(ep)->type])(ep)
59  
60 + #define  dfn_name(ep)   ((ep)->v.kid->type == SYM ? \
61 +                        (ep)->v.kid->v.name : \
62 +                        (ep)->v.kid->v.kid->v.name)
63 +
64                                          /* flags to set in esupport */
65   #define  E_VARIABLE     001
66   #define  E_FUNCTION     002
# Line 70 | Line 74 | extern unsigned long  eclock;
74   extern unsigned int  esupport;
75   extern EPNODE   *curfunc;
76   extern int  nextc;
77 <
77 > extern int  eofc;
78                                          /* defined in biggerlib.c */
79   extern void biggerlib(void);
76
80                                          /* defined in caldefn.c */
81   extern void     fcompile(char *fname);
82   extern void     scompile(char *str, char *fname, int ln);
83   extern double   varvalue(char *vname);
84   extern double   evariable(EPNODE *ep);
85 < extern void     varset(char *fname, int assign, double val);
85 > extern void     varset(char *vname, int assign, double val);
86   extern void     dclear(char *name);
87   extern void     dremove(char *name);
88   extern int      vardefined(char *name);
89 < extern char     *setcontext(char *ctx);
89 > extern char     *calcontext(char *ctx);
90   extern char     *pushcontext(char *ctx);
91   extern char     *popcontext(void);
92   extern char     *qualname(char *nam, int lvl);
# Line 142 | Line 145 | extern void    libupdate(char *fn);
145                                          /* defined in calprnt.c */
146   extern void     eprint(EPNODE *ep, FILE *fp);
147   extern void     dprint(char *name, FILE *fp);
145                                        /* defined in savestr.c */
146 extern char     *savestr(char *str);
147 extern void     freestr(char *s);
148 extern int      shash(char *s);
149                                        /* defined in ealloc.c */
150 extern char     *emalloc(unsigned int n);
151 extern char     *ecalloc(unsigned int ne, unsigned int es);
152 extern char     *erealloc(char *cp, unsigned int n);
153 extern void     efree(char *cp);
148                                          /* defined by client */
149   extern double   chanvalue(int n);
156
150  
151   #ifdef __cplusplus
152   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines