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

Bug#36059: Forward: Bug#36059: libc6: towlower() does the same as towupper()



Hi Ulrich,

please apply this patch.  For details see the forwarded message below.

1999-04-14  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* wctype/wcfuncs.c (towlower): Use __ctype_tolower.
	Reported by Kalle Olavi Niemitalo <tosi@ees2.oulu.fi>

--- wctype/wcfuncs.c.~1~	Sun Jan 17 19:56:27 1999
+++ wctype/wcfuncs.c	Wed Apr 14 20:55:06 1999
@@ -76,7 +76,7 @@
     /* Character is not known.  Default action is to simply return it.  */
     return wc;
 
-  return (wint_t) __ctype_toupper[idx];
+  return (wint_t) __ctype_tolower[idx];
 }
 
 wint_t

--- Begin Message ---
Package: libc6
Version: 2.1.1-0.1

In glibc-2.1.1/wctype/wcfuncs.c, towlower() uses __ctype_toupper.
It should use __ctype_tolower.

-- Begin wcbug.c
#include <stdio.h>
#include <wctype.h>

int
main(void)
{
  /* parentheses around function names avoid macro versions */
  printf("towupper(L'X') == L'%lc'\n", (towupper)(L'X'));
  printf("towupper(L'x') == L'%lc'\n", (towupper)(L'x'));
  printf("towlower(L'X') == L'%lc'\n", (towlower)(L'X'));
  printf("towlower(L'x') == L'%lc'\n", (towlower)(L'x'));
  return 0;
}
-- End wcbug.c

-- Begin session
bash-2.02$ gcc -Wall wcbug.c -o wcbug
wcbug.c: In function `main':
wcbug.c:8: warning: long int format, int arg (arg 2)
wcbug.c:9: warning: long int format, int arg (arg 2)
wcbug.c:10: warning: long int format, int arg (arg 2)
wcbug.c:11: warning: long int format, int arg (arg 2)
bash-2.02$ ./wcbug
towupper(L'X') == L'X'
towupper(L'x') == L'X'
towlower(L'X') == L'X'
towlower(L'x') == L'X'
bash-2.02$ 
-- End session

-- System Information
Debian Release: potato
Kernel Version: Linux PC486 2.2.5 #1 ke maalis 31 11:09:56 EEST 1999 i486 unknown

Versions of the packages libc6 depends on:
ii  ldso            1.9.10-1.1     The Linux dynamic linker, library and utilit

Other related packages:
ii  gcc             2.91.63-1.1    The GNU (egcs) C compiler.


--  
To UNSUBSCRIBE, email to debian-glibc-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


--- End Message ---
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

Reply to: