ReactOS 0.4.15-dev-7906-g1b85a5f
nls_iso8859-14.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-14.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_14 (void)
 
static void __exit exit_nls_iso8859_14 (void)
 

Variables

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

313{
314 *uni = charset2uni[*rawstring];
315 if (*uni == 0x0000)
316 return -EINVAL;
317 return 1;
318}
#define EINVAL
Definition: acclib.h:90
static wchar_t charset2uni[256]

◆ exit_nls_iso8859_14()

static void __exit exit_nls_iso8859_14 ( void  )
static

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

336{
338}
int unregister_nls(struct nls_table *)
Definition: nls_base.c:185

Referenced by Ext2UnloadAllNls().

◆ init_nls_iso8859_14()

static int __init init_nls_iso8859_14 ( void  )
static

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

331{
332 return register_nls(&table);
333}
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 295 of file nls_iso8859-14.c.

296{
297 unsigned char *uni2charset;
298 unsigned char cl = uni & 0x00ff;
299 unsigned char ch = (uni & 0xff00) >> 8;
300
301 if (boundlen <= 0)
302 return -ENAMETOOLONG;
303
304 uni2charset = page_uni2charset[ch];
305 if (uni2charset && uni2charset[cl])
306 out[0] = uni2charset[cl];
307 else
308 return -EINVAL;
309 return 1;
310}
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 223 of file nls_iso8859-14.c.

◆ charset2uni

wchar_t charset2uni[256]
static

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

Referenced by char2uni().

◆ charset2upper

unsigned char charset2upper[256]
static

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

◆ page00

unsigned char page00[256]
static

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

◆ page01

unsigned char page01[256]
static

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

◆ page1e

unsigned char page1e[256]
static

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

◆ page_uni2charset

unsigned char* page_uni2charset[256]
static
Initial value:
= {
}
#define NULL
Definition: types.h:112
static unsigned char page1e[256]
static unsigned char page01[256]
static unsigned char page00[256]

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

Referenced by uni2char().

◆ table

Initial value:
= {
"iso8859-14",
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 320 of file nls_iso8859-14.c.