GME  13
Defines | Typedefs | Functions
substitute iconv implementation

Defines

#define API_DECLARE(type)   type
#define API_DECLARE_NONSTD(type)   type
#define API_DECLARE_DATA

Typedefs

typedef void * apr_iconv_t

Functions

apr_status_t apr_iconv_open (const char *to, const char *from, apr_pool_t *pool, apr_iconv_t *cd)
apr_status_t apr_iconv (apr_iconv_t cd, const char **inbuf, apr_size_t *inbytesleft, char **outbuf, apr_size_t *outbytesleft, apr_size_t *translated)
apr_status_t apr_iconv_close (apr_iconv_t cd, apr_pool_t *pool)

Define Documentation

#define API_DECLARE (   type)    type

API_DECLARE_EXPORT is defined when building the libapriconv dynamic library, so that all public symbols are exported.

API_DECLARE_STATIC is defined when including the apriconv public headers, to provide static linkage when the dynamic library may be unavailable.

API_DECLARE_STATIC and API_DECLARE_EXPORT are left undefined when including the apr-iconv public headers, to import and link the symbols from the dynamic libapriconv library and assure appropriate indirection and calling conventions at compile time. The public apr-iconv functions are declared with API_DECLARE(), so they use the most portable calling convention. Public apr-iconv functions with variable arguments must use API_DECLARE_NONSTD().

API_DECLARE(rettype) apr_func(args);

Definition at line 75 of file apr_iconv.h.

All exported apr-iconv variables are declared with API_DECLARE_DATA This assures the appropriate indirection is invoked at compile time.

API_DECLARE_DATA type apr_variable; extern API_DECLARE_DATA type apr_variable; syntax is required for declarations within headers to properly import the variable.

Definition at line 91 of file apr_iconv.h.

#define API_DECLARE_NONSTD (   type)    type

The private apr-iconv functions are declared with API_DECLARE_NONSTD(), so they use the most optimal C language calling conventions.

API_DECLARE(rettype) apr_func(args);

Definition at line 82 of file apr_iconv.h.


Typedef Documentation

typedef void* apr_iconv_t

Definition at line 109 of file apr_iconv.h.


Function Documentation

apr_status_t apr_iconv ( apr_iconv_t  cd,
const char **  inbuf,
apr_size_t *  inbytesleft,
char **  outbuf,
apr_size_t *  outbytesleft,
apr_size_t *  translated 
)

Perform character set conversion.

Parameters:
cdconversion descriptor created by apr_iconv_open().
inbufinput buffer.
inbytesleftbytes to convert.
outbufoutput buffer.
outbytesleftspace (in bytes) available in outbuf.
translatednumber of input bytes converted.

Deallocate descriptor for character set conversion.

Parameters:
cdconversion descriptor.
poolpool used in the apr_iconv_open().
apr_status_t apr_iconv_open ( const char *  to,
const char *  from,
apr_pool_t pool,
apr_iconv_t cd 
)

Create a conversion descriptor.

Parameters:
toname of charset to convert to.
fromname of charset of the input bytes.
poolpool to alloc memory.
cdconversion descriptor created in pool.