X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fldap_pvt_uc.h;h=5c19491191c9eb2725156e26369b6dfb4e719ecf;hb=e701812f27ac6338500f33c48ed2d707aec99aff;hp=c735271133bb6b054e7e4be02fdc503de8cd43c1;hpb=080acc3ecdfea673247724db152ae39732192c5c;p=openldap diff --git a/include/ldap_pvt_uc.h b/include/ldap_pvt_uc.h index c735271133..5c19491191 100644 --- a/include/ldap_pvt_uc.h +++ b/include/ldap_pvt_uc.h @@ -1,16 +1,18 @@ /* $OpenLDAP$ */ /* - * Copyright 1998-2000 The OpenLDAP Foundation, Redwood City, California, USA + * Copyright 1998-2001 The OpenLDAP Foundation, Redwood City, California, USA * All rights reserved. * - * Redistribution and use in source and binary forms are permitted only - * as authorized by the OpenLDAP Public License. A copy of this - * license is available at http://www.OpenLDAP.org/license.html or - * in file LICENSE in the top-level directory of the distribution. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted only as authorized by the OpenLDAP + * Public License. A copy of this license is available at + * http://www.OpenLDAP.org/license.html or in file LICENSE in the + * top-level directory of the distribution. */ /* * ldap_pvt_uc.h - Header for Unicode functions. * These are meant to be used by the OpenLDAP distribution only. + * These should be named ldap_pvt_....() */ #ifndef _LDAP_PVT_UC_H @@ -27,22 +29,14 @@ LDAP_BEGIN_DECL -/* +/* * UTF-8 (in utf-8.c) */ -typedef ber_int_t ldap_ucs4_t; -#define LDAP_UCS4_INVALID (0x80000000U) - typedef short ldap_ucs2_t; /* UCDATA uses UCS-2 passed in an unsigned long */ typedef unsigned long ldap_unicode_t; - -/* conversion routines */ -LDAP_F( ldap_ucs4_t ) ldap_utf8_to_ucs4( const char * p ); -LDAP_F( int ) ldap_ucs4_to_utf8( ldap_ucs4_t c, char *buf ); - #define ldap_utf8_to_unicode( p ) ldap_utf8_to_ucs4((p)) #define ldap_unicode_to_utf8( c, buf ) ldap_ucs4_to_ucs4((c),(buf)) @@ -130,8 +124,13 @@ LDAP_LUNICODE_F(void) ucstr2upper( #define UTF8_NOCASEFOLD 0 LDAP_LUNICODE_F(char *) UTF8normalize( + struct berval *, + char ); + +LDAP_LUNICODE_F(int) UTF8normcmp( + const char *, const char *, - char casefold ); + char ); LDAP_END_DECL