Apache HTTPD
Macros | Typedefs | Functions | Variables
I18N translation library

Macros

#define APR_DEFAULT_CHARSET   (const char *)0
 
#define APR_LOCALE_CHARSET   (const char *)1
 

Typedefs

typedef struct apr_xlate_t apr_xlate_t
 

Functions

 APU_DECLARE (apr_status_t) apr_xlate_open(apr_xlate_t **convset
 
 APU_DECLARE (apr_int32_t) apr_xlate_conv_byte(apr_xlate_t *convset
 

Variables

const chartopage
 
const char const charfrompage
 
const char const char apr_pool_tpool
 
intonoff
 
const charinbuf
 
const char apr_size_tinbytes_left
 
const char apr_size_t charoutbuf
 
const char apr_size_t char apr_size_toutbytes_left
 
unsigned char inchar
 

Detailed Description

Macro Definition Documentation

◆ APR_DEFAULT_CHARSET

#define APR_DEFAULT_CHARSET   (const char *)0

This is to indicate the charset of the sourcecode at compile time names to indicate the charset of the source code at compile time. This is useful if there are literal strings in the source code which must be translated according to the charset of the source code.

Definition at line 78 of file apr_xlate.h.

◆ APR_LOCALE_CHARSET

#define APR_LOCALE_CHARSET   (const char *)1

To indicate charset names of the current locale

Definition at line 82 of file apr_xlate.h.

Typedef Documentation

◆ apr_xlate_t

Opaque translation buffer

Definition at line 39 of file apr_xlate.h.

Function Documentation

◆ APU_DECLARE() [1/2]

APU_DECLARE ( apr_int32_t  )

Convert a single-byte character from one charset to another.

Parameters
convsetThe handle allocated by apr_xlate_open, specifying the parameters of conversion
incharThe single-byte character to convert.
Warning
This only works when converting between single-byte character sets. -1 will be returned if the conversion can't be performed.

◆ APU_DECLARE() [2/2]

APU_DECLARE ( apr_status_t  )

Set up for converting text from one charset to another.

Parameters
convsetThe handle to be filled in by this function
topageThe name of the target charset
frompageThe name of the source charset
poolThe pool to use
Remarks
Specify APR_DEFAULT_CHARSET for one of the charset names to indicate the charset of the source code at compile time. This is useful if there are literal strings in the source code which must be translated according to the charset of the source code. APR_DEFAULT_CHARSET is not useful if the source code of the caller was not encoded in the same charset as APR at compile time.
Specify APR_LOCALE_CHARSET for one of the charset names to indicate the charset of the current locale.
Return APR_EINVAL if unable to procure a convset, or APR_ENOTIMPL if charset transcoding is not available in this instance of apr-util at all (i.e., APR_HAS_XLATE is undefined).

Find out whether or not the specified conversion is single-byte-only.

Parameters
convsetThe handle allocated by apr_xlate_open, specifying the parameters of conversion
onoffOutput: whether or not the conversion is single-byte-only
Remarks
Return APR_ENOTIMPL if charset transcoding is not available in this instance of apr-util (i.e., APR_HAS_XLATE is undefined).

Convert a buffer of text from one codepage to another.

Parameters
convsetThe handle allocated by apr_xlate_open, specifying the parameters of conversion
inbufThe address of the source buffer
inbytes_leftInput: the amount of input data to be translated Output: the amount of input data not yet translated
outbufThe address of the destination buffer
outbytes_leftInput: the size of the output buffer Output: the amount of the output buffer not yet used
Remarks
Returns APR_ENOTIMPL if charset transcoding is not available in this instance of apr-util (i.e., APR_HAS_XLATE is undefined). Returns APR_INCOMPLETE if the input buffer ends in an incomplete multi-byte character.

To correctly terminate the output buffer for some multi-byte character set encodings, a final call must be made to this function after the complete input string has been converted, passing the inbuf and inbytes_left parameters as NULL. (Note that this mode only works from version 1.1.0 onwards)

Close a codepage translation handle.

Parameters
convsetThe codepage translation handle to close
Remarks
Return APR_ENOTIMPL if charset transcoding is not available in this instance of apr-util (i.e., APR_HAS_XLATE is undefined).

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

< Replace

< Insert with duplicates

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< mask to extract lock type

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

< Size of the file

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

Definition at line 358 of file apr_brigade.c.

Variable Documentation

◆ frompage

const char const char* frompage

Definition at line 68 of file apr_xlate.h.

◆ inbuf

const char* inbuf

Definition at line 118 of file apr_xlate.h.

◆ inbytes_left

const char apr_size_t* inbytes_left

Definition at line 119 of file apr_xlate.h.

◆ inchar

unsigned char inchar

Definition at line 147 of file apr_xlate.h.

◆ onoff

int* onoff

Definition at line 93 of file apr_xlate.h.

◆ outbuf

Definition at line 120 of file apr_xlate.h.

◆ outbytes_left

Definition at line 121 of file apr_xlate.h.

◆ pool

Definition at line 69 of file apr_xlate.h.

◆ topage

const char* topage

Definition at line 67 of file apr_xlate.h.