ReactOS  0.4.13-dev-656-g74bcf30
nls_iso8859-15.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/nls.h>
#include <linux/errno.h>
Include dependency graph for nls_iso8859-15.c:

Go to the source code of this file.

Functions

static int uni2char (wchar_t uni, unsigned char *out, int boundlen)
 
static int char2uni (const unsigned char *rawstring, int boundlen, wchar_t *uni)
 
static int __init init_nls_iso8859_15 (void)
 
static void __exit exit_nls_iso8859_15 (void)
 

Variables

static wchar_t charset2uni [256]
 
static unsigned char page00 [256]
 
static unsigned char page01 [256]
 
static unsigned char page20 [256]
 
static unsigned charpage_uni2charset [256]
 
static unsigned char charset2lower [256]
 
static unsigned char charset2upper [256]
 
static struct nls_table table
 

Function Documentation

◆ char2uni()

static int char2uni ( const unsigned char rawstring,
int  boundlen,
wchar_t uni 
)
static

Definition at line 278 of file nls_iso8859-15.c.

279 {
280  *uni = charset2uni[*rawstring];
281  if (*uni == 0x0000)
282  return -EINVAL;
283  return 1;
284 }
Definition: arc.h:39
static wchar_t charset2uni[256]

◆ exit_nls_iso8859_15()

static void __exit exit_nls_iso8859_15 ( void  )
static

Definition at line 301 of file nls_iso8859-15.c.

302 {
304 }
int unregister_nls(struct nls_table *)
Definition: nls_base.c:185

Referenced by Ext2UnloadAllNls(), and RfsdUnloadAllNls().

◆ init_nls_iso8859_15()

static int __init init_nls_iso8859_15 ( void  )
static

Definition at line 296 of file nls_iso8859-15.c.

297 {
298  return register_nls(&table);
299 }
int register_nls(struct nls_table *)
Definition: nls_base.c:162

Referenced by Ext2LoadAllNls(), and RfsdLoadAllNls().

◆ uni2char()

static int uni2char ( wchar_t  uni,
unsigned char out,
int  boundlen 
)
static

Definition at line 261 of file nls_iso8859-15.c.

262 {
263  unsigned char *uni2charset;
264  unsigned char cl = uni & 0x00ff;
265  unsigned char ch = (uni & 0xff00) >> 8;
266 
267  if (boundlen <= 0)
268  return -ENAMETOOLONG;
269 
270  uni2charset = page_uni2charset[ch];
271  if (uni2charset && uni2charset[cl])
272  out[0] = uni2charset[cl];
273  else
274  return -EINVAL;
275  return 1;
276 }
Definition: arc.h:39
static unsigned char * page_uni2charset[256]
static FILE * out
Definition: regtests2xml.c:44

Variable Documentation

◆ charset2lower

unsigned char charset2lower[256]
static

Definition at line 189 of file nls_iso8859-15.c.

◆ charset2uni

wchar_t charset2uni[256]
static

Definition at line 14 of file nls_iso8859-15.c.

Referenced by char2uni().

◆ charset2upper

unsigned char charset2upper[256]
static

Definition at line 225 of file nls_iso8859-15.c.

◆ page00

unsigned char page00[256]
static

Definition at line 97 of file nls_iso8859-15.c.

◆ page01

unsigned char page01[256]
static
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xbc, 0xbd, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xa6, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xbe, 0x00, 0x00, 0x00, 0x00, 0xb4, 0xb8, 0x00,
}

Definition at line 133 of file nls_iso8859-15.c.

◆ page20

unsigned char page20[256]
static
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00,
}

Definition at line 152 of file nls_iso8859-15.c.

◆ page_uni2charset

unsigned char* page_uni2charset[256]
static
Initial value:
= {
}
static unsigned char page20[256]
static unsigned char page01[256]
smooth NULL
Definition: ftsmooth.c:416
static unsigned char page00[256]

Definition at line 178 of file nls_iso8859-15.c.

Referenced by uni2char().

◆ table

Initial value:
= {
"iso8859-15",
0,
}
static unsigned char charset2upper[256]
#define THIS_MODULE
Definition: module.h:267
static unsigned char charset2lower[256]
static int uni2char(wchar_t uni, unsigned char *out, int boundlen)
static int char2uni(const unsigned char *rawstring, int boundlen, wchar_t *uni)

Definition at line 286 of file nls_iso8859-15.c.