]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
regex.3: Desoupify regcomp() description
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Thu, 20 Apr 2023 15:35:45 +0000 (17:35 +0200)
committerAlejandro Colomar <alx@kernel.org>
Thu, 20 Apr 2023 16:28:34 +0000 (18:28 +0200)
Behold:
  regerror() is passed the error code, errcode, the pattern buffer,
  preg, a pointer to a character string buffer, errbuf, and the size
  of the string buffer, errbuf_size.

Absolute soup.  This reads to me like an ill-conceived copy from a very
early standard version.  It looks fine in source form but is horrific to
read as running text.

Instead, replace all of these with just the descriptions of what they do
with their arguments.  What the arguments are is very clearly noted in
big bold in the prototypes.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man3/regex.3

index 129c42412dc8c8b9c5839c324dfbd1cbb49338ff..2f6ee816f22c1fa1ecd722513016e581894b1d83 100644 (file)
@@ -38,21 +38,13 @@ for subsequent
 .BR regexec ()
 searches.
 .PP
-.BR regcomp ()
-is supplied with
-.IR preg ,
-a pointer to a pattern buffer storage area;
-.IR regex ,
-a pointer to the null-terminated string and
-.IR cflags ,
-flags used to determine the type of compilation.
-.PP
-All regular expression searching must be done via a compiled pattern
-buffer, thus
-.BR regexec ()
-must always be supplied with the address of a
-.BR regcomp ()-initialized
-pattern buffer.
+On success, the pattern buffer at
+.I *preg
+is initialized.
+.I regex
+is a null-terminated string.
+The locale must be the same when running
+.BR regexec ().
 .PP
 .I cflags
 is the