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>2005-01-02 23:49:58 -0500
committerThomas E. Dickey <dickey@invisible-island.net>2005-01-02 23:49:58 -0500
commit1fc1d8afcb5b9947e2b9665514dbfd1e86c0bf3f (patch)
treea83fd699321c8545516d56abcda6c9718fd1f4fb /src/LYStructs.h
parentbed9a2c79bfdde6e4ec89d9d02a5d6e88ae12f79 (diff)
downloadlynx-snapshots-1fc1d8afcb5b9947e2b9665514dbfd1e86c0bf3f.tar.gz
snapshot of project "lynx", label v2-8-6dev_10
Diffstat (limited to 'src/LYStructs.h')
-rw-r--r--src/LYStructs.h178
1 files changed, 90 insertions, 88 deletions
diff --git a/src/LYStructs.h b/src/LYStructs.h
index 361fc8af..4d604736 100644
--- a/src/LYStructs.h
+++ b/src/LYStructs.h
@@ -5,100 +5,99 @@
 #include <HTAnchor.h>
 #endif /* HTANCHOR_H */
 
-typedef struct {
-    char *hl_text;
-    short hl_x;
-} HiliteInfo;
-
-typedef struct {
-    HiliteInfo *hl_info;
-    HiliteInfo hl_base;
-    short hl_len;		/* number of strings in this struct */
-} HiliteList;
-
-typedef struct {
-    char *lname;
-    char *target;
-    char *l_hightext;
-    char *l_hightext2;
-    int l_hightext2_offset;
-    BOOL inUnderline;		/* TRUE when this link is in underlined context. */
-    int lx;
-    int ly;
-    int type;			/* Type of link, Forms, WWW, etc. */
-    int anchor_number;		/* The anchor number within the HText structure.  */
-    int anchor_line_num;	/* The anchor line number in the HText structure. */
-    HiliteList list;
-    struct _FormInfo *l_form;	/* Pointer to form info. */
-} LinkInfo;
-extern LinkInfo links[MAXLINKS];
-extern int nlinks;
-
-typedef struct {
-    /* FIXME: see DocAddress */
-    char *title;
-    char *address;
-    bstring *post_data;
-    char *post_content_type;
-    char *bookmark;
-    BOOL isHEAD;
-    BOOL safe;
-
-    int link;
-    int line;
-    BOOL internal_link;		/* whether doc was reached via an internal
+#ifdef __cplusplus
+extern "C" {
+#endif
+    typedef struct {
+	char *hl_text;
+	short hl_x;
+    } HiliteInfo;
+
+    typedef struct {
+	HiliteInfo *hl_info;
+	HiliteInfo hl_base;
+	short hl_len;		/* number of strings in this struct */
+    } HiliteList;
+
+    typedef struct {
+	char *lname;
+	char *target;
+	char *l_hightext;
+	char *l_hightext2;
+	int l_hightext2_offset;
+	BOOL inUnderline;	/* TRUE when this link is in underlined context. */
+	int lx;
+	int ly;
+	int type;		/* Type of link, Forms, WWW, etc. */
+	int anchor_number;	/* The anchor number within the HText structure.  */
+	int anchor_line_num;	/* The anchor line number in the HText structure. */
+	HiliteList list;
+	struct _FormInfo *l_form;	/* Pointer to form info. */
+    } LinkInfo;
+    extern LinkInfo links[MAXLINKS];
+    extern int nlinks;
+
+    typedef struct {
+	/* FIXME: see DocAddress */
+	char *title;
+	char *address;
+	bstring *post_data;
+	char *post_content_type;
+	char *bookmark;
+	BOOL isHEAD;
+	BOOL safe;
+
+	int link;
+	int line;
+	BOOL internal_link;	/* whether doc was reached via an internal
 				   (fragment) link. - kw */
 #ifdef USE_COLOR_STYLE
-    char *style;
+	char *style;
 #endif
-} DocInfo;
-
-#ifndef HTFORMS_H
-#include <HTForms.h>
-#endif /* HTFORMS_H */
+    } DocInfo;
 
-typedef struct {
-    DocInfo hdoc;
-    int intern_seq_start;	/* indicates which element on the history
+    typedef struct {
+	DocInfo hdoc;
+	int intern_seq_start;	/* indicates which element on the history
 				   is the start of this sequence of
 				   "internal links", otherwise -1 */
-} HistInfo;
+    } HistInfo;
 
 #define HDOC(n) history[n].hdoc
 
-extern int Visited_Links_As;
+    extern int Visited_Links_As;
 
 #define VISITED_LINKS_AS_FIRST_V 0
 #define VISITED_LINKS_AS_TREE    1
 #define VISITED_LINKS_AS_LATEST  2
 #define VISITED_LINKS_REVERSE    4
 
-typedef struct _VisitedLink {
-    char *title;
-    char *address;
-    int level;
-    struct _VisitedLink *next_tree;
-    struct _VisitedLink *prev_latest;
-    struct _VisitedLink *next_latest;
-    struct _VisitedLink *prev_first;
-} VisitedLink;
+    typedef struct _VisitedLink {
+	char *title;
+	char *address;
+	int level;
+	struct _VisitedLink *next_tree;
+	struct _VisitedLink *prev_latest;
+	struct _VisitedLink *next_latest;
+	struct _VisitedLink *prev_first;
+    } VisitedLink;
 
-extern HistInfo *history;
-extern int nhist;
-extern int size_history;
+    extern HistInfo *history;
+    extern int nhist;
+    extern int size_history;
 
 /******************************************************************************/
 
-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 */
-    char *command;		/* the command to execute */
-    int always_enabled;		/* a constant to tell whether or
+    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 */
+	char *command;		/* the command to execute */
+	int always_enabled;	/* a constant to tell whether or
 				 * not to disable the printer
 				 * when the no_print option is on
 				 */
-    /* HTML lists: */
-    BOOL override_primary_action;	/* whether primary action will be
+	/* HTML lists: */
+	BOOL override_primary_action;	/* whether primary action will be
 					 * overridden by this - e.g. this
 					 * allows invoking user's MUA when
 					 * mailto:  link is activated using
@@ -106,33 +105,33 @@ typedef struct _lynx_list_item_type {
 					 * field is only examined by code that
 					 * handles EXTERNAL command.
 					 */
-    /* PRINTER lists: */
-    int pagelen;		/* an integer to store the printer's
+	/* PRINTER lists: */
+	int pagelen;		/* an integer to store the printer's
 				 * page length
 				 */
-} lynx_list_item_type;
+    } lynx_list_item_type;
 
-extern lynx_list_item_type *printers;
+    extern lynx_list_item_type *printers;
 
 /* for download commands */
-extern lynx_list_item_type *downloaders;
+    extern lynx_list_item_type *downloaders;
 
 /* for upload commands */
-extern lynx_list_item_type *uploaders;
+    extern lynx_list_item_type *uploaders;
 
 #ifdef USE_EXTERNALS
 /* for external commands */
-extern lynx_list_item_type *externals;
+    extern lynx_list_item_type *externals;
 #endif
 
 /******************************************************************************/
 
-typedef struct {
-    const char *name;
-    int value;
-} Config_Enum;
+    typedef struct {
+	const char *name;
+	int value;
+    } Config_Enum;
 
-typedef int (*ParseFunc) (char *);
+    typedef int (*ParseFunc) (char *);
 
 #define ParseUnionMembers \
 	lynx_list_item_type** add_value; \
@@ -142,9 +141,9 @@ typedef int (*ParseFunc) (char *);
 	ParseFunc fun_value; \
 	long	  def_value
 
-typedef union {
-    ParseUnionMembers;
-} ParseUnion;
+    typedef union {
+	ParseUnionMembers;
+    } ParseUnion;
 
 #ifdef	PARSE_DEBUG
 #define ParseUnionPtr Config_Type *
@@ -170,4 +169,7 @@ typedef union {
 #define UNION_DEF(v) (long) (v)
 #endif
 
-#endif /* LYSTRUCTS_H */
+#ifdef __cplusplus
+}
+#endif
+#endif				/* LYSTRUCTS_H */