Article View: pl.comp.lang.c
Article #294Re: Uwaga: blad w funkcji isdigit .
From: Qrczak
Date: Sat, 15 Nov 1997 13:14
Date: Sat, 15 Nov 1997 13:14
47 lines
2310 bytes
2310 bytes
On Thu, 13 Nov 1997, Karol Wojtiuk wrote:
> funkcja isdigit jest zadeklarowana następująco:
[...]
W Linuxowym GCC:
ISALPHA(3) Linux Programmer's Manual ISALPHA(3)
NAME
isalnum, isalpha, isascii, isblank, iscntrl, isdigit,
isgraph, islower, isprint, ispunct, isspace, isupper,
isxdigit - character classification routines
[...]
DESCRIPTION
These functions check whether c, which must have the value
of an unsigned char or EOF, falls into a certain character
class according to the current locale.
[...]
CONFORMING TO
ANSI - C, BSD 4.3. isascii() is a BSD extension and is
also an SVID extension. isblank() is a GNU extension.
Tak więc tutaj jest jasno określone, że znaki przyjmować wartości 0..255
albo EOF.
W pliku include/ctype.h można przeczytać:
/* These are defined in ctype-info.c.
The declarations here must match those in localeinfo.h.
These point into arrays of 384, so they can be indexed by any `unsigned
char' value [0,255]; by EOF (-1); or by any `signed char' value
[-128,-1). ANSI requires that the ctype functions work for `unsigned
char' values and for EOF; we also support negative `signed char' values
for broken old programs. The case conversion arrays are of `int's
rather than `unsigned char's because tolower (EOF) must be EOF, which
doesn't fit into an `unsigned char'. */
QRCZAK
__("< Marcin Kowalczyk
\__/ qrczak@knm.org.pl
^^ http://kki.net.pl/qrczak/
Technical Details
Message-ID:
<Pine.LNX.3.96.971115135456.8591A-100000@qrnik.knm.org.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!qrnik.knm.org.pl!qrnik.knm.org.pl!qrczakReferences:
<64flfj$jds$1@sunsite.icm.edu.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!qrnik.knm.org.pl!qrnik.knm.org.pl!qrczak From: Qrczak <qrczak@knm.org.pl> Newsgroups: pl.comp.lang.c Subject: Re: Uwaga: blad w funkcji isdigit . Date: Sat, 15 Nov 1997 14:14:17 +0100 Organization: Klub Nieszkodliwych Manjaków Lines: 48 Message-ID: <Pine.LNX.3.96.971115135456.8591A-100000@qrnik.knm.org.pl> References: <64flfj$jds$1@sunsite.icm.edu.pl> NNTP-Posting-Host: ppp3-cst67.warszawa.tpnet.pl Mime-Version: 1.0 In-Reply-To: <64flfj$jds$1@sunsite.icm.edu.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit