From c68ad42482929b06d4156a97674b29d3b6a56e50 Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Sat, 7 Nov 2015 14:50:10 +0100 Subject: [PATCH 1/8] Revert 22a1922c35dbac0e42461ba66f0e696422d77d72 --- include/tidyenum.h | 10 ---- src/attrs.c | 135 --------------------------------------------- src/attrs.h | 1 - 3 files changed, 146 deletions(-) diff --git a/include/tidyenum.h b/include/tidyenum.h index 643284b..3ef0298 100644 --- a/include/tidyenum.h +++ b/include/tidyenum.h @@ -802,16 +802,6 @@ typedef enum /* MathML attributes */ TidyAttr_DISPLAY, /**< DISPLAY= (html5) */ - /* RDFa global attributes */ - TidyAttr_ABOUT, /**< ABOUT= */ - TidyAttr_DATATYPE, /**< DATATYPE= */ - TidyAttr_INLIST, /**< INLIST= */ - TidyAttr_PREFIX, /**< PREFIX= */ - TidyAttr_PROPERTY, /**< PROPERTY= */ - TidyAttr_RESOURCE, /**< RESOURCE= */ - TidyAttr_TYPEOF, /**< TYPEOF= */ - TidyAttr_VOCAB, /**< VOCAB= */ - N_TIDY_ATTRIBS /**< Must be last */ } TidyAttrId; diff --git a/src/attrs.c b/src/attrs.c index 3e67889..a2b5ccf 100644 --- a/src/attrs.c +++ b/src/attrs.c @@ -47,9 +47,6 @@ static AttrCheck CheckScroll; static AttrCheck CheckTextDir; static AttrCheck CheckLang; static AttrCheck CheckType; -static AttrCheck CheckRDFaSafeCURIE; -static AttrCheck CheckRDFaTerm; -static AttrCheck CheckRDFaPrefix; #define CH_PCDATA NULL #define CH_CHARSET NULL @@ -88,11 +85,6 @@ static AttrCheck CheckRDFaPrefix; #define CH_TARGET CheckTarget #define CH_VTYPE CheckVType #define CH_ACTION CheckAction -#define CH_RDFAPREFIX CheckRDFaPrefix -#define CH_RDFASCURIE CheckRDFaSafeCURIE -#define CH_RDFASCURIES CheckRDFaSafeCURIE -#define CH_RDFATERM CheckRDFaTerm -#define CH_RDFATERMS CheckRDFaTerm static const Attribute attribute_defs [] = { @@ -425,16 +417,6 @@ static const Attribute attribute_defs [] = #endif { TidyAttr_DISPLAY, "display", CH_PCDATA }, /* on MATH tag (html5) */ - /* RDFa Attributes */ - { TidyAttr_ABOUT, "about", CH_RDFASCURIE }, - { TidyAttr_DATATYPE, "datatype", CH_RDFATERM }, - { TidyAttr_INLIST, "inlist", CH_BOOL }, - { TidyAttr_PREFIX, "prefix", CH_RDFAPREFIX }, - { TidyAttr_PROPERTY, "property", CH_RDFATERMS }, - { TidyAttr_RESOURCE, "resource", CH_RDFASCURIE }, - { TidyAttr_TYPEOF, "typeof", CH_RDFATERMS }, - { TidyAttr_VOCAB, "vocab", CH_URL }, - /* this must be the final entry */ { N_TIDY_ATTRIBS, NULL, NULL } }; @@ -450,32 +432,6 @@ static uint AttributeVersions(Node* node, AttVal* attval) return (XH50 | HT50); if (strcmp(attval->attribute,"allowfullscreen") == 0) return (XH50 | HT50); - /* RDFa global attributes */ - if (strcmp(attval->attribute,"about") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"datatype") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"inlist") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"prefix") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"property") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"resource") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"typeof") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"vocab") == 0) - return (XH50 | HT50); - /* Override the settings on these attributes because - * they are allowed everywhere by RDFa */ - if (strcmp(attval->attribute,"content") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"rel") == 0) - return (XH50 | HT50); - if (strcmp(attval->attribute,"rev") == 0) - return (XH50 | HT50); - } /* TODO: maybe this should return VERS_PROPRIETARY instead? */ if (!attval || !attval->dict) @@ -2197,97 +2153,6 @@ AttVal *SortAttVal( AttVal *list, TidyAttrSortStrategy strat) } } -/* RDFA support checkers - * - */ - -/* CheckRDFAPrefix - ensure the prefix attribute value is - * correct - * - * @prefix takes prefix value pairs in the form: - * - * NCName ':' ' '+ AnyURI - */ - -void CheckRDFaPrefix ( TidyDocImpl* doc, Node *node, AttVal *attval) -{ - if (!AttrHasValue(attval)) - { - TY_(ReportAttrError)( doc, node, attval, MISSING_ATTR_VALUE); - return; - } - - /* Copy the attribute value so we can split it */ - if (attval->value) { - uint prefixCount = 0; - /* isPrefix toggles - start at 1 and change to 0 as we - * iterate over the components of the value */ - uint isPrefix = 1; - - /* Copy it over */ - - uint len = TY_(tmbstrlen)(attval->value); - tmbstr s = (tmbstr) TidyDocAlloc( doc, len ); - s[0] = '\0'; - TY_(tmbstrcpy)( s, attval->value ); - - /* iterate over value */ - tmbstr tPtr = s; - - tmbstr t; - while ( ( t = strtok(tPtr, " ") ) != NULL ) { - tPtr = NULL; - if (isPrefix) { - /* this piece should be a prefix */ - /* prefix rules are that it can have any - * character except a colon - that one must be - * at the end */ - tmbstr i = index(t, ':') ; - if (i == NULL) { - /* no colon - bad! */ - TY_(ReportAttrError)( doc, node, attval, BAD_ATTRIBUTE_VALUE); - } else if (i != ( t + TY_(tmbstrlen)(t) - 1) ) { - /* not at the end - also bad */ - TY_(ReportAttrError)( doc, node, attval, BAD_ATTRIBUTE_VALUE); - } - } else { - /* this piece should be a URL */ - prefixCount ++; - } - isPrefix = !isPrefix; - } - TidyDocFree( doc, s ) ; - } -} - -/* CheckRDFaTerm - are terms valid - * - */ - -void CheckRDFaTerm ( TidyDocImpl* doc, Node *node, AttVal *attval) -{ - if (!AttrHasValue(attval)) - { - TY_(ReportAttrError)( doc, node, attval, MISSING_ATTR_VALUE); - return; - } - -} - -/* CheckRDFaSafeCURIE - is a CURIE legal - * - */ - -void CheckRDFaSafeCURIE ( TidyDocImpl* doc, Node *node, AttVal *attval) -{ - if (!AttrHasValue(attval)) - { - TY_(ReportAttrError)( doc, node, attval, MISSING_ATTR_VALUE); - return; - } - -} - /* * local variables: * mode: c diff --git a/src/attrs.h b/src/attrs.h index c01bd44..2a70faf 100644 --- a/src/attrs.h +++ b/src/attrs.h @@ -12,7 +12,6 @@ /* declaration for methods that check attribute values */ typedef void (AttrCheck)(TidyDocImpl* doc, Node *node, AttVal *attval); -typedef void (AttrCheckEx)(TidyDocImpl* doc, Node *node, AttVal *attval, uint limit); struct _Attribute { From a5944735df829a13d10a349faa8d47ef092c0aaa Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Sat, 7 Nov 2015 15:02:23 +0100 Subject: [PATCH 2/8] Update 'testbase' to version 5.1.20 --- test/input/cfg_1642186-1.txt | 3 ++- test/input/cfg_443576.txt | 9 +++++++++ test/testbase/msg_1053626.txt | 4 ---- test/testbase/msg_1055304.txt | 4 ---- test/testbase/msg_1098012.txt | 4 ---- test/testbase/msg_1316307-2.txt | 4 ---- test/testbase/msg_1331849.txt | 4 ---- test/testbase/msg_2046048.txt | 6 +----- test/testbase/msg_426885.txt | 4 ---- test/testbase/msg_427836.txt | 4 ---- test/testbase/msg_431889.txt | 4 ---- test/testbase/msg_443576.txt | 2 +- test/testbase/msg_443678.txt | 3 +-- test/testbase/msg_588061.txt | 4 ---- test/testbase/msg_676205.txt | 4 ---- test/testbase/msg_678268.txt | 4 ---- test/testbase/out_443576.html | 5 ++--- test/testbase/out_500236.html | 10 +++++----- test/testbase/out_661606.html | Bin 864 -> 889 bytes 19 files changed, 21 insertions(+), 61 deletions(-) create mode 100644 test/input/cfg_443576.txt diff --git a/test/input/cfg_1642186-1.txt b/test/input/cfg_1642186-1.txt index fbda861..0cd0e04 100644 --- a/test/input/cfg_1642186-1.txt +++ b/test/input/cfg_1642186-1.txt @@ -1,4 +1,5 @@ -skip-quotes: yes +// not really required since this is defaul +skip-nested: yes indent: auto tidy-mark: no clean: yes diff --git a/test/input/cfg_443576.txt b/test/input/cfg_443576.txt new file mode 100644 index 0000000..2db0343 --- /dev/null +++ b/test/input/cfg_443576.txt @@ -0,0 +1,9 @@ +// now that skip-nested defaults to 'on', need it off for this test +skip-nested: no +// plus default HTML Tidy configuration - 20150219 +indent: auto +char-encoding: latin1 +tidy-mark: no +clean: yes +logical-emphasis: yes +indent-attributes: yes diff --git a/test/testbase/msg_1053626.txt b/test/testbase/msg_1053626.txt index 2733f40..c9d12e0 100644 --- a/test/testbase/msg_1053626.txt +++ b/test/testbase/msg_1053626.txt @@ -23,10 +23,6 @@ a meaningful context for each cell. For further advice on how to make your pages accessible see http://www.w3.org/WAI/GL. -. You may also want to try -"http://www.cast.org/bobby/" which is a free Web-based -service for checking URLs for accessibility. - About HTML Tidy: https://github.com/htacg/tidy-html5 Bug reports and comments: https://github.com/htacg/tidy-html5/issues Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/ diff --git a/test/testbase/msg_1055304.txt b/test/testbase/msg_1055304.txt index a4939ff..48ce5fa 100644 --- a/test/testbase/msg_1055304.txt +++ b/test/testbase/msg_1055304.txt @@ -11,10 +11,6 @@ to set up and provide immediate feedback to users. For further advice on how to make your pages accessible see http://www.w3.org/WAI/GL. -. You may also want to try -"http://www.cast.org/bobby/" which is a free Web-based -service for checking URLs for accessibility. - About HTML Tidy: https://github.com/htacg/tidy-html5 Bug reports and comments: https://github.com/htacg/tidy-html5/issues Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/ diff --git a/test/testbase/msg_1098012.txt b/test/testbase/msg_1098012.txt index 6a06a60..c9693ab 100644 --- a/test/testbase/msg_1098012.txt +++ b/test/testbase/msg_1098012.txt @@ -23,10 +23,6 @@ a meaningful context for each cell. For further advice on how to make your pages accessible see http://www.w3.org/WAI/GL. -. You may also want to try -"http://www.cast.org/bobby/" which is a free Web-based -service for checking URLs for accessibility. - About HTML Tidy: https://github.com/htacg/tidy-html5 Bug reports and comments: https://github.com/htacg/tidy-html5/issues Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/ diff --git a/test/testbase/msg_1316307-2.txt b/test/testbase/msg_1316307-2.txt index 664c904..3a0d1f1 100644 --- a/test/testbase/msg_1316307-2.txt +++ b/test/testbase/msg_1316307-2.txt @@ -17,10 +17,6 @@ a meaningful context for each cell. For further advice on how to make your pages accessible see http://www.w3.org/WAI/GL. -. You may also want to try -"http://www.cast.org/bobby/" which is a free Web-based -service for checking URLs for accessibility. - About HTML Tidy: https://github.com/htacg/tidy-html5 Bug reports and comments: https://github.com/htacg/tidy-html5/issues Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/ diff --git a/test/testbase/msg_1331849.txt b/test/testbase/msg_1331849.txt index dcd6434..f5cc75d 100644 --- a/test/testbase/msg_1331849.txt +++ b/test/testbase/msg_1331849.txt @@ -17,10 +17,6 @@ a meaningful context for each cell. For further advice on how to make your pages accessible see http://www.w3.org/WAI/GL. -. You may also want to try -"http://www.cast.org/bobby/" which is a free Web-based -service for checking URLs for accessibility. - About HTML Tidy: https://github.com/htacg/tidy-html5 Bug reports and comments: https://github.com/htacg/tidy-html5/issues Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/ diff --git a/test/testbase/msg_2046048.txt b/test/testbase/msg_2046048.txt index 34f9ef4..3f5c0c8 100644 --- a/test/testbase/msg_2046048.txt +++ b/test/testbase/msg_2046048.txt @@ -35,11 +35,7 @@ This document has errors that must be fixed before using HTML Tidy to generate a tidied up version. For further advice on how to make your pages accessible -see http://www.w3.org/WAI/GL and http://www.aprompt.ca/Tidy/accessibilitychecks.html. -. You may also want to try -"http://www.cast.org/bobby/" which is a free Web-based -service for checking URLs for accessibility. - +see http://www.w3.org/WAI/GL and http://www.html-tidy.org/accessibility/. About HTML Tidy: https://github.com/htacg/tidy-html5 Bug reports and comments: https://github.com/htacg/tidy-html5/issues Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/ diff --git a/test/testbase/msg_426885.txt b/test/testbase/msg_426885.txt index edb80aa..39e3058 100644 --- a/test/testbase/msg_426885.txt +++ b/test/testbase/msg_426885.txt @@ -26,10 +26,6 @@ These measures are needed for people using non-graphical browsers. For further advice on how to make your pages accessible see http://www.w3.org/WAI/GL. -. You may also want to try -"http://www.cast.org/bobby/" which is a free Web-based -service for checking URLs for accessibility. - About HTML Tidy: https://github.com/htacg/tidy-html5 Bug reports and comments: https://github.com/htacg/tidy-html5/issues Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/ diff --git a/test/testbase/msg_427836.txt b/test/testbase/msg_427836.txt index b6b22fb..4e8cd39 100644 --- a/test/testbase/msg_427836.txt +++ b/test/testbase/msg_427836.txt @@ -23,10 +23,6 @@ These measures are needed for people using non-graphical browsers. For further advice on how to make your pages accessible see http://www.w3.org/WAI/GL. -. You may also want to try -"http://www.cast.org/bobby/" which is a free Web-based -service for checking URLs for accessibility. - About HTML Tidy: https://github.com/htacg/tidy-html5 Bug reports and comments: https://github.com/htacg/tidy-html5/issues Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/ diff --git a/test/testbase/msg_431889.txt b/test/testbase/msg_431889.txt index 35e85e8..3940bd9 100644 --- a/test/testbase/msg_431889.txt +++ b/test/testbase/msg_431889.txt @@ -10,10 +10,6 @@ These measures are needed for people using non-graphical browsers. For further advice on how to make your pages accessible see http://www.w3.org/WAI/GL. -. You may also want to try -"http://www.cast.org/bobby/" which is a free Web-based -service for checking URLs for accessibility. - About HTML Tidy: https://github.com/htacg/tidy-html5 Bug reports and comments: https://github.com/htacg/tidy-html5/issues Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/ diff --git a/test/testbase/msg_443576.txt b/test/testbase/msg_443576.txt index 289b854..ef4c148 100644 --- a/test/testbase/msg_443576.txt +++ b/test/testbase/msg_443576.txt @@ -1,5 +1,5 @@ line 1 column 1 - Warning: missing declaration -line 8 column 31 - Warning: '<' + '/' + letter not allowed here +line 10 column 1 - Warning: discarding unexpected Info: Document content looks like HTML5 2 warnings, 0 errors were found! diff --git a/test/testbase/msg_443678.txt b/test/testbase/msg_443678.txt index 52435cc..14eb869 100644 --- a/test/testbase/msg_443678.txt +++ b/test/testbase/msg_443678.txt @@ -1,8 +1,7 @@ line 1 column 1 - Warning: missing declaration -line 7 column 28 - Warning: '<' + '/' + letter not allowed here line 11 column 1 - Warning: missing Info: Document content looks like HTML5 -3 warnings, 0 errors were found! +2 warnings, 0 errors were found! You are recommended to use CSS to specify page and link colors About HTML Tidy: https://github.com/htacg/tidy-html5 diff --git a/test/testbase/msg_588061.txt b/test/testbase/msg_588061.txt index 94a55d9..b55bd11 100644 --- a/test/testbase/msg_588061.txt +++ b/test/testbase/msg_588061.txt @@ -115,10 +115,6 @@ These measures are needed for people using non-graphical browsers. For further advice on how to make your pages accessible see http://www.w3.org/WAI/GL. -. You may also want to try -"http://www.cast.org/bobby/" which is a free Web-based -service for checking URLs for accessibility. - You are recommended to use CSS to specify the font and properties such as its size and color. This will reduce the size of HTML files and make them easier to maintain diff --git a/test/testbase/msg_676205.txt b/test/testbase/msg_676205.txt index 0ce5fc9..a245e57 100644 --- a/test/testbase/msg_676205.txt +++ b/test/testbase/msg_676205.txt @@ -24,10 +24,6 @@ These measures are needed for people using non-graphical browsers. For further advice on how to make your pages accessible see http://www.w3.org/WAI/GL. -. You may also want to try -"http://www.cast.org/bobby/" which is a free Web-based -service for checking URLs for accessibility. - About HTML Tidy: https://github.com/htacg/tidy-html5 Bug reports and comments: https://github.com/htacg/tidy-html5/issues Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/ diff --git a/test/testbase/msg_678268.txt b/test/testbase/msg_678268.txt index 1ced44c..d486270 100644 --- a/test/testbase/msg_678268.txt +++ b/test/testbase/msg_678268.txt @@ -17,10 +17,6 @@ a meaningful context for each cell. For further advice on how to make your pages accessible see http://www.w3.org/WAI/GL. -. You may also want to try -"http://www.cast.org/bobby/" which is a free Web-based -service for checking URLs for accessibility. - About HTML Tidy: https://github.com/htacg/tidy-html5 Bug reports and comments: https://github.com/htacg/tidy-html5/issues Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/ diff --git a/test/testbase/out_443576.html b/test/testbase/out_443576.html index e9f9c8c..e5caba7 100644 --- a/test/testbase/out_443576.html +++ b/test/testbase/out_443576.html @@ -7,8 +7,7 @@ + document.write(''); // --> diff --git a/test/testbase/out_500236.html b/test/testbase/out_500236.html index 5267e55..144f421 100644 --- a/test/testbase/out_500236.html +++ b/test/testbase/out_500236.html @@ -1,5 +1,5 @@ - - - - + + + + diff --git a/test/testbase/out_661606.html b/test/testbase/out_661606.html index a5e20eb9aedfddd206a992954956a74f4c6f5c20..cdfff158db21988cef18298381978e332d4af6c2 100644 GIT binary patch delta 218 zcmaFB_LFUb79;OOEqfr52_jawaPo55WTYmh*zr#MY%apfrJ#^sP?DLSS8StSl39|I zYR5a-hS8RhcXB18HjrGxsH_W8WK&#HnUkteQdy8{t5lL&QKFw*T&!dVlG4|*QH*wW zaSU;c*3##l{E<;r6CxZNYX=knY1Rkp2CBBvhuFfm*q2 z^uY#m*(BwsRN77UW|Etn#pEz~HIx42+f1gD1)1e08!(#+0@Z;PfYg`d=Gbuo05ke9 AcK`qY From 4ffd0fad6313b436205bdadf9a4d87a0f347c968 Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Sat, 7 Nov 2015 15:06:50 +0100 Subject: [PATCH 3/8] A fix for test 443576 now with own config --- test/testbase/out_443576.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/testbase/out_443576.html b/test/testbase/out_443576.html index e5caba7..e9f9c8c 100644 --- a/test/testbase/out_443576.html +++ b/test/testbase/out_443576.html @@ -7,7 +7,8 @@ From baad0b0064f4d85fade4e811a90d18b5029953fc Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Tue, 26 Jul 2011 14:31:36 +0200 Subject: [PATCH 4/8] Don't mangle the output filename Attached patch works for me, and shouldn't affect any other option processing. --- src/config.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index fc67eb1..2ce42cb 100644 --- a/src/config.c +++ b/src/config.c @@ -929,7 +929,10 @@ Bool TY_(ParseConfigValue)( TidyDocImpl* doc, TidyOptionId optId, ctmbstr optval TidyBuffer inbuf; /* Set up input source */ tidyBufInitWithAllocator( &inbuf, doc->allocator ); tidyBufAttach( &inbuf, (byte*)optval, TY_(tmbstrlen)(optval)+1 ); - doc->config.cfgIn = TY_(BufferInput)( doc, &inbuf, ASCII ); + if (optId == TidyOutFile) + doc->config.cfgIn = TY_(BufferInput)( doc, &inbuf, RAW ); + else + doc->config.cfgIn = TY_(BufferInput)( doc, &inbuf, ASCII ); doc->config.c = GetC( &doc->config ); status = option->parser( doc, option ); From ea7828fca36aa3033ccfa07add873f799c699e76 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 13 Nov 2015 12:33:27 -0600 Subject: [PATCH 5/8] allow modified install paths and make them consistent between static/shared builds. Long term, consider using: https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html issue #295 --- CMakeLists.txt | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3e0ba2..46e07e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,6 +138,15 @@ if (MSVC) list(APPEND LIBHFILES ${SRCDIR}/sprtf.h) endif () ####################################### + +if (NOT LIB_INSTALL_DIR) + set(LIB_INSTALL_DIR lib${LIB_SUFFIX}) +endif () + +if (NOT BIN_INSTALL_DIR) + set(BIN_INSTALL_DIR bin) +endif () + # Always build the STATIC library set(name tidy-static) add_library ( ${name} STATIC ${CFILES} ${HFILES} ${LIBHFILES} ) @@ -146,9 +155,9 @@ set_target_properties( ${name} PROPERTIES ) list ( APPEND add_LIBS ${name} ) install(TARGETS ${name} - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib + RUNTIME DESTINATION ${BIN_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) install( FILES ${HFILES} DESTINATION include ) ######################################## @@ -166,11 +175,11 @@ if (BUILD_SHARED_LIB) set_target_properties( ${name} PROPERTIES COMPILE_FLAGS "-DBUILDING_SHARED_LIB" ) install(TARGETS ${name} - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib + RUNTIME DESTINATION ${BIN_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) -endif () +endif () ########################################################## ### main executable - linked with STATIC library From d0abe84cb38c146ac7c2fae0943552c212c5c7d9 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 13 Nov 2015 13:19:10 -0600 Subject: [PATCH 6/8] support INCLUDE_INSTALL_DIR too --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 46e07e8..eb22e03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,6 +147,10 @@ if (NOT BIN_INSTALL_DIR) set(BIN_INSTALL_DIR bin) endif () +if (NOT INCLUDE_INSTALL_DIR) + set(INCLUDE_INSTALL_DIR include) +endif () + # Always build the STATIC library set(name tidy-static) add_library ( ${name} STATIC ${CFILES} ${HFILES} ${LIBHFILES} ) @@ -159,7 +163,7 @@ install(TARGETS ${name} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) -install( FILES ${HFILES} DESTINATION include ) +install( FILES ${HFILES} DESTINATION ${INCLUDE_INSTALL_DIR} ) ######################################## # if user option still on if (BUILD_SHARED_LIB) From c9699d3820d6eefb4e13666d7d8e5ac3d508529e Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Sat, 14 Nov 2015 15:24:19 +0100 Subject: [PATCH 7/8] Bump version 5.1.21 for #294, PR #298 --- version.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.txt b/version.txt index 54bc0da..d4c2355 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ -5.1.20 -2015.11.05 +5.1.21 +2015.11.14 From 0ee77ca7bdcced2acf3861fbcc1a3645d6353536 Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Sat, 14 Nov 2015 15:50:27 +0100 Subject: [PATCH 8/8] Issue #299 - allow '--help' to be the same as '-h' --- console/tidy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/console/tidy.c b/console/tidy.c index d3563af..bb9e823 100644 --- a/console/tidy.c +++ b/console/tidy.c @@ -1100,6 +1100,7 @@ int main( int argc, char** argv ) tidyOptSetBool( tdoc, TidyQuiet, yes ); else if ( strcasecmp(arg, "help") == 0 || + strcasecmp(arg, "-help") == 0 || strcasecmp(arg, "h") == 0 || *arg == '?' ) { help( prog );