xref: /onnv-gate/usr/src/lib/libast/sparcv9/include/ast/ast_iconv.h (revision 12068:08a39a083754)
14887Schin /***********************************************************************
24887Schin *                                                                      *
34887Schin *               This software is part of the ast package               *
4*12068SRoger.Faulkner@Oracle.COM *          Copyright (c) 1985-2010 AT&T Intellectual Property          *
54887Schin *                      and is licensed under the                       *
64887Schin *                  Common Public License, Version 1.0                  *
78462SApril.Chin@Sun.COM *                    by AT&T Intellectual Property                     *
84887Schin *                                                                      *
94887Schin *                A copy of the License is available at                 *
104887Schin *            http://www.opensource.org/licenses/cpl1.0.txt             *
114887Schin *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
124887Schin *                                                                      *
134887Schin *              Information and Software Systems Research               *
144887Schin *                            AT&T Research                             *
154887Schin *                           Florham Park NJ                            *
164887Schin *                                                                      *
174887Schin *                 Glenn Fowler <gsf@research.att.com>                  *
184887Schin *                  David Korn <dgk@research.att.com>                   *
194887Schin *                   Phong Vo <kpv@research.att.com>                    *
204887Schin *                                                                      *
214887Schin ***********************************************************************/
224887Schin 
234887Schin /* : : generated by proto : : */
24*12068SRoger.Faulkner@Oracle.COM /* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/iconv by iffe version 2009-12-04 : : */
254887Schin 
264887Schin #ifndef _def_iconv_ast
274887Schin #if !defined(__PROTO__)
284887Schin #  if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
294887Schin #    if defined(__cplusplus)
304887Schin #      define __LINKAGE__	"C"
314887Schin #    else
324887Schin #      define __LINKAGE__
334887Schin #    endif
344887Schin #    define __STDARG__
354887Schin #    define __PROTO__(x)	x
364887Schin #    define __OTORP__(x)
374887Schin #    define __PARAM__(n,o)	n
384887Schin #    if !defined(__STDC__) && !defined(__cplusplus)
394887Schin #      if !defined(c_plusplus)
404887Schin #      	define const
414887Schin #      endif
424887Schin #      define signed
434887Schin #      define void		int
444887Schin #      define volatile
454887Schin #      define __V_		char
464887Schin #    else
474887Schin #      define __V_		void
484887Schin #    endif
494887Schin #  else
504887Schin #    define __PROTO__(x)	()
514887Schin #    define __OTORP__(x)	x
524887Schin #    define __PARAM__(n,o)	o
534887Schin #    define __LINKAGE__
544887Schin #    define __V_		char
554887Schin #    define const
564887Schin #    define signed
574887Schin #    define void		int
584887Schin #    define volatile
594887Schin #  endif
604887Schin #  define __MANGLE__	__LINKAGE__
614887Schin #  if defined(__cplusplus) || defined(c_plusplus)
624887Schin #    define __VARARG__	...
634887Schin #  else
644887Schin #    define __VARARG__
654887Schin #  endif
664887Schin #  if defined(__STDARG__)
674887Schin #    define __VA_START__(p,a)	va_start(p,a)
684887Schin #  else
694887Schin #    define __VA_START__(p,a)	va_start(p)
704887Schin #  endif
714887Schin #  if !defined(__INLINE__)
724887Schin #    if defined(__cplusplus)
734887Schin #      define __INLINE__	extern __MANGLE__ inline
744887Schin #    else
754887Schin #      if defined(_WIN32) && !defined(__GNUC__)
764887Schin #      	define __INLINE__	__inline
774887Schin #      endif
784887Schin #    endif
794887Schin #  endif
804887Schin #endif
814887Schin #if !defined(__LINKAGE__)
824887Schin #define __LINKAGE__		/* 2004-08-11 transition */
834887Schin #endif
844887Schin 
854887Schin #define _def_iconv_ast	1
864887Schin #define _sys_types	1	/* #include <sys/types.h> ok */
874887Schin #define _hdr_iconv	1	/* #include <iconv.h> ok */
884887Schin #define _lib_iconv_open	1	/* iconv_open() in default lib(s) */
894887Schin #define _lib_iconv_close	1	/* iconv_close() in default lib(s) */
904887Schin #define _lib_iconv	1	/* iconv() in default lib(s) */
914887Schin #define _nxt_iconv <../include/iconv.h>	/* include path for the native <iconv.h> */
924887Schin #define _nxt_iconv_str "../include/iconv.h"	/* include string for the native <iconv.h> */
934887Schin #include <ast_common.h>
944887Schin #include <ccode.h>
954887Schin #include <../include/iconv.h>	/* the native iconv.h */
964887Schin 
974887Schin #define CC_ICONV	(-1)
984887Schin #define CC_UCS		(-2)
994887Schin #define CC_SCU		(-3)
1004887Schin #define CC_UTF		(-4)
1014887Schin #define CC_UME		(-5)
1024887Schin 
1034887Schin #ifndef _ICONV_LIST_PRIVATE_
1044887Schin #undef	iconv_t
1054887Schin #define	iconv_t		_ast_iconv_t
1064887Schin #undef	iconv_f
1074887Schin #define	iconv_f		_ast_iconv_f
1084887Schin #undef	iconv_list_t
1094887Schin #define	iconv_list_t	_ast_iconv_list_t
1104887Schin #undef	iconv_open
1114887Schin #define iconv_open	_ast_iconv_open
1124887Schin #undef	iconv
1134887Schin #define	iconv		_ast_iconv
1144887Schin #undef	iconv_close
1154887Schin #define iconv_close	_ast_iconv_close
1164887Schin #undef	iconv_list
1174887Schin #define iconv_list	_ast_iconv_list
1184887Schin #undef	iconv_move
1194887Schin #define iconv_move	_ast_iconv_move
1204887Schin #undef	iconv_name
1214887Schin #define iconv_name	_ast_iconv_name
1224887Schin #undef	iconv_write
1234887Schin #define iconv_write	_ast_iconv_write
1244887Schin #endif
1254887Schin 
1264887Schin typedef Ccmap_t _ast_iconv_list_t;
1274887Schin typedef __V_* _ast_iconv_t;
1284887Schin typedef size_t (*_ast_iconv_f) __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
1294887Schin 
1304887Schin #if _BLD_ast && defined(__EXPORT__)
1314887Schin #undef __MANGLE__
1324887Schin #define __MANGLE__ __LINKAGE__		__EXPORT__
1334887Schin #endif
1344887Schin 
1354887Schin extern __MANGLE__ _ast_iconv_t	_ast_iconv_open __PROTO__((const char*, const char*));
1364887Schin extern __MANGLE__ size_t		_ast_iconv __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
1374887Schin extern __MANGLE__ int		_ast_iconv_close __PROTO__((_ast_iconv_t));
1384887Schin extern __MANGLE__ _ast_iconv_list_t*	_ast_iconv_list __PROTO__((_ast_iconv_list_t*));
1394887Schin extern __MANGLE__ int		_ast_iconv_name __PROTO__((const char*, char*, size_t));
1404887Schin #if _SFIO_H
1414887Schin extern __MANGLE__ ssize_t		_ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, size_t*));
1424887Schin extern __MANGLE__ ssize_t		_ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, size_t*));
1434887Schin #else
1444887Schin #if _SFSTDIO_H
1454887Schin extern __MANGLE__ ssize_t		_ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, size_t*));
1464887Schin extern __MANGLE__ ssize_t		_ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, size_t*));
1474887Schin #endif
1484887Schin #endif
1494887Schin 
1504887Schin #undef __MANGLE__
1514887Schin #define __MANGLE__ __LINKAGE__
1524887Schin 
1534887Schin #endif
154