search for: command_entry

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

2016 Apr 11
1
[PATCH] fish: improve formatting of help text of generated commands
...eplace_str str "\\n" ("\\n\"\n" ^ indent ^ "\"") in + str + (* Generate a lot of different functions for guestfish. *) let generate_fish_cmds () = generate_header CStyle GPLv2plus; @@ -138,7 +143,7 @@ let generate_fish_cmds () = pr "struct command_entry %s_cmd_entry = {\n" name; pr " .name = \"%s\",\n" name2; - pr " .help = \"%s\",\n" (c_quote text); + pr " .help = \"%s\",\n" (c_quoted_indented ~indent:" " text); pr " .synopsis = NU...
2014 Dec 01
2
[PATCH v2] fish: show synopsis if command syntax is wrong
...1 fish/cmds-gperf.h | 1 + generator/fish.ml | 38 +++++++++++++++----------------------- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/fish/cmds-gperf.h b/fish/cmds-gperf.h index 74db69d..bcb3b5d 100644 --- a/fish/cmds-gperf.h +++ b/fish/cmds-gperf.h @@ -25,6 +25,7 @@ struct command_entry { const char *name; /* Short name. */ const char *help; /* Online help. */ + const char *synopsis; /* Synopsis. */ /* The run_* function. */ int (*run) (const char *cmd, size_t argc, char *argv[]); diff --git a/generator/fish.ml b/generator/fish.ml ind...
2014 Dec 02
1
Re: [PATCH v2] fish: show synopsis if command syntax is wrong
...48 +++++++++++++++++++++++++----------------------- > 2 files changed, 26 insertions(+), 23 deletions(-) > > diff --git a/fish/cmds-gperf.h b/fish/cmds-gperf.h > index 74db69d..bcb3b5d 100644 > --- a/fish/cmds-gperf.h > +++ b/fish/cmds-gperf.h > @@ -25,6 +25,7 @@ > struct command_entry { > const char *name; /* Short name. */ > const char *help; /* Online help. */ > + const char *synopsis; /* Synopsis. */ > > /* The run_* function. */ > int (*run) (const char *cmd, size_t argc, char *argv[]); > diff --git a/genera...
2014 Nov 28
2
[PATCH] fish: show synopsis if command syntax is wrong
...gt; --- fish/cmds-gperf.h | 1 + generator/fish.ml | 33 ++++++++++++--------------------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/fish/cmds-gperf.h b/fish/cmds-gperf.h index 74db69d..bcb3b5d 100644 --- a/fish/cmds-gperf.h +++ b/fish/cmds-gperf.h @@ -25,6 +25,7 @@ struct command_entry { const char *name; /* Short name. */ const char *help; /* Online help. */ + const char *synopsis; /* Synopsis. */ /* The run_* function. */ int (*run) (const char *cmd, size_t argc, char *argv[]); diff --git a/generator/fish.ml b/generator/fish.ml ind...
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.
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...= shortdesc; longdesc = longdesc } as f) -> + fun ({ name; style = _, args, optargs; shortdesc; longdesc } as f) -> let aliases = get_aliases f in let name2 = String.replace_char name '_' '-' in @@ -619,7 +617,7 @@ let generate_fish_cmds () = (* List of command_entry structs for pure guestfish commands. *) List.iter ( - fun ({ name = name; shortdesc = shortdesc; longdesc = longdesc } as f) -> + fun ({ name; shortdesc; longdesc } as f) -> let aliases = get_aliases f in let name2 = String.replace_char name '_' '-' in...
2017 Oct 04
11
[PATCH 0/9] build: Require OCaml >= 4.02.
Per my previous email: https://www.redhat.com/archives/libguestfs/2017-September/msg00203.html I'd like to talk about requiring a more modern version of the OCaml compiler. These commits show some of the code changes which would be possible with OCaml >= 3.12 [which it turns out we already require by accident] and also with OCaml >= 4.02. The latter is my favoured option. Rich.
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
...ds_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 @@ struct command_table; fun alias -> pr "%s, &%s_cmd_entry\n" alias name; ) aliases; - ) all_functio...
2012 Jul 14
6
[PATCH 0/6] Allow non-optargs functions to gain optional arguments.
This rather complex set of patches allow non-optargs functions to gain optional arguments, while preserving source and binary backwards compatibility. The problem is that we cannot add an optional argument to an existing function. For example, we might want to add flags to the 'lvresize' API which currently has no optional arguments.