From 0e716763d80f56f6cb80ad9b673af8fff9296a95 Mon Sep 17 00:00:00 2001 From: liljencrantz Date: Sat, 29 Sep 2007 07:32:27 +1000 Subject: Replace variadic functions like sb_append and contains_str with variadic macros without a sentinel. darcs-hash:20070928213227-75c98-2e7b06242acfd5fd0bf02ce77c41d52374f2363a.gz --- parser.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'parser.c') diff --git a/parser.c b/parser.c index 0832939a..a699219e 100644 --- a/parser.c +++ b/parser.c @@ -527,7 +527,7 @@ const wchar_t *parser_get_block_desc( int block ) */ static int parser_is_pipe_forbidden( wchar_t *word ) { - return CONTAINS( word, + return contains( word, L"exec", L"case", L"break", @@ -1008,7 +1008,7 @@ void parser_stack_trace( block_t *b, string_buffer_t *buff) for( i=1; b->param2.function_call_process->argv[i]; i++ ) { - sb_append2( &tmp, i>1?L" ":L"", b->param2.function_call_process->argv[i], (void *)0 ); + sb_append( &tmp, i>1?L" ":L"", b->param2.function_call_process->argv[i], (void *)0 ); } sb_printf( buff, _(L"\twith parameter list '%ls'\n"), (wchar_t *)tmp.buff ); @@ -1763,7 +1763,7 @@ static int parse_job( process_t *p, mark = tok_get_pos( tok ); - if( CONTAINS( nxt, + if( contains( nxt, L"command", L"builtin", L"not", @@ -2944,7 +2944,7 @@ int parser_test( const wchar_t * buff, command is needed, such as after 'and' or 'while' */ - if( CONTAINS( cmd, + if( contains( cmd, L"end" ) ) { err=1; @@ -3018,7 +3018,7 @@ int parser_test( const wchar_t * buff, had_cmd = 0; } - if( CONTAINS( cmd, + if( contains( cmd, L"or", L"and" ) ) { @@ -3152,7 +3152,7 @@ int parser_test( const wchar_t * buff, /* Test that break and continue are only used within loop blocks */ - if( CONTAINS( cmd, L"break", L"continue" ) ) + if( contains( cmd, L"break", L"continue" ) ) { int found_loop=0; int i; -- cgit v1.2.3