From 2957cb135b8a015f0f60310fd1bd94e7868f4240 Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Fri, 17 Nov 2017 21:39:30 -0500 Subject: [PATCH] Moved orphans from attrapi.c to tidy.c; eliminate attrapi.c. This only affects internal binary representation, but there's not API change, so no version bump. --- CMakeLists.txt | 10 +++++----- src/attrapi.c | 31 ------------------------------- src/tidylib.c | 12 ++++++++++++ 3 files changed, 17 insertions(+), 36 deletions(-) delete mode 100644 src/attrapi.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 20939f3..631f0fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -336,11 +336,11 @@ set ( CFILES ${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}/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 - ${SRCDIR}/language.c ${SRCDIR}/messageobj.c ${SRCDIR}/sprtf.c ) + ${SRCDIR}/alloc.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 ${SRCDIR}/language.c + ${SRCDIR}/messageobj.c ${SRCDIR}/sprtf.c ) set ( HFILES ${INCDIR}/tidyplatform.h ${INCDIR}/tidy.h ${INCDIR}/tidyenum.h diff --git a/src/attrapi.c b/src/attrapi.c deleted file mode 100644 index c6b806e..0000000 --- a/src/attrapi.c +++ /dev/null @@ -1,31 +0,0 @@ -/* attrget.c -- Additional attribute API - - (c) 1998-2006 (W3C) MIT, ERCIM, Keio University - See tidy.h for the copyright notice. - -*/ - -#include "tidy-int.h" -#include "tidy.h" - -TidyAttr TIDY_CALL tidyAttrGetById( TidyNode tnod, TidyAttrId attId ) -{ - Node* nimp = tidyNodeToImpl(tnod); - return tidyImplToAttr( TY_(AttrGetById)( nimp, attId ) ); -} - - -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/src/tidylib.c b/src/tidylib.c index b965300..da34027 100644 --- a/src/tidylib.c +++ b/src/tidylib.c @@ -2481,6 +2481,18 @@ TidyAttrId TIDY_CALL tidyAttrGetId( TidyAttr tattr ) return attrId; } +TidyAttr TIDY_CALL tidyAttrGetById( TidyNode tnod, TidyAttrId attId ) +{ + Node* nimp = tidyNodeToImpl(tnod); + return tidyImplToAttr( TY_(AttrGetById)( nimp, attId ) ); +} + + +Bool TIDY_CALL tidyAttrIsEvent( TidyAttr tattr ) +{ + return TY_(attrIsEvent)( tidyAttrToImpl(tattr) ); +} + /******************************************************************* ** Message Key Management