summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-11-22 16:39:37 +0000
committerRichard W.M. Jones <rjones@redhat.com>2011-11-22 16:41:47 +0000
commit99ec97dcdfaf242ba0683a230ba51e4a87f7458b (patch)
tree56f237cdcb5341ad94a4838f6fd5de0ced8ce98a /generator
parent7b3137e664c3f4edf6ac7043a34c4166567e17bd (diff)
downloadlibguestfs-99ec97dcdfaf242ba0683a230ba51e4a87f7458b.tar.gz
libguestfs-99ec97dcdfaf242ba0683a230ba51e4a87f7458b.tar.xz
libguestfs-99ec97dcdfaf242ba0683a230ba51e4a87f7458b.zip
fish: In generated code, put function names on a new line.
eg: static void run_foo () { }
Diffstat (limited to 'generator')
-rw-r--r--generator/generator_fish.ml15
1 files changed, 10 insertions, 5 deletions
diff --git a/generator/generator_fish.ml b/generator/generator_fish.ml
index 4111be56..03711d1d 100644
--- a/generator/generator_fish.ml
+++ b/generator/generator_fish.ml
@@ -173,7 +173,8 @@ Guestfish will prompt for these separately."
) all_functions;
(* list_commands function, which implements guestfish -h *)
- pr "void list_commands (void)\n";
+ pr "void\n";
+ pr "list_commands (void)\n";
pr "{\n";
pr " printf (\" %%-16s %%s\\n\", _(\"Command\"), _(\"Description\"));\n";
pr " list_builtin_commands ();\n";
@@ -189,7 +190,8 @@ Guestfish will prompt for these separately."
pr "\n";
(* display_command function, which implements guestfish -h cmd *)
- pr "int display_command (const char *cmd)\n";
+ pr "int\n";
+ pr "display_command (const char *cmd)\n";
pr "{\n";
pr " const struct command_table *ct;\n";
pr "\n";
@@ -204,7 +206,8 @@ Guestfish will prompt for these separately."
pr "\n";
let emit_print_list_function typ =
- pr "static void print_%s_list (struct guestfs_%s_list *%ss)\n"
+ pr "static void\n";
+ pr "print_%s_list (struct guestfs_%s_list *%ss)\n"
typ typ typ;
pr "{\n";
pr " unsigned int i;\n";
@@ -224,7 +227,8 @@ Guestfish will prompt for these separately."
let needs_i =
List.exists (function (_, (FUUID|FBuffer)) -> true | _ -> false) cols in
- pr "static void print_%s_indent (struct guestfs_%s *%s, const char *indent)\n" typ typ typ;
+ pr "static void\n";
+ pr "print_%s_indent (struct guestfs_%s *%s, const char *indent)\n" typ typ typ;
pr "{\n";
if needs_i then (
pr " unsigned int i;\n";
@@ -284,7 +288,8 @@ Guestfish will prompt for these separately."
List.iter (
function
| typ, (RStructOnly | RStructAndList) ->
- pr "static void print_%s (struct guestfs_%s *%s)\n" typ typ typ;
+ pr "static void\n";
+ pr "print_%s (struct guestfs_%s *%s)\n" typ typ typ;
pr "{\n";
pr " print_%s_indent (%s, \"\");\n" typ typ;
pr "}\n";