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 $
37 /*************************************************************************
41 *************************************************************************/
44 * Fundamental character types.
46 typedef unsigned long ucs4_t;
47 typedef unsigned short ucs2_t;
50 * An opaque type used for the search pattern.
52 typedef struct _utbm_pattern_t *utbm_pattern_t;
54 /*************************************************************************
58 *************************************************************************/
60 #define UTBM_CASEFOLD 0x01
61 #define UTBM_IGNORE_NONSPACING 0x02
62 #define UTBM_SPACE_COMPRESS 0x04
64 /*************************************************************************
68 *************************************************************************/
70 extern utbm_pattern_t utbm_create_pattern __((void));
72 extern void utbm_free_pattern __((utbm_pattern_t pattern));
74 extern void utbm_compile __((ucs2_t *pat, unsigned long patlen,
75 unsigned long flags, utbm_pattern_t pattern));
77 extern int utbm_exec __((utbm_pattern_t pat, ucs2_t *text,
78 unsigned long textlen, unsigned long *match_start,
79 unsigned long *match_end));
81 /*************************************************************************
83 * Prototypes for the stub functions needed.
85 *************************************************************************/
87 extern int _utbm_isspace __((ucs4_t c, int compress));
89 extern int _utbm_iscntrl __((ucs4_t c));
91 extern int _utbm_nonspacing __((ucs4_t c));
93 extern ucs4_t _utbm_tolower __((ucs4_t c));
95 extern ucs4_t _utbm_toupper __((ucs4_t c));
97 extern ucs4_t _utbm_totitle __((ucs4_t c));