From 13c6387f472cf7e4190f55db968bb9c0c6ee6ea0 Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Sat, 18 Feb 2017 16:43:47 -0500 Subject: [PATCH] Removed deprecated AttributeIsSOMETHING from API. --- include/attrask.c | 25 +++++++++++++++++++++ include/tidy.h | 55 ----------------------------------------------- src/tidylib.c | 16 +++----------- 3 files changed, 28 insertions(+), 68 deletions(-) create mode 100644 include/attrask.c diff --git a/include/attrask.c b/include/attrask.c new file mode 100644 index 0000000..7d3c101 --- /dev/null +++ b/include/attrask.c @@ -0,0 +1,25 @@ +/* attrask.c -- Interrogate attribute type + + (c) 1998-2006 (W3C) MIT, ERCIM, Keio University + See tidy.h for the copyright notice. + +*/ + +#include "tidy-int.h" +#include "tidy.h" +#include "attrs.h" + +Bool TIDY_CALL tidyAttrIsEvent( TidyAttr tattr ) +{ + return TY_(attrIsEvent)( tidyAttrToImpl(tattr) ); +} + + +/* + * local variables: + * mode: c + * indent-tabs-mode: nil + * c-basic-offset: 4 + * eval: (c-set-offset 'substatement-open 0) + * end: + */ diff --git a/include/tidy.h b/include/tidy.h index e806478..cf41031 100644 --- a/include/tidy.h +++ b/include/tidy.h @@ -840,61 +840,6 @@ TIDY_EXPORT uint TIDY_CALL tidyNodeColumn( TidyNode tnod ); TIDY_EXPORT TidyAttrId TIDY_CALL tidyAttrGetId( TidyAttr tattr ); TIDY_EXPORT Bool TIDY_CALL tidyAttrIsEvent( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsProp( TidyAttr tattr ); - -/** @defgroup AttrIsAttributeName Deprecated attribute interrogation per AttrId -** -** @deprecated The functions tidyAttrIs{AttributeName} are deprecated and -** should be replaced by tidyAttrGetId. -** @{ -*/ -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsHREF( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsSRC( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsID( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsNAME( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsSUMMARY( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsALT( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsLONGDESC( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsUSEMAP( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsISMAP( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsLANGUAGE( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsTYPE( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsVALUE( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsCONTENT( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsTITLE( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsXMLNS( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsDATAFLD( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsWIDTH( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsHEIGHT( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsFOR( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsSELECTED( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsCHECKED( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsLANG( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsTARGET( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsHTTP_EQUIV( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsREL( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnMOUSEMOVE( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnMOUSEDOWN( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnMOUSEUP( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnCLICK( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnMOUSEOVER( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnMOUSEOUT( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnKEYDOWN( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnKEYUP( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnKEYPRESS( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnFOCUS( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsOnBLUR( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsBGCOLOR( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsLINK( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsALINK( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsVLINK( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsTEXT( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsSTYLE( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsABBR( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsCOLSPAN( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL tidyAttrIsROWSPAN( TidyAttr tattr ); - -/** @} End AttrIsAttributeName group */ /** @} end AttrAsk group */ diff --git a/src/tidylib.c b/src/tidylib.c index 311abf8..7851e39 100755 --- a/src/tidylib.c +++ b/src/tidylib.c @@ -2144,7 +2144,7 @@ uint TIDY_CALL tidyNodeColumn( TidyNode tnod ) return col; } -ctmbstr TIDY_CALL tidyNodeGetName( TidyNode tnod ) +ctmbstr TIDY_CALL tidyNodeGetName( TidyNode tnod ) { Node* nimp = tidyNodeToImpl( tnod ); ctmbstr nnam = NULL; @@ -2154,7 +2154,7 @@ ctmbstr TIDY_CALL tidyNodeGetName( TidyNode tnod ) } -Bool TIDY_CALL tidyNodeHasText( TidyDoc tdoc, TidyNode tnod ) +Bool TIDY_CALL tidyNodeHasText( TidyDoc tdoc, TidyNode tnod ) { TidyDocImpl* doc = tidyDocToImpl( tdoc ); if ( doc ) @@ -2163,7 +2163,7 @@ Bool TIDY_CALL tidyNodeHasText( TidyDoc tdoc, TidyNode tnod ) } -Bool TIDY_CALL tidyNodeGetText( TidyDoc tdoc, TidyNode tnod, TidyBuffer* outbuf ) +Bool TIDY_CALL tidyNodeGetText( TidyDoc tdoc, TidyNode tnod, TidyBuffer* outbuf ) { TidyDocImpl* doc = tidyDocToImpl( tdoc ); Node* nimp = tidyNodeToImpl( tnod ); @@ -2320,16 +2320,6 @@ TidyAttrId TIDY_CALL tidyAttrGetId( TidyAttr tattr ) attrId = attval->dict->id; return attrId; } -Bool TIDY_CALL tidyAttrIsProp( TidyAttr tattr ) -{ - /* - You cannot tell whether an attribute is proprietary without - knowing on which element it occurs in the general case, but - this function cannot know the element. As a result, it does - not work anymore. Do not use. - */ - return no; -} /*******************************************************************