From 3163f0cee1403efcb99cc97bad63b87c14681ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= Date: Sat, 21 Sep 2024 08:32:33 -0700 Subject: [PATCH] doc: include summary of directives in pcre2_set_optimize.3 Make the documentation of the new API more useful at a first glance by providing the list of values that can be used while keeping all details in pcre2api.3, and just like it is done in other similar pages. While at it reorder the entries for the directives in pcre2api.3 so it is more natural and to match the one used here. --- doc/pcre2_set_optimize.3 | 16 +++++++++++++--- doc/pcre2api.3 | 8 ++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/doc/pcre2_set_optimize.3 b/doc/pcre2_set_optimize.3 index 54cd616a..a8d8d94f 100644 --- a/doc/pcre2_set_optimize.3 +++ b/doc/pcre2_set_optimize.3 @@ -23,9 +23,19 @@ The result is zero for success, PCRE2_ERROR_NULL if \fIccontext\fP is NULL, or PCRE2_ERROR_BADOPTION if \fIdirective\fP is unknown. The latter could be useful to detect if a certain optimization is available. .P -There is a complete description of the PCRE2 native API, including all -permitted values for the \fIdirective\fP parameter of \fBpcre2_set_optimize()\fP, -in the +The list of possible values for the \fIdirective\fP parameter are: +.sp + PCRE2_OPTIMIZATION_FULL Enable all optimizations (default) + PCRE2_OPTIMIZATION_NONE Disable all optimizations + PCRE2_AUTO_POSSESS Enable auto-possessification + PCRE2_AUTO_POSSESS_OFF Disable auto-possessification + PCRE2_DOTSTAR_ANCHOR Enable implicit dotstar anchoring + PCRE2_DOTSTAR_ANCHOR_OFF Disable implicit dotstar anchoring + PCRE2_START_OPTIMIZE Enable start-up optimizations at match time + PCRE2_START_OPTIMIZE_OFF Disable start-up optimizations at match time +.sp +There is a complete description of the PCRE2 native API, including detailed +descriptions \fIdirective\fP parameter values in the .\" HREF \fBpcre2api\fP .\" diff --git a/doc/pcre2api.3 b/doc/pcre2api.3 index fa86cf0f..7d4b2d0b 100644 --- a/doc/pcre2api.3 +++ b/doc/pcre2api.3 @@ -900,14 +900,14 @@ known that some optimizations cannot benefit a certain regex, it might be desirable to disable them, in order to speed up compilation. .P The permitted values of \fIdirective\fP are as follows: -.sp - PCRE2_OPTIMIZATION_NONE -.sp -Disable all optional performance optimizations. .sp PCRE2_OPTIMIZATION_FULL .sp Enable all optional performance optimizations. This is the default value. +.sp + PCRE2_OPTIMIZATION_NONE +.sp +Disable all optional performance optimizations. .sp PCRE2_AUTO_POSSESS PCRE2_AUTO_POSSESS_OFF