Hi наб! On 4/19/23 19:47, наб wrote: > Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@xxxxxxxxxxxxxxxxxx> > --- > Also note that in > int regexec(const regex_t *restrict preg, const char *restrict string, > size_t nmatch, regmatch_t pmatch[restrict .nmatch], > int eflags); > pmatch is [1] if nmatch is 0 if eflags®_STARTEND. > Or, more succinctly, > regmatch_t pmatch[restrict !!(.eflags & ®_STARTEND) ?: .nmatch], > > Doesn't really matter, and that's a much worse signature than what's > currently there, but. Please include this in the commit message :) > > man3/regex.3 | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/man3/regex.3 b/man3/regex.3 > index e8fed5147..d54d6024c 100644 > --- a/man3/regex.3 > +++ b/man3/regex.3 > @@ -82,7 +82,9 @@ and > .I pmatch > arguments to > .BR regexec () > -are ignored if the pattern buffer supplied was compiled with this flag set. > +are only used for > +.B REG_STARTEND > +if the pattern buffer supplied was compiled with this flag set. I think it would be clearer with a wording like: +are only used for +.B REG_STARTEND +and only if the pattern buffer supplied was compiled with this flag set. I'm still not convinced by my wording either; please revise. But with your wording, I think it's not clear what happens if REG_STARTEND is not set. Cheers, Alex > .TP > .B REG_NEWLINE > Match-any-character operators don't match a newline. -- <http://www.alejandro-colomar.es/> GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature