ReactOS  0.4.13-dev-1089-g05f0b08
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 }
Definition: arc.h:39
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(), and RfsdUnloadAllNls().

◆ 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(), and RfsdLoadAllNls().

◆ 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 }
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 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:
= {
}
static unsigned char page00[256]
smooth NULL
Definition: ftsmooth.c:416
static unsigned char page01[256]
static unsigned char page1e[256]

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

Referenced by uni2char().

◆ table

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

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