diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c248b3..107eb4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,9 +140,9 @@ set ( INCDIR include ) set ( CFILES ${SRCDIR}/access.c ${SRCDIR}/attrs.c ${SRCDIR}/istack.c ${SRCDIR}/parser.c ${SRCDIR}/tags.c ${SRCDIR}/entities.c - ${SRCDIR}/lexer.c ${SRCDIR}/pprint.c ${SRCDIR}/charsets.c ${SRCDIR}/clean.c - ${SRCDIR}/message.c ${SRCDIR}/config.c ${SRCDIR}/alloc.c - ${SRCDIR}/attrask.c ${SRCDIR}/attrdict.c ${SRCDIR}/attrget.c + ${SRCDIR}/lexer.c ${SRCDIR}/pprint.c ${SRCDIR}/charsets.c + ${SRCDIR}/clean.c ${SRCDIR}/message.c ${SRCDIR}/config.c + ${SRCDIR}/alloc.c ${SRCDIR}/attrapi.c ${SRCDIR}/attrdict.c ${SRCDIR}/buffio.c ${SRCDIR}/fileio.c ${SRCDIR}/streamio.c ${SRCDIR}/tagask.c ${SRCDIR}/tmbstr.c ${SRCDIR}/utf8.c ${SRCDIR}/tidylib.c ${SRCDIR}/mappedio.c ${SRCDIR}/gdoc.c diff --git a/include/attrask.c b/include/attrask.c deleted file mode 100644 index 7d3c101..0000000 --- a/include/attrask.c +++ /dev/null @@ -1,25 +0,0 @@ -/* 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 4ffb8db..5eba3dc 100644 --- a/include/tidy.h +++ b/include/tidy.h @@ -812,7 +812,7 @@ TIDY_EXPORT void TIDY_CALL tidyAttrDiscard( TidyDoc itdoc, TidyNode tnod, /* Node info */ TIDY_EXPORT TidyNodeType TIDY_CALL tidyNodeGetType( TidyNode tnod ); -TIDY_EXPORT ctmbstr TIDY_CALL tidyNodeGetName( TidyNode tnod ); +TIDY_EXPORT ctmbstr TIDY_CALL tidyNodeGetName( TidyNode tnod ); TIDY_EXPORT Bool TIDY_CALL tidyNodeIsText( TidyNode tnod ); TIDY_EXPORT Bool TIDY_CALL tidyNodeIsProp( TidyDoc tdoc, TidyNode tnod ); @@ -832,27 +832,18 @@ TIDY_EXPORT uint TIDY_CALL tidyNodeColumn( TidyNode tnod ); /** @} End NodeAsk group */ -/** @defgroup Attribute Attribute Interrogation +/** @defgroup Attribute Attribute Interrogation and Retrieval ** -** Get information about any given attribute. +** Get information about attributes, and retrieve them from nodes. ** @{ */ TIDY_EXPORT TidyAttrId TIDY_CALL tidyAttrGetId( TidyAttr tattr ); TIDY_EXPORT Bool TIDY_CALL tidyAttrIsEvent( TidyAttr tattr ); -/** @} end AttrAsk group */ - - -/** @defgroup AttrGet Attribute Retrieval -** -** Lookup an attribute from a given node -** @{ -*/ - TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetById( TidyNode tnod, TidyAttrId attId ); -/** @} end AttrGet group */ +/** @} end Attribute group */ /** @defgroup MessagesKeys Message Key Management diff --git a/src/attrget.c b/src/attrapi.c similarity index 74% rename from src/attrget.c rename to src/attrapi.c index 1e857b1..c6b806e 100644 --- a/src/attrget.c +++ b/src/attrapi.c @@ -1,4 +1,4 @@ -/* attrget.c -- Locate attribute value by type +/* attrget.c -- Additional attribute API (c) 1998-2006 (W3C) MIT, ERCIM, Keio University See tidy.h for the copyright notice. @@ -6,8 +6,6 @@ */ #include "tidy-int.h" -#include "tags.h" -#include "attrs.h" #include "tidy.h" TidyAttr TIDY_CALL tidyAttrGetById( TidyNode tnod, TidyAttrId attId ) @@ -16,6 +14,13 @@ TidyAttr TIDY_CALL tidyAttrGetById( TidyNode tnod, TidyAttrId attId ) return tidyImplToAttr( TY_(AttrGetById)( nimp, attId ) ); } + +Bool TIDY_CALL tidyAttrIsEvent( TidyAttr tattr ) +{ + return TY_(attrIsEvent)( tidyAttrToImpl(tattr) ); +} + + /* * local variables: * mode: c