search for: run_action

Displaying 9 results from an estimated 9 matches for "run_action".

2014 Nov 28
2
[PATCH] fish: show synopsis if command syntax is wrong
...;\n"; ); - pr " fprintf (stderr, _(\"type 'help %%s' for help on %%s\\n\"), cmd, cmd);\n"; pr " goto out_noargs;\n"; pr " }\n"; @@ -694,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 &q...
2014 Nov 28
0
Re: [PATCH] fish: show synopsis if command syntax is wrong
...f parameters is wrong. The idea seems sound to me. Shouldn't that be done also for fish commands? If so, just make "synopsis" a function taking args and optargs, and use it in both places. > @@ -694,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 &qu...
2014 Dec 01
2
Re: [PATCH] fish: show synopsis if command syntax is wrong
...we can reconstruct fish commands' definitions to take advantage of the auto-generation of synopsis done in this patch, but that can be another patch. I'll add this to my todo list. > > > @@ -694,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))...
2014 Dec 01
2
[PATCH v2] fish: show synopsis if command syntax is wrong
...;\n"; ); - pr " fprintf (stderr, _(\"type 'help %%s' for help on %%s\\n\"), cmd, cmd);\n"; pr " goto out_noargs;\n"; pr " }\n"; @@ -694,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 &q...
2010 Jun 01
1
[PATCH] fish: help command return error for non-existent commands (RHBZ#597145).
...const *argv); extern void print_strings (char *const *argv); @@ -71,7 +71,7 @@ extern void extended_help_message (void); /* in cmds.c (auto-generated) */ extern void list_commands (void); -extern void display_command (const char *cmd); +extern int display_command (const char *cmd); extern int run_action (const char *cmd, int argc, char *argv[]); /* in completion.c (auto-generated) */ diff --git a/src/generator.ml b/src/generator.ml index 2c33049..571ea3a 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -7575,7 +7575,7 @@ and generate_fish_cmds () = pr "\n"; (* display_c...
2014 Dec 02
1
Re: [PATCH v2] fish: show synopsis if command syntax is wrong
...pr " fprintf (stderr, _(\"type 'help %%s' for help on %%s\\n\"), cmd, cmd);\n"; > pr " goto out_noargs;\n"; > pr " }\n"; > > @@ -694,16 +684,28 @@ 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 &qu...
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
...) (rstructs_used_by fish_functions); (* run_<action> actions *) List.iter ( @@ -639,7 +635,7 @@ Guestfish will prompt for these separately." pr " return ret;\n"; pr "}\n"; pr "\n" - ) all_functions; + ) fish_functions; (* run_action function *) pr "int\n"; @@ -678,12 +674,6 @@ and generate_fish_cmds_h () = and generate_fish_cmds_gperf () = generate_header CStyle GPLv2plus; - let all_functions_sorted = - List.filter (fun { in_fish = b } -> b) all_functions_sorted in - - let all_functions_and_fish_comm...
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...gv); - else if (strcasecmp (cmd, "sparse") == 0) + else if (STRCASEEQ (cmd, "sparse")) r = do_sparse (cmd, argc, argv); - else if (strcasecmp (cmd, "time") == 0) + else if (STRCASEEQ (cmd, "time")) r = do_time (cmd, argc, argv); else r = run_action (cmd, argc, argv); @@ -941,8 +941,8 @@ display_builtin_command (const char *cmd) { /* help for actions is auto-generated, see display_command */ - if (strcasecmp (cmd, "alloc") == 0 || - strcasecmp (cmd, "allocate") == 0) + if (STRCASEEQ (cmd, "alloc") || +...