ReactOS  0.4.13-dev-651-g5dbc677
nls_iso8859-9.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-9.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_9 (void)
 
static void __exit exit_nls_iso8859_9 (void)
 

Variables

static wchar_t charset2uni [256]
 
static unsigned char page00 [256]
 
static unsigned char page01 [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 243 of file nls_iso8859-9.c.

244 {
245  *uni = charset2uni[*rawstring];
246  if (*uni == 0x0000)
247  return -EINVAL;
248  return 1;
249 }
Definition: arc.h:39
static wchar_t charset2uni[256]
Definition: nls_iso8859-9.c:16

◆ exit_nls_iso8859_9()

static void __exit exit_nls_iso8859_9 ( void  )
static

Definition at line 265 of file nls_iso8859-9.c.

266 {
268 }
int unregister_nls(struct nls_table *)
Definition: nls_base.c:185

◆ init_nls_iso8859_9()

static int __init init_nls_iso8859_9 ( void  )
static

Definition at line 260 of file nls_iso8859-9.c.

261 {
262  return register_nls(&table);
263 }
int register_nls(struct nls_table *)
Definition: nls_base.c:162

◆ uni2char()

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

Definition at line 226 of file nls_iso8859-9.c.

227 {
228  unsigned char *uni2charset;
229  unsigned char cl = uni & 0x00ff;
230  unsigned char ch = (uni & 0xff00) >> 8;
231 
232  if (boundlen <= 0)
233  return -ENAMETOOLONG;
234 
235  uni2charset = page_uni2charset[ch];
236  if (uni2charset && uni2charset[cl])
237  out[0] = uni2charset[cl];
238  else
239  return -EINVAL;
240  return 1;
241 }
Definition: arc.h:39
static FILE * out
Definition: regtests2xml.c:44
static unsigned char * page_uni2charset[256]

Variable Documentation

◆ charset2lower

unsigned char charset2lower[256]
static

Definition at line 154 of file nls_iso8859-9.c.

◆ charset2uni

wchar_t charset2uni[256]
static

Definition at line 16 of file nls_iso8859-9.c.

Referenced by char2uni().

◆ charset2upper

unsigned char charset2upper[256]
static

Definition at line 190 of file nls_iso8859-9.c.

◆ page00

unsigned char page00[256]
static

Definition at line 99 of file nls_iso8859-9.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, 0xd0, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xdd, 0xfd, 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, 0xde, 0xfe,
}

Definition at line 135 of file nls_iso8859-9.c.

◆ page_uni2charset

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

Definition at line 150 of file nls_iso8859-9.c.

Referenced by uni2char().

◆ table

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

Definition at line 251 of file nls_iso8859-9.c.