pcre2_config man page

Return to the PCRE2 index page.

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.

SYNOPSIS

#include <pcre2.h>

int pcre2_config(uint32_t what, void *where);


DESCRIPTION

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:

  what     A code specifying what information is required
  where    Points to where to put the information
If where 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.

If where 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 PCRE2_CONFIG_MATCHLIMIT, PCRE2_CONFIG_PARENSLIMIT, and PCRE2_CONFIG_RECURSIONLIMIT it must point to an unsigned long int variable, and for all other codes to an int variable. The available codes are:

  PCRE2_CONFIG_BSR             Indicates what \R matches by default:
                                 0    all Unicode line endings
                                 1    CR, LF, or CRLF only
  PCRE2_CONFIG_JIT             Availability of just-in-time compiler
                                support (1=yes 0=no)
  PCRE2_CONFIG_JITTARGET       Information about the target archi-
                                 tecture for the JIT compiler
  PCRE2_CONFIG_LINKSIZE        Configured internal link size (2, 3, 4)
  PCRE2_CONFIG_MATCHLIMIT      Default internal resource limit
  PCRE2_CONFIG_NEWLINE         Code for the default newline sequence:
                                 1    for CR
                                 2    for LF
                                 3    for CRLF
                                 4    for ANY
                                 5    for ANYCRLF
  PCRE2_CONFIG_PARENSLIMIT     Default parentheses nesting limit
  PCRE2_CONFIG_RECURSIONLIMIT  Internal recursion depth limit
  PCRE2_CONFIG_STACKRECURSE    Recursion implementation (1=stack
                                 0=heap)
  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)
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 returned the yield is the length of the string, in code units, excluding the terminating zero.

There is a complete description of the PCRE2 native API in the pcre2api page and a description of the POSIX API in the pcre2posix page.

Return to the PCRE2 index page.