summaryrefslogtreecommitdiff
path: root/doc/html/pcre2_config.html
blob: f05bd0627c32e2b1ce2577e24654ddf2104f0bb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<html>
<head>
<title>pcre2_config specification</title>
</head>
<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
<h1>pcre2_config man page</h1>
<p>
Return to the <a href="index.html">PCRE2 index page</a>.
</p>
<p>
This page is part of the PCRE2 HTML documentation. It was generated
automatically from the original man page. If there is any nonsense in it,
please consult the man page, in case the conversion went wrong.
<br>
<br><b>
SYNOPSIS
</b><br>
<P>
<b>#include &#60;pcre2.h&#62;</b>
</P>
<P>
<b>int pcre2_config(uint32_t <i>what</i>, void *<i>where</i>);</b>
</P>
<br><b>
DESCRIPTION
</b><br>
<P>
This function makes it possible for a client program to find out which optional
features are available in the version of the PCRE2 library it is using. The
arguments are as follows:
<pre>
  <i>what</i>     A code specifying what information is required
  <i>where</i>    Points to where to put the information
</pre>
If <i>where</i> is NULL, the function returns the amount of memory needed for
the requested information. When the information is a string, the value is in
code units; for other types of data it is in bytes.
</P>
<P>
If <b>where</b> is not NULL, for PCRE2_CONFIG_JITTARGET,
PCRE2_CONFIG_UNICODE_VERSION, and PCRE2_CONFIG_VERSION it must point to a
buffer that is large enough to hold the string. For all other codes it must
point to a uint32_t integer variable. The available codes are:
<pre>
  PCRE2_CONFIG_BSR             Indicates what \R matches by default:
                                 PCRE2_BSR_UNICODE
                                 PCRE2_BSR_ANYCRLF
  PCRE2_CONFIG_COMPILED_WIDTHS Which of 8/16/32 support was compiled
  PCRE2_CONFIG_DEPTHLIMIT      Default backtracking depth limit
  PCRE2_CONFIG_HEAPLIMIT       Default heap memory limit
  PCRE2_CONFIG_JIT             Availability of just-in-time compiler support (1=yes 0=no)
  PCRE2_CONFIG_JITTARGET       Information (a string) about the target architecture for the JIT compiler
  PCRE2_CONFIG_LINKSIZE        Configured internal link size (2, 3, 4)
  PCRE2_CONFIG_MATCHLIMIT      Default internal resource limit
  PCRE2_CONFIG_NEVER_BACKSLASH_C  Whether or not \C is disabled
  PCRE2_CONFIG_NEWLINE         Code for the default newline sequence:
                                 PCRE2_NEWLINE_CR
                                 PCRE2_NEWLINE_LF
                                 PCRE2_NEWLINE_CRLF
                                 PCRE2_NEWLINE_ANY
                                 PCRE2_NEWLINE_ANYCRLF
                                 PCRE2_NEWLINE_NUL
  PCRE2_CONFIG_PARENSLIMIT     Default parentheses nesting limit
  PCRE2_CONFIG_RECURSIONLIMIT  Obsolete: use PCRE2_CONFIG_DEPTHLIMIT
  PCRE2_CONFIG_STACKRECURSE    Obsolete: always returns 0
  PCRE2_CONFIG_UNICODE         Availability of Unicode support (1=yes 0=no)
  PCRE2_CONFIG_UNICODE_VERSION The Unicode version (a string)
  PCRE2_CONFIG_VERSION         The PCRE2 version (a string)
</pre>
The function yields a non-negative value on success or the negative value
PCRE2_ERROR_BADOPTION otherwise. This is also the result for the
PCRE2_CONFIG_JITTARGET code if JIT support is not available. When a string is
requested, the function returns the number of code units used, including the
terminating zero.
</P>
<P>
There is a complete description of the PCRE2 native API in the
<a href="pcre2api.html"><b>pcre2api</b></a>
page and a description of the POSIX API in the
<a href="pcre2posix.html"><b>pcre2posix</b></a>
page.
<p>
Return to the <a href="index.html">PCRE2 index page</a>.
</p>