xref: /titanic_52/usr/src/cmd/ast/libast/i386/FEATURE/iconv (revision 906afcb89d0412cc073b95c2d701a804a8cdb62c)
1*906afcb8SAndy Fiddaman
2*906afcb8SAndy Fiddaman/* : : generated by proto : : */
3*906afcb8SAndy Fiddaman/* : : generated from contrib/ast/src/lib/libast/features/iconv by iffe version 2012-07-17 : : */
4*906afcb8SAndy Fiddaman
5*906afcb8SAndy Fiddaman#ifndef _def_iconv_ast
6*906afcb8SAndy Fiddaman#if !defined(__PROTO__)
7*906afcb8SAndy Fiddaman#  if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
8*906afcb8SAndy Fiddaman#    if defined(__cplusplus)
9*906afcb8SAndy Fiddaman#      define __LINKAGE__	"C"
10*906afcb8SAndy Fiddaman#    else
11*906afcb8SAndy Fiddaman#      define __LINKAGE__
12*906afcb8SAndy Fiddaman#    endif
13*906afcb8SAndy Fiddaman#    define __STDARG__
14*906afcb8SAndy Fiddaman#    define __PROTO__(x)	x
15*906afcb8SAndy Fiddaman#    define __OTORP__(x)
16*906afcb8SAndy Fiddaman#    define __PARAM__(n,o)	n
17*906afcb8SAndy Fiddaman#    if !defined(__STDC__) && !defined(__cplusplus)
18*906afcb8SAndy Fiddaman#      if !defined(c_plusplus)
19*906afcb8SAndy Fiddaman#      	define const
20*906afcb8SAndy Fiddaman#      endif
21*906afcb8SAndy Fiddaman#      define signed
22*906afcb8SAndy Fiddaman#      define void		int
23*906afcb8SAndy Fiddaman#      define volatile
24*906afcb8SAndy Fiddaman#      define __V_		char
25*906afcb8SAndy Fiddaman#    else
26*906afcb8SAndy Fiddaman#      define __V_		void
27*906afcb8SAndy Fiddaman#    endif
28*906afcb8SAndy Fiddaman#  else
29*906afcb8SAndy Fiddaman#    define __PROTO__(x)	()
30*906afcb8SAndy Fiddaman#    define __OTORP__(x)	x
31*906afcb8SAndy Fiddaman#    define __PARAM__(n,o)	o
32*906afcb8SAndy Fiddaman#    define __LINKAGE__
33*906afcb8SAndy Fiddaman#    define __V_		char
34*906afcb8SAndy Fiddaman#    define const
35*906afcb8SAndy Fiddaman#    define signed
36*906afcb8SAndy Fiddaman#    define void		int
37*906afcb8SAndy Fiddaman#    define volatile
38*906afcb8SAndy Fiddaman#  endif
39*906afcb8SAndy Fiddaman#  define __MANGLE__	__LINKAGE__
40*906afcb8SAndy Fiddaman#  if defined(__cplusplus) || defined(c_plusplus)
41*906afcb8SAndy Fiddaman#    define __VARARG__	...
42*906afcb8SAndy Fiddaman#  else
43*906afcb8SAndy Fiddaman#    define __VARARG__
44*906afcb8SAndy Fiddaman#  endif
45*906afcb8SAndy Fiddaman#  if defined(__STDARG__)
46*906afcb8SAndy Fiddaman#    define __VA_START__(p,a)	va_start(p,a)
47*906afcb8SAndy Fiddaman#  else
48*906afcb8SAndy Fiddaman#    define __VA_START__(p,a)	va_start(p)
49*906afcb8SAndy Fiddaman#  endif
50*906afcb8SAndy Fiddaman#  if !defined(__INLINE__)
51*906afcb8SAndy Fiddaman#    if defined(__cplusplus)
52*906afcb8SAndy Fiddaman#      define __INLINE__	extern __MANGLE__ inline
53*906afcb8SAndy Fiddaman#    else
54*906afcb8SAndy Fiddaman#      if defined(_WIN32) && !defined(__GNUC__)
55*906afcb8SAndy Fiddaman#      	define __INLINE__	__inline
56*906afcb8SAndy Fiddaman#      endif
57*906afcb8SAndy Fiddaman#    endif
58*906afcb8SAndy Fiddaman#  endif
59*906afcb8SAndy Fiddaman#endif
60*906afcb8SAndy Fiddaman#if !defined(__LINKAGE__)
61*906afcb8SAndy Fiddaman#define __LINKAGE__		/* 2004-08-11 transition */
62*906afcb8SAndy Fiddaman#endif
63*906afcb8SAndy Fiddaman
64*906afcb8SAndy Fiddaman#define _def_iconv_ast	1
65*906afcb8SAndy Fiddaman#define _sys_types	1	/* #include <sys/types.h> ok */
66*906afcb8SAndy Fiddaman#define _hdr_iconv	1	/* #include <iconv.h> ok */
67*906afcb8SAndy Fiddaman#define _lib_iconv_open	1	/* iconv_open() in default lib(s) */
68*906afcb8SAndy Fiddaman#define _lib_iconv_close	1	/* iconv_close() in default lib(s) */
69*906afcb8SAndy Fiddaman#define _lib_iconv	1	/* iconv() in default lib(s) */
70*906afcb8SAndy Fiddaman#define _nxt_iconv <../include/iconv.h>	/* include path for the native <iconv.h> */
71*906afcb8SAndy Fiddaman#define _nxt_iconv_str "../include/iconv.h"	/* include string for the native <iconv.h> */
72*906afcb8SAndy Fiddaman#include <ast_common.h>
73*906afcb8SAndy Fiddaman#include <ccode.h>
74*906afcb8SAndy Fiddaman#include <../include/iconv.h>	/* the native iconv.h */
75*906afcb8SAndy Fiddaman
76*906afcb8SAndy Fiddaman#define ICONV_VERSION		20110111L
77*906afcb8SAndy Fiddaman
78*906afcb8SAndy Fiddaman#define ICONV_FATAL		0x02
79*906afcb8SAndy Fiddaman#define ICONV_OMIT		0x04
80*906afcb8SAndy Fiddaman
81*906afcb8SAndy Fiddaman#define CC_ICONV		(-1)
82*906afcb8SAndy Fiddaman#define CC_UCS			(-2)
83*906afcb8SAndy Fiddaman#define CC_SCU			(-3)
84*906afcb8SAndy Fiddaman#define CC_UTF			(-4)
85*906afcb8SAndy Fiddaman#define CC_UME			(-5)
86*906afcb8SAndy Fiddaman
87*906afcb8SAndy Fiddaman#ifndef _ICONV_LIST_PRIVATE_
88*906afcb8SAndy Fiddaman#undef	iconv_t
89*906afcb8SAndy Fiddaman#define	iconv_t		_ast_iconv_t
90*906afcb8SAndy Fiddaman#undef	iconv_f
91*906afcb8SAndy Fiddaman#define	iconv_f		_ast_iconv_f
92*906afcb8SAndy Fiddaman#undef	iconv_list_t
93*906afcb8SAndy Fiddaman#define	iconv_list_t	_ast_iconv_list_t
94*906afcb8SAndy Fiddaman#undef	iconv_open
95*906afcb8SAndy Fiddaman#define iconv_open	_ast_iconv_open
96*906afcb8SAndy Fiddaman#undef	iconv
97*906afcb8SAndy Fiddaman#define	iconv		_ast_iconv
98*906afcb8SAndy Fiddaman#undef	iconv_close
99*906afcb8SAndy Fiddaman#define iconv_close	_ast_iconv_close
100*906afcb8SAndy Fiddaman#undef	iconv_list
101*906afcb8SAndy Fiddaman#define iconv_list	_ast_iconv_list
102*906afcb8SAndy Fiddaman#undef	iconv_move
103*906afcb8SAndy Fiddaman#define iconv_move	_ast_iconv_move
104*906afcb8SAndy Fiddaman#undef	iconv_name
105*906afcb8SAndy Fiddaman#define iconv_name	_ast_iconv_name
106*906afcb8SAndy Fiddaman#undef	iconv_write
107*906afcb8SAndy Fiddaman#define iconv_write	_ast_iconv_write
108*906afcb8SAndy Fiddaman#endif
109*906afcb8SAndy Fiddaman
110*906afcb8SAndy Fiddamantypedef int (*Iconv_error_f) __PROTO__((__V_*, __V_*, int, ...));
111*906afcb8SAndy Fiddaman
112*906afcb8SAndy Fiddamantypedef struct Iconv_disc_s
113*906afcb8SAndy Fiddaman{
114*906afcb8SAndy Fiddaman	uint32_t		version;
115*906afcb8SAndy Fiddaman	Iconv_error_f		errorf;
116*906afcb8SAndy Fiddaman	size_t			errors;
117*906afcb8SAndy Fiddaman	uint32_t		flags;
118*906afcb8SAndy Fiddaman	int			fill;
119*906afcb8SAndy Fiddaman} Iconv_disc_t;
120*906afcb8SAndy Fiddaman
121*906afcb8SAndy Fiddamantypedef Ccmap_t _ast_iconv_list_t;
122*906afcb8SAndy Fiddamantypedef __V_* _ast_iconv_t;
123*906afcb8SAndy Fiddamantypedef size_t (*_ast_iconv_f) __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
124*906afcb8SAndy Fiddaman
125*906afcb8SAndy Fiddaman#define iconv_init(d,e)		(memset(d,0,sizeof(*(d))),(d)->version=ICONV_VERSION,(d)->errorf=(Iconv_error_f)(e),(d)->fill=(-1))
126*906afcb8SAndy Fiddaman
127*906afcb8SAndy Fiddaman#if _BLD_ast && defined(__EXPORT__)
128*906afcb8SAndy Fiddaman#undef __MANGLE__
129*906afcb8SAndy Fiddaman#define __MANGLE__ __LINKAGE__		__EXPORT__
130*906afcb8SAndy Fiddaman#endif
131*906afcb8SAndy Fiddaman
132*906afcb8SAndy Fiddamanextern __MANGLE__ _ast_iconv_t	_ast_iconv_open __PROTO__((const char*, const char*));
133*906afcb8SAndy Fiddamanextern __MANGLE__ size_t		_ast_iconv __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
134*906afcb8SAndy Fiddamanextern __MANGLE__ int		_ast_iconv_close __PROTO__((_ast_iconv_t));
135*906afcb8SAndy Fiddamanextern __MANGLE__ _ast_iconv_list_t*	_ast_iconv_list __PROTO__((_ast_iconv_list_t*));
136*906afcb8SAndy Fiddamanextern __MANGLE__ int		_ast_iconv_name __PROTO__((const char*, char*, size_t));
137*906afcb8SAndy Fiddaman#if _SFIO_H
138*906afcb8SAndy Fiddamanextern __MANGLE__ ssize_t		_ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, Iconv_disc_t*));
139*906afcb8SAndy Fiddamanextern __MANGLE__ ssize_t		_ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, Iconv_disc_t*));
140*906afcb8SAndy Fiddaman#else
141*906afcb8SAndy Fiddaman#if _SFSTDIO_H
142*906afcb8SAndy Fiddamanextern __MANGLE__ ssize_t		_ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, Iconv_disc_t*));
143*906afcb8SAndy Fiddamanextern __MANGLE__ ssize_t		_ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, Iconv_disc_t*));
144*906afcb8SAndy Fiddaman#endif
145*906afcb8SAndy Fiddaman#endif
146*906afcb8SAndy Fiddaman
147*906afcb8SAndy Fiddaman#undef __MANGLE__
148*906afcb8SAndy Fiddaman#define __MANGLE__ __LINKAGE__
149*906afcb8SAndy Fiddaman
150*906afcb8SAndy Fiddaman#endif
151