ReactOS 0.4.16-dev-297-gc569aee
nls_cp775.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_cp775.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_cp775 (void)
 
static void __exit exit_nls_cp775 (void)
 

Variables

static wchar_t charset2uni [256]
 
static unsigned char page00 [256]
 
static unsigned char page01 [256]
 
static unsigned char page20 [256]
 
static unsigned char page22 [256]
 
static unsigned char page25 [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 290 of file nls_cp775.c.

291{
292 *uni = charset2uni[*rawstring];
293 if (*uni == 0x0000)
294 return -EINVAL;
295 return 1;
296}
#define EINVAL
Definition: acclib.h:90
static wchar_t charset2uni[256]
Definition: nls_cp775.c:16

◆ exit_nls_cp775()

static void __exit exit_nls_cp775 ( void  )
static

Definition at line 313 of file nls_cp775.c.

314{
316}
int unregister_nls(struct nls_table *)
Definition: nls_base.c:185

Referenced by Ext2UnloadAllNls().

◆ init_nls_cp775()

static int __init init_nls_cp775 ( void  )
static

Definition at line 308 of file nls_cp775.c.

309{
310 return register_nls(&table);
311}
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 273 of file nls_cp775.c.

274{
275 unsigned char *uni2charset;
276 unsigned char cl = uni & 0x00ff;
277 unsigned char ch = (uni & 0xff00) >> 8;
278
279 if (boundlen <= 0)
280 return -ENAMETOOLONG;
281
282 uni2charset = page_uni2charset[ch];
283 if (uni2charset && uni2charset[cl])
284 out[0] = uni2charset[cl];
285 else
286 return -EINVAL;
287 return 1;
288}
static unsigned char * page_uni2charset[256]
Definition: nls_cp775.c:193
static FILE * out
Definition: regtests2xml.c:44
#define ENAMETOOLONG
Definition: errno.h:55

Variable Documentation

◆ charset2lower

unsigned char charset2lower[256]
static

Definition at line 201 of file nls_cp775.c.

◆ charset2uni

wchar_t charset2uni[256]
static

Definition at line 16 of file nls_cp775.c.

Referenced by char2uni().

◆ charset2upper

unsigned char charset2upper[256]
static

Definition at line 237 of file nls_cp775.c.

◆ page00

unsigned char page00[256]
static

Definition at line 99 of file nls_cp775.c.

◆ page01

unsigned char page01[256]
static
Initial value:
= {
0xa0, 0x83, 0x00, 0x00, 0xb5, 0xd0, 0x80, 0x87,
0x00, 0x00, 0x00, 0x00, 0xb6, 0xd1, 0x00, 0x00,
0x00, 0x00, 0xed, 0x89, 0x00, 0x00, 0xb8, 0xd3,
0xb7, 0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x95, 0x85, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xa1, 0x8c, 0x00, 0x00, 0xbd, 0xd4,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0xe9,
0x00, 0x00, 0x00, 0xea, 0xeb, 0x00, 0x00, 0x00,
0x00, 0xad, 0x88, 0xe3, 0xe7, 0xee, 0xec, 0x00,
0x00, 0x00, 0x00, 0x00, 0xe2, 0x93, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8b,
0x00, 0x00, 0x97, 0x98, 0x00, 0x00, 0x00, 0x00,
0xbe, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xc7, 0xd7, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xc6, 0xd6, 0x00, 0x00, 0x00, 0x00,
0x00, 0x8d, 0xa5, 0xa3, 0xa4, 0xcf, 0xd8, 0x00,
}

Definition at line 135 of file nls_cp775.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, 0xef, 0x00, 0x00, 0xf2, 0xa6, 0xf7, 0x00,
}

Definition at line 154 of file nls_cp775.c.

◆ page22

unsigned char page22[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, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}

Definition at line 161 of file nls_cp775.c.

◆ page25

unsigned char page25[256]
static
Initial value:
= {
0xc4, 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00,
0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
0xd9, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xcd, 0xba, 0x00, 0x00, 0xc9, 0x00, 0x00, 0xbb,
0x00, 0x00, 0xc8, 0x00, 0x00, 0xbc, 0x00, 0x00,
0xcc, 0x00, 0x00, 0xb9, 0x00, 0x00, 0xcb, 0x00,
0x00, 0xca, 0x00, 0x00, 0xce, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xdf, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00,
0xdb, 0x00, 0x00, 0x00, 0xdd, 0x00, 0x00, 0x00,
0xde, 0xb0, 0xb1, 0xb2, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}

Definition at line 168 of file nls_cp775.c.

◆ page_uni2charset

unsigned char* page_uni2charset[256]
static
Initial value:
= {
}
#define NULL
Definition: types.h:112
static unsigned char page01[256]
Definition: nls_cp775.c:135
static unsigned char page22[256]
Definition: nls_cp775.c:161
static unsigned char page20[256]
Definition: nls_cp775.c:154
static unsigned char page25[256]
Definition: nls_cp775.c:168
static unsigned char page00[256]
Definition: nls_cp775.c:99

Definition at line 193 of file nls_cp775.c.

Referenced by uni2char().

◆ table

Initial value:
= {
"cp775",
0,
}
#define THIS_MODULE
Definition: module.h:269
static int char2uni(const unsigned char *rawstring, int boundlen, wchar_t *uni)
Definition: nls_cp775.c:290
static int uni2char(wchar_t uni, unsigned char *out, int boundlen)
Definition: nls_cp775.c:273
static unsigned char charset2lower[256]
Definition: nls_cp775.c:201
static unsigned char charset2upper[256]
Definition: nls_cp775.c:237

Definition at line 298 of file nls_cp775.c.