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

Comparing ray/src/common/vars.h (file contents):
Revision 2.1 by greg, Tue Dec 12 13:26:35 1995 UTC vs.
Revision 2.5 by schorsch, Fri Jun 6 16:38:47 2003 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1995 Regents of the University of California */
2 <
3 < /* SCCSid "$SunId$ LBL" */
4 <
1 > /* RCSid $Id$ */
2   /*
3   *  Header for programs that load variable files.
4   */
5 + #ifndef _RAD_VARS_H_
6 + #define _RAD_VARS_H_
7 + #ifdef __cplusplus
8 + extern "C" {
9 + #endif
10  
11 + #include "copyright.h"
12 +
13   typedef struct {
14          char    *name;          /* variable name */
15          short   nick;           /* # characters required for nickname */
16          short   nass;           /* # assignments made */
17          char    *value;         /* assigned value(s) */
18 <        int     (*fixval)();    /* assignment checking function */
18 >        void    (*fixval)();    /* assignment checking function */
19   } VARIABLE;             /* a variable-value pair */
20  
21   /**** The following variables should be declared by calling program ****/
# Line 26 | Line 30 | extern int     nowarn;         /* global boolean to turn warnings
30  
31   /**** The rest is declared in loadvars.c ****/
32  
29 extern int      onevalue(), catvalues(), boolvalue(),
30                qualvalue(), fltvalue(), intvalue();
31
33   extern VARIABLE *matchvar();
34   extern char     *nvalue();
35  
# Line 38 | Line 39 | extern char    *nvalue();
39   #define vdef(vc)        (vv[vc].nass)
40   #define vval(vc)        (vv[vc].value)
41   #define vint(vc)        atoi(vval(vc))
42 + #define vflt(vc)        atof(vval(vc))
43   #define vlet(vc)        UPPER(vval(vc)[0])
44   #define vscale          vlet
45   #define vbool(vc)       (vlet(vc)=='T')
# Line 45 | Line 47 | extern char    *nvalue();
47   #define HIGH            'H'
48   #define MEDIUM          'M'
49   #define LOW             'L'
50 +
51 +
52 + extern void     loadvars(char *rfname);
53 + extern int      setvariable(char *ass, VARIABLE *(*mv)());
54 + extern VARIABLE *matchvar(char *nam);
55 + extern char     *nvalue(int vn, int n);
56 + extern void     checkvalues(void);
57 + extern void     onevalue(VARIABLE *vp);
58 + extern void     catvalues(VARIABLE *vp);
59 + extern int      badmatch(char *tv, char *cv);
60 + extern void     boolvalue(VARIABLE *vp);
61 + extern void     qualvalue(VARIABLE *vp);
62 + extern void     intvalue(VARIABLE *vp);
63 + extern void     fltvalue(VARIABLE *vp);
64 + extern void     printvars(FILE *fp);
65 +
66 +
67 + #ifdef __cplusplus
68 + }
69 + #endif
70 + #endif /* _RAD_VARS_H_ */
71 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines