summaryrefslogtreecommitdiff
path: root/doc/pcreapi.3
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-06-14 09:09:28 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-06-14 09:09:28 +0000
commitcb284848eb9e3c84b670166346baa02e6a55ebf6 (patch)
tree881af02f5fcb2266e2b1cd64ba5198651a07813c /doc/pcreapi.3
parent71ecd01f8b10d6e24d8cdc5d36f957759a424959 (diff)
downloadpcre-cb284848eb9e3c84b670166346baa02e6a55ebf6.tar.gz
Update man pages to avoid the use of .ti (which causes difficulties for some
translation software). git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1339 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'doc/pcreapi.3')
-rw-r--r--doc/pcreapi.3256
1 files changed, 112 insertions, 144 deletions
diff --git a/doc/pcreapi.3 b/doc/pcreapi.3
index 4718c7f..4dcba1a 100644
--- a/doc/pcreapi.3
+++ b/doc/pcreapi.3
@@ -1,4 +1,4 @@
-.TH PCREAPI 3 "12 May 2013" "PCRE 8.33"
+.TH PCREAPI 3 "12 June 2013" "PCRE 8.33"
.SH NAME
PCRE - Perl-compatible regular expressions
.sp
@@ -8,138 +8,115 @@ PCRE - Perl-compatible regular expressions
.SH "PCRE NATIVE API BASIC FUNCTIONS"
.rs
.sp
-.SM
+.nf
.B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP,
-.ti +5n
-.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
-.ti +5n
-.B const unsigned char *\fItableptr\fP);
-.PP
+.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
+.B " const unsigned char *\fItableptr\fP);"
+.sp
.B pcre *pcre_compile2(const char *\fIpattern\fP, int \fIoptions\fP,
-.ti +5n
-.B int *\fIerrorcodeptr\fP,
-.ti +5n
-.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
-.ti +5n
-.B const unsigned char *\fItableptr\fP);
-.PP
+.B " int *\fIerrorcodeptr\fP,"
+.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
+.B " const unsigned char *\fItableptr\fP);"
+.sp
.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP,
-.ti +5n
-.B const char **\fIerrptr\fP);
-.PP
+.B " const char **\fIerrptr\fP);"
+.sp
.B void pcre_free_study(pcre_extra *\fIextra\fP);
-.PP
+.sp
.B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
-.PP
+.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
+.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);"
+.sp
.B int pcre_dfa_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
-.ti +5n
-.B int *\fIworkspace\fP, int \fIwscount\fP);
+.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
+.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
+.B " int *\fIworkspace\fP, int \fIwscount\fP);"
+.fi
.
.
.SH "PCRE NATIVE API STRING EXTRACTION FUNCTIONS"
.rs
.sp
+.nf
.B int pcre_copy_named_substring(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, const char *\fIstringname\fP,
-.ti +5n
-.B char *\fIbuffer\fP, int \fIbuffersize\fP);
-.PP
+.B " const char *\fIsubject\fP, int *\fIovector\fP,"
+.B " int \fIstringcount\fP, const char *\fIstringname\fP,"
+.B " char *\fIbuffer\fP, int \fIbuffersize\fP);"
+.sp
.B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,
-.ti +5n
-.B int \fIbuffersize\fP);
-.PP
+.B " int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,"
+.B " int \fIbuffersize\fP);"
+.sp
.B int pcre_get_named_substring(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, const char *\fIstringname\fP,
-.ti +5n
-.B const char **\fIstringptr\fP);
-.PP
+.B " const char *\fIsubject\fP, int *\fIovector\fP,"
+.B " int \fIstringcount\fP, const char *\fIstringname\fP,"
+.B " const char **\fIstringptr\fP);"
+.sp
.B int pcre_get_stringnumber(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIname\fP);
-.PP
+.B " const char *\fIname\fP);"
+.sp
.B int pcre_get_stringtable_entries(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);
-.PP
+.B " const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);"
+.sp
.B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, int \fIstringnumber\fP,
-.ti +5n
-.B const char **\fIstringptr\fP);
-.PP
+.B " int \fIstringcount\fP, int \fIstringnumber\fP,"
+.B " const char **\fIstringptr\fP);"
+.sp
.B int pcre_get_substring_list(const char *\fIsubject\fP,
-.ti +5n
-.B int *\fIovector\fP, int \fIstringcount\fP, "const char ***\fIlistptr\fP);"
-.PP
+.B " int *\fIovector\fP, int \fIstringcount\fP, const char ***\fIlistptr\fP);"
+.sp
.B void pcre_free_substring(const char *\fIstringptr\fP);
-.PP
+.sp
.B void pcre_free_substring_list(const char **\fIstringptr\fP);
+.fi
.
.
.SH "PCRE NATIVE API AUXILIARY FUNCTIONS"
.rs
.sp
+.nf
.B int pcre_jit_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
-.ti +5n
-.B pcre_jit_stack *\fIjstack\fP);
-.PP
+.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
+.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
+.B " pcre_jit_stack *\fIjstack\fP);"
+.sp
.B pcre_jit_stack *pcre_jit_stack_alloc(int \fIstartsize\fP, int \fImaxsize\fP);
-.PP
+.sp
.B void pcre_jit_stack_free(pcre_jit_stack *\fIstack\fP);
-.PP
+.sp
.B void pcre_assign_jit_stack(pcre_extra *\fIextra\fP,
-.ti +5n
-.B pcre_jit_callback \fIcallback\fP, void *\fIdata\fP);
-.PP
+.B " pcre_jit_callback \fIcallback\fP, void *\fIdata\fP);"
+.sp
.B const unsigned char *pcre_maketables(void);
-.PP
+.sp
.B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B int \fIwhat\fP, void *\fIwhere\fP);
-.PP
+.B " int \fIwhat\fP, void *\fIwhere\fP);"
+.sp
.B int pcre_refcount(pcre *\fIcode\fP, int \fIadjust\fP);
-.PP
+.sp
.B int pcre_config(int \fIwhat\fP, void *\fIwhere\fP);
-.PP
+.sp
.B const char *pcre_version(void);
-.PP
+.sp
.B int pcre_pattern_to_host_byte_order(pcre *\fIcode\fP,
-.ti +5n
-.B pcre_extra *\fIextra\fP, const unsigned char *\fItables\fP);
+.B " pcre_extra *\fIextra\fP, const unsigned char *\fItables\fP);"
+.fi
.
.
.SH "PCRE NATIVE API INDIRECTED FUNCTIONS"
.rs
.sp
+.nf
.B void *(*pcre_malloc)(size_t);
-.PP
+.sp
.B void (*pcre_free)(void *);
-.PP
+.sp
.B void *(*pcre_stack_malloc)(size_t);
-.PP
+.sp
.B void (*pcre_stack_free)(void *);
-.PP
+.sp
.B int (*pcre_callout)(pcre_callout_block *);
+.fi
.
.
.SH "PCRE 8-BIT, 16-BIT, AND 32-BIT LIBRARIES"
@@ -509,19 +486,16 @@ avoiding the use of the stack.
.SH "COMPILING A PATTERN"
.rs
.sp
+.nf
.B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP,
-.ti +5n
-.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
-.ti +5n
-.B const unsigned char *\fItableptr\fP);
+.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
+.B " const unsigned char *\fItableptr\fP);"
.sp
.B pcre *pcre_compile2(const char *\fIpattern\fP, int \fIoptions\fP,
-.ti +5n
-.B int *\fIerrorcodeptr\fP,
-.ti +5n
-.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
-.ti +5n
-.B const unsigned char *\fItableptr\fP);
+.B " int *\fIerrorcodeptr\fP,"
+.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
+.B " const unsigned char *\fItableptr\fP);"
+.fi
.P
Either of the functions \fBpcre_compile()\fP or \fBpcre_compile2()\fP can be
called to compile a pattern into an internal form. The only difference between
@@ -993,9 +967,10 @@ be used if the limits were changed when PCRE was built.
.SH "STUDYING A PATTERN"
.rs
.sp
-.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP
-.ti +5n
-.B const char **\fIerrptr\fP);
+.nf
+.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP,
+.B " const char **\fIerrptr\fP);"
+.fi
.PP
If a compiled pattern is going to be used several times, it is worth spending
more time analyzing it in order to speed up the time taken for matching. The
@@ -1174,9 +1149,10 @@ below in the section on matching a pattern.
.SH "INFORMATION ABOUT A PATTERN"
.rs
.sp
+.nf
.B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B int \fIwhat\fP, void *\fIwhere\fP);
+.B " int \fIwhat\fP, void *\fIwhere\fP);"
+.fi
.PP
The \fBpcre_fullinfo()\fP function returns information about a compiled
pattern. It replaces the \fBpcre_info()\fP function, which was removed from the
@@ -1567,11 +1543,11 @@ is different. (This seems a highly unlikely scenario.)
.SH "MATCHING A PATTERN: THE TRADITIONAL FUNCTION"
.rs
.sp
+.nf
.B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
+.B " const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
+.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);"
+.fi
.P
The function \fBpcre_exec()\fP is called to match a subject string against a
compiled pattern, which is passed in the \fIcode\fP argument. If the
@@ -2423,21 +2399,18 @@ no longer in use and is never returned.
.SH "EXTRACTING CAPTURED SUBSTRINGS BY NUMBER"
.rs
.sp
+.nf
.B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,
-.ti +5n
-.B int \fIbuffersize\fP);
-.PP
+.B " int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,"
+.B " int \fIbuffersize\fP);"
+.sp
.B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, int \fIstringnumber\fP,
-.ti +5n
-.B const char **\fIstringptr\fP);
-.PP
+.B " int \fIstringcount\fP, int \fIstringnumber\fP,"
+.B " const char **\fIstringptr\fP);"
+.sp
.B int pcre_get_substring_list(const char *\fIsubject\fP,
-.ti +5n
-.B int *\fIovector\fP, int \fIstringcount\fP, "const char ***\fIlistptr\fP);"
+.B " int *\fIovector\fP, int \fIstringcount\fP, const char ***\fIlistptr\fP);"
+.fi
.PP
Captured substrings can be accessed directly by using the offsets returned by
\fBpcre_exec()\fP in \fIovector\fP. For convenience, the functions
@@ -2516,25 +2489,20 @@ provided.
.SH "EXTRACTING CAPTURED SUBSTRINGS BY NAME"
.rs
.sp
+.nf
.B int pcre_get_stringnumber(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIname\fP);
-.PP
+.B " const char *\fIname\fP);"
+.sp
.B int pcre_copy_named_substring(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, const char *\fIstringname\fP,
-.ti +5n
-.B char *\fIbuffer\fP, int \fIbuffersize\fP);
-.PP
+.B " const char *\fIsubject\fP, int *\fIovector\fP,"
+.B " int \fIstringcount\fP, const char *\fIstringname\fP,"
+.B " char *\fIbuffer\fP, int \fIbuffersize\fP);"
+.sp
.B int pcre_get_named_substring(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIsubject\fP, int *\fIovector\fP,
-.ti +5n
-.B int \fIstringcount\fP, const char *\fIstringname\fP,
-.ti +5n
-.B const char **\fIstringptr\fP);
+.B " const char *\fIsubject\fP, int *\fIovector\fP,"
+.B " int \fIstringcount\fP, const char *\fIstringname\fP,"
+.B " const char **\fIstringptr\fP);"
+.fi
.PP
To extract a substring by name, you first have to find associated number.
For example, for this pattern
@@ -2586,9 +2554,10 @@ same number causes an error at compile time.
.SH "DUPLICATE SUBPATTERN NAMES"
.rs
.sp
+.nf
.B int pcre_get_stringtable_entries(const pcre *\fIcode\fP,
-.ti +5n
-.B const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);
+.B " const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);"
+.fi
.PP
When a pattern is compiled with the PCRE_DUPNAMES option, names for subpatterns
are not required to be unique. (Duplicate names are always allowed for
@@ -2677,13 +2646,12 @@ the value returned is the size of each block that is obtained from the heap.
.SH "MATCHING A PATTERN: THE ALTERNATIVE FUNCTION"
.rs
.sp
+.nf
.B int pcre_dfa_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
-.ti +5n
-.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
-.ti +5n
-.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
-.ti +5n
-.B int *\fIworkspace\fP, int \fIwscount\fP);
+.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
+.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
+.B " int *\fIworkspace\fP, int \fIwscount\fP);"
+.fi
.P
The function \fBpcre_dfa_exec()\fP is called to match a subject string against
a compiled pattern, using a matching algorithm that scans the subject string
@@ -2886,6 +2854,6 @@ Cambridge CB2 3QH, England.
.rs
.sp
.nf
-Last updated: 12 May 2013
+Last updated: 12 June 2013
Copyright (c) 1997-2013 University of Cambridge.
.fi