delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/12/19/15:57:43

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:cc:subject:date:message-id:in-reply-to
:references:mime-version:content-transfer-encoding:content-type;
q=dns; s=default; b=h8pj38UdHGgP9AdYHC1Qkdp6Mm3OP43O6JvgWSx6VXG
sC5xXoFr5nU7A1ye9oTDI3qi3mGrnwErmCQWSziHbmbj65LcvTi/mtnNikRCTSUk
R2fvlYO5C9DWfkTjvhP51yx0flDKgZrosmcgEdE1V4hQs+Ppo+emHqSkgl+wGpFY
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:cc:subject:date:message-id:in-reply-to
:references:mime-version:content-transfer-encoding:content-type;
s=default; bh=3aXd7Mir7OpdTuMLIn+iDD9U8Vg=; b=Jc7oHgsYsheowmuuo
oop8+V4G7P6RsoN8Jz3G0gLRxzClFHciC1DWxEgBjsfNGLPqd1dmrmGz5LoX1hd2
eiryBFhE7RqAKdtVcYMqEnhiGek6/OWD9gjntJSipH6rXshxPmMKFRc+ZHenSf5h
OQ9PeiI+5eXDMwB752+i53AssU=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=concerning
X-HELO: mo4-p00-ob.smtp.rzone.de
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1545253047; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=/dU4tqAmFf7GfawTMLQd8wd3QuG5DLjmYZb1TWrI4Vs=; b=hUQ71zP/hdPnufa/pGjpUTC0atSZipfl/Lts7ImYfhY33jUNUtZU3v/TOivnwxdZOA kLqUauSnuZukUff/FQEjJcZI/fu9QcJs6xXGlCnChbE7VDcehE1flX8cHBNtoR77Sx4P o3oeRFRIyZYrehTomp9Packt3AgWlRnNA/9ZFliOq9HqFHNROEfMxDem2xQmEBIsdjPB gXVx8DBB68OpWSHaF/P3mPGY1+er43HdxEtsVcAAMdmgip8Cw5EuKpE+rrjof40Z2DaI WSW934Po0pkKRIaHM9/y+a+D+fSrpogyWrkLMKbXvu4w2bR1wi1q8LmAA0nLgWVRbU6c 3rtg==
From: Bruno Haible <bruno AT clisp DOT org>
To: Thomas Wolff <towo AT towo DOT net>
Cc: cygwin AT cygwin DOT com, Assaf Gordon <assafgordon AT gmail DOT com>
Subject: Re: iswcntrl() regression
Date: Wed, 19 Dec 2018 21:57:25 +0100
Message-ID: <6550638.IhVCuUnqCC@omega>
User-Agent: KMail/5.1.3 (Linux/4.4.0-139-generic; KDE/5.18.0; x86_64; ; )
In-Reply-To: <20181219133711.GJ28727@calimero.vinschen.de>
References: <24530320 DOT 43gEWRNkUz AT omega> <cd4691c0-da99-46b5-6001-594499a8d2fa AT towo DOT net> <20181219133711 DOT GJ28727 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0

Hello Thomas,

Oops 1: I forgot to add the reference to POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iswcntrl.html

Oops 2:
The relevant expression is iswcntrl (WEOF), not iswcntrl (EOF).

> > Are there any other special requirements concerning EOF?

WEOF is a special value. The difference between wint_t and wchar_t is
essentially that WEOF fits into wint_t but is not guaranteed to fit in wchar_t.
(Like EOF fits into 'int' but usually does not fit in 'unsigned char'.)

WEOF is special for all functions declared in <wctype.h>, see

http://pubs.opengroup.org/onlinepubs/9699919799/functions/iswalnum.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iswalpha.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iswblank.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iswcntrl.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iswdigit.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iswgraph.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iswlower.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iswprint.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iswpunct.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iswspace.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iswupper.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iswxdigit.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iswctype.html

http://pubs.opengroup.org/onlinepubs/9699919799/functions/towlower.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/towupper.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/towctrans.html

> this could be fixed in iswcntrl_l.c as a special condition, or
> injected as a special case in the categories.t table.

Probably, yes.

Bruno


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019