2 * Copyright (c) 1995, Index Data.
6 * Use and redistribution in source or binary form, with or without
7 * modification, of any or all of this software and documentation is
8 * permitted, provided that the following conditions are met:
10 * 1. This copyright and permission notice appear with all copies of the
11 * software and its documentation. Notices of copyright or attribution
12 * which appear at the beginning of any file must remain unchanged.
14 * 2. The names of Index Data or the individual authors may not be used to
15 * endorse or promote products derived from this software without specific
16 * prior written permission.
18 * 3. Source code or binary versions of this software and its
19 * documentation may be used freely in not-for-profit applications. For
20 * profit applications - such as providing for-pay database services,
21 * marketing a product based in whole or in part on this software or its
22 * documentation, or generally distributing this software or its
23 * documentation under a different license - requires a commercial
24 * license from Index Data. The software may be installed and used for
25 * evaluation purposes in conjunction with a commercial application for a
26 * trial period no longer than 60 days.
28 * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
29 * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
30 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
31 * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
32 * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
33 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
34 * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
35 * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
43 extern const char *CHR_UNKNOWN;
44 extern const char *CHR_SPACE;
45 extern const char *CHR_BASE;
48 typedef struct chr_t_entry chr_t_entry;
50 typedef struct chrmaptab
52 chr_t_entry *input; /* mapping table for input data */
53 chr_t_entry *query_equiv; /* mapping table for queries */
54 unsigned char *output[256]; /* return mapping - for display of registers */
55 int base_uppercase; /* Start of upper-case ordinals */
56 } chrmaptab, *CHRMAPTAB;
58 chrmaptab *chr_read_maptab(const char *tabpath, const char *name);
59 int chr_map_chrs(chr_t_entry *t, char **from, int len, int *read, char **to,
61 char **chr_map_input(chr_t_entry *t, char **from, int len);