diff options
author | delphij <delphij@FreeBSD.org> | 2009-06-22 17:09:46 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-06-22 17:09:46 +0000 |
commit | 3216be3a5a453bb6570d9a31504f54f067832fad (patch) | |
tree | ff466c24979a5205b616c97267983e5b0216ed4c /sys/libkern/iconv.c | |
parent | 903095e7105f537fbdcb5a7a542bd833c6b35b3b (diff) | |
download | FreeBSD-src-3216be3a5a453bb6570d9a31504f54f067832fad.zip FreeBSD-src-3216be3a5a453bb6570d9a31504f54f067832fad.tar.gz |
Split tolower/toupper code from usual xlat16 kiconv table, and make it
possible to do tolower/toupper independently without code conversion.
Submitted by: imura (but bugs are mine)
Obtained from: http://people.freebsd.org/~imura/kiconv/
(1_kiconv_wctype_kern.diff, 1_kiconv_wctype_user.diff)
Diffstat (limited to 'sys/libkern/iconv.c')
-rw-r--r-- | sys/libkern/iconv.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/libkern/iconv.c b/sys/libkern/iconv.c index 289c400..7e0d2c0 100644 --- a/sys/libkern/iconv.c +++ b/sys/libkern/iconv.c @@ -307,6 +307,18 @@ iconv_convchr_case(void *handle, const char **inbuf, return ICONV_CONVERTER_CONV(handle, inbuf, inbytesleft, outbuf, outbytesleft, 1, casetype); } +int +towlower(int c, void *handle) +{ + return ICONV_CONVERTER_TOLOWER(handle, c); +} + +int +towupper(int c, void *handle) +{ + return ICONV_CONVERTER_TOUPPER(handle, c); +} + /* * Give a list of loaded converters. Each name terminated with 0. * An empty string terminates the list. @@ -442,6 +454,12 @@ iconv_converter_donestub(struct iconv_converter_class *dp) } int +iconv_converter_tolowerstub(int c, void *handle) +{ + return (c); +} + +int iconv_converter_handler(module_t mod, int type, void *data) { struct iconv_converter_class *dcp = data; |