Fix typos reported by Sebastian Pipping.

[SVN r42025]
This commit is contained in:
John Maddock
2007-12-14 10:11:21 +00:00
parent 31668ed4be
commit 71fdd5eb44
86 changed files with 3114 additions and 3578 deletions

View File

@ -1,14 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> POSIX Compatible C API's</title>
<title>POSIX Compatible C API's</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../ref.html" title=" Reference">
<link rel="prev" href="non_std_strings/mfc_strings/mfc_iter.html" title="
Iterating Over the Matches Within An MFC String">
<link rel="next" href="concepts.html" title=" Concepts">
<link rel="up" href="../ref.html" title="Reference">
<link rel="prev" href="non_std_strings/mfc_strings/mfc_iter.html" title="Iterating Over the Matches Within An MFC String">
<link rel="next" href="concepts.html" title="Concepts">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@ -25,13 +24,14 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.ref.posix"></a><a href="posix.html" title=" POSIX Compatible C API's"> POSIX Compatible C API's</a></h3></div></div></div>
<a name="boost_regex.ref.posix"></a><a href="posix.html" title="POSIX Compatible C API's"> POSIX Compatible C API's</a>
</h3></div></div></div>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td colspan="2" align="left" valign="top"><p>
<tr><td align="left" valign="top"><p>
this is an abridged reference to the POSIX API functions, these are provided
for compatibility with other libraries, rather than as an API to be used
in new code (unless you need access from a language other than C++). This
@ -39,14 +39,12 @@
as the names used are macros that expand to the actual function names.
</p></td></tr>
</table></div>
<pre class="programlisting">
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cregex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<p>
or:
</p>
<pre class="programlisting">
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span>
</pre>
<p>
The following functions are available for users who need a POSIX compatible
@ -59,9 +57,9 @@
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../../doc/html/images/important.png"></td>
<th align="left">Important</th>
</tr>
<tr><td colspan="2" align="left" valign="top"><p>
Note that all the symbols defined here are enclosed inside namespace <tt class="computeroutput"><span class="identifier">boost</span></tt> when used in C++ programs, unless
you use <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span></tt>
<tr><td align="left" valign="top"><p>
Note that all the symbols defined here are enclosed inside namespace <code class="computeroutput"><span class="identifier">boost</span></code> when used in C++ programs, unless
you use <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span></code>
instead - in which case the symbols are still defined in namespace boost,
but are made available in the global namespace as well.
</p></td></tr>
@ -69,8 +67,7 @@
<p>
The functions are defined as:
</p>
<pre class="programlisting">
<span class="keyword">extern</span> <span class="string">"C"</span> <span class="special">{</span>
<pre class="programlisting"><span class="keyword">extern</span> <span class="string">"C"</span> <span class="special">{</span>
<span class="keyword">struct</span> <span class="identifier">regex_tA</span><span class="special">;</span>
<span class="keyword">struct</span> <span class="identifier">regex_tW</span><span class="special">;</span>
@ -125,13 +122,13 @@
<tr>
<td>
<p>
<tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">re_nsub</span></tt>
<code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span>
<span class="identifier">re_nsub</span></code>
</p>
</td>
<td>
<p>
This is filled in by <tt class="computeroutput"><span class="identifier">regcomp</span></tt>
This is filled in by <code class="computeroutput"><span class="identifier">regcomp</span></code>
and indicates the number of sub-expressions contained in the regular
expression.
</p>
@ -140,7 +137,7 @@
<tr>
<td>
<p>
<tt class="computeroutput"><span class="keyword">const</span> <span class="identifier">TCHAR</span><span class="special">*</span> <span class="identifier">re_endp</span></tt>
<code class="computeroutput"><span class="keyword">const</span> <span class="identifier">TCHAR</span><span class="special">*</span> <span class="identifier">re_endp</span></code>
</p>
</td>
<td>
@ -157,23 +154,23 @@
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td colspan="2" align="left" valign="top"><p>
<tt class="computeroutput"><span class="identifier">regex_t</span></tt> is actually a
<tt class="computeroutput"><span class="preprocessor">#define</span></tt> - it is either
<tt class="computeroutput"><span class="identifier">regex_tA</span></tt> or <tt class="computeroutput"><span class="identifier">regex_tW</span></tt> depending upon whether <tt class="computeroutput"><span class="identifier">UNICODE</span></tt> is defined or not, <tt class="computeroutput"><span class="identifier">TCHAR</span></tt> is either <tt class="computeroutput"><span class="keyword">char</span></tt>
or <tt class="computeroutput"><span class="keyword">wchar_t</span></tt> again depending
upon the macro <tt class="computeroutput"><span class="identifier">UNICODE</span></tt>.
<tr><td align="left" valign="top"><p>
<code class="computeroutput"><span class="identifier">regex_t</span></code> is actually a
<code class="computeroutput"><span class="preprocessor">#define</span></code> - it is either
<code class="computeroutput"><span class="identifier">regex_tA</span></code> or <code class="computeroutput"><span class="identifier">regex_tW</span></code> depending upon whether <code class="computeroutput"><span class="identifier">UNICODE</span></code> is defined or not, <code class="computeroutput"><span class="identifier">TCHAR</span></code> is either <code class="computeroutput"><span class="keyword">char</span></code>
or <code class="computeroutput"><span class="keyword">wchar_t</span></code> again depending
upon the macro <code class="computeroutput"><span class="identifier">UNICODE</span></code>.
</p></td></tr>
</table></div>
<a name="regcomp"></a><p>
</p>
<a name="boost_regex.ref.posix.regcomp"></a><h4>
<a name="id588362"></a>
<a name="boost_regex.ref.posix.regcomp"></a><h5>
<a name="id621289"></a>
<a href="posix.html#boost_regex.ref.posix.regcomp">regcomp</a>
</h4>
</h5>
<p>
<tt class="computeroutput"><span class="identifier">regcomp</span></tt> takes a pointer to
a <tt class="computeroutput"><span class="identifier">regex_t</span></tt>, a pointer to the
<code class="computeroutput"><span class="identifier">regcomp</span></code> takes a pointer to
a <code class="computeroutput"><span class="identifier">regex_t</span></code>, a pointer to the
expression to compile and a flags parameter which can be a combination of:
</p>
<div class="informaltable"><table class="table">
@ -202,9 +199,9 @@
</td>
<td>
<p>
Compiles modern regular expressions. Equivalent to <tt class="computeroutput"><span class="identifier">regbase</span><span class="special">::</span><span class="identifier">char_classes</span> <span class="special">|</span>
Compiles modern regular expressions. Equivalent to <code class="computeroutput"><span class="identifier">regbase</span><span class="special">::</span><span class="identifier">char_classes</span> <span class="special">|</span>
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">intervals</span> <span class="special">|</span>
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_refs</span></tt>.
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_refs</span></code>.
</p>
</td>
</tr>
@ -217,12 +214,12 @@
<td>
<p>
Compiles basic (obsolete) regular expression syntax. Equivalent to
<tt class="computeroutput"><span class="identifier">regbase</span><span class="special">::</span><span class="identifier">char_classes</span> <span class="special">|</span>
<code class="computeroutput"><span class="identifier">regbase</span><span class="special">::</span><span class="identifier">char_classes</span> <span class="special">|</span>
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">intervals</span> <span class="special">|</span>
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">limited_ops</span> <span class="special">|</span>
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_braces</span> <span class="special">|</span>
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_parens</span> <span class="special">|</span>
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_refs</span></tt>.
<span class="identifier">regbase</span><span class="special">::</span><span class="identifier">bk_refs</span></code>.
</p>
</td>
</tr>
@ -346,8 +343,8 @@
</td>
<td>
<p>
A shortcut for awk-like behavior: <tt class="computeroutput"><span class="identifier">REG_EXTENDED</span>
<span class="special">|</span> <span class="identifier">REG_ESCAPE_IN_LISTS</span></tt>
A shortcut for awk-like behavior: <code class="computeroutput"><span class="identifier">REG_EXTENDED</span>
<span class="special">|</span> <span class="identifier">REG_ESCAPE_IN_LISTS</span></code>
</p>
</td>
</tr>
@ -359,8 +356,8 @@
</td>
<td>
<p>
A shortcut for grep like behavior: <tt class="computeroutput"><span class="identifier">REG_BASIC</span>
<span class="special">|</span> <span class="identifier">REG_NEWLINE_ALT</span></tt>
A shortcut for grep like behavior: <code class="computeroutput"><span class="identifier">REG_BASIC</span>
<span class="special">|</span> <span class="identifier">REG_NEWLINE_ALT</span></code>
</p>
</td>
</tr>
@ -372,8 +369,8 @@
</td>
<td>
<p>
A shortcut for egrep like behavior: <tt class="computeroutput"><span class="identifier">REG_EXTENDED</span>
<span class="special">|</span> <span class="identifier">REG_NEWLINE_ALT</span></tt>
A shortcut for egrep like behavior: <code class="computeroutput"><span class="identifier">REG_EXTENDED</span>
<span class="special">|</span> <span class="identifier">REG_NEWLINE_ALT</span></code>
</p>
</td>
</tr>
@ -381,10 +378,10 @@
</table></div>
<a name="regerror"></a><p>
</p>
<a name="boost_regex.ref.posix.regerror"></a><h4>
<a name="id589006"></a>
<a name="boost_regex.ref.posix.regerror"></a><h5>
<a name="id621933"></a>
<a href="posix.html#boost_regex.ref.posix.regerror">regerror</a>
</h4>
</h5>
<p>
regerror takes the following parameters, it maps an error code to a human
readable string:
@ -469,10 +466,10 @@
</p>
<a name="regexec"></a><p>
</p>
<a name="boost_regex.ref.posix.regexec"></a><h4>
<a name="id589189"></a>
<a name="boost_regex.ref.posix.regexec"></a><h5>
<a name="id622116"></a>
<a href="posix.html#boost_regex.ref.posix.regexec">regexec</a>
</h4>
</h5>
<p>
regexec finds the first occurrence of expression e within string buf. If
len is non-zero then <span class="emphasis"><em>*m</em></span> is filled in with what matched
@ -539,21 +536,22 @@
</table></div>
<a name="regfree"></a><p>
</p>
<a name="boost_regex.ref.posix.regfree"></a><h4>
<a name="id589331"></a>
<a name="boost_regex.ref.posix.regfree"></a><h5>
<a name="id622257"></a>
<a href="posix.html#boost_regex.ref.posix.regfree">regfree</a>
</h4>
</h5>
<p>
<tt class="computeroutput"><span class="identifier">regfree</span></tt> frees all the memory
<code class="computeroutput"><span class="identifier">regfree</span></code> frees all the memory
that was allocated by regcomp.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer"><small>Copyright <20> 2007 John Maddock<p>
<td align="right"><div class="copyright-footer">Copyright <20> 1998 -2007 John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td>
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">