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