diff options
author | Roland McGrath <roland@gnu.org> | 1996-06-19 05:38:55 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-06-19 05:38:55 +0000 |
commit | 6990326c21e6d767e3531a00782af1e091eab4fe (patch) | |
tree | 152c349333df65328c835486fe719a4488856c90 /locale/programs | |
parent | bd1be8ec88e0e9b7c0dc8d4c0ebfea69a11290f7 (diff) | |
download | glibc-6990326c21e6d767e3531a00782af1e091eab4fe.zip glibc-6990326c21e6d767e3531a00782af1e091eab4fe.tar.gz glibc-6990326c21e6d767e3531a00782af1e091eab4fe.tar.bz2 |
Wed Jun 19 01:27:57 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* math/Makefile (distribute): Add ieee-math.c.
Wed Jun 19 03:24:58 1996 Ulrich Drepper <drepper@cygnus.com>
* locale/codeset_name.c: New file. Provide function for information
about currently used character set.
* locale/Makefile (routines): Add codeset_name.
* locale/langinfo.h (_NL_CTYPE_CODESET_NAME): Add new constant.
* locale/localeinfo.h: Change magic number because of incompatible
change.
* locale/C-ctype.c: Add initializer for new field `codeset_name'.
* locale/programs/ld-ctype.c: Implement handling of `codeset_name'.
* locale/programs/locfile.c: Don't depend in pre-2.0 Linux specific
name `MAX_IOVEC'. Instead use standard name `UIO_MAXIOV'.
* locale/setlocale.c (setlocale): Initialize local variables to
prevent warnings.
Diffstat (limited to 'locale/programs')
-rw-r--r-- | locale/programs/ld-ctype.c | 9 | ||||
-rw-r--r-- | locale/programs/locfile.c | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c index c4a6f7b..4c74549 100644 --- a/locale/programs/ld-ctype.c +++ b/locale/programs/ld-ctype.c @@ -109,6 +109,7 @@ struct locale_ctype_t u_int32_t *map_name_ptr; unsigned char *width; u_int32_t mb_cur_max; + const char *codeset_name; }; @@ -475,6 +476,9 @@ ctype_output (struct localedef_t *locale, struct charset_t *charset, CTYPE_DATA (_NL_CTYPE_MB_CUR_MAX, &ctype->mb_cur_max, sizeof (u_int32_t)); + CTYPE_DATA (_NL_CTYPE_CODESET_NAME, + ctype->codeset_name, strlen (ctype->codeset_name) + 1); + default: assert (! "unknown CTYPE element"); } @@ -1382,4 +1386,9 @@ Computing table size for character classes might take a while..."), character representation. We compute the number of bytes used for the UTF-8 encoded form. */ ctype->mb_cur_max = ((int []) { 2, 3, 5, 6 }) [charset->mb_cur_max - 1]; + + /* We need the name of the currently used 8-bit character set to + make correct conversion between this 8-bit representation and the + ISO 10646 character set used internally for wide characters. */ + ctype->codeset_name = charset->code_set_name; } diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c index 3bbe479..284c7ce 100644 --- a/locale/programs/locfile.c +++ b/locale/programs/locfile.c @@ -963,11 +963,7 @@ write_locale_data (const char *output_path, const char *category, limitation of the implementation. */ for (cnt = 0; cnt < n_elem; cnt += step) { - /* XXX Fixme: should be in libc header. */ -#ifndef MAX_IOVEC -# define MAX_IOVEC 8 -#endif - step = MIN (MAX_IOVEC, n_elem - cnt); + step = MIN (UIO_MAXIOV, n_elem - cnt); if (writev (fd, &vec[cnt], step) < 0) { |