Files
boost_regex/doc/html/boost_regex/ref/posix.html
T
Eric Niebler cfacfddccd Merged revisions 44111-44378 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r44114 | emildotchevski | 2008-04-08 14:29:37 -0700 (Tue, 08 Apr 2008) | 1 line
  
  fixed compile errors, removed tabs as required.
........
  r44118 | djowel | 2008-04-08 18:29:12 -0700 (Tue, 08 Apr 2008) | 7 lines
  
  In preparation for spirit2:
  * flat includes
  * home directory
  * forwarding headers
  * classic spirit
........
  r44119 | djowel | 2008-04-08 18:51:47 -0700 (Tue, 08 Apr 2008) | 7 lines
  
  In preparation for spirit2:
  * flat includes
  * home directory
  * forwarding headers
  * classic spirit
........
  r44120 | hkaiser | 2008-04-08 19:17:53 -0700 (Tue, 08 Apr 2008) | 1 line
  
  Fixed one more include path
........
  r44121 | johnmaddock | 2008-04-09 04:34:20 -0700 (Wed, 09 Apr 2008) | 1 line
  
  Run config_info and config_test in both single and multi-thread modes.
........
  r44122 | johnmaddock | 2008-04-09 04:34:45 -0700 (Wed, 09 Apr 2008) | 1 line
  
  Run config_info and config_test in both single and multi-thread modes.
........
  r44123 | johnmaddock | 2008-04-09 04:35:36 -0700 (Wed, 09 Apr 2008) | 1 line
  
  Added needed #includes.
........
  r44124 | johnmaddock | 2008-04-09 04:45:15 -0700 (Wed, 09 Apr 2008) | 1 line
  
  Added improved SVG support.
........
  r44125 | hkaiser | 2008-04-09 06:50:03 -0700 (Wed, 09 Apr 2008) | 1 line
  
  Fixed #pragma message directives and a couple of forwarding headers.
........
  r44126 | johnmaddock | 2008-04-09 08:21:03 -0700 (Wed, 09 Apr 2008) | 1 line
  
  Fix bug report #1797.
........
  r44127 | johnmaddock | 2008-04-09 08:31:33 -0700 (Wed, 09 Apr 2008) | 1 line
  
  Update for bug report #1790.
........
  r44128 | johnmaddock | 2008-04-09 08:32:08 -0700 (Wed, 09 Apr 2008) | 1 line
  
  Fix for bug #1790.
........
  r44130 | danieljames | 2008-04-09 10:26:31 -0700 (Wed, 09 Apr 2008) | 1 line
  
  Fix a typo.
........
  r44131 | danieljames | 2008-04-09 10:27:08 -0700 (Wed, 09 Apr 2008) | 1 line
  
  Rebuild the function types documentation.
........
  r44132 | pdimov | 2008-04-09 10:49:20 -0700 (Wed, 09 Apr 2008) | 1 line
  
  Proper try_lock semantics.
........
  r44134 | emildotchevski | 2008-04-09 11:48:39 -0700 (Wed, 09 Apr 2008) | 1 line
  
  missing include
........
  r44136 | anthonyw | 2008-04-09 12:33:06 -0700 (Wed, 09 Apr 2008) | 1 line
  
  Added test for trac ticket #1803: condition_variable::notify_one may fail to wake a waiting thread on win32
........
  r44137 | pdimov | 2008-04-09 12:58:54 -0700 (Wed, 09 Apr 2008) | 1 line
  
  sp_counted_base_spin.hpp added, enabled by BOOST_SP_USE_SPINLOCK.
........
  r44138 | pdimov | 2008-04-09 14:08:39 -0700 (Wed, 09 Apr 2008) | 1 line
  
  spinlock_gcc_arm.hpp added.
........
  r44139 | grafik | 2008-04-09 14:20:28 -0700 (Wed, 09 Apr 2008) | 1 line
  
  Add ARM architecture/instrustion-set.
........
  r44140 | pdimov | 2008-04-09 16:19:22 -0700 (Wed, 09 Apr 2008) | 1 line
  
  ARM assembly fix.
........
  r44145 | johnmaddock | 2008-04-10 05:46:41 -0700 (Thu, 10 Apr 2008) | 2 lines
  
  Doh! Changes to code should actually compile!
  A fix for the last change.
........
  r44146 | anthonyw | 2008-04-10 06:14:43 -0700 (Thu, 10 Apr 2008) | 1 line
  
  fix for notify problem in trac ticket #1803
........
  r44147 | anthonyw | 2008-04-10 06:27:44 -0700 (Thu, 10 Apr 2008) | 1 line
  
  fix for trac ticket #1804
........
  r44148 | anthonyw | 2008-04-10 06:35:07 -0700 (Thu, 10 Apr 2008) | 1 line
  
  Added native_handle to thread on posix platforms
........
  r44149 | anthonyw | 2008-04-10 07:07:39 -0700 (Thu, 10 Apr 2008) | 1 line
  
  added overloads of timed_lock_shared with a relative timeout to shared_mutex
........
  r44150 | anthonyw | 2008-04-10 07:15:26 -0700 (Thu, 10 Apr 2008) | 1 line
  
  added tests for plain timed_lock on shared_mutex
........
  r44151 | daniel_frey | 2008-04-10 07:38:14 -0700 (Thu, 10 Apr 2008) | 1 line
  
  Added test and fix for "convertible to bool" requirement
........
  r44152 | anthonyw | 2008-04-10 08:52:01 -0700 (Thu, 10 Apr 2008) | 1 line
  
  Added native_handle to condition_variable on pthreads
........
  r44153 | anthonyw | 2008-04-10 11:34:42 -0700 (Thu, 10 Apr 2008) | 1 line
  
  Updated thread.hpp as catch-all header
........
  r44160 | dgregor | 2008-04-10 14:05:14 -0700 (Thu, 10 Apr 2008) | 1 line
  
  Refactor mpi_datatype_cache to fix problems on VC9
........
  r44161 | danieljames | 2008-04-10 14:06:48 -0700 (Thu, 10 Apr 2008) | 2 lines
  
  Try to fix Herve's name in a couple of places.
........
  r44163 | djowel | 2008-04-10 16:51:31 -0700 (Thu, 10 Apr 2008) | 1 line
  
  moving stuff to classic spirit
........
  r44164 | emildotchevski | 2008-04-10 20:51:06 -0700 (Thu, 10 Apr 2008) | 1 line
  
  to_string fixes
........
  r44165 | grafik | 2008-04-10 22:34:00 -0700 (Thu, 10 Apr 2008) | 1 line
  
  Use local sorted() function to support Python < 2.4.
........
  r44166 | grafik | 2008-04-10 22:36:28 -0700 (Thu, 10 Apr 2008) | 1 line
  
  Add support for toolset requirements at the definition level.
........
  r44167 | grafik | 2008-04-11 00:50:47 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Initial support for cross-compiling to ARM architecture.
........
  r44168 | anthonyw | 2008-04-11 01:52:09 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Added test and fix for win32 condition_variable broadcast bug similar to #1803
........
  r44169 | johnmaddock | 2008-04-11 01:53:54 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Fix doc typo from issue #1794.
........
  r44170 | johnmaddock | 2008-04-11 02:21:08 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Beefed up pthreads test cases.
........
  r44171 | johnmaddock | 2008-04-11 02:22:31 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Hopefully fix gcc/solaris single threading mode.
........
  r44172 | jurko | 2008-04-11 03:51:43 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Comment typo correction.
........
  r44175 | dgregor | 2008-04-11 08:39:41 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Fix some header-inclusion and header-ordering issues to get the MPI library compiling again.
........
  r44186 | johnmaddock | 2008-04-11 10:54:47 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Disable long double tests on unsupported platforms.
........
  r44187 | johnmaddock | 2008-04-11 10:57:58 -0700 (Fri, 11 Apr 2008) | 1 line
  
  We don't need duplicate using declarations.
........
  r44188 | johnmaddock | 2008-04-11 11:08:59 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Update error levels for real_concept tests.
........
  r44189 | johnmaddock | 2008-04-11 11:12:02 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Update tolerance used for skewness test.
........
  r44190 | hkaiser | 2008-04-11 11:19:46 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Fixed reference to Spirit classic test suite
........
  r44192 | emildotchevski | 2008-04-11 11:34:46 -0700 (Fri, 11 Apr 2008) | 1 line
  
  to_string adjustments
........
  r44195 | jurko | 2008-04-11 14:03:06 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Implemented a patch contributed by Igor Nazarenko reimplementing the list_sort() function to use a C qsort() function instead of a hand-crafted merge-sort algorithm. Makes some list sortings (e.g. 1,2,1,2,1,2,1,2,...) extremely faster, in turn significantly speeding up some project builds.
........
  r44196 | hkaiser | 2008-04-11 15:01:55 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Changed SpiritV1 header files to have a classic_ prefix
........
  r44197 | hkaiser | 2008-04-11 15:05:25 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Renamed a SpiritV1 header file I missed before
........
  r44198 | hkaiser | 2008-04-11 19:35:34 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Renamed PhoenixV1 files.
........
  r44203 | hkaiser | 2008-04-11 20:00:17 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Fixed an ambiguity.
........
  r44206 | hkaiser | 2008-04-11 20:02:34 -0700 (Fri, 11 Apr 2008) | 1 line
  
  Fixed more SpiritV1 header references after renaming
........
  r44246 | emildotchevski | 2008-04-11 20:27:57 -0700 (Fri, 11 Apr 2008) | 1 line
  
  removed tabs. what's wrong with tabs anyway?
........
  r44342 | emildotchevski | 2008-04-11 23:08:10 -0700 (Fri, 11 Apr 2008) | 1 line
  
  documentation cleanup
........
  r44343 | speedsnail | 2008-04-12 04:02:35 -0700 (Sat, 12 Apr 2008) | 2 lines
  
  Fixed a bug in for seldom used argument <property:/property-name/> in rule format-name.
  Added /property-name/ may be a regex.
........
  r44344 | pdimov | 2008-04-12 07:27:22 -0700 (Sat, 12 Apr 2008) | 1 line
  
  shared_ptr::lock no longer requires exceptions.
........
  r44346 | johnmaddock | 2008-04-12 09:01:16 -0700 (Sat, 12 Apr 2008) | 1 line
  
  Remove references to Boost.Test from the config_test target.
........
  r44347 | johnmaddock | 2008-04-12 09:02:24 -0700 (Sat, 12 Apr 2008) | 1 line
  
  When -lrt is needed, it's needed in *both* single and multi-threaded builds.
........
  r44350 | johnmaddock | 2008-04-12 09:27:11 -0700 (Sat, 12 Apr 2008) | 2 lines
  
  Add non central distro's to fwd.hpp.
  Added needed #include to bessel_ik.hpp.
........
  r44351 | johnmaddock | 2008-04-12 09:28:57 -0700 (Sat, 12 Apr 2008) | 3 lines
  
  Fix declaration order in dist_nc_beta_incl_test.cpp test.
  Fix long long usage in sf_modf_incl_test.cpp.
  Adjust failure rates in test_zeta.cpp to cope with HP aCC and 128-bit long doubles.
........
  r44352 | johnmaddock | 2008-04-12 09:42:28 -0700 (Sat, 12 Apr 2008) | 1 line
  
  Remove test row that causes problems for VC-7.1 due to a compiler bug.
........
  r44353 | pdimov | 2008-04-12 11:22:18 -0700 (Sat, 12 Apr 2008) | 1 line
  
  sp_accept_owner added.
........
  r44354 | grafik | 2008-04-12 12:44:47 -0700 (Sat, 12 Apr 2008) | 1 line
  
  Add multiple requirements for toolset subconditions instead of one composite as they are not supported for conditional requirements. Thanks to Roland for finding the problem.
........
  r44355 | hkaiser | 2008-04-12 16:58:29 -0700 (Sat, 12 Apr 2008) | 1 line
  
  Changed copyright, started to apply changes for switching namespaces.
........
  r44356 | djowel | 2008-04-12 17:15:11 -0700 (Sat, 12 Apr 2008) | 1 line
  
  added flat forwarding headers
........
  r44357 | djowel | 2008-04-12 17:39:00 -0700 (Sat, 12 Apr 2008) | 1 line
  
  added flat forwarding headers
........
  r44358 | djowel | 2008-04-12 17:54:10 -0700 (Sat, 12 Apr 2008) | 1 line
  
  adding spirit2
........
  r44359 | djowel | 2008-04-12 18:52:31 -0700 (Sat, 12 Apr 2008) | 1 line
  
  spirit2 ! :)
........
  r44360 | djowel | 2008-04-12 20:02:30 -0700 (Sat, 12 Apr 2008) | 1 line
  
  spirit2 ! :)
........
  r44361 | djowel | 2008-04-12 20:17:57 -0700 (Sat, 12 Apr 2008) | 1 line
  
  spirit2 ! :)
........
  r44367 | andreas_huber69 | 2008-04-13 06:57:42 -0700 (Sun, 13 Apr 2008) | 1 line
  
  Changed the PingPong example to demonstrate how the inner workings of an asynchronous_state_machine<> subclass can be hidden.
........
  r44369 | pdimov | 2008-04-13 08:35:40 -0700 (Sun, 13 Apr 2008) | 1 line
  
  Honor BOOST_DISABLE_THREADS; route GCC/ARM to the spinlock implementation; fall back to the spinlock implementation instead of using pthread_mutex.
........
  r44370 | anthonyw | 2008-04-13 08:50:08 -0700 (Sun, 13 Apr 2008) | 1 line
  
  Added extended adopt/defer/try constructors to upgrade_lock
........
  r44371 | hkaiser | 2008-04-13 09:28:27 -0700 (Sun, 13 Apr 2008) | 1 line
  
  Fixed Spirit Classic namespace switching.
........
  r44372 | emildotchevski | 2008-04-13 10:07:26 -0700 (Sun, 13 Apr 2008) | 1 line
  
  minor compile error fix
........
  r44374 | hkaiser | 2008-04-13 15:00:04 -0700 (Sun, 13 Apr 2008) | 1 line
  
  Added SpiritV2 test suite to regression tests.
........
  r44376 | grafik | 2008-04-13 15:12:12 -0700 (Sun, 13 Apr 2008) | 1 line
  
  Move array test into canonical test subdir structure.
........
  r44377 | grafik | 2008-04-13 15:24:41 -0700 (Sun, 13 Apr 2008) | 1 line
  
  Move crc test into canonical test subdir structure.
........


[SVN r44393]
2008-04-14 05:18:26 +00:00

562 lines
23 KiB
HTML

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<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 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">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="non_std_strings/mfc_strings/mfc_iter.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="concepts.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</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>
<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 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
version of these functions should also happily coexist with other versions,
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>
<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>
<p>
The following functions are available for users who need a POSIX compatible
C library, they are available in both Unicode and narrow character versions,
the standard POSIX API names are macros that expand to one version or the
other depending upon whether UNICODE is defined or not.
</p>
<div class="important"><table border="0" summary="Important">
<tr>
<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 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>
</table></div>
<p>
The functions are defined as:
</p>
<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>
<span class="keyword">int</span> <span class="identifier">regcompA</span><span class="special">(</span><span class="identifier">regex_tA</span><span class="special">*,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*,</span> <span class="keyword">int</span><span class="special">);</span>
<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">regerrorA</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">regex_tA</span><span class="special">*,</span> <span class="keyword">char</span><span class="special">*,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">);</span>
<span class="keyword">int</span> <span class="identifier">regexecA</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">regex_tA</span><span class="special">*,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">regmatch_t</span><span class="special">*,</span> <span class="keyword">int</span><span class="special">);</span>
<span class="keyword">void</span> <span class="identifier">regfreeA</span><span class="special">(</span><span class="identifier">regex_tA</span><span class="special">*);</span>
<span class="keyword">int</span> <span class="identifier">regcompW</span><span class="special">(</span><span class="identifier">regex_tW</span><span class="special">*,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*,</span> <span class="keyword">int</span><span class="special">);</span>
<span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">regerrorW</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">regex_tW</span><span class="special">*,</span> <span class="keyword">wchar_t</span><span class="special">*,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">);</span>
<span class="keyword">int</span> <span class="identifier">regexecW</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">regex_tW</span><span class="special">*,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span><span class="special">*,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">regmatch_t</span><span class="special">*,</span> <span class="keyword">int</span><span class="special">);</span>
<span class="keyword">void</span> <span class="identifier">regfreeW</span><span class="special">(</span><span class="identifier">regex_tW</span><span class="special">*);</span>
<span class="preprocessor">#ifdef</span> <span class="identifier">UNICODE</span>
<span class="preprocessor">#define</span> <span class="identifier">regcomp</span> <span class="identifier">regcompW</span>
<span class="preprocessor">#define</span> <span class="identifier">regerror</span> <span class="identifier">regerrorW</span>
<span class="preprocessor">#define</span> <span class="identifier">regexec</span> <span class="identifier">regexecW</span>
<span class="preprocessor">#define</span> <span class="identifier">regfree</span> <span class="identifier">regfreeW</span>
<span class="preprocessor">#define</span> <span class="identifier">regex_t</span> <span class="identifier">regex_tW</span>
<span class="preprocessor">#else</span>
<span class="preprocessor">#define</span> <span class="identifier">regcomp</span> <span class="identifier">regcompA</span>
<span class="preprocessor">#define</span> <span class="identifier">regerror</span> <span class="identifier">regerrorA</span>
<span class="preprocessor">#define</span> <span class="identifier">regexec</span> <span class="identifier">regexecA</span>
<span class="preprocessor">#define</span> <span class="identifier">regfree</span> <span class="identifier">regfreeA</span>
<span class="preprocessor">#define</span> <span class="identifier">regex_t</span> <span class="identifier">regex_tA</span>
<span class="preprocessor">#endif</span>
<span class="special">}</span>
</pre>
<p>
All the functions operate on structure regex_t, which exposes two public
members:
</p>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Member
</p>
</th>
<th>
<p>
Meaning
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<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 <code class="computeroutput"><span class="identifier">regcomp</span></code>
and indicates the number of sub-expressions contained in the regular
expression.
</p>
</td>
</tr>
<tr>
<td>
<p>
<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>
<p>
Points to the end of the expression to compile when the flag REG_PEND
is set.
</p>
</td>
</tr>
</tbody>
</table></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 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><h5>
<a name="id621362"></a>
<a href="posix.html#boost_regex.ref.posix.regcomp">regcomp</a>
</h5>
<p>
<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">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Flag
</p>
</th>
<th>
<p>
Meaning
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
REG_EXTENDED
</p>
</td>
<td>
<p>
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></code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
REG_BASIC
</p>
</td>
<td>
<p>
Compiles basic (obsolete) regular expression syntax. 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">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></code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
REG_NOSPEC
</p>
</td>
<td>
<p>
All characters are ordinary, the expression is a literal string.
</p>
</td>
</tr>
<tr>
<td>
<p>
REG_ICASE
</p>
</td>
<td>
<p>
Compiles for matching that ignores character case.
</p>
</td>
</tr>
<tr>
<td>
<p>
REG_NOSUB
</p>
</td>
<td>
<p>
Has no effect in this library.
</p>
</td>
</tr>
<tr>
<td>
<p>
REG_NEWLINE
</p>
</td>
<td>
<p>
When this flag is set a dot does not match the newline character.
</p>
</td>
</tr>
<tr>
<td>
<p>
REG_PEND
</p>
</td>
<td>
<p>
When this flag is set the re_endp parameter of the regex_t structure
must point to the end of the regular expression to compile.
</p>
</td>
</tr>
<tr>
<td>
<p>
REG_NOCOLLATE
</p>
</td>
<td>
<p>
When this flag is set then locale dependent collation for character
ranges is turned off.
</p>
</td>
</tr>
<tr>
<td>
<p>
REG_ESCAPE_IN_LISTS
</p>
</td>
<td>
<p>
When this flag is set, then escape sequences are permitted in bracket
expressions (character sets).
</p>
</td>
</tr>
<tr>
<td>
<p>
REG_NEWLINE_ALT
</p>
</td>
<td>
<p>
When this flag is set then the newline character is equivalent to
the alternation operator |.
</p>
</td>
</tr>
<tr>
<td>
<p>
REG_PERL
</p>
</td>
<td>
<p>
Compiles Perl like regular expressions.
</p>
</td>
</tr>
<tr>
<td>
<p>
REG_AWK
</p>
</td>
<td>
<p>
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>
<tr>
<td>
<p>
REG_GREP
</p>
</td>
<td>
<p>
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>
<tr>
<td>
<p>
REG_EGREP
</p>
</td>
<td>
<p>
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>
</tbody>
</table></div>
<a name="regerror"></a><p>
</p>
<a name="boost_regex.ref.posix.regerror"></a><h5>
<a name="id622005"></a>
<a href="posix.html#boost_regex.ref.posix.regerror">regerror</a>
</h5>
<p>
regerror takes the following parameters, it maps an error code to a human
readable string:
</p>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Parameter
</p>
</th>
<th>
<p>
Meaning
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
int code
</p>
</td>
<td>
<p>
The error code.
</p>
</td>
</tr>
<tr>
<td>
<p>
const regex_t* e
</p>
</td>
<td>
<p>
The regular expression (can be null).
</p>
</td>
</tr>
<tr>
<td>
<p>
char* buf
</p>
</td>
<td>
<p>
The buffer to fill in with the error message.
</p>
</td>
</tr>
<tr>
<td>
<p>
unsigned int buf_size
</p>
</td>
<td>
<p>
The length of buf.
</p>
</td>
</tr>
</tbody>
</table></div>
<p>
If the error code is OR'ed with REG_ITOA then the message that results is
the printable name of the code rather than a message, for example "REG_BADPAT".
If the code is REG_ATIO then e must not be null and e-&gt;re_pend must point
to the printable name of an error code, the return value is then the value
of the error code. For any other value of code, the return value is the number
of characters in the error message, if the return value is greater than or
equal to buf_size then regerror will have to be called again with a larger
buffer.
</p>
<a name="regexec"></a><p>
</p>
<a name="boost_regex.ref.posix.regexec"></a><h5>
<a name="id622188"></a>
<a href="posix.html#boost_regex.ref.posix.regexec">regexec</a>
</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
the regular expression, m[0] contains what matched the whole string, m[1]
the first sub-expression etc, see regmatch_t in the header file declaration
for more details. The eflags parameter can be a combination of:
</p>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Flag
</p>
</th>
<th>
<p>
Meaning
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
REG_NOTBOL
</p>
</td>
<td>
<p>
Parameter buf does not represent the start of a line.
</p>
</td>
</tr>
<tr>
<td>
<p>
REG_NOTEOL
</p>
</td>
<td>
<p>
Parameter buf does not terminate at the end of a line.
</p>
</td>
</tr>
<tr>
<td>
<p>
REG_STARTEND
</p>
</td>
<td>
<p>
The string searched starts at buf + pmatch[0].rm_so and ends at buf
+ pmatch[0].rm_eo.
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="regfree"></a><p>
</p>
<a name="boost_regex.ref.posix.regfree"></a><h5>
<a name="id622329"></a>
<a href="posix.html#boost_regex.ref.posix.regfree">regfree</a>
</h5>
<p>
<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">Copyright � 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>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="non_std_strings/mfc_strings/mfc_iter.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="concepts.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>