make style
This commit is contained in:
1 parent
f2650e7279
commit
0673dd206e
3 files changed
+9
-31
No files matched your search
@@ -8,7 +8,7 @@ It is based on pm3_help2JSON.py by
|
||||
Original Authors / Maintainers:
|
||||
- Samuel Windall
|
||||
|
||||
This version
|
||||
This version
|
||||
- Iceman
|
||||
|
||||
Note:
|
||||
@@ -92,7 +92,7 @@ const static vocabulory_t vocabulory[] = {\n""")
|
||||
args.output_file.write(""" {0, NULL}\n};
|
||||
|
||||
|
||||
char **rl_command_completion(const char *text, int start, int end) {
|
||||
char **rl_command_completion(const char *text, int start, int end) {
|
||||
rl_attempted_completion_over = 1;
|
||||
return rl_completion_matches (text, rl_command_generator);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,6 @@ const static vocabulory_t vocabulory[] = {
|
||||
{ 1, "data fsktonrz" },
|
||||
{ 1, "data manrawdecode" },
|
||||
{ 1, "data modulation" },
|
||||
{ 1, "data pwmdemod" },
|
||||
{ 1, "data rawdemod" },
|
||||
{ 1, "data askedgedetect" },
|
||||
{ 1, "data autocorr" },
|
||||
@@ -703,8 +702,8 @@ const static vocabulory_t vocabulory[] = {
|
||||
};
|
||||
|
||||
|
||||
char **rl_command_completion(const char *text, int start, int end) {
|
||||
rl_attempted_completion_over = 0;
|
||||
char **rl_command_completion(const char *text, int start, int end) {
|
||||
rl_attempted_completion_over = 1;
|
||||
return rl_completion_matches (text, rl_command_generator);
|
||||
}
|
||||
|
||||
@@ -732,12 +731,7 @@ char* rl_command_generator(const char *text, int state) {
|
||||
index++;
|
||||
|
||||
if (strncmp (command, rl_line_buffer, rlen) == 0) {
|
||||
const char *next = command + (rlen - len);
|
||||
const char *space = strstr(next, " ");
|
||||
if (space != NULL) {
|
||||
return strndup(next, space - next);
|
||||
}
|
||||
return strdup(next);
|
||||
return strdup(command + (rlen - len));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user