Merge pull request #965 from htacg/issue-743-rc
Fixed merge conflict; fixed non-build issue on macOS. RC for testing.
This commit is contained in:
commit
47159bda50
|
@ -84,7 +84,7 @@ struct _TidyAccessImpl
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void TY_(AccessibilityChecks)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(AccessibilityChecks)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
#endif /* __ACCESS_H__ */
|
#endif /* __ACCESS_H__ */
|
||||||
|
|
274
src/attrdict.h
274
src/attrdict.h
|
@ -16,143 +16,143 @@ typedef struct _AttrVersion
|
||||||
uint versions;
|
uint versions;
|
||||||
} AttrVersion;
|
} AttrVersion;
|
||||||
|
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_A)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_A)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_ABBR)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_ABBR)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_ACRONYM)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_ACRONYM)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_ADDRESS)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_ADDRESS)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_APPLET)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_APPLET)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_AREA)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_AREA)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_B)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_B)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_BASE)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BASE)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_BASEFONT)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BASEFONT)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_BDO)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BDO)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_BIG)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BIG)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_BLOCKQUOTE)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BLOCKQUOTE)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_BODY)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BODY)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_BR)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BR)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_BUTTON)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BUTTON)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_CAPTION)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_CAPTION)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_CENTER)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_CENTER)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_CITE)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_CITE)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_CODE)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_CODE)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_COL)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_COL)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_COLGROUP)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_COLGROUP)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_DD)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DD)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_DEL)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DEL)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_DFN)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DFN)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_DIR)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DIR)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_DIV)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DIV)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_DL)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DL)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_DT)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DT)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_EM)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_EM)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_FIELDSET)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FIELDSET)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_FONT)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FONT)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_FORM)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FORM)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_FRAME)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FRAME)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_FRAMESET)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FRAMESET)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_H1)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_H1)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_H2)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_H2)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_H3)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_H3)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_H4)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_H4)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_H5)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_H5)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_H6)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_H6)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_HEAD)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_HEAD)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_HR)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_HR)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_HTML)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_HTML)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_I)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_I)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_IFRAME)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_IFRAME)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_IMG)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_IMG)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_INPUT)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_INPUT)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_INS)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_INS)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_ISINDEX)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_ISINDEX)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_KBD)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_KBD)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_LABEL)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_LABEL)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_LEGEND)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_LEGEND)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_LI)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_LI)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_LINK)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_LINK)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_LISTING)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_LISTING)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_MAP)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_MAP)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_MATHML)[]; /* [i_a]2 */
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_MATHML)[]; /* [i_a]2 */
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_MENU)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_MENU)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_META)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_META)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_NEXTID)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_NEXTID)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_NOFRAMES)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_NOFRAMES)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_NOSCRIPT)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_NOSCRIPT)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_OBJECT)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_OBJECT)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_OL)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_OL)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_OPTGROUP)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_OPTGROUP)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_OPTION)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_OPTION)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_P)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_P)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_PARAM)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_PARAM)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_PICTURE)[]; /* Issue #151 - html5 */
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_PICTURE)[]; /* Issue #151 - html5 */
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_PLAINTEXT)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_PLAINTEXT)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_PRE)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_PRE)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_Q)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_Q)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_RB)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_RB)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_RBC)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_RBC)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_RP)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_RP)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_RT)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_RT)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_RTC)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_RTC)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_RUBY)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_RUBY)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_S)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_S)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_SAMP)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SAMP)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_SCRIPT)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SCRIPT)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_SELECT)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SELECT)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_SMALL)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SMALL)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_SPAN)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SPAN)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_STRIKE)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_STRIKE)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_STRONG)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_STRONG)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_STYLE)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_STYLE)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_SUB)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SUB)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_SUP)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SUP)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_SVG)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SVG)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_TABLE)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TABLE)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_TBODY)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TBODY)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_TD)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TD)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_TEXTAREA)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TEXTAREA)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_TFOOT)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TFOOT)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_TH)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TH)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_THEAD)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_THEAD)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_TITLE)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TITLE)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_TR)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TR)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_TT)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TT)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_U)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_U)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_UL)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_UL)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_VAR)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_VAR)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_XMP)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_XMP)[];
|
||||||
|
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_TRACK)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TRACK)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_SUMMARY)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SUMMARY)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_FIGCAPTION)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FIGCAPTION)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_HGROUP)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_HGROUP)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_FIGURE)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FIGURE)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_ARTICLE)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_ARTICLE)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_ASIDE)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_ASIDE)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_BDI)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BDI)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_NAV)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_NAV)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_SECTION)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SECTION)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_FOOTER)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FOOTER)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_HEADER)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_HEADER)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_DETAILS)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DETAILS)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_DIALOG)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DIALOG)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_COMMAND)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_COMMAND)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_MAIN)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_MAIN)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_MARK)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_MARK)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_OUTPUT)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_OUTPUT)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_MENUITEM)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_MENUITEM)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_METER)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_METER)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_PROGRESS)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_PROGRESS)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_SLOT)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SLOT)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_TEMPLATE)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TEMPLATE)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_TIME)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TIME)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_DATA)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DATA)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_DATALIST)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DATALIST)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_AUDIO)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_AUDIO)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_VIDEO)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_VIDEO)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_CANVAS)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_CANVAS)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_SOURCE)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SOURCE)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_EMBED)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_EMBED)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_KEYGEN)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_KEYGEN)[];
|
||||||
extern const AttrVersion TY_(W3CAttrsFor_WBR)[];
|
TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_WBR)[];
|
||||||
|
|
||||||
#endif /* __ATTRDICT_H__ */
|
#endif /* __ATTRDICT_H__ */
|
||||||
|
|
60
src/attrs.h
60
src/attrs.h
|
@ -79,39 +79,39 @@ typedef struct _TidyAttribImpl TidyAttribImpl;
|
||||||
|
|
||||||
#define XHTML_NAMESPACE "http://www.w3.org/1999/xhtml"
|
#define XHTML_NAMESPACE "http://www.w3.org/1999/xhtml"
|
||||||
|
|
||||||
AttrCheck TY_(CheckUrl);
|
TY_PRIVATE AttrCheck TY_(CheckUrl);
|
||||||
|
|
||||||
/* public method for finding attribute definition by name */
|
/* public method for finding attribute definition by name */
|
||||||
const Attribute* TY_(CheckAttribute)( TidyDocImpl* doc, Node *node, AttVal *attval );
|
TY_PRIVATE const Attribute* TY_(CheckAttribute)( TidyDocImpl* doc, Node *node, AttVal *attval );
|
||||||
|
|
||||||
const Attribute* TY_(FindAttribute)( TidyDocImpl* doc, AttVal *attval );
|
TY_PRIVATE const Attribute* TY_(FindAttribute)( TidyDocImpl* doc, AttVal *attval );
|
||||||
|
|
||||||
AttVal* TY_(GetAttrByName)( Node *node, ctmbstr name );
|
TY_PRIVATE AttVal* TY_(GetAttrByName)( Node *node, ctmbstr name );
|
||||||
|
|
||||||
void TY_(DropAttrByName)( TidyDocImpl* doc, Node *node, ctmbstr name );
|
TY_PRIVATE void TY_(DropAttrByName)( TidyDocImpl* doc, Node *node, ctmbstr name );
|
||||||
|
|
||||||
AttVal* TY_(AddAttribute)( TidyDocImpl* doc,
|
TY_PRIVATE AttVal* TY_(AddAttribute)( TidyDocImpl* doc,
|
||||||
Node *node, ctmbstr name, ctmbstr value );
|
Node *node, ctmbstr name, ctmbstr value );
|
||||||
|
|
||||||
AttVal* TY_(RepairAttrValue)(TidyDocImpl* doc, Node* node, ctmbstr name, ctmbstr value);
|
TY_PRIVATE AttVal* TY_(RepairAttrValue)(TidyDocImpl* doc, Node* node, ctmbstr name, ctmbstr value);
|
||||||
|
|
||||||
/* Add an item to the list of priority attributes to write first. */
|
/* Add an item to the list of priority attributes to write first. */
|
||||||
void TY_(DefinePriorityAttribute)(TidyDocImpl* doc, ctmbstr name);
|
TY_PRIVATE void TY_(DefinePriorityAttribute)(TidyDocImpl* doc, ctmbstr name);
|
||||||
|
|
||||||
/* Start an iterator for priority attributes. */
|
/* Start an iterator for priority attributes. */
|
||||||
TidyIterator TY_(getPriorityAttrList)( TidyDocImpl* doc );
|
TY_PRIVATE TidyIterator TY_(getPriorityAttrList)( TidyDocImpl* doc );
|
||||||
|
|
||||||
/* Get the next priority attribute. */
|
/* Get the next priority attribute. */
|
||||||
ctmbstr TY_(getNextPriorityAttr)( TidyDocImpl* doc, TidyIterator* iter );
|
TY_PRIVATE ctmbstr TY_(getNextPriorityAttr)( TidyDocImpl* doc, TidyIterator* iter );
|
||||||
|
|
||||||
Bool TY_(IsUrl)( TidyDocImpl* doc, ctmbstr attrname );
|
TY_PRIVATE Bool TY_(IsUrl)( TidyDocImpl* doc, ctmbstr attrname );
|
||||||
|
|
||||||
/* Bool IsBool( TidyDocImpl* doc, ctmbstr attrname ); */
|
/* Bool IsBool( TidyDocImpl* doc, ctmbstr attrname ); */
|
||||||
|
|
||||||
Bool TY_(IsScript)( TidyDocImpl* doc, ctmbstr attrname );
|
TY_PRIVATE Bool TY_(IsScript)( TidyDocImpl* doc, ctmbstr attrname );
|
||||||
|
|
||||||
/* may id or name serve as anchor? */
|
/* may id or name serve as anchor? */
|
||||||
Bool TY_(IsAnchorElement)( TidyDocImpl* doc, Node* node );
|
TY_PRIVATE Bool TY_(IsAnchorElement)( TidyDocImpl* doc, Node* node );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
In CSS1, selectors can contain only the characters A-Z, 0-9, and
|
In CSS1, selectors can contain only the characters A-Z, 0-9, and
|
||||||
|
@ -127,41 +127,41 @@ Bool TY_(IsAnchorElement)( TidyDocImpl* doc, Node* node );
|
||||||
|
|
||||||
#508936 - CSS class naming for -clean option
|
#508936 - CSS class naming for -clean option
|
||||||
*/
|
*/
|
||||||
Bool TY_(IsCSS1Selector)( ctmbstr buf );
|
TY_PRIVATE Bool TY_(IsCSS1Selector)( ctmbstr buf );
|
||||||
|
|
||||||
Bool TY_(IsValidHTMLID)(ctmbstr id);
|
TY_PRIVATE Bool TY_(IsValidHTMLID)(ctmbstr id);
|
||||||
Bool TY_(IsValidXMLID)(ctmbstr id);
|
TY_PRIVATE Bool TY_(IsValidXMLID)(ctmbstr id);
|
||||||
|
|
||||||
/* removes anchor for specific node */
|
/* removes anchor for specific node */
|
||||||
void TY_(RemoveAnchorByNode)( TidyDocImpl* doc, ctmbstr name, Node *node );
|
TY_PRIVATE void TY_(RemoveAnchorByNode)( TidyDocImpl* doc, ctmbstr name, Node *node );
|
||||||
|
|
||||||
/* free all anchors */
|
/* free all anchors */
|
||||||
void TY_(FreeAnchors)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(FreeAnchors)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/* public methods for inititializing/freeing attribute dictionary */
|
/* public methods for inititializing/freeing attribute dictionary */
|
||||||
void TY_(InitAttrs)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(InitAttrs)( TidyDocImpl* doc );
|
||||||
void TY_(FreeAttrTable)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(FreeAttrTable)( TidyDocImpl* doc );
|
||||||
|
|
||||||
void TY_(FreeAttrPriorityList)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(FreeAttrPriorityList)( TidyDocImpl* doc );
|
||||||
|
|
||||||
void TY_(AppendToClassAttr)( TidyDocImpl* doc, AttVal *classattr, ctmbstr classname );
|
TY_PRIVATE void TY_(AppendToClassAttr)( TidyDocImpl* doc, AttVal *classattr, ctmbstr classname );
|
||||||
/*
|
/*
|
||||||
the same attribute name can't be used
|
the same attribute name can't be used
|
||||||
more than once in each element
|
more than once in each element
|
||||||
*/
|
*/
|
||||||
void TY_(RepairDuplicateAttributes)( TidyDocImpl* doc, Node* node, Bool isXml );
|
TY_PRIVATE void TY_(RepairDuplicateAttributes)( TidyDocImpl* doc, Node* node, Bool isXml );
|
||||||
void TY_(SortAttributes)(TidyDocImpl* doc, Node* node, TidyAttrSortStrategy strat);
|
TY_PRIVATE void TY_(SortAttributes)(TidyDocImpl* doc, Node* node, TidyAttrSortStrategy strat);
|
||||||
|
|
||||||
Bool TY_(IsBoolAttribute)( AttVal* attval );
|
TY_PRIVATE Bool TY_(IsBoolAttribute)( AttVal* attval );
|
||||||
Bool TY_(attrIsEvent)( AttVal* attval );
|
TY_PRIVATE Bool TY_(attrIsEvent)( AttVal* attval );
|
||||||
|
|
||||||
AttVal* TY_(AttrGetById)( Node* node, TidyAttrId id );
|
TY_PRIVATE AttVal* TY_(AttrGetById)( Node* node, TidyAttrId id );
|
||||||
|
|
||||||
uint TY_(NodeAttributeVersions)( Node* node, TidyAttrId id );
|
TY_PRIVATE uint TY_(NodeAttributeVersions)( Node* node, TidyAttrId id );
|
||||||
|
|
||||||
Bool TY_(AttributeIsProprietary)(Node* node, AttVal* attval);
|
TY_PRIVATE Bool TY_(AttributeIsProprietary)(Node* node, AttVal* attval);
|
||||||
Bool TY_(AttributeIsMismatched)(Node* node, AttVal* attval, TidyDocImpl* doc);
|
TY_PRIVATE Bool TY_(AttributeIsMismatched)(Node* node, AttVal* attval, TidyDocImpl* doc);
|
||||||
|
|
||||||
|
|
||||||
/* 0 == TidyAttr_UNKNOWN */
|
/* 0 == TidyAttr_UNKNOWN */
|
||||||
|
|
|
@ -1,13 +1,19 @@
|
||||||
|
#ifndef __CHARSETS_H__
|
||||||
|
#define __CHARSETS_H__
|
||||||
|
|
||||||
/* charsets.h -- character set information and mappings
|
/* charsets.h -- character set information and mappings
|
||||||
|
|
||||||
(c) 1998-2006 (W3C) MIT, ERCIM, Keio University
|
(c) 1998-2021 (W3C) MIT, ERCIM, Keio University
|
||||||
See tidy.h for the copyright notice.
|
See tidy.h for the copyright notice.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint TY_(GetEncodingIdFromName)(ctmbstr name);
|
TY_PRIVATE uint TY_(GetEncodingIdFromName)(ctmbstr name);
|
||||||
uint TY_(GetEncodingIdFromCodePage)(uint cp);
|
TY_PRIVATE uint TY_(GetEncodingIdFromCodePage)(uint cp);
|
||||||
uint TY_(GetEncodingCodePageFromName)(ctmbstr name);
|
TY_PRIVATE uint TY_(GetEncodingCodePageFromName)(ctmbstr name);
|
||||||
uint TY_(GetEncodingCodePageFromId)(uint id);
|
TY_PRIVATE uint TY_(GetEncodingCodePageFromId)(uint id);
|
||||||
ctmbstr TY_(GetEncodingNameFromId)(uint id);
|
TY_PRIVATE ctmbstr TY_(GetEncodingNameFromId)(uint id);
|
||||||
ctmbstr TY_(GetEncodingNameFromCodePage)(uint cp);
|
TY_PRIVATE ctmbstr TY_(GetEncodingNameFromCodePage)(uint cp);
|
||||||
|
|
||||||
|
#endif /* __CHARSETS_H__ */
|
||||||
|
|
||||||
|
|
53
src/clean.h
53
src/clean.h
|
@ -8,22 +8,22 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void TY_(FixNodeLinks)(Node *node);
|
TY_PRIVATE void TY_(FixNodeLinks)(Node *node);
|
||||||
|
|
||||||
void TY_(FreeStyles)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(FreeStyles)( TidyDocImpl* doc );
|
||||||
|
|
||||||
/* Add class="foo" to node
|
/* Add class="foo" to node
|
||||||
*/
|
*/
|
||||||
void TY_(AddStyleAsClass)( TidyDocImpl* doc, Node *node, ctmbstr stylevalue );
|
TY_PRIVATE void TY_(AddStyleAsClass)( TidyDocImpl* doc, Node *node, ctmbstr stylevalue );
|
||||||
void TY_(AddStyleProperty)(TidyDocImpl* doc, Node *node, ctmbstr property );
|
TY_PRIVATE void TY_(AddStyleProperty)(TidyDocImpl* doc, Node *node, ctmbstr property );
|
||||||
|
|
||||||
void TY_(CleanDocument)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(CleanDocument)( TidyDocImpl* doc );
|
||||||
|
|
||||||
/* simplifies <b><b> ... </b> ...</b> etc. */
|
/* simplifies <b><b> ... </b> ...</b> etc. */
|
||||||
void TY_(NestedEmphasis)( TidyDocImpl* doc, Node* node );
|
TY_PRIVATE void TY_(NestedEmphasis)( TidyDocImpl* doc, Node* node );
|
||||||
|
|
||||||
/* replace i by em and b by strong */
|
/* replace i by em and b by strong */
|
||||||
void TY_(EmFromI)( TidyDocImpl* doc, Node* node );
|
TY_PRIVATE void TY_(EmFromI)( TidyDocImpl* doc, Node* node );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Some people use dir or ul without an li
|
Some people use dir or ul without an li
|
||||||
|
@ -32,17 +32,17 @@ void TY_(EmFromI)( TidyDocImpl* doc, Node* node );
|
||||||
li. This is recursively replaced by an
|
li. This is recursively replaced by an
|
||||||
implicit blockquote.
|
implicit blockquote.
|
||||||
*/
|
*/
|
||||||
void TY_(List2BQ)( TidyDocImpl* doc, Node* node );
|
TY_PRIVATE void TY_(List2BQ)( TidyDocImpl* doc, Node* node );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Replace implicit blockquote by div with an indent
|
Replace implicit blockquote by div with an indent
|
||||||
taking care to reduce nested blockquotes to a single
|
taking care to reduce nested blockquotes to a single
|
||||||
div with the indent set to match the nesting depth
|
div with the indent set to match the nesting depth
|
||||||
*/
|
*/
|
||||||
void TY_(BQ2Div)( TidyDocImpl* doc, Node* node );
|
TY_PRIVATE void TY_(BQ2Div)( TidyDocImpl* doc, Node* node );
|
||||||
|
|
||||||
|
|
||||||
void TY_(DropSections)( TidyDocImpl* doc, Node* node );
|
TY_PRIVATE void TY_(DropSections)( TidyDocImpl* doc, Node* node );
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -52,31 +52,30 @@ void TY_(DropSections)( TidyDocImpl* doc, Node* node );
|
||||||
declare them as new tags, such as o:p which needs to be declared
|
declare them as new tags, such as o:p which needs to be declared
|
||||||
as inline.
|
as inline.
|
||||||
*/
|
*/
|
||||||
void TY_(CleanWord2000)( TidyDocImpl* doc, Node *node);
|
TY_PRIVATE void TY_(CleanWord2000)( TidyDocImpl* doc, Node *node);
|
||||||
|
|
||||||
Bool TY_(IsWord2000)( TidyDocImpl* doc );
|
TY_PRIVATE Bool TY_(IsWord2000)( TidyDocImpl* doc );
|
||||||
|
|
||||||
/* where appropriate move object elements from head to body */
|
/* where appropriate move object elements from head to body */
|
||||||
void TY_(BumpObject)( TidyDocImpl* doc, Node *html );
|
TY_PRIVATE void TY_(BumpObject)( TidyDocImpl* doc, Node *html );
|
||||||
|
|
||||||
Bool TY_(TidyMetaCharset)(TidyDocImpl* doc);
|
TY_PRIVATE Bool TY_(TidyMetaCharset)(TidyDocImpl* doc);
|
||||||
|
|
||||||
void TY_(DropComments)(TidyDocImpl* doc, Node* node);
|
TY_PRIVATE void TY_(DropComments)(TidyDocImpl* doc, Node* node);
|
||||||
void TY_(DropFontElements)(TidyDocImpl* doc, Node* node, Node **pnode);
|
TY_PRIVATE void TY_(DropFontElements)(TidyDocImpl* doc, Node* node, Node **pnode);
|
||||||
void TY_(WbrToSpace)(TidyDocImpl* doc, Node* node);
|
TY_PRIVATE void TY_(WbrToSpace)(TidyDocImpl* doc, Node* node);
|
||||||
void TY_(DowngradeTypography)(TidyDocImpl* doc, Node* node);
|
TY_PRIVATE void TY_(DowngradeTypography)(TidyDocImpl* doc, Node* node);
|
||||||
void TY_(ReplacePreformattedSpaces)(TidyDocImpl* doc, Node* node);
|
TY_PRIVATE void TY_(ReplacePreformattedSpaces)(TidyDocImpl* doc, Node* node);
|
||||||
void TY_(NormalizeSpaces)(Lexer *lexer, Node *node);
|
TY_PRIVATE void TY_(NormalizeSpaces)(Lexer *lexer, Node *node);
|
||||||
void TY_(ConvertCDATANodes)(TidyDocImpl* doc, Node* node);
|
TY_PRIVATE void TY_(ConvertCDATANodes)(TidyDocImpl* doc, Node* node);
|
||||||
|
|
||||||
void TY_(FixAnchors)(TidyDocImpl* doc, Node *node, Bool wantName, Bool wantId);
|
TY_PRIVATE void TY_(FixAnchors)(TidyDocImpl* doc, Node *node, Bool wantName, Bool wantId);
|
||||||
void TY_(FixXhtmlNamespace)(TidyDocImpl* doc, Bool wantXmlns);
|
TY_PRIVATE void TY_(FixXhtmlNamespace)(TidyDocImpl* doc, Bool wantXmlns);
|
||||||
void TY_(FixLanguageInformation)(TidyDocImpl* doc, Node* node, Bool wantXmlLang, Bool wantLang);
|
TY_PRIVATE void TY_(FixLanguageInformation)(TidyDocImpl* doc, Node* node, Bool wantXmlLang, Bool wantLang);
|
||||||
|
|
||||||
/* Issue #567 - move style elements from body to head */
|
/* Issue #567 - move style elements from body to head */
|
||||||
void TY_(CleanStyle)(TidyDocImpl* doc, Node *html);
|
TY_PRIVATE void TY_(CleanStyle)(TidyDocImpl* doc, Node *html);
|
||||||
/* Issue #692 - discard multiple titles */
|
/* Issue #692 - discard multiple titles */
|
||||||
void TY_(CleanHead)(TidyDocImpl* doc);
|
TY_PRIVATE void TY_(CleanHead)(TidyDocImpl* doc);
|
||||||
|
|
||||||
|
|
||||||
#endif /* __CLEAN_H__ */
|
#endif /* __CLEAN_H__ */
|
||||||
|
|
70
src/config.h
70
src/config.h
|
@ -140,26 +140,26 @@ typedef struct {
|
||||||
** @param optnam The option name to retrieve.
|
** @param optnam The option name to retrieve.
|
||||||
** @returns The instance of the requested option.
|
** @returns The instance of the requested option.
|
||||||
*/
|
*/
|
||||||
const TidyOptionImpl* TY_(lookupOption)( ctmbstr optnam );
|
TY_PRIVATE const TidyOptionImpl* TY_(lookupOption)( ctmbstr optnam );
|
||||||
|
|
||||||
|
|
||||||
/** Given an option ID, return an instance of an option.
|
/** Given an option ID, return an instance of an option.
|
||||||
** @param optId The option ID to retrieve.
|
** @param optId The option ID to retrieve.
|
||||||
** @returns The instance of the requested option.
|
** @returns The instance of the requested option.
|
||||||
*/
|
*/
|
||||||
const TidyOptionImpl* TY_(getOption)( TidyOptionId optId );
|
TY_PRIVATE const TidyOptionImpl* TY_(getOption)( TidyOptionId optId );
|
||||||
|
|
||||||
/** Given an option ID, indicates whether or not the option is a list.
|
/** Given an option ID, indicates whether or not the option is a list.
|
||||||
** @param optId The option ID to check.
|
** @param optId The option ID to check.
|
||||||
** @returns Returns yes if the option value is a list.
|
** @returns Returns yes if the option value is a list.
|
||||||
*/
|
*/
|
||||||
const Bool TY_(getOptionIsList)( TidyOptionId optId );
|
TY_PRIVATE const Bool TY_(getOptionIsList)( TidyOptionId optId );
|
||||||
|
|
||||||
/** Initiates an iterator to cycle through all of the available options.
|
/** Initiates an iterator to cycle through all of the available options.
|
||||||
** @param doc The Tidy document to get options.
|
** @param doc The Tidy document to get options.
|
||||||
** @returns An iterator token to be used with TY_(getNextOption)().
|
** @returns An iterator token to be used with TY_(getNextOption)().
|
||||||
*/
|
*/
|
||||||
TidyIterator TY_(getOptionList)( TidyDocImpl* doc );
|
TY_PRIVATE TidyIterator TY_(getOptionList)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/** Gets the next option provided by the iterator.
|
/** Gets the next option provided by the iterator.
|
||||||
|
@ -167,7 +167,7 @@ TidyIterator TY_(getOptionList)( TidyDocImpl* doc );
|
||||||
** @param iter The iterator token initialized by TY_(getOptionList)().
|
** @param iter The iterator token initialized by TY_(getOptionList)().
|
||||||
** @returns The instance of the next option.
|
** @returns The instance of the next option.
|
||||||
*/
|
*/
|
||||||
const TidyOptionImpl* TY_(getNextOption)( TidyDocImpl* doc, TidyIterator* iter );
|
TY_PRIVATE const TidyOptionImpl* TY_(getNextOption)( TidyDocImpl* doc, TidyIterator* iter );
|
||||||
|
|
||||||
|
|
||||||
/** Initiates an iterator to cycle through all of the available picklist
|
/** Initiates an iterator to cycle through all of the available picklist
|
||||||
|
@ -175,7 +175,7 @@ const TidyOptionImpl* TY_(getNextOption)( TidyDocImpl* doc, TidyIterator* iter )
|
||||||
** @param option An instance of an option for which to iterate a picklist.
|
** @param option An instance of an option for which to iterate a picklist.
|
||||||
** @returns An interator token to be used with TY_(getNextOptionPick)().
|
** @returns An interator token to be used with TY_(getNextOptionPick)().
|
||||||
*/
|
*/
|
||||||
TidyIterator TY_(getOptionPickList)( const TidyOptionImpl* option );
|
TY_PRIVATE TidyIterator TY_(getOptionPickList)( const TidyOptionImpl* option );
|
||||||
|
|
||||||
|
|
||||||
/** Gets the next picklist possibility provided by the iterator.
|
/** Gets the next picklist possibility provided by the iterator.
|
||||||
|
@ -183,7 +183,7 @@ TidyIterator TY_(getOptionPickList)( const TidyOptionImpl* option );
|
||||||
** @param iter The iterator token initialized by TY_(getOptionPickList)().
|
** @param iter The iterator token initialized by TY_(getOptionPickList)().
|
||||||
** @returns The next picklist entry.
|
** @returns The next picklist entry.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(getNextOptionPick)( const TidyOptionImpl* option, TidyIterator* iter );
|
TY_PRIVATE ctmbstr TY_(getNextOptionPick)( const TidyOptionImpl* option, TidyIterator* iter );
|
||||||
|
|
||||||
|
|
||||||
#if SUPPORT_CONSOLE_APP
|
#if SUPPORT_CONSOLE_APP
|
||||||
|
@ -192,20 +192,20 @@ ctmbstr TY_(getNextOptionPick)( const TidyOptionImpl* option, TidyIterator* iter
|
||||||
** @param optId The option ID to get cross-reference information for.
|
** @param optId The option ID to get cross-reference information for.
|
||||||
** @returns Cross reference information.
|
** @returns Cross reference information.
|
||||||
*/
|
*/
|
||||||
const TidyOptionDoc* TY_(OptGetDocDesc)( TidyOptionId optId );
|
TY_PRIVATE const TidyOptionDoc* TY_(OptGetDocDesc)( TidyOptionId optId );
|
||||||
#endif /* SUPPORT_CONSOLE_APP */
|
#endif /* SUPPORT_CONSOLE_APP */
|
||||||
|
|
||||||
|
|
||||||
/** Initialize the configuration for the given Tidy document.
|
/** Initialize the configuration for the given Tidy document.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
*/
|
*/
|
||||||
void TY_(InitConfig)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(InitConfig)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/** Frees the configuration memory for the given Tidy document.
|
/** Frees the configuration memory for the given Tidy document.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
*/
|
*/
|
||||||
void TY_(FreeConfig)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(FreeConfig)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/** Gets the picklist label for a given value.
|
/** Gets the picklist label for a given value.
|
||||||
|
@ -213,7 +213,7 @@ void TY_(FreeConfig)( TidyDocImpl* doc );
|
||||||
** @param pick the picklist item to retrieve.
|
** @param pick the picklist item to retrieve.
|
||||||
** @returns The label for the pick.
|
** @returns The label for the pick.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(GetPickListLabelForPick)( TidyOptionId optId, uint pick );
|
TY_PRIVATE ctmbstr TY_(GetPickListLabelForPick)( TidyOptionId optId, uint pick );
|
||||||
|
|
||||||
|
|
||||||
/** Sets the integer value for the given option Id.
|
/** Sets the integer value for the given option Id.
|
||||||
|
@ -222,7 +222,7 @@ ctmbstr TY_(GetPickListLabelForPick)( TidyOptionId optId, uint pick );
|
||||||
** @param val The value to set.
|
** @param val The value to set.
|
||||||
** @returns Success or failure.
|
** @returns Success or failure.
|
||||||
*/
|
*/
|
||||||
Bool TY_(SetOptionInt)( TidyDocImpl* doc, TidyOptionId optId, ulong val );
|
TY_PRIVATE Bool TY_(SetOptionInt)( TidyDocImpl* doc, TidyOptionId optId, ulong val );
|
||||||
|
|
||||||
|
|
||||||
/** Sets the bool value for the given option Id.
|
/** Sets the bool value for the given option Id.
|
||||||
|
@ -231,7 +231,7 @@ Bool TY_(SetOptionInt)( TidyDocImpl* doc, TidyOptionId optId, ulong val );
|
||||||
** @param val The value to set.
|
** @param val The value to set.
|
||||||
** @returns Success or failure.
|
** @returns Success or failure.
|
||||||
*/
|
*/
|
||||||
Bool TY_(SetOptionBool)( TidyDocImpl* doc, TidyOptionId optId, Bool val );
|
TY_PRIVATE Bool TY_(SetOptionBool)( TidyDocImpl* doc, TidyOptionId optId, Bool val );
|
||||||
|
|
||||||
|
|
||||||
/** Resets the given option to its default value.
|
/** Resets the given option to its default value.
|
||||||
|
@ -239,33 +239,33 @@ Bool TY_(SetOptionBool)( TidyDocImpl* doc, TidyOptionId optId, Bool val );
|
||||||
** @param optId The option ID to set.
|
** @param optId The option ID to set.
|
||||||
** @returns Success or failure.
|
** @returns Success or failure.
|
||||||
*/
|
*/
|
||||||
Bool TY_(ResetOptionToDefault)( TidyDocImpl* doc, TidyOptionId optId );
|
TY_PRIVATE Bool TY_(ResetOptionToDefault)( TidyDocImpl* doc, TidyOptionId optId );
|
||||||
|
|
||||||
|
|
||||||
/** Resets all options in the document to their default values.
|
/** Resets all options in the document to their default values.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
*/
|
*/
|
||||||
void TY_(ResetConfigToDefault)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(ResetConfigToDefault)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/** Stores a snapshot of all of the configuration values that can be
|
/** Stores a snapshot of all of the configuration values that can be
|
||||||
** restored later.
|
** restored later.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
*/
|
*/
|
||||||
void TY_(TakeConfigSnapshot)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(TakeConfigSnapshot)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/** Restores all of the configuration values to their snapshotted values.
|
/** Restores all of the configuration values to their snapshotted values.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
*/
|
*/
|
||||||
void TY_(ResetConfigToSnapshot)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(ResetConfigToSnapshot)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/** Copies the configuration from one document to another.
|
/** Copies the configuration from one document to another.
|
||||||
** @param docTo The destination Tidy document.
|
** @param docTo The destination Tidy document.
|
||||||
** @param docFrom The source Tidy document.
|
** @param docFrom The source Tidy document.
|
||||||
*/
|
*/
|
||||||
void TY_(CopyConfig)( TidyDocImpl* docTo, TidyDocImpl* docFrom );
|
TY_PRIVATE void TY_(CopyConfig)( TidyDocImpl* docTo, TidyDocImpl* docFrom );
|
||||||
|
|
||||||
|
|
||||||
/** Attempts to parse the given config file into the document.
|
/** Attempts to parse the given config file into the document.
|
||||||
|
@ -273,7 +273,7 @@ void TY_(CopyConfig)( TidyDocImpl* docTo, TidyDocImpl* docFrom );
|
||||||
** @param cfgfil The file to load.
|
** @param cfgfil The file to load.
|
||||||
** @returns a file system error code.
|
** @returns a file system error code.
|
||||||
*/
|
*/
|
||||||
int TY_(ParseConfigFile)( TidyDocImpl* doc, ctmbstr cfgfil );
|
TY_PRIVATE int TY_(ParseConfigFile)( TidyDocImpl* doc, ctmbstr cfgfil );
|
||||||
|
|
||||||
|
|
||||||
/** Attempts to parse the given config file into the document, using
|
/** Attempts to parse the given config file into the document, using
|
||||||
|
@ -283,7 +283,7 @@ int TY_(ParseConfigFile)( TidyDocImpl* doc, ctmbstr cfgfil );
|
||||||
** @param charenc The name of the encoding to use for reading the file.
|
** @param charenc The name of the encoding to use for reading the file.
|
||||||
** @returns a file system error code.
|
** @returns a file system error code.
|
||||||
*/
|
*/
|
||||||
int TY_(ParseConfigFileEnc)( TidyDocImpl* doc,
|
TY_PRIVATE int TY_(ParseConfigFileEnc)( TidyDocImpl* doc,
|
||||||
ctmbstr cfgfil, ctmbstr charenc );
|
ctmbstr cfgfil, ctmbstr charenc );
|
||||||
|
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ int TY_(ParseConfigFileEnc)( TidyDocImpl* doc,
|
||||||
** @param cfgfil The file to save.
|
** @param cfgfil The file to save.
|
||||||
** @returns a file system error code.
|
** @returns a file system error code.
|
||||||
*/
|
*/
|
||||||
int TY_(SaveConfigFile)( TidyDocImpl* doc, ctmbstr cfgfil );
|
TY_PRIVATE int TY_(SaveConfigFile)( TidyDocImpl* doc, ctmbstr cfgfil );
|
||||||
|
|
||||||
|
|
||||||
/** Writes the current configuration for options not having default values
|
/** Writes the current configuration for options not having default values
|
||||||
|
@ -302,7 +302,7 @@ int TY_(SaveConfigFile)( TidyDocImpl* doc, ctmbstr cfgfil );
|
||||||
** @param sink The sink to save into.
|
** @param sink The sink to save into.
|
||||||
** @returns a file system error code.
|
** @returns a file system error code.
|
||||||
*/
|
*/
|
||||||
int TY_(SaveConfigSink)( TidyDocImpl* doc, TidyOutputSink* sink );
|
TY_PRIVATE int TY_(SaveConfigSink)( TidyDocImpl* doc, TidyOutputSink* sink );
|
||||||
|
|
||||||
|
|
||||||
/** Attempts to parse the provided value for the given option name. Returns
|
/** Attempts to parse the provided value for the given option name. Returns
|
||||||
|
@ -313,7 +313,7 @@ int TY_(SaveConfigSink)( TidyDocImpl* doc, TidyOutputSink* sink );
|
||||||
** @param optVal The string value to attempt to parse.
|
** @param optVal The string value to attempt to parse.
|
||||||
** @returns Success or failure.
|
** @returns Success or failure.
|
||||||
*/
|
*/
|
||||||
Bool TY_(ParseConfigOption)( TidyDocImpl* doc, ctmbstr optnam, ctmbstr optVal );
|
TY_PRIVATE Bool TY_(ParseConfigOption)( TidyDocImpl* doc, ctmbstr optnam, ctmbstr optVal );
|
||||||
|
|
||||||
|
|
||||||
/** Attempts to parse the provided value for the given option id. Returns
|
/** Attempts to parse the provided value for the given option id. Returns
|
||||||
|
@ -324,7 +324,7 @@ Bool TY_(ParseConfigOption)( TidyDocImpl* doc, ctmbstr optnam, ctmbstr optVal )
|
||||||
** @param optVal The string value to attempt to parse.
|
** @param optVal The string value to attempt to parse.
|
||||||
** @returns Success or failure.
|
** @returns Success or failure.
|
||||||
*/
|
*/
|
||||||
Bool TY_(ParseConfigValue)( TidyDocImpl* doc, TidyOptionId optId, ctmbstr optVal );
|
TY_PRIVATE Bool TY_(ParseConfigValue)( TidyDocImpl* doc, TidyOptionId optId, ctmbstr optVal );
|
||||||
|
|
||||||
|
|
||||||
/** Ensure that char encodings are self consistent.
|
/** Ensure that char encodings are self consistent.
|
||||||
|
@ -332,7 +332,7 @@ Bool TY_(ParseConfigValue)( TidyDocImpl* doc, TidyOptionId optId, ctmbstr optVa
|
||||||
** @param encoding The encoding being applied.
|
** @param encoding The encoding being applied.
|
||||||
** @returns A bool indicating success or failure.
|
** @returns A bool indicating success or failure.
|
||||||
*/
|
*/
|
||||||
Bool TY_(AdjustCharEncoding)( TidyDocImpl* doc, int encoding );
|
TY_PRIVATE Bool TY_(AdjustCharEncoding)( TidyDocImpl* doc, int encoding );
|
||||||
|
|
||||||
|
|
||||||
/** Ensure that the configuration options are self consistent.
|
/** Ensure that the configuration options are self consistent.
|
||||||
|
@ -353,7 +353,7 @@ void TY_(AdjustConfig)( TidyDocImpl* doc );
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
** @returns The result.
|
** @returns The result.
|
||||||
*/
|
*/
|
||||||
Bool TY_(ConfigDiffThanDefault)( TidyDocImpl* doc );
|
TY_PRIVATE Bool TY_(ConfigDiffThanDefault)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/** Indicates whether or not the current configuration is different from the
|
/** Indicates whether or not the current configuration is different from the
|
||||||
|
@ -361,7 +361,7 @@ Bool TY_(ConfigDiffThanDefault)( TidyDocImpl* doc );
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
** @returns The result.
|
** @returns The result.
|
||||||
*/
|
*/
|
||||||
Bool TY_(ConfigDiffThanSnapshot)( TidyDocImpl* doc );
|
TY_PRIVATE Bool TY_(ConfigDiffThanSnapshot)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/** Returns the character encoding ID for the given character encoding
|
/** Returns the character encoding ID for the given character encoding
|
||||||
|
@ -370,21 +370,21 @@ Bool TY_(ConfigDiffThanSnapshot)( TidyDocImpl* doc );
|
||||||
** @param charenc The name of the character encoding.
|
** @param charenc The name of the character encoding.
|
||||||
** @returns The Id of the character encoding.
|
** @returns The Id of the character encoding.
|
||||||
*/
|
*/
|
||||||
int TY_(CharEncodingId)( TidyDocImpl* doc, ctmbstr charenc );
|
TY_PRIVATE int TY_(CharEncodingId)( TidyDocImpl* doc, ctmbstr charenc );
|
||||||
|
|
||||||
|
|
||||||
/** Returns the full name of the encoding for the given ID.
|
/** Returns the full name of the encoding for the given ID.
|
||||||
** @param encoding The Id of the encoding.
|
** @param encoding The Id of the encoding.
|
||||||
** @returns The name of the character encoding.
|
** @returns The name of the character encoding.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(CharEncodingName)( int encoding );
|
TY_PRIVATE ctmbstr TY_(CharEncodingName)( int encoding );
|
||||||
|
|
||||||
|
|
||||||
/** Returns the Tidy command line option name of the encoding for the given ID.
|
/** Returns the Tidy command line option name of the encoding for the given ID.
|
||||||
** @param encoding The Id of the encoding.
|
** @param encoding The Id of the encoding.
|
||||||
** @returns The Tidy command line option representing the encoding.
|
** @returns The Tidy command line option representing the encoding.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(CharEncodingOptName)( int encoding );
|
TY_PRIVATE ctmbstr TY_(CharEncodingOptName)( int encoding );
|
||||||
|
|
||||||
|
|
||||||
/** Coordinates Config update and list data.
|
/** Coordinates Config update and list data.
|
||||||
|
@ -392,15 +392,15 @@ ctmbstr TY_(CharEncodingOptName)( int encoding );
|
||||||
** @param opt The option the list item is intended for.
|
** @param opt The option the list item is intended for.
|
||||||
** @param name The name of the new list item.
|
** @param name The name of the new list item.
|
||||||
*/
|
*/
|
||||||
void TY_(DeclareListItem)( TidyDocImpl* doc, const TidyOptionImpl* opt, ctmbstr name );
|
TY_PRIVATE void TY_(DeclareListItem)( TidyDocImpl* doc, const TidyOptionImpl* opt, ctmbstr name );
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
|
|
||||||
/* Debug lookup functions will be type-safe and assert option type match */
|
/* Debug lookup functions will be type-safe and assert option type match */
|
||||||
ulong TY_(_cfgGet)( TidyDocImpl* doc, TidyOptionId optId );
|
TY_PRIVATE ulong TY_(_cfgGet)( TidyDocImpl* doc, TidyOptionId optId );
|
||||||
Bool TY_(_cfgGetBool)( TidyDocImpl* doc, TidyOptionId optId );
|
TY_PRIVATE Bool TY_(_cfgGetBool)( TidyDocImpl* doc, TidyOptionId optId );
|
||||||
TidyTriState TY_(_cfgGetAutoBool)( TidyDocImpl* doc, TidyOptionId optId );
|
TY_PRIVATE TidyTriState TY_(_cfgGetAutoBool)( TidyDocImpl* doc, TidyOptionId optId );
|
||||||
ctmbstr TY_(_cfgGetString)( TidyDocImpl* doc, TidyOptionId optId );
|
TY_PRIVATE ctmbstr TY_(_cfgGetString)( TidyDocImpl* doc, TidyOptionId optId );
|
||||||
|
|
||||||
#define cfg(doc, id) TY_(_cfgGet)( (doc), (id) )
|
#define cfg(doc, id) TY_(_cfgGet)( (doc), (id) )
|
||||||
#define cfgBool(doc, id) TY_(_cfgGetBool)( (doc), (id) )
|
#define cfgBool(doc, id) TY_(_cfgGetBool)( (doc), (id) )
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
/* entity starting with "&" returns zero on error */
|
/* entity starting with "&" returns zero on error */
|
||||||
/* uint EntityCode( ctmbstr name, uint versions ); */
|
/* uint EntityCode( ctmbstr name, uint versions ); */
|
||||||
ctmbstr TY_(EntityName)( uint charCode, uint versions );
|
TY_PRIVATE ctmbstr TY_(EntityName)( uint charCode, uint versions );
|
||||||
Bool TY_(EntityInfo)( ctmbstr name, Bool isXml, uint* code, uint* versions );
|
TY_PRIVATE Bool TY_(EntityInfo)( ctmbstr name, Bool isXml, uint* code, uint* versions );
|
||||||
|
|
||||||
#endif /* __ENTITIES_H__ */
|
#endif /* __ENTITIES_H__ */
|
||||||
|
|
12
src/fileio.h
12
src/fileio.h
|
@ -17,24 +17,24 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Allocate and initialize file input source */
|
/** Allocate and initialize file input source */
|
||||||
int TY_(initFileSource)( TidyAllocator *allocator, TidyInputSource* source, FILE* fp );
|
TY_PRIVATE int TY_(initFileSource)( TidyAllocator *allocator, TidyInputSource* source, FILE* fp );
|
||||||
|
|
||||||
/** Free file input source */
|
/** Free file input source */
|
||||||
void TY_(freeFileSource)( TidyInputSource* source, Bool closeIt );
|
TY_PRIVATE void TY_(freeFileSource)( TidyInputSource* source, Bool closeIt );
|
||||||
|
|
||||||
#if SUPPORT_POSIX_MAPPED_FILES
|
#if SUPPORT_POSIX_MAPPED_FILES
|
||||||
/** Allocate and initialize file input source using Standard C I/O */
|
/** Allocate and initialize file input source using Standard C I/O */
|
||||||
int TY_(initStdIOFileSource)( TidyAllocator *allocator, TidyInputSource* source, FILE* fp );
|
TY_PRIVATE int TY_(initStdIOFileSource)( TidyAllocator *allocator, TidyInputSource* source, FILE* fp );
|
||||||
|
|
||||||
/** Free file input source using Standard C I/O */
|
/** Free file input source using Standard C I/O */
|
||||||
void TY_(freeStdIOFileSource)( TidyInputSource* source, Bool closeIt );
|
TY_PRIVATE void TY_(freeStdIOFileSource)( TidyInputSource* source, Bool closeIt );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Initialize file output sink */
|
/** Initialize file output sink */
|
||||||
void TY_(initFileSink)( TidyOutputSink* sink, FILE* fp );
|
TY_PRIVATE void TY_(initFileSink)( TidyOutputSink* sink, FILE* fp );
|
||||||
|
|
||||||
/* Needed for internal declarations */
|
/* Needed for internal declarations */
|
||||||
void TIDY_CALL TY_(filesink_putByte)( void* sinkData, byte bv );
|
TY_PRIVATE void TIDY_CALL TY_(filesink_putByte)( void* sinkData, byte bv );
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,13 @@
|
||||||
#define TYDYAPPEND(str1,str2) str1##str2
|
#define TYDYAPPEND(str1,str2) str1##str2
|
||||||
#define TY_(str) TYDYAPPEND(prvTidy,str)
|
#define TY_(str) TYDYAPPEND(prvTidy,str)
|
||||||
|
|
||||||
|
/* Internal symbols are prefixed with 'hidden' attr, to avoid exporting */
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define TY_PRIVATE
|
||||||
|
#else
|
||||||
|
#define TY_PRIVATE __attribute__((__visibility__("hidden")))
|
||||||
|
#endif
|
||||||
|
|
||||||
struct _StreamIn;
|
struct _StreamIn;
|
||||||
typedef struct _StreamIn StreamIn;
|
typedef struct _StreamIn StreamIn;
|
||||||
|
|
||||||
|
@ -53,7 +60,7 @@ typedef struct _IStack IStack;
|
||||||
struct _Lexer;
|
struct _Lexer;
|
||||||
typedef struct _Lexer Lexer;
|
typedef struct _Lexer Lexer;
|
||||||
|
|
||||||
extern TidyAllocator TY_(g_default_allocator);
|
TY_PRIVATE extern TidyAllocator TY_(g_default_allocator);
|
||||||
|
|
||||||
/** Wrappers for easy memory allocation using an allocator */
|
/** Wrappers for easy memory allocation using an allocator */
|
||||||
#define TidyAlloc(allocator, size) ((allocator)->vtbl->alloc((allocator), (size)))
|
#define TidyAlloc(allocator, size) ((allocator)->vtbl->alloc((allocator), (size)))
|
||||||
|
|
|
@ -14,6 +14,6 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void TY_(CleanGoogleDocument)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(CleanGoogleDocument)( TidyDocImpl* doc );
|
||||||
|
|
||||||
#endif /* __GDOC_H__ */
|
#endif /* __GDOC_H__ */
|
||||||
|
|
|
@ -306,7 +306,7 @@ ctmbstr TY_(tidyLocalizedString)( uint messageType )
|
||||||
* return it if there's no other match.
|
* return it if there's no other match.
|
||||||
* @note this routine uses default allocator, see tidySetMallocCall.
|
* @note this routine uses default allocator, see tidySetMallocCall.
|
||||||
*/
|
*/
|
||||||
tmbstr TY_(tidyNormalizedLocaleName)( ctmbstr locale )
|
static tmbstr TY_(tidyNormalizedLocaleName)( ctmbstr locale )
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
uint len;
|
uint len;
|
||||||
|
@ -363,7 +363,7 @@ tmbstr TY_(tidyNormalizedLocaleName)( ctmbstr locale )
|
||||||
* Returns the languageDefinition if the languageCode is installed in Tidy,
|
* Returns the languageDefinition if the languageCode is installed in Tidy,
|
||||||
* otherwise return NULL
|
* otherwise return NULL
|
||||||
*/
|
*/
|
||||||
languageDefinition *TY_(tidyTestLanguage)( ctmbstr languageCode )
|
static languageDefinition *TY_(tidyTestLanguage)( ctmbstr languageCode )
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
languageDefinition *testLang;
|
languageDefinition *testLang;
|
||||||
|
@ -395,7 +395,7 @@ languageDefinition *TY_(tidyTestLanguage)( ctmbstr languageCode )
|
||||||
* true. However the opposite is not true; if es is requested but
|
* true. However the opposite is not true; if es is requested but
|
||||||
* not present, Tidy will not try to select from the es_XX variants.
|
* not present, Tidy will not try to select from the es_XX variants.
|
||||||
*/
|
*/
|
||||||
Bool TY_(tidySetLanguage)( ctmbstr languageCode )
|
TY_PRIVATE Bool TY_(tidySetLanguage)( ctmbstr languageCode )
|
||||||
{
|
{
|
||||||
languageDefinition *dict1 = NULL;
|
languageDefinition *dict1 = NULL;
|
||||||
languageDefinition *dict2 = NULL;
|
languageDefinition *dict2 = NULL;
|
||||||
|
@ -448,7 +448,7 @@ Bool TY_(tidySetLanguage)( ctmbstr languageCode )
|
||||||
/**
|
/**
|
||||||
* Gets the current language used by Tidy.
|
* Gets the current language used by Tidy.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(tidyGetLanguage)()
|
TY_PRIVATE ctmbstr TY_(tidyGetLanguage)()
|
||||||
{
|
{
|
||||||
languageDefinition *langDef = tidyLanguages.currentLanguage;
|
languageDefinition *langDef = tidyLanguages.currentLanguage;
|
||||||
languageDictionary *langDict = &langDef->messages;
|
languageDictionary *langDict = &langDef->messages;
|
||||||
|
@ -460,7 +460,7 @@ ctmbstr TY_(tidyGetLanguage)()
|
||||||
* Indicates whether or not the current language was set by a
|
* Indicates whether or not the current language was set by a
|
||||||
* LibTidy user (yes) or internally by the library (no).
|
* LibTidy user (yes) or internally by the library (no).
|
||||||
*/
|
*/
|
||||||
Bool TY_(tidyGetLanguageSetByUser)()
|
TY_PRIVATE Bool TY_(tidyGetLanguageSetByUser)()
|
||||||
{
|
{
|
||||||
return tidyLanguages.manually_set;
|
return tidyLanguages.manually_set;
|
||||||
}
|
}
|
||||||
|
@ -470,7 +470,7 @@ Bool TY_(tidyGetLanguageSetByUser)()
|
||||||
* Specifies to LibTidy that the user (rather than the library)
|
* Specifies to LibTidy that the user (rather than the library)
|
||||||
* selected the current language.
|
* selected the current language.
|
||||||
*/
|
*/
|
||||||
void TY_(tidySetLanguageSetByUser)( void )
|
TY_PRIVATE void TY_(tidySetLanguageSetByUser)( void )
|
||||||
{
|
{
|
||||||
tidyLanguages.manually_set = yes;
|
tidyLanguages.manually_set = yes;
|
||||||
}
|
}
|
||||||
|
@ -480,7 +480,7 @@ void TY_(tidySetLanguageSetByUser)( void )
|
||||||
* Provides a string given `messageType` in the default
|
* Provides a string given `messageType` in the default
|
||||||
* localization (which is `en`), for single plural form.
|
* localization (which is `en`), for single plural form.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(tidyDefaultString)( uint messageType )
|
TY_PRIVATE ctmbstr TY_(tidyDefaultString)( uint messageType )
|
||||||
{
|
{
|
||||||
return tidyLocalizedStringImpl( messageType, &language_en, 1);
|
return tidyLocalizedStringImpl( messageType, &language_en, 1);
|
||||||
}
|
}
|
||||||
|
@ -511,7 +511,7 @@ static const uint tidyStringKeyListSize()
|
||||||
* these are provided for documentation generation purposes
|
* these are provided for documentation generation purposes
|
||||||
* and probably aren't useful for LibTidy implementors.
|
* and probably aren't useful for LibTidy implementors.
|
||||||
*/
|
*/
|
||||||
TidyIterator TY_(getStringKeyList)()
|
TY_PRIVATE TidyIterator TY_(getStringKeyList)()
|
||||||
{
|
{
|
||||||
return (TidyIterator)(size_t)1;
|
return (TidyIterator)(size_t)1;
|
||||||
}
|
}
|
||||||
|
@ -522,7 +522,7 @@ TidyIterator TY_(getStringKeyList)()
|
||||||
* generation purposes and probably aren't useful to
|
* generation purposes and probably aren't useful to
|
||||||
* libtidy implementors.
|
* libtidy implementors.
|
||||||
*/
|
*/
|
||||||
uint TY_(getNextStringKey)( TidyIterator* iter )
|
TY_PRIVATE uint TY_(getNextStringKey)( TidyIterator* iter )
|
||||||
{
|
{
|
||||||
uint item = 0;
|
uint item = 0;
|
||||||
size_t itemIndex;
|
size_t itemIndex;
|
||||||
|
@ -564,7 +564,7 @@ static const uint tidyLanguageListSize()
|
||||||
* in Tidy's structure of Windows<->POSIX local mapping.
|
* in Tidy's structure of Windows<->POSIX local mapping.
|
||||||
* Items can be retrieved with getNextWindowsLanguage();
|
* Items can be retrieved with getNextWindowsLanguage();
|
||||||
*/
|
*/
|
||||||
TidyIterator TY_(getWindowsLanguageList)()
|
TY_PRIVATE TidyIterator TY_(getWindowsLanguageList)()
|
||||||
{
|
{
|
||||||
return (TidyIterator)(size_t)1;
|
return (TidyIterator)(size_t)1;
|
||||||
}
|
}
|
||||||
|
@ -573,7 +573,7 @@ TidyIterator TY_(getWindowsLanguageList)()
|
||||||
* Returns the next record of type `localeMapItem` in
|
* Returns the next record of type `localeMapItem` in
|
||||||
* Tidy's structure of Windows<->POSIX local mapping.
|
* Tidy's structure of Windows<->POSIX local mapping.
|
||||||
*/
|
*/
|
||||||
const tidyLocaleMapItemImpl *TY_(getNextWindowsLanguage)( TidyIterator *iter )
|
TY_PRIVATE const tidyLocaleMapItemImpl *TY_(getNextWindowsLanguage)( TidyIterator *iter )
|
||||||
{
|
{
|
||||||
const tidyLocaleMapItemImpl *item = NULL;
|
const tidyLocaleMapItemImpl *item = NULL;
|
||||||
size_t itemIndex;
|
size_t itemIndex;
|
||||||
|
@ -595,7 +595,7 @@ const tidyLocaleMapItemImpl *TY_(getNextWindowsLanguage)( TidyIterator *iter )
|
||||||
/**
|
/**
|
||||||
* Given a `tidyLocaleMapItemImpl, return the Windows name.
|
* Given a `tidyLocaleMapItemImpl, return the Windows name.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(TidyLangWindowsName)( const tidyLocaleMapItemImpl *item )
|
TY_PRIVATE ctmbstr TY_(TidyLangWindowsName)( const tidyLocaleMapItemImpl *item )
|
||||||
{
|
{
|
||||||
return item->winName;
|
return item->winName;
|
||||||
}
|
}
|
||||||
|
@ -604,7 +604,7 @@ ctmbstr TY_(TidyLangWindowsName)( const tidyLocaleMapItemImpl *item )
|
||||||
/**
|
/**
|
||||||
* Given a `tidyLocaleMapItemImpl, return the POSIX name.
|
* Given a `tidyLocaleMapItemImpl, return the POSIX name.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(TidyLangPosixName)( const tidyLocaleMapItemImpl *item )
|
TY_PRIVATE ctmbstr TY_(TidyLangPosixName)( const tidyLocaleMapItemImpl *item )
|
||||||
{
|
{
|
||||||
return item->POSIXName;
|
return item->POSIXName;
|
||||||
}
|
}
|
||||||
|
@ -632,7 +632,7 @@ static const uint tidyInstalledLanguageListSize()
|
||||||
* in Tidy's list of installed language codes.
|
* in Tidy's list of installed language codes.
|
||||||
* Items can be retrieved with getNextInstalledLanguage();
|
* Items can be retrieved with getNextInstalledLanguage();
|
||||||
*/
|
*/
|
||||||
TidyIterator TY_(getInstalledLanguageList)()
|
TY_PRIVATE TidyIterator TY_(getInstalledLanguageList)()
|
||||||
{
|
{
|
||||||
return (TidyIterator)(size_t)1;
|
return (TidyIterator)(size_t)1;
|
||||||
}
|
}
|
||||||
|
@ -640,7 +640,7 @@ TidyIterator TY_(getInstalledLanguageList)()
|
||||||
/**
|
/**
|
||||||
* Returns the next installed language.
|
* Returns the next installed language.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(getNextInstalledLanguage)( TidyIterator* iter )
|
TY_PRIVATE ctmbstr TY_(getNextInstalledLanguage)( TidyIterator* iter )
|
||||||
{
|
{
|
||||||
ctmbstr item = NULL;
|
ctmbstr item = NULL;
|
||||||
size_t itemIndex;
|
size_t itemIndex;
|
||||||
|
@ -657,3 +657,8 @@ ctmbstr TY_(getNextInstalledLanguage)( TidyIterator* iter )
|
||||||
*iter = (TidyIterator)( itemIndex <= tidyInstalledLanguageListSize() ? itemIndex : (size_t)0 );
|
*iter = (TidyIterator)( itemIndex <= tidyInstalledLanguageListSize() ? itemIndex : (size_t)0 );
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* end:
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ typedef struct tidyLocaleMapItemImpl {
|
||||||
** Returns NULL on failure.
|
** Returns NULL on failure.
|
||||||
** @return The same buffer for convenience.
|
** @return The same buffer for convenience.
|
||||||
*/
|
*/
|
||||||
tmbstr TY_(tidySystemLocale)(tmbstr result);
|
TY_PRIVATE tmbstr TY_(tidySystemLocale)(tmbstr result);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tells Tidy to use a different language for output.
|
* Tells Tidy to use a different language for output.
|
||||||
|
@ -108,12 +108,12 @@ tmbstr TY_(tidySystemLocale)(tmbstr result);
|
||||||
* true. However the opposite is not true; if es is requested but
|
* true. However the opposite is not true; if es is requested but
|
||||||
* not present, Tidy will not try to select from the es_XX variants.
|
* not present, Tidy will not try to select from the es_XX variants.
|
||||||
*/
|
*/
|
||||||
Bool TY_(tidySetLanguage)( ctmbstr languageCode );
|
TY_PRIVATE Bool TY_(tidySetLanguage)( ctmbstr languageCode );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the current language used by Tidy.
|
* Gets the current language used by Tidy.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(tidyGetLanguage)(void);
|
TY_PRIVATE ctmbstr TY_(tidyGetLanguage)(void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -124,7 +124,7 @@ ctmbstr TY_(tidyGetLanguage)(void);
|
||||||
* @returns Returns yes to indicate that the current language was
|
* @returns Returns yes to indicate that the current language was
|
||||||
* specified by an API user.
|
* specified by an API user.
|
||||||
*/
|
*/
|
||||||
Bool TY_(tidyGetLanguageSetByUser)(void);
|
TY_PRIVATE Bool TY_(tidyGetLanguageSetByUser)(void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -132,20 +132,20 @@ Bool TY_(tidyGetLanguageSetByUser)(void);
|
||||||
* selected the current language. This flag prevents subsequently
|
* selected the current language. This flag prevents subsequently
|
||||||
* created instances of TidyDocument from changing the user's language.
|
* created instances of TidyDocument from changing the user's language.
|
||||||
*/
|
*/
|
||||||
void TY_(tidySetLanguageSetByUser)( void );
|
TY_PRIVATE void TY_(tidySetLanguageSetByUser)( void );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides a string given `messageType` in the current
|
* Provides a string given `messageType` in the current
|
||||||
* localization for `quantity`.
|
* localization for `quantity`.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(tidyLocalizedStringN)( uint messageType, uint quantity );
|
TY_PRIVATE ctmbstr TY_(tidyLocalizedStringN)( uint messageType, uint quantity );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides a string given `messageType` in the current
|
* Provides a string given `messageType` in the current
|
||||||
* localization for the single case.
|
* localization for the single case.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(tidyLocalizedString)( uint messageType );
|
TY_PRIVATE ctmbstr TY_(tidyLocalizedString)( uint messageType );
|
||||||
|
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
@ -157,7 +157,7 @@ ctmbstr TY_(tidyLocalizedString)( uint messageType );
|
||||||
* Provides a string given `messageType` in the default
|
* Provides a string given `messageType` in the default
|
||||||
* localization (which is `en`).
|
* localization (which is `en`).
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(tidyDefaultString)( uint messageType );
|
TY_PRIVATE ctmbstr TY_(tidyDefaultString)( uint messageType );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initializes the TidyIterator to point to the first item
|
* Initializes the TidyIterator to point to the first item
|
||||||
|
@ -165,7 +165,7 @@ ctmbstr TY_(tidyDefaultString)( uint messageType );
|
||||||
* these are provided for documentation generation purposes
|
* these are provided for documentation generation purposes
|
||||||
* and probably aren't useful for LibTidy implementors.
|
* and probably aren't useful for LibTidy implementors.
|
||||||
*/
|
*/
|
||||||
TidyIterator TY_(getStringKeyList)(void);
|
TY_PRIVATE TidyIterator TY_(getStringKeyList)(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Provides the next key value in Tidy's list of localized
|
* Provides the next key value in Tidy's list of localized
|
||||||
|
@ -173,42 +173,42 @@ TidyIterator TY_(getStringKeyList)(void);
|
||||||
* generation purposes and probably aren't useful to
|
* generation purposes and probably aren't useful to
|
||||||
* libtidy implementors.
|
* libtidy implementors.
|
||||||
*/
|
*/
|
||||||
uint TY_(getNextStringKey)( TidyIterator* iter );
|
TY_PRIVATE uint TY_(getNextStringKey)( TidyIterator* iter );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the TidyIterator to point to the first item
|
* Initializes the TidyIterator to point to the first item
|
||||||
* in Tidy's structure of Windows<->POSIX local mapping.
|
* in Tidy's structure of Windows<->POSIX local mapping.
|
||||||
* Items can be retrieved with getNextWindowsLanguage();
|
* Items can be retrieved with getNextWindowsLanguage();
|
||||||
*/
|
*/
|
||||||
TidyIterator TY_(getWindowsLanguageList)(void);
|
TY_PRIVATE TidyIterator TY_(getWindowsLanguageList)(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the next record of type `localeMapItem` in
|
* Returns the next record of type `localeMapItem` in
|
||||||
* Tidy's structure of Windows<->POSIX local mapping.
|
* Tidy's structure of Windows<->POSIX local mapping.
|
||||||
*/
|
*/
|
||||||
const tidyLocaleMapItemImpl *TY_(getNextWindowsLanguage)( TidyIterator* iter );
|
TY_PRIVATE const tidyLocaleMapItemImpl *TY_(getNextWindowsLanguage)( TidyIterator* iter );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a `tidyLocaleMapItemImpl, return the Windows name.
|
* Given a `tidyLocaleMapItemImpl, return the Windows name.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(TidyLangWindowsName)( const tidyLocaleMapItemImpl *item );
|
TY_PRIVATE ctmbstr TY_(TidyLangWindowsName)( const tidyLocaleMapItemImpl *item );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a `tidyLocaleMapItemImpl, return the POSIX name.
|
* Given a `tidyLocaleMapItemImpl, return the POSIX name.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(TidyLangPosixName)( const tidyLocaleMapItemImpl *item );
|
TY_PRIVATE ctmbstr TY_(TidyLangPosixName)( const tidyLocaleMapItemImpl *item );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the TidyIterator to point to the first item
|
* Initializes the TidyIterator to point to the first item
|
||||||
* in Tidy's list of installed language codes.
|
* in Tidy's list of installed language codes.
|
||||||
* Items can be retrieved with getNextInstalledLanguage();
|
* Items can be retrieved with getNextInstalledLanguage();
|
||||||
*/
|
*/
|
||||||
TidyIterator TY_(getInstalledLanguageList)(void);
|
TY_PRIVATE TidyIterator TY_(getInstalledLanguageList)(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the next installed language.
|
* Returns the next installed language.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(getNextInstalledLanguage)( TidyIterator* iter );
|
TY_PRIVATE ctmbstr TY_(getNextInstalledLanguage)( TidyIterator* iter );
|
||||||
|
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
122
src/lexer.h
122
src/lexer.h
|
@ -383,32 +383,32 @@ struct _Lexer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* choose what version to use for new doctype */
|
/* choose what version to use for new doctype */
|
||||||
int TY_(HTMLVersion)( TidyDocImpl* doc );
|
TY_PRIVATE int TY_(HTMLVersion)( TidyDocImpl* doc );
|
||||||
|
|
||||||
/* everything is allowed in proprietary version of HTML */
|
/* everything is allowed in proprietary version of HTML */
|
||||||
/* this is handled here rather than in the tag/attr dicts */
|
/* this is handled here rather than in the tag/attr dicts */
|
||||||
|
|
||||||
void TY_(ConstrainVersion)( TidyDocImpl* doc, uint vers );
|
TY_PRIVATE void TY_(ConstrainVersion)( TidyDocImpl* doc, uint vers );
|
||||||
|
|
||||||
Bool TY_(IsWhite)(uint c);
|
TY_PRIVATE Bool TY_(IsWhite)(uint c);
|
||||||
Bool TY_(IsDigit)(uint c);
|
TY_PRIVATE Bool TY_(IsDigit)(uint c);
|
||||||
Bool TY_(IsLetter)(uint c);
|
TY_PRIVATE Bool TY_(IsLetter)(uint c);
|
||||||
Bool TY_(IsHTMLSpace)(uint c);
|
TY_PRIVATE Bool TY_(IsHTMLSpace)(uint c);
|
||||||
Bool TY_(IsNewline)(uint c);
|
TY_PRIVATE Bool TY_(IsNewline)(uint c);
|
||||||
Bool TY_(IsNamechar)(uint c);
|
TY_PRIVATE Bool TY_(IsNamechar)(uint c);
|
||||||
Bool TY_(IsXMLLetter)(uint c);
|
TY_PRIVATE Bool TY_(IsXMLLetter)(uint c);
|
||||||
Bool TY_(IsXMLNamechar)(uint c);
|
TY_PRIVATE Bool TY_(IsXMLNamechar)(uint c);
|
||||||
|
|
||||||
/* Bool IsLower(uint c); */
|
/* Bool IsLower(uint c); */
|
||||||
Bool TY_(IsUpper)(uint c);
|
TY_PRIVATE Bool TY_(IsUpper)(uint c);
|
||||||
uint TY_(ToLower)(uint c);
|
TY_PRIVATE uint TY_(ToLower)(uint c);
|
||||||
uint TY_(ToUpper)(uint c);
|
TY_PRIVATE uint TY_(ToUpper)(uint c);
|
||||||
|
|
||||||
Lexer* TY_(NewLexer)( TidyDocImpl* doc );
|
TY_PRIVATE Lexer* TY_(NewLexer)( TidyDocImpl* doc );
|
||||||
void TY_(FreeLexer)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(FreeLexer)( TidyDocImpl* doc );
|
||||||
|
|
||||||
/* store character c as UTF-8 encoded byte stream */
|
/* store character c as UTF-8 encoded byte stream */
|
||||||
void TY_(AddCharToLexer)( Lexer *lexer, uint c );
|
TY_PRIVATE void TY_(AddCharToLexer)( Lexer *lexer, uint c );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Used for elements and text nodes
|
Used for elements and text nodes
|
||||||
|
@ -423,78 +423,78 @@ void TY_(AddCharToLexer)( Lexer *lexer, uint c );
|
||||||
list of AttVal nodes which hold the
|
list of AttVal nodes which hold the
|
||||||
strings for attribute/value pairs.
|
strings for attribute/value pairs.
|
||||||
*/
|
*/
|
||||||
Node* TY_(NewNode)( TidyAllocator* allocator, Lexer* lexer );
|
TY_PRIVATE Node* TY_(NewNode)( TidyAllocator* allocator, Lexer* lexer );
|
||||||
|
|
||||||
|
|
||||||
/* used to clone heading nodes when split by an <HR> */
|
/* used to clone heading nodes when split by an <HR> */
|
||||||
Node* TY_(CloneNode)( TidyDocImpl* doc, Node *element );
|
TY_PRIVATE Node* TY_(CloneNode)( TidyDocImpl* doc, Node *element );
|
||||||
|
|
||||||
/* free node's attributes */
|
/* free node's attributes */
|
||||||
void TY_(FreeAttrs)( TidyDocImpl* doc, Node *node );
|
TY_PRIVATE void TY_(FreeAttrs)( TidyDocImpl* doc, Node *node );
|
||||||
|
|
||||||
/* doesn't repair attribute list linkage */
|
/* doesn't repair attribute list linkage */
|
||||||
void TY_(FreeAttribute)( TidyDocImpl* doc, AttVal *av );
|
TY_PRIVATE void TY_(FreeAttribute)( TidyDocImpl* doc, AttVal *av );
|
||||||
|
|
||||||
/* detach attribute from node */
|
/* detach attribute from node */
|
||||||
void TY_(DetachAttribute)( Node *node, AttVal *attr );
|
TY_PRIVATE void TY_(DetachAttribute)( Node *node, AttVal *attr );
|
||||||
|
|
||||||
/* detach attribute from node then free it
|
/* detach attribute from node then free it
|
||||||
*/
|
*/
|
||||||
void TY_(RemoveAttribute)( TidyDocImpl* doc, Node *node, AttVal *attr );
|
TY_PRIVATE void TY_(RemoveAttribute)( TidyDocImpl* doc, Node *node, AttVal *attr );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Free document nodes by iterating through peers and recursing
|
Free document nodes by iterating through peers and recursing
|
||||||
through children. Set next to NULL before calling FreeNode()
|
through children. Set next to NULL before calling FreeNode()
|
||||||
to avoid freeing peer nodes. Doesn't patch up prev/next links.
|
to avoid freeing peer nodes. Doesn't patch up prev/next links.
|
||||||
*/
|
*/
|
||||||
void TY_(FreeNode)( TidyDocImpl* doc, Node *node );
|
TY_PRIVATE void TY_(FreeNode)( TidyDocImpl* doc, Node *node );
|
||||||
|
|
||||||
Node* TY_(TextToken)( Lexer *lexer );
|
TY_PRIVATE Node* TY_(TextToken)( Lexer *lexer );
|
||||||
|
|
||||||
/* used for creating preformatted text from Word2000 */
|
/* used for creating preformatted text from Word2000 */
|
||||||
Node* TY_(NewLineNode)( Lexer *lexer );
|
TY_PRIVATE Node* TY_(NewLineNode)( Lexer *lexer );
|
||||||
|
|
||||||
/* used for adding a for Word2000 */
|
/* used for adding a for Word2000 */
|
||||||
Node* TY_(NewLiteralTextNode)(Lexer *lexer, ctmbstr txt );
|
TY_PRIVATE Node* TY_(NewLiteralTextNode)(Lexer *lexer, ctmbstr txt );
|
||||||
|
|
||||||
void TY_(AddStringLiteral)( Lexer* lexer, ctmbstr str );
|
TY_PRIVATE void TY_(AddStringLiteral)( Lexer* lexer, ctmbstr str );
|
||||||
/* void AddStringLiteralLen( Lexer* lexer, ctmbstr str, int len ); */
|
/* TY_PRIVATE void AddStringLiteralLen( Lexer* lexer, ctmbstr str, int len ); */
|
||||||
|
|
||||||
/* find element */
|
/* find element */
|
||||||
Node* TY_(FindDocType)( TidyDocImpl* doc );
|
TY_PRIVATE Node* TY_(FindDocType)( TidyDocImpl* doc );
|
||||||
Node* TY_(FindHTML)( TidyDocImpl* doc );
|
TY_PRIVATE Node* TY_(FindHTML)( TidyDocImpl* doc );
|
||||||
Node* TY_(FindHEAD)( TidyDocImpl* doc );
|
TY_PRIVATE Node* TY_(FindHEAD)( TidyDocImpl* doc );
|
||||||
Node* TY_(FindTITLE)(TidyDocImpl* doc);
|
TY_PRIVATE Node* TY_(FindTITLE)(TidyDocImpl* doc);
|
||||||
Node* TY_(FindBody)( TidyDocImpl* doc );
|
TY_PRIVATE Node* TY_(FindBody)( TidyDocImpl* doc );
|
||||||
Node* TY_(FindXmlDecl)(TidyDocImpl* doc);
|
TY_PRIVATE Node* TY_(FindXmlDecl)(TidyDocImpl* doc);
|
||||||
|
|
||||||
/* Returns containing block element, if any */
|
/* Returns containing block element, if any */
|
||||||
Node* TY_(FindContainer)( Node* node );
|
TY_PRIVATE Node* TY_(FindContainer)( Node* node );
|
||||||
|
|
||||||
/* add meta element for Tidy */
|
/* add meta element for Tidy */
|
||||||
Bool TY_(AddGenerator)( TidyDocImpl* doc );
|
TY_PRIVATE Bool TY_(AddGenerator)( TidyDocImpl* doc );
|
||||||
|
|
||||||
uint TY_(ApparentVersion)( TidyDocImpl* doc );
|
TY_PRIVATE uint TY_(ApparentVersion)( TidyDocImpl* doc );
|
||||||
|
|
||||||
ctmbstr TY_(HTMLVersionNameFromCode)( uint vers, Bool isXhtml );
|
TY_PRIVATE ctmbstr TY_(HTMLVersionNameFromCode)( uint vers, Bool isXhtml );
|
||||||
|
|
||||||
uint TY_(HTMLVersionNumberFromCode)( uint vers );
|
TY_PRIVATE uint TY_(HTMLVersionNumberFromCode)( uint vers );
|
||||||
|
|
||||||
Bool TY_(WarnMissingSIInEmittedDocType)( TidyDocImpl* doc );
|
TY_PRIVATE Bool TY_(WarnMissingSIInEmittedDocType)( TidyDocImpl* doc );
|
||||||
|
|
||||||
Bool TY_(SetXHTMLDocType)( TidyDocImpl* doc );
|
TY_PRIVATE Bool TY_(SetXHTMLDocType)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/* fixup doctype if missing */
|
/* fixup doctype if missing */
|
||||||
Bool TY_(FixDocType)( TidyDocImpl* doc );
|
TY_PRIVATE Bool TY_(FixDocType)( TidyDocImpl* doc );
|
||||||
|
|
||||||
/* ensure XML document starts with <?xml version="1.0"?> */
|
/* ensure XML document starts with <?xml version="1.0"?> */
|
||||||
/* add encoding attribute if not using ASCII or UTF-8 output */
|
/* add encoding attribute if not using ASCII or UTF-8 output */
|
||||||
Bool TY_(FixXmlDecl)( TidyDocImpl* doc );
|
TY_PRIVATE Bool TY_(FixXmlDecl)( TidyDocImpl* doc );
|
||||||
|
|
||||||
Node* TY_(InferredTag)(TidyDocImpl* doc, TidyTagId id);
|
TY_PRIVATE Node* TY_(InferredTag)(TidyDocImpl* doc, TidyTagId id);
|
||||||
|
|
||||||
void TY_(UngetToken)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(UngetToken)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -514,23 +514,23 @@ typedef enum
|
||||||
CdataContent
|
CdataContent
|
||||||
} GetTokenMode;
|
} GetTokenMode;
|
||||||
|
|
||||||
Node* TY_(GetToken)( TidyDocImpl* doc, GetTokenMode mode );
|
TY_PRIVATE Node* TY_(GetToken)( TidyDocImpl* doc, GetTokenMode mode );
|
||||||
|
|
||||||
void TY_(InitMap)(void);
|
TY_PRIVATE void TY_(InitMap)(void);
|
||||||
|
|
||||||
|
|
||||||
/* create a new attribute */
|
/* create a new attribute */
|
||||||
AttVal* TY_(NewAttribute)( TidyDocImpl* doc );
|
TY_PRIVATE AttVal* TY_(NewAttribute)( TidyDocImpl* doc );
|
||||||
|
|
||||||
/* create a new attribute with given name and value */
|
/* create a new attribute with given name and value */
|
||||||
AttVal* TY_(NewAttributeEx)( TidyDocImpl* doc, ctmbstr name, ctmbstr value,
|
TY_PRIVATE AttVal* TY_(NewAttributeEx)( TidyDocImpl* doc, ctmbstr name, ctmbstr value,
|
||||||
int delim );
|
int delim );
|
||||||
|
|
||||||
/* insert attribute at the end of attribute list of a node */
|
/* insert attribute at the end of attribute list of a node */
|
||||||
void TY_(InsertAttributeAtEnd)( Node *node, AttVal *av );
|
TY_PRIVATE void TY_(InsertAttributeAtEnd)( Node *node, AttVal *av );
|
||||||
|
|
||||||
/* insert attribute at the start of attribute list of a node */
|
/* insert attribute at the start of attribute list of a node */
|
||||||
void TY_(InsertAttributeAtStart)( Node *node, AttVal *av );
|
TY_PRIVATE void TY_(InsertAttributeAtStart)( Node *node, AttVal *av );
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
In-line Stack functions
|
In-line Stack functions
|
||||||
|
@ -538,7 +538,7 @@ void TY_(InsertAttributeAtStart)( Node *node, AttVal *av );
|
||||||
|
|
||||||
|
|
||||||
/* duplicate attributes */
|
/* duplicate attributes */
|
||||||
AttVal* TY_(DupAttrs)( TidyDocImpl* doc, AttVal* attrs );
|
TY_PRIVATE AttVal* TY_(DupAttrs)( TidyDocImpl* doc, AttVal* attrs );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
push a copy of an inline node onto stack
|
push a copy of an inline node onto stack
|
||||||
|
@ -556,13 +556,13 @@ AttVal* TY_(DupAttrs)( TidyDocImpl* doc, AttVal* attrs );
|
||||||
<p><em>text</em></p>
|
<p><em>text</em></p>
|
||||||
<p><em><em>more text</em></em>
|
<p><em><em>more text</em></em>
|
||||||
*/
|
*/
|
||||||
void TY_(PushInline)( TidyDocImpl* doc, Node* node );
|
TY_PRIVATE void TY_(PushInline)( TidyDocImpl* doc, Node* node );
|
||||||
|
|
||||||
/* pop inline stack */
|
/* pop inline stack */
|
||||||
void TY_(PopInline)( TidyDocImpl* doc, Node* node );
|
TY_PRIVATE void TY_(PopInline)( TidyDocImpl* doc, Node* node );
|
||||||
|
|
||||||
Bool TY_(IsPushed)( TidyDocImpl* doc, Node* node );
|
TY_PRIVATE Bool TY_(IsPushed)( TidyDocImpl* doc, Node* node );
|
||||||
Bool TY_(IsPushedLast)( TidyDocImpl* doc, Node *element, Node *node );
|
TY_PRIVATE Bool TY_(IsPushedLast)( TidyDocImpl* doc, Node *element, Node *node );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This has the effect of inserting "missing" inline
|
This has the effect of inserting "missing" inline
|
||||||
|
@ -581,18 +581,18 @@ Bool TY_(IsPushedLast)( TidyDocImpl* doc, Node *element, Node *node );
|
||||||
where it gets tokens from the inline stack rather than
|
where it gets tokens from the inline stack rather than
|
||||||
from the input stream.
|
from the input stream.
|
||||||
*/
|
*/
|
||||||
int TY_(InlineDup)( TidyDocImpl* doc, Node *node );
|
TY_PRIVATE int TY_(InlineDup)( TidyDocImpl* doc, Node *node );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
defer duplicates when entering a table or other
|
defer duplicates when entering a table or other
|
||||||
element where the inlines shouldn't be duplicated
|
element where the inlines shouldn't be duplicated
|
||||||
*/
|
*/
|
||||||
void TY_(DeferDup)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(DeferDup)( TidyDocImpl* doc );
|
||||||
Node* TY_(InsertedToken)( TidyDocImpl* doc );
|
TY_PRIVATE Node* TY_(InsertedToken)( TidyDocImpl* doc );
|
||||||
|
|
||||||
/* stack manipulation for inline elements */
|
/* stack manipulation for inline elements */
|
||||||
Bool TY_(SwitchInline)( TidyDocImpl* doc, Node* element, Node* node );
|
TY_PRIVATE Bool TY_(SwitchInline)( TidyDocImpl* doc, Node* element, Node* node );
|
||||||
Bool TY_(InlineDup1)( TidyDocImpl* doc, Node* node, Node* element );
|
TY_PRIVATE Bool TY_(InlineDup1)( TidyDocImpl* doc, Node* node, Node* element );
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -1073,7 +1073,7 @@ static struct _dialogueDispatchTable {
|
||||||
** every message, because they're not all the complex and there aren't that
|
** every message, because they're not all the complex and there aren't that
|
||||||
** many.
|
** many.
|
||||||
*/
|
*/
|
||||||
TidyMessageImpl *formatDialogue( TidyDocImpl* doc, uint code, TidyReportLevel level, va_list args )
|
static TidyMessageImpl *formatDialogue( TidyDocImpl* doc, uint code, TidyReportLevel level, va_list args )
|
||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
|
|
@ -66,12 +66,12 @@
|
||||||
/**
|
/**
|
||||||
* Returns the release date of this instance of HTML Tidy.
|
* Returns the release date of this instance of HTML Tidy.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(ReleaseDate)(void);
|
TY_PRIVATE ctmbstr TY_(ReleaseDate)(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the release version of this instance of HTML Tidy.
|
* Returns the release version of this instance of HTML Tidy.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(tidyLibraryVersion)(void);
|
TY_PRIVATE ctmbstr TY_(tidyLibraryVersion)(void);
|
||||||
|
|
||||||
|
|
||||||
/** @} message_releaseinfo group */
|
/** @} message_releaseinfo group */
|
||||||
|
@ -105,7 +105,7 @@ ctmbstr TY_(tidyLibraryVersion)(void);
|
||||||
* The designated report writing function. When a proper formatter exists,
|
* The designated report writing function. When a proper formatter exists,
|
||||||
* this one function can hanle all report output.
|
* this one function can hanle all report output.
|
||||||
*/
|
*/
|
||||||
void TY_(Report)(TidyDocImpl* doc, Node *element, Node *node, uint code, ...);
|
TY_PRIVATE void TY_(Report)(TidyDocImpl* doc, Node *element, Node *node, uint code, ...);
|
||||||
|
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
@ -117,16 +117,16 @@ void TY_(Report)(TidyDocImpl* doc, Node *element, Node *node, uint code, ...);
|
||||||
/** @{ */
|
/** @{ */
|
||||||
|
|
||||||
|
|
||||||
void TY_(ReportAccessError)( TidyDocImpl* doc, Node* node, uint code );
|
TY_PRIVATE void TY_(ReportAccessError)( TidyDocImpl* doc, Node* node, uint code );
|
||||||
void TY_(ReportAttrError)(TidyDocImpl* doc, Node *node, AttVal *av, uint code);
|
TY_PRIVATE void TY_(ReportAttrError)(TidyDocImpl* doc, Node *node, AttVal *av, uint code);
|
||||||
void TY_(ReportBadArgument)( TidyDocImpl* doc, ctmbstr option );
|
TY_PRIVATE void TY_(ReportBadArgument)( TidyDocImpl* doc, ctmbstr option );
|
||||||
void TY_(ReportEntityError)( TidyDocImpl* doc, uint code, ctmbstr entity, int c );
|
TY_PRIVATE void TY_(ReportEntityError)( TidyDocImpl* doc, uint code, ctmbstr entity, int c );
|
||||||
void TY_(ReportFileError)( TidyDocImpl* doc, ctmbstr file, uint code );
|
TY_PRIVATE void TY_(ReportFileError)( TidyDocImpl* doc, ctmbstr file, uint code );
|
||||||
void TY_(ReportEncodingError)(TidyDocImpl* doc, uint code, uint c, Bool discarded);
|
TY_PRIVATE void TY_(ReportEncodingError)(TidyDocImpl* doc, uint code, uint c, Bool discarded);
|
||||||
void TY_(ReportEncodingWarning)(TidyDocImpl* doc, uint code, uint encoding);
|
TY_PRIVATE void TY_(ReportEncodingWarning)(TidyDocImpl* doc, uint code, uint encoding);
|
||||||
void TY_(ReportMissingAttr)( TidyDocImpl* doc, Node* node, ctmbstr name );
|
TY_PRIVATE void TY_(ReportMissingAttr)( TidyDocImpl* doc, Node* node, ctmbstr name );
|
||||||
void TY_(ReportSurrogateError)(TidyDocImpl* doc, uint code, uint c1, uint c2);
|
TY_PRIVATE void TY_(ReportSurrogateError)(TidyDocImpl* doc, uint code, uint c1, uint c2);
|
||||||
void TY_(ReportUnknownOption)( TidyDocImpl* doc, ctmbstr option );
|
TY_PRIVATE void TY_(ReportUnknownOption)( TidyDocImpl* doc, ctmbstr option );
|
||||||
|
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
@ -141,7 +141,7 @@ void TY_(ReportUnknownOption)( TidyDocImpl* doc, ctmbstr option );
|
||||||
* Emits a single dialogue message, and is capable of accepting a variadic
|
* Emits a single dialogue message, and is capable of accepting a variadic
|
||||||
* that is passed to the correct message formatter as needed.
|
* that is passed to the correct message formatter as needed.
|
||||||
*/
|
*/
|
||||||
void TY_(Dialogue)( TidyDocImpl* doc, uint code, ... );
|
TY_PRIVATE void TY_(Dialogue)( TidyDocImpl* doc, uint code, ... );
|
||||||
|
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
@ -157,7 +157,7 @@ void TY_(Dialogue)( TidyDocImpl* doc, uint code, ... );
|
||||||
* @todo: This name is a bit misleading and should probably be renamed to
|
* @todo: This name is a bit misleading and should probably be renamed to
|
||||||
* indicate its focus on printing footnotes.
|
* indicate its focus on printing footnotes.
|
||||||
*/
|
*/
|
||||||
void TY_(ErrorSummary)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(ErrorSummary)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -166,7 +166,7 @@ void TY_(ErrorSummary)( TidyDocImpl* doc );
|
||||||
* Called by `tidyRunDiagnostics()`, from console.
|
* Called by `tidyRunDiagnostics()`, from console.
|
||||||
* Called by `tidyDocReportDoctype()`, currently unused.
|
* Called by `tidyDocReportDoctype()`, currently unused.
|
||||||
*/
|
*/
|
||||||
void TY_(ReportMarkupVersion)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(ReportMarkupVersion)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -174,7 +174,7 @@ void TY_(ReportMarkupVersion)( TidyDocImpl* doc );
|
||||||
* inforation.
|
* inforation.
|
||||||
* Called by `tidyRunDiagnostics()`, from console.
|
* Called by `tidyRunDiagnostics()`, from console.
|
||||||
*/
|
*/
|
||||||
void TY_(ReportNumWarnings)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(ReportNumWarnings)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
@ -201,27 +201,27 @@ typedef struct _mutedMessages {
|
||||||
/** Frees the list of muted messages.
|
/** Frees the list of muted messages.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
*/
|
*/
|
||||||
void TY_(FreeMutedMessageList)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(FreeMutedMessageList)( TidyDocImpl* doc );
|
||||||
|
|
||||||
/** Adds a new message ID to the list of muted messages.
|
/** Adds a new message ID to the list of muted messages.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
** @param opt The option that is defining the muted message.
|
** @param opt The option that is defining the muted message.
|
||||||
** @param name The message code as a string.
|
** @param name The message code as a string.
|
||||||
*/
|
*/
|
||||||
void TY_(DefineMutedMessage)( TidyDocImpl* doc, const TidyOptionImpl* opt, ctmbstr name );
|
TY_PRIVATE void TY_(DefineMutedMessage)( TidyDocImpl* doc, const TidyOptionImpl* opt, ctmbstr name );
|
||||||
|
|
||||||
/** Start an iterator for muted messages.
|
/** Start an iterator for muted messages.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
** @returns Returns an iterator token.
|
** @returns Returns an iterator token.
|
||||||
*/
|
*/
|
||||||
TidyIterator TY_(getMutedMessageList)( TidyDocImpl* doc );
|
TY_PRIVATE TidyIterator TY_(getMutedMessageList)( TidyDocImpl* doc );
|
||||||
|
|
||||||
/** Get the next priority attribute.
|
/** Get the next priority attribute.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
** @param iter The iterator token.
|
** @param iter The iterator token.
|
||||||
** @returns The next priority attribute.
|
** @returns The next priority attribute.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(getNextMutedMessage)( TidyDocImpl* doc, TidyIterator* iter );
|
TY_PRIVATE ctmbstr TY_(getNextMutedMessage)( TidyDocImpl* doc, TidyIterator* iter );
|
||||||
|
|
||||||
|
|
||||||
/** @} message_muting group */
|
/** @} message_muting group */
|
||||||
|
@ -245,13 +245,13 @@ ctmbstr TY_(getNextMutedMessage)( TidyDocImpl* doc, TidyIterator* iter );
|
||||||
* `TidyReportCallback` will return this general string as the report
|
* `TidyReportCallback` will return this general string as the report
|
||||||
* message key.
|
* message key.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(tidyErrorCodeAsKey)(uint code);
|
TY_PRIVATE ctmbstr TY_(tidyErrorCodeAsKey)(uint code);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given an error code string, return the integer value of it, or UINT_MAX
|
* Given an error code string, return the integer value of it, or UINT_MAX
|
||||||
* as an error flag.
|
* as an error flag.
|
||||||
*/
|
*/
|
||||||
uint TY_(tidyErrorCodeFromKey)(ctmbstr code);
|
TY_PRIVATE uint TY_(tidyErrorCodeFromKey)(ctmbstr code);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -260,14 +260,14 @@ uint TY_(tidyErrorCodeFromKey)(ctmbstr code);
|
||||||
* `TidyReportFilter3`.
|
* `TidyReportFilter3`.
|
||||||
* Items can be retrieved with getNextErrorCode();
|
* Items can be retrieved with getNextErrorCode();
|
||||||
*/
|
*/
|
||||||
TidyIterator TY_(getErrorCodeList)(void);
|
TY_PRIVATE TidyIterator TY_(getErrorCodeList)(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the next error code having initialized the iterator
|
* Returns the next error code having initialized the iterator
|
||||||
* with `getErrorCodeList()`. You can use tidyErrorCodeAsKey
|
* with `getErrorCodeList()`. You can use tidyErrorCodeAsKey
|
||||||
* to determine the key for this value.
|
* to determine the key for this value.
|
||||||
*/
|
*/
|
||||||
uint TY_(getNextErrorCode)( TidyIterator* iter );
|
TY_PRIVATE uint TY_(getNextErrorCode)( TidyIterator* iter );
|
||||||
|
|
||||||
|
|
||||||
/** @} message_keydiscovery group */
|
/** @} message_keydiscovery group */
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
/** Creates a TidyMessageImpl, but without line numbers, such as used for
|
/** Creates a TidyMessageImpl, but without line numbers, such as used for
|
||||||
** information report output.
|
** information report output.
|
||||||
*/
|
*/
|
||||||
TidyMessageImpl *TY_(tidyMessageCreate)( TidyDocImpl *doc,
|
TY_PRIVATE TidyMessageImpl *TY_(tidyMessageCreate)( TidyDocImpl *doc,
|
||||||
uint code,
|
uint code,
|
||||||
TidyReportLevel level,
|
TidyReportLevel level,
|
||||||
... );
|
... );
|
||||||
|
@ -37,7 +37,7 @@ TidyMessageImpl *TY_(tidyMessageCreate)( TidyDocImpl *doc,
|
||||||
/** Creates a TidyMessageImpl, using the line and column from the provided
|
/** Creates a TidyMessageImpl, using the line and column from the provided
|
||||||
** Node as the message position source.
|
** Node as the message position source.
|
||||||
*/
|
*/
|
||||||
TidyMessageImpl *TY_(tidyMessageCreateWithNode)( TidyDocImpl *doc,
|
TY_PRIVATE TidyMessageImpl *TY_(tidyMessageCreateWithNode)( TidyDocImpl *doc,
|
||||||
Node *node,
|
Node *node,
|
||||||
uint code,
|
uint code,
|
||||||
TidyReportLevel level,
|
TidyReportLevel level,
|
||||||
|
@ -46,7 +46,7 @@ TidyMessageImpl *TY_(tidyMessageCreateWithNode)( TidyDocImpl *doc,
|
||||||
/** Creates a TidyMessageImpl, using the line and column from the provided
|
/** Creates a TidyMessageImpl, using the line and column from the provided
|
||||||
** document's Lexer as the message position source.
|
** document's Lexer as the message position source.
|
||||||
*/
|
*/
|
||||||
TidyMessageImpl *TY_(tidyMessageCreateWithLexer)( TidyDocImpl *doc,
|
TY_PRIVATE TidyMessageImpl *TY_(tidyMessageCreateWithLexer)( TidyDocImpl *doc,
|
||||||
uint code,
|
uint code,
|
||||||
TidyReportLevel level,
|
TidyReportLevel level,
|
||||||
... );
|
... );
|
||||||
|
@ -54,7 +54,7 @@ TidyMessageImpl *TY_(tidyMessageCreateWithLexer)( TidyDocImpl *doc,
|
||||||
/** Deallocates a TidyMessageImpl in order to free up its allocated memory
|
/** Deallocates a TidyMessageImpl in order to free up its allocated memory
|
||||||
** when you're done using it.
|
** when you're done using it.
|
||||||
*/
|
*/
|
||||||
void TY_(tidyMessageRelease)( TidyMessageImpl *message );
|
TY_PRIVATE void TY_(tidyMessageRelease)( TidyMessageImpl *message );
|
||||||
|
|
||||||
|
|
||||||
/** @} end messageobj_instantiation group */
|
/** @} end messageobj_instantiation group */
|
||||||
|
@ -63,55 +63,55 @@ void TY_(tidyMessageRelease)( TidyMessageImpl *message );
|
||||||
|
|
||||||
|
|
||||||
/** get the document the message came from. */
|
/** get the document the message came from. */
|
||||||
TidyDocImpl* TY_(getMessageDoc)( TidyMessageImpl message );
|
TY_PRIVATE TidyDocImpl* TY_(getMessageDoc)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** get the message key code. */
|
/** get the message key code. */
|
||||||
uint TY_(getMessageCode)( TidyMessageImpl message );
|
TY_PRIVATE uint TY_(getMessageCode)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** get the message key string. */
|
/** get the message key string. */
|
||||||
ctmbstr TY_(getMessageKey)( TidyMessageImpl message );
|
TY_PRIVATE ctmbstr TY_(getMessageKey)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** get the line number the message applies to. */
|
/** get the line number the message applies to. */
|
||||||
int TY_(getMessageLine)( TidyMessageImpl message );
|
TY_PRIVATE int TY_(getMessageLine)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** get the column the message applies to. */
|
/** get the column the message applies to. */
|
||||||
int TY_(getMessageColumn)( TidyMessageImpl message );
|
TY_PRIVATE int TY_(getMessageColumn)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** get the TidyReportLevel of the message. */
|
/** get the TidyReportLevel of the message. */
|
||||||
TidyReportLevel TY_(getMessageLevel)( TidyMessageImpl message );
|
TY_PRIVATE TidyReportLevel TY_(getMessageLevel)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** get whether or not the message was muted by the configuration. */
|
/** get whether or not the message was muted by the configuration. */
|
||||||
Bool TY_(getMessageIsMuted)( TidyMessageImpl message );
|
TY_PRIVATE Bool TY_(getMessageIsMuted)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** the built-in format string */
|
/** the built-in format string */
|
||||||
ctmbstr TY_(getMessageFormatDefault)( TidyMessageImpl message );
|
TY_PRIVATE ctmbstr TY_(getMessageFormatDefault)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** the localized format string */
|
/** the localized format string */
|
||||||
ctmbstr TY_(getMessageFormat)( TidyMessageImpl message );
|
TY_PRIVATE ctmbstr TY_(getMessageFormat)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** the message, formatted, default language */
|
/** the message, formatted, default language */
|
||||||
ctmbstr TY_(getMessageDefault)( TidyMessageImpl message );
|
TY_PRIVATE ctmbstr TY_(getMessageDefault)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** the message, formatted, localized */
|
/** the message, formatted, localized */
|
||||||
ctmbstr TY_(getMessage)( TidyMessageImpl message );
|
TY_PRIVATE ctmbstr TY_(getMessage)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** the position part, default language */
|
/** the position part, default language */
|
||||||
ctmbstr TY_(getMessagePosDefault)( TidyMessageImpl message );
|
TY_PRIVATE ctmbstr TY_(getMessagePosDefault)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** the position part, localized */
|
/** the position part, localized */
|
||||||
ctmbstr TY_(getMessagePos)( TidyMessageImpl message );
|
TY_PRIVATE ctmbstr TY_(getMessagePos)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** the prefix part, default language */
|
/** the prefix part, default language */
|
||||||
ctmbstr TY_(getMessagePrefixDefault)( TidyMessageImpl message );
|
TY_PRIVATE ctmbstr TY_(getMessagePrefixDefault)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** the prefix part, localized */
|
/** the prefix part, localized */
|
||||||
ctmbstr TY_(getMessagePrefix)( TidyMessageImpl message );
|
TY_PRIVATE ctmbstr TY_(getMessagePrefix)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** the complete message, as would be output in the CLI */
|
/** the complete message, as would be output in the CLI */
|
||||||
ctmbstr TY_(getMessageOutputDefault)( TidyMessageImpl message );
|
TY_PRIVATE ctmbstr TY_(getMessageOutputDefault)( TidyMessageImpl message );
|
||||||
|
|
||||||
/* the complete message, as would be output in the CLI, localized */
|
/* the complete message, as would be output in the CLI, localized */
|
||||||
ctmbstr TY_(getMessageOutput)( TidyMessageImpl message );
|
TY_PRIVATE ctmbstr TY_(getMessageOutput)( TidyMessageImpl message );
|
||||||
|
|
||||||
|
|
||||||
/** @} end messageobj_message_api group */
|
/** @} end messageobj_message_api group */
|
||||||
|
@ -123,19 +123,19 @@ ctmbstr TY_(getMessageOutput)( TidyMessageImpl message );
|
||||||
* argument. Use `TY_(getNextMEssageArgument)` to get an opaque instance of
|
* argument. Use `TY_(getNextMEssageArgument)` to get an opaque instance of
|
||||||
* `TidyMessageArgument` for which the subsequent interrogators will be of use.
|
* `TidyMessageArgument` for which the subsequent interrogators will be of use.
|
||||||
*/
|
*/
|
||||||
TidyIterator TY_(getMessageArguments)( TidyMessageImpl message );
|
TY_PRIVATE TidyIterator TY_(getMessageArguments)( TidyMessageImpl message );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the next `TidyMessageArgument`, for the given message, which can
|
* Returns the next `TidyMessageArgument`, for the given message, which can
|
||||||
* then be interrogated with the API, and advances the iterator.
|
* then be interrogated with the API, and advances the iterator.
|
||||||
*/
|
*/
|
||||||
TidyMessageArgument TY_(getNextMessageArgument)( TidyMessageImpl message, TidyIterator* iter );
|
TY_PRIVATE TidyMessageArgument TY_(getNextMessageArgument)( TidyMessageImpl message, TidyIterator* iter );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the `TidyFormatParameterType` of the given message argument.
|
* Returns the `TidyFormatParameterType` of the given message argument.
|
||||||
*/
|
*/
|
||||||
TidyFormatParameterType TY_(getArgType)( TidyMessageImpl message, TidyMessageArgument* arg );
|
TY_PRIVATE TidyFormatParameterType TY_(getArgType)( TidyMessageImpl message, TidyMessageArgument* arg );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -143,14 +143,14 @@ TidyFormatParameterType TY_(getArgType)( TidyMessageImpl message, TidyMessageArg
|
||||||
* this string is cleared upon termination of the callback, so do be sure to
|
* this string is cleared upon termination of the callback, so do be sure to
|
||||||
* make your own copy.
|
* make your own copy.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(getArgFormat)( TidyMessageImpl message, TidyMessageArgument* arg );
|
TY_PRIVATE ctmbstr TY_(getArgFormat)( TidyMessageImpl message, TidyMessageArgument* arg );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the string value of the given message argument. An assertion
|
* Returns the string value of the given message argument. An assertion
|
||||||
* will be generated if the argument type is not a string.
|
* will be generated if the argument type is not a string.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(getArgValueString)( TidyMessageImpl message, TidyMessageArgument* arg );
|
TY_PRIVATE ctmbstr TY_(getArgValueString)( TidyMessageImpl message, TidyMessageArgument* arg );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -158,21 +158,21 @@ ctmbstr TY_(getArgValueString)( TidyMessageImpl message, TidyMessageArgument* ar
|
||||||
* assertion will be generated if the argument type is not an unsigned
|
* assertion will be generated if the argument type is not an unsigned
|
||||||
* integer.
|
* integer.
|
||||||
*/
|
*/
|
||||||
uint TY_(getArgValueUInt)( TidyMessageImpl message, TidyMessageArgument* arg );
|
TY_PRIVATE uint TY_(getArgValueUInt)( TidyMessageImpl message, TidyMessageArgument* arg );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the integer value of the given message argument. An assertion
|
* Returns the integer value of the given message argument. An assertion
|
||||||
* will be generated if the argument type is not an integer.
|
* will be generated if the argument type is not an integer.
|
||||||
*/
|
*/
|
||||||
int TY_(getArgValueInt)( TidyMessageImpl message, TidyMessageArgument* arg );
|
TY_PRIVATE int TY_(getArgValueInt)( TidyMessageImpl message, TidyMessageArgument* arg );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the double value of the given message argument. An assertion
|
* Returns the double value of the given message argument. An assertion
|
||||||
* will be generated if the argument type is not a double.
|
* will be generated if the argument type is not a double.
|
||||||
*/
|
*/
|
||||||
double TY_(getArgValueDouble)( TidyMessageImpl message, TidyMessageArgument* arg );
|
TY_PRIVATE double TY_(getArgValueDouble)( TidyMessageImpl message, TidyMessageArgument* arg );
|
||||||
|
|
||||||
|
|
||||||
/** @} end messageobj_args_api group */
|
/** @} end messageobj_args_api group */
|
||||||
|
|
|
@ -1536,7 +1536,7 @@ void TY_(ParseNamespace)(TidyDocImpl* doc, Node *basenode, GetTokenMode mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode )
|
TY_PRIVATE void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode )
|
||||||
{
|
{
|
||||||
#if defined(ENABLE_DEBUG_LOG)
|
#if defined(ENABLE_DEBUG_LOG)
|
||||||
static int in_parse_inline = 0;
|
static int in_parse_inline = 0;
|
||||||
|
@ -3738,7 +3738,7 @@ void TY_(ParseHead)(TidyDocImpl* doc, Node *head, GetTokenMode ARG_UNUSED(mode))
|
||||||
* Issue #166 - repeated <main> element
|
* Issue #166 - repeated <main> element
|
||||||
* But this service is generalised to check for other duplicate elements
|
* But this service is generalised to check for other duplicate elements
|
||||||
\*/
|
\*/
|
||||||
Bool TY_(FindNodeWithId)( Node *node, TidyTagId tid )
|
static Bool TY_(FindNodeWithId)( Node *node, TidyTagId tid )
|
||||||
{
|
{
|
||||||
Node *content;
|
Node *content;
|
||||||
while (node)
|
while (node)
|
||||||
|
@ -3768,7 +3768,7 @@ Bool TY_(FindNodeWithId)( Node *node, TidyTagId tid )
|
||||||
* Issue #166 - repeated <main> element
|
* Issue #166 - repeated <main> element
|
||||||
* Do a global search for an element
|
* Do a global search for an element
|
||||||
\*/
|
\*/
|
||||||
Bool TY_(FindNodeById)( TidyDocImpl* doc, TidyTagId tid )
|
static Bool TY_(FindNodeById)( TidyDocImpl* doc, TidyTagId tid )
|
||||||
{
|
{
|
||||||
Node *node = (doc ? doc->root.content : NULL);
|
Node *node = (doc ? doc->root.content : NULL);
|
||||||
return TY_(FindNodeWithId)(node,tid);
|
return TY_(FindNodeWithId)(node,tid);
|
||||||
|
|
34
src/parser.h
34
src/parser.h
|
@ -49,7 +49,7 @@
|
||||||
* @param node The root node for the integrity check.
|
* @param node The root node for the integrity check.
|
||||||
* @returns Returns yes or no indicating integrity of the node structure.
|
* @returns Returns yes or no indicating integrity of the node structure.
|
||||||
*/
|
*/
|
||||||
Bool TY_(CheckNodeIntegrity)(Node *node);
|
TY_PRIVATE Bool TY_(CheckNodeIntegrity)(Node *node);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,7 +60,7 @@ Bool TY_(CheckNodeIntegrity)(Node *node);
|
||||||
* @param node The node to check.
|
* @param node The node to check.
|
||||||
* @returns The result of the check.
|
* @returns The result of the check.
|
||||||
*/
|
*/
|
||||||
Bool TY_(TextNodeEndWithSpace)( Lexer *lexer, Node *node );
|
TY_PRIVATE Bool TY_(TextNodeEndWithSpace)( Lexer *lexer, Node *node );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -70,7 +70,7 @@ Bool TY_(TextNodeEndWithSpace)( Lexer *lexer, Node *node );
|
||||||
* @param node The node to check.
|
* @param node The node to check.
|
||||||
* @returns The result of the check.
|
* @returns The result of the check.
|
||||||
*/
|
*/
|
||||||
Bool TY_(IsNewNode)(Node *node);
|
TY_PRIVATE Bool TY_(IsNewNode)(Node *node);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -83,7 +83,7 @@ Bool TY_(IsNewNode)(Node *node);
|
||||||
* @param expected If the old node was not expected to be found in this
|
* @param expected If the old node was not expected to be found in this
|
||||||
* particular location, a report will be generated.
|
* particular location, a report will be generated.
|
||||||
*/
|
*/
|
||||||
void TY_(CoerceNode)(TidyDocImpl* doc, Node *node, TidyTagId tid, Bool obsolete, Bool expected);
|
TY_PRIVATE void TY_(CoerceNode)(TidyDocImpl* doc, Node *node, TidyTagId tid, Bool obsolete, Bool expected);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -91,7 +91,7 @@ void TY_(CoerceNode)(TidyDocImpl* doc, Node *node, TidyTagId tid, Bool obsolete,
|
||||||
* @param node The node to remove.
|
* @param node The node to remove.
|
||||||
* @returns Returns the removed node.
|
* @returns Returns the removed node.
|
||||||
*/
|
*/
|
||||||
Node *TY_(RemoveNode)(Node *node);
|
TY_PRIVATE Node *TY_(RemoveNode)(Node *node);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -100,7 +100,7 @@ Node *TY_(RemoveNode)(Node *node);
|
||||||
* @param element The node to discard.
|
* @param element The node to discard.
|
||||||
* @returns Returns the next node.
|
* @returns Returns the next node.
|
||||||
*/
|
*/
|
||||||
Node *TY_(DiscardElement)( TidyDocImpl* doc, Node *element);
|
TY_PRIVATE Node *TY_(DiscardElement)( TidyDocImpl* doc, Node *element);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -108,7 +108,7 @@ Node *TY_(DiscardElement)( TidyDocImpl* doc, Node *element);
|
||||||
* @param element The new destination node.
|
* @param element The new destination node.
|
||||||
* @param node The node to insert.
|
* @param node The node to insert.
|
||||||
*/
|
*/
|
||||||
void TY_(InsertNodeAtStart)(Node *element, Node *node);
|
TY_PRIVATE void TY_(InsertNodeAtStart)(Node *element, Node *node);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -116,7 +116,7 @@ void TY_(InsertNodeAtStart)(Node *element, Node *node);
|
||||||
* @param element The new destination node.
|
* @param element The new destination node.
|
||||||
* @param node The node to insert.
|
* @param node The node to insert.
|
||||||
*/
|
*/
|
||||||
void TY_(InsertNodeAtEnd)(Node *element, Node *node);
|
TY_PRIVATE void TY_(InsertNodeAtEnd)(Node *element, Node *node);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -124,7 +124,7 @@ void TY_(InsertNodeAtEnd)(Node *element, Node *node);
|
||||||
* @param element The node before which the node is inserted.
|
* @param element The node before which the node is inserted.
|
||||||
* @param node The node to insert.
|
* @param node The node to insert.
|
||||||
*/
|
*/
|
||||||
void TY_(InsertNodeBeforeElement)(Node *element, Node *node);
|
TY_PRIVATE void TY_(InsertNodeBeforeElement)(Node *element, Node *node);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -132,7 +132,7 @@ void TY_(InsertNodeBeforeElement)(Node *element, Node *node);
|
||||||
* @param element The node after which the node is inserted.
|
* @param element The node after which the node is inserted.
|
||||||
* @param node The node to insert.
|
* @param node The node to insert.
|
||||||
*/
|
*/
|
||||||
void TY_(InsertNodeAfterElement)(Node *element, Node *node);
|
TY_PRIVATE void TY_(InsertNodeAfterElement)(Node *element, Node *node);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -141,7 +141,7 @@ void TY_(InsertNodeAfterElement)(Node *element, Node *node);
|
||||||
* @param element The element to trim.
|
* @param element The element to trim.
|
||||||
* @returns Returns the next node.
|
* @returns Returns the next node.
|
||||||
*/
|
*/
|
||||||
Node *TY_(TrimEmptyElement)( TidyDocImpl* doc, Node *element );
|
TY_PRIVATE Node *TY_(TrimEmptyElement)( TidyDocImpl* doc, Node *element );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -150,7 +150,7 @@ Node *TY_(TrimEmptyElement)( TidyDocImpl* doc, Node *element );
|
||||||
* @param node The element to trim.
|
* @param node The element to trim.
|
||||||
* @returns Returns the next node.
|
* @returns Returns the next node.
|
||||||
*/
|
*/
|
||||||
Node* TY_(DropEmptyElements)(TidyDocImpl* doc, Node* node);
|
TY_PRIVATE Node* TY_(DropEmptyElements)(TidyDocImpl* doc, Node* node);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -160,7 +160,7 @@ Node* TY_(DropEmptyElements)(TidyDocImpl* doc, Node* node);
|
||||||
* @param node The node to test.
|
* @param node The node to test.
|
||||||
* @returns Returns the result of the test.
|
* @returns Returns the result of the test.
|
||||||
*/
|
*/
|
||||||
Bool TY_(IsBlank)(Lexer *lexer, Node *node);
|
TY_PRIVATE Bool TY_(IsBlank)(Lexer *lexer, Node *node);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -169,7 +169,7 @@ Bool TY_(IsBlank)(Lexer *lexer, Node *node);
|
||||||
* @param node The node to test.
|
* @param node The node to test.
|
||||||
* @returns Returns the result of the test.
|
* @returns Returns the result of the test.
|
||||||
*/
|
*/
|
||||||
Bool TY_(IsJavaScript)(Node *node);
|
TY_PRIVATE Bool TY_(IsJavaScript)(Node *node);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -178,7 +178,7 @@ Bool TY_(IsJavaScript)(Node *node);
|
||||||
* remaining nodes. HTML is the root node.
|
* remaining nodes. HTML is the root node.
|
||||||
* @param doc The Tidy document.
|
* @param doc The Tidy document.
|
||||||
*/
|
*/
|
||||||
void TY_(ParseDocument)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(ParseDocument)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -188,14 +188,14 @@ void TY_(ParseDocument)( TidyDocImpl* doc );
|
||||||
* @param element The node to test.
|
* @param element The node to test.
|
||||||
* @returns Returns the result of the test.
|
* @returns Returns the result of the test.
|
||||||
*/
|
*/
|
||||||
Bool TY_(XMLPreserveWhiteSpace)( TidyDocImpl* doc, Node *element );
|
TY_PRIVATE Bool TY_(XMLPreserveWhiteSpace)( TidyDocImpl* doc, Node *element );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses a document after lexing using the XML parser.
|
* Parses a document after lexing using the XML parser.
|
||||||
* @param doc The Tidy document.
|
* @param doc The Tidy document.
|
||||||
*/
|
*/
|
||||||
void TY_(ParseXMLDocument)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(ParseXMLDocument)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/** @} end parser_h group */
|
/** @} end parser_h group */
|
||||||
|
|
|
@ -713,7 +713,7 @@ static void PCondFlushLine( TidyDocImpl* doc, uint indent )
|
||||||
* These need to be used in the right place. In same cases `PFlushLine`
|
* These need to be used in the right place. In same cases `PFlushLine`
|
||||||
* and `PCondFlushLine` should still be used.
|
* and `PCondFlushLine` should still be used.
|
||||||
*/
|
*/
|
||||||
void TY_(PFlushLineSmart)( TidyDocImpl* doc, uint indent )
|
static void TY_(PFlushLineSmart)( TidyDocImpl* doc, uint indent )
|
||||||
{
|
{
|
||||||
TidyPrintImpl* pprint = &doc->pprint;
|
TidyPrintImpl* pprint = &doc->pprint;
|
||||||
|
|
||||||
|
|
16
src/pprint.h
16
src/pprint.h
|
@ -60,10 +60,10 @@ typedef struct _TidyPrintImpl
|
||||||
} TidyPrintImpl;
|
} TidyPrintImpl;
|
||||||
|
|
||||||
|
|
||||||
void TY_(InitPrintBuf)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(InitPrintBuf)( TidyDocImpl* doc );
|
||||||
void TY_(FreePrintBuf)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(FreePrintBuf)( TidyDocImpl* doc );
|
||||||
|
|
||||||
void TY_(PFlushLine)( TidyDocImpl* doc, uint indent );
|
TY_PRIVATE void TY_(PFlushLine)( TidyDocImpl* doc, uint indent );
|
||||||
|
|
||||||
|
|
||||||
/* print just the content of the body element.
|
/* print just the content of the body element.
|
||||||
|
@ -73,17 +73,17 @@ void TY_(PFlushLine)( TidyDocImpl* doc, uint indent );
|
||||||
** -- Sebastiano Vigna <vigna@dsi.unimi.it>
|
** -- Sebastiano Vigna <vigna@dsi.unimi.it>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void TY_(PrintBody)( TidyDocImpl* doc ); /* you can print an entire document */
|
TY_PRIVATE void TY_(PrintBody)( TidyDocImpl* doc ); /* you can print an entire document */
|
||||||
/* node as body using PPrintTree() */
|
/* node as body using PPrintTree() */
|
||||||
|
|
||||||
void TY_(PPrintTree)( TidyDocImpl* doc, uint mode, uint indent, Node *node );
|
TY_PRIVATE void TY_(PPrintTree)( TidyDocImpl* doc, uint mode, uint indent, Node *node );
|
||||||
|
|
||||||
void TY_(PPrintXMLTree)( TidyDocImpl* doc, uint mode, uint indent, Node *node );
|
TY_PRIVATE void TY_(PPrintXMLTree)( TidyDocImpl* doc, uint mode, uint indent, Node *node );
|
||||||
|
|
||||||
/*\
|
/*\
|
||||||
* 20150515 - support using tabs instead of spaces
|
* 20150515 - support using tabs instead of spaces
|
||||||
\*/
|
\*/
|
||||||
void TY_(PPrintTabs)(void);
|
TY_PRIVATE void TY_(PPrintTabs)(void);
|
||||||
void TY_(PPrintSpaces)(void);
|
TY_PRIVATE void TY_(PPrintSpaces)(void);
|
||||||
|
|
||||||
#endif /* __PPRINT_H__ */
|
#endif /* __PPRINT_H__ */
|
||||||
|
|
|
@ -83,17 +83,17 @@ struct _StreamIn
|
||||||
TidyDocImpl* doc;
|
TidyDocImpl* doc;
|
||||||
};
|
};
|
||||||
|
|
||||||
StreamIn* TY_(initStreamIn)( TidyDocImpl* doc, int encoding );
|
TY_PRIVATE StreamIn* TY_(initStreamIn)( TidyDocImpl* doc, int encoding );
|
||||||
void TY_(freeStreamIn)(StreamIn* in);
|
TY_PRIVATE void TY_(freeStreamIn)(StreamIn* in);
|
||||||
|
|
||||||
StreamIn* TY_(FileInput)( TidyDocImpl* doc, FILE* fp, int encoding );
|
TY_PRIVATE StreamIn* TY_(FileInput)( TidyDocImpl* doc, FILE* fp, int encoding );
|
||||||
StreamIn* TY_(BufferInput)( TidyDocImpl* doc, TidyBuffer* content, int encoding );
|
TY_PRIVATE StreamIn* TY_(BufferInput)( TidyDocImpl* doc, TidyBuffer* content, int encoding );
|
||||||
StreamIn* TY_(UserInput)( TidyDocImpl* doc, TidyInputSource* source, int encoding );
|
TY_PRIVATE StreamIn* TY_(UserInput)( TidyDocImpl* doc, TidyInputSource* source, int encoding );
|
||||||
|
|
||||||
int TY_(ReadBOMEncoding)(StreamIn *in);
|
TY_PRIVATE int TY_(ReadBOMEncoding)(StreamIn *in);
|
||||||
uint TY_(ReadChar)( StreamIn* in );
|
TY_PRIVATE uint TY_(ReadChar)( StreamIn* in );
|
||||||
void TY_(UngetChar)( uint c, StreamIn* in );
|
TY_PRIVATE void TY_(UngetChar)( uint c, StreamIn* in );
|
||||||
Bool TY_(IsEOF)( StreamIn* in );
|
TY_PRIVATE Bool TY_(IsEOF)( StreamIn* in );
|
||||||
|
|
||||||
|
|
||||||
/************************
|
/************************
|
||||||
|
@ -109,20 +109,20 @@ struct _StreamOut
|
||||||
TidyOutputSink sink;
|
TidyOutputSink sink;
|
||||||
};
|
};
|
||||||
|
|
||||||
StreamOut* TY_(FileOutput)( TidyDocImpl *doc, FILE* fp, int encoding, uint newln );
|
TY_PRIVATE StreamOut* TY_(FileOutput)( TidyDocImpl *doc, FILE* fp, int encoding, uint newln );
|
||||||
StreamOut* TY_(BufferOutput)( TidyDocImpl *doc, TidyBuffer* buf, int encoding, uint newln );
|
TY_PRIVATE StreamOut* TY_(BufferOutput)( TidyDocImpl *doc, TidyBuffer* buf, int encoding, uint newln );
|
||||||
StreamOut* TY_(UserOutput)( TidyDocImpl *doc, TidyOutputSink* sink, int encoding, uint newln );
|
TY_PRIVATE StreamOut* TY_(UserOutput)( TidyDocImpl *doc, TidyOutputSink* sink, int encoding, uint newln );
|
||||||
|
|
||||||
StreamOut* TY_(StdErrOutput)(void);
|
TY_PRIVATE StreamOut* TY_(StdErrOutput)(void);
|
||||||
/* StreamOut* StdOutOutput(void); */
|
/* StreamOut* StdOutOutput(void); */
|
||||||
void TY_(ReleaseStreamOut)( TidyDocImpl *doc, StreamOut* out );
|
TY_PRIVATE void TY_(ReleaseStreamOut)( TidyDocImpl *doc, StreamOut* out );
|
||||||
|
|
||||||
void TY_(WriteChar)( uint c, StreamOut* out );
|
TY_PRIVATE void TY_(WriteChar)( uint c, StreamOut* out );
|
||||||
void TY_(outBOM)( StreamOut *out );
|
TY_PRIVATE void TY_(outBOM)( StreamOut *out );
|
||||||
|
|
||||||
ctmbstr TY_(GetEncodingNameFromTidyId)(uint id);
|
TY_PRIVATE ctmbstr TY_(GetEncodingNameFromTidyId)(uint id);
|
||||||
ctmbstr TY_(GetEncodingOptNameFromTidyId)(uint id);
|
TY_PRIVATE ctmbstr TY_(GetEncodingOptNameFromTidyId)(uint id);
|
||||||
int TY_(GetCharEncodingFromOptName)(ctmbstr charenc);
|
TY_PRIVATE int TY_(GetCharEncodingFromOptName)(ctmbstr charenc);
|
||||||
|
|
||||||
/************************
|
/************************
|
||||||
** Misc
|
** Misc
|
||||||
|
@ -146,10 +146,10 @@ int TY_(GetCharEncodingFromOptName)(ctmbstr charenc);
|
||||||
#define SHIFTJIS 13
|
#define SHIFTJIS 13
|
||||||
|
|
||||||
/* Function for conversion from Windows-1252 to Unicode */
|
/* Function for conversion from Windows-1252 to Unicode */
|
||||||
uint TY_(DecodeWin1252)(uint c);
|
TY_PRIVATE uint TY_(DecodeWin1252)(uint c);
|
||||||
|
|
||||||
/* Function to convert from MacRoman to Unicode */
|
/* Function to convert from MacRoman to Unicode */
|
||||||
uint TY_(DecodeMacRoman)(uint c);
|
TY_PRIVATE uint TY_(DecodeMacRoman)(uint c);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
96
src/tags.h
96
src/tags.h
|
@ -119,21 +119,21 @@ typedef struct _TidyTagImpl
|
||||||
** @param opt The option the tag is intended for.
|
** @param opt The option the tag is intended for.
|
||||||
** @param name The name of the new tag.
|
** @param name The name of the new tag.
|
||||||
*/
|
*/
|
||||||
void TY_(DeclareUserTag)( TidyDocImpl* doc, const TidyOptionImpl* opt, ctmbstr name );
|
TY_PRIVATE void TY_(DeclareUserTag)( TidyDocImpl* doc, const TidyOptionImpl* opt, ctmbstr name );
|
||||||
|
|
||||||
|
|
||||||
/** Interface for finding a tag by TidyTagId.
|
/** Interface for finding a tag by TidyTagId.
|
||||||
** @param tid The TidyTagId to search for.
|
** @param tid The TidyTagId to search for.
|
||||||
** @returns An instance of a Tidy tag.
|
** @returns An instance of a Tidy tag.
|
||||||
*/
|
*/
|
||||||
const Dict* TY_(LookupTagDef)( TidyTagId tid );
|
TY_PRIVATE const Dict* TY_(LookupTagDef)( TidyTagId tid );
|
||||||
|
|
||||||
/** Assigns the node's tag.
|
/** Assigns the node's tag.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
** @param node The node to assign the tag to.
|
** @param node The node to assign the tag to.
|
||||||
** @returns Returns a bool indicating whether or not the tag was assigned.
|
** @returns Returns a bool indicating whether or not the tag was assigned.
|
||||||
*/
|
*/
|
||||||
Bool TY_(FindTag)( TidyDocImpl* doc, Node *node );
|
TY_PRIVATE Bool TY_(FindTag)( TidyDocImpl* doc, Node *node );
|
||||||
|
|
||||||
|
|
||||||
/** Finds the parser function for a given node.
|
/** Finds the parser function for a given node.
|
||||||
|
@ -141,7 +141,7 @@ Bool TY_(FindTag)( TidyDocImpl* doc, Node *node );
|
||||||
** @param node The node to lookup.
|
** @param node The node to lookup.
|
||||||
** @returns The parser for the given node.
|
** @returns The parser for the given node.
|
||||||
*/
|
*/
|
||||||
Parser* TY_(FindParser)( TidyDocImpl* doc, Node *node );
|
TY_PRIVATE Parser* TY_(FindParser)( TidyDocImpl* doc, Node *node );
|
||||||
|
|
||||||
|
|
||||||
/** Defines a new user-defined tag.
|
/** Defines a new user-defined tag.
|
||||||
|
@ -149,7 +149,7 @@ Parser* TY_(FindParser)( TidyDocImpl* doc, Node *node );
|
||||||
** @param tagType The type of user-defined tag to define.
|
** @param tagType The type of user-defined tag to define.
|
||||||
** @param name The name of the new tag.
|
** @param name The name of the new tag.
|
||||||
*/
|
*/
|
||||||
void TY_(DefineTag)( TidyDocImpl* doc, UserTagType tagType, ctmbstr name );
|
TY_PRIVATE void TY_(DefineTag)( TidyDocImpl* doc, UserTagType tagType, ctmbstr name );
|
||||||
|
|
||||||
|
|
||||||
/** Frees user-defined tags of the given type, or all user tags in given
|
/** Frees user-defined tags of the given type, or all user tags in given
|
||||||
|
@ -158,7 +158,7 @@ void TY_(DefineTag)( TidyDocImpl* doc, UserTagType tagType, ctmbstr name );
|
||||||
** @param tagType The type of tag to free, or `tagtype_null` to free all
|
** @param tagType The type of tag to free, or `tagtype_null` to free all
|
||||||
** user-defined tags.
|
** user-defined tags.
|
||||||
*/
|
*/
|
||||||
void TY_(FreeDeclaredTags)( TidyDocImpl* doc, UserTagType tagType );
|
TY_PRIVATE void TY_(FreeDeclaredTags)( TidyDocImpl* doc, UserTagType tagType );
|
||||||
|
|
||||||
|
|
||||||
/** Initiates an iterator for a list of user-declared tags, including autonomous
|
/** Initiates an iterator for a list of user-declared tags, including autonomous
|
||||||
|
@ -168,7 +168,7 @@ void TY_(FreeDeclaredTags)( TidyDocImpl* doc, UserTagType tagType );
|
||||||
** @result Returns a TidyIterator, which is a token used to represent the
|
** @result Returns a TidyIterator, which is a token used to represent the
|
||||||
** current position in a list within LibTidy.
|
** current position in a list within LibTidy.
|
||||||
*/
|
*/
|
||||||
TidyIterator TY_(GetDeclaredTagList)( TidyDocImpl* doc );
|
TY_PRIVATE TidyIterator TY_(GetDeclaredTagList)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/** Given a valid TidyIterator initiated with TY_(GetDeclaredTagList)(),
|
/** Given a valid TidyIterator initiated with TY_(GetDeclaredTagList)(),
|
||||||
|
@ -183,40 +183,40 @@ TidyIterator TY_(GetDeclaredTagList)( TidyDocImpl* doc );
|
||||||
** TY_(GetDeclaredTagList)().
|
** TY_(GetDeclaredTagList)().
|
||||||
** @result A string containing the next tag.
|
** @result A string containing the next tag.
|
||||||
*/
|
*/
|
||||||
ctmbstr TY_(GetNextDeclaredTag)( TidyDocImpl* doc, UserTagType tagType,
|
TY_PRIVATE ctmbstr TY_(GetNextDeclaredTag)( TidyDocImpl* doc, UserTagType tagType,
|
||||||
TidyIterator* iter );
|
TidyIterator* iter );
|
||||||
|
|
||||||
|
|
||||||
/** Initializes tags and tag structures for the given Tidy document.
|
/** Initializes tags and tag structures for the given Tidy document.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
*/
|
*/
|
||||||
void TY_(InitTags)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(InitTags)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/** Frees the tags and structures used by Tidy for tags.
|
/** Frees the tags and structures used by Tidy for tags.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
*/
|
*/
|
||||||
void TY_(FreeTags)( TidyDocImpl* doc );
|
TY_PRIVATE void TY_(FreeTags)( TidyDocImpl* doc );
|
||||||
|
|
||||||
|
|
||||||
/** Tidy defaults to HTML5 mode. If the <!DOCTYPE ...> is found to NOT be
|
/** Tidy defaults to HTML5 mode. If the <!DOCTYPE ...> is found to NOT be
|
||||||
** HTML5, then adjust the tags table to HTML4 mode.
|
** HTML5, then adjust the tags table to HTML4 mode.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
*/
|
*/
|
||||||
void TY_(AdjustTags)( TidyDocImpl *doc );
|
TY_PRIVATE void TY_(AdjustTags)( TidyDocImpl *doc );
|
||||||
|
|
||||||
|
|
||||||
/** Reset the tags table back to default HTML5 mode.
|
/** Reset the tags table back to default HTML5 mode.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
*/
|
*/
|
||||||
void TY_(ResetTags)( TidyDocImpl *doc );
|
TY_PRIVATE void TY_(ResetTags)( TidyDocImpl *doc );
|
||||||
|
|
||||||
|
|
||||||
/** Indicates whether or not the Tidy is procesing in HTML5 mode.
|
/** Indicates whether or not the Tidy is procesing in HTML5 mode.
|
||||||
** @param doc The Tidy document.
|
** @param doc The Tidy document.
|
||||||
** @returns Returns `yes` if processing in HTML5 mode.
|
** @returns Returns `yes` if processing in HTML5 mode.
|
||||||
*/
|
*/
|
||||||
Bool TY_(IsHTML5Mode)( TidyDocImpl *doc );
|
TY_PRIVATE Bool TY_(IsHTML5Mode)( TidyDocImpl *doc );
|
||||||
|
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
@ -227,30 +227,30 @@ Bool TY_(IsHTML5Mode)( TidyDocImpl *doc );
|
||||||
/** @{ */
|
/** @{ */
|
||||||
|
|
||||||
|
|
||||||
Parser TY_(ParseHTML);
|
TY_PRIVATE Parser TY_(ParseHTML);
|
||||||
Parser TY_(ParseHead);
|
TY_PRIVATE Parser TY_(ParseHead);
|
||||||
Parser TY_(ParseTitle);
|
TY_PRIVATE Parser TY_(ParseTitle);
|
||||||
Parser TY_(ParseScript);
|
TY_PRIVATE Parser TY_(ParseScript);
|
||||||
Parser TY_(ParseFrameSet);
|
TY_PRIVATE Parser TY_(ParseFrameSet);
|
||||||
Parser TY_(ParseNoFrames);
|
TY_PRIVATE Parser TY_(ParseNoFrames);
|
||||||
Parser TY_(ParseBody);
|
TY_PRIVATE Parser TY_(ParseBody);
|
||||||
Parser TY_(ParsePre);
|
TY_PRIVATE Parser TY_(ParsePre);
|
||||||
Parser TY_(ParseList);
|
TY_PRIVATE Parser TY_(ParseList);
|
||||||
Parser TY_(ParseDefList);
|
TY_PRIVATE Parser TY_(ParseDefList);
|
||||||
Parser TY_(ParseBlock);
|
TY_PRIVATE Parser TY_(ParseBlock);
|
||||||
Parser TY_(ParseInline);
|
TY_PRIVATE Parser TY_(ParseInline);
|
||||||
Parser TY_(ParseEmpty);
|
TY_PRIVATE Parser TY_(ParseEmpty);
|
||||||
Parser TY_(ParseTableTag);
|
TY_PRIVATE Parser TY_(ParseTableTag);
|
||||||
Parser TY_(ParseColGroup);
|
TY_PRIVATE Parser TY_(ParseColGroup);
|
||||||
Parser TY_(ParseRowGroup);
|
TY_PRIVATE Parser TY_(ParseRowGroup);
|
||||||
Parser TY_(ParseRow);
|
TY_PRIVATE Parser TY_(ParseRow);
|
||||||
Parser TY_(ParseSelect);
|
TY_PRIVATE Parser TY_(ParseSelect);
|
||||||
Parser TY_(ParseOptGroup);
|
TY_PRIVATE Parser TY_(ParseOptGroup);
|
||||||
Parser TY_(ParseText);
|
TY_PRIVATE Parser TY_(ParseText);
|
||||||
Parser TY_(ParseDatalist);
|
TY_PRIVATE Parser TY_(ParseDatalist);
|
||||||
Parser TY_(ParseNamespace);
|
TY_PRIVATE Parser TY_(ParseNamespace);
|
||||||
|
|
||||||
CheckAttribs TY_(CheckAttributes);
|
TY_PRIVATE CheckAttribs TY_(CheckAttributes);
|
||||||
|
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
@ -274,14 +274,14 @@ CheckAttribs TY_(CheckAttributes);
|
||||||
** @param node The node being interrogated.
|
** @param node The node being interrogated.
|
||||||
** @returns The status of the inquiry.
|
** @returns The status of the inquiry.
|
||||||
*/
|
*/
|
||||||
Bool TY_(nodeIsText)( Node* node );
|
TY_PRIVATE Bool TY_(nodeIsText)( Node* node );
|
||||||
|
|
||||||
|
|
||||||
/** Inquires whether or not the given node is an element node.
|
/** Inquires whether or not the given node is an element node.
|
||||||
** @param node The node being interrogated.
|
** @param node The node being interrogated.
|
||||||
** @returns The status of the inquiry.
|
** @returns The status of the inquiry.
|
||||||
*/
|
*/
|
||||||
Bool TY_(nodeIsElement)( Node* node );
|
TY_PRIVATE Bool TY_(nodeIsElement)( Node* node );
|
||||||
|
|
||||||
|
|
||||||
/** Inquires whether or not the given node has any text.
|
/** Inquires whether or not the given node has any text.
|
||||||
|
@ -289,7 +289,7 @@ Bool TY_(nodeIsElement)( Node* node );
|
||||||
** @param node The node being interrogated.
|
** @param node The node being interrogated.
|
||||||
** @returns The status of the inquiry.
|
** @returns The status of the inquiry.
|
||||||
*/
|
*/
|
||||||
Bool TY_(nodeHasText)( TidyDocImpl* doc, Node* node );
|
TY_PRIVATE Bool TY_(nodeHasText)( TidyDocImpl* doc, Node* node );
|
||||||
|
|
||||||
|
|
||||||
/** Inquires whether the given element looks like it's an autonomous custom
|
/** Inquires whether the given element looks like it's an autonomous custom
|
||||||
|
@ -297,7 +297,7 @@ Bool TY_(nodeHasText)( TidyDocImpl* doc, Node* node );
|
||||||
** @param element A string to be checked.
|
** @param element A string to be checked.
|
||||||
** @returns The status of the inquiry.
|
** @returns The status of the inquiry.
|
||||||
*/
|
*/
|
||||||
Bool TY_(elementIsAutonomousCustomFormat)( ctmbstr element );
|
TY_PRIVATE Bool TY_(elementIsAutonomousCustomFormat)( ctmbstr element );
|
||||||
|
|
||||||
|
|
||||||
/** Inquires whether the given node looks like it's an autonomous custom
|
/** Inquires whether the given node looks like it's an autonomous custom
|
||||||
|
@ -305,7 +305,7 @@ Bool TY_(elementIsAutonomousCustomFormat)( ctmbstr element );
|
||||||
** @param node The node being interrogated.
|
** @param node The node being interrogated.
|
||||||
** @returns The status of the inquiry.
|
** @returns The status of the inquiry.
|
||||||
*/
|
*/
|
||||||
Bool TY_(nodeIsAutonomousCustomFormat)( Node* node );
|
TY_PRIVATE Bool TY_(nodeIsAutonomousCustomFormat)( Node* node );
|
||||||
|
|
||||||
|
|
||||||
/** True if the node looks like it's an autonomous custom element tag, and
|
/** True if the node looks like it's an autonomous custom element tag, and
|
||||||
|
@ -315,7 +315,7 @@ Bool TY_(nodeIsAutonomousCustomFormat)( Node* node );
|
||||||
** @param node The node being interrogated.
|
** @param node The node being interrogated.
|
||||||
** @returns The status of the inquiry.
|
** @returns The status of the inquiry.
|
||||||
*/
|
*/
|
||||||
Bool TY_(nodeIsAutonomousCustomTag)( TidyDocImpl* doc, Node* node );
|
TY_PRIVATE Bool TY_(nodeIsAutonomousCustomTag)( TidyDocImpl* doc, Node* node );
|
||||||
|
|
||||||
|
|
||||||
/** Does the node have the indicated content model? True if any of the bits
|
/** Does the node have the indicated content model? True if any of the bits
|
||||||
|
@ -324,42 +324,42 @@ Bool TY_(nodeIsAutonomousCustomTag)( TidyDocImpl* doc, Node* node );
|
||||||
** @param contentModel The content model to check against.
|
** @param contentModel The content model to check against.
|
||||||
** @returns The status of the inquiry.
|
** @returns The status of the inquiry.
|
||||||
*/
|
*/
|
||||||
Bool TY_(nodeHasCM)( Node* node, uint contentModel );
|
TY_PRIVATE Bool TY_(nodeHasCM)( Node* node, uint contentModel );
|
||||||
|
|
||||||
|
|
||||||
/** Does the content model of the node include block?
|
/** Does the content model of the node include block?
|
||||||
** @param node The node being interrogated.
|
** @param node The node being interrogated.
|
||||||
** @returns The status of the inquiry.
|
** @returns The status of the inquiry.
|
||||||
*/
|
*/
|
||||||
Bool TY_(nodeCMIsBlock)( Node* node );
|
TY_PRIVATE Bool TY_(nodeCMIsBlock)( Node* node );
|
||||||
|
|
||||||
|
|
||||||
/** Does the content model of the node include inline?
|
/** Does the content model of the node include inline?
|
||||||
** @param node The node being interrogated.
|
** @param node The node being interrogated.
|
||||||
** @returns The status of the inquiry.
|
** @returns The status of the inquiry.
|
||||||
*/
|
*/
|
||||||
Bool TY_(nodeCMIsInline)( Node* node );
|
TY_PRIVATE Bool TY_(nodeCMIsInline)( Node* node );
|
||||||
|
|
||||||
|
|
||||||
/** Does the content model of the node include empty?
|
/** Does the content model of the node include empty?
|
||||||
** @param node The node being interrogated.
|
** @param node The node being interrogated.
|
||||||
** @returns The status of the inquiry.
|
** @returns The status of the inquiry.
|
||||||
*/
|
*/
|
||||||
Bool TY_(nodeCMIsEmpty)( Node* node );
|
TY_PRIVATE Bool TY_(nodeCMIsEmpty)( Node* node );
|
||||||
|
|
||||||
|
|
||||||
/** Is the node a header, such as H1, H2, ..., H6?
|
/** Is the node a header, such as H1, H2, ..., H6?
|
||||||
** @param node The node being interrogated.
|
** @param node The node being interrogated.
|
||||||
** @returns The status of the inquiry.
|
** @returns The status of the inquiry.
|
||||||
*/
|
*/
|
||||||
Bool TY_(nodeIsHeader)( Node* node );
|
TY_PRIVATE Bool TY_(nodeIsHeader)( Node* node );
|
||||||
|
|
||||||
|
|
||||||
/** Inquires as to the header level of the given node: 1, 2, ..., 6.
|
/** Inquires as to the header level of the given node: 1, 2, ..., 6.
|
||||||
** @param node The node being interrogated.
|
** @param node The node being interrogated.
|
||||||
** @returns The header level.
|
** @returns The header level.
|
||||||
*/
|
*/
|
||||||
uint TY_(nodeHeaderLevel)( Node* node );
|
TY_PRIVATE uint TY_(nodeHeaderLevel)( Node* node );
|
||||||
|
|
||||||
|
|
||||||
#define nodeIsHTML( node ) TagIsId( node, TidyTag_HTML )
|
#define nodeIsHTML( node ) TagIsId( node, TidyTag_HTML )
|
||||||
|
|
|
@ -153,7 +153,7 @@ struct _TidyMessageImpl
|
||||||
#define TidyDocFree(doc, block) TidyFree((doc)->allocator, block)
|
#define TidyDocFree(doc, block) TidyFree((doc)->allocator, block)
|
||||||
#define TidyDocPanic(doc, msg) TidyPanic((doc)->allocator, msg)
|
#define TidyDocPanic(doc, msg) TidyPanic((doc)->allocator, msg)
|
||||||
|
|
||||||
int TY_(DocParseStream)( TidyDocImpl* impl, StreamIn* in );
|
TY_PRIVATE int TY_(DocParseStream)( TidyDocImpl* impl, StreamIn* in );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
[i_a] generic node tree traversal code; used in several spots.
|
[i_a] generic node tree traversal code; used in several spots.
|
||||||
|
@ -175,6 +175,6 @@ typedef enum
|
||||||
|
|
||||||
typedef NodeTraversalSignal NodeTraversalCallBack(TidyDocImpl* doc, Node* node, void *propagate);
|
typedef NodeTraversalSignal NodeTraversalCallBack(TidyDocImpl* doc, Node* node, void *propagate);
|
||||||
|
|
||||||
NodeTraversalSignal TY_(TraverseNodeTree)(TidyDocImpl* doc, Node* node, NodeTraversalCallBack *cb, void *propagate);
|
TY_PRIVATE NodeTraversalSignal TY_(TraverseNodeTree)(TidyDocImpl* doc, Node* node, NodeTraversalCallBack *cb, void *propagate);
|
||||||
|
|
||||||
#endif /* __TIDY_INT_H__ */
|
#endif /* __TIDY_INT_H__ */
|
||||||
|
|
|
@ -1578,7 +1578,7 @@ static struct _html5Info
|
||||||
{ "tt", TidyTag_TT },
|
{ "tt", TidyTag_TT },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
Bool inRemovedInfo( uint tid )
|
static Bool inRemovedInfo( uint tid )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; ; i++) {
|
for (i = 0; ; i++) {
|
||||||
|
@ -1626,7 +1626,7 @@ static Bool nodeHasAlignAttr( Node *node )
|
||||||
*
|
*
|
||||||
* See also: http://www.whatwg.org/specs/web-apps/current-work/multipage/obsolete.html#obsolete
|
* See also: http://www.whatwg.org/specs/web-apps/current-work/multipage/obsolete.html#obsolete
|
||||||
*/
|
*/
|
||||||
void TY_(CheckHTML5)( TidyDocImpl* doc, Node* node )
|
static void TY_(CheckHTML5)( TidyDocImpl* doc, Node* node )
|
||||||
{
|
{
|
||||||
Bool clean = cfgBool( doc, TidyMakeClean );
|
Bool clean = cfgBool( doc, TidyMakeClean );
|
||||||
Bool already_strict = cfgBool( doc, TidyStrictTagsAttr );
|
Bool already_strict = cfgBool( doc, TidyStrictTagsAttr );
|
||||||
|
@ -1812,7 +1812,7 @@ void TY_(CheckHTML5)( TidyDocImpl* doc, Node* node )
|
||||||
* The propriety checks are *always* run as they have always been an integral
|
* The propriety checks are *always* run as they have always been an integral
|
||||||
* part of Tidy. The version checks are controlled by `strict-tags-attributes`.
|
* part of Tidy. The version checks are controlled by `strict-tags-attributes`.
|
||||||
*/
|
*/
|
||||||
void TY_(CheckHTMLTagsAttribsVersions)( TidyDocImpl* doc, Node* node )
|
static void TY_(CheckHTMLTagsAttribsVersions)( TidyDocImpl* doc, Node* node )
|
||||||
{
|
{
|
||||||
uint versionEmitted = doc->lexer->versionEmitted;
|
uint versionEmitted = doc->lexer->versionEmitted;
|
||||||
uint declared = doc->lexer->doctype;
|
uint declared = doc->lexer->doctype;
|
||||||
|
|
38
src/tmbstr.h
38
src/tmbstr.h
|
@ -16,23 +16,23 @@ extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* like strdup but using an allocator */
|
/* like strdup but using an allocator */
|
||||||
tmbstr TY_(tmbstrdup)( TidyAllocator *allocator, ctmbstr str );
|
TY_PRIVATE tmbstr TY_(tmbstrdup)( TidyAllocator *allocator, ctmbstr str );
|
||||||
|
|
||||||
/* like strndup but using an allocator */
|
/* like strndup but using an allocator */
|
||||||
tmbstr TY_(tmbstrndup)( TidyAllocator *allocator, ctmbstr str, uint len);
|
TY_PRIVATE tmbstr TY_(tmbstrndup)( TidyAllocator *allocator, ctmbstr str, uint len);
|
||||||
|
|
||||||
/* exactly same as strncpy */
|
/* exactly same as strncpy */
|
||||||
uint TY_(tmbstrncpy)( tmbstr s1, ctmbstr s2, uint size );
|
TY_PRIVATE uint TY_(tmbstrncpy)( tmbstr s1, ctmbstr s2, uint size );
|
||||||
|
|
||||||
uint TY_(tmbstrcpy)( tmbstr s1, ctmbstr s2 );
|
TY_PRIVATE uint TY_(tmbstrcpy)( tmbstr s1, ctmbstr s2 );
|
||||||
|
|
||||||
uint TY_(tmbstrcat)( tmbstr s1, ctmbstr s2 );
|
TY_PRIVATE uint TY_(tmbstrcat)( tmbstr s1, ctmbstr s2 );
|
||||||
|
|
||||||
/* exactly same as strcmp */
|
/* exactly same as strcmp */
|
||||||
int TY_(tmbstrcmp)( ctmbstr s1, ctmbstr s2 );
|
TY_PRIVATE int TY_(tmbstrcmp)( ctmbstr s1, ctmbstr s2 );
|
||||||
|
|
||||||
/* returns byte count, not char count */
|
/* returns byte count, not char count */
|
||||||
uint TY_(tmbstrlen)( ctmbstr str );
|
TY_PRIVATE uint TY_(tmbstrlen)( ctmbstr str );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
MS C 4.2 doesn't include strcasecmp.
|
MS C 4.2 doesn't include strcasecmp.
|
||||||
|
@ -45,35 +45,35 @@ uint TY_(tmbstrlen)( ctmbstr str );
|
||||||
we are always comparing to ascii element and
|
we are always comparing to ascii element and
|
||||||
attribute names defined by HTML specs.
|
attribute names defined by HTML specs.
|
||||||
*/
|
*/
|
||||||
int TY_(tmbstrcasecmp)( ctmbstr s1, ctmbstr s2 );
|
TY_PRIVATE int TY_(tmbstrcasecmp)( ctmbstr s1, ctmbstr s2 );
|
||||||
|
|
||||||
int TY_(tmbstrncmp)( ctmbstr s1, ctmbstr s2, uint n );
|
TY_PRIVATE int TY_(tmbstrncmp)( ctmbstr s1, ctmbstr s2, uint n );
|
||||||
|
|
||||||
int TY_(tmbstrncasecmp)( ctmbstr s1, ctmbstr s2, uint n );
|
TY_PRIVATE int TY_(tmbstrncasecmp)( ctmbstr s1, ctmbstr s2, uint n );
|
||||||
|
|
||||||
/* return offset of cc from beginning of s1,
|
/* return offset of cc from beginning of s1,
|
||||||
** -1 if not found.
|
** -1 if not found.
|
||||||
*/
|
*/
|
||||||
/* int TY_(tmbstrnchr)( ctmbstr s1, uint len1, tmbchar cc ); */
|
/* TY_PRIVATE int TY_(tmbstrnchr)( ctmbstr s1, uint len1, tmbchar cc ); */
|
||||||
|
|
||||||
ctmbstr TY_(tmbsubstrn)( ctmbstr s1, uint len1, ctmbstr s2 );
|
TY_PRIVATE ctmbstr TY_(tmbsubstrn)( ctmbstr s1, uint len1, ctmbstr s2 );
|
||||||
/* ctmbstr TY_(tmbsubstrncase)( ctmbstr s1, uint len1, ctmbstr s2 ); */
|
/* TY_PRIVATE ctmbstr TY_(tmbsubstrncase)( ctmbstr s1, uint len1, ctmbstr s2 ); */
|
||||||
ctmbstr TY_(tmbsubstr)( ctmbstr s1, ctmbstr s2 );
|
TY_PRIVATE ctmbstr TY_(tmbsubstr)( ctmbstr s1, ctmbstr s2 );
|
||||||
|
|
||||||
/* transform string to lower case */
|
/* transform string to lower case */
|
||||||
tmbstr TY_(tmbstrtolower)( tmbstr s );
|
TY_PRIVATE tmbstr TY_(tmbstrtolower)( tmbstr s );
|
||||||
|
|
||||||
/* Transform ASCII chars in string to upper case */
|
/* Transform ASCII chars in string to upper case */
|
||||||
tmbstr TY_(tmbstrtoupper)( tmbstr s );
|
TY_PRIVATE tmbstr TY_(tmbstrtoupper)( tmbstr s );
|
||||||
|
|
||||||
/* Bool TY_(tmbsamefile)( ctmbstr filename1, ctmbstr filename2 ); */
|
/* TY_PRIVATE Bool TY_(tmbsamefile)( ctmbstr filename1, ctmbstr filename2 ); */
|
||||||
|
|
||||||
int TY_(tmbvsnprintf)(tmbstr buffer, size_t count, ctmbstr format, va_list args)
|
TY_PRIVATE int TY_(tmbvsnprintf)(tmbstr buffer, size_t count, ctmbstr format, va_list args)
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
__attribute__((format(printf, 3, 0)))
|
__attribute__((format(printf, 3, 0)))
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
int TY_(tmbsnprintf)(tmbstr buffer, size_t count, ctmbstr format, ...)
|
TY_PRIVATE int TY_(tmbsnprintf)(tmbstr buffer, size_t count, ctmbstr format, ...)
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
__attribute__((format(printf, 3, 4)))
|
__attribute__((format(printf, 3, 4)))
|
||||||
#endif
|
#endif
|
||||||
|
|
22
src/utf8.h
22
src/utf8.h
|
@ -15,15 +15,15 @@
|
||||||
** Does not convert character "codepoints", i.e. to/from 10646.
|
** Does not convert character "codepoints", i.e. to/from 10646.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int TY_(DecodeUTF8BytesToChar)( uint* c, uint firstByte, ctmbstr successorBytes,
|
TY_PRIVATE int TY_(DecodeUTF8BytesToChar)( uint* c, uint firstByte, ctmbstr successorBytes,
|
||||||
TidyInputSource* inp, int* count );
|
TidyInputSource* inp, int* count );
|
||||||
|
|
||||||
int TY_(EncodeCharToUTF8Bytes)( uint c, tmbstr encodebuf,
|
TY_PRIVATE int TY_(EncodeCharToUTF8Bytes)( uint c, tmbstr encodebuf,
|
||||||
TidyOutputSink* outp, int* count );
|
TidyOutputSink* outp, int* count );
|
||||||
|
|
||||||
|
|
||||||
uint TY_(GetUTF8)( ctmbstr str, uint *ch );
|
TY_PRIVATE uint TY_(GetUTF8)( ctmbstr str, uint *ch );
|
||||||
tmbstr TY_(PutUTF8)( tmbstr buf, uint c );
|
TY_PRIVATE tmbstr TY_(PutUTF8)( tmbstr buf, uint c );
|
||||||
|
|
||||||
#define UNICODE_BOM_BE 0xFEFF /* big-endian (default) UNICODE BOM */
|
#define UNICODE_BOM_BE 0xFEFF /* big-endian (default) UNICODE BOM */
|
||||||
#define UNICODE_BOM UNICODE_BOM_BE
|
#define UNICODE_BOM UNICODE_BOM_BE
|
||||||
|
@ -31,15 +31,15 @@ tmbstr TY_(PutUTF8)( tmbstr buf, uint c );
|
||||||
#define UNICODE_BOM_UTF8 0xEFBBBF /* UTF-8 UNICODE BOM */
|
#define UNICODE_BOM_UTF8 0xEFBBBF /* UTF-8 UNICODE BOM */
|
||||||
|
|
||||||
|
|
||||||
Bool TY_(IsValidUTF16FromUCS4)( tchar ucs4 );
|
TY_PRIVATE Bool TY_(IsValidUTF16FromUCS4)( tchar ucs4 );
|
||||||
Bool TY_(IsHighSurrogate)( tchar ch );
|
TY_PRIVATE Bool TY_(IsHighSurrogate)( tchar ch );
|
||||||
Bool TY_(IsLowSurrogate)( tchar ch );
|
TY_PRIVATE Bool TY_(IsLowSurrogate)( tchar ch );
|
||||||
|
|
||||||
Bool TY_(IsCombinedChar)( tchar ch );
|
TY_PRIVATE Bool TY_(IsCombinedChar)( tchar ch );
|
||||||
Bool TY_(IsValidCombinedChar)( tchar ch );
|
TY_PRIVATE Bool TY_(IsValidCombinedChar)( tchar ch );
|
||||||
|
|
||||||
tchar TY_(CombineSurrogatePair)( tchar high, tchar low );
|
TY_PRIVATE tchar TY_(CombineSurrogatePair)( tchar high, tchar low );
|
||||||
Bool TY_(SplitSurrogatePair)( tchar utf16, tchar* high, tchar* low );
|
TY_PRIVATE Bool TY_(SplitSurrogatePair)( tchar utf16, tchar* high, tchar* low );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue