Main Page | Modules | Namespace List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

Native Language Support (NLS)


Data Structures

struct  nls_code_page
 Code page structure. More...
struct  nls_operations
 Structure of operations for NLS support. More...

Defines

#define NLS_MB_MAX_LEN   6
 The maximum number of bytes per multibyte character in any code page.
#define REQ_GET_OPERATIONS   0
#define REQ_GET_REFERENCES   1
#define OT_NLS_OPERATIONS   3

Functions

int nls_get (const char *name, int type, void **operations)
 Gets NLS operations for a code page.
int nls_register (struct nls_code_page *cp)
 Registers a code page to the NLS manager liked list.
int nls_unregister (struct nls_code_page *cp)
 Unregisters a code page from the NLS manager linked list.
static int default_mbtowc (wchar_t *restrict result, const char *restrict string, size_t size)
static int default_wctomb (char *s, wchar_t wc, size_t size)
static int default_mblen (const char *string, size_t size)
static int default_toupper (int ch)
static int default_tolower (int ch)
static int default_release (void)
int default_request (int function,...)
int nls_defaultSetup (struct nls_operations **p)
int stricmp (const char *s1, const char *s2)
static int strcasecmp (const char *s1, const char *s2)

Variables

static struct nls_code_pagenls_head = NULL
static unsigned default_refcount = 0
static struct nls_operations default_nls_operations
static struct nls_code_page default_cp
static struct nls_code_page iso8859_1_cp

Define Documentation

#define NLS_MB_MAX_LEN   6
 

The maximum number of bytes per multibyte character in any code page.

#define OT_NLS_OPERATIONS   3
 

#define REQ_GET_OPERATIONS   0
 

#define REQ_GET_REFERENCES   1
 


Function Documentation

static int default_mblen const char *  string,
size_t  size
[static]
 

static int default_mbtowc wchar_t *restrict  result,
const char *restrict  string,
size_t  size
[static]
 

static int default_release void   )  [static]
 

int default_request int  function,
  ...
 

static int default_tolower int  ch  )  [static]
 

static int default_toupper int  ch  )  [static]
 

static int default_wctomb char *  s,
wchar_t  wc,
size_t  size
[static]
 

int nls_defaultSetup struct nls_operations **  p  ) 
 

int nls_get const char *  name,
int  type,
void **  operations
 

Gets NLS operations for a code page.

Parameters:
name name of the requested code page, case insensitive in ASCII range ('a'..'z');
type the requested type of operations;
[out] operations the address of a pointer to the returned operations; it can be NULL to just check if the requested type is available.
Return values:
0 success, operations points to the structure of operations;
-ENOTSUP request or type of operations not available.

int nls_register struct nls_code_page cp  ) 
 

Registers a code page to the NLS manager liked list.

Parameters:
cp the code page structure to register.
Return values:
0 success;
-EINVAL the code page structure is not valid;
-EBUSY the code page structure is already linked (the next field is not null).
Remarks:
The NLS Manager updates the next field of the code page structure.

int nls_unregister struct nls_code_page cp  ) 
 

Unregisters a code page from the NLS manager linked list.

Parameters:
cp the code page to unregister.
Return values:
0 success;
-EINVAL code page structure not found in the linked list;
-EBUSY the reference count of the code page structure is not zero (somebody is using the code page).
Remarks:
The NLS Manager sets the next field of the code page structure back to a null pointer.

static int strcasecmp const char *  s1,
const char *  s2
[inline, static]
 

int stricmp const char *  s1,
const char *  s2
 


Variable Documentation

struct nls_code_page default_cp [static]
 

Initial value:

{
        .name    = "default",
        .request = default_request,
        .next    = NULL
}

struct nls_operations default_nls_operations [static]
 

Initial value:

{
        .mbtowc  = default_mbtowc,
        .wctomb  = default_wctomb,
        .mblen   = default_mblen,
        .toupper = default_toupper,
        .tolower = default_tolower,
        .release = default_release
}

unsigned default_refcount = 0 [static]
 

struct nls_code_page iso8859_1_cp [static]
 

Initial value:

{
        .name    = "iso8859-1",
        .request = default_request,
        .next    = NULL
}

struct nls_code_page* nls_head = NULL [static]
 


Generated on Fri Feb 24 14:13:24 2006 for VDK Blacksheep by  doxygen 1.4.1