ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/trans.h
Revision: 2.2
Committed: Sat Feb 22 02:07:23 2003 UTC (21 years, 7 months ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad3R5
Changes since 2.1: +1 -5 lines
Log Message:
Changes and check-in for 3.5 release
Includes new source files and modifications not recorded for many years
See ray/doc/notes/ReleaseNotes for notes between 3.1 and 3.5 release

File Contents

# User Rev Content
1 greg 2.2 /* RCSid: $Id$ */
2 greg 1.1 /*
3     * Translator definitions
4     *
5     * Greg Ward
6     */
7    
8     #define MAXSTR 128 /* maximum input string length */
9    
10     #define VOIDID "void" /* null modifier */
11    
12     /* qualifier list */
13     typedef struct {
14     int nquals; /* number of qualifiers */
15     char **qual; /* qualifier array */
16     } QLIST;
17     /* identifier */
18     typedef struct {
19     char *name; /* string, NULL if number */
20     int number;
21     } ID;
22     /* identifier list */
23     typedef struct {
24     int nids; /* number of ids */
25     ID *id; /* id array */
26     } IDLIST;
27     /* identifier range */
28     typedef struct {
29     char *nam; /* string, NULL if range */
30     int min, max; /* accepted range */
31     } IDMATCH;
32     /* mapping rule */
33     typedef struct rule {
34     char *mnam; /* material name */
35     long qflg; /* qualifier condition flags */
36     struct rule *next; /* next rule in mapping */
37     /* followed by the IDMATCH array */
38     } RULEHD;
39     /* useful macros */
40     #define doneid(idp) if ((idp)->name != NULL) freestr((idp)->name)
41     #define FL(qn) (1L<<(qn))
42     #define rulsiz(nq) (sizeof(RULEHD)+(nq)*sizeof(IDMATCH))
43     #define idm(rp) ((IDMATCH *)((rp)+1))
44    
45     char *savestr();
46     RULEHD *getmapping();