mirror of
https://github.com/boostorg/regex.git
synced 2025-07-04 08:06:31 +02:00
Compare commits
38 Commits
test_stand
...
boost-1.82
Author | SHA1 | Date | |
---|---|---|---|
4cbcd3078e | |||
237e69caf6 | |||
372d3f7a7e | |||
362c85cf66 | |||
430419705b | |||
1cad53766e | |||
a851f2141f | |||
57aca85a8e | |||
177ee2cc0f | |||
63575ddad8 | |||
e1c8a4b6a4 | |||
9b946cfcb7 | |||
86f82635d4 | |||
0c8158f6ce | |||
a3f97b5bec | |||
13a13e58c9 | |||
714eaf8ae9 | |||
78e73e29ec | |||
39f28ac456 | |||
e9645776f9 | |||
ea23777b48 | |||
c21b52d87c | |||
18e7b8c463 | |||
866d546fd0 | |||
309eee3459 | |||
c653a0bf05 | |||
a9fc8fb5de | |||
b3f73b4792 | |||
5bc2a4a301 | |||
8191d58266 | |||
f0b577a82c | |||
ed556985d7 | |||
bf7d64a7ef | |||
6f02c1a388 | |||
dec7b5028d | |||
dd20ac2669 | |||
d84bab7c4d | |||
9034bd9c02 |
@ -198,10 +198,10 @@ namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
|
||||
const char *strSource
|
||||
)
|
||||
{
|
||||
std::size_t lenSourceWithNull = std::strlen(strSource) + 1;
|
||||
if (lenSourceWithNull > sizeInBytes)
|
||||
std::size_t lenSourceWithNull = std::strlen(strSource) + 1;
|
||||
if (lenSourceWithNull > sizeInBytes)
|
||||
return 1;
|
||||
std::memcpy(strDestination, strSource, lenSourceWithNull);
|
||||
std::memcpy(strDestination, strSource, lenSourceWithNull);
|
||||
return 0;
|
||||
}
|
||||
inline std::size_t strcat_s(
|
||||
@ -210,11 +210,11 @@ namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
|
||||
const char *strSource
|
||||
)
|
||||
{
|
||||
std::size_t lenSourceWithNull = std::strlen(strSource) + 1;
|
||||
std::size_t lenDestination = std::strlen(strDestination);
|
||||
if (lenSourceWithNull + lenDestination > sizeInBytes)
|
||||
std::size_t lenSourceWithNull = std::strlen(strSource) + 1;
|
||||
std::size_t lenDestination = std::strlen(strDestination);
|
||||
if (lenSourceWithNull + lenDestination > sizeInBytes)
|
||||
return 1;
|
||||
std::memcpy(strDestination + lenDestination, strSource, lenSourceWithNull);
|
||||
std::memcpy(strDestination + lenDestination, strSource, lenSourceWithNull);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -116,10 +116,10 @@ namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
|
||||
const char *strSource
|
||||
)
|
||||
{
|
||||
std::size_t lenSourceWithNull = std::strlen(strSource) + 1;
|
||||
if (lenSourceWithNull > sizeInBytes)
|
||||
std::size_t lenSourceWithNull = std::strlen(strSource) + 1;
|
||||
if (lenSourceWithNull > sizeInBytes)
|
||||
return 1;
|
||||
std::memcpy(strDestination, strSource, lenSourceWithNull);
|
||||
std::memcpy(strDestination, strSource, lenSourceWithNull);
|
||||
return 0;
|
||||
}
|
||||
inline std::size_t strcat_s(
|
||||
@ -128,11 +128,11 @@ namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
|
||||
const char *strSource
|
||||
)
|
||||
{
|
||||
std::size_t lenSourceWithNull = std::strlen(strSource) + 1;
|
||||
std::size_t lenDestination = std::strlen(strDestination);
|
||||
if (lenSourceWithNull + lenDestination > sizeInBytes)
|
||||
std::size_t lenSourceWithNull = std::strlen(strSource) + 1;
|
||||
std::size_t lenDestination = std::strlen(strDestination);
|
||||
if (lenSourceWithNull + lenDestination > sizeInBytes)
|
||||
return 1;
|
||||
std::memcpy(strDestination + lenDestination, strSource, lenSourceWithNull);
|
||||
std::memcpy(strDestination + lenDestination, strSource, lenSourceWithNull);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -22,19 +22,15 @@
|
||||
#include <boost/cregex.hpp>
|
||||
#include <cstdio>
|
||||
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::sprintf;
|
||||
using ::strcpy;
|
||||
using ::strcmp;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_WORKAROUND
|
||||
#define BOOST_WORKAROUND(x, y) false
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef BOOST_REGEX_STANDALONE
|
||||
#include <boost/core/snprintf.hpp>
|
||||
#else
|
||||
namespace boost { namespace core { using std::snprintf; } }
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
|
||||
@ -180,13 +176,7 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int code, const regex_tA*
|
||||
// We're converting an integer i to a string, and since i <= REG_E_UNKNOWN
|
||||
// a five character string is *always* large enough:
|
||||
//
|
||||
#if !defined(BOOST_CXX_VERSION) || (BOOST_CXX_VERSION >= 201103)
|
||||
int r = (std::snprintf)(localbuf, 5, "%d", i);
|
||||
#elif BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
|
||||
int r = (::sprintf_s)(localbuf, 5, "%d", i);
|
||||
#else
|
||||
int r = (std::sprintf)(localbuf, "%d", i);
|
||||
#endif
|
||||
int r = (boost::core::snprintf)(localbuf, 5, "%d", i);
|
||||
if(r < 0)
|
||||
return 0; // sprintf failed
|
||||
if(std::strlen(localbuf) < buf_size)
|
||||
@ -194,13 +184,7 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int code, const regex_tA*
|
||||
return std::strlen(localbuf) + 1;
|
||||
}
|
||||
}
|
||||
#if !defined(BOOST_CXX_VERSION) || (BOOST_CXX_VERSION >= 201103)
|
||||
int r = (::snprintf)(localbuf, 5, "%d", 0);
|
||||
#elif BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
|
||||
int r = (::sprintf_s)(localbuf, 5, "%d", 0);
|
||||
#else
|
||||
int r = (std::sprintf)(localbuf, "%d", 0);
|
||||
#endif
|
||||
int r = (boost::core::snprintf)(localbuf, 5, "%d", 0);
|
||||
if(r < 0)
|
||||
return 0; // sprintf failed
|
||||
if(std::strlen(localbuf) < buf_size)
|
||||
|
@ -25,6 +25,12 @@
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/cregex.hpp>
|
||||
|
||||
#ifndef BOOST_REGEX_STANDALONE
|
||||
#include <boost/core/snprintf.hpp>
|
||||
#else
|
||||
namespace boost { namespace core { using std::swprintf; } }
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_WORKAROUND
|
||||
#define BOOST_WORKAROUND(x, y) false
|
||||
#endif
|
||||
@ -37,15 +43,6 @@
|
||||
#pragma warning(disable:981)
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE) || defined(__NetBSD__)
|
||||
namespace std{
|
||||
# ifndef BOOST_NO_SWPRINTF
|
||||
using ::swprintf;
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace {
|
||||
@ -181,7 +178,6 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW*
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#if !defined(BOOST_NO_SWPRINTF)
|
||||
if(code == REG_ATOI)
|
||||
{
|
||||
wchar_t localbuf[5];
|
||||
@ -194,7 +190,7 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW*
|
||||
#if defined(_WIN32_WCE) && !defined(UNDER_CE)
|
||||
(std::swprintf)(localbuf, L"%d", i);
|
||||
#else
|
||||
(std::swprintf)(localbuf, 5, L"%d", i);
|
||||
(boost::core::swprintf)(localbuf, 5, L"%d", i);
|
||||
#endif
|
||||
if(std::wcslen(localbuf) < buf_size)
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
|
||||
@ -208,7 +204,7 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW*
|
||||
#if defined(_WIN32_WCE) && !defined(UNDER_CE)
|
||||
(std::swprintf)(localbuf, L"%d", 0);
|
||||
#else
|
||||
(std::swprintf)(localbuf, 5, L"%d", 0);
|
||||
(boost::core::swprintf)(localbuf, 5, L"%d", 0);
|
||||
#endif
|
||||
if(std::wcslen(localbuf) < buf_size)
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
|
||||
@ -218,7 +214,6 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW*
|
||||
#endif
|
||||
return std::wcslen(localbuf) + 1;
|
||||
}
|
||||
#endif
|
||||
if(code <= (int)REG_E_UNKNOWN)
|
||||
{
|
||||
std::string p;
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
Z(((((((a+)+)+)+)+)+)+)+|Y(((((((a+)+)+)+)+)+)+)+|X(((((((a+)+)+)+)+)+)+)+|W(((((((a+)+)+)+)+)+)+)+|V(((((((a+)+)+)+)+)+)+)+|CZ(((((((a+)+)+)+)+)+)+)+|CY(((((((a+)+)+)+)+)+)+;+|CX(((((((a+)+)+)+)+)+)+)+|CW(((((((a+)+)+)+)+)+)+)+|CV(((((((a+)+)+)+)+)+)+)+|(a+)+b)
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
Z(((((((a+)+)+)+)+<2B><><EFBFBD><EFBFBD>)+|Y(((((((a+)+)+)+)+)++)+)|X(((((((a+)+)+)+)+)+)+)+|W((<28><>(((a+)+)+)+)+)+)+)+;|V((()++)+)+|CW(((((((a+)+)+)+((((a+)+)+)+)+)+)+)+|CZ(((((((a+)+)+)+)+)+)+)+|CY(((((((a+)+)+)+)+)+)+)+|CX(((((((a+)+)+)+)+)+)+)+|CW(((((((a+)+)+)+)+)+)+)+|CV,((((((a+)+)+)+)+)+)+)+|(a+)+bc
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
8^\l*(?:((.<2E>*?)\W*(?1)\<5C>*\2[abc]| |((.)\)W*(?1)\W*\4|\ZZZZZZZZZZZZZZZZZZZZZZ<1B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\pd\)W*(?1)\W*\4|\ZZZZZZZZZZZZZZZZZZZZZZ<1B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><1B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\pd<1B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><1B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\pdquick brown )ox
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,73 +0,0 @@
|
||||
'<27> (?: [\040\t] | \(
|
||||
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
|
||||
\) )* # optional leading comment
|
||||
(?: (?:
|
||||
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
|
||||
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
|
||||
|
|
||||
" (?: # opening quote...
|
||||
[^\\\x80-\xff\n\015"] # Anything except backslash and quote
|
||||
| # or
|
||||
\\ [^\x80-\xff] # Escaped something (something != CR)
|
||||
)* " # closing quote
|
||||
) # initial word
|
||||
(?: (?: [\040\t] | \(
|
||||
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
|
||||
\) )* \. (?: [\040\t] | \(\x80-\xff]+ # some number of atom characters...
|
||||
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
|
||||
|
|
||||
" (?: # opening quote...
|
||||
[^\\\x80-\xff\n\015"] # Anything except backslash and quote
|
||||
| # or
|
||||
\\ [^\x80-\xff] # Escaped something (something != CR)
|
||||
)* " # closing quote
|
||||
) # initial word
|
||||
(?: (?: [\040\t] | \(
|
||||
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
|
||||
\) )* \. (?: [\040\t] | \(
|
||||
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
|
||||
\) )* (?:
|
||||
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
|
||||
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
|
||||
|
|
||||
" (?: # opening quote...
|
||||
[^\\\x80-\xff\n\015"] # Anything except backslash and quote
|
||||
| # or
|
||||
\\ [^\x80-\xff] # Escaped something (something != CR)
|
||||
)* " # closing quote
|
||||
) )* # further okay, if led by a period
|
||||
(?: (\040\t] | \(
|
||||
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
|
||||
\) )* @ (?: [\040\t] | \(
|
||||
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
|
||||
\) )* (?:
|
||||
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
|
||||
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
|
||||
| \[ # [
|
||||
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
|
||||
\] # ]
|
||||
) # initial subdomain
|
||||
(?: #
|
||||
(?: [\040\t] | \(
|
||||
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
|
||||
\) )* \. # if led by a period...
|
||||
(?: [\040\t] | \(
|
||||
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
|
||||
\) )* (?:
|
||||
[^(\04<30>)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
|
||||
(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
|
||||
| \[ # [
|
||||
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
|
||||
\] # ]
|
||||
) # ...further okay
|
||||
)*
|
||||
# address spec
|
||||
(?: [\040\t] | \(
|
||||
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] ^ | \\[\x80-\xff] )* \) )*
|
||||
\) )* > # trailing >
|
||||
# name and address
|
||||
) (?: [\040\t] | \(
|
||||
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
|
||||
\) )* # optional trailing comment
|
||||
|
||||
<user@dom.ain>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user