From 2340e63f8b412f1c03272a3c5575e4f4110c6d05 Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Thu, 19 Oct 2017 17:11:29 -0400 Subject: [PATCH] Expose the platform name to the public API. --- include/tidy.h | 5 +++++ src/tidylib.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/include/tidy.h b/include/tidy.h index 365c70d..7d734ea 100644 --- a/include/tidy.h +++ b/include/tidy.h @@ -395,6 +395,11 @@ TIDY_EXPORT ctmbstr TIDY_CALL tidyReleaseDate(void); */ TIDY_EXPORT ctmbstr TIDY_CALL tidyLibraryVersion(void); +/** Get the platform for which Tidy was built. + ** @result The string representing the version number. + */ +TIDY_EXPORT ctmbstr TIDY_CALL tidyPlatform(void); + /** @} ** @name Diagnostics and Repair diff --git a/src/tidylib.c b/src/tidylib.c index dae71c8..3bf22e2 100644 --- a/src/tidylib.c +++ b/src/tidylib.c @@ -176,6 +176,15 @@ ctmbstr TIDY_CALL tidyLibraryVersion(void) return TY_(tidyLibraryVersion)(); } +ctmbstr TIDY_CALL tidyPlatform(void) +{ +#ifdef PLATFORM_NAME + return PLATFORM_NAME; +#else + return NULL; +#endif +} + /* Get/set configuration options */