Back to index

openldap  2.4.31
utbm.h
Go to the documentation of this file.
00001 /* $OpenLDAP$ */
00002 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
00003  *
00004  * Copyright 1998-2012 The OpenLDAP Foundation.
00005  * All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted only as authorized by the OpenLDAP
00009  * Public License.
00010  *
00011  * A copy of this license is available in file LICENSE in the
00012  * top-level directory of the distribution or, alternatively, at
00013  * <http://www.OpenLDAP.org/license.html>.
00014  */
00015 /* Copyright 1997, 1998, 1999 Computing Research Labs,
00016  * New Mexico State University
00017  *
00018  * Permission is hereby granted, free of charge, to any person obtaining a
00019  * copy of this software and associated documentation files (the "Software"),
00020  * to deal in the Software without restriction, including without limitation
00021  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00022  * and/or sell copies of the Software, and to permit persons to whom the
00023  * Software is furnished to do so, subject to the following conditions:
00024  *
00025  * The above copyright notice and this permission notice shall be included in
00026  * all copies or substantial portions of the Software.
00027  *
00028  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00029  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00030  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00031  * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY
00032  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
00033  * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
00034  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00035  */
00036 /* $Id: utbm.h,v 1.1 1999/09/21 15:45:18 mleisher Exp $ */
00037 
00038 #ifndef _h_utbm
00039 #define _h_utbm
00040 
00041 #include "portable.h"
00042 
00043 LDAP_BEGIN_DECL
00044 
00045 /*************************************************************************
00046  *
00047  * Types.
00048  *
00049  *************************************************************************/
00050 
00051 /*
00052  * Fundamental character types.
00053  */
00054 typedef unsigned long ucs4_t;
00055 typedef unsigned short ucs2_t;
00056 
00057 /*
00058  * An opaque type used for the search pattern.
00059  */
00060 typedef struct _utbm_pattern_t *utbm_pattern_t;
00061 
00062 /*************************************************************************
00063  *
00064  * Flags.
00065  *
00066  *************************************************************************/
00067 
00068 #define UTBM_CASEFOLD          0x01
00069 #define UTBM_IGNORE_NONSPACING 0x02
00070 #define UTBM_SPACE_COMPRESS    0x04
00071 
00072 /*************************************************************************
00073  *
00074  * API.
00075  *
00076  *************************************************************************/
00077 
00078 LDAP_LUNICODE_F (utbm_pattern_t) utbm_create_pattern LDAP_P((void));
00079 
00080 LDAP_LUNICODE_F (void) utbm_free_pattern LDAP_P((utbm_pattern_t pattern));
00081 
00082 LDAP_LUNICODE_F (void)
00083 utbm_compile LDAP_P((ucs2_t *pat, unsigned long patlen,
00084                    unsigned long flags, utbm_pattern_t pattern));
00085 
00086 LDAP_LUNICODE_F (int)
00087 utbm_exec LDAP_P((utbm_pattern_t pat, ucs2_t *text,
00088                 unsigned long textlen, unsigned long *match_start,
00089                 unsigned long *match_end));
00090 
00091 /*************************************************************************
00092  *
00093  * Prototypes for the stub functions needed.
00094  *
00095  *************************************************************************/
00096 
00097 LDAP_LUNICODE_F (int) _utbm_isspace LDAP_P((ucs4_t c, int compress));
00098 
00099 LDAP_LUNICODE_F (int) _utbm_iscntrl LDAP_P((ucs4_t c));
00100 
00101 LDAP_LUNICODE_F (int) _utbm_nonspacing LDAP_P((ucs4_t c));
00102 
00103 LDAP_LUNICODE_F (ucs4_t) _utbm_tolower LDAP_P((ucs4_t c));
00104 
00105 LDAP_LUNICODE_F (ucs4_t) _utbm_toupper LDAP_P((ucs4_t c));
00106 
00107 LDAP_LUNICODE_F (ucs4_t) _utbm_totitle LDAP_P((ucs4_t c));
00108 
00109 LDAP_END_DECL
00110 
00111 #endif
00112 
00113 
00114 #endif /* _h_utbm */