]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 18 Nov 1999 02:59:57 +0000 (02:59 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 18 Nov 1999 02:59:57 +0000 (02:59 +0000)
* wcsmbs/wcswidth.c (wcswidth): Don't forget to decrement counter n.

ChangeLog
localedata/ChangeLog
localedata/charmaps/ISO-8859-1
wcsmbs/wcswidth.c
wcsmbs/wcwidth.h

index 5ecb2e18e7b6bf3075211ce1b78663114f3ecbd3..bf77e1257702fb5a0dea7714732a10ff62860504 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 1999-11-17  Ulrich Drepper  <drepper@cygnus.com>
 
+       * wcsmbs/wcswidth.c (wcswidth): Don't forget to decrement counter n.
+
        * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Remove greg_t,
        gregset_t, fpregset_t, and NGREG definitions.
 
index f7fcf3e5fcc97d1e18f764b6803406b637d417cb..811d9d19f4ed9af854be2234f6825d6ba5c60676 100644 (file)
@@ -1,5 +1,8 @@
 1999-11-17  Ulrich Drepper  <drepper@cygnus.com>
 
+       * charmaps/ISO-8859-1: Don't define values for non-printable
+       characters.
+
        * charmaps/ISO-8859-1: Add width information.
 
 1999-11-12  Ulrich Drepper  <drepper@cygnus.com>
index 0efd36b409d87739a31981f57afa22e7fe3ff4d1..5d28196fc1483b5e7483c93c9d6f7f8b833d182a 100644 (file)
@@ -355,8 +355,6 @@ CHARMAP
 END CHARMAP
 
 WIDTH
-<NU>...<US>            0
 <SP>...<'?>            1
-<DT>...<AC>            0
 <NS>...<y:>            1
 END WIDTH
index 2828b800da425f4ac4d7d2ad95fa6dedd9e7c47a..78fc4272760c5a3d2bdd7f912210e719af39519b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
 
@@ -26,7 +26,7 @@ wcswidth (const wchar_t *s, size_t n)
 {
   int result = 0;
 
-  while (n > 0 && *s != L'\0')
+  while (n-- > 0 && *s != L'\0')
     {
       int now = internal_wcwidth (*s);
       if (now == -1)
index 4c561f94d771323d60bc24b6c0cc11453918df99..b8627c54f02cc9c9da1dda09fd58feae834d32a6 100644 (file)
@@ -1,5 +1,5 @@
 /* Internal header containing implementation of wcwidth() function.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
 
@@ -19,6 +19,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <wchar.h>
+#include <wctype.h>
 #include "../wctype/cname-lookup.h"
 
 /* Array containing width information.  */
@@ -33,7 +34,7 @@ internal_wcwidth (wint_t ch)
     return 0;
 
   idx = cname_lookup (ch);
-  if (idx == ~((size_t) 0))
+  if (idx == ~((size_t) 0) || (__ctype32_b[idx] & _ISwprint) == 0)
     return -1;
 
   return (int) __ctype_width[idx];