* wcsmbs/wcswidth.c (wcswidth): Don't forget to decrement counter n.
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.
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>
END CHARMAP
WIDTH
-<NU>...<US> 0
<SP>...<'?> 1
-<DT>...<AC> 0
<NS>...<y:> 1
END WIDTH
-/* 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.
{
int result = 0;
- while (n > 0 && *s != L'\0')
+ while (n-- > 0 && *s != L'\0')
{
int now = internal_wcwidth (*s);
if (now == -1)
/* 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.
Boston, MA 02111-1307, USA. */
#include <wchar.h>
+#include <wctype.h>
#include "../wctype/cname-lookup.h"
/* Array containing width information. */
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];