No empty .Rs/.Re
[netbsd-mini2440.git] / external / bsd / openldap / dist / libraries / liblunicode / utbm / utbm.h
blobdf8f9a8c84d7d3b5e69c69889fabc721f1ce89d2
1 /* $OpenLDAP: pkg/ldap/libraries/liblunicode/utbm/utbm.h,v 1.8.2.3 2008/02/11 23:26:42 kurt Exp $ */
2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 * Copyright 1998-2008 The OpenLDAP Foundation.
5 * All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted only as authorized by the OpenLDAP
9 * Public License.
11 * A copy of this license is available in file LICENSE in the
12 * top-level directory of the distribution or, alternatively, at
13 * <http://www.OpenLDAP.org/license.html>.
15 /* Copyright 1997, 1998, 1999 Computing Research Labs,
16 * New Mexico State University
18 * Permission is hereby granted, free of charge, to any person obtaining a
19 * copy of this software and associated documentation files (the "Software"),
20 * to deal in the Software without restriction, including without limitation
21 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
22 * and/or sell copies of the Software, and to permit persons to whom the
23 * Software is furnished to do so, subject to the following conditions:
25 * The above copyright notice and this permission notice shall be included in
26 * all copies or substantial portions of the Software.
28 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31 * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY
32 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
33 * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
34 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36 /* $Id: utbm.h,v 1.1.1.1 2008/02/11 23:26:42 lukem Exp $ */
38 #ifndef _h_utbm
39 #define _h_utbm
41 #include "portable.h"
43 LDAP_BEGIN_DECL
45 /*************************************************************************
47 * Types.
49 *************************************************************************/
52 * Fundamental character types.
54 typedef unsigned long ucs4_t;
55 typedef unsigned short ucs2_t;
58 * An opaque type used for the search pattern.
60 typedef struct _utbm_pattern_t *utbm_pattern_t;
62 /*************************************************************************
64 * Flags.
66 *************************************************************************/
68 #define UTBM_CASEFOLD 0x01
69 #define UTBM_IGNORE_NONSPACING 0x02
70 #define UTBM_SPACE_COMPRESS 0x04
72 /*************************************************************************
74 * API.
76 *************************************************************************/
78 LDAP_LUNICODE_F (utbm_pattern_t) utbm_create_pattern LDAP_P((void));
80 LDAP_LUNICODE_F (void) utbm_free_pattern LDAP_P((utbm_pattern_t pattern));
82 LDAP_LUNICODE_F (void)
83 utbm_compile LDAP_P((ucs2_t *pat, unsigned long patlen,
84 unsigned long flags, utbm_pattern_t pattern));
86 LDAP_LUNICODE_F (int)
87 utbm_exec LDAP_P((utbm_pattern_t pat, ucs2_t *text,
88 unsigned long textlen, unsigned long *match_start,
89 unsigned long *match_end));
91 /*************************************************************************
93 * Prototypes for the stub functions needed.
95 *************************************************************************/
97 LDAP_LUNICODE_F (int) _utbm_isspace LDAP_P((ucs4_t c, int compress));
99 LDAP_LUNICODE_F (int) _utbm_iscntrl LDAP_P((ucs4_t c));
101 LDAP_LUNICODE_F (int) _utbm_nonspacing LDAP_P((ucs4_t c));
103 LDAP_LUNICODE_F (ucs4_t) _utbm_tolower LDAP_P((ucs4_t c));
105 LDAP_LUNICODE_F (ucs4_t) _utbm_toupper LDAP_P((ucs4_t c));
107 LDAP_LUNICODE_F (ucs4_t) _utbm_totitle LDAP_P((ucs4_t c));
109 LDAP_END_DECL
111 #endif
114 #endif /* _h_utbm */