diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-11-16 16:48:16 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-11-16 16:48:16 +0000 |
commit | 04854a14145c2dd091ff3572668e4741d3e206f4 (patch) | |
tree | 3fcf73b6c1200bb6b2fc17b015a32d513d36e25a | |
parent | 90a6dd053bc78263832427a00d5964e55aaae91e (diff) |
CODESET support. okay millert@, otto@
(not really useful for now, it mostly helps some programs which want
to use it, it will become useful when we have full 16 bits locale).
-rw-r--r-- | include/langinfo.h | 4 | ||||
-rw-r--r-- | lib/libc/locale/nl_langinfo.c | 9 | ||||
-rw-r--r-- | lib/libc/shlib_version | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/include/langinfo.h b/include/langinfo.h index b3aafd04500..22edfa8c3bc 100644 --- a/include/langinfo.h +++ b/include/langinfo.h @@ -1,4 +1,4 @@ -/* $OpenBSD: langinfo.h,v 1.4 2002/02/16 21:27:17 millert Exp $ */ +/* $OpenBSD: langinfo.h,v 1.5 2005/11/16 16:48:14 espie Exp $ */ /* $NetBSD: langinfo.h,v 1.3 1995/04/28 23:30:54 jtc Exp $ */ /* @@ -69,6 +69,8 @@ #define NOEXPR 49 /* Negative response for yes/no queries */ #define CRNCYSTR 50 /* Currency symbol */ +#define CODESET 51 /* Codeset name */ + __BEGIN_DECLS char *nl_langinfo(nl_item); __END_DECLS diff --git a/lib/libc/locale/nl_langinfo.c b/lib/libc/locale/nl_langinfo.c index 176d5588351..eee8d08c9d7 100644 --- a/lib/libc/locale/nl_langinfo.c +++ b/lib/libc/locale/nl_langinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nl_langinfo.c,v 1.5 2005/08/08 08:05:35 espie Exp $ */ +/* $OpenBSD: nl_langinfo.c,v 1.6 2005/11/16 16:48:15 espie Exp $ */ /* * Written by J.T. Conklin <jtc@netbsd.org>. * Public domain. @@ -8,6 +8,8 @@ #include <locale.h> #include <nl_types.h> #include <langinfo.h> +#include "rune.h" +#include "runetype.h" char * nl_langinfo(nl_item item) @@ -98,6 +100,11 @@ nl_langinfo(nl_item item) case CRNCYSTR: /* XXX */ s = ""; break; + case CODESET: + s = _CurrentRuneLocale->rl_codeset; + if (!s) + s = ""; + break; default: s = ""; break; diff --git a/lib/libc/shlib_version b/lib/libc/shlib_version index 5a05179b472..281ecb0047b 100644 --- a/lib/libc/shlib_version +++ b/lib/libc/shlib_version @@ -1,4 +1,4 @@ major=38 -minor=3 +minor=4 # note: If changes were made to include/thread_private.h or if system # calls were added/changed then libpthread must also be updated. |