aboutsummaryrefslogtreecommitdiffhomepage
path: root/builtin_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 /builtin_complete.cpp
parent917b4ff8bc542d161006cea8254885a193f5b8c3 (diff)
Large set of changes to migrate sb_out and sb_err to wcstring
Diffstat (limited to 'builtin_complete.cpp')
-rw-r--r--builtin_complete.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/builtin_complete.cpp b/builtin_complete.cpp
index 24175c96..39b59920 100644
--- a/builtin_complete.cpp
+++ b/builtin_complete.cpp
@@ -397,11 +397,11 @@ static int builtin_complete( parser_t &parser, wchar_t **argv )
case 0:
if(long_options[opt_index].flag != 0)
break;
- sb_printf( sb_err,
+ append_format(stderr_buffer,
BUILTIN_ERR_UNKNOWN,
argv[0],
long_options[opt_index].name );
- builtin_print_help( parser, argv[0], sb_err );
+ builtin_print_help( parser, argv[0], stderr_buffer );
res = 1;
@@ -434,7 +434,7 @@ static int builtin_complete( parser_t &parser, wchar_t **argv )
}
else
{
- sb_printf( sb_err, L"%ls: Invalid token '%ls'\n", argv[0], woptarg );
+ append_format(stderr_buffer, L"%ls: Invalid token '%ls'\n", argv[0], woptarg );
res = 1;
}
break;
@@ -481,7 +481,7 @@ static int builtin_complete( parser_t &parser, wchar_t **argv )
break;
case 'h':
- builtin_print_help( parser, argv[0], sb_out );
+ builtin_print_help( parser, argv[0], stdout_buffer );
return 0;
case '?':
@@ -499,12 +499,12 @@ static int builtin_complete( parser_t &parser, wchar_t **argv )
{
if( parser.test( condition, 0, 0, 0 ) )
{
- sb_printf( sb_err,
+ append_format(stderr_buffer,
L"%ls: Condition '%ls' contained a syntax error\n",
argv[0],
condition );
- parser.test( condition, 0, sb_err, argv[0] );
+ parser.test( condition, 0, &stderr_buffer, argv[0] );
res = 1;
}
@@ -517,12 +517,12 @@ static int builtin_complete( parser_t &parser, wchar_t **argv )
{
if( parser.test_args( comp, 0, 0 ) )
{
- sb_printf( sb_err,
+ append_format(stderr_buffer,
L"%ls: Completion '%ls' contained a syntax error\n",
argv[0],
comp );
- parser.test_args( comp, sb_err, argv[0] );
+ parser.test_args( comp, &stderr_buffer, argv[0] );
res = 1;
}
@@ -567,11 +567,11 @@ static int builtin_complete( parser_t &parser, wchar_t **argv )
if( !(next.description).empty() )
{
- sb_printf( sb_out, L"%ls%ls\t%ls\n", prepend, next.completion.c_str(), next.description.c_str() );
+ append_format(stdout_buffer, L"%ls%ls\t%ls\n", prepend, next.completion.c_str(), next.description.c_str() );
}
else
{
- sb_printf( sb_out, L"%ls%ls\n", prepend, next.completion.c_str() );
+ append_format(stdout_buffer, L"%ls%ls\n", prepend, next.completion.c_str() );
}
}
@@ -583,10 +583,10 @@ static int builtin_complete( parser_t &parser, wchar_t **argv )
}
else if( woptind != argc )
{
- sb_printf( sb_err,
+ append_format(stderr_buffer,
_( L"%ls: Too many arguments\n" ),
argv[0] );
- builtin_print_help( parser, argv[0], sb_err );
+ builtin_print_help( parser, argv[0], stderr_buffer );
res = 1;
}
@@ -594,7 +594,7 @@ static int builtin_complete( parser_t &parser, wchar_t **argv )
{
/* No arguments specified, meaning we print the definitions of
* all specified completions to stdout.*/
- complete_print( sb_out );
+ complete_print( stdout_buffer );
}
else
{