struct.h 2.16 KB
Newer Older
dcw's avatar
dcw committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 *                   DATA STRUCTURES
 *                   ==== ==========
 *
 *                       FOR THE
 *                       === ===
 *
 *               DATA DECLARATION BUILDER
 *               ==== =========== =======
 *
 *      This module provides the internal structures needed
 *      for the data declaration builder.  It is itself the
 *      sort of output generated by the program.
 */


dcw's avatar
dcw committed
17
18
19
20
21
22
23
24
25
26
27
28
29
30
struct declnlist;
typedef struct declnlist *declnlist;

struct shapelist;
typedef struct shapelist *shapelist;

struct paramlist;
typedef struct paramlist *paramlist;

struct printlist;
typedef struct printlist *printlist;

struct printitem;
typedef struct printitem *printitem;
31

32

33
34
35
#define printitem_is_str 0
#define printitem_is_num 1

dcw's avatar
dcw committed
36
struct printitem {
37
38
39
40
41
42
	int	tag;
	int	num;
	char	*str;
};


dcw's avatar
dcw committed
43
struct printlist {
44
45
46
47
48
	printlist	next;
	printitem	item;
};


dcw's avatar
dcw committed
49
struct paramlist {
50
        paramlist next;
dcw's avatar
dcw committed
51
52
53
54
55
        char      *type;
        char      *name;
};


dcw's avatar
dcw committed
56
struct shapelist {
57
        shapelist next;
dcw's avatar
dcw committed
58
        char      *name;
dcw's avatar
dcw committed
59
        paramlist params;
60
	printlist pl;
dcw's avatar
dcw committed
61
62
63
};


dcw's avatar
dcw committed
64
struct declnlist {
65
        declnlist next;
dcw's avatar
dcw committed
66
67
        char      *name;
        shapelist shapes;
dcw's avatar
dcw committed
68
	BOOL	  Defines, TagField, Struct, Union, UseNull, PutLoop;
dcw's avatar
dcw committed
69
70
71
72
73
74
};


#ifdef HASPROTOS
extern declnlist build_declnlist( char * , shapelist , declnlist );
extern void print_declnlist( declnlist );
75
extern shapelist build_shapelist( char * , paramlist , printlist , shapelist );
dcw's avatar
dcw committed
76
extern void print_shapelist( shapelist );
77
extern paramlist build_paramlist( char * , char * , paramlist );
dcw's avatar
dcw committed
78
extern void print_paramlist( paramlist );
79
80
81
82
83
extern printlist build_printlist( printitem , printlist );
extern void print_printlist( printlist );
extern printitem build_printitem_str( char * );
extern printitem build_printitem_num( int );
extern void print_printitem( printitem );
dcw's avatar
dcw committed
84
85
86
87
88
89
90
#else
extern declnlist build_declnlist();
extern void print_declnlist();
extern shapelist build_shapelist();
extern void print_shapelist();
extern paramlist build_paramlist();
extern void print_paramlist();
91
92
93
94
95
extern printlist build_printlist();
extern void print_printlist();
extern printitem build_printitem_str();
extern printitem build_printitem_num();
extern void print_printitem();
dcw's avatar
dcw committed
96
#endif