summaryrefslogtreecommitdiffstats
path: root/WWW/Library/Implementation/HTMLDTD.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 /WWW/Library/Implementation/HTMLDTD.h
parentInitial commit. (diff)
downloadlynx-ae5d181b854d3ccb373b6bc01b4869e44ff4d87a.tar.xz
lynx-ae5d181b854d3ccb373b6bc01b4869e44ff4d87a.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 'WWW/Library/Implementation/HTMLDTD.h')
-rw-r--r--WWW/Library/Implementation/HTMLDTD.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/WWW/Library/Implementation/HTMLDTD.h b/WWW/Library/Implementation/HTMLDTD.h
new file mode 100644
index 0000000..10b0308
--- /dev/null
+++ b/WWW/Library/Implementation/HTMLDTD.h
@@ -0,0 +1,97 @@
+/*
+ * $LynxId: HTMLDTD.h,v 1.32 2008/07/06 17:38:13 tom Exp $
+ *
+ The HTML DTD -- software interface in libwww
+ HTML DTD - SOFTWARE INTERFACE
+
+ SGML purists should excuse the use of the term "DTD" in this file to
+ represent DTD-related information which is not exactly a DTD itself.
+
+ The C modular structure doesn't work very well here, as the dtd is
+ partly in the .h and partly in the .c which are not very independent.
+ Tant pis.
+
+ */
+#ifndef HTMLDTD_H
+#define HTMLDTD_H
+
+#include <SGML.h>
+#include <HTFont.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Valid name chars for tag parsing.
+ */
+#define IsNmStart(c) (isalpha(UCH(c)))
+#define IsNmChar(c) (isalnum(UCH(c)) || \
+ c == '_' || c=='-' || c == '.' || c==':')
+#define ReallyEmptyTagNum(e) ((HTML_dtd.tags[e].contents == SGML_EMPTY) && \
+ !(HTML_dtd.tags[e].flags & Tgf_nreie))
+#define ReallyEmptyTag(t) ((t->contents == SGML_EMPTY) && \
+ !(t->flags & Tgf_nreie))
+
+#include <hdr_HTMLDTD.h>
+
+#ifdef USE_PRETTYSRC
+/* values of HTML attributes' types */
+#define HTMLA_NORMAL 0 /* nothing specific */
+#define HTMLA_ANAME 1 /* anchor name - 'id' or a's 'name' */
+#define HTMLA_HREF 2 /* href */
+#define HTMLA_CLASS 4 /* class name. */
+#define HTMLA_AUXCLASS 8 /* attribute, the value of which also designates
+ a class name */
+#endif
+ extern const SGML_dtd HTML_dtd;
+
+ extern void HTSwitchDTD(int new_flag);
+
+ extern HTTag HTTag_unrecognized;
+ extern HTTag HTTag_mixedObject;
+
+/*
+
+Start anchor element
+
+ It is kinda convenient to have a particular routine for starting an anchor
+ element, as everything else for HTML is simple anyway.
+
+ ON ENTRY
+
+ targetstream points to a structured stream object.
+
+ name and href point to attribute strings or are NULL if the attribute is
+ to be omitted.
+
+ */
+ extern void HTStartAnchor(HTStructured * targetstream, const char *name,
+ const char *href);
+
+ extern void HTStartAnchor5(HTStructured * targetstream, const char *name,
+ const char *href,
+ const char *linktype,
+ int tag_charset);
+
+/*
+
+Start IsIndex element - FM
+
+ It is kinda convenient to have a particular routine for starting an IsIndex
+ element with the prompt and/or href (action) attributes specified.
+
+ ON ENTRY
+
+ targetstream points to a structured stream object.
+
+ prompt and href point to attribute strings or are NULL if the attribute is
+ to be omitted.
+
+ */
+ extern void HTStartIsIndex(HTStructured * targetstream, const char *prompt,
+ const char *href);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* HTMLDTD_H */