Displaying 9 results from an estimated 9 matches for "s_cmd_entry".
2016 Apr 11
1
[PATCH] fish: improve formatting of help text of generated commands
..."\\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 = NULL,\n";...
2014 Dec 01
2
[PATCH v2] fish: show synopsis if command syntax is wrong
...uot;
name2 shortdesc synopsis longdesc warnings describe_alias in
let text =
String.concat "\n" (pod2text ~trim:false ~discard:false "NAME" pod)
@@ -190,6 +190,7 @@ Guestfish will prompt for these separately."
pr "struct command_entry %s_cmd_entry = {\n" name;
pr " .name = \"%s\",\n" name2;
pr " .help = \"%s\",\n" (c_quote text);
+ pr " .synopsis = \"%s\",\n" (c_quote synopsis);
pr " .run = run_%s\n" name;
pr "};\n";...
2014 Dec 02
1
Re: [PATCH v2] fish: show synopsis if command syntax is wrong
...s. */\n";
> + pr "#define RUN_ERROR -1\n";
> + pr "#define RUN_WRONG_ARGS -2\n";
> + pr "\n";
>
> List.iter (
> fun { name = name } ->
> @@ -129,6 +133,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 " .synopsis = NULL,\n";
> pr " .run = run_%s\n" name;
> pr "};\n";
>...
2014 Nov 28
2
[PATCH] fish: show synopsis if command syntax is wrong
...*/
int (*run) (const char *cmd, size_t argc, char *argv[]);
diff --git a/generator/fish.ml b/generator/fish.ml
index 3f53ffa..951b376 100644
--- a/generator/fish.ml
+++ b/generator/fish.ml
@@ -190,6 +190,7 @@ Guestfish will prompt for these separately."
pr "struct command_entry %s_cmd_entry = {\n" name;
pr " .name = \"%s\",\n" name2;
pr " .help = \"%s\",\n" (c_quote text);
+ pr " .synopsis = \"%s\",\n" (c_quote synopsis);
pr " .run = run_%s\n" name;
pr "};\n";...
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
...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_functions_and_fish_c...
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...pr "extern int run_%s (const char *cmd, size_t argc, char *argv[]);\n"
name
) fish_commands;
@@ -712,7 +710,7 @@ and generate_fish_cmds_gperf () =
";
List.iter (
- fun { name = name } ->
+ fun { name } ->
pr "extern struct command_entry %s_cmd_entry;\n" name
) fish_functions_and_commands_sorted;
@@ -725,7 +723,7 @@ struct command_table;
";
List.iter (
- fun ({ name = name } as f) ->
+ fun ({ name } as f) ->
let aliases = get_aliases f in
let name2 = String.replace_char name '_' '-'...
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...ommand_table;
List.iter (
fun ({ name = name } as f) ->
let aliases = get_aliases f in
- let name2 = replace_char name '_' '-' in
+ let name2 = String.replace_char name '_' '-' in
(* The basic command. *)
pr "%s, &%s_cmd_entry\n" name name;
@@ -817,7 +818,7 @@ static const char *const commands[] = {
List.map (
fun ({ name = name } as f) ->
let aliases = get_aliases f in
- let name2 = replace_char name '_' '-' in
+ let name2 = String.replace_char name '_'...
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.