ReactOS 0.4.16-dev-336-gb667d82
siconv.h
Go to the documentation of this file.
1/* @(#)siconv.h 1.5 10/12/20 Copyright 2007-2010 J. Schilling */
2/*
3 * Definitions fur users of libsiconv
4 *
5 * Copyright (c) 2007-2010 J. Schilling
6 */
7/*
8 * The contents of this file are subject to the terms of the
9 * Common Development and Distribution License, Version 1.0 only
10 * (the "License"). You may not use this file except in compliance
11 * with the License.
12 *
13 * See the file CDDL.Schily.txt in this distribution for details.
14 *
15 * When distributing Covered Code, include this CDDL HEADER in each
16 * file and include the License file CDDL.Schily.txt from this distribution.
17 */
18
19#ifndef _SCHILY_SICONV_H
20#define _SCHILY_SICONV_H
21
22#ifndef _SCHILY_MCONFIG_H
23#include <schily/mconfig.h>
24#endif
25#ifndef _SCHILY_UTYPES_H
26#include <schily/utypes.h>
27#endif
28#ifndef _SCHILY_ICONV_H
29#include <schily/iconv.h>
30#endif
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36
37typedef struct siconv_table siconvt_t;
39 char *sic_name; /* SICONV charset name */
40 UInt16_t *sic_cs2uni; /* Charset -> Unicode */
41 UInt8_t **sic_uni2cs; /* Unicode -> Charset */
42 iconv_t sic_cd2uni; /* iconv Charset -> Unicode */
43 iconv_t sic_uni2cd; /* iconv Unicode -> Charset */
44 siconvt_t *sic_alt; /* alternate iconv tab */
45 siconvt_t *sic_next; /* Next table */
46 int sic_refcnt; /* Reference count */
47};
48
49#define use_iconv(t) ((t)->sic_cd2uni != NULL)
50
51#define sic_c2uni(t, c) ((t)->sic_cs2uni[c])
52#define sic_uni2c(t, c) ((t)->sic_uni2cs[((c) >> 8) & 0xFF][(c) & 0xFF])
53
54extern int sic_list __PR((FILE *));
55extern siconvt_t *sic_open __PR((char *));
56extern const char *sic_base __PR((void));
57extern int sic_close __PR((siconvt_t *));
58
59#ifdef __cplusplus
60}
61#endif
62
63#endif /* _SCHILY_SICONV_H */
#define __PR(a)
Definition: prototyp.h:106
EXPORT int sic_list(FILE *f)
Definition: sic_nls.c:233
EXPORT siconvt_t * sic_open(char *charset)
Definition: sic_nls.c:160
EXPORT const char * sic_base()
Definition: sic_nls.c:186
EXPORT int sic_close(siconvt_t *sip)
Definition: sic_nls.c:204
iconv_t sic_cd2uni
Definition: siconv.h:42
char * sic_name
Definition: siconv.h:39
UInt8_t ** sic_uni2cs
Definition: siconv.h:41
siconvt_t * sic_alt
Definition: siconv.h:44
siconvt_t * sic_next
Definition: siconv.h:45
UInt16_t * sic_cs2uni
Definition: siconv.h:40
int sic_refcnt
Definition: siconv.h:46
iconv_t sic_uni2cd
Definition: siconv.h:43
unsigned char UInt8_t
Definition: stdint.h:322