From 5bef282098d6c920c12e46dea5bac099e5cb3abf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 24 Jul 2000 21:03:16 +0000 Subject: Update. 2000-07-24 Jakub Jelinek * libio/wfiledoalloc.c (_IO_wfile_doallocate): Measure size in wide characters, not bytes. * libio/tst_putwc.c (do_test): Add test for writing lots of data into file. 2000-07-22 Bruno Haible * locale/nl_langinfo.c (nl_langinfo): Accept items belonging to the new categories LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION. * locale/xlocale.h (struct __locale_struct): Increase size of __locales array. * locale/duplocale.c (__duplocale): Copy newly added categories as well. * locale/freelocale.c (__freelocale): Free newly added categories. * locale/newlocale.c (__newlocale): Fix typo in sanity check. If a base is given, use it, don't simply return it. 2000-07-22 Bruno Haible * crypt/md5-crypt.c (__md5_crypt_r): Avoid gcc warnings: Use pointer variables, copied_key and copied_salt, instead of boolean variables. --- locale/duplocale.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'locale/duplocale.c') diff --git a/locale/duplocale.c b/locale/duplocale.c index 2dcc0f5b02..4b3bc89945 100644 --- a/locale/duplocale.c +++ b/locale/duplocale.c @@ -1,5 +1,5 @@ /* Duplicate handle for selection of locales. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -42,12 +42,13 @@ __duplocale (__locale_t dataset) if (result != NULL) { int cnt; - for (cnt = 0; cnt < LC_ALL; ++cnt) - { - result->__locales[cnt] = dataset->__locales[cnt]; - if (result->__locales[cnt]->usage_count < MAX_USAGE_COUNT) - ++result->__locales[cnt]->usage_count; - } + for (cnt = 0; cnt < __LC_LAST; ++cnt) + if (cnt != LC_ALL) + { + result->__locales[cnt] = dataset->__locales[cnt]; + if (result->__locales[cnt]->usage_count < MAX_USAGE_COUNT) + ++result->__locales[cnt]->usage_count; + } } /* It's done. */ -- cgit v1.2.3