Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/lib/libc/locale Pull up revision 1.17 (requested by jdo...



details:   https://anonhg.NetBSD.org/src/rev/123ade1bed80
branches:  netbsd-1-4
changeset: 470332:123ade1bed80
user:      he <he%NetBSD.org@localhost>
date:      Tue Feb 08 22:52:43 2000 +0000

description:
Pull up revision 1.17 (requested by jdolecek):
  When setlocale() is called with LC_ALL, try to initialize every
  locale category even if the initialization for some of them fails.
  Fixes problem where e.g. LC_CTYPE category won't be initialized
  if the locale doesn't implement the LC_COLLATE category.

diffstat:

 lib/libc/locale/setlocale.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 52441ca1b2db -r 123ade1bed80 lib/libc/locale/setlocale.c
--- a/lib/libc/locale/setlocale.c       Tue Feb 08 22:48:59 2000 +0000
+++ b/lib/libc/locale/setlocale.c       Tue Feb 08 22:52:43 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: setlocale.c,v 1.16 1998/11/13 15:49:04 christos Exp $  */
+/*     $NetBSD: setlocale.c,v 1.16.2.1 2000/02/08 22:52:43 he Exp $    */
 
 /*
  * Copyright (c) 1991, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)setlocale.c        8.1 (Berkeley) 7/4/93";
 #else
-__RCSID("$NetBSD: setlocale.c,v 1.16 1998/11/13 15:49:04 christos Exp $");
+__RCSID("$NetBSD: setlocale.c,v 1.16.2.1 2000/02/08 22:52:43 he Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -183,8 +183,7 @@
                return (loadlocale(category));
 
        for (i = 1; i < _LC_LAST; ++i)
-               if (loadlocale(i) == NULL)
-                       return (NULL);
+               (void) loadlocale(i);
 
        return (currentlocale());
 }



Home | Main Index | Thread Index | Old Index