mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 21:21:15 -03:00
Replace variadic functions like sb_append and contains_str with variadic macros without a sentinel.
darcs-hash:20070928213227-75c98-2e7b06242acfd5fd0bf02ce77c41d52374f2363a.gz
This commit is contained in:
15
util.c
15
util.c
@@ -1175,16 +1175,6 @@ string_buffer_t *sb_new()
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
void sb_append( string_buffer_t *b, const wchar_t * s)
|
||||
{
|
||||
CHECK( b, );
|
||||
CHECK( s, );
|
||||
|
||||
b_append( b, s, sizeof(wchar_t)*(wcslen(s)+1) );
|
||||
b->used -= sizeof(wchar_t);
|
||||
}
|
||||
|
||||
void sb_append_substring( string_buffer_t *b, const wchar_t *s, size_t l )
|
||||
{
|
||||
wchar_t tmp=0;
|
||||
@@ -1209,7 +1199,7 @@ void sb_append_char( string_buffer_t *b, wchar_t c )
|
||||
b->used -= sizeof(wchar_t);
|
||||
}
|
||||
|
||||
void sb_append2( string_buffer_t *b, ... )
|
||||
void sb_append_internal( string_buffer_t *b, ... )
|
||||
{
|
||||
va_list va;
|
||||
wchar_t *arg;
|
||||
@@ -1219,7 +1209,8 @@ void sb_append2( string_buffer_t *b, ... )
|
||||
va_start( va, b );
|
||||
while( (arg=va_arg(va, wchar_t *) )!= 0 )
|
||||
{
|
||||
sb_append( b, arg );
|
||||
b_append( b, arg, sizeof(wchar_t)*(wcslen(arg)+1) );
|
||||
b->used -= sizeof(wchar_t);
|
||||
}
|
||||
va_end( va );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user