* 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.
+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.
+
Tue Jun 18 17:56:44 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* Version 1.91 test release.
"print\0" "graph\0" "blank\0" "cntrl\0" "punct\0" "alnum\0" },
{ string: "tolower\0" "toupper\0" },
{ string: _nl_C_LC_CTYPE_width },
- { word: 2 }
+ { word: 2 },
+ { string: "ISO_646.IRV:1983" }
}
};
locfile-kw.gperf locfile-kw.h linereader.h \
locales.h locfile.h stringtrans.h weight.h charset.h
routines = setlocale findlocale loadlocale localeconv nl_langinfo \
- mb_cur_max
+ mb_cur_max codeset_name
categories = ctype messages monetary numeric time collate
aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name
others = localedef locale
--- /dev/null
+/* Internal function to return the name of the current codeset.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include <langinfo.h>
+#include <locale.h>
+#include <stdlib.h>
+#include "localeinfo.h"
+
+
+const char *
+__ctype_get_codeset_name (void)
+{
+ return _NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME);
+}
_NL_CTYPE_MAP_NAMES,
_NL_CTYPE_WIDTH,
_NL_CTYPE_MB_CUR_MAX,
+ _NL_CTYPE_CODESET_NAME,
_NL_NUM_LC_CTYPE,
/* LC_MONETARY category: formatting of monetary quantities.
#include "../intl/loadinfo.h" /* For loaded_l10nfile definition. */
/* Magic number at the beginning of a locale data file for CATEGORY. */
-#define LIMAGIC(category) (0x960528de ^ (category))
+#define LIMAGIC(category) (0x960617de ^ (category))
/* Two special weight constants for the collation data. */
#define FORWARD_CHAR ((wchar_t) 0xfffffffd)
u_int32_t *map_name_ptr;
unsigned char *width;
u_int32_t mb_cur_max;
+ const char *codeset_name;
};
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");
}
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;
}
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)
{
}
else
{
- const struct locale_data *newdata;
- char *newname;
+ const struct locale_data *newdata = NULL;
+ char *newname = NULL;
if (_nl_current[category] != NULL)
{
install-lib += libieee.a
non-lib.a += libieee.a
extra-objs += libieee.a ieee-math.o
+distribute += ieee-math.c
include ../Rules