summaryrefslogtreecommitdiffstats
path: root/src/LYPrettySrc.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:37:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:37:15 +0000
commitae5d181b854d3ccb373b6bc01b4869e44ff4d87a (patch)
tree91f59efb48c56a84cc798e012fccb667b63d3fee /src/LYPrettySrc.h
parentInitial commit. (diff)
downloadlynx-upstream.tar.xz
lynx-upstream.zip
Adding upstream version 2.9.0dev.12.upstream/2.9.0dev.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/LYPrettySrc.h92
1 files changed, 92 insertions, 0 deletions
diff --git a/src/LYPrettySrc.h b/src/LYPrettySrc.h
new file mode 100644
index 0000000..aa59063
--- /dev/null
+++ b/src/LYPrettySrc.h
@@ -0,0 +1,92 @@
+/*
+ * $LynxId: LYPrettySrc.h,v 1.13 2020/01/21 21:38:33 tom Exp $
+ */
+#ifndef LYPrettySrc_H
+#define LYPrettySrc_H
+
+#ifdef USE_PRETTYSRC
+
+#include <HTMLDTD.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ extern BOOL psrc_convert_string;
+
+ /*whether HTML_put_string should convert string passed with
+ TRANSLATE_AND_UNESCAPE_TO_STD */
+ extern BOOL psrc_view;
+ extern BOOLEAN LYpsrc;
+
+/*
+ * This is used for tracking down whether the SGML engine was initialized
+ * ==TRUE if yes. It's value is meaningful if psrc_view = TRUE
+ */
+ extern BOOL sgml_in_psrc_was_initialized;
+
+ extern BOOL psrc_nested_call; /* this is used when distinguishing whether
+
+ the current call is nested or not in HTML.c HTML_{start,end}_element.
+ It ==FALSE if psrc_view==FALSE || sgml_in_psrc_was_initialized==TRUE */
+
+ extern BOOL psrc_first_tag; /* this is also used in HTML.c to trigger the
+
+ 1st tag to perform special.
+ */
+
+ extern BOOL mark_htext_as_source;
+
+/* here is a list of lexeme codes. */
+ typedef enum {
+ HTL_comm = 0,
+ HTL_tag,
+ HTL_attrib,
+ HTL_attrval,
+ HTL_abracket,
+ HTL_entity,
+ HTL_href,
+ HTL_entire,
+ HTL_badseq,
+ HTL_badtag,
+ HTL_badattr,
+ HTL_sgmlspecial,
+ HTL_num_lexemes
+ } HTlexeme;
+
+ typedef struct _HT_tagspec {
+ struct _HT_tagspec *next; /* 0 at the last */
+#ifdef USE_COLOR_STYLE
+ int style; /* precalculated value of the style */
+ char *class_name;
+#endif
+ /* these will be passed to HTML_start_element */
+ HTMLElement element;
+ BOOL *present;
+ char **value;
+
+ BOOL start; /* if true, then this starts element, otherwise - ends */
+ } HT_tagspec;
+
+ extern char *HTL_tagspecs[HTL_num_lexemes];
+ extern HT_tagspec *lexeme_start[HTL_num_lexemes];
+ extern HT_tagspec *lexeme_end[HTL_num_lexemes];
+
+ extern int html_src_parse_tagspec(char *ts, HTlexeme lexeme,
+ int checkonly, int isstart);
+ extern void HTMLSRC_init_caches(int dont_exit);
+ extern void html_src_clean_item(HTlexeme l);
+ extern void html_src_clean_data(void);
+ extern void html_src_on_lynxcfg_reload(void);
+
+/* these 2 vars tell what kind of transform should be applied to tag names
+ and attribute names. 0 - lowercase, 1 - as is, 2 uppercase. */
+ extern int tagname_transform;
+ extern int attrname_transform;
+
+ extern BOOLEAN psrcview_no_anchor_numbering;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ifdef USE_PRETTYSRC */
+#endif /* LYPrettySrc_H */