Re: [PATCH v2 1/2] Add CTYPE defines for various sets of characters.

Alejandro Colomar via Mutt-dev <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <anOQDB08K3KngNCF@devuan>
Hi Steffen,

> Date: 2026-08-05 18:30:05+0200
> From: Steffen Nurpmeso <[email protected]>
>
> Alejandro Colomar via Mutt-dev wrote in
>  <anMoJ15bY0AGDFyK@devuan>:
>  |> Date: 2026-08-05 11:37:46+0800
>  |> From: "Kevin J. McCarthy" <[email protected]>
>  ...
>  |>>> +#define CTYPE_PFCHAR_C       CTYPE_ALNUM_C "._-"    // POSIX.1-2008 \
>  |>>> portable
>  |>>> +                                                    // filename \
>  |>>> character set
>  |>> 
>  |>> Actually, that was already true as of POSIX.1-2001 (Issue 6); the first
>  |>> modern-day POSIX, where POSIX and SUS (the Single UNIX Specification)
>  |>> were unified
>  |>> 
>  |>> I suspect this was already true way earlier, since I see a reference to
>  |>> the 'portable filename character set' in XPG Issue 4 (v2) (from which
>  |>> modern-day POSIX derives).
>  |>> <https://pubs.opengroup.org/onlinepubs/009656499/toc.pdf#page=423>
>  |>> I don't see the the definition of the p.f.c.s. in that document, because
>  |>> it was in a separate volume, and I can't find it.  It's also difficult
>  |>> to find older standards, unless you know where they are.  :)
> 
> You need an OpenGroup.org/austin/login.html.  In Issue 4 version
> 2 from 1994 there is

Thanks!  I've been able to find it, as 'Single UNIX Specification,
Version 1 Document Set (UNIX 95)'.

Is XPG Issue 4 (v1) and Issue 3 there?  I can't find them.  What are the
magic keywords to find them?  :)


Have a lovely day!
Alex

>   portable filename character set
>   The set of characters from which portable filenames are
>   constructed. For a filename to be portable across
>   implementations conforming to this document set and the ISO
>   POSIX-1 standard, it must consist only of the following
>   characters:
>   A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
>   a b c d e f g h i j k l m n o p q r s t u v w x y z
>   0 1 2 3 4 5 6 7 8 9 . _ -
>   The last three characters are the period, underscore and hyphen
>   characters, respectively. The hyphen must not be used as the
>   first character of a portable filename. Upper- and lower-case
>   letters retain their unique identities between conforming
>   implementations. In the case of a portable pathname, the slash
>   character may also be used.
> 
>  |> Okay, I'll just leave it as "portable filename character set" in the
>  |> comment then.
>  |> 
>  |>> LGTM.
>  ..
> 
> I love this standard really.  Different to ISO C23 it has
> wcwidth() because it has terminals, and the word "directory"
> occurs more than once, and if via "path"name as above.  (Though
> one of the three "path"s in ISO C23 refer to a search path, too.)
> 
> --steffen
> |
> |Der Kragenbaer,                The moon bear,
> |der holt sich munter           he cheerfully and one by one
> |einen nach dem anderen runter  wa.ks himself off
> |(By Robert Gernhardt)

-- 
<https://www.alejandro-colomar.es>
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEES7Jt9u9GbmlWADAi64mZXMKQwqkFAmpzkLAACgkQ64mZXMKQ
wqnYYRAAmS+dQl43pRIjrunRL1dtlOcpFnX2YGV+/xNJF7LwddoeMp4/mYn28Xgp
gm+v+XVlk9uyjG80xJLTsvwURdjzS16sPb6NmXmNnb6BxfOVWmFiiSSkbWUUCc9H
rmdNJ62MYjm9nUR3R4nbkHJpkcu8kYFa4ejzpsakldNJLi3237IF8hb5dpxKHVZD
2JfJckqznnJNrgu14d6sz5gUtbDiQ1+cblqwV1SXA59Uqi9ZmDidNg9RFnDQCwdV
GJ5MqF6n3sMSvTEWiyTGKmG0ZLs/rWqPexEOHKlpDm4iZ/j3eFV43hHk2H/eaXNa
Xk0tfyrXBvegxdJ2sZjYOkxF5GXXIWtnLvDELHFbL4BoUjk6ZEN0CGNPLxYzFOPw
G4j5L5jIS+1E7vHBaJn308sbRZsZbyS1fvOYYLGOyoJqGFtdLBy+VyXf4Zo55Kty
0xOUY9xtWD7ycxI0xyrxvVBih5JxSGumWzTm0qcfOSy46Z5yXCHqDXYvF/FjZ+62
ntVagLQys7d3OreLZ5uDN6g58dwIYKe2ZgrQVYV1ybbnKqJrGTd90t9j7wmWAODm
RcuCXi3wcfSdlep3Mq59KIJaX6R/yq2sOMtrVYc6SA/vGxPvKxdVz+JLH1OHGFTr
H+KCfP7MtWpvgTUpUSigAyP7RjgDgE9JJPcdeF6Ff1VBAx4i7p4=
=tequ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.