~ubuntu-branches/ubuntu/oneiric/bombono-dvd/oneiric

« back to all changes in this revision

Viewing changes to libs/boost-lib/boost/regex/v4/cregex.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-11-04 11:46:25 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20101104114625-2tfaxma74eqggp5r
Tags: 0.8.0-0ubuntu1
* New upstream release (LP: #670193).
* Refresh 02_sparc.diff patch.
* Replace 05-boost_filesystem-link.patch with 05-fix_boost.patch, it fixes
  build failure with Boost <= 1.44.
* Bump Standards.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include <stddef.h>
33
33
#endif
34
34
 
 
35
#ifdef BOOST_MSVC
 
36
#pragma warning(push)
 
37
#pragma warning(disable: 4103)
 
38
#endif
35
39
#ifdef BOOST_HAS_ABI_HEADERS
36
40
#  include BOOST_ABI_PREFIX
37
41
#endif
 
42
#ifdef BOOST_MSVC
 
43
#pragma warning(pop)
 
44
#endif
38
45
 
39
46
/* include these defs only for POSIX compatablity */
40
47
#ifdef __cplusplus
117
124
   REG_STARTEND =  00004
118
125
} reg_exec_flags;
119
126
 
120
 
//
121
 
// POSIX error codes:
122
 
//
 
127
/*
 
128
 * POSIX error codes:
 
129
 */
123
130
typedef unsigned reg_error_t;
124
 
typedef reg_error_t reg_errcode_t;  // backwards compatibility
 
131
typedef reg_error_t reg_errcode_t;  /* backwards compatibility */
125
132
 
126
133
static const reg_error_t REG_NOERROR = 0;   /* Success.  */
127
134
static const reg_error_t REG_NOMATCH = 1;   /* Didn't find a match (for regexec).  */
147
154
static const reg_error_t REG_E_MEMORY = 15; /* = REG_ESIZE : out of memory */
148
155
static const reg_error_t REG_ECOMPLEXITY = 18; /* complexity too high */
149
156
static const reg_error_t REG_ESTACK = 19;   /* out of stack space */
150
 
static const reg_error_t REG_E_UNKNOWN = 20; /* unknown error */
151
 
static const reg_error_t REG_ENOSYS = 20;   /* = REG_E_UNKNOWN : Reserved. */
 
157
static const reg_error_t REG_E_PERL = 20;   /* Perl (?...) error */
 
158
static const reg_error_t REG_E_UNKNOWN = 21; /* unknown error */
 
159
static const reg_error_t REG_ENOSYS = 21;   /* = REG_E_UNKNOWN : Reserved. */
152
160
 
153
161
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA*, const char*, int);
154
162
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int, const regex_tA*, char*, regsize_t);
176
184
#define regex_t regex_tA
177
185
#endif
178
186
 
 
187
#ifdef BOOST_MSVC
 
188
#pragma warning(push)
 
189
#pragma warning(disable: 4103)
 
190
#endif
179
191
#ifdef BOOST_HAS_ABI_HEADERS
180
192
#  include BOOST_ABI_SUFFIX
181
193
#endif
 
194
#ifdef BOOST_MSVC
 
195
#pragma warning(pop)
 
196
#endif
182
197
 
183
198
#ifdef __cplusplus
184
 
} // extern "C"
185
 
} // namespace
 
199
} /* extern "C" */
 
200
} /* namespace */
186
201
#endif
187
202
 
188
 
//
189
 
// C++ high level wrapper goes here:
190
 
//
191
203
#if defined(__cplusplus)
 
204
/*
 
205
 * C++ high level wrapper goes here:
 
206
 */
192
207
#include <string>
193
208
#include <vector>
194
209
namespace boost{
195
210
 
 
211
#ifdef BOOST_MSVC
 
212
#pragma warning(push)
 
213
#pragma warning(disable: 4103)
 
214
#endif
196
215
#ifdef BOOST_HAS_ABI_HEADERS
197
216
#  include BOOST_ABI_PREFIX
198
217
#endif
 
218
#ifdef BOOST_MSVC
 
219
#pragma warning(pop)
 
220
#endif
199
221
 
200
222
class RegEx;
201
223
 
207
229
struct pred3;
208
230
struct pred4;
209
231
 
210
 
}  // namespace re_detail
 
232
}  /* namespace re_detail */
211
233
 
212
234
#if (defined(BOOST_MSVC) || defined(__BORLANDC__)) && !defined(BOOST_DISABLE_WIN32)
213
235
typedef bool (__cdecl *GrepCallback)(const RegEx& expression);
236
258
   unsigned int SetExpression(const std::string& s, bool icase = false){ return SetExpression(s.c_str(), icase); }
237
259
   std::string Expression()const;
238
260
   unsigned int error_code()const;
239
 
   //
240
 
   // now matching operators:
241
 
   //
 
261
   /*
 
262
    * now matching operators:
 
263
    */
242
264
   bool Match(const char* p, match_flag_type flags = match_default);
243
265
   bool Match(const std::string& s, match_flag_type flags = match_default) { return Match(s.c_str(), flags); }
244
266
   bool Search(const char* p, match_flag_type flags = match_default);
262
284
                       bool copy = true, match_flag_type flags = match_default);
263
285
 
264
286
   std::size_t Split(std::vector<std::string>& v, std::string& s, match_flag_type flags = match_default, unsigned max_count = ~0);
265
 
   //
266
 
   // now operators for returning what matched in more detail:
267
 
   //
 
287
   /*
 
288
    * now operators for returning what matched in more detail:
 
289
    */
268
290
   std::size_t Position(int i = 0)const;
269
291
   std::size_t Length(int i = 0)const;
270
292
   bool Matched(int i = 0)const;
280
302
   friend struct re_detail::pred4;
281
303
};
282
304
 
 
305
#ifdef BOOST_MSVC
 
306
#pragma warning(push)
 
307
#pragma warning(disable: 4103)
 
308
#endif
283
309
#ifdef BOOST_HAS_ABI_HEADERS
284
310
#  include BOOST_ABI_SUFFIX
285
311
#endif
286
 
 
287
 
} // namespace boost
288
 
 
 
312
#ifdef BOOST_MSVC
 
313
#pragma warning(pop)
289
314
#endif
290
315
 
291
 
#endif // include guard
 
316
} /* namespace boost */
 
317
 
 
318
#endif /* __cplusplus */
 
319
 
 
320
#endif /* include guard */
292
321
 
293
322
 
294
323