]> git.sur5r.net Git - openldap/blob - libraries/liblunicode/utbm/utbm.h
Set SHTOOL directly. Add 'make pathtest'.
[openldap] / libraries / liblunicode / utbm / utbm.h
1 /*
2  * Copyright 1997, 1998, 1999 Computing Research Labs,
3  * New Mexico State University
4  *
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:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies or substantial portions of the Software.
14  *
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.
22  */
23 #ifndef _h_utbm
24 #define _h_utbm
25
26 /*
27  * $Id: utbm.h,v 1.1 1999/09/21 15:45:18 mleisher Exp $
28  */
29
30 #include "portable.h"
31
32 LDAP_BEGIN_DECL
33
34 /*************************************************************************
35  *
36  * Types.
37  *
38  *************************************************************************/
39
40 /*
41  * Fundamental character types.
42  */
43 typedef unsigned long ucs4_t;
44 typedef unsigned short ucs2_t;
45
46 /*
47  * An opaque type used for the search pattern.
48  */
49 typedef struct _utbm_pattern_t *utbm_pattern_t;
50
51 /*************************************************************************
52  *
53  * Flags.
54  *
55  *************************************************************************/
56
57 #define UTBM_CASEFOLD          0x01
58 #define UTBM_IGNORE_NONSPACING 0x02
59 #define UTBM_SPACE_COMPRESS    0x04
60
61 /*************************************************************************
62  *
63  * API.
64  *
65  *************************************************************************/
66
67 LDAP_LUNICODE_F (utbm_pattern_t) utbm_create_pattern LDAP_P((void));
68
69 LDAP_LUNICODE_F (void) utbm_free_pattern LDAP_P((utbm_pattern_t pattern));
70
71 LDAP_LUNICODE_F (void)
72 utbm_compile LDAP_P((ucs2_t *pat, unsigned long patlen,
73                      unsigned long flags, utbm_pattern_t pattern));
74
75 LDAP_LUNICODE_F (int)
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));
79
80 /*************************************************************************
81  *
82  * Prototypes for the stub functions needed.
83  *
84  *************************************************************************/
85
86 LDAP_LUNICODE_F (int) _utbm_isspace LDAP_P((ucs4_t c, int compress));
87
88 LDAP_LUNICODE_F (int) _utbm_iscntrl LDAP_P((ucs4_t c));
89
90 LDAP_LUNICODE_F (int) _utbm_nonspacing LDAP_P((ucs4_t c));
91
92 LDAP_LUNICODE_F (ucs4_t) _utbm_tolower LDAP_P((ucs4_t c));
93
94 LDAP_LUNICODE_F (ucs4_t) _utbm_toupper LDAP_P((ucs4_t c));
95
96 LDAP_LUNICODE_F (ucs4_t) _utbm_totitle LDAP_P((ucs4_t c));
97
98 LDAP_END_DECL
99
100 #endif
101
102
103 #endif /* _h_utbm */