Displaying 7 results from an estimated 7 matches for "lookup_fish_command".
2014 Nov 28
2
[PATCH] fish: show synopsis if command syntax is wrong
...94,10 +679,16 @@ Guestfish will prompt for these separately."
pr "run_action (const char *cmd, size_t argc, char *argv[])\n";
pr "{\n";
pr " const struct command_table *ct;\n";
+ pr " int ret = -1;\n";
pr "\n";
pr " ct = lookup_fish_command (cmd, strlen (cmd));\n";
- pr " if (ct)\n";
- pr " return ct->entry->run (cmd, argc, argv);\n";
+ pr " if (ct) {\n";
+ pr " ret = ct->entry->run (cmd, argc, argv);\n";
+ pr " if (ret == -2) {\n";
+ pr " fp...
2014 Dec 01
2
[PATCH v2] fish: show synopsis if command syntax is wrong
...94,16 +679,23 @@ Guestfish will prompt for these separately."
pr "run_action (const char *cmd, size_t argc, char *argv[])\n";
pr "{\n";
pr " const struct command_table *ct;\n";
+ pr " int ret = -1;\n";
pr "\n";
pr " ct = lookup_fish_command (cmd, strlen (cmd));\n";
- pr " if (ct)\n";
- pr " return ct->entry->run (cmd, argc, argv);\n";
+ pr " if (ct) {\n";
+ pr " ret = ct->entry->run (cmd, argc, argv);\n";
+ pr " if (ret == -2) {\n";
+ pr " fp...
2014 Nov 28
0
Re: [PATCH] fish: show synopsis if command syntax is wrong
...l prompt for these separately."
> pr "run_action (const char *cmd, size_t argc, char *argv[])\n";
> pr "{\n";
> pr " const struct command_table *ct;\n";
> + pr " int ret = -1;\n";
> pr "\n";
> pr " ct = lookup_fish_command (cmd, strlen (cmd));\n";
> - pr " if (ct)\n";
> - pr " return ct->entry->run (cmd, argc, argv);\n";
> + pr " if (ct) {\n";
> + pr " ret = ct->entry->run (cmd, argc, argv);\n";
> + pr " if (ret == -2) {\n&qu...
2014 Dec 01
2
Re: [PATCH] fish: show synopsis if command syntax is wrong
..."
> > pr "run_action (const char *cmd, size_t argc, char *argv[])\n";
> > pr "{\n";
> > pr " const struct command_table *ct;\n";
> > + pr " int ret = -1;\n";
> > pr "\n";
> > pr " ct = lookup_fish_command (cmd, strlen (cmd));\n";
> > - pr " if (ct)\n";
> > - pr " return ct->entry->run (cmd, argc, argv);\n";
> > + pr " if (ct) {\n";
> > + pr " ret = ct->entry->run (cmd, argc, argv);\n";
> > + pr "...
2014 Dec 02
1
Re: [PATCH v2] fish: show synopsis if command syntax is wrong
...l prompt for these separately."
> pr "run_action (const char *cmd, size_t argc, char *argv[])\n";
> pr "{\n";
> pr " const struct command_table *ct;\n";
> + pr " int ret = -1;\n";
> pr "\n";
> pr " ct = lookup_fish_command (cmd, strlen (cmd));\n";
> - pr " if (ct)\n";
> - pr " return ct->entry->run (cmd, argc, argv);\n";
> + pr " if (ct) {\n";
> + pr " ret = ct->entry->run (cmd, argc, argv);\n";
> + pr " /* run function may r...
2016 Sep 02
6
[PATCH 0/4] generator: Some work to split large C files
By splitting up large C files we can make parallel compiles
a bit faster.
Rich.
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
...Lv2plus;
- let all_functions_sorted =
- List.filter (fun { in_fish = b } -> b) all_functions_sorted in
-
- let all_functions_and_fish_commands_sorted =
- List.sort action_compare (all_functions_sorted @ fish_commands) in
-
pr "\
%%language=ANSI-C
%%define lookup-function-name lookup_fish_command
@@ -705,7 +695,7 @@ and generate_fish_cmds_gperf () =
List.iter (
fun { name = name } ->
pr "extern struct command_entry %s_cmd_entry;\n" name
- ) all_functions_and_fish_commands_sorted;
+ ) fish_functions_and_commands_sorted;
pr "\
%%}
@@ -732,15 +722,12 @@...