aboutsummaryrefslogtreecommitdiffhomepage
path: root/complete.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-22 10:51:06 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-22 10:51:06 -0800
commit62bd43f17fa279b67fbd4482580a91fc2db9c899 (patch)
tree4a060823ccb92ea5e885a4221c85fd10b9bf580d /complete.cpp
parent917b4ff8bc542d161006cea8254885a193f5b8c3 (diff)
Large set of changes to migrate sb_out and sb_err to wcstring
Diffstat (limited to 'complete.cpp')
-rw-r--r--complete.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/complete.cpp b/complete.cpp
index 0f7f569f..ab0dfa2d 100644
--- a/complete.cpp
+++ b/complete.cpp
@@ -1853,7 +1853,7 @@ void complete( const wchar_t *cmd,
argument to the specified stringbuffer, but only if arguemnt is
non-null and longer than 0 characters.
*/
-static void append_switch( string_buffer_t *out,
+static void append_switch( wcstring &out,
const wcstring &opt,
const wcstring &argument )
{
@@ -1861,13 +1861,11 @@ static void append_switch( string_buffer_t *out,
return;
wcstring esc = escape_string( argument, 1 );
- sb_printf( out, L" --%ls %ls", opt.c_str(), esc.c_str() );
+ append_format( out, L" --%ls %ls", opt.c_str(), esc.c_str() );
}
-void complete_print( string_buffer_t *out )
+void complete_print( wcstring &out )
{
- CHECK( out, );
-
for (completion_entry_list_t::const_iterator iter = completion_entries.begin(); iter != completion_entries.end(); iter++)
{
const completion_entry_t *e = *iter;
@@ -1883,7 +1881,7 @@ void complete_print( string_buffer_t *out )
}
;
- sb_printf( out,
+ append_format( out,
L"complete%ls",
modestr[o->result_mode] );
@@ -1894,7 +1892,7 @@ void complete_print( string_buffer_t *out )
if( o->short_opt != 0 )
{
- sb_printf( out,
+ append_format( out,
L" --short-option '%lc'",
o->short_opt );
}
@@ -1916,7 +1914,7 @@ void complete_print( string_buffer_t *out )
L"condition",
o->condition );
- sb_printf( out, L"\n" );
+ out.append( L"\n" );
}
}
}