[PATCH v2 1/9] 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]

 



In the regexec() signature
  regmatch_t pmatch[restrict .nmatch],
is a simplification. It's actually
  regmatch_t pmatch[restrict
    ((.preg->flags & REG_NOSUB) ? 0 : .nmatch) ?:
     !!(.eflags & REG_STARTEND)],

But speccing that would be insane.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@xxxxxxxxxxxxxxxxxx>
---
By the end, I think I get to a regex(3) that I don't dread opening
(and that has all the info I'd want. who knew there was re_nsub?)!

The main issues here are (a) it's full of standardese, entire paragraphs
lifted from POSIX, or very close to that, and the POSIX dialect is
hostile to human life^W^Wbeing effectively used and (b) what reads like
30 years of people adding stuff without having read any other part of
the document. Almost everything repeats at least once.

Funny moments outlined as they come in the messages.

 man3/regex.3 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/man3/regex.3 b/man3/regex.3
index e8fed5147..d77aac2e7 100644
--- a/man3/regex.3
+++ b/man3/regex.3
@@ -80,9 +80,11 @@ The
 .I nmatch
 and
 .I pmatch
-arguments to
 .BR regexec ()
-are ignored if the pattern buffer supplied was compiled with this flag set.
+arguments will be ignored for this purpose (but
+.I pmatch
+may still be used for
+.BR REG_STARTEND ).
 .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