diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2001-06-03 21:17:35 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2001-06-03 21:17:35 -0400 |
commit | d1349dd61e0c9248ec9be3edaa37a67952e44300 (patch) | |
tree | cc38442efa38ebd0cbb683866bc0ac8caf066a69 /src/LYStructs.h | |
parent | 8c68f693cc82e6650afff52fe478c0ccde4bc015 (diff) | |
download | lynx-snapshots-d1349dd61e0c9248ec9be3edaa37a67952e44300.tar.gz |
snapshot of project "lynx", label v2-8-4dev_21
Diffstat (limited to 'src/LYStructs.h')
-rw-r--r-- | src/LYStructs.h | 49 |
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 */ |