Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | /* |
2 | * |
||
3 | * |
||
4 | * |
||
5 | */ |
||
6 | |||
7 | int init_tokenizer(char *filename,int); |
||
8 | |||
9 | char *gettoken(void); |
||
10 | void ungettoken(void); |
||
11 | |||
12 | int done_tokenizer(void); |
||
13 | |||
14 | /* |
||
15 | * |
||
16 | * |
||
17 | * |
||
18 | */ |
||
19 | |||
20 | int copystring(char **dstptr, char *src); |
||
21 | |||
22 | #define MAXVARIABLES 64 |
||
23 | |||
24 | #define NOTYPEVAR 0 |
||
25 | #define PRINTEDVAR 1 |
||
26 | |||
27 | #define BOOLVAR 2 |
||
28 | #define TRISTATEVAR 3 |
||
29 | #define CHOICEVAR 4 |
||
30 | #define RANGEVAR 5 |
||
31 | |||
32 | /* FLAG_M (if this variable change value some menu must be modified) */ |
||
33 | #define FLAG_M 0x01 |
||
34 | |||
35 | #define MAXFILETABLE 16 |
||
36 | extern char *filetable[]; |
||
37 | extern int maxfileindex; |
||
38 | |||
39 | #define NOFILEINDEX -1 |
||
40 | |||
41 | struct variable { |
||
42 | int fileindex; |
||
43 | int type; |
||
44 | char *name; |
||
45 | char *value; |
||
46 | int flags; |
||
47 | }; |
||
48 | extern struct variable vartable[]; |
||
49 | |||
50 | struct choice { |
||
51 | struct choice *next; |
||
52 | char *text; |
||
53 | struct variable *var; |
||
54 | }; |
||
55 | |||
56 | struct menuentry; |
||
57 | |||
58 | struct _case { |
||
59 | struct _case *next; |
||
60 | char *value; |
||
61 | struct menuentry *list; |
||
62 | }; |
||
63 | |||
64 | #define BOOLENTRY 1 |
||
65 | #define SUBMENUENTRY 2 |
||
66 | #define TRISTATEENTRY 3 |
||
67 | #define CHOICEENTRY 4 |
||
68 | #define CASEENTRY 5 |
||
69 | #define RANGEENTRY 6 |
||
70 | #define SEPARATORENTRY 7 |
||
71 | |||
72 | struct menuentry { |
||
73 | int type; |
||
74 | struct menuentry *next; |
||
75 | |||
76 | struct menuentry *n; |
||
77 | struct menuentry *p; |
||
78 | |||
79 | union tagentry { |
||
80 | |||
81 | struct boolentry { |
||
82 | char *text; |
||
83 | struct variable *var; |
||
84 | } bool; |
||
85 | |||
86 | struct rangeentry { |
||
87 | char *text; |
||
88 | int minval,maxval; |
||
89 | struct variable *var; |
||
90 | } range; |
||
91 | |||
92 | struct tristateentry { |
||
93 | char *text; |
||
94 | struct variable *var; |
||
95 | } tristate; |
||
96 | |||
97 | struct choiceentry { |
||
98 | char *text; |
||
99 | int numchoices; |
||
100 | struct choice *act; |
||
101 | struct choice *list; |
||
102 | } choice; |
||
103 | |||
104 | struct submenuentry { |
||
105 | char *text; |
||
106 | char *menuname; |
||
107 | struct menu *menu; |
||
108 | } submenu; |
||
109 | |||
110 | struct caseentry { |
||
111 | struct _case *list; |
||
112 | struct variable *var; |
||
113 | } _case; |
||
114 | |||
115 | } x; |
||
116 | }; |
||
117 | |||
118 | #define MAXMENUS 16 |
||
119 | |||
120 | struct menu { |
||
121 | char *name; |
||
122 | char *title; |
||
123 | struct menuentry *entries; |
||
124 | }; |
||
125 | extern struct menu menutable[]; |
||
126 | |||
127 | extern struct menu *mainmenu; |
||
128 | extern char *caption; |
||
129 | |||
130 | int readconfigin(char *filename); |
||
131 | |||
132 | void dumpvariables(void); |
||
133 | |||
134 | extern int line; |
||
135 | extern int nextvariable; |
||
136 | |||
137 | struct variable *findvar(char *s); |
||
138 | |||
139 | extern long varhelp[]; |
||
140 | extern char helpfilename[]; |
||
141 | int findvarindex(struct variable *var); |
||
142 | |||
143 | /* |
||
144 | * |
||
145 | * |
||
146 | * |
||
147 | */ |
||
148 | |||
149 | int show(void); |
||
150 | |||
151 | /* |
||
152 | * |
||
153 | * |
||
154 | * |
||
155 | */ |
||
156 | |||
157 | int writeconfig(char *srcfilename); |
||
158 | int writeconfigmak(char *srcfilename); |
||
159 | int readconfig(char *filename); |
||
160 | |||
161 |