aboutsummaryrefslogtreecommitdiffhomepage
path: root/complete.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-01-13 23:44:18 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-01-13 23:54:49 -0800
commit8ba79d6ab9093388df36c06c2b9e2e2b95014cd5 (patch)
tree6e8f5780d241a702d8046dd328e504e9d4eef917 /complete.cpp
parent57c9eeeecb57a618ab534135f07144a4bbc99324 (diff)
Migrate function.cpp to STL types.
Diffstat (limited to 'complete.cpp')
-rw-r--r--complete.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/complete.cpp b/complete.cpp
index c1f8b744..5c1218df 100644
--- a/complete.cpp
+++ b/complete.cpp
@@ -800,7 +800,7 @@ int complete_is_valid_option( const wchar_t *str,
if( is_short_opt )
{
- int j;
+ size_t j;
opt_found=1;
for( j=1; j<wcslen(opt); j++)
@@ -1169,7 +1169,12 @@ static void complete_cmd( const wchar_t *cmd,
if( use_function )
{
- function_get_names( &possible_comp, cmd[0] == L'_' );
+ //function_get_names( &possible_comp, cmd[0] == L'_' );
+ wcstring_list_t names = function_get_names(cmd[0] == L'_' );
+ for (size_t i=0; i < names.size(); i++) {
+ al_push(&possible_comp, names.at(i).c_str());
+ }
+
complete_strings( comp, cmd, 0, &complete_function_desc, &possible_comp, 0 );
}
@@ -2111,7 +2116,7 @@ void complete_print( string_buffer_t *out )
complete_entry_opt_t *o;
for( o= e->first_option; o; o=o->next )
{
- wchar_t *modestr[] =
+ const wchar_t *modestr[] =
{
L"",
L" --no-files",