Multi register works with record paths and data1 profile path
[idzebra-moved-to-github.git] / include / charmap.h
1 /*
2  * Copyright (c) 1995-1999, Index Data.
3  * 
4  * All rights reserved.
5  * 
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:
9  * 
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.
13  * 
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.
17  * 
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.
27  * 
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
36  * OF THIS SOFTWARE.
37  *
38  * $Log: charmap.h,v $
39  * Revision 1.7  2002-04-04 20:50:36  adam
40  * Multi register works with record paths and data1 profile path
41  *
42  * Revision 1.6  1999/11/30 13:48:03  adam
43  * Improved installation. Updated for inclusion of YAZ header files.
44  *
45  * Revision 1.5  1999/09/07 07:19:21  adam
46  * Work on character mapping. Implemented replace rules.
47  *
48  * Revision 1.4  1997/10/27 14:33:04  adam
49  * Moved towards generic character mapping depending on "structure"
50  * field in abstract syntax file. Fixed a few memory leaks. Fixed
51  * bug with negative integers when doing searches with relational
52  * operators.
53  *
54  * Revision 1.3  1997/09/05 15:29:59  adam
55  * Changed prototype for chr_map_input - added const.
56  * Added support for C++, headers uses extern "C" for public definitions.
57  *
58  */
59
60 #ifndef CHARMAP_H
61 #define CHARMAP_H
62
63 #include <yaz/yconfig.h>
64
65 #ifdef __cplusplus
66 extern "C" {
67 #endif
68
69 YAZ_EXPORT extern const char *CHR_UNKNOWN;
70 YAZ_EXPORT extern const char *CHR_SPACE;
71 YAZ_EXPORT extern const char *CHR_BASE;
72
73 struct chr_t_entry;
74 typedef struct chr_t_entry chr_t_entry;
75
76 typedef struct chrmaptab_info *chrmaptab;
77
78 YAZ_EXPORT chrmaptab chrmaptab_create(const char *tabpath, const char *name,
79                                       int map_only, const char *tabroot);
80 YAZ_EXPORT void chrmaptab_destroy (chrmaptab tab);
81
82 YAZ_EXPORT const char **chr_map_input(chrmaptab t, const char **from, int len);
83 YAZ_EXPORT const char **chr_map_input_x(chrmaptab t,
84                                         const char **from, int *len);
85 YAZ_EXPORT const char **chr_map_input_q(chrmaptab maptab,
86                                         const char **from, int len,
87                                         const char **qmap);
88     
89 YAZ_EXPORT const char *chr_map_output(chrmaptab t, const char **from, int len);
90
91 YAZ_EXPORT unsigned char zebra_prim(char **s);
92
93 #ifdef __cplusplus
94 }
95 #endif
96
97 #endif