diff options
Diffstat (limited to 'src/cmark.h')
-rw-r--r-- | src/cmark.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/src/cmark.h b/src/cmark.h index 8177fa8..9f312bc 100644 --- a/src/cmark.h +++ b/src/cmark.h @@ -2,7 +2,8 @@ #define CMARK_H #include <stdio.h> -#include "cmark_export.h" +#include <cmark_export.h> +#include <cmark_version.h> #ifdef __cplusplus extern "C" { @@ -18,10 +19,6 @@ extern "C" { * ## Simple Interface */ -/** Current version of library. - */ -#define CMARK_VERSION "0.1" - /** Convert 'text' (assumed to be a UTF-8 encoded string with length * 'len' from CommonMark Markdown to HTML, returning a null-terminated, * UTF-8-encoded string. @@ -499,6 +496,28 @@ char *cmark_render_man(cmark_node *root, long options); */ #define CMARK_OPT_NORMALIZE 4 +/** + * ## Version information + */ + +/** The library version as integer for runtime checks. Also available as + * macro CMARK_VERSION for compile time checks. + * + * * Bits 16-23 contain the major version. + * * Bits 8-15 contain the minor version. + * * Bits 0-7 contain the patchlevel. + * + * In hexadecimal format, the number 0x010203 represents version 1.2.3. + */ +CMARK_EXPORT +extern const int cmark_version; + +/** The library version string for runtime checks. Also available as + * macro CMARK_VERSION_STRING for compile time checks. + */ +CMARK_EXPORT +extern const char cmark_version_string[]; + /** # AUTHORS * * John MacFarlane, Vicent Marti, Kārlis Gaņģis, Nick Wellnhofer. |