From eb127a5c5b19edbb705c2b6885fb36403eb7413e Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Tue, 30 May 2017 18:14:58 +0200 Subject: [PATCH 1/3] Issue #550 - K&R/MSVC10 fix - message.c --- src/message.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/message.c b/src/message.c index 6a1b856..9b86bb5 100755 --- a/src/message.c +++ b/src/message.c @@ -569,9 +569,9 @@ void TY_(ReportAttrError)(TidyDocImpl* doc, Node *node, AttVal *av, uint code) /* lexer is not defined when this is called */ void TY_(ReportBadArgument)( TidyDocImpl* doc, ctmbstr option ) { + TidyMessageImpl *message; assert( option != NULL ); - - TidyMessageImpl *message = TY_(tidyMessageCreate)( doc, STRING_MISSING_MALFORMED, TidyConfig, option ); + message = TY_(tidyMessageCreate)( doc, STRING_MISSING_MALFORMED, TidyConfig, option ); messageOut( message ); } From 2c096dfa681baaef1d8a435e35361cf241e97696 Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Tue, 30 May 2017 18:15:25 +0200 Subject: [PATCH 2/3] Issue #550 - K&R/MSVC10 fix - tidy.c --- console/tidy.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/console/tidy.c b/console/tidy.c index 90d8b88..bc5b4e8 100644 --- a/console/tidy.c +++ b/console/tidy.c @@ -39,6 +39,9 @@ static FILE* errout = NULL; #if defined(_WIN32) /** On Windows, we will store the original code page here. */ static uint win_cp; /* original Windows code page */ +#if (defined(_MSC_VER) && (_MSC_VER < 1900)) +#define snprintf _snprintf +#endif #endif @@ -1529,8 +1532,8 @@ static void printXMLCrossRefEqConsole(TidyDoc tdoc, /**< The Tidy document. */ if ( hit ) { - localHit = *hit; tmbstr localName; + localHit = *hit; localize_option_names( &localHit ); printf(" %s\n", localName = get_escaped_name(localHit.name1)); free((tmbstr)localHit.name1); @@ -1882,12 +1885,12 @@ int main( int argc, char** argv ) TidyDoc tdoc = tidyCreate(); int status = 0; tmbstr locale = NULL; - tidySetMessageCallback( tdoc, reportCallback); /* experimental group */ uint contentErrors = 0; uint contentWarnings = 0; uint accessWarnings = 0; + tidySetMessageCallback( tdoc, reportCallback); /* experimental group */ errout = stderr; /* initialize to stderr */ /* Set an atexit handler. */ From e48b06b8c078c9d10f0711bbcf579c748c8b475c Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Tue, 30 May 2017 18:17:13 +0200 Subject: [PATCH 3/3] Bump version to 5.5.31 - closes #550 --- version.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.txt b/version.txt index badd982..753c7de 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ -5.5.30 -2017.05.29 +5.5.31 +2017.05.30