about summary refs log tree commit diff stats
path: root/src/LYStructs.h
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2001-06-03 21:17:35 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2001-06-03 21:17:35 -0400
commitd1349dd61e0c9248ec9be3edaa37a67952e44300 (patch)
treecc38442efa38ebd0cbb683866bc0ac8caf066a69 /src/LYStructs.h
parent8c68f693cc82e6650afff52fe478c0ccde4bc015 (diff)
downloadlynx-snapshots-d1349dd61e0c9248ec9be3edaa37a67952e44300.tar.gz
snapshot of project "lynx", label v2-8-4dev_21
Diffstat (limited to 'src/LYStructs.h')
-rw-r--r--src/LYStructs.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/LYStructs.h b/src/LYStructs.h
index 90020afd..fd95aee5 100644
--- a/src/LYStructs.h
+++ b/src/LYStructs.h
@@ -80,6 +80,8 @@ typedef struct _VisitedLink {
 extern histstruct history[MAXHIST];
 extern int nhist;
 
+/******************************************************************************/
+
 typedef struct _lynx_list_item_type {
     struct _lynx_list_item_type *next;  /* the next item in the linked list */
     char *name; 			/* a description of the item */
@@ -115,4 +117,51 @@ extern lynx_list_item_type *uploaders;
 extern lynx_list_item_type *externals;
 #endif
 
+/******************************************************************************/
+
+typedef struct
+{
+    CONST char *name;
+    int value;
+}
+Config_Enum;
+
+typedef int (*ParseFunc) PARAMS((char *));
+
+#define ParseUnionMembers \
+	lynx_list_item_type** add_value; \
+	BOOLEAN * set_value; \
+	int *     int_value; \
+	char **   str_value; \
+	ParseFunc fun_value; \
+	long	  def_value
+
+typedef union {
+	ParseUnionMembers;
+} ParseUnion;
+
+#ifdef	PARSE_DEBUG
+#define ParseUnionPtr Config_Type *
+#define ParseUnionOf(tbl) tbl
+#define ParseData ParseUnionMembers
+#define UNION_ADD(v) &v,  0,  0,  0,  0,  0
+#define UNION_SET(v)  0, &v,  0,  0,  0,  0
+#define UNION_INT(v)  0,  0, &v,  0,  0,  0
+#define UNION_STR(v)  0,  0,  0, &v,  0,  0
+#define UNION_ENV(v)  0,  0,  0,  v,  0,  0
+#define UNION_FUN(v)  0,  0,  0,  0,  v,  0
+#define UNION_DEF(v)  0,  0,  0,  0,  0,  v
+#else
+#define ParseUnionPtr ParseUnion *
+#define ParseUnionOf(tbl) (ParseUnionPtr)(&(tbl->value))
+#define ParseData long value
+#define UNION_ADD(v) (long)&(v)
+#define UNION_SET(v) (long)&(v)
+#define UNION_INT(v) (long)&(v)
+#define UNION_STR(v) (long)&(v)
+#define UNION_ENV(v) (long) (v)
+#define UNION_FUN(v) (long) (v)
+#define UNION_DEF(v) (long) (v)
+#endif
+
 #endif /* LYSTRUCTS_H */
ref='#n228'>228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365