linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regex.3: wfix
@ 2020-10-14 12:24 Alejandro Colomar
  2020-10-14 16:40 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Colomar @ 2020-10-14 12:24 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man, libc-alpha

The wording was incorrect:

It stated that 'eflags' may be the OR of one or two of those two flags,
but then a third flag was documented
(which according to the previous wording could not be used?!).
Moreover, the wording also disallowed using 0 (i.e., no flags at all),
which POSIX specifically allows;
I tested the function with no flags and it worked fine for me,
so I guess it was a problem with the documentation,
and not with the implementation itself.

POSIX ref: https://pubs.opengroup.org/onlinepubs/9699919799/

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---

Hi Michael,

I was working with the example, and the documentation was a bit weird,
so I want to be sure I'm doing it right before sending you the example.
Please review that this patch is correct, which I guess it is.

Cheers,

Alex

 man3/regex.3 | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/man3/regex.3 b/man3/regex.3
index d4f7a09e7..a7e04f7b5 100644
--- a/man3/regex.3
+++ b/man3/regex.3
@@ -136,11 +136,7 @@ are used to provide information regarding the location of any matches.
 .I eflags
 may be the
 .RB bitwise- or
-of one or both of
-.B REG_NOTBOL
-and
-.B REG_NOTEOL
-which cause changes in matching behavior described below.
+of zero or more of the following flags:
 .TP
 .B REG_NOTBOL
 The match-beginning-of-line operator always fails to match (but see the
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regex.3: wfix
  2020-10-14 12:24 [PATCH] regex.3: wfix Alejandro Colomar
@ 2020-10-14 16:40 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-10-14 16:40 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: mtk.manpages, linux-man, libc-alpha

On 10/14/20 2:24 PM, Alejandro Colomar wrote:
> The wording was incorrect:
> 
> It stated that 'eflags' may be the OR of one or two of those two flags,
> but then a third flag was documented
> (which according to the previous wording could not be used?!).
> Moreover, the wording also disallowed using 0 (i.e., no flags at all),
> which POSIX specifically allows;
> I tested the function with no flags and it worked fine for me,
> so I guess it was a problem with the documentation,
> and not with the implementation itself.
> 
> POSIX ref: https://pubs.opengroup.org/onlinepubs/9699919799/
> 
> Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
> ---
> 
> Hi Michael,
> 
> I was working with the example, and the documentation was a bit weird,
> so I want to be sure I'm doing it right before sending you the example.
> Please review that this patch is correct, which I guess it is.

Hi Alex,

I'm sure your fix is correct. The wording "It *may* be..." was I 
think intended to imply that instead of a mask of one or more of
those bits, it could be zero. But that's an imprecise way of
saying what is better said by your patch.

I've applied the patch.

Thanks,

Michael

>  man3/regex.3 | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/man3/regex.3 b/man3/regex.3
> index d4f7a09e7..a7e04f7b5 100644
> --- a/man3/regex.3
> +++ b/man3/regex.3
> @@ -136,11 +136,7 @@ are used to provide information regarding the location of any matches.
>  .I eflags
>  may be the
>  .RB bitwise- or
> -of one or both of
> -.B REG_NOTBOL
> -and
> -.B REG_NOTEOL
> -which cause changes in matching behavior described below.
> +of zero or more of the following flags:
>  .TP
>  .B REG_NOTBOL
>  The match-beginning-of-line operator always fails to match (but see the
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-14 16:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 12:24 [PATCH] regex.3: wfix Alejandro Colomar
2020-10-14 16:40 ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).