📄 htmldtd.h
字号:
/* 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>/*** 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))/*Element Numbers *//* Must Match all tables by element! These include tables in HTMLDTD.c and code in HTML.c. */typedef enum { HTML_A, HTML_ABBREV, HTML_ACRONYM, HTML_ADDRESS, HTML_APPLET, HTML_AREA, HTML_AU, HTML_AUTHOR, HTML_B, HTML_BANNER, HTML_BASE, HTML_BASEFONT, HTML_BDO, HTML_BGSOUND, HTML_BIG, HTML_BLINK, HTML_BLOCKQUOTE, HTML_BODY, HTML_BODYTEXT, HTML_BQ, HTML_BR, HTML_BUTTON, HTML_CAPTION, HTML_CENTER, HTML_CITE, HTML_CODE, HTML_COL, HTML_COLGROUP, HTML_COMMENT, HTML_CREDIT, HTML_DD, HTML_DEL, HTML_DFN, HTML_DIR, HTML_DIV, HTML_DL, HTML_DLC, HTML_DT, HTML_EM, HTML_EMBED, HTML_FIELDSET, HTML_FIG, HTML_FN, HTML_FONT, HTML_FORM, HTML_FRAME, HTML_FRAMESET, HTML_H1, HTML_H2, HTML_H3, HTML_H4, HTML_H5, HTML_H6, HTML_HEAD, HTML_HR, HTML_HTML, HTML_HY, HTML_I, HTML_IFRAME, HTML_IMG, HTML_INPUT, HTML_INS, HTML_ISINDEX, HTML_KBD, HTML_KEYGEN, HTML_LABEL, HTML_LEGEND, HTML_LH, HTML_LI, HTML_LINK, HTML_LISTING, HTML_MAP, HTML_MARQUEE, HTML_MATH, HTML_MENU, HTML_META, HTML_NEXTID, HTML_NOFRAMES, HTML_NOTE, HTML_OBJECT, HTML_OL, HTML_OPTION, HTML_OVERLAY, HTML_P, HTML_PARAM, HTML_PLAINTEXT, HTML_PRE, HTML_Q, HTML_S, HTML_SAMP, HTML_SCRIPT, HTML_SELECT, HTML_SHY, HTML_SMALL, HTML_SPAN, HTML_SPOT, HTML_STRIKE, HTML_STRONG, HTML_STYLE, HTML_SUB, HTML_SUP, HTML_TAB, HTML_TABLE, HTML_TBODY, HTML_TD, HTML_TEXTAREA, HTML_TEXTFLOW, HTML_TFOOT, HTML_TH, HTML_THEAD, HTML_TITLE, HTML_TR, HTML_TT, HTML_U, HTML_UL, HTML_VAR, HTML_WBR, HTML_XMP, HTML_ALT_OBJECT } HTMLElement;/* Notes: HTML.c uses a different extension of the HTML_ELEMENTS space privately, see HTNestedList.h. *//* Don't replace HTML_ELEMENTS with TABLESIZE(mumble_dtd.tags). *//* Keep the following defines in synch with the above enum! *//* HTML_ELEMENTS: number of elements visible to Lynx code in general, alphabetic (ASCII) order. */#define HTML_ELEMENTS 118/* HTML_ALL_ELEMENTS: number of elements visible to SGML parser, additional variant(s) at end. */#define HTML_ALL_ELEMENTS 119/*Attribute numbers *//* Identifier is HTML_<element>_<attribute>. These must match the tables in HTML.c! */#define HTML_A_ACCESSKEY 0#define HTML_A_CHARSET 1 /* i18n draft, added tentatively - KW */#define HTML_A_CLASS 2#define HTML_A_CLEAR 3#define HTML_A_COORDS 4#define HTML_A_DIR 5#define HTML_A_HREF 6#define HTML_A_ID 7#define HTML_A_ISMAP 8#define HTML_A_LANG 9#define HTML_A_MD 10#define HTML_A_NAME 11#define HTML_A_NOTAB 12#define HTML_A_ONCLICK 13#define HTML_A_ONMOUSEOUT 14#define HTML_A_ONMOUSEOVER 15#define HTML_A_REL 16#define HTML_A_REV 17#define HTML_A_SHAPE 18#define HTML_A_STYLE 19#define HTML_A_TABINDEX 20#define HTML_A_TARGET 21#define HTML_A_TITLE 22#define HTML_A_TYPE 23#define HTML_A_URN 24#define HTML_A_ATTRIBUTES 25#define HTML_ADDRESS_CLASS 0#define HTML_ADDRESS_CLEAR 1#define HTML_ADDRESS_DIR 2#define HTML_ADDRESS_ID 3#define HTML_ADDRESS_LANG 4#define HTML_ADDRESS_NOWRAP 5#define HTML_ADDRESS_STYLE 6#define HTML_ADDRESS_TITLE 7#define HTML_ADDRESS_ATTRIBUTES 8#define HTML_APPLET_ALIGN 0#define HTML_APPLET_ALT 1#define HTML_APPLET_CLASS 2#define HTML_APPLET_CLEAR 3#define HTML_APPLET_CODE 4#define HTML_APPLET_CODEBASE 5#define HTML_APPLET_DIR 6#define HTML_APPLET_DOWNLOAD 7#define HTML_APPLET_HEIGHT 8#define HTML_APPLET_HSPACE 9#define HTML_APPLET_ID 10#define HTML_APPLET_LANG 11#define HTML_APPLET_NAME 12#define HTML_APPLET_STYLE 13#define HTML_APPLET_TITLE 14#define HTML_APPLET_VSPACE 15#define HTML_APPLET_WIDTH 16#define HTML_APPLET_ATTRIBUTES 17#define HTML_AREA_ALT 0#define HTML_AREA_CLASS 1#define HTML_AREA_CLEAR 2#define HTML_AREA_COORDS 3#define HTML_AREA_DIR 4#define HTML_AREA_HREF 5#define HTML_AREA_ID 6#define HTML_AREA_LANG 7#define HTML_AREA_NOHREF 8#define HTML_AREA_NONOTAB 9#define HTML_AREA_ONCLICK 10#define HTML_AREA_ONMOUSEOUT 11#define HTML_AREA_ONMOUSEOVER 12#define HTML_AREA_SHAPE 13#define HTML_AREA_STYLE 14#define HTML_AREA_TABINDEX 15#define HTML_AREA_TARGET 16#define HTML_AREA_TITLE 17#define HTML_AREA_ATTRIBUTES 18#define HTML_BASE_HREF 0#define HTML_BASE_TARGET 1#define HTML_BASE_TITLE 2#define HTML_BASE_ATTRIBUTES 3#define HTML_BGSOUND_CLASS 0#define HTML_BGSOUND_CLEAR 1#define HTML_BGSOUND_DIR 2#define HTML_BGSOUND_ID 3#define HTML_BGSOUND_LANG 4#define HTML_BGSOUND_LOOP 5#define HTML_BGSOUND_SRC 6#define HTML_BGSOUND_STYLE 7#define HTML_BGSOUND_TITLE 8#define HTML_BGSOUND_ATTRIBUTES 9#define HTML_BODY_ALINK 0#define HTML_BODY_BACKGROUND 1#define HTML_BODY_BGCOLOR 2#define HTML_BODY_CLASS 3#define HTML_BODY_CLEAR 4#define HTML_BODY_DIR 5#define HTML_BODY_ID 6#define HTML_BODY_LANG 7#define HTML_BODY_LINK 8#define HTML_BODY_ONLOAD 9#define HTML_BODY_ONUNLOAD 10#define HTML_BODY_STYLE 11#define HTML_BODY_TEXT 12#define HTML_BODY_TITLE 13#define HTML_BODY_VLINK 14#define HTML_BODY_ATTRIBUTES 15#define HTML_BODYTEXT_CLASS 0#define HTML_BODYTEXT_CLEAR 1#define HTML_BODYTEXT_DATA 2#define HTML_BODYTEXT_DIR 3#define HTML_BODYTEXT_ID 4#define HTML_BODYTEXT_LANG 5#define HTML_BODYTEXT_NAME 6#define HTML_BODYTEXT_OBJECT 7#define HTML_BODYTEXT_REF 8#define HTML_BODYTEXT_STYLE 9#define HTML_BODYTEXT_TITLE 10#define HTML_BODYTEXT_TYPE 11#define HTML_BODYTEXT_VALUE 12#define HTML_BODYTEXT_VALUETYPE 13#define HTML_BODYTEXT_ATTRIBUTES 14#define HTML_BQ_CITE 0#define HTML_BQ_CLASS 1#define HTML_BQ_CLEAR 2#define HTML_BQ_DIR 3#define HTML_BQ_ID 4#define HTML_BQ_LANG 5#define HTML_BQ_NOWRAP 6#define HTML_BQ_STYLE 7#define HTML_BQ_TITLE 8#define HTML_BQ_ATTRIBUTES 9#define HTML_BUTTON_CLASS 0#define HTML_BUTTON_CLEAR 1#define HTML_BUTTON_DIR 2#define HTML_BUTTON_DISABLED 3#define HTML_BUTTON_ID 4#define HTML_BUTTON_LANG 5#define HTML_BUTTON_NAME 6#define HTML_BUTTON_ONFOCUS 7#define HTML_BUTTON_ONBLUR 8#define HTML_BUTTON_STYLE 9#define HTML_BUTTON_TABINDEX 10#define HTML_BUTTON_TITLE 11#define HTML_BUTTON_TYPE 12#define HTML_BUTTON_VALUE 13#define HTML_BUTTON_ATTRIBUTES 14#define HTML_CAPTION_ACCESSKEY 0#define HTML_CAPTION_ALIGN 1#define HTML_CAPTION_CLASS 2#define HTML_CAPTION_CLEAR 3#define HTML_CAPTION_DIR 4#define HTML_CAPTION_ID 5#define HTML_CAPTION_LANG 6#define HTML_CAPTION_STYLE 7#define HTML_CAPTION_TITLE 8#define HTML_CAPTION_ATTRIBUTES 9#define HTML_COL_ALIGN 0#define HTML_COL_CHAR 1#define HTML_COL_CHAROFF 2#define HTML_COL_CLASS 3#define HTML_COL_CLEAR 4#define HTML_COL_DIR 5#define HTML_COL_ID 6#define HTML_COL_LANG 7#define HTML_COL_SPAN 8#define HTML_COL_STYLE 9#define HTML_COL_TITLE 10#define HTML_COL_VALIGN 11#define HTML_COL_WIDTH 12#define HTML_COL_ATTRIBUTES 13#define HTML_CREDIT_CLASS 0#define HTML_CREDIT_CLEAR 1#define HTML_CREDIT_DIR 2#define HTML_CREDIT_ID 3#define HTML_CREDIT_LANG 4#define HTML_CREDIT_STYLE 5#define HTML_CREDIT_TITLE 6#define HTML_CREDIT_ATTRIBUTES 7#define HTML_DIV_ALIGN 0#define HTML_DIV_CLASS 1#define HTML_DIV_CLEAR 2#define HTML_DIV_DIR 3#define HTML_DIV_ID 4#define HTML_DIV_LANG 5#define HTML_DIV_STYLE 6#define HTML_DIV_TITLE 7#define HTML_DIV_ATTRIBUTES 8#define HTML_DL_CLASS 0#define HTML_DL_CLEAR 1#define HTML_DL_COMPACT 2#define HTML_DL_DIR 3#define HTML_DL_ID 4#define HTML_DL_LANG 5#define HTML_DL_STYLE 6#define HTML_DL_TITLE 7#define HTML_DL_ATTRIBUTES 8#define HTML_EMBED_ALIGN 0#define HTML_EMBED_ALT 1#define HTML_EMBED_BORDER 2#define HTML_EMBED_CLASS 3#define HTML_EMBED_CLEAR 4#define HTML_EMBED_DIR 5#define HTML_EMBED_HEIGHT 6#define HTML_EMBED_ID 7#define HTML_EMBED_IMAGEMAP 8#define HTML_EMBED_ISMAP 9#define HTML_EMBED_LANG 10#define HTML_EMBED_MD 11#define HTML_EMBED_NAME 12#define HTML_EMBED_NOFLOW 13#define HTML_EMBED_PARAMS 14#define HTML_EMBED_SRC 15#define HTML_EMBED_STYLE 16#define HTML_EMBED_TITLE 17#define HTML_EMBED_UNITS 18#define HTML_EMBED_USEMAP 19#define HTML_EMBED_WIDTH 20#define HTML_EMBED_ATTRIBUTES 21#define HTML_FIELDSET_CLASS 0#define HTML_FIELDSET_CLEAR 1#define HTML_FIELDSET_DIR 2#define HTML_FIELDSET_ID 3#define HTML_FIELDSET_LANG 4#define HTML_FIELDSET_STYLE 5#define HTML_FIELDSET_TITLE 6#define HTML_FIELDSET_ATTRIBUTES 7#define HTML_FIG_ALIGN 0#define HTML_FIG_BORDER 1#define HTML_FIG_CLASS 2#define HTML_FIG_CLEAR 3#define HTML_FIG_DIR 4#define HTML_FIG_HEIGHT 5#define HTML_FIG_ID 6#define HTML_FIG_IMAGEMAP 7#define HTML_FIG_ISOBJECT 8#define HTML_FIG_LANG 9#define HTML_FIG_MD 10#define HTML_FIG_NOFLOW 11#define HTML_FIG_SRC 12#define HTML_FIG_STYLE 13#define HTML_FIG_TITLE 14#define HTML_FIG_UNITS 15#define HTML_FIG_WIDTH 16#define HTML_FIG_ATTRIBUTES 17#define HTML_FN_CLASS 0#define HTML_FN_CLEAR 1#define HTML_FN_DIR 2#define HTML_FN_ID 3#define HTML_FN_LANG 4#define HTML_FN_STYLE 5#define HTML_FN_TITLE 6#define HTML_FN_ATTRIBUTES 7#define HTML_FONT_CLASS 0#define HTML_FONT_CLEAR 1#define HTML_FONT_COLOR 2#define HTML_FONT_DIR 3#define HTML_FONT_FACE 4#define HTML_FONT_ID 5#define HTML_FONT_LANG 6#define HTML_FONT_SIZE 7#define HTML_FONT_STYLE 8#define HTML_FONT_ATTRIBUTES 9#define HTML_FORM_ACCEPT_CHARSET 0 /* HTML 4.0 draft - kw */#define HTML_FORM_ACTION 1#define HTML_FORM_CLASS 2#define HTML_FORM_CLEAR 3#define HTML_FORM_DIR 4#define HTML_FORM_ENCTYPE 5#define HTML_FORM_ID 6#define HTML_FORM_LANG 7#define HTML_FORM_METHOD 8#define HTML_FORM_ONSUBMIT 9#define HTML_FORM_SCRIPT 10#define HTML_FORM_STYLE 11#define HTML_FORM_SUBJECT 12#define HTML_FORM_TARGET 13#define HTML_FORM_TITLE 14#define HTML_FORM_ATTRIBUTES 15#define HTML_FRAME_ID 0#define HTML_FRAME_LONGDESC 1#define HTML_FRAME_MARGINHEIGHT 2#define HTML_FRAME_MARGINWIDTH 3#define HTML_FRAME_NAME 4#define HTML_FRAME_NORESIZE 5#define HTML_FRAME_SCROLLING 6#define HTML_FRAME_SRC 7#define HTML_FRAME_ATTRIBUTES 8#define HTML_FRAMESET_COLS 0#define HTML_FRAMESET_ROWS 1#define HTML_FRAMESET_ATTRIBUTES 2#define HTML_GEN_CLASS 0#define HTML_GEN_CLEAR 1#define HTML_GEN_DIR 2#define HTML_GEN_ID 3#define HTML_GEN_LANG 4#define HTML_GEN_STYLE 5#define HTML_GEN_TITLE 6#define HTML_GEN_ATTRIBUTES 7#define HTML_H_ALIGN 0#define HTML_H_CLASS 1#define HTML_H_CLEAR 2#define HTML_H_DINGBAT 3#define HTML_H_DIR 4#define HTML_H_ID 5#define HTML_H_LANG 6#define HTML_H_MD 7#define HTML_H_NOWRAP 8#define HTML_H_SEQNUM 9#define HTML_H_SKIP 10#define HTML_H_SRC 11#define HTML_H_STYLE 12#define HTML_H_TITLE 13#define HTML_H_ATTRIBUTES 14
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -