From ae5d181b854d3ccb373b6bc01b4869e44ff4d87a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 18:37:15 +0200 Subject: Adding upstream version 2.9.0dev.12. Signed-off-by: Daniel Baumann --- WWW/Library/Implementation/HTMLDTD.h | 97 ++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 WWW/Library/Implementation/HTMLDTD.h (limited to 'WWW/Library/Implementation/HTMLDTD.h') 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 +#include + +#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 + +#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 */ -- cgit v1.2.3