[PATCH 1/2] regex.3: note that pmatch is still used if REG_NOSUB if REG_STARTEND

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

 



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&REG_STARTEND.
Or, more succinctly,
  regmatch_t pmatch[restrict !!(.eflags & &REG_STARTEND) ?: .nmatch],

Doesn't really matter, and that's a much worse signature than what's
currently there, but.

 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.
 .TP
 .B REG_NEWLINE
 Match-any-character operators don't match a newline.
-- 
2.30.2

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