summaryrefslogtreecommitdiffstats
path: root/common/util.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2003-09-23 19:48:33 +0200
committerWerner Koch <wk@gnupg.org>2003-09-23 19:48:33 +0200
commit4c66e94ff91d680eaf1d9c48a62d66d1951f90ef (patch)
tree66ede04edbfe1c45eece46e852093282832f8312 /common/util.h
parent2003-09-22 Timo Schulz <twoaday@freakmail.de> (diff)
downloadgnupg2-4c66e94ff91d680eaf1d9c48a62d66d1951f90ef.tar.xz
gnupg2-4c66e94ff91d680eaf1d9c48a62d66d1951f90ef.zip
Merged most of David Shaw's changes in 1.3 since 2003-06-03.
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/util.h b/common/util.h
index 045851481..78aa2f890 100644
--- a/common/util.h
+++ b/common/util.h
@@ -107,6 +107,10 @@ int asprintf (char **result, const char *format, ...);
#define hexdigitp(a) (digitp (a) \
|| (*(a) >= 'A' && *(a) <= 'F') \
|| (*(a) >= 'a' && *(a) <= 'f'))
+ /* Note this isn't identical to a C locale isspace() without \f and
+ \v, but works for the purposes used here. */
+#define ascii_isspace(a) ((a)==' ' || (a)=='\n' || (a)=='\r' || (a)=='\t')
+
/* the atoi macros assume that the buffer has only valid digits */
#define atoi_1(p) (*(p) - '0' )
#define atoi_2(p) ((atoi_1(p) * 10) + atoi_1((p)+1))