From 96cb99aa5471bcf6921f9b0a54478ecef2e47ce4 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 8 Dec 2003 18:08:29 +0000 Subject: [PATCH] s/unsigned long/ac_uint4/ --- include/ldap_pvt_uc.h | 1 + libraries/liblunicode/ucdata/ucdata.h | 47 +++++++++++++-------------- libraries/liblunicode/ucstr.c | 7 ++-- libraries/liblunicode/ure/urestubs.c | 3 ++ 4 files changed, 31 insertions(+), 27 deletions(-) diff --git a/include/ldap_pvt_uc.h b/include/ldap_pvt_uc.h index f9b2c0b8c5..bd8f090790 100644 --- a/include/ldap_pvt_uc.h +++ b/include/ldap_pvt_uc.h @@ -24,6 +24,7 @@ #include /* get ber_slen_t */ +#include #include "../libraries/liblunicode/ucdata/ucdata.h" LDAP_BEGIN_DECL diff --git a/libraries/liblunicode/ucdata/ucdata.h b/libraries/liblunicode/ucdata/ucdata.h index 7da01916ff..6e0db34684 100644 --- a/libraries/liblunicode/ucdata/ucdata.h +++ b/libraries/liblunicode/ucdata/ucdata.h @@ -120,8 +120,7 @@ LDAP_BEGIN_DECL * call this function with some set of masks. */ LDAP_LUNICODE_F (int) -ucisprop LDAP_P((unsigned long code, unsigned long mask1, - unsigned long mask2)); +ucisprop LDAP_P((ac_uint4 code, unsigned long mask1, ac_uint4 mask2)); #define ucisalpha(cc) ucisprop(cc, UC_LU|UC_LL|UC_LM|UC_LO|UC_LT, 0) #define ucisdigit(cc) ucisprop(cc, UC_ND, 0) @@ -210,9 +209,9 @@ ucisprop LDAP_P((unsigned long code, unsigned long mask1, * **************************************************************************/ -LDAP_LUNICODE_F (unsigned long) uctoupper LDAP_P((unsigned long code)); -LDAP_LUNICODE_F (unsigned long) uctolower LDAP_P((unsigned long code)); -LDAP_LUNICODE_F (unsigned long) uctotitle LDAP_P((unsigned long code)); +LDAP_LUNICODE_F (ac_uint4) uctoupper LDAP_P((unsigned long code)); +LDAP_LUNICODE_F (ac_uint4) uctolower LDAP_P((unsigned long code)); +LDAP_LUNICODE_F (ac_uint4) uctotitle LDAP_P((unsigned long code)); /************************************************************************** * @@ -225,20 +224,20 @@ LDAP_LUNICODE_F (unsigned long) uctotitle LDAP_P((unsigned long code)); * If it returns 0, there is no composition. Any other value indicates a * composition was returned in comp. */ -LDAP_LUNICODE_F (int) uccomp LDAP_P((unsigned long node1, unsigned long node2, - unsigned long *comp)); +LDAP_LUNICODE_F (int) uccomp LDAP_P((ac_uint4 node1, unsigned long node2, + ac_uint4 *comp)); /* * Does Hangul composition on the string str with length len, and returns * the length of the composed string. */ -LDAP_LUNICODE_F (int) uccomp_hangul LDAP_P((unsigned long *str, int len)); +LDAP_LUNICODE_F (int) uccomp_hangul LDAP_P((ac_uint4 *str, int len)); /* * Does canonical composition on the string str with length len, and returns * the length of the composed string. */ -LDAP_LUNICODE_F (int) uccanoncomp LDAP_P((unsigned long *str, int len)); +LDAP_LUNICODE_F (int) uccanoncomp LDAP_P((ac_uint4 *str, int len)); /************************************************************************** * @@ -252,24 +251,24 @@ LDAP_LUNICODE_F (int) uccanoncomp LDAP_P((unsigned long *str, int len)); * returned. */ LDAP_LUNICODE_F (int) -ucdecomp LDAP_P((unsigned long code, unsigned long *num, - unsigned long **decomp)); +ucdecomp LDAP_P((ac_uint4 code, unsigned long *num, + ac_uint4 **decomp)); /* * Equivalent to ucdecomp() except that it includes compatibility * decompositions. */ LDAP_LUNICODE_F (int) -uckdecomp LDAP_P((unsigned long code, unsigned long *num, - unsigned long **decomp)); +uckdecomp LDAP_P((ac_uint4 code, unsigned long *num, + ac_uint4 **decomp)); /* * If the code is a Hangul syllable, this routine decomposes it into the array * passed. The array size should be at least 3. */ LDAP_LUNICODE_F (int) -ucdecomp_hangul LDAP_P((unsigned long code, unsigned long *num, - unsigned long decomp[])); +ucdecomp_hangul LDAP_P((ac_uint4 code, unsigned long *num, + ac_uint4 decomp[])); /* * This routine does canonical decomposition of the string in of length @@ -278,16 +277,16 @@ ucdecomp_hangul LDAP_P((unsigned long code, unsigned long *num, * of the decomposed string if okay, and -1 on error. */ LDAP_LUNICODE_F (int) -uccanondecomp LDAP_P((const unsigned long *in, int inlen, - unsigned long **out, int *outlen, void *ctx)); +uccanondecomp LDAP_P((const ac_uint4 *in, int inlen, + ac_uint4 **out, int *outlen, void *ctx)); /* * Equivalent to uccanondecomp() except that it includes compatibility * decompositions. */ LDAP_LUNICODE_F (int) -uccompatdecomp LDAP_P((const unsigned long *in, int inlen, - unsigned long **out, int *outlen, void *ctx)); +uccompatdecomp LDAP_P((const ac_uint4 *in, int inlen, + ac_uint4 **out, int *outlen, void *ctx)); /************************************************************************** * @@ -299,7 +298,7 @@ uccompatdecomp LDAP_P((const unsigned long *in, int inlen, * This will return the combining class for a character to be used with the * Canonical Ordering algorithm. */ -LDAP_LUNICODE_F (unsigned long) uccombining_class LDAP_P((unsigned long code)); +LDAP_LUNICODE_F (ac_uint4) uccombining_class LDAP_P((unsigned long code)); /************************************************************************** * @@ -313,16 +312,16 @@ struct ucnumber { }; LDAP_LUNICODE_F (int) -ucnumber_lookup LDAP_P((unsigned long code, struct ucnumber *num)); +ucnumber_lookup LDAP_P((ac_uint4 code, struct ucnumber *num)); LDAP_LUNICODE_F (int) -ucdigit_lookup LDAP_P((unsigned long code, int *digit)); +ucdigit_lookup LDAP_P((ac_uint4 code, int *digit)); /* * For compatibility with John Cowan's "uctype" package. */ -LDAP_LUNICODE_F (struct ucnumber) ucgetnumber LDAP_P((unsigned long code)); -LDAP_LUNICODE_F (int) ucgetdigit LDAP_P((unsigned long code)); +LDAP_LUNICODE_F (struct ucnumber) ucgetnumber LDAP_P((ac_uint4 code)); +LDAP_LUNICODE_F (int) ucgetdigit LDAP_P((ac_uint4 code)); /************************************************************************** * diff --git a/libraries/liblunicode/ucstr.c b/libraries/liblunicode/ucstr.c index 1ade9170e9..573d9d6299 100644 --- a/libraries/liblunicode/ucstr.c +++ b/libraries/liblunicode/ucstr.c @@ -15,6 +15,7 @@ #include "portable.h" +#include #include #include #include @@ -109,7 +110,7 @@ struct berval * UTF8bvnormalize( { int i, j, len, clen, outpos, ucsoutlen, outsize, last; char *out, *outtmp, *s; - unsigned long *ucs, *p, *ucsout; + ac_uint4 *ucs, *p, *ucsout; static unsigned char mask[] = { 0, 0x7f, 0x1f, 0x0f, 0x07, 0x03, 0x01 }; @@ -302,7 +303,7 @@ int UTF8bvnormcmp( { int i, l1, l2, len, ulen, res = 0; char *s1, *s2, *done; - unsigned long *ucs, *ucsout1, *ucsout2; + ac_uint4 *ucs, *ucsout1, *ucsout2; unsigned casefold = flags & LDAP_UTF8_CASEFOLD; unsigned norm1 = flags & LDAP_UTF8_ARG1NFC; @@ -382,7 +383,7 @@ int UTF8bvnormcmp( /* * XXYYZ: we convert to ucs4 even though -llunicode - * expects ucs2 in an unsigned long + * expects ucs2 in an ac_uint4 */ /* convert and normalize 1st string */ diff --git a/libraries/liblunicode/ure/urestubs.c b/libraries/liblunicode/ure/urestubs.c index fc58c17bdd..9c58adef03 100644 --- a/libraries/liblunicode/ure/urestubs.c +++ b/libraries/liblunicode/ure/urestubs.c @@ -36,6 +36,9 @@ */ /* $Id: urestubs.c,v 1.2 1999/09/21 15:47:44 mleisher Exp $" */ +#include "portable.h" +#include + #include "ure.h" #ifdef _MSC_VER -- 2.39.5