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 */