ReactOS 0.4.16-dev-297-gc569aee
nls_iso8859-3.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-3.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_3 (void)
 
static void __exit exit_nls_iso8859_3 (void)
 

Variables

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

280{
281 *uni = charset2uni[*rawstring];
282 if (*uni == 0x0000)
283 return -EINVAL;
284 return 1;
285}
#define EINVAL
Definition: acclib.h:90
static wchar_t charset2uni[256]
Definition: nls_iso8859-3.c:16

◆ exit_nls_iso8859_3()

static void __exit exit_nls_iso8859_3 ( void  )
static

Definition at line 302 of file nls_iso8859-3.c.

303{
305}
int unregister_nls(struct nls_table *)
Definition: nls_base.c:185

Referenced by Ext2UnloadAllNls().

◆ init_nls_iso8859_3()

static int __init init_nls_iso8859_3 ( void  )
static

Definition at line 297 of file nls_iso8859-3.c.

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

Referenced by Ext2LoadAllNls().

◆ uni2char()

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

Definition at line 262 of file nls_iso8859-3.c.

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

Variable Documentation

◆ charset2lower

unsigned char charset2lower[256]
static

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

◆ charset2uni

wchar_t charset2uni[256]
static

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

Referenced by char2uni().

◆ charset2upper

unsigned char charset2upper[256]
static

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

◆ page00

unsigned char page00[256]
static

Definition at line 99 of file nls_iso8859-3.c.

◆ page01

unsigned char page01[256]
static
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc6, 0xe6, 0xc5, 0xe5, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xd8, 0xf8, 0xab, 0xbb,
0xd5, 0xf5, 0x00, 0x00, 0xa6, 0xb6, 0xa1, 0xb1,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xa9, 0xb9, 0x00, 0x00, 0xac, 0xbc, 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, 0xaa, 0xba,
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, 0xaf, 0xbf, 0x00, 0x00, 0x00,
}

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

◆ page02

unsigned char page02[256]
static

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

◆ page_uni2charset

unsigned char* page_uni2charset[256]
static
Initial value:
= {
}
#define NULL
Definition: types.h:112
static unsigned char page01[256]
static unsigned char page02[256]
static unsigned char page00[256]
Definition: nls_iso8859-3.c:99

Definition at line 186 of file nls_iso8859-3.c.

Referenced by uni2char().

◆ table

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

Definition at line 287 of file nls_iso8859-3.c.