2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-03 09:02:11 +00:00

Fix up C++-isms in C code.

[SVN r21239]
This commit is contained in:
Dave Abrahams
2003-12-12 16:26:23 +00:00
parent a038b016ae
commit 832bb396db
2 changed files with 26 additions and 21 deletions

View File

@@ -32,22 +32,24 @@ LIST *regex_transform( PARSE *parse, FRAME *frame )
/* Result is cached and intentionally never freed */
regexp *re = regex_compile( pattern->string );
for(; l; l = l->next)
{
if( regexec( re, l->string ) )
regexp *re = regex_compile( pattern->string );
for(; l; l = l->next)
{
if (re->startp[1])
if( regexec( re, l->string ) )
{
string_append_range( buf, re->startp[1], re->endp[1] );
result = list_new( result, newstr( buf->value ) );
string_truncate( buf, 0 );
if (re->startp[1])
{
string_append_range( buf, re->startp[1], re->endp[1] );
result = list_new( result, newstr( buf->value ) );
string_truncate( buf, 0 );
}
}
}
string_free( buf );
}
string_free( buf );
return result;
}

View File

@@ -14,18 +14,21 @@ void declare_native_rule(char* module, char* rule, char** args,
if (m->native_rules == 0) {
m->native_rules = hashinit( sizeof( native_rule_t ), "native rules");
}
native_rule_t n, *np = &n;
n.name = rule;
if (args)
{
n.arguments = args_new();
lol_build( n.arguments->data, args );
}
else
{
n.arguments = 0;
native_rule_t n, *np = &n;
n.name = rule;
if (args)
{
n.arguments = args_new();
lol_build( n.arguments->data, args );
}
else
{
n.arguments = 0;
}
n.procedure = parse_make( f, P0, P0, P0, C0, C0, 0 );
hashenter(m->native_rules, (HASHDATA**)&np);
}
n.procedure = parse_make( f, P0, P0, P0, C0, C0, 0 );
hashenter(m->native_rules, (HASHDATA**)&np);
}