From 86fda06897ccd4d610410f920923c6e1f3e2bf3d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 29 Dec 2014 22:15:09 -0800 Subject: Added cmark_ctype.h with locale-independent isspace, ispunct, etc. Otherwise cmark's behavior varies unpredictably with the locale. `is_punctuation` in utf8.h has also been adjusted so that everything that counts all ASCII symbol characters count as punctuation, even though some are not in P* character classes. --- src/cmark_ctype.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/cmark_ctype.h (limited to 'src/cmark_ctype.h') diff --git a/src/cmark_ctype.h b/src/cmark_ctype.h new file mode 100644 index 0000000..afc605e --- /dev/null +++ b/src/cmark_ctype.h @@ -0,0 +1,11 @@ +/** Locale-independent versions of functions from ctype.h. + * We want cmark to behave the same no matter what the system locale. + */ + +int isspace(char c); + +int ispunct(char c); + +int isalnum(char c); + +int isdigit(char c); -- cgit v1.2.3