From: Marko Kreen Date: Sat, 5 Jan 2013 21:50:40 +0000 (+0200) Subject: ctype: provide isblank() if missing X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=584cc86799a2fc6ce190c603a88638003743f53e;p=libusual.git ctype: provide isblank() if missing --- diff --git a/usual/ctype.h b/usual/ctype.h index 6032199..0a0f2be 100644 --- a/usual/ctype.h +++ b/usual/ctype.h @@ -38,6 +38,11 @@ #include +#ifndef isblank +#define isblank usual_isblank +static inline int isblank(int c) { return (c == ' ') || (c == '\t'); } +#endif + #ifndef HAVE_CTYPE_ON_CHAR #define _WRAP_CTYPE_FN(name) \ diff --git a/usual/regex.c b/usual/regex.c index 75b511c..28fbca7 100644 --- a/usual/regex.c +++ b/usual/regex.c @@ -62,11 +62,6 @@ #define is_word(c) (isalnum(c) || (c) == '_') -#ifndef isblank -#define isblank usual_isblank -static int isblank(int c) { return ((c) == ' ' || (c) == '\t'); } -#endif - struct Op; struct ExecCtx; struct GMatch;