From owner-freebsd-bugs Mon Jul 14 06:51:45 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id GAA22211 for bugs-outgoing; Mon, 14 Jul 1997 06:51:45 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id GAA22206 for ; Mon, 14 Jul 1997 06:51:39 -0700 (PDT) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id PAA22813; Mon, 14 Jul 1997 15:51:02 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.8.5/8.8.5) id PAA01208; Mon, 14 Jul 1997 15:28:34 +0200 (MET DST) Message-ID: <19970714152834.RR49021@uriah.heep.sax.de> Date: Mon, 14 Jul 1997 15:28:34 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: r.carey@dcs.napier.ac.uk (Robin Carey) Cc: hoek@hwcn.org (Tim Vanderhoek), freebsd-bugs@FreeBSD.ORG Subject: Re: ispunct(3) [was: FreeBSD-2.1.1] References: <19970713193138.DB37367@uriah.heep.sax.de> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: ; from Robin Carey on Jul 14, 1997 14:03:44 +0100 Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As Robin Carey wrote: > And my results were different; ispunct(3) was returning TRUE for chars > above 127 ..... Right. As the standard says: printing character, except letter or digit or space. > Oh ... the manual page doesn't mention anything about characters other > than ASCII. Doesn't that mean ispunct(3) is not "ANSI C" standard then ? AFAIK, ANSI C doesn't mention anything beyond ASCII, so the behaviour is simply undefined. Extending the default behaviour to ISO Latin-1 seems to be a reasonable interpretation of `undefined'. If you restrict the domain of the isfoo() functions to ASCII, you are not bitten by this. If you don't, you have another problem anyway (since you're relying on undefined behaviour). -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)