Deprecated tidyReleaseDate(). Returns epoch time (tdb). Removed dates from help, manpage, output, cmake, etc.
This commit is contained in:
parent
72c23bed53
commit
de97628f8f
|
@ -9,22 +9,12 @@ file(READ version.txt versionFile)
|
|||
if (NOT versionFile)
|
||||
message(FATAL_ERROR "Unable to determine libtidy version. version.txt file is missing.")
|
||||
endif()
|
||||
string(STRIP "${versionFile}" versionFile)
|
||||
string(REGEX REPLACE "(.*)[\r\n|\n](.*)" "\\1" LIBTIDY_VERSION ${versionFile})
|
||||
string(REGEX REPLACE "(.*)[\r\n|\n](.*)" "\\2" LIBTIDY_DATE ${versionFile})
|
||||
|
||||
# establish version number
|
||||
string(STRIP "${versionFile}" LIBTIDY_VERSION)
|
||||
string(REPLACE "." ";" VERSION_LIST ${LIBTIDY_VERSION})
|
||||
list(GET VERSION_LIST 0 TIDY_MAJOR_VERSION)
|
||||
list(GET VERSION_LIST 1 TIDY_MINOR_VERSION)
|
||||
list(GET VERSION_LIST 2 TIDY_POINT_VERSION)
|
||||
|
||||
# establish version date
|
||||
string(REPLACE "." ";" VERSION_LIST ${LIBTIDY_DATE})
|
||||
list(GET VERSION_LIST 0 tidy_YEAR)
|
||||
list(GET VERSION_LIST 1 tidy_MONTH)
|
||||
list(GET VERSION_LIST 2 tidy_DAY)
|
||||
|
||||
# Allow developer to select is Dynamic or static library built
|
||||
set( LIB_TYPE STATIC ) # set default static
|
||||
option( BUILD_SHARED_LIB "Set ON to build Shared (DLL) Library" OFF )
|
||||
|
@ -77,7 +67,6 @@ add_definitions ( -DHAVE_CONFIG_H )
|
|||
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}" )
|
||||
add_definitions ( -DLIBTIDY_VERSION="${LIBTIDY_VERSION}" )
|
||||
|
||||
if(BUILD_SHARED_LIB)
|
||||
|
|
|
@ -412,7 +412,7 @@ static void print_xml_help_option( void )
|
|||
static void xml_help( void )
|
||||
{
|
||||
printf( "<?xml version=\"1.0\"?>\n"
|
||||
"<cmdline version=\"%s\">\n", tidyReleaseDate());
|
||||
"<cmdline version=\"%s\">\n", tidyLibraryVersion());
|
||||
print_xml_help_option();
|
||||
printf( "</cmdline>\n" );
|
||||
}
|
||||
|
@ -434,11 +434,10 @@ static void help( ctmbstr prog )
|
|||
{
|
||||
printf( "\n");
|
||||
printf( "%s [options...] [file...] [options...] [file...]\n", get_final_name(prog) );
|
||||
printf( "Utility to clean up and pretty print HTML/XHTML/XML\n");
|
||||
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. Date %s. Version %s\n",
|
||||
tidyReleaseDate(), tidyLibraryVersion() );
|
||||
printf( "This is modern HTML Tidy version %s.\n", tidyLibraryVersion() );
|
||||
printf( "\n");
|
||||
|
||||
#ifdef PLATFORM_NAME
|
||||
|
@ -459,8 +458,8 @@ static void help( ctmbstr prog )
|
|||
printf( "Single letter options apart from -f may be combined\n");
|
||||
printf( "as in: tidy -f errs.txt -imu foo.html\n");
|
||||
printf( "\n");
|
||||
printf( "For more information on this HTML5-aware experimental fork of Tidy,\n" );
|
||||
printf( "see http://w3c.github.com/tidy-html5/\n" );
|
||||
printf( "For more information about HTML Tidy, see\n" );
|
||||
printf( " http://www.html-tidy.org/\n" );
|
||||
printf( "\n");
|
||||
printf( "For more information on HTML, see the following:\n" );
|
||||
printf( "\n");
|
||||
|
@ -470,13 +469,13 @@ static void help( ctmbstr prog )
|
|||
printf( " HTML: The Markup Language (an HTML language reference)\n" );
|
||||
printf( " http://dev.w3.org/html5/markup/\n" );
|
||||
printf( "\n");
|
||||
printf( "File bug reports at https://github.com/w3c/tidy-html5/issues/\n" );
|
||||
printf( "or send questions and comments to html-tidy@w3.org\n" );
|
||||
printf( "File bug reports at https://github.com/htacg/tidy-html5/issues/\n" );
|
||||
printf( "or send questions and comments to public-htacg@w3.org.\n" );
|
||||
printf( "\n");
|
||||
printf( "Validate your HTML documents using the W3C Nu Markup Validator:\n" );
|
||||
printf( "\n");
|
||||
printf( " http://validator.w3.org/nu/" );
|
||||
printf( "\n");
|
||||
printf( "\n\n");
|
||||
}
|
||||
|
||||
static Bool isAutoBool( TidyOption topt )
|
||||
|
@ -782,7 +781,7 @@ void printXMLOption( TidyDoc tdoc, TidyOption topt, OptionDesc *d )
|
|||
static void XMLoptionhelp( TidyDoc tdoc )
|
||||
{
|
||||
printf( "<?xml version=\"1.0\"?>\n"
|
||||
"<config date=\"%s\" version=\"%s\">\n", tidyReleaseDate(), tidyLibraryVersion());
|
||||
"<config version=\"%s\">\n", tidyLibraryVersion());
|
||||
ForEachOption( tdoc, printXMLOption );
|
||||
printf( "</config>\n" );
|
||||
}
|
||||
|
@ -943,10 +942,10 @@ static void optionvalues( TidyDoc tdoc )
|
|||
static void version( void )
|
||||
{
|
||||
#ifdef PLATFORM_NAME
|
||||
printf( "HTML Tidy for HTML5 (experimental) for %s %s, version %s\n",
|
||||
PLATFORM_NAME, tidyReleaseDate(), tidyLibraryVersion() );
|
||||
printf( "HTML Tidy for %s version %s\n",
|
||||
PLATFORM_NAME, tidyLibraryVersion() );
|
||||
#else
|
||||
printf( "HTML Tidy for HTML5 (experimental) %s\n", tidyReleaseDate() );
|
||||
printf( "HTML Tidy version %s\n", tidyLibraryVersion() );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
|
||||
<xsl:template name="header-section">
|
||||
<xsl:text/>.\" tidy man page for the HTML5 fork of Tidy
|
||||
<xsl:text/>.\" tidy man page for the HTML Tidy
|
||||
.TH TIDY 1 "<xsl:value-of select="cmdline/@version" />" "HTML Tidy" "<xsl:value-of select="cmdline/@version" />"
|
||||
</xsl:template>
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
|||
.SH SYNOPSIS
|
||||
\fBtidy\fR [option ...] [file ...] [option ...] [file ...]
|
||||
.SH DESCRIPTION
|
||||
Tidy reads HTML(5), XHTML(5) and XML files and writes cleaned-up markup. For HTML variants, it detects, reports, and corrects many common coding errors and strives to produce visually equivalent markup that is both conformant to the HTML specifications and that works in most browsers.
|
||||
Tidy reads HTML, XHTML, and XML files and writes cleaned-up markup. For HTML variants, it detects, reports, and corrects many common coding errors and strives to produce visually equivalent markup that is both conformant to the HTML specifications and that works in most browsers.
|
||||
.LP
|
||||
A common use of Tidy is to convert plain HTML to XHTML. For generic XML files, Tidy is limited to correcting basic well-formedness errors and pretty printing.
|
||||
.LP
|
||||
|
@ -348,10 +348,10 @@ appearing in content with another backslash.
|
|||
<!-- Appears at the bottom of the man page: -->
|
||||
<xsl:template name="manpage-see-also-section">
|
||||
.SH SEE ALSO
|
||||
For more information about the experimental HTML5 fork of Tidy:
|
||||
For more information about HTML Tidy:
|
||||
.RS 4
|
||||
.LP
|
||||
http://w3c.github.com/tidy-html5/
|
||||
http://www.html-tidy.org/
|
||||
.RE
|
||||
.LP
|
||||
For more information on HTML:
|
||||
|
@ -369,10 +369,10 @@ http://dev.w3.org/html5/markup/
|
|||
For bug reports and comments:
|
||||
.RS 4
|
||||
.LP
|
||||
https://github.com/w3c/tidy-html5/issues/
|
||||
https://github.com/htacg/tidy-html5/issues/
|
||||
.RE
|
||||
.LP
|
||||
Or send questions and comments to \fBhtml-tidy@w3.org\fR
|
||||
Or send questions and comments to \fBpublic-htacg@w3.org\fR.
|
||||
.LP
|
||||
Validate your HTML documents using the \fBW3C Nu Markup Validator\fR:
|
||||
.RS 4
|
||||
|
@ -380,9 +380,10 @@ Validate your HTML documents using the \fBW3C Nu Markup Validator\fR:
|
|||
http://validator.w3.org/nu/
|
||||
.RE
|
||||
.SH AUTHOR
|
||||
\fBTidy\fR was written by \fBDave Raggett\fR <dsr@w3.org>, and subsequently maintained by a team at http://tidy.sourceforge.net/
|
||||
\fBTidy\fR was written by \fBDave Raggett\fR <dsr@w3.org>, and subsequently maintained by a team at http://tidy.sourceforge.net/,
|
||||
and now maintained by \fBHTACG\fR (http://www.htacg.org).
|
||||
.LP
|
||||
The sources for the HTML5 fork of \fBTidy\fR are available at https://github.com/w3c/tidy-html5/ under the MIT Licence.
|
||||
The sources for \fBHTML Tidy\fR are available at https://github.com/htacg/tidy-html5/ under the MIT Licence.
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
|
|
@ -324,7 +324,11 @@ TIDY_EXPORT void TIDY_CALL tidySetAppData( TidyDoc tdoc, void* appData );
|
|||
/** Get application data set previously */
|
||||
TIDY_EXPORT void* TIDY_CALL tidyGetAppData( TidyDoc tdoc );
|
||||
|
||||
/** Get release date (version) for current library */
|
||||
/** Get release date (version) for current library
|
||||
** @deprecated tidyReleaseDate() is deprecated in favor of semantic
|
||||
** versioning and should be replaced with tidyLibraryVersion().
|
||||
*/
|
||||
|
||||
TIDY_EXPORT ctmbstr TIDY_CALL tidyReleaseDate(void);
|
||||
|
||||
/** Get version number for the current library */
|
||||
|
|
|
@ -1868,12 +1868,11 @@ void TY_(NeedsAuthorIntervention)( TidyDocImpl* doc )
|
|||
void TY_(GeneralInfo)( TidyDocImpl* doc )
|
||||
{
|
||||
if (!cfgBool(doc, TidyShowInfo)) return;
|
||||
tidy_out(doc, "About this fork of Tidy: https://github.com/htacg/tidy-html5/tree/develop-500\n");
|
||||
tidy_out(doc, "About HTML Tidy: https://github.com/htacg/tidy-html5/tree/develop-500\n");
|
||||
tidy_out(doc, "Bug reports and comments: https://github.com/htacg/tidy-html5/issues\n");
|
||||
tidy_out(doc, "Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/\n");
|
||||
tidy_out(doc, "HTML5 language tutorial: http://www.w3schools.com/html/html5_intro.asp\n");
|
||||
tidy_out(doc, "Latest HTML specification: http://dev.w3.org/html5/spec-author-view/\n");
|
||||
tidy_out(doc, "Validate your HTML5 documents: http://validator.w3.org/nu/\n");
|
||||
tidy_out(doc, "Validate your HTML documents: http://validator.w3.org/nu/\n");
|
||||
tidy_out(doc, "Lobby your company to join the W3C: http://www.w3.org/Consortium\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#ifdef RELEASE_DATE
|
||||
static const char TY_(release_date)[] = RELEASE_DATE;
|
||||
#else
|
||||
static const char TY_(release_date)[] = "2014/08/03";
|
||||
static const char TY_(release_date)[] = "1970/01/01";
|
||||
#endif
|
||||
#ifdef LIBTIDY_VERSION
|
||||
static const char TY_(library_version)[] = LIBTIDY_VERSION;
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
4.9.3
|
||||
2015.01.31
|
||||
4.9.3
|
Loading…
Reference in a new issue