Compare commits

..

10 Commits

Author SHA1 Message Date
873a20cc80 This commit was manufactured by cvs2svn to create tag
'Version_1_26_0'.

[SVN r11842]
2001-11-30 18:24:42 +00:00
f0d62fb2c0 Updated changes log
[SVN r11830]
2001-11-30 12:00:31 +00:00
7104418bd5 * Changed BOOST_RE_THREADS to BOOST_HAS_THREADS,
* Updated allocator code to use SGI node based allocator when available.


[SVN r11829]
2001-11-30 11:58:04 +00:00
0bd54d3821 Added optional code to time how long the test takes.
[SVN r11828]
2001-11-30 11:56:35 +00:00
c167b1f183 changed BOOST_RE_THREADS to BOOST_HAS_THREADS
[SVN r11827]
2001-11-30 11:56:02 +00:00
52920ff98f Added \ as a non-literal character (oversight).
[SVN r11717]
2001-11-16 12:25:17 +00:00
72c3b4ed13 Fix for broken split (doesn't spit out all sub expressions).
[SVN r11716]
2001-11-16 12:24:40 +00:00
6cc5cf41d5 Trivial fix for signed/unsigned comparison
[SVN r11715]
2001-11-16 12:24:01 +00:00
a7984bb149 Updated Jamfiles with forced dynamic linking removed.
[SVN r11647]
2001-11-10 12:12:38 +00:00
876ff39307 remove redundant <runtime-link>dynamic from default-BUILD section
[SVN r11644]
2001-11-09 15:30:45 +00:00
14 changed files with 53 additions and 54 deletions

View File

@ -10,7 +10,6 @@ lib libboost_regex$(SUFLIB) : ../src/$(SOURCES).cpp
<define>BOOST_RE_NO_LIB=1
:
debug release
<runtime-link>dynamic
;
@ -20,7 +19,6 @@ dll libboost_regex$(SUFDLL[1]) : ../src/$(SOURCES).cpp
<define>BOOST_RE_BUILD_DLL=1
:
debug release
<runtime-link>dynamic
;

View File

@ -1,4 +1,11 @@
Version 331:
FIXED: All known current bugs.
ADDED: Support for default SGI allocator when available (even if it's not
standard conformant).
Version 330:
BUG: Not all occurances of BOOST_RE_THREADS changed to use BOOST_HAS_THREADS
CHANGED: Completely redesigned config support (now fully integrated with boost).
FIXED: Support for building with _UNICODE defined.
FIXED: Bug when running on Windows XP (character classification bitmaps wrong).
@ -269,5 +276,6 @@ BUG: character sets don't function correctly when regbase::char_classes

View File

@ -8,7 +8,6 @@ exe timer : timer/regex_timer.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
exe jgrep : jgrep/jgrep.cpp jgrep/main.cpp
@ -18,7 +17,6 @@ exe jgrep : jgrep/jgrep.cpp jgrep/main.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
exe credit_card_example : snippets/credit_card_example.cpp
@ -28,7 +26,6 @@ exe credit_card_example : snippets/credit_card_example.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
@ -39,7 +36,6 @@ exe partial_regex_grep : snippets/partial_regex_grep.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
exe partial_regex_match : snippets/partial_regex_match.cpp
@ -49,7 +45,6 @@ exe partial_regex_match : snippets/partial_regex_match.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
exe regex_grep_example_1 : snippets/regex_grep_example_1.cpp
@ -59,7 +54,6 @@ exe regex_grep_example_1 : snippets/regex_grep_example_1.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
exe regex_grep_example_2 : snippets/regex_grep_example_2.cpp
@ -69,7 +63,6 @@ exe regex_grep_example_2 : snippets/regex_grep_example_2.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
exe regex_grep_example_3 : snippets/regex_grep_example_3.cpp
@ -79,7 +72,6 @@ exe regex_grep_example_3 : snippets/regex_grep_example_3.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
exe regex_grep_example_4 : snippets/regex_grep_example_4.cpp
@ -89,7 +81,6 @@ exe regex_grep_example_4 : snippets/regex_grep_example_4.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
exe regex_match_example : snippets/regex_match_example.cpp
@ -99,7 +90,6 @@ exe regex_match_example : snippets/regex_match_example.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
exe regex_merge_example : snippets/regex_merge_example.cpp
@ -109,7 +99,6 @@ exe regex_merge_example : snippets/regex_merge_example.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
exe regex_search_example : snippets/regex_search_example.cpp
@ -119,7 +108,6 @@ exe regex_search_example : snippets/regex_search_example.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
exe regex_split_example_1 : snippets/regex_split_example_1.cpp
@ -129,7 +117,6 @@ exe regex_split_example_1 : snippets/regex_split_example_1.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
exe regex_split_example_2 : snippets/regex_split_example_2.cpp
@ -139,9 +126,9 @@ exe regex_split_example_2 : snippets/regex_split_example_2.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;

View File

@ -69,8 +69,9 @@ bool split_pred<OutputIterator, charT, Traits1, Alloc1, Alloc2>::operator()
{
*(*p_out) = static_cast<string_type>(what[i]);
++(*p_out);
return --*p_max;
if(0 == --*p_max) return false;
}
return *p_max != 0;
}
else
{

View File

@ -189,13 +189,13 @@ typedef lock_guard<critical_section> cs_guard;
BOOST_REGEX_DECL extern critical_section* p_re_lock;
BOOST_REGEX_DECL extern unsigned int re_lock_count;
#define BOOST_RE_GUARD(inst) boost::re_detail::critical_section::rw_guard g(inst);
#define BOOST_REGEX_GUARD(inst) boost::re_detail::critical_section::rw_guard g(inst);
#else // BOOST_RE_THREADS
#else // BOOST_HAS_THREADS
#define BOOST_RE_GUARD(inst)
#define BOOST_REGEX_GUARD(inst)
#endif // BOOST_RE_THREADS
#endif // BOOST_HAS_THREADS
#ifdef __BORLANDC__
#pragma option pop

View File

@ -733,7 +733,7 @@ public:
return true;
if((f & char_class_blank) && ((c == ' ') || (c == '\t')))
return true;
if((f & char_class_unicode) && (c > (size_type)(uchar_type)255))
if((f & char_class_unicode) && ((uchar_type)c > (uchar_type)255))
return true;
return false;
}

View File

@ -381,7 +381,7 @@ void BOOST_REGEX_CALL re_message_free()
const char* BOOST_REGEX_CALL re_get_error_str(unsigned int id)
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
boost::re_detail::cs_guard g(*boost::re_detail::p_re_lock);
#endif
if(re_custom_error_messages[id] == 0)
@ -576,7 +576,7 @@ c_regex_traits<char> c_regex_traits<char>::i;
void BOOST_REGEX_CALL c_regex_traits<char>::init()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
re_detail::re_init_threads();
re_detail::cs_guard g(*re_detail::p_re_lock);
#endif
@ -602,7 +602,7 @@ void BOOST_REGEX_CALL c_regex_traits<char>::init()
void BOOST_REGEX_CALL c_regex_traits<char>::update()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
re_detail::cs_guard g(*re_detail::p_re_lock);
#endif
re_message_update();
@ -622,7 +622,7 @@ void BOOST_REGEX_CALL c_regex_traits<char>::update()
void BOOST_REGEX_CALL c_regex_traits<char>::m_free()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
re_detail::cs_guard g(*re_detail::p_re_lock);
#endif
re_message_free();
@ -634,7 +634,7 @@ void BOOST_REGEX_CALL c_regex_traits<char>::m_free()
delete ctype_name;
delete collate_name;
}
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
g.acquire(false);
re_detail::re_free_threads();
#endif
@ -746,7 +746,7 @@ void BOOST_REGEX_CALL c_regex_traits<wchar_t>::init()
{
BOOST_RE_GUARD_STACK
re_detail::re_init_threads();
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
re_detail::cs_guard g(*re_detail::p_re_lock);
#endif
re_message_init();
@ -790,7 +790,7 @@ bool BOOST_REGEX_CALL c_regex_traits<wchar_t>::do_lookup_collate(std::basic_stri
void BOOST_REGEX_CALL c_regex_traits<wchar_t>::update()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
re_detail::cs_guard g(*re_detail::p_re_lock);
#endif
re_message_update();
@ -841,7 +841,7 @@ void BOOST_REGEX_CALL c_regex_traits<wchar_t>::update()
void BOOST_REGEX_CALL c_regex_traits<wchar_t>::m_free()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
re_detail::cs_guard g(*re_detail::p_re_lock);
#endif
--nlsw_count;
@ -854,7 +854,7 @@ void BOOST_REGEX_CALL c_regex_traits<wchar_t>::m_free()
delete wlocale_name;
delete syntax;
}
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
g.acquire(false);
re_detail::re_free_threads();
#endif

View File

@ -25,7 +25,7 @@
#include <boost/cregex.hpp>
#include <boost/regex.hpp>
#if !defined(BOOST_RE_NO_STRING_H)
#if !defined(BOOST_NO_STD_STRING)
#include <map>
#include <list>
#include <boost/regex/detail/fileiter.hpp>

View File

@ -45,7 +45,7 @@ regbase::regbase(const regbase& b)
} // namespace boost
#if defined(BOOST_RE_USE_VCL) && defined(BOOST_RE_BUILD_DLL)
#if defined(BOOST_RE_USE_VCL) && defined(BOOST_REGEX_BUILD_DLL)
int WINAPI DllEntryPoint(HINSTANCE , unsigned long , void*)
{

View File

@ -199,7 +199,7 @@ unsigned int BOOST_REGEX_CALL _re_get_message(char* buf, unsigned int len, unsig
const char* BOOST_REGEX_CALL re_get_error_str(unsigned int id)
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
boost::re_detail::cs_guard g(*boost::re_detail::p_re_lock);
#endif
if(re_custom_error_messages[id] == 0)
@ -441,7 +441,7 @@ bool BOOST_REGEX_CALL w32_traits_base::do_lookup_collate(std::string& buf, const
std::string BOOST_REGEX_CALL w32_traits_base::set_message_catalogue(const std::string& l)
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
re_detail::cs_guard g(*re_detail::p_re_lock);
#endif
if(sizeof(regex_message_catalogue) <= l.size())
@ -462,7 +462,7 @@ w32_regex_traits<char> w32_regex_traits<char>::i;
void BOOST_REGEX_CALL w32_regex_traits<char>::update()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
re_detail::cs_guard g(*re_detail::p_re_lock);
#endif
do_init();
@ -471,7 +471,7 @@ void BOOST_REGEX_CALL w32_regex_traits<char>::update()
w32_regex_traits<char>::w32_regex_traits()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
re_detail::re_init_threads();
re_detail::cs_guard g(*re_detail::p_re_lock);
#endif
@ -481,12 +481,12 @@ w32_regex_traits<char>::w32_regex_traits()
w32_regex_traits<char>::~w32_regex_traits()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
re_detail::cs_guard g(*re_detail::p_re_lock);
#endif
if(--entry_count == 0)
do_free();
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
g.acquire(false);
re_detail::re_free_threads();
#endif
@ -629,7 +629,7 @@ bool BOOST_REGEX_CALL w32_regex_traits<wchar_t>::do_lookup_collate(std::basic_st
void BOOST_REGEX_CALL w32_regex_traits<wchar_t>::update()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
re_detail::cs_guard g(*re_detail::p_re_lock);
#endif
do_init();
@ -638,7 +638,7 @@ void BOOST_REGEX_CALL w32_regex_traits<wchar_t>::update()
w32_regex_traits<wchar_t>::w32_regex_traits()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
re_detail::re_init_threads();
re_detail::cs_guard g(*re_detail::p_re_lock);
#endif
@ -648,12 +648,12 @@ w32_regex_traits<wchar_t>::w32_regex_traits()
w32_regex_traits<wchar_t>::~w32_regex_traits()
{
BOOST_RE_GUARD_STACK
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
re_detail::cs_guard g(*re_detail::p_re_lock);
#endif
if(--entry_count == 0)
do_free();
#ifdef BOOST_RE_THREADS
#ifdef BOOST_HAS_THREADS
g.acquire(false);
re_detail::re_free_threads();
#endif

View File

@ -28,7 +28,7 @@
#include <boost/regex.hpp>
#ifndef BOOST_RE_NO_WCHAR_H
#ifndef BOOST_NO_WREGEX
#include <cwchar>
#endif
#include <cstring>

View File

@ -51,10 +51,10 @@ expression compilation. </p>
<p>All characters are literals except: &quot;.&quot;,
&quot;*&quot;, &quot;?&quot;, &quot;+&quot;, &quot;(&quot;,
&quot;)&quot;, &quot;{&quot;, &quot;}&quot;, &quot;[&quot;,
&quot;]&quot;, &quot;^&quot; and &quot;$&quot;. These characters
are literals when preceded by a &quot;\&quot;. A literal is a
character that matches itself, or matches the result of
traits_type::translate(), where traits_type is the traits
&quot;]&quot;, &quot;^&quot;, &quot;$&quot; and &quot;\&quot;.
These characters are literals when preceded by a &quot;\&quot;. A
literal is a character that matches itself, or matches the result
of traits_type::translate(), where traits_type is the traits
template parameter to class reg_expression. <br>
&nbsp; <br>
&nbsp; </p>

View File

@ -8,7 +8,6 @@ unit-test regress : regress/parse.cpp regress/regress.cpp regress/tests.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
unit-test wregress : regress/parse.cpp regress/regress.cpp regress/tests.cpp
@ -19,7 +18,6 @@ unit-test wregress : regress/parse.cpp regress/regress.cpp regress/tests.cpp
<define>TEST_UNICODE=1
:
debug
<runtime-link>dynamic
;
unit-test posix_api_check_c : c_compiler_checks/posix_api_check.c
@ -29,7 +27,6 @@ unit-test posix_api_check_c : c_compiler_checks/posix_api_check.c
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
unit-test wide_posix_api_check_c : c_compiler_checks/wide_posix_api_check.c
@ -39,7 +36,6 @@ unit-test wide_posix_api_check_c : c_compiler_checks/wide_posix_api_check.c
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
unit-test posix_api_check : c_compiler_checks/posix_api_check.cpp
@ -49,7 +45,6 @@ unit-test posix_api_check : c_compiler_checks/posix_api_check.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;
unit-test wide_posix_api_check : c_compiler_checks/wide_posix_api_check.cpp
@ -59,8 +54,8 @@ unit-test wide_posix_api_check : c_compiler_checks/wide_posix_api_check.cpp
<define>BOOST_REGEX_NO_LIB=1
:
debug
<runtime-link>dynamic
;

View File

@ -46,6 +46,9 @@ using std::endl;
#if defined(BOOST_MSVC) && defined(_DEBUG)
#include <CRTDBG.H>
#endif
#ifdef TIME_TEST
#include <boost/timer.hpp>
#endif
//
@ -82,6 +85,9 @@ int cpp_main(int argc, char * argv[])
tmpFlag |= _CRTDBG_LEAK_CHECK_DF;
tmpFlag &= ~_CRTDBG_CHECK_CRT_DF;
_CrtSetDbgFlag( tmpFlag );
#endif
#ifdef TIME_TEST
boost::timer tim;
#endif
if(argc < 2)
usage();
@ -113,6 +119,10 @@ int cpp_main(int argc, char * argv[])
}
cout << line << " lines, " << tests << " tests completed in file " << argv[i] << endl;
}
#ifdef TIME_TEST
double elapsed_time = tim.elapsed();
cout << "Elapsed time = " << elapsed_time << "s" << endl;
#endif
return error_count;
}