From 7606e3b33a57016b39b02857a7094e378a245ec3 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 14 Dec 2001 13:43:42 +0000 Subject: * util.h (digitp, hexdigitp): New ctype like macros. (atoi_1,atoi_2,atoi_4,xtoi_1,xtoi_2): New. * command.c: Removed the conversion macros as they are now in ../common/util.h. --- common/util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/util.h') diff --git a/common/util.h b/common/util.h index e30923330..35529253a 100644 --- a/common/util.h +++ b/common/util.h @@ -58,8 +58,8 @@ int map_assuan_err (int err); /* some macros to replace ctype ones and avoid locale problems */ #define digitp(p) (*(p) >= '0' && *(p) <= '9') #define hexdigitp(a) (digitp (a) \ - || ((a) >= 'A' && (a) <= 'F') \ - || ((a) >= 'a' && (a) <= 'f')) + || (*(a) >= 'A' && *(a) <= 'F') \ + || (*(a) >= 'a' && *(a) <= 'f')) /* 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)) -- cgit v1.2.3