This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Various] Digested Articles



Looking at the appended bug report and the code in glibc 2.1 and 2.2
I'm a bit confused.

The interesting code is locale/C-ctype.c.
cvs log locale/C-ctype.c reveals:

revision 1.23
date: 1999/08/31 06:12:12;  author: drepper;  state: Exp;  lines: +198 -93
Update for locale rewrite.
----------------------------
revision 1.22
date: 1998/10/19 08:01:12;  author: drepper;  state: Exp;  lines: +88 -88
(_nl_C_LC_CTYPE_class): Clear ISCNTRL bit for character >= 0x80.
(_nl_C_LC_CTYPE_class32): Likewise.

Here's are two  ChangeLog entries:
1999-08-30  Ulrich Drepper  <drepper@cygnus.com>

        * locale/C-ctype.c: Update for locale rewrite.

1998-10-19  Ulrich Drepper  <drepper@cygnus.com>

        * locale/C-ctype.c (_nl_C_LC_CTYPE_class): Clear ISCNTRL bit for
        character >= 0x80.
        (_nl_C_LC_CTYPE_class32): Likewise.
        Reported by HJ Lu.


A diff between these versions shows that the ISCNTRL bit got
introduced again in version 1.23, reverting the change to version
1.22.

The question is now which branch handles the iscntrl bit correctly.
One of the branches is definitly broken (according to the bug report
it's the 2.1er branch which includes HJ's patch).

Could somebody confirm which of the branches is correct and why - and
fix the wrong branch?

Thanks,
Andreas




Topics:
   [John Summerfield <summer@OS2.ami.com.au>] libc/1441: Incorrect result from iscntrl()
   libc/1441: Incorrect result from iscntrl()


----------------------------------------------------------------------

Date: 10 Nov 1999 10:42:04 +0100
From: Andreas Jaeger <aj@arthur.rhein-neckar.de>
To: Ulrich Drepper <drepper@cygnus.com>
Subject: [John Summerfield <summer@OS2.ami.com.au>] libc/1441: Incorrect result from iscntrl()
Message-ID: <u8vh7aof83.fsf@gromit.rhein-neckar.de>
Content-Type: multipart/mixed; boundary="=-=-="


- -=-=-=


Hi Uli,

kannst Du diesen alten Patch bitte nach 2.1.3 tun:
1998-10-19  Ulrich Drepper  <drepper@cygnus.com>

	* locale/C-ctype.c (_nl_C_LC_CTYPE_class): Clear ISCNTRL bit for
	character >= 0x80.
	(_nl_C_LC_CTYPE_class32): Likewise.
	Reported by HJ Lu.

Damit sollte der Bug gefixt sein.

Danke,
Andreas


- -=-=-=
Content-Type: message/rfc822
Content-Disposition: inline

X-From-Line: aj  Tue Nov  9 16:28:15 1999
Return-path: <jaeger@mescaline.gnu.org>
Envelope-to: aj@localhost
Delivery-date: Tue, 09 Nov 1999 16:28:15 +0100
Received: from [127.0.0.1] (helo=mail.kdt.de ident=root)
	by arthur.rhein-neckar.de with esmtp (Exim 3.02 #1)
	id 11lDBv-0003Vd-01
	for aj@localhost; Tue, 09 Nov 1999 16:28:15 +0100
X-Envelope-To: <jaeger@wtal.de>
X-Envelope-From: jaeger@mescaline.gnu.org
Received: from mescaline.gnu.org ([158.121.106.21])
	by mail.kdt.de (8.8.8/8.8.8) with ESMTP id QAA19060
	for <jaeger@wtal.de>; Tue, 9 Nov 1999 16:11:16 +0100
Received: (from gnats@localhost)
	by mescaline.gnu.org (8.9.1a/8.9.1) id KAA12553;
	Tue, 9 Nov 1999 10:10:03 -0500
Resent-Date: Tue, 9 Nov 1999 10:10:03 -0500
Resent-Message-Id: <199911091510.KAA12553@mescaline.gnu.org>
Resent-From: gnats@gnu.org (GNATS Management)
Resent-To: libc-gnats@gnu.org
Resent-Cc: gnats-admin@gnu.org
Resent-Reply-To: bugs@gnu.org, John Summerfield <summer@OS2.ami.com.au>
Received: from emu.os2.ami.com.au (IDENT:root@ppp7.ami.com.au [203.55.31.103])
	by mescaline.gnu.org (8.9.1a/8.9.1) with ESMTP id KAA12263
	for <bugs@gnu.org>; Tue, 9 Nov 1999 10:02:24 -0500
Received: from possum.os2.ami.com.au (IDENT:root@possum.os2.ami.com.au [192.168.1.6])
	by emu.os2.ami.com.au (8.9.0/8.9.0) with ESMTP id XAA10751
	for <bugs@gnu.org>; Tue, 9 Nov 1999 23:01:55 +0800
Received: (from summer@localhost)
	by possum.os2.ami.com.au (8.9.3/8.9.3) id WAA26154;
	Tue, 9 Nov 1999 22:14:47 +0800
X-Gnus-Mail-Source: directory:/mail-aj/Mail/procmail-work/
Message-Id: <199911091414.WAA26154@possum.os2.ami.com.au>
Date: Tue, 9 Nov 1999 22:14:47 +0800
From: John Summerfield <summer@OS2.ami.com.au>
To: bugs@gnu.org
Subject: libc/1441: Incorrect result from iscntrl()
X-UIDL: NU8e9*M8e9!Td!!%<<!!
Status: U
Lines: 63
Xref: gromit.rhein-neckar.de mail.gnats-libc-bugs:4152


>Number:         1441
>Category:       libc
>Synopsis:       iscntrl() incorrectly describes some control chars as not
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    libc-gnats
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Tue Nov 09 10:10:01 EST 1999
>Last-Modified:
>Originator:     
>Organization:
>
>Release:        libc-2.1.1
>Environment:
	
Host type: i386-redhat-linux-gnu
System: Linux possum 2.2.12 #3 Fri Oct 8 10:55:13 WST 1999 i686 unknown
Architecture: i686

Addons: crypt glibc-compat linuxthreads
Build CFLAGS: -g -O3
Build CC: egcs
Compiler version: egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
Kernel headers: 2.2.12
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio

>Description:
	iscntrl() does not identify characters in the rang 0x80-0x8f (and maby more) as control characters. The result is that gnome-terminal & xterm respond to shift-in and shift-out and other control characters with the high bit set, producing an unreadable display or other undesirable results.
>How-To-Repeat:

In a gnome-terminal or xterm run this program:

#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[], char *envp[])
   {
      int i;
      for (i=0;i<=255;i++)
         {
            if (iscntrl(i))
               printf("%02x %c is a control char \n",i,i);
            else
               printf("%02x %c is not a control char \n",i,i);
         };
   }

	
>Fix:
>Audit-Trail:
>Unformatted:


- -=-=-=


- - 
 Andreas Jaeger   
  SuSE Labs aj@suse.de	
   private aj@arthur.rhein-neckar.de

- -=-=-=--

------------------------------

Date: Tue, 9 Nov 1999 22:14:47 +0800
From: John Summerfield <summer@OS2.ami.com.au>
To: bugs@gnu.org
Subject: libc/1441: Incorrect result from iscntrl()
Message-Id: <199911091414.WAA26154@possum.os2.ami.com.au>


>Number:         1441
>Category:       libc
>Synopsis:       iscntrl() incorrectly describes some control chars as not
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    libc-gnats
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Tue Nov 09 10:10:01 EST 1999
>Last-Modified:
>Originator:     
>Organization:
>
>Release:        libc-2.1.1
>Environment:
	
Host type: i386-redhat-linux-gnu
System: Linux possum 2.2.12 #3 Fri Oct 8 10:55:13 WST 1999 i686 unknown
Architecture: i686

Addons: crypt glibc-compat linuxthreads
Build CFLAGS: -g -O3
Build CC: egcs
Compiler version: egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
Kernel headers: 2.2.12
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio

>Description:
	iscntrl() does not identify characters in the rang 0x80-0x8f (and maby more) as control characters. The result is that gnome-terminal & xterm respond to shift-in and shift-out and other control characters with the high bit set, producing an unreadable display or other undesirable results.
>How-To-Repeat:

In a gnome-terminal or xterm run this program:

#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[], char *envp[])
   {
      int i;
      for (i=0;i<=255;i++)
         {
            if (iscntrl(i))
               printf("%02x %c is a control char \n",i,i);
            else
               printf("%02x %c is not a control char \n",i,i);
         };
   }

	
>Fix:
>Audit-Trail:
>Unformatted:


------------------------------

End of forward4yB7do Digest
***************************



-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]