src/ccv.h
/* [<][>][^][v][top][bottom][index][help] */
FUNCTIONS
This source file includes following functions.
1 /*
2 * ccv.c - a module for encoding & charset conversion
3 * by Hirotsugu Kakugawa
4 *
5 * 29 Jul 1997
6 */
7 /*
8 * Copyright (C) 1997-1999 Hirotsugu Kakugawa.
9 * All rights reserved.
10 *
11 * This file is part of the VFlib Library. This library is free
12 * software; you can redistribute it and/or modify it under the terms of
13 * the GNU Library General Public License as published by the Free
14 * Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. This library is distributed in the hope
16 * that it will be useful, but WITHOUT ANY WARRANTY; without even the
17 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18 * PURPOSE. See the GNU Library General Public License for more details.
19 * You should have received a copy of the GNU Library General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */
23
24 #define CCV_STAT_LOADED 0
25 #define CCV_STAT_AUTOLOAD 1
26
27 #define CCV_ARG_TYPE_ARRAY 0
28 #define CCV_ARG_TYPE_RANDOM_ARRAY 1
29 #define CCV_ARG_TYPE_FUNC 2
30
31
32 struct s_ccv_random_array {
33 int *block_index;
34 long *tbl;
35 };
36 typedef struct s_ccv_random_array *CCV_RANDOM_ARRAY;
37
38 struct s_ccv_info {
39 char *cs1_name;
40 char **cs1_name_aliases;
41 char *cs1_enc;
42 char **cs1_enc_aliases;
43 char *cs2_name;
44 char **cs2_name_aliases;
45 char *cs2_enc;
46 char **cs2_enc_aliases;
47 int block_size;
48 int load_stat;
49 long (*conv)(int,long);
50 long arg;
51 int arg_type;
52 int c1min, c1max;
53 int c2min, c2max;
54 int nblocks;
55 char *file_name;
56 char *file_path;
57 };
58 typedef struct s_ccv_info *CCV_INFO;
59
60 Glocal int vf_ccv_init(void);
61 Glocal int vf_ccv_install_func(char *cs1_name, char *cs1_enc,
62 char *cs2_name, char *cs2_enc,
63 long (*conv)(int,long));
64 Glocal int vf_ccv_autoload(char *file_name);
65 Glocal int vf_ccv_require(char *cs1_name, char *cs1_enc,
66 char *cs2_name, char *cs2_enc);
67 Glocal long vf_ccv_conv(int ccvi_index, long code_point);
68
69 /*EOF*/