ReactOS  0.4.14-dev-297-g23e575c
nls_sjis.c
Go to the documentation of this file.
1 /*
2  * linux/fs/nls_sjis.c
3  */
4 
5 #include <linux/module.h>
6 #include <linux/kernel.h>
7 #include <linux/string.h>
8 #include <linux/nls.h>
9 #include <linux/errno.h>
10 
11 static struct nls_table *p_nls;
12 
13 static struct nls_table table = {
14  "sjis",
15  NULL,
16  NULL,
17  NULL,
18  NULL,
20 };
21 
22 static int __init init_nls_sjis(void)
23 {
24  p_nls = load_nls("cp932");
25 
26  if (p_nls) {
27  table.uni2char = p_nls->uni2char;
28  table.char2uni = p_nls->char2uni;
29  table.charset2upper = p_nls->charset2upper;
30  table.charset2lower = p_nls->charset2lower;
31  return register_nls(&table);
32  }
33 
34  return -EINVAL;
35 }
36 
37 static void __exit exit_nls_sjis(void)
38 {
41 }
42 
45 
46 /*
47  * Overrides for Emacs so that we follow Linus's tabbing style.
48  * Emacs will notice this stuff at the end of the file and automatically
49  * adjust the settings for this buffer only. This must remain at the end
50  * of the file.
51  *
52 ---------------------------------------------------------------------------
53  * Local variables:
54  * c-indent-level: 8
55  * c-brace-imaginary-offset: 0
56  * c-brace-offset: -8
57  * c-argdecl-indent: 8
58  * c-label-offset: -8
59  * c-continued-statement-offset: 8
60  * c-continued-brace-offset: 0
61  * End:
62  */
int unregister_nls(struct nls_table *)
Definition: nls_base.c:185
static int __init init_nls_sjis(void)
Definition: nls_sjis.c:22
static void __exit exit_nls_sjis(void)
Definition: nls_sjis.c:37
Definition: arc.h:39
#define THIS_MODULE
Definition: module.h:267
void unload_nls(struct nls_table *)
Definition: nls_base.c:240
smooth NULL
Definition: ftsmooth.c:416
module_exit(journal_exit)
static struct nls_table * p_nls
Definition: nls_sjis.c:11
int register_nls(struct nls_table *)
Definition: nls_base.c:162
#define __init
Definition: compat.h:3
#define __exit
Definition: module.h:265
module_init(journal_init)
struct nls_table * load_nls(char *)
Definition: nls_base.c:218