Apply patches for building regex on WinCE see: http://lists.boost.org/Archives/boost/2007/11/130839.php

[SVN r41327]
This commit is contained in:
John Maddock
2007-11-24 12:25:25 +00:00
parent cf876f58f0
commit 4199529fd0
10 changed files with 319 additions and 43 deletions

View File

@ -33,30 +33,30 @@ int flags = REG_EXTENDED | REG_BASIC | REG_NOSPEC | REG_ICASE | REG_NOSUB |
int main()
{
regex_t re;
regex_tA re;
int result;
result = regcomp(&re, expression, REG_AWK);
result = regcompA(&re, expression, REG_AWK);
if(result > REG_NOERROR)
{
char buf[256];
regerror(result, &re, buf, sizeof(buf));
regerrorA(result, &re, buf, sizeof(buf));
printf(buf);
return result;
}
BOOST_TEST(re.re_nsub == 0);
matches[0].rm_so = 0;
matches[0].rm_eo = strlen(text);
result = regexec(&re, text, 1, matches, REG_NOTBOL | REG_NOTEOL | REG_STARTEND);
result = regexecA(&re, text, 1, matches, REG_NOTBOL | REG_NOTEOL | REG_STARTEND);
if(result > REG_NOERROR)
{
char buf[256];
regerror(result, &re, buf, sizeof(buf));
regerrorA(result, &re, buf, sizeof(buf));
printf(buf);
regfree(&re);
regfreeA(&re);
return result;
}
BOOST_TEST(matches[0].rm_so == matches[0].rm_eo == 1);
regfree(&re);
regfreeA(&re);
printf("no errors found\n");
return boost::report_errors();
}