replace tabs with spaces
This commit is contained in:
parent
1fe7d4be46
commit
c225488cd4
1 changed files with 13 additions and 13 deletions
|
|
@ -153,22 +153,22 @@ static char *my_rl_complete(char *token, int *match)
|
|||
*/
|
||||
static int cli_completion(char *token, char ***av)
|
||||
{
|
||||
int num, total = 0;
|
||||
char **copy;
|
||||
int num, total = 0;
|
||||
char **copy;
|
||||
|
||||
auto& cmd = cli_commands();
|
||||
num = cmd.size();
|
||||
auto& cmd = cli_commands();
|
||||
num = cmd.size();
|
||||
|
||||
copy = (char **) malloc (num * sizeof(char *));
|
||||
for (auto it : cmd) {
|
||||
if (!strncmp (it.c_str(), token, strlen (token))) {
|
||||
copy[total] = strdup ( it.c_str() );
|
||||
total ++;
|
||||
}
|
||||
}
|
||||
*av = copy;
|
||||
copy = (char **) malloc (num * sizeof(char *));
|
||||
for (auto it : cmd) {
|
||||
if (!strncmp (it.c_str(), token, strlen (token))) {
|
||||
copy[total] = strdup ( it.c_str() );
|
||||
total ++;
|
||||
}
|
||||
}
|
||||
*av = copy;
|
||||
|
||||
return total;
|
||||
return total;
|
||||
}
|
||||
|
||||
/***
|
||||
|
|
|
|||
Loading…
Reference in a new issue