Module Name: othersrc Committed By: uwe Date: Tue Oct 5 23:35:39 UTC 2021
Modified Files: othersrc/external/bsd/agcre/dist: libagcre.3 Log Message: Sprinkle more markup in previous. Sync argument names. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 othersrc/external/bsd/agcre/dist/libagcre.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: othersrc/external/bsd/agcre/dist/libagcre.3 diff -u othersrc/external/bsd/agcre/dist/libagcre.3:1.5 othersrc/external/bsd/agcre/dist/libagcre.3:1.6 --- othersrc/external/bsd/agcre/dist/libagcre.3:1.5 Tue Oct 5 22:17:15 2021 +++ othersrc/external/bsd/agcre/dist/libagcre.3 Tue Oct 5 23:35:38 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: libagcre.3,v 1.5 2021/10/05 22:17:15 agc Exp $ +.\" $NetBSD: libagcre.3,v 1.6 2021/10/05 23:35:38 uwe Exp $ .\" .\" Copyright (c) 2017,2020,2021 Alistair Crooks <a...@netbsd.org> .\" All rights reserved. @@ -165,7 +165,7 @@ Traces execution of the regular expressi .It Dv AGCRE_REG_CTAGS This is used where a regular expression pattern was generated by the .Xr ctags 1 -program, since the syntax generated does not conform to a standard +program, since the syntax generated does not conform to a standard basic regular expression. In particular, .Xr ctags 1 @@ -353,29 +353,43 @@ functions perform substitutions using .Xr sed 1 like syntax. They return the length of -the string that would have been created if there was enough space or -1 on error, setting errno. +the string that would have been created if there was enough space +or \-1 on error, setting +.Va errno . The result is -placed in buf which is user-supplied in +placed in +.Fa buf +which is user-supplied in .Fn agcre_regnsub and dynamically allocated in .Fn agcre_regasub . -The sub argument -contains a substitution string which might refer to the first 9 regular expression strings using -.Ql \e<n> +The +.Fa repl +argument contains a substitution string which might +refer to the first 9 regular expression strings using +.Sq Li \e Ns Ar <n> to refer -to the nth matched item, or -.Ql & +to the +.Ar n\^ Ns th +matched item, +or +.Ql \&& (which is equivalent to .Ql \e0 ) to refer to the full match. -The match array must be -at least 10 elements long, +The +.Fa matches +array must be at least 10 elements long, and should contain the result of the matches from a previous .Fn agcre_regexec call. Only 10 -elements of the rm array can be used. -The str argument contains the source string in which transformations will be substituted. +elements of the +.Fa matches +array can be used. +The +.Fa str +argument contains the source string in which transformations will be substituted. .Pp To show the value of constant-time execution, especially for regular expressions which may be subject to abuse,