[PATCH v5 0/8] regex.3 momento

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

 



The range diff was again soup, I think there's something in the
interdiff tho.

8/8 may be clearer, may be not.

наб (8):
  regex.3: Desoupify regcomp() description
  regex.3: Desoupify regexec() description
  regex.3: Desoupify regerror() description
  regex.3: Improve REG_STARTEND
  regex.3, regex_t.3type, regmatch_t.3type, regoff_t.3type: Move & link
    regex_t.3type into regex.3
  regex.3: Finalise move of reg*.3type
  regex.3: Destandardeseify Match offsets
  regex.3: Further clarify the sole purpose of REG_NOSUB

 man3/regex.3              | 250 +++++++++++++++++++++-----------------
 man3type/regex_t.3type    |  64 +---------
 man3type/regmatch_t.3type |   2 +-
 man3type/regoff_t.3type   |   2 +-
 4 files changed, 143 insertions(+), 175 deletions(-)

Interdiff against v4:
diff --git a/man3/regex.3 b/man3/regex.3
index 552763940..66d9c6596 100644
--- a/man3/regex.3
+++ b/man3/regex.3
@@ -52,7 +52,7 @@ .SS Compilation
 .BR regexec ()
 searches.
 .PP
-The pattern buffer at
+On success, the pattern buffer at
 .I *preg
 is initialized.
 .I regex
@@ -96,16 +96,14 @@ .SS Compilation
 searches using this pattern buffer will be case insensitive.
 .TP
 .B REG_NOSUB
-Do not report position of matches.
-The
-.I nmatch
-and
-.I pmatch
+Only report overall success:
 .BR regexec ()
-arguments will be ignored for this purpose (but
+will only use
 .I pmatch
-may still be used for
-.BR REG_STARTEND ).
+for
+.BR REG_STARTEND ,
+and ignore
+.IR nmatch .
 .TP
 .B REG_NEWLINE
 Match-any-character operators don't match a newline.
@@ -161,7 +159,7 @@ .SS Matching
 .TP
 .B REG_STARTEND
 Match
-.RI [ string " + " pmatch->rm_so ", " string " + " pmatch->rm_eo )
+.RI [ string " + " pmatch[0].rm_so ", " string " + " pmatch[0].rm_eo )
 instead of
 .RI [ string ", " string " + \fBstrlen\fP(" string )).
 This allows matching embedded NUL bytes
@@ -183,7 +181,7 @@ .SS Matching
 remain relative to
 .IR string
 (not
-.IR string " + " pmatch->rm_so ).
+.IR string " + " pmatch[0].rm_so ).
 This flag is a BSD extension, not present in POSIX.
 .SS Match offsets
 Unless
@@ -349,6 +347,20 @@ .SH HISTORY
 type or a
 .I ssize_t
 type.
+.SH NOTES
+.I re_nsub
+is only required to be initialized if
+.B REG_NOSUB
+wasn't specified, but all known implementations initialize it regardless.
+.\" glibc, musl, 4.4BSD, illumos
+.PP
+Both
+.I regex_t
+and
+.I regmatch_t
+may (and do) have more members, in any order.
+Always reference them by name.
+.\" illumos has two more start/end pairs and the first one is of pointers
 .SH EXAMPLES
 .EX
 #include <stdint.h>
-- 
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