mirror of
https://github.com/boostorg/regex.git
synced 2025-08-04 15:04:33 +02:00
Merged accumulated patches from Trunk.
[SVN r62831]
This commit is contained in:
@@ -35,7 +35,7 @@ int main()
|
||||
regex_tA re;
|
||||
int result;
|
||||
result = regcompA(&re, expression, REG_AWK);
|
||||
if(result > REG_NOERROR)
|
||||
if(result > (int)REG_NOERROR)
|
||||
{
|
||||
char buf[256];
|
||||
regerrorA(result, &re, buf, sizeof(buf));
|
||||
@@ -46,7 +46,7 @@ int main()
|
||||
matches[0].rm_so = 0;
|
||||
matches[0].rm_eo = strlen(text);
|
||||
result = regexecA(&re, text, 1, matches, REG_NOTBOL | REG_NOTEOL | REG_STARTEND);
|
||||
if(result > REG_NOERROR)
|
||||
if(result > (int)REG_NOERROR)
|
||||
{
|
||||
char buf[256];
|
||||
regerrorA(result, &re, buf, sizeof(buf));
|
||||
@@ -54,7 +54,7 @@ int main()
|
||||
regfreeA(&re);
|
||||
return result;
|
||||
}
|
||||
assert(matches[0].rm_so == matches[0].rm_eo == 1);
|
||||
assert((matches[0].rm_so == matches[0].rm_eo) && (matches[0].rm_eo == 1));
|
||||
regfreeA(&re);
|
||||
printf("no errors found\n");
|
||||
return 0;
|
||||
|
@@ -45,11 +45,11 @@ int main()
|
||||
char nbuf[256];
|
||||
int i;
|
||||
result = regcomp(&re, expression, REG_AWK);
|
||||
if(result > REG_NOERROR)
|
||||
if(result > (int)REG_NOERROR)
|
||||
{
|
||||
regerror(result, &re, buf, sizeof(buf));
|
||||
for(i = 0; i < 256; ++i)
|
||||
nbuf[i] = buf[i];
|
||||
nbuf[i] = (char)(buf[i]);
|
||||
printf(nbuf);
|
||||
return result;
|
||||
}
|
||||
@@ -61,11 +61,11 @@ int main()
|
||||
matches[0].rm_so = 0;
|
||||
matches[0].rm_eo = wcslen(text);
|
||||
result = regexec(&re, text, 1, matches, REG_NOTBOL | REG_NOTEOL | REG_STARTEND);
|
||||
if(result > REG_NOERROR)
|
||||
if(result > (int)REG_NOERROR)
|
||||
{
|
||||
regerror(result, &re, buf, sizeof(buf));
|
||||
for(i = 0; i < 256; ++i)
|
||||
nbuf[i] = buf[i];
|
||||
nbuf[i] = (char)(buf[i]);
|
||||
printf(nbuf);
|
||||
regfree(&re);
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user