patch-2.4.0-test5 linux/include/linux/nls.h
Next file: linux/include/linux/parport.h
Previous file: linux/include/linux/nfsd/stats.h
Back to the patch index
Back to the overall index
- Lines: 41
- Date:
Thu Jul 27 17:02:18 2000
- Orig file:
v2.4.0-test4/linux/include/linux/nls.h
- Orig date:
Tue Mar 14 19:10:40 2000
diff -u --recursive --new-file v2.4.0-test4/linux/include/linux/nls.h linux/include/linux/nls.h
@@ -1,20 +1,22 @@
#include <linux/init.h>
-struct nls_unicode {
- unsigned char uni1;
- unsigned char uni2;
-};
+/* unicode character */
+typedef __u16 wchar_t;
struct nls_table {
char *charset;
- unsigned char **page_uni2charset;
- struct nls_unicode *charset2uni;
+ int (*uni2char) (wchar_t uni, unsigned char *out, int boundlen);
+ int (*char2uni) (const unsigned char *rawstring, int boundlen,
+ wchar_t *uni);
unsigned char *charset2lower;
unsigned char *charset2upper;
struct module *owner;
struct nls_table *next;
};
+/* this value hold the maximum octet of charset */
+#define NLS_MAX_CHARSET_SIZE 3
+
/* nls.c */
extern int register_nls(struct nls_table *);
extern int unregister_nls(struct nls_table *);
@@ -22,7 +24,7 @@
extern void unload_nls(struct nls_table *);
extern struct nls_table *load_nls_default(void);
-extern int utf8_mbtowc(__u16 *, const __u8 *, int);
-extern int utf8_mbstowcs(__u16 *, const __u8 *, int);
-extern int utf8_wctomb(__u8 *, __u16, int);
-extern int utf8_wcstombs(__u8 *, const __u16 *, int);
+extern int utf8_mbtowc(wchar_t *, const __u8 *, int);
+extern int utf8_mbstowcs(wchar_t *, const __u8 *, int);
+extern int utf8_wctomb(__u8 *, wchar_t, int);
+extern int utf8_wcstombs(__u8 *, const wchar_t *, int);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)