passenger 4.0.27 → 4.0.28
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- data.tar.gz.asc +7 -7
- data/.gitignore +1 -0
- data/NEWS +22 -0
- data/build/preprocessor.rb +10 -0
- data/build/rpm.rb +74 -65
- data/debian.template/rules.template +8 -0
- data/dev/copy_boost_headers.rb +11 -2
- data/doc/Users guide Apache.idmap.txt +161 -145
- data/doc/Users guide Apache.txt +12 -1
- data/doc/Users guide Nginx.idmap.txt +142 -126
- data/doc/Users guide Nginx.txt +14 -1
- data/doc/Users guide Standalone.txt +1 -0
- data/doc/users_guide_snippets/environment_variables.txt +1 -1
- data/doc/users_guide_snippets/installation.txt +2 -0
- data/doc/users_guide_snippets/tips.txt +118 -0
- data/ext/apache2/Configuration.cpp +0 -6
- data/ext/apache2/Configuration.hpp +0 -5
- data/ext/apache2/ConfigurationCommands.cpp +7 -0
- data/ext/apache2/ConfigurationFields.hpp +2 -0
- data/ext/apache2/ConfigurationSetters.cpp +24 -0
- data/ext/apache2/CreateDirConfig.cpp +1 -0
- data/ext/apache2/Hooks.cpp +0 -1
- data/ext/apache2/MergeDirConfig.cpp +7 -0
- data/ext/apache2/SetHeaders.cpp +5 -1
- data/ext/boost/cregex.hpp +39 -0
- data/ext/boost/libs/regex/src/c_regex_traits.cpp +193 -0
- data/ext/boost/libs/regex/src/cpp_regex_traits.cpp +117 -0
- data/ext/boost/libs/regex/src/cregex.cpp +660 -0
- data/ext/boost/libs/regex/src/instances.cpp +32 -0
- data/ext/boost/libs/regex/src/internals.hpp +35 -0
- data/ext/boost/libs/regex/src/posix_api.cpp +296 -0
- data/ext/boost/libs/regex/src/regex.cpp +227 -0
- data/ext/boost/libs/regex/src/regex_debug.cpp +59 -0
- data/ext/boost/libs/regex/src/regex_raw_buffer.cpp +72 -0
- data/ext/boost/libs/regex/src/regex_traits_defaults.cpp +692 -0
- data/ext/boost/libs/regex/src/static_mutex.cpp +179 -0
- data/ext/boost/libs/regex/src/wc_regex_traits.cpp +301 -0
- data/ext/boost/libs/regex/src/wide_posix_api.cpp +315 -0
- data/ext/boost/libs/regex/src/winstances.cpp +35 -0
- data/ext/boost/regex.h +100 -0
- data/ext/boost/regex.hpp +37 -0
- data/ext/boost/regex/concepts.hpp +1128 -0
- data/ext/boost/regex/config.hpp +435 -0
- data/ext/boost/regex/config/borland.hpp +72 -0
- data/ext/boost/regex/config/cwchar.hpp +207 -0
- data/ext/boost/regex/mfc.hpp +190 -0
- data/ext/boost/regex/pattern_except.hpp +100 -0
- data/ext/boost/regex/pending/object_cache.hpp +165 -0
- data/ext/boost/regex/pending/static_mutex.hpp +179 -0
- data/ext/boost/regex/pending/unicode_iterator.hpp +776 -0
- data/ext/boost/regex/regex_traits.hpp +35 -0
- data/ext/boost/regex/user.hpp +93 -0
- data/ext/boost/regex/v4/basic_regex.hpp +782 -0
- data/ext/boost/regex/v4/basic_regex_creator.hpp +1571 -0
- data/ext/boost/regex/v4/basic_regex_parser.hpp +2874 -0
- data/ext/boost/regex/v4/c_regex_traits.hpp +211 -0
- data/ext/boost/regex/v4/char_regex_traits.hpp +81 -0
- data/ext/boost/regex/v4/cpp_regex_traits.hpp +1099 -0
- data/ext/boost/regex/v4/cregex.hpp +330 -0
- data/ext/boost/regex/v4/error_type.hpp +59 -0
- data/ext/boost/regex/v4/fileiter.hpp +455 -0
- data/ext/boost/regex/v4/instances.hpp +222 -0
- data/ext/boost/regex/v4/iterator_category.hpp +91 -0
- data/ext/boost/regex/v4/iterator_traits.hpp +135 -0
- data/ext/boost/regex/v4/match_flags.hpp +138 -0
- data/ext/boost/regex/v4/match_results.hpp +702 -0
- data/ext/boost/regex/v4/mem_block_cache.hpp +99 -0
- data/ext/boost/regex/v4/perl_matcher.hpp +587 -0
- data/ext/boost/regex/v4/perl_matcher_common.hpp +996 -0
- data/ext/boost/regex/v4/perl_matcher_non_recursive.hpp +1642 -0
- data/ext/boost/regex/v4/perl_matcher_recursive.hpp +991 -0
- data/ext/boost/regex/v4/primary_transform.hpp +146 -0
- data/ext/boost/regex/v4/protected_call.hpp +81 -0
- data/ext/boost/regex/v4/regbase.hpp +180 -0
- data/ext/boost/regex/v4/regex.hpp +202 -0
- data/ext/boost/regex/v4/regex_format.hpp +1156 -0
- data/ext/boost/regex/v4/regex_fwd.hpp +73 -0
- data/ext/boost/regex/v4/regex_grep.hpp +155 -0
- data/ext/boost/regex/v4/regex_iterator.hpp +201 -0
- data/ext/boost/regex/v4/regex_match.hpp +382 -0
- data/ext/boost/regex/v4/regex_merge.hpp +93 -0
- data/ext/boost/regex/v4/regex_raw_buffer.hpp +210 -0
- data/ext/boost/regex/v4/regex_replace.hpp +99 -0
- data/ext/boost/regex/v4/regex_search.hpp +217 -0
- data/ext/boost/regex/v4/regex_split.hpp +172 -0
- data/ext/boost/regex/v4/regex_token_iterator.hpp +342 -0
- data/ext/boost/regex/v4/regex_traits.hpp +189 -0
- data/ext/boost/regex/v4/regex_traits_defaults.hpp +371 -0
- data/ext/boost/regex/v4/regex_workaround.hpp +232 -0
- data/ext/boost/regex/v4/states.hpp +301 -0
- data/ext/boost/regex/v4/sub_match.hpp +512 -0
- data/ext/boost/regex/v4/syntax_type.hpp +105 -0
- data/ext/boost/regex/v4/u32regex_iterator.hpp +193 -0
- data/ext/boost/regex/v4/u32regex_token_iterator.hpp +377 -0
- data/ext/boost/regex/v4/w32_regex_traits.hpp +741 -0
- data/ext/boost/regex_fwd.hpp +33 -0
- data/ext/common/AgentsStarter.h +0 -11
- data/ext/common/ApplicationPool2/Common.h +1 -7
- data/ext/common/ApplicationPool2/DirectSpawner.h +3 -3
- data/ext/common/ApplicationPool2/Group.h +166 -69
- data/ext/common/ApplicationPool2/Implementation.cpp +55 -10
- data/ext/common/ApplicationPool2/Options.h +45 -10
- data/ext/common/ApplicationPool2/PipeWatcher.h +1 -2
- data/ext/common/ApplicationPool2/Pool.h +29 -7
- data/ext/common/ApplicationPool2/Process.h +22 -3
- data/ext/common/ApplicationPool2/Session.h +1 -0
- data/ext/common/ApplicationPool2/SmartSpawner.h +5 -10
- data/ext/common/ApplicationPool2/Spawner.h +10 -15
- data/ext/common/ApplicationPool2/SuperGroup.h +10 -9
- data/ext/common/Constants.h +1 -3
- data/ext/common/Hooks.h +193 -0
- data/ext/common/Logging.cpp +67 -2
- data/ext/common/Logging.h +23 -1
- data/ext/common/Utils.cpp +0 -21
- data/ext/common/Utils.h +0 -42
- data/ext/common/Utils/CachedFileStat.hpp +1 -1
- data/ext/common/Utils/StrIntUtils.h +61 -14
- data/ext/common/Utils/StringMap.h +4 -0
- data/ext/common/agents/HelperAgent/AgentOptions.h +4 -4
- data/ext/common/agents/HelperAgent/Main.cpp +2 -3
- data/ext/common/agents/HelperAgent/RequestHandler.h +65 -2
- data/ext/common/agents/LoggingAgent/FilterSupport.h +3 -1
- data/ext/common/agents/Watchdog/Main.cpp +8 -72
- data/ext/nginx/CacheLocationConfig.c +29 -1
- data/ext/nginx/Configuration.c +0 -12
- data/ext/nginx/Configuration.h +0 -1
- data/ext/nginx/ConfigurationCommands.c +10 -0
- data/ext/nginx/ConfigurationFields.h +2 -0
- data/ext/nginx/CreateLocationConfig.c +4 -0
- data/ext/nginx/MergeLocationConfig.c +6 -0
- data/ext/oxt/system_calls.cpp +7 -1
- data/ext/oxt/system_calls.hpp +7 -7
- data/helper-scripts/node-loader.js +6 -2
- data/helper-scripts/rack-loader.rb +5 -2
- data/helper-scripts/rack-preloader.rb +5 -2
- data/lib/phusion_passenger.rb +1 -1
- data/lib/phusion_passenger/apache2/config_options.rb +8 -0
- data/lib/phusion_passenger/constants.rb +0 -1
- data/lib/phusion_passenger/nginx/config_options.rb +9 -2
- data/lib/phusion_passenger/platform_info/apache.rb +2 -1
- data/lib/phusion_passenger/platform_info/compiler.rb +15 -1
- data/lib/phusion_passenger/platform_info/cxx_portability.rb +2 -0
- data/node_lib/phusion_passenger/httplib_emulation.js +85 -17
- data/node_lib/phusion_passenger/request_handler.js +10 -2
- data/rpm/Vagrantfile +32 -0
- data/rpm/get_distro_id.py +4 -0
- data/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp +2 -2
- data/test/cxx/ApplicationPool2/PoolTest.cpp +60 -9
- data/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp +2 -6
- data/test/cxx/CachedFileStatTest.cpp +5 -5
- data/test/cxx/RequestHandlerTest.cpp +3 -6
- data/test/cxx/UtilsTest.cpp +30 -0
- data/test/node/httplib_emulation_spec.js +491 -0
- data/test/node/spec_helper.js +25 -0
- metadata +78 -2
- metadata.gz.asc +7 -7
@@ -0,0 +1,315 @@
|
|
1
|
+
/*
|
2
|
+
*
|
3
|
+
* Copyright (c) 1998-2002
|
4
|
+
* John Maddock
|
5
|
+
*
|
6
|
+
* Use, modification and distribution are subject to the
|
7
|
+
* Boost Software License, Version 1.0. (See accompanying file
|
8
|
+
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
9
|
+
*
|
10
|
+
*/
|
11
|
+
|
12
|
+
/*
|
13
|
+
* LOCATION: see http://www.boost.org for most recent version.
|
14
|
+
* FILE: wide_posix_api.cpp
|
15
|
+
* VERSION: see <boost/version.hpp>
|
16
|
+
* DESCRIPTION: Implements the wide character POSIX API wrappers.
|
17
|
+
*/
|
18
|
+
|
19
|
+
#define BOOST_REGEX_SOURCE
|
20
|
+
|
21
|
+
#include <boost/regex/config.hpp>
|
22
|
+
|
23
|
+
#ifndef BOOST_NO_WREGEX
|
24
|
+
|
25
|
+
#include <boost/regex.hpp>
|
26
|
+
#include <boost/cregex.hpp>
|
27
|
+
|
28
|
+
#include <cwchar>
|
29
|
+
#include <cstring>
|
30
|
+
#include <cstdio>
|
31
|
+
|
32
|
+
#ifdef BOOST_INTEL
|
33
|
+
#pragma warning(disable:981)
|
34
|
+
#endif
|
35
|
+
|
36
|
+
#if defined(BOOST_NO_STDC_NAMESPACE) || defined(__NetBSD__)
|
37
|
+
namespace std{
|
38
|
+
# ifndef BOOST_NO_SWPRINTF
|
39
|
+
using ::swprintf;
|
40
|
+
# endif
|
41
|
+
}
|
42
|
+
#endif
|
43
|
+
|
44
|
+
|
45
|
+
namespace boost{
|
46
|
+
|
47
|
+
namespace {
|
48
|
+
|
49
|
+
unsigned int wmagic_value = 28631;
|
50
|
+
|
51
|
+
const wchar_t* wnames[] = {
|
52
|
+
L"REG_NOERROR",
|
53
|
+
L"REG_NOMATCH",
|
54
|
+
L"REG_BADPAT",
|
55
|
+
L"REG_ECOLLATE",
|
56
|
+
L"REG_ECTYPE",
|
57
|
+
L"REG_EESCAPE",
|
58
|
+
L"REG_ESUBREG",
|
59
|
+
L"REG_EBRACK",
|
60
|
+
L"REG_EPAREN",
|
61
|
+
L"REG_EBRACE",
|
62
|
+
L"REG_BADBR",
|
63
|
+
L"REG_ERANGE",
|
64
|
+
L"REG_ESPACE",
|
65
|
+
L"REG_BADRPT",
|
66
|
+
L"REG_EEND",
|
67
|
+
L"REG_ESIZE",
|
68
|
+
L"REG_ERPAREN",
|
69
|
+
L"REG_EMPTY",
|
70
|
+
L"REG_ECOMPLEXITY",
|
71
|
+
L"REG_ESTACK",
|
72
|
+
L"REG_E_PERL",
|
73
|
+
L"REG_E_UNKNOWN",
|
74
|
+
};
|
75
|
+
}
|
76
|
+
|
77
|
+
typedef boost::basic_regex<wchar_t, c_regex_traits<wchar_t> > wc_regex_type;
|
78
|
+
|
79
|
+
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW* expression, const wchar_t* ptr, int f)
|
80
|
+
{
|
81
|
+
if(expression->re_magic != wmagic_value)
|
82
|
+
{
|
83
|
+
expression->guts = 0;
|
84
|
+
#ifndef BOOST_NO_EXCEPTIONS
|
85
|
+
try{
|
86
|
+
#endif
|
87
|
+
expression->guts = new wc_regex_type();
|
88
|
+
#ifndef BOOST_NO_EXCEPTIONS
|
89
|
+
} catch(...)
|
90
|
+
{
|
91
|
+
return REG_ESPACE;
|
92
|
+
}
|
93
|
+
#else
|
94
|
+
if(0 == expression->guts)
|
95
|
+
return REG_E_MEMORY;
|
96
|
+
#endif
|
97
|
+
}
|
98
|
+
// set default flags:
|
99
|
+
boost::uint_fast32_t flags = (f & REG_PERLEX) ? 0 : ((f & REG_EXTENDED) ? wregex::extended : wregex::basic);
|
100
|
+
expression->eflags = (f & REG_NEWLINE) ? match_not_dot_newline : match_default;
|
101
|
+
|
102
|
+
// and translate those that are actually set:
|
103
|
+
if(f & REG_NOCOLLATE)
|
104
|
+
{
|
105
|
+
flags |= wregex::nocollate;
|
106
|
+
#ifndef BOOST_REGEX_V3
|
107
|
+
flags &= ~wregex::collate;
|
108
|
+
#endif
|
109
|
+
}
|
110
|
+
|
111
|
+
if(f & REG_NOSUB)
|
112
|
+
{
|
113
|
+
//expression->eflags |= match_any;
|
114
|
+
flags |= wregex::nosubs;
|
115
|
+
}
|
116
|
+
|
117
|
+
if(f & REG_NOSPEC)
|
118
|
+
flags |= wregex::literal;
|
119
|
+
if(f & REG_ICASE)
|
120
|
+
flags |= wregex::icase;
|
121
|
+
if(f & REG_ESCAPE_IN_LISTS)
|
122
|
+
flags &= ~wregex::no_escape_in_lists;
|
123
|
+
if(f & REG_NEWLINE_ALT)
|
124
|
+
flags |= wregex::newline_alt;
|
125
|
+
|
126
|
+
const wchar_t* p2;
|
127
|
+
if(f & REG_PEND)
|
128
|
+
p2 = expression->re_endp;
|
129
|
+
else p2 = ptr + std::wcslen(ptr);
|
130
|
+
|
131
|
+
int result;
|
132
|
+
|
133
|
+
#ifndef BOOST_NO_EXCEPTIONS
|
134
|
+
try{
|
135
|
+
#endif
|
136
|
+
expression->re_magic = wmagic_value;
|
137
|
+
static_cast<wc_regex_type*>(expression->guts)->set_expression(ptr, p2, flags);
|
138
|
+
expression->re_nsub = static_cast<wc_regex_type*>(expression->guts)->mark_count() - 1;
|
139
|
+
result = static_cast<wc_regex_type*>(expression->guts)->error_code();
|
140
|
+
#ifndef BOOST_NO_EXCEPTIONS
|
141
|
+
}
|
142
|
+
catch(const boost::regex_error& be)
|
143
|
+
{
|
144
|
+
result = be.code();
|
145
|
+
}
|
146
|
+
catch(...)
|
147
|
+
{
|
148
|
+
result = REG_E_UNKNOWN;
|
149
|
+
}
|
150
|
+
#endif
|
151
|
+
if(result)
|
152
|
+
regfreeW(expression);
|
153
|
+
return result;
|
154
|
+
|
155
|
+
}
|
156
|
+
|
157
|
+
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW* e, wchar_t* buf, regsize_t buf_size)
|
158
|
+
{
|
159
|
+
std::size_t result = 0;
|
160
|
+
if(code & REG_ITOA)
|
161
|
+
{
|
162
|
+
code &= ~REG_ITOA;
|
163
|
+
if((code <= (int)REG_E_UNKNOWN) && (code >= 0))
|
164
|
+
{
|
165
|
+
result = std::wcslen(wnames[code]) + 1;
|
166
|
+
if(buf_size >= result)
|
167
|
+
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
|
168
|
+
::wcscpy_s(buf, buf_size, wnames[code]);
|
169
|
+
#else
|
170
|
+
std::wcscpy(buf, wnames[code]);
|
171
|
+
#endif
|
172
|
+
return result;
|
173
|
+
}
|
174
|
+
return result;
|
175
|
+
}
|
176
|
+
#if !defined(BOOST_NO_SWPRINTF)
|
177
|
+
if(code == REG_ATOI)
|
178
|
+
{
|
179
|
+
wchar_t localbuf[5];
|
180
|
+
if(e == 0)
|
181
|
+
return 0;
|
182
|
+
for(int i = 0; i <= (int)REG_E_UNKNOWN; ++i)
|
183
|
+
{
|
184
|
+
if(std::wcscmp(e->re_endp, wnames[i]) == 0)
|
185
|
+
{
|
186
|
+
#if defined(_WIN32_WCE) && !defined(UNDER_CE)
|
187
|
+
(std::swprintf)(localbuf, L"%d", i);
|
188
|
+
#else
|
189
|
+
(std::swprintf)(localbuf, 5, L"%d", i);
|
190
|
+
#endif
|
191
|
+
if(std::wcslen(localbuf) < buf_size)
|
192
|
+
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
|
193
|
+
::wcscpy_s(buf, buf_size, localbuf);
|
194
|
+
#else
|
195
|
+
std::wcscpy(buf, localbuf);
|
196
|
+
#endif
|
197
|
+
return std::wcslen(localbuf) + 1;
|
198
|
+
}
|
199
|
+
}
|
200
|
+
#if defined(_WIN32_WCE) && !defined(UNDER_CE)
|
201
|
+
(std::swprintf)(localbuf, L"%d", 0);
|
202
|
+
#else
|
203
|
+
(std::swprintf)(localbuf, 5, L"%d", 0);
|
204
|
+
#endif
|
205
|
+
if(std::wcslen(localbuf) < buf_size)
|
206
|
+
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
|
207
|
+
::wcscpy_s(buf, buf_size, localbuf);
|
208
|
+
#else
|
209
|
+
std::wcscpy(buf, localbuf);
|
210
|
+
#endif
|
211
|
+
return std::wcslen(localbuf) + 1;
|
212
|
+
}
|
213
|
+
#endif
|
214
|
+
if(code <= (int)REG_E_UNKNOWN)
|
215
|
+
{
|
216
|
+
std::string p;
|
217
|
+
if((e) && (e->re_magic == wmagic_value))
|
218
|
+
p = static_cast<wc_regex_type*>(e->guts)->get_traits().error_string(static_cast< ::boost::regex_constants::error_type>(code));
|
219
|
+
else
|
220
|
+
{
|
221
|
+
p = re_detail::get_default_error_string(static_cast< ::boost::regex_constants::error_type>(code));
|
222
|
+
}
|
223
|
+
std::size_t len = p.size();
|
224
|
+
if(len < buf_size)
|
225
|
+
{
|
226
|
+
re_detail::copy(p.c_str(), p.c_str() + p.size() + 1, buf);
|
227
|
+
}
|
228
|
+
return len + 1;
|
229
|
+
}
|
230
|
+
if(buf_size)
|
231
|
+
*buf = 0;
|
232
|
+
return 0;
|
233
|
+
}
|
234
|
+
|
235
|
+
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecW(const regex_tW* expression, const wchar_t* buf, regsize_t n, regmatch_t* array, int eflags)
|
236
|
+
{
|
237
|
+
#ifdef BOOST_MSVC
|
238
|
+
#pragma warning(push)
|
239
|
+
#pragma warning(disable:4267)
|
240
|
+
#endif
|
241
|
+
bool result = false;
|
242
|
+
match_flag_type flags = match_default | expression->eflags;
|
243
|
+
const wchar_t* end;
|
244
|
+
const wchar_t* start;
|
245
|
+
wcmatch m;
|
246
|
+
|
247
|
+
if(eflags & REG_NOTBOL)
|
248
|
+
flags |= match_not_bol;
|
249
|
+
if(eflags & REG_NOTEOL)
|
250
|
+
flags |= match_not_eol;
|
251
|
+
if(eflags & REG_STARTEND)
|
252
|
+
{
|
253
|
+
start = buf + array[0].rm_so;
|
254
|
+
end = buf + array[0].rm_eo;
|
255
|
+
}
|
256
|
+
else
|
257
|
+
{
|
258
|
+
start = buf;
|
259
|
+
end = buf + std::wcslen(buf);
|
260
|
+
}
|
261
|
+
|
262
|
+
#ifndef BOOST_NO_EXCEPTIONS
|
263
|
+
try{
|
264
|
+
#endif
|
265
|
+
if(expression->re_magic == wmagic_value)
|
266
|
+
{
|
267
|
+
result = regex_search(start, end, m, *static_cast<wc_regex_type*>(expression->guts), flags);
|
268
|
+
}
|
269
|
+
else
|
270
|
+
return result;
|
271
|
+
#ifndef BOOST_NO_EXCEPTIONS
|
272
|
+
} catch(...)
|
273
|
+
{
|
274
|
+
return REG_E_UNKNOWN;
|
275
|
+
}
|
276
|
+
#endif
|
277
|
+
if(result)
|
278
|
+
{
|
279
|
+
// extract what matched:
|
280
|
+
std::size_t i;
|
281
|
+
for(i = 0; (i < n) && (i < expression->re_nsub + 1); ++i)
|
282
|
+
{
|
283
|
+
array[i].rm_so = (m[i].matched == false) ? -1 : (m[i].first - buf);
|
284
|
+
array[i].rm_eo = (m[i].matched == false) ? -1 : (m[i].second - buf);
|
285
|
+
}
|
286
|
+
// and set anything else to -1:
|
287
|
+
for(i = expression->re_nsub + 1; i < n; ++i)
|
288
|
+
{
|
289
|
+
array[i].rm_so = -1;
|
290
|
+
array[i].rm_eo = -1;
|
291
|
+
}
|
292
|
+
return 0;
|
293
|
+
}
|
294
|
+
return REG_NOMATCH;
|
295
|
+
#ifdef BOOST_MSVC
|
296
|
+
#pragma warning(pop)
|
297
|
+
#endif
|
298
|
+
}
|
299
|
+
|
300
|
+
BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeW(regex_tW* expression)
|
301
|
+
{
|
302
|
+
if(expression->re_magic == wmagic_value)
|
303
|
+
{
|
304
|
+
delete static_cast<wc_regex_type*>(expression->guts);
|
305
|
+
}
|
306
|
+
expression->re_magic = 0;
|
307
|
+
}
|
308
|
+
|
309
|
+
} // namespace boost;
|
310
|
+
|
311
|
+
#endif
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/*
|
2
|
+
*
|
3
|
+
* Copyright (c) 1998-2002
|
4
|
+
* John Maddock
|
5
|
+
*
|
6
|
+
* Use, modification and distribution are subject to the
|
7
|
+
* Boost Software License, Version 1.0. (See accompanying file
|
8
|
+
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
9
|
+
*
|
10
|
+
*/
|
11
|
+
|
12
|
+
/*
|
13
|
+
* LOCATION: see http://www.boost.org for most recent version.
|
14
|
+
* FILE: winstances.cpp
|
15
|
+
* VERSION: see <boost/version.hpp>
|
16
|
+
* DESCRIPTION: regex wide character template instances.
|
17
|
+
*/
|
18
|
+
|
19
|
+
#define BOOST_REGEX_SOURCE
|
20
|
+
|
21
|
+
#include <boost/regex/config.hpp>
|
22
|
+
|
23
|
+
#if !defined(BOOST_NO_WREGEX) && !defined(BOOST_REGEX_NO_EXTERNAL_TEMPLATES)
|
24
|
+
#define BOOST_REGEX_WIDE_INSTANTIATE
|
25
|
+
|
26
|
+
#ifdef __BORLANDC__
|
27
|
+
#pragma hrdstop
|
28
|
+
#endif
|
29
|
+
|
30
|
+
#include <boost/regex.hpp>
|
31
|
+
|
32
|
+
#endif
|
33
|
+
|
34
|
+
|
35
|
+
|
data/ext/boost/regex.h
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
/*
|
2
|
+
*
|
3
|
+
* Copyright (c) 1998-2000
|
4
|
+
* Dr John Maddock
|
5
|
+
*
|
6
|
+
* Use, modification and distribution are subject to the
|
7
|
+
* Boost Software License, Version 1.0. (See accompanying file
|
8
|
+
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
9
|
+
*
|
10
|
+
*/
|
11
|
+
|
12
|
+
/*
|
13
|
+
* LOCATION: see http://www.boost.org/libs/regex for documentation.
|
14
|
+
* FILE regex.h
|
15
|
+
* VERSION 3.12
|
16
|
+
* DESCRIPTION: Declares POSIX API functions
|
17
|
+
*/
|
18
|
+
|
19
|
+
#ifndef BOOST_RE_REGEX_H
|
20
|
+
#define BOOST_RE_REGEX_H
|
21
|
+
|
22
|
+
#include <boost/cregex.hpp>
|
23
|
+
|
24
|
+
/*
|
25
|
+
* add using declarations to bring POSIX API functions into
|
26
|
+
* global scope, only if this is C++ (and not C).
|
27
|
+
*/
|
28
|
+
#ifdef __cplusplus
|
29
|
+
|
30
|
+
using boost::regoff_t;
|
31
|
+
using boost::regex_tA;
|
32
|
+
using boost::regmatch_t;
|
33
|
+
using boost::REG_BASIC;
|
34
|
+
using boost::REG_EXTENDED;
|
35
|
+
using boost::REG_ICASE;
|
36
|
+
using boost::REG_NOSUB;
|
37
|
+
using boost::REG_NEWLINE;
|
38
|
+
using boost::REG_NOSPEC;
|
39
|
+
using boost::REG_PEND;
|
40
|
+
using boost::REG_DUMP;
|
41
|
+
using boost::REG_NOCOLLATE;
|
42
|
+
using boost::REG_ESCAPE_IN_LISTS;
|
43
|
+
using boost::REG_NEWLINE_ALT;
|
44
|
+
using boost::REG_PERL;
|
45
|
+
using boost::REG_AWK;
|
46
|
+
using boost::REG_GREP;
|
47
|
+
using boost::REG_EGREP;
|
48
|
+
using boost::REG_ASSERT;
|
49
|
+
using boost::REG_INVARG;
|
50
|
+
using boost::REG_ATOI;
|
51
|
+
using boost::REG_ITOA;
|
52
|
+
|
53
|
+
using boost::REG_NOTBOL;
|
54
|
+
using boost::REG_NOTEOL;
|
55
|
+
using boost::REG_STARTEND;
|
56
|
+
|
57
|
+
using boost::reg_comp_flags;
|
58
|
+
using boost::reg_exec_flags;
|
59
|
+
using boost::regcompA;
|
60
|
+
using boost::regerrorA;
|
61
|
+
using boost::regexecA;
|
62
|
+
using boost::regfreeA;
|
63
|
+
|
64
|
+
#ifndef BOOST_NO_WREGEX
|
65
|
+
using boost::regcompW;
|
66
|
+
using boost::regerrorW;
|
67
|
+
using boost::regexecW;
|
68
|
+
using boost::regfreeW;
|
69
|
+
using boost::regex_tW;
|
70
|
+
#endif
|
71
|
+
|
72
|
+
using boost::REG_NOERROR;
|
73
|
+
using boost::REG_NOMATCH;
|
74
|
+
using boost::REG_BADPAT;
|
75
|
+
using boost::REG_ECOLLATE;
|
76
|
+
using boost::REG_ECTYPE;
|
77
|
+
using boost::REG_EESCAPE;
|
78
|
+
using boost::REG_ESUBREG;
|
79
|
+
using boost::REG_EBRACK;
|
80
|
+
using boost::REG_EPAREN;
|
81
|
+
using boost::REG_EBRACE;
|
82
|
+
using boost::REG_BADBR;
|
83
|
+
using boost::REG_ERANGE;
|
84
|
+
using boost::REG_ESPACE;
|
85
|
+
using boost::REG_BADRPT;
|
86
|
+
using boost::REG_EEND;
|
87
|
+
using boost::REG_ESIZE;
|
88
|
+
using boost::REG_ERPAREN;
|
89
|
+
using boost::REG_EMPTY;
|
90
|
+
using boost::REG_E_MEMORY;
|
91
|
+
using boost::REG_E_UNKNOWN;
|
92
|
+
using boost::reg_errcode_t;
|
93
|
+
|
94
|
+
#endif /* __cplusplus */
|
95
|
+
|
96
|
+
#endif /* BOOST_RE_REGEX_H */
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|