make this version 5.0.0

This commit is contained in:
Geoff McLane 2015-01-22 13:40:50 +01:00
parent 7c1211c879
commit 4a3f5ecf07
5 changed files with 23 additions and 11 deletions

View file

@ -4,7 +4,7 @@ cmake_minimum_required (VERSION 2.8)
project (tidy5)
# ### NOTE: *** Adjust when required ***
set( TIDY_MAJOR_VERSION 1 )
set( TIDY_MAJOR_VERSION 5 )
set( TIDY_MINOR_VERSION 0 )
set( TIDY_MICRO_VERSION 0 )
set( LIBTIDY_VERSION "${TIDY_MAJOR_VERSION}.${TIDY_MINOR_VERSION}.${TIDY_MICRO_VERSION}" )
@ -65,10 +65,7 @@ add_definitions ( -DSUPPORT_UTF16_ENCODINGS=1 )
add_definitions ( -DSUPPORT_ASIAN_ENCODINGS=1 )
add_definitions ( -DSUPPORT_ACCESSIBILITY_CHECKS=1 )
add_definitions ( -DRELEASE_DATE="${tidy_YEAR}/${tidy_MONTH}/${tidy_DAY}" )
# to distinguish between debug and release lib
if (WIN32)
set( CMAKE_DEBUG_POSTFIX "d" )
endif(WIN32)
add_definitions ( -DLIBTIDY_VERSION="${TIDY_MAJOR_VERSION}.${TIDY_MINOR_VERSION}.${TIDY_MICRO_VERSION}" )
if(BUILD_SHARED_LIB)
set(LIB_TYPE SHARED)

View file

@ -437,8 +437,8 @@ static void help( ctmbstr prog )
printf( "Utility to clean up and pretty print HTML/XHTML/XML\n");
printf( "\n");
printf( "This is an HTML5-aware experimental fork of HTML Tidy.\n");
printf( "%s\n", tidyReleaseDate() );
printf( "This is an HTML5-aware experimental fork of HTML Tidy. Date %s. Version %s\n",
tidyReleaseDate(), tidyLibraryVersion() );
printf( "\n");
#ifdef PLATFORM_NAME
@ -782,7 +782,7 @@ void printXMLOption( TidyDoc tdoc, TidyOption topt, OptionDesc *d )
static void XMLoptionhelp( TidyDoc tdoc )
{
printf( "<?xml version=\"1.0\"?>\n"
"<config version=\"%s\">\n", tidyReleaseDate());
"<config date=\"%s\" version=\"%s\">\n", tidyReleaseDate(), tidyLibraryVersion());
ForEachOption( tdoc, printXMLOption );
printf( "</config>\n" );
}
@ -943,8 +943,8 @@ static void optionvalues( TidyDoc tdoc )
static void version( void )
{
#ifdef PLATFORM_NAME
printf( "HTML Tidy for HTML5 (experimental) for %s %s\n",
PLATFORM_NAME, tidyReleaseDate() );
printf( "HTML Tidy for HTML5 (experimental) for %s %s, version %s\n",
PLATFORM_NAME, tidyReleaseDate(), tidyLibraryVersion() );
#else
printf( "HTML Tidy for HTML5 (experimental) %s\n", tidyReleaseDate() );
#endif

View file

@ -327,6 +327,9 @@ TIDY_EXPORT void* TIDY_CALL tidyGetAppData( TidyDoc tdoc );
/** Get release date (version) for current library */
TIDY_EXPORT ctmbstr TIDY_CALL tidyReleaseDate(void);
/** Get version number for the current library */
TIDY_EXPORT ctmbstr tidyLibraryVersion(void);
/* Diagnostics and Repair
*/

View file

@ -34,6 +34,12 @@ ctmbstr TY_(ReleaseDate)(void)
return TY_(release_date);
}
ctmbstr tidyLibraryVersion(void)
{
return TY_(library_version);
}
static struct _msgfmt
{
uint code;

View file

@ -1,6 +1,6 @@
/* version information
(c) 2007-2009 (W3C) MIT, ERCIM, Keio University
(c) 2007-2015 (W3C) MIT, ERCIM, Keio University
See tidy.h for the copyright notice.
*/
@ -10,4 +10,10 @@ static const char TY_(release_date)[] = RELEASE_DATE;
#else
static const char TY_(release_date)[] = "2014/08/03";
#endif
#ifdef LIBTIDY_VERSION
static const char TY_(library_version)[] = LIBTIDY_VERSION;
#else
static const char TY_(library_version)[] = "5.0.0";
#endif
/* eof */