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.2 by greg, Fri Jan 5 14:42:13 1996 UTC vs.
Revision 2.10 by greg, Sat Jun 10 15:49:55 2023 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 < typedef struct {
12 <        char    *name;          /* variable name */
11 > typedef struct variable_s {
12 >        const char      *name;  /* variable name */
13          short   nick;           /* # characters required for nickname */
14          short   nass;           /* # assignments made */
15          char    *value;         /* assigned value(s) */
16 <        int     (*fixval)();    /* assignment checking function */
16 >        void    (*fixval)(struct variable_s *); /* assignment checking function */
17   } VARIABLE;             /* a variable-value pair */
18  
19   /**** The following variables should be declared by calling program ****/
# Line 26 | Line 28 | extern int     nowarn;         /* global boolean to turn warnings
28  
29   /**** The rest is declared in loadvars.c ****/
30  
29 extern int      onevalue(), catvalues(), boolvalue(),
30                qualvalue(), fltvalue(), intvalue();
31
32 extern VARIABLE *matchvar();
33 extern char     *nvalue();
34
31   #define UPPER(c)        ((c)&~0x20)     /* ASCII trick */
32  
33   #define vnam(vc)        (vv[vc].name)
# Line 46 | Line 42 | extern char    *nvalue();
42   #define HIGH            'H'
43   #define MEDIUM          'M'
44   #define LOW             'L'
45 +
46 +
47 + extern void     loadvars(const char *rfname);
48 + extern int      setvariable(const char *ass, VARIABLE *(*mv)(const char*));
49 + extern VARIABLE *matchvar(const char *nam);
50 + extern char     *nvalue(int vn, int n);
51 + extern void     checkvalues(void);
52 + extern void     onevalue(VARIABLE *vp);
53 + extern void     catvalues(VARIABLE *vp);
54 + extern int      badmatch(char *tv, char *cv);
55 + extern void     boolvalue(VARIABLE *vp);
56 + extern void     qualvalue(VARIABLE *vp);
57 + extern void     strvalue(VARIABLE *vp);
58 + extern void     intvalue(VARIABLE *vp);
59 + extern void     fltvalue(VARIABLE *vp);
60 + extern void     printvars(FILE *fp);
61 +
62 + #ifdef __cplusplus
63 + }
64 + #endif
65 + #endif /* _RAD_VARS_H_ */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines