diff --git a/src/access.h b/src/access.h index cbb6257..b44a1a5 100644 --- a/src/access.h +++ b/src/access.h @@ -84,7 +84,7 @@ struct _TidyAccessImpl }; -void TY_(AccessibilityChecks)( TidyDocImpl* doc ); +TY_PRIVATE void TY_(AccessibilityChecks)( TidyDocImpl* doc ); #endif /* __ACCESS_H__ */ diff --git a/src/attrdict.h b/src/attrdict.h index 4576300..4ecf169 100644 --- a/src/attrdict.h +++ b/src/attrdict.h @@ -16,143 +16,143 @@ typedef struct _AttrVersion uint versions; } AttrVersion; -extern const AttrVersion TY_(W3CAttrsFor_A)[]; -extern const AttrVersion TY_(W3CAttrsFor_ABBR)[]; -extern const AttrVersion TY_(W3CAttrsFor_ACRONYM)[]; -extern const AttrVersion TY_(W3CAttrsFor_ADDRESS)[]; -extern const AttrVersion TY_(W3CAttrsFor_APPLET)[]; -extern const AttrVersion TY_(W3CAttrsFor_AREA)[]; -extern const AttrVersion TY_(W3CAttrsFor_B)[]; -extern const AttrVersion TY_(W3CAttrsFor_BASE)[]; -extern const AttrVersion TY_(W3CAttrsFor_BASEFONT)[]; -extern const AttrVersion TY_(W3CAttrsFor_BDO)[]; -extern const AttrVersion TY_(W3CAttrsFor_BIG)[]; -extern const AttrVersion TY_(W3CAttrsFor_BLOCKQUOTE)[]; -extern const AttrVersion TY_(W3CAttrsFor_BODY)[]; -extern const AttrVersion TY_(W3CAttrsFor_BR)[]; -extern const AttrVersion TY_(W3CAttrsFor_BUTTON)[]; -extern const AttrVersion TY_(W3CAttrsFor_CAPTION)[]; -extern const AttrVersion TY_(W3CAttrsFor_CENTER)[]; -extern const AttrVersion TY_(W3CAttrsFor_CITE)[]; -extern const AttrVersion TY_(W3CAttrsFor_CODE)[]; -extern const AttrVersion TY_(W3CAttrsFor_COL)[]; -extern const AttrVersion TY_(W3CAttrsFor_COLGROUP)[]; -extern const AttrVersion TY_(W3CAttrsFor_DD)[]; -extern const AttrVersion TY_(W3CAttrsFor_DEL)[]; -extern const AttrVersion TY_(W3CAttrsFor_DFN)[]; -extern const AttrVersion TY_(W3CAttrsFor_DIR)[]; -extern const AttrVersion TY_(W3CAttrsFor_DIV)[]; -extern const AttrVersion TY_(W3CAttrsFor_DL)[]; -extern const AttrVersion TY_(W3CAttrsFor_DT)[]; -extern const AttrVersion TY_(W3CAttrsFor_EM)[]; -extern const AttrVersion TY_(W3CAttrsFor_FIELDSET)[]; -extern const AttrVersion TY_(W3CAttrsFor_FONT)[]; -extern const AttrVersion TY_(W3CAttrsFor_FORM)[]; -extern const AttrVersion TY_(W3CAttrsFor_FRAME)[]; -extern const AttrVersion TY_(W3CAttrsFor_FRAMESET)[]; -extern const AttrVersion TY_(W3CAttrsFor_H1)[]; -extern const AttrVersion TY_(W3CAttrsFor_H2)[]; -extern const AttrVersion TY_(W3CAttrsFor_H3)[]; -extern const AttrVersion TY_(W3CAttrsFor_H4)[]; -extern const AttrVersion TY_(W3CAttrsFor_H5)[]; -extern const AttrVersion TY_(W3CAttrsFor_H6)[]; -extern const AttrVersion TY_(W3CAttrsFor_HEAD)[]; -extern const AttrVersion TY_(W3CAttrsFor_HR)[]; -extern const AttrVersion TY_(W3CAttrsFor_HTML)[]; -extern const AttrVersion TY_(W3CAttrsFor_I)[]; -extern const AttrVersion TY_(W3CAttrsFor_IFRAME)[]; -extern const AttrVersion TY_(W3CAttrsFor_IMG)[]; -extern const AttrVersion TY_(W3CAttrsFor_INPUT)[]; -extern const AttrVersion TY_(W3CAttrsFor_INS)[]; -extern const AttrVersion TY_(W3CAttrsFor_ISINDEX)[]; -extern const AttrVersion TY_(W3CAttrsFor_KBD)[]; -extern const AttrVersion TY_(W3CAttrsFor_LABEL)[]; -extern const AttrVersion TY_(W3CAttrsFor_LEGEND)[]; -extern const AttrVersion TY_(W3CAttrsFor_LI)[]; -extern const AttrVersion TY_(W3CAttrsFor_LINK)[]; -extern const AttrVersion TY_(W3CAttrsFor_LISTING)[]; -extern const AttrVersion TY_(W3CAttrsFor_MAP)[]; -extern const AttrVersion TY_(W3CAttrsFor_MATHML)[]; /* [i_a]2 */ -extern const AttrVersion TY_(W3CAttrsFor_MENU)[]; -extern const AttrVersion TY_(W3CAttrsFor_META)[]; -extern const AttrVersion TY_(W3CAttrsFor_NEXTID)[]; -extern const AttrVersion TY_(W3CAttrsFor_NOFRAMES)[]; -extern const AttrVersion TY_(W3CAttrsFor_NOSCRIPT)[]; -extern const AttrVersion TY_(W3CAttrsFor_OBJECT)[]; -extern const AttrVersion TY_(W3CAttrsFor_OL)[]; -extern const AttrVersion TY_(W3CAttrsFor_OPTGROUP)[]; -extern const AttrVersion TY_(W3CAttrsFor_OPTION)[]; -extern const AttrVersion TY_(W3CAttrsFor_P)[]; -extern const AttrVersion TY_(W3CAttrsFor_PARAM)[]; -extern const AttrVersion TY_(W3CAttrsFor_PICTURE)[]; /* Issue #151 - html5 */ -extern const AttrVersion TY_(W3CAttrsFor_PLAINTEXT)[]; -extern const AttrVersion TY_(W3CAttrsFor_PRE)[]; -extern const AttrVersion TY_(W3CAttrsFor_Q)[]; -extern const AttrVersion TY_(W3CAttrsFor_RB)[]; -extern const AttrVersion TY_(W3CAttrsFor_RBC)[]; -extern const AttrVersion TY_(W3CAttrsFor_RP)[]; -extern const AttrVersion TY_(W3CAttrsFor_RT)[]; -extern const AttrVersion TY_(W3CAttrsFor_RTC)[]; -extern const AttrVersion TY_(W3CAttrsFor_RUBY)[]; -extern const AttrVersion TY_(W3CAttrsFor_S)[]; -extern const AttrVersion TY_(W3CAttrsFor_SAMP)[]; -extern const AttrVersion TY_(W3CAttrsFor_SCRIPT)[]; -extern const AttrVersion TY_(W3CAttrsFor_SELECT)[]; -extern const AttrVersion TY_(W3CAttrsFor_SMALL)[]; -extern const AttrVersion TY_(W3CAttrsFor_SPAN)[]; -extern const AttrVersion TY_(W3CAttrsFor_STRIKE)[]; -extern const AttrVersion TY_(W3CAttrsFor_STRONG)[]; -extern const AttrVersion TY_(W3CAttrsFor_STYLE)[]; -extern const AttrVersion TY_(W3CAttrsFor_SUB)[]; -extern const AttrVersion TY_(W3CAttrsFor_SUP)[]; -extern const AttrVersion TY_(W3CAttrsFor_SVG)[]; -extern const AttrVersion TY_(W3CAttrsFor_TABLE)[]; -extern const AttrVersion TY_(W3CAttrsFor_TBODY)[]; -extern const AttrVersion TY_(W3CAttrsFor_TD)[]; -extern const AttrVersion TY_(W3CAttrsFor_TEXTAREA)[]; -extern const AttrVersion TY_(W3CAttrsFor_TFOOT)[]; -extern const AttrVersion TY_(W3CAttrsFor_TH)[]; -extern const AttrVersion TY_(W3CAttrsFor_THEAD)[]; -extern const AttrVersion TY_(W3CAttrsFor_TITLE)[]; -extern const AttrVersion TY_(W3CAttrsFor_TR)[]; -extern const AttrVersion TY_(W3CAttrsFor_TT)[]; -extern const AttrVersion TY_(W3CAttrsFor_U)[]; -extern const AttrVersion TY_(W3CAttrsFor_UL)[]; -extern const AttrVersion TY_(W3CAttrsFor_VAR)[]; -extern const AttrVersion TY_(W3CAttrsFor_XMP)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_A)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_ABBR)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_ACRONYM)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_ADDRESS)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_APPLET)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_AREA)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_B)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BASE)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BASEFONT)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BDO)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BIG)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BLOCKQUOTE)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BODY)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BR)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BUTTON)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_CAPTION)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_CENTER)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_CITE)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_CODE)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_COL)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_COLGROUP)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DD)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DEL)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DFN)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DIR)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DIV)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DL)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DT)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_EM)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FIELDSET)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FONT)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FORM)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FRAME)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FRAMESET)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_H1)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_H2)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_H3)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_H4)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_H5)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_H6)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_HEAD)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_HR)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_HTML)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_I)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_IFRAME)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_IMG)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_INPUT)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_INS)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_ISINDEX)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_KBD)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_LABEL)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_LEGEND)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_LI)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_LINK)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_LISTING)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_MAP)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_MATHML)[]; /* [i_a]2 */ +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_MENU)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_META)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_NEXTID)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_NOFRAMES)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_NOSCRIPT)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_OBJECT)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_OL)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_OPTGROUP)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_OPTION)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_P)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_PARAM)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_PICTURE)[]; /* Issue #151 - html5 */ +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_PLAINTEXT)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_PRE)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_Q)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_RB)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_RBC)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_RP)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_RT)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_RTC)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_RUBY)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_S)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SAMP)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SCRIPT)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SELECT)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SMALL)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SPAN)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_STRIKE)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_STRONG)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_STYLE)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SUB)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SUP)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SVG)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TABLE)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TBODY)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TD)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TEXTAREA)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TFOOT)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TH)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_THEAD)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TITLE)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TR)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TT)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_U)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_UL)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_VAR)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_XMP)[]; -extern const AttrVersion TY_(W3CAttrsFor_TRACK)[]; -extern const AttrVersion TY_(W3CAttrsFor_SUMMARY)[]; -extern const AttrVersion TY_(W3CAttrsFor_FIGCAPTION)[]; -extern const AttrVersion TY_(W3CAttrsFor_HGROUP)[]; -extern const AttrVersion TY_(W3CAttrsFor_FIGURE)[]; -extern const AttrVersion TY_(W3CAttrsFor_ARTICLE)[]; -extern const AttrVersion TY_(W3CAttrsFor_ASIDE)[]; -extern const AttrVersion TY_(W3CAttrsFor_BDI)[]; -extern const AttrVersion TY_(W3CAttrsFor_NAV)[]; -extern const AttrVersion TY_(W3CAttrsFor_SECTION)[]; -extern const AttrVersion TY_(W3CAttrsFor_FOOTER)[]; -extern const AttrVersion TY_(W3CAttrsFor_HEADER)[]; -extern const AttrVersion TY_(W3CAttrsFor_DETAILS)[]; -extern const AttrVersion TY_(W3CAttrsFor_DIALOG)[]; -extern const AttrVersion TY_(W3CAttrsFor_COMMAND)[]; -extern const AttrVersion TY_(W3CAttrsFor_MAIN)[]; -extern const AttrVersion TY_(W3CAttrsFor_MARK)[]; -extern const AttrVersion TY_(W3CAttrsFor_OUTPUT)[]; -extern const AttrVersion TY_(W3CAttrsFor_MENUITEM)[]; -extern const AttrVersion TY_(W3CAttrsFor_METER)[]; -extern const AttrVersion TY_(W3CAttrsFor_PROGRESS)[]; -extern const AttrVersion TY_(W3CAttrsFor_SLOT)[]; -extern const AttrVersion TY_(W3CAttrsFor_TEMPLATE)[]; -extern const AttrVersion TY_(W3CAttrsFor_TIME)[]; -extern const AttrVersion TY_(W3CAttrsFor_DATA)[]; -extern const AttrVersion TY_(W3CAttrsFor_DATALIST)[]; -extern const AttrVersion TY_(W3CAttrsFor_AUDIO)[]; -extern const AttrVersion TY_(W3CAttrsFor_VIDEO)[]; -extern const AttrVersion TY_(W3CAttrsFor_CANVAS)[]; -extern const AttrVersion TY_(W3CAttrsFor_SOURCE)[]; -extern const AttrVersion TY_(W3CAttrsFor_EMBED)[]; -extern const AttrVersion TY_(W3CAttrsFor_KEYGEN)[]; -extern const AttrVersion TY_(W3CAttrsFor_WBR)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TRACK)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SUMMARY)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FIGCAPTION)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_HGROUP)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FIGURE)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_ARTICLE)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_ASIDE)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_BDI)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_NAV)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SECTION)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_FOOTER)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_HEADER)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DETAILS)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DIALOG)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_COMMAND)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_MAIN)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_MARK)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_OUTPUT)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_MENUITEM)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_METER)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_PROGRESS)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SLOT)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TEMPLATE)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_TIME)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DATA)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_DATALIST)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_AUDIO)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_VIDEO)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_CANVAS)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_SOURCE)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_EMBED)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_KEYGEN)[]; +TY_PRIVATE extern const AttrVersion TY_(W3CAttrsFor_WBR)[]; #endif /* __ATTRDICT_H__ */ diff --git a/src/attrs.h b/src/attrs.h index 96cb98d..edfb564 100644 --- a/src/attrs.h +++ b/src/attrs.h @@ -79,39 +79,39 @@ typedef struct _TidyAttribImpl TidyAttribImpl; #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 */ -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 ); -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. */ -void TY_(DefinePriorityAttribute)(TidyDocImpl* doc, ctmbstr name); +TY_PRIVATE void TY_(DefinePriorityAttribute)(TidyDocImpl* doc, ctmbstr name); /* Start an iterator for priority attributes. */ -TidyIterator TY_(getPriorityAttrList)( TidyDocImpl* doc ); +TY_PRIVATE TidyIterator TY_(getPriorityAttrList)( TidyDocImpl* doc ); /* 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 TY_(IsScript)( TidyDocImpl* doc, ctmbstr attrname ); +TY_PRIVATE Bool TY_(IsScript)( TidyDocImpl* doc, ctmbstr attrname ); /* 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 @@ -127,41 +127,41 @@ Bool TY_(IsAnchorElement)( TidyDocImpl* doc, Node* node ); #508936 - CSS class naming for -clean option */ -Bool TY_(IsCSS1Selector)( ctmbstr buf ); +TY_PRIVATE Bool TY_(IsCSS1Selector)( ctmbstr buf ); -Bool TY_(IsValidHTMLID)(ctmbstr id); -Bool TY_(IsValidXMLID)(ctmbstr id); +TY_PRIVATE Bool TY_(IsValidHTMLID)(ctmbstr id); +TY_PRIVATE Bool TY_(IsValidXMLID)(ctmbstr id); /* 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 */ -void TY_(FreeAnchors)( TidyDocImpl* doc ); +TY_PRIVATE void TY_(FreeAnchors)( TidyDocImpl* doc ); /* public methods for inititializing/freeing attribute dictionary */ -void TY_(InitAttrs)( TidyDocImpl* doc ); -void TY_(FreeAttrTable)( TidyDocImpl* doc ); +TY_PRIVATE void TY_(InitAttrs)( 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 more than once in each element */ -void TY_(RepairDuplicateAttributes)( TidyDocImpl* doc, Node* node, Bool isXml ); -void TY_(SortAttributes)(TidyDocImpl* doc, Node* node, TidyAttrSortStrategy strat); +TY_PRIVATE void TY_(RepairDuplicateAttributes)( TidyDocImpl* doc, Node* node, Bool isXml ); +TY_PRIVATE void TY_(SortAttributes)(TidyDocImpl* doc, Node* node, TidyAttrSortStrategy strat); -Bool TY_(IsBoolAttribute)( AttVal* attval ); -Bool TY_(attrIsEvent)( AttVal* attval ); +TY_PRIVATE Bool TY_(IsBoolAttribute)( 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); -Bool TY_(AttributeIsMismatched)(Node* node, AttVal* attval, TidyDocImpl* doc); +TY_PRIVATE Bool TY_(AttributeIsProprietary)(Node* node, AttVal* attval); +TY_PRIVATE Bool TY_(AttributeIsMismatched)(Node* node, AttVal* attval, TidyDocImpl* doc); /* 0 == TidyAttr_UNKNOWN */ diff --git a/src/charsets.h b/src/charsets.h index 8931ada..dfd2693 100644 --- a/src/charsets.h +++ b/src/charsets.h @@ -1,13 +1,19 @@ +#ifndef __CHARSETS_H__ +#define __CHARSETS_H__ + /* 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. */ -uint TY_(GetEncodingIdFromName)(ctmbstr name); -uint TY_(GetEncodingIdFromCodePage)(uint cp); -uint TY_(GetEncodingCodePageFromName)(ctmbstr name); -uint TY_(GetEncodingCodePageFromId)(uint id); -ctmbstr TY_(GetEncodingNameFromId)(uint id); -ctmbstr TY_(GetEncodingNameFromCodePage)(uint cp); +TY_PRIVATE uint TY_(GetEncodingIdFromName)(ctmbstr name); +TY_PRIVATE uint TY_(GetEncodingIdFromCodePage)(uint cp); +TY_PRIVATE uint TY_(GetEncodingCodePageFromName)(ctmbstr name); +TY_PRIVATE uint TY_(GetEncodingCodePageFromId)(uint id); +TY_PRIVATE ctmbstr TY_(GetEncodingNameFromId)(uint id); +TY_PRIVATE ctmbstr TY_(GetEncodingNameFromCodePage)(uint cp); + +#endif /* __CHARSETS_H__ */ + diff --git a/src/clean.h b/src/clean.h index c765e81..d9bddbe 100644 --- a/src/clean.h +++ b/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 */ -void TY_(AddStyleAsClass)( TidyDocImpl* doc, Node *node, ctmbstr stylevalue ); -void TY_(AddStyleProperty)(TidyDocImpl* doc, Node *node, ctmbstr property ); +TY_PRIVATE void TY_(AddStyleAsClass)( TidyDocImpl* doc, Node *node, ctmbstr stylevalue ); +TY_PRIVATE void TY_(AddStyleProperty)(TidyDocImpl* doc, Node *node, ctmbstr property ); -void TY_(CleanDocument)( TidyDocImpl* doc ); +TY_PRIVATE void TY_(CleanDocument)( TidyDocImpl* doc ); /* simplifies ... ... 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 */ -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 @@ -32,17 +32,17 @@ void TY_(EmFromI)( TidyDocImpl* doc, Node* node ); li. This is recursively replaced by an 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 taking care to reduce nested blockquotes to a single 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 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 */ -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); -void TY_(DropFontElements)(TidyDocImpl* doc, Node* node, Node **pnode); -void TY_(WbrToSpace)(TidyDocImpl* doc, Node* node); -void TY_(DowngradeTypography)(TidyDocImpl* doc, Node* node); -void TY_(ReplacePreformattedSpaces)(TidyDocImpl* doc, Node* node); -void TY_(NormalizeSpaces)(Lexer *lexer, Node *node); -void TY_(ConvertCDATANodes)(TidyDocImpl* doc, Node* node); +TY_PRIVATE void TY_(DropComments)(TidyDocImpl* doc, Node* node); +TY_PRIVATE void TY_(DropFontElements)(TidyDocImpl* doc, Node* node, Node **pnode); +TY_PRIVATE void TY_(WbrToSpace)(TidyDocImpl* doc, Node* node); +TY_PRIVATE void TY_(DowngradeTypography)(TidyDocImpl* doc, Node* node); +TY_PRIVATE void TY_(ReplacePreformattedSpaces)(TidyDocImpl* doc, Node* node); +TY_PRIVATE void TY_(NormalizeSpaces)(Lexer *lexer, Node *node); +TY_PRIVATE void TY_(ConvertCDATANodes)(TidyDocImpl* doc, Node* node); -void TY_(FixAnchors)(TidyDocImpl* doc, Node *node, Bool wantName, Bool wantId); -void TY_(FixXhtmlNamespace)(TidyDocImpl* doc, Bool wantXmlns); -void TY_(FixLanguageInformation)(TidyDocImpl* doc, Node* node, Bool wantXmlLang, Bool wantLang); +TY_PRIVATE void TY_(FixAnchors)(TidyDocImpl* doc, Node *node, Bool wantName, Bool wantId); +TY_PRIVATE void TY_(FixXhtmlNamespace)(TidyDocImpl* doc, Bool wantXmlns); +TY_PRIVATE void TY_(FixLanguageInformation)(TidyDocImpl* doc, Node* node, Bool wantXmlLang, Bool wantLang); /* 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 */ -void TY_(CleanHead)(TidyDocImpl* doc); - +TY_PRIVATE void TY_(CleanHead)(TidyDocImpl* doc); #endif /* __CLEAN_H__ */ diff --git a/src/config.h b/src/config.h index a86b5c5..30fdaa0 100644 --- a/src/config.h +++ b/src/config.h @@ -140,26 +140,26 @@ typedef struct { ** @param optnam The option name to retrieve. ** @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. ** @param optId The option ID to retrieve. ** @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. ** @param optId The option ID to check. ** @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. ** @param doc The Tidy document to get options. ** @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. @@ -167,7 +167,7 @@ TidyIterator TY_(getOptionList)( TidyDocImpl* doc ); ** @param iter The iterator token initialized by TY_(getOptionList)(). ** @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 @@ -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. ** @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. @@ -183,7 +183,7 @@ TidyIterator TY_(getOptionPickList)( const TidyOptionImpl* option ); ** @param iter The iterator token initialized by TY_(getOptionPickList)(). ** @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 @@ -192,20 +192,20 @@ ctmbstr TY_(getNextOptionPick)( const TidyOptionImpl* option, TidyIterator* iter ** @param optId The option ID to get cross-reference information for. ** @returns Cross reference information. */ -const TidyOptionDoc* TY_(OptGetDocDesc)( TidyOptionId optId ); +TY_PRIVATE const TidyOptionDoc* TY_(OptGetDocDesc)( TidyOptionId optId ); #endif /* SUPPORT_CONSOLE_APP */ /** Initialize the configuration for the given 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. ** @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. @@ -213,7 +213,7 @@ void TY_(FreeConfig)( TidyDocImpl* doc ); ** @param pick the picklist item to retrieve. ** @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. @@ -222,7 +222,7 @@ ctmbstr TY_(GetPickListLabelForPick)( TidyOptionId optId, uint pick ); ** @param val The value to set. ** @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. @@ -231,7 +231,7 @@ Bool TY_(SetOptionInt)( TidyDocImpl* doc, TidyOptionId optId, ulong val ); ** @param val The value to set. ** @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. @@ -239,33 +239,33 @@ Bool TY_(SetOptionBool)( TidyDocImpl* doc, TidyOptionId optId, Bool val ); ** @param optId The option ID to set. ** @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. ** @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 ** restored later. ** @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. ** @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. ** @param docTo The destination 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. @@ -273,7 +273,7 @@ void TY_(CopyConfig)( TidyDocImpl* docTo, TidyDocImpl* docFrom ); ** @param cfgfil The file to load. ** @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 @@ -283,7 +283,7 @@ int TY_(ParseConfigFile)( TidyDocImpl* doc, ctmbstr cfgfil ); ** @param charenc The name of the encoding to use for reading the file. ** @returns a file system error code. */ -int TY_(ParseConfigFileEnc)( TidyDocImpl* doc, +TY_PRIVATE int TY_(ParseConfigFileEnc)( TidyDocImpl* doc, ctmbstr cfgfil, ctmbstr charenc ); @@ -293,7 +293,7 @@ int TY_(ParseConfigFileEnc)( TidyDocImpl* doc, ** @param cfgfil The file to save. ** @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 @@ -302,7 +302,7 @@ int TY_(SaveConfigFile)( TidyDocImpl* doc, ctmbstr cfgfil ); ** @param sink The sink to save into. ** @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 @@ -313,7 +313,7 @@ int TY_(SaveConfigSink)( TidyDocImpl* doc, TidyOutputSink* sink ); ** @param optVal The string value to attempt to parse. ** @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 @@ -324,7 +324,7 @@ Bool TY_(ParseConfigOption)( TidyDocImpl* doc, ctmbstr optnam, ctmbstr optVal ) ** @param optVal The string value to attempt to parse. ** @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. @@ -332,7 +332,7 @@ Bool TY_(ParseConfigValue)( TidyDocImpl* doc, TidyOptionId optId, ctmbstr optVa ** @param encoding The encoding being applied. ** @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. @@ -353,7 +353,7 @@ void TY_(AdjustConfig)( TidyDocImpl* doc ); ** @param doc The Tidy document. ** @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 @@ -361,7 +361,7 @@ Bool TY_(ConfigDiffThanDefault)( TidyDocImpl* doc ); ** @param doc The Tidy document. ** @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 @@ -370,21 +370,21 @@ Bool TY_(ConfigDiffThanSnapshot)( TidyDocImpl* doc ); ** @param charenc The name 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. ** @param encoding The Id of the 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. ** @param encoding The Id of 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. @@ -392,15 +392,15 @@ ctmbstr TY_(CharEncodingOptName)( int encoding ); ** @param opt The option the list item is intended for. ** @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 /* Debug lookup functions will be type-safe and assert option type match */ -ulong TY_(_cfgGet)( TidyDocImpl* doc, TidyOptionId optId ); -Bool TY_(_cfgGetBool)( TidyDocImpl* doc, TidyOptionId optId ); -TidyTriState TY_(_cfgGetAutoBool)( TidyDocImpl* doc, TidyOptionId optId ); -ctmbstr TY_(_cfgGetString)( TidyDocImpl* doc, TidyOptionId optId ); +TY_PRIVATE ulong TY_(_cfgGet)( TidyDocImpl* doc, TidyOptionId optId ); +TY_PRIVATE Bool TY_(_cfgGetBool)( TidyDocImpl* doc, TidyOptionId optId ); +TY_PRIVATE TidyTriState TY_(_cfgGetAutoBool)( TidyDocImpl* doc, TidyOptionId optId ); +TY_PRIVATE ctmbstr TY_(_cfgGetString)( TidyDocImpl* doc, TidyOptionId optId ); #define cfg(doc, id) TY_(_cfgGet)( (doc), (id) ) #define cfgBool(doc, id) TY_(_cfgGetBool)( (doc), (id) ) diff --git a/src/entities.h b/src/entities.h index 95533e4..0702e06 100644 --- a/src/entities.h +++ b/src/entities.h @@ -12,7 +12,7 @@ /* entity starting with "&" returns zero on error */ /* uint EntityCode( ctmbstr name, uint versions ); */ -ctmbstr TY_(EntityName)( uint charCode, uint versions ); -Bool TY_(EntityInfo)( ctmbstr name, Bool isXml, uint* code, uint* versions ); +TY_PRIVATE ctmbstr TY_(EntityName)( uint charCode, uint versions ); +TY_PRIVATE Bool TY_(EntityInfo)( ctmbstr name, Bool isXml, uint* code, uint* versions ); #endif /* __ENTITIES_H__ */ diff --git a/src/fileio.h b/src/fileio.h index a0e0df9..b644af1 100644 --- a/src/fileio.h +++ b/src/fileio.h @@ -17,24 +17,24 @@ extern "C" { #endif /** 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 */ -void TY_(freeFileSource)( TidyInputSource* source, Bool closeIt ); +TY_PRIVATE void TY_(freeFileSource)( TidyInputSource* source, Bool closeIt ); #if SUPPORT_POSIX_MAPPED_FILES /** 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 */ -void TY_(freeStdIOFileSource)( TidyInputSource* source, Bool closeIt ); +TY_PRIVATE void TY_(freeStdIOFileSource)( TidyInputSource* source, Bool closeIt ); #endif /** Initialize file output sink */ -void TY_(initFileSink)( TidyOutputSink* sink, FILE* fp ); +TY_PRIVATE void TY_(initFileSink)( TidyOutputSink* sink, FILE* fp ); /* 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 } diff --git a/src/forward.h b/src/forward.h index 7f59371..55ffaab 100644 --- a/src/forward.h +++ b/src/forward.h @@ -22,6 +22,13 @@ #define TYDYAPPEND(str1,str2) str1##str2 #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; typedef struct _StreamIn StreamIn; @@ -53,7 +60,7 @@ typedef struct _IStack IStack; struct _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 */ #define TidyAlloc(allocator, size) ((allocator)->vtbl->alloc((allocator), (size))) diff --git a/src/gdoc.h b/src/gdoc.h index b8bd9f5..ce46d9d 100644 --- a/src/gdoc.h +++ b/src/gdoc.h @@ -14,6 +14,6 @@ */ -void TY_(CleanGoogleDocument)( TidyDocImpl* doc ); +TY_PRIVATE void TY_(CleanGoogleDocument)( TidyDocImpl* doc ); #endif /* __GDOC_H__ */ diff --git a/src/language.c b/src/language.c index 3381759..d52d015 100644 --- a/src/language.c +++ b/src/language.c @@ -306,7 +306,7 @@ ctmbstr TY_(tidyLocalizedString)( uint messageType ) * return it if there's no other match. * @note this routine uses default allocator, see tidySetMallocCall. */ -tmbstr TY_(tidyNormalizedLocaleName)( ctmbstr locale ) +static tmbstr TY_(tidyNormalizedLocaleName)( ctmbstr locale ) { uint i; uint len; @@ -363,7 +363,7 @@ tmbstr TY_(tidyNormalizedLocaleName)( ctmbstr locale ) * Returns the languageDefinition if the languageCode is installed in Tidy, * otherwise return NULL */ -languageDefinition *TY_(tidyTestLanguage)( ctmbstr languageCode ) +static languageDefinition *TY_(tidyTestLanguage)( ctmbstr languageCode ) { uint i; languageDefinition *testLang; @@ -395,7 +395,7 @@ languageDefinition *TY_(tidyTestLanguage)( ctmbstr languageCode ) * 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. */ -Bool TY_(tidySetLanguage)( ctmbstr languageCode ) +TY_PRIVATE Bool TY_(tidySetLanguage)( ctmbstr languageCode ) { languageDefinition *dict1 = NULL; languageDefinition *dict2 = NULL; @@ -448,7 +448,7 @@ Bool TY_(tidySetLanguage)( ctmbstr languageCode ) /** * Gets the current language used by Tidy. */ -ctmbstr TY_(tidyGetLanguage)() +TY_PRIVATE ctmbstr TY_(tidyGetLanguage)() { languageDefinition *langDef = tidyLanguages.currentLanguage; languageDictionary *langDict = &langDef->messages; @@ -460,7 +460,7 @@ ctmbstr TY_(tidyGetLanguage)() * Indicates whether or not the current language was set by a * LibTidy user (yes) or internally by the library (no). */ -Bool TY_(tidyGetLanguageSetByUser)() +TY_PRIVATE Bool TY_(tidyGetLanguageSetByUser)() { return tidyLanguages.manually_set; } @@ -470,7 +470,7 @@ Bool TY_(tidyGetLanguageSetByUser)() * Specifies to LibTidy that the user (rather than the library) * selected the current language. */ -void TY_(tidySetLanguageSetByUser)( void ) +TY_PRIVATE void TY_(tidySetLanguageSetByUser)( void ) { tidyLanguages.manually_set = yes; } @@ -480,7 +480,7 @@ void TY_(tidySetLanguageSetByUser)( void ) * Provides a string given `messageType` in the default * 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); } @@ -511,7 +511,7 @@ static const uint tidyStringKeyListSize() * these are provided for documentation generation purposes * and probably aren't useful for LibTidy implementors. */ -TidyIterator TY_(getStringKeyList)() +TY_PRIVATE TidyIterator TY_(getStringKeyList)() { return (TidyIterator)(size_t)1; } @@ -522,7 +522,7 @@ TidyIterator TY_(getStringKeyList)() * generation purposes and probably aren't useful to * libtidy implementors. */ -uint TY_(getNextStringKey)( TidyIterator* iter ) +TY_PRIVATE uint TY_(getNextStringKey)( TidyIterator* iter ) { uint item = 0; size_t itemIndex; @@ -564,7 +564,7 @@ static const uint tidyLanguageListSize() * in Tidy's structure of Windows<->POSIX local mapping. * Items can be retrieved with getNextWindowsLanguage(); */ -TidyIterator TY_(getWindowsLanguageList)() +TY_PRIVATE TidyIterator TY_(getWindowsLanguageList)() { return (TidyIterator)(size_t)1; } @@ -573,7 +573,7 @@ TidyIterator TY_(getWindowsLanguageList)() * Returns the next record of type `localeMapItem` in * 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; size_t itemIndex; @@ -595,7 +595,7 @@ const tidyLocaleMapItemImpl *TY_(getNextWindowsLanguage)( TidyIterator *iter ) /** * Given a `tidyLocaleMapItemImpl, return the Windows name. */ -ctmbstr TY_(TidyLangWindowsName)( const tidyLocaleMapItemImpl *item ) +TY_PRIVATE ctmbstr TY_(TidyLangWindowsName)( const tidyLocaleMapItemImpl *item ) { return item->winName; } @@ -604,7 +604,7 @@ ctmbstr TY_(TidyLangWindowsName)( const tidyLocaleMapItemImpl *item ) /** * Given a `tidyLocaleMapItemImpl, return the POSIX name. */ -ctmbstr TY_(TidyLangPosixName)( const tidyLocaleMapItemImpl *item ) +TY_PRIVATE ctmbstr TY_(TidyLangPosixName)( const tidyLocaleMapItemImpl *item ) { return item->POSIXName; } @@ -632,7 +632,7 @@ static const uint tidyInstalledLanguageListSize() * in Tidy's list of installed language codes. * Items can be retrieved with getNextInstalledLanguage(); */ -TidyIterator TY_(getInstalledLanguageList)() +TY_PRIVATE TidyIterator TY_(getInstalledLanguageList)() { return (TidyIterator)(size_t)1; } @@ -640,7 +640,7 @@ TidyIterator TY_(getInstalledLanguageList)() /** * Returns the next installed language. */ -ctmbstr TY_(getNextInstalledLanguage)( TidyIterator* iter ) +TY_PRIVATE ctmbstr TY_(getNextInstalledLanguage)( TidyIterator* iter ) { ctmbstr item = NULL; size_t itemIndex; @@ -657,3 +657,8 @@ ctmbstr TY_(getNextInstalledLanguage)( TidyIterator* iter ) *iter = (TidyIterator)( itemIndex <= tidyInstalledLanguageListSize() ? itemIndex : (size_t)0 ); return item; } + +/* + * end: + */ + diff --git a/src/language.h b/src/language.h index e05313e..05f2829 100644 --- a/src/language.h +++ b/src/language.h @@ -95,7 +95,7 @@ typedef struct tidyLocaleMapItemImpl { ** Returns NULL on failure. ** @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. @@ -108,12 +108,12 @@ tmbstr TY_(tidySystemLocale)(tmbstr result); * 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. */ -Bool TY_(tidySetLanguage)( ctmbstr languageCode ); +TY_PRIVATE Bool TY_(tidySetLanguage)( ctmbstr languageCode ); /** * 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 * 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 * 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 * 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 * 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 * 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 @@ -165,7 +165,7 @@ ctmbstr TY_(tidyDefaultString)( uint messageType ); * these are provided for documentation generation purposes * 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 @@ -173,42 +173,42 @@ TidyIterator TY_(getStringKeyList)(void); * generation purposes and probably aren't useful to * libtidy implementors. */ -uint TY_(getNextStringKey)( TidyIterator* iter ); +TY_PRIVATE uint TY_(getNextStringKey)( TidyIterator* iter ); /** * Initializes the TidyIterator to point to the first item * in Tidy's structure of Windows<->POSIX local mapping. * Items can be retrieved with getNextWindowsLanguage(); */ -TidyIterator TY_(getWindowsLanguageList)(void); +TY_PRIVATE TidyIterator TY_(getWindowsLanguageList)(void); /** * Returns the next record of type `localeMapItem` in * 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. */ -ctmbstr TY_(TidyLangWindowsName)( const tidyLocaleMapItemImpl *item ); +TY_PRIVATE ctmbstr TY_(TidyLangWindowsName)( const tidyLocaleMapItemImpl *item ); /** * 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 * in Tidy's list of installed language codes. * Items can be retrieved with getNextInstalledLanguage(); */ -TidyIterator TY_(getInstalledLanguageList)(void); +TY_PRIVATE TidyIterator TY_(getInstalledLanguageList)(void); /** * Returns the next installed language. */ -ctmbstr TY_(getNextInstalledLanguage)( TidyIterator* iter ); +TY_PRIVATE ctmbstr TY_(getNextInstalledLanguage)( TidyIterator* iter ); /** @} */ diff --git a/src/lexer.h b/src/lexer.h index 50fa2cd..c181d4b 100644 --- a/src/lexer.h +++ b/src/lexer.h @@ -383,32 +383,32 @@ struct _Lexer */ /* 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 */ /* 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); -Bool TY_(IsDigit)(uint c); -Bool TY_(IsLetter)(uint c); -Bool TY_(IsHTMLSpace)(uint c); -Bool TY_(IsNewline)(uint c); -Bool TY_(IsNamechar)(uint c); -Bool TY_(IsXMLLetter)(uint c); -Bool TY_(IsXMLNamechar)(uint c); +TY_PRIVATE Bool TY_(IsWhite)(uint c); +TY_PRIVATE Bool TY_(IsDigit)(uint c); +TY_PRIVATE Bool TY_(IsLetter)(uint c); +TY_PRIVATE Bool TY_(IsHTMLSpace)(uint c); +TY_PRIVATE Bool TY_(IsNewline)(uint c); +TY_PRIVATE Bool TY_(IsNamechar)(uint c); +TY_PRIVATE Bool TY_(IsXMLLetter)(uint c); +TY_PRIVATE Bool TY_(IsXMLNamechar)(uint c); /* Bool IsLower(uint c); */ -Bool TY_(IsUpper)(uint c); -uint TY_(ToLower)(uint c); -uint TY_(ToUpper)(uint c); +TY_PRIVATE Bool TY_(IsUpper)(uint c); +TY_PRIVATE uint TY_(ToLower)(uint c); +TY_PRIVATE uint TY_(ToUpper)(uint c); -Lexer* TY_(NewLexer)( TidyDocImpl* doc ); -void TY_(FreeLexer)( TidyDocImpl* doc ); +TY_PRIVATE Lexer* TY_(NewLexer)( TidyDocImpl* doc ); +TY_PRIVATE void TY_(FreeLexer)( TidyDocImpl* doc ); /* 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 @@ -423,78 +423,78 @@ void TY_(AddCharToLexer)( Lexer *lexer, uint c ); list of AttVal nodes which hold the 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
text
more text
*/
-void TY_(PushInline)( TidyDocImpl* doc, Node* node );
+TY_PRIVATE void TY_(PushInline)( TidyDocImpl* doc, Node* node );
/* 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 );
-Bool TY_(IsPushedLast)( TidyDocImpl* doc, Node *element, Node *node );
+TY_PRIVATE Bool TY_(IsPushed)( TidyDocImpl* doc, Node* node );
+TY_PRIVATE Bool TY_(IsPushedLast)( TidyDocImpl* doc, Node *element, Node *node );
/*
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
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
element where the inlines shouldn't be duplicated
*/
-void TY_(DeferDup)( TidyDocImpl* doc );
-Node* TY_(InsertedToken)( TidyDocImpl* doc );
+TY_PRIVATE void TY_(DeferDup)( TidyDocImpl* doc );
+TY_PRIVATE Node* TY_(InsertedToken)( TidyDocImpl* doc );
/* stack manipulation for inline elements */
-Bool TY_(SwitchInline)( TidyDocImpl* doc, Node* element, Node* node );
-Bool TY_(InlineDup1)( TidyDocImpl* doc, Node* node, Node* element );
+TY_PRIVATE Bool TY_(SwitchInline)( TidyDocImpl* doc, Node* element, Node* node );
+TY_PRIVATE Bool TY_(InlineDup1)( TidyDocImpl* doc, Node* node, Node* element );
#ifdef __cplusplus
}
diff --git a/src/message.c b/src/message.c
index 8f6b1fb..7c57dfc 100644
--- a/src/message.c
+++ b/src/message.c
@@ -1073,7 +1073,7 @@ static struct _dialogueDispatchTable {
** every message, because they're not all the complex and there aren't that
** 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)
{
diff --git a/src/message.h b/src/message.h
index b093d1d..b8e759c 100644
--- a/src/message.h
+++ b/src/message.h
@@ -66,12 +66,12 @@
/**
* 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.
*/
-ctmbstr TY_(tidyLibraryVersion)(void);
+TY_PRIVATE ctmbstr TY_(tidyLibraryVersion)(void);
/** @} message_releaseinfo group */
@@ -105,7 +105,7 @@ ctmbstr TY_(tidyLibraryVersion)(void);
* The designated report writing function. When a proper formatter exists,
* 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 );
-void TY_(ReportAttrError)(TidyDocImpl* doc, Node *node, AttVal *av, uint code);
-void TY_(ReportBadArgument)( TidyDocImpl* doc, ctmbstr option );
-void TY_(ReportEntityError)( TidyDocImpl* doc, uint code, ctmbstr entity, int c );
-void TY_(ReportFileError)( TidyDocImpl* doc, ctmbstr file, uint code );
-void TY_(ReportEncodingError)(TidyDocImpl* doc, uint code, uint c, Bool discarded);
-void TY_(ReportEncodingWarning)(TidyDocImpl* doc, uint code, uint encoding);
-void TY_(ReportMissingAttr)( TidyDocImpl* doc, Node* node, ctmbstr name );
-void TY_(ReportSurrogateError)(TidyDocImpl* doc, uint code, uint c1, uint c2);
-void TY_(ReportUnknownOption)( TidyDocImpl* doc, ctmbstr option );
+TY_PRIVATE void TY_(ReportAccessError)( TidyDocImpl* doc, Node* node, uint code );
+TY_PRIVATE void TY_(ReportAttrError)(TidyDocImpl* doc, Node *node, AttVal *av, uint code);
+TY_PRIVATE void TY_(ReportBadArgument)( TidyDocImpl* doc, ctmbstr option );
+TY_PRIVATE void TY_(ReportEntityError)( TidyDocImpl* doc, uint code, ctmbstr entity, int c );
+TY_PRIVATE void TY_(ReportFileError)( TidyDocImpl* doc, ctmbstr file, uint code );
+TY_PRIVATE void TY_(ReportEncodingError)(TidyDocImpl* doc, uint code, uint c, Bool discarded);
+TY_PRIVATE void TY_(ReportEncodingWarning)(TidyDocImpl* doc, uint code, uint encoding);
+TY_PRIVATE void TY_(ReportMissingAttr)( TidyDocImpl* doc, Node* node, ctmbstr name );
+TY_PRIVATE void TY_(ReportSurrogateError)(TidyDocImpl* doc, uint code, uint c1, uint c2);
+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
* 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
* 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 `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.
* 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.
** @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.
** @param doc The Tidy document.
** @param opt The option that is defining the muted message.
** @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.
** @param doc The Tidy document.
** @returns Returns an iterator token.
*/
-TidyIterator TY_(getMutedMessageList)( TidyDocImpl* doc );
+TY_PRIVATE TidyIterator TY_(getMutedMessageList)( TidyDocImpl* doc );
/** Get the next priority attribute.
** @param doc The Tidy document.
** @param iter The iterator token.
** @returns The next priority attribute.
*/
-ctmbstr TY_(getNextMutedMessage)( TidyDocImpl* doc, TidyIterator* iter );
+TY_PRIVATE ctmbstr TY_(getNextMutedMessage)( TidyDocImpl* doc, TidyIterator* iter );
/** @} message_muting group */
@@ -245,13 +245,13 @@ ctmbstr TY_(getNextMutedMessage)( TidyDocImpl* doc, TidyIterator* iter );
* `TidyReportCallback` will return this general string as the report
* 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
* 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`.
* 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
* with `getErrorCodeList()`. You can use tidyErrorCodeAsKey
* to determine the key for this value.
*/
-uint TY_(getNextErrorCode)( TidyIterator* iter );
+TY_PRIVATE uint TY_(getNextErrorCode)( TidyIterator* iter );
/** @} message_keydiscovery group */
diff --git a/src/messageobj.h b/src/messageobj.h
index 0ee1666..e22a24f 100644
--- a/src/messageobj.h
+++ b/src/messageobj.h
@@ -29,7 +29,7 @@
/** Creates a TidyMessageImpl, but without line numbers, such as used for
** information report output.
*/
-TidyMessageImpl *TY_(tidyMessageCreate)( TidyDocImpl *doc,
+TY_PRIVATE TidyMessageImpl *TY_(tidyMessageCreate)( TidyDocImpl *doc,
uint code,
TidyReportLevel level,
... );
@@ -37,7 +37,7 @@ TidyMessageImpl *TY_(tidyMessageCreate)( TidyDocImpl *doc,
/** Creates a TidyMessageImpl, using the line and column from the provided
** Node as the message position source.
*/
-TidyMessageImpl *TY_(tidyMessageCreateWithNode)( TidyDocImpl *doc,
+TY_PRIVATE TidyMessageImpl *TY_(tidyMessageCreateWithNode)( TidyDocImpl *doc,
Node *node,
uint code,
TidyReportLevel level,
@@ -46,7 +46,7 @@ TidyMessageImpl *TY_(tidyMessageCreateWithNode)( TidyDocImpl *doc,
/** Creates a TidyMessageImpl, using the line and column from the provided
** document's Lexer as the message position source.
*/
-TidyMessageImpl *TY_(tidyMessageCreateWithLexer)( TidyDocImpl *doc,
+TY_PRIVATE TidyMessageImpl *TY_(tidyMessageCreateWithLexer)( TidyDocImpl *doc,
uint code,
TidyReportLevel level,
... );
@@ -54,7 +54,7 @@ TidyMessageImpl *TY_(tidyMessageCreateWithLexer)( TidyDocImpl *doc,
/** Deallocates a TidyMessageImpl in order to free up its allocated memory
** when you're done using it.
*/
-void TY_(tidyMessageRelease)( TidyMessageImpl *message );
+TY_PRIVATE void TY_(tidyMessageRelease)( TidyMessageImpl *message );
/** @} end messageobj_instantiation group */
@@ -63,55 +63,55 @@ void TY_(tidyMessageRelease)( TidyMessageImpl *message );
/** get the document the message came from. */
-TidyDocImpl* TY_(getMessageDoc)( TidyMessageImpl message );
+TY_PRIVATE TidyDocImpl* TY_(getMessageDoc)( TidyMessageImpl message );
/** get the message key code. */
-uint TY_(getMessageCode)( TidyMessageImpl message );
+TY_PRIVATE uint TY_(getMessageCode)( TidyMessageImpl message );
/** 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. */
-int TY_(getMessageLine)( TidyMessageImpl message );
+TY_PRIVATE int TY_(getMessageLine)( TidyMessageImpl message );
/** 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. */
-TidyReportLevel TY_(getMessageLevel)( TidyMessageImpl message );
+TY_PRIVATE TidyReportLevel TY_(getMessageLevel)( TidyMessageImpl message );
/** 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 */
-ctmbstr TY_(getMessageFormatDefault)( TidyMessageImpl message );
+TY_PRIVATE ctmbstr TY_(getMessageFormatDefault)( TidyMessageImpl message );
/** the localized format string */
-ctmbstr TY_(getMessageFormat)( TidyMessageImpl message );
+TY_PRIVATE ctmbstr TY_(getMessageFormat)( TidyMessageImpl message );
/** the message, formatted, default language */
-ctmbstr TY_(getMessageDefault)( TidyMessageImpl message );
+TY_PRIVATE ctmbstr TY_(getMessageDefault)( TidyMessageImpl message );
/** the message, formatted, localized */
-ctmbstr TY_(getMessage)( TidyMessageImpl message );
+TY_PRIVATE ctmbstr TY_(getMessage)( TidyMessageImpl message );
/** the position part, default language */
-ctmbstr TY_(getMessagePosDefault)( TidyMessageImpl message );
+TY_PRIVATE ctmbstr TY_(getMessagePosDefault)( TidyMessageImpl message );
/** the position part, localized */
-ctmbstr TY_(getMessagePos)( TidyMessageImpl message );
+TY_PRIVATE ctmbstr TY_(getMessagePos)( TidyMessageImpl message );
/** the prefix part, default language */
-ctmbstr TY_(getMessagePrefixDefault)( TidyMessageImpl message );
+TY_PRIVATE ctmbstr TY_(getMessagePrefixDefault)( TidyMessageImpl message );
/** 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 */
-ctmbstr TY_(getMessageOutputDefault)( TidyMessageImpl message );
+TY_PRIVATE ctmbstr TY_(getMessageOutputDefault)( TidyMessageImpl message );
/* 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 */
@@ -123,19 +123,19 @@ ctmbstr TY_(getMessageOutput)( TidyMessageImpl message );
* argument. Use `TY_(getNextMEssageArgument)` to get an opaque instance of
* `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
* 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.
*/
-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
* 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
* 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
* 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
* 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
* 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 */
diff --git a/src/parser.c b/src/parser.c
index cda3200..c974c0e 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -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)
static int in_parse_inline = 0;
@@ -3738,7 +3738,7 @@ void TY_(ParseHead)(TidyDocImpl* doc, Node *head, GetTokenMode ARG_UNUSED(mode))
* Issue #166 - repeated