blob: ab9623d291e36bb296257811582c948323f6734b [file] [log] [blame]
Elliott Hughes9bc971b2018-07-27 13:23:14 -07001.TH PCRE2_CONFIG 3 "16 September 2017" "PCRE2 10.31"
Janis Danisevskis112c9cc2016-03-31 13:35:25 +01002.SH NAME
3PCRE2 - Perl-compatible regular expressions (revised API)
4.SH SYNOPSIS
5.rs
6.sp
7.B #include <pcre2.h>
8.PP
9.SM
10.B int pcre2_config(uint32_t \fIwhat\fP, void *\fIwhere\fP);
11.
12.SH DESCRIPTION
13.rs
14.sp
15This function makes it possible for a client program to find out which optional
16features are available in the version of the PCRE2 library it is using. The
17arguments are as follows:
18.sp
19 \fIwhat\fP A code specifying what information is required
20 \fIwhere\fP Points to where to put the information
21.sp
22If \fIwhere\fP is NULL, the function returns the amount of memory needed for
23the requested information. When the information is a string, the value is in
24code units; for other types of data it is in bytes.
25.P
26If \fBwhere\fP is not NULL, for PCRE2_CONFIG_JITTARGET,
27PCRE2_CONFIG_UNICODE_VERSION, and PCRE2_CONFIG_VERSION it must point to a
28buffer that is large enough to hold the string. For all other codes it must
29point to a uint32_t integer variable. The available codes are:
30.sp
31 PCRE2_CONFIG_BSR Indicates what \eR matches by default:
32 PCRE2_BSR_UNICODE
33 PCRE2_BSR_ANYCRLF
Elliott Hughes9bc971b2018-07-27 13:23:14 -070034 PCRE2_CONFIG_COMPILED_WIDTHS Which of 8/16/32 support was compiled
35 PCRE2_CONFIG_DEPTHLIMIT Default backtracking depth limit
36 PCRE2_CONFIG_HEAPLIMIT Default heap memory limit
37.\" JOIN
Janis Danisevskis112c9cc2016-03-31 13:35:25 +010038 PCRE2_CONFIG_JIT Availability of just-in-time compiler
39 support (1=yes 0=no)
Elliott Hughes9bc971b2018-07-27 13:23:14 -070040.\" JOIN
41 PCRE2_CONFIG_JITTARGET Information (a string) about the target
42 architecture for the JIT compiler
Janis Danisevskis112c9cc2016-03-31 13:35:25 +010043 PCRE2_CONFIG_LINKSIZE Configured internal link size (2, 3, 4)
44 PCRE2_CONFIG_MATCHLIMIT Default internal resource limit
Elliott Hughes9bc971b2018-07-27 13:23:14 -070045 PCRE2_CONFIG_NEVER_BACKSLASH_C Whether or not \eC is disabled
Janis Danisevskis112c9cc2016-03-31 13:35:25 +010046 PCRE2_CONFIG_NEWLINE Code for the default newline sequence:
47 PCRE2_NEWLINE_CR
48 PCRE2_NEWLINE_LF
49 PCRE2_NEWLINE_CRLF
50 PCRE2_NEWLINE_ANY
51 PCRE2_NEWLINE_ANYCRLF
Elliott Hughes9bc971b2018-07-27 13:23:14 -070052 PCRE2_NEWLINE_NUL
Janis Danisevskis112c9cc2016-03-31 13:35:25 +010053 PCRE2_CONFIG_PARENSLIMIT Default parentheses nesting limit
Elliott Hughes9bc971b2018-07-27 13:23:14 -070054 PCRE2_CONFIG_RECURSIONLIMIT Obsolete: use PCRE2_CONFIG_DEPTHLIMIT
55 PCRE2_CONFIG_STACKRECURSE Obsolete: always returns 0
56.\" JOIN
Janis Danisevskis112c9cc2016-03-31 13:35:25 +010057 PCRE2_CONFIG_UNICODE Availability of Unicode support (1=yes
58 0=no)
59 PCRE2_CONFIG_UNICODE_VERSION The Unicode version (a string)
60 PCRE2_CONFIG_VERSION The PCRE2 version (a string)
61.sp
62The function yields a non-negative value on success or the negative value
63PCRE2_ERROR_BADOPTION otherwise. This is also the result for the
64PCRE2_CONFIG_JITTARGET code if JIT support is not available. When a string is
65requested, the function returns the number of code units used, including the
66terminating zero.
67.P
68There is a complete description of the PCRE2 native API in the
69.\" HREF
70\fBpcre2api\fP
71.\"
72page and a description of the POSIX API in the
73.\" HREF
74\fBpcre2posix\fP
75.\"
76page.