Re: [PATCH] fnmatch.3: update FNM_CASEFOLD availability, FNM_IGNORECASE alias

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi наб,

On Fri, Jul 12, 2024 at 02:21:35PM GMT, наб wrote:
> Every system I looked at already had FNM_CASEFOLD,
> so calling it "GNU" is misleading at best;
> Solaris (and the illumos gate) call it FNM_IGNORECASE
> but also provide FNM_CASEFOLD as an alias.
> 
> POSIX defines them as being the same,
> I think the F_C == F_I syntax does this perfect justice
> without being really wordy for no good reason.
> 
> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@xxxxxxxxxxxxxxxxxx>
> ---
>  man/man3/fnmatch.3 | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/man/man3/fnmatch.3 b/man/man3/fnmatch.3
> index 978163a..0501914 100644
> --- a/man/man3/fnmatch.3
> +++ b/man/man3/fnmatch.3
> @@ -68,8 +68,8 @@ .SH DESCRIPTION
>  This flag is mainly for the internal
>  use of glibc and is implemented only in certain cases.
>  .TP
> -.B FNM_CASEFOLD
> -If this flag (a GNU extension) is set, the pattern is matched
> +.BR FNM_CASEFOLD " == " FNM_IGNORECASE

This might be confusing.  A reader may be lead to think that it needs to
compare those or something.

How about TP + TQ?  (and then some parenthesis saying that they are
different names for the same thing)?

> +If this flag is set, the pattern is matched
>  case-insensitively.
>  .TP
>  .B FNM_EXTMATCH
> @@ -123,11 +123,15 @@ .SH STANDARDS
>  .BR fnmatch ()
>  POSIX.1-2008.
>  .TP
> +.BR FNM_CASEFOLD ", " FNM_IGNORECASE
> +POSIX.1-2024.

I prefer TP + TQ instead of a CSV:

.TP
.B T_C
.TQ
.B T_I

> +Many systems have shipped
> +.B FNM_CASEFOLD
> +prior.

This part looks like it should go into HISTORY.  If you can and want to
make it more precise, feel free to do so.

> +.TP
>  .B FNM_FILE_NAME
>  .TQ
>  .B FNM_LEADING_DIR
> -.TQ
> -.B FNM_CASEFOLD
>  GNU.

Have a lovely day!
Alex

>  .SH HISTORY
>  .TP
> -- 
> 2.39.2



-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux