2 * Copyright 1997, 1998, 1999 Computing Research Labs,
3 * New Mexico State University
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY
19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
20 * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
21 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 * $Id: utbm.h,v 1.1 1999/09/21 15:45:18 mleisher Exp $
34 /*************************************************************************
38 *************************************************************************/
41 * Fundamental character types.
43 typedef unsigned long ucs4_t;
44 typedef unsigned short ucs2_t;
47 * An opaque type used for the search pattern.
49 typedef struct _utbm_pattern_t *utbm_pattern_t;
51 /*************************************************************************
55 *************************************************************************/
57 #define UTBM_CASEFOLD 0x01
58 #define UTBM_IGNORE_NONSPACING 0x02
59 #define UTBM_SPACE_COMPRESS 0x04
61 /*************************************************************************
65 *************************************************************************/
67 LDAP_LUNICODE_F (utbm_pattern_t) utbm_create_pattern LDAP_P((void));
69 LDAP_LUNICODE_F (void) utbm_free_pattern LDAP_P((utbm_pattern_t pattern));
71 LDAP_LUNICODE_F (void)
72 utbm_compile LDAP_P((ucs2_t *pat, unsigned long patlen,
73 unsigned long flags, utbm_pattern_t pattern));
76 utbm_exec LDAP_P((utbm_pattern_t pat, ucs2_t *text,
77 unsigned long textlen, unsigned long *match_start,
78 unsigned long *match_end));
80 /*************************************************************************
82 * Prototypes for the stub functions needed.
84 *************************************************************************/
86 LDAP_LUNICODE_F (int) _utbm_isspace LDAP_P((ucs4_t c, int compress));
88 LDAP_LUNICODE_F (int) _utbm_iscntrl LDAP_P((ucs4_t c));
90 LDAP_LUNICODE_F (int) _utbm_nonspacing LDAP_P((ucs4_t c));
92 LDAP_LUNICODE_F (ucs4_t) _utbm_tolower LDAP_P((ucs4_t c));
94 LDAP_LUNICODE_F (ucs4_t) _utbm_toupper LDAP_P((ucs4_t c));
96 LDAP_LUNICODE_F (ucs4_t) _utbm_totitle LDAP_P((ucs4_t c));