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