From d833860a56be3882590683516076ed3fde729d7b Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 22 Nov 2006 20:14:10 +0000 Subject: [PATCH] switching to some UTF8 code from perl git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@798 9efc2488-bf62-4759-914b-345cdb29e865 --- src/utils/utils.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/utils.h b/src/utils/utils.h index 1e00168..97224ba 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -31,14 +31,14 @@ GNU General Public License for more details. #include "md5.h" -#define OSRF_UTF8_IS_ASCII(c) ((c) < 0x80) -#define OSRF_UTF8_IS_START(c) ((c) >= 0xc0 && ((c) <= 0xfd)) -#define OSRF_UTF8_IS_CONTINUATION(c) ((c) >= 0x80 && ((c) <= 0xbf)) -#define OSRF_UTF8_IS_CONTINUED(c) ((c) & 0x80) +#define OSRF_UTF8_IS_ASCII(_c) ((_c) < 0x80) +#define OSRF_UTF8_IS_START(_c) ((_c) >= 0xc0 && ((_c) <= 0xfd)) +#define OSRF_UTF8_IS_CONTINUATION(_c) ((_c) >= 0x80 && ((_c) <= 0xbf)) +#define OSRF_UTF8_IS_CONTINUED(_c) ((_c) & 0x80) #define OSRF_UTF8_CONTINUATION_MASK (0x3f) #define OSRF_UTF8_ACCUMULATION_SHIFT 6 -#define OSRF_UTF8_ACCUMULATE(_o, _n) (((_o) << UTF8_ACCUMULATION_SHIFT) | ((_n) & UTF8_CONTINUATION_MASK)) +#define OSRF_UTF8_ACCUMULATE(_o, _n) (((_o) << OSRF_UTF8_ACCUMULATION_SHIFT) | ((_n) & OSRF_UTF8_CONTINUATION_MASK)) #define OSRF_MALLOC(ptr, size) \ ptr = (void*) malloc( size ); \ -- 2.11.0