make style

This commit is contained in:
Philippe Teuwen
2021-12-13 00:35:10 +01:00
parent f2650e7279
commit 0673dd206e
3 changed files with 9 additions and 31 deletions
+2 -2
View File
@@ -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);
}
+3 -9
View File
@@ -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));
}
}
+4 -20
View File
File diff suppressed because one or more lines are too long