Displaying 8 results from an estimated 8 matches for "s_indent".
2016 Feb 24
3
[PATCH 1/3] src: generate code for printing contents of structs
...rint.h\"
+
+";
+
+ let write_structs =
+ List.iter (
+ fun { s_name = typ; s_cols = cols } ->
+ let needs_i =
+ List.exists (function (_, (FUUID|FBuffer)) -> true | _ -> false) cols in
+
+ pr "void\n";
+ pr "guestfs_int_print_%s_indent (struct guestfs_%s *%s, FILE *dest, const char *linesep, const char *indent)\n"
+ typ typ typ;
+ pr "{\n";
+ if needs_i then (
+ pr " size_t i;\n";
+ pr "\n"
+ );
+ List.iter (
+ function
+...
2009 Aug 17
2
[PATCH libguestfs] generator.ml: do not emit unused print_*_list functions
...(struct guestfs_%s_list *%ss)\n"
+ typ typ typ;
+ pr "{\n";
+ pr " int i;\n";
+ pr "\n";
+ pr " for (i = 0; i < %ss->len; ++i) {\n" typ;
+ pr " printf (\"[%%d] = {\\n\", i);\n";
+ pr " print_%s_indent (&%ss->val[i], \" \");\n" typ typ;
+ pr " printf (\"}\\n\");\n";
+ pr " }\n";
+ pr "}\n";
+ pr "\n";
+ in
+
(* print_* functions *)
List.iter (
fun (typ, cols) ->
@@ -6119,20 +6134,17 @@ and gene...
2016 Feb 24
0
[PATCH 3/3] src: print contents of structs and struct lists on tracing
...)
- pr "%s fprintf (trace_buffer.fp, \"<struct guestfs_%s *>\");\n"
- indent typ (* XXX *)
+ pr "%s fprintf (trace_buffer.fp, \"<struct guestfs_%s = \");\n"
+ indent typ;
+ pr "%s guestfs_int_print_%s_indent (%s, trace_buffer.fp, \", \", \"\");\n"
+ indent typ rv;
+ pr "%s fprintf (trace_buffer.fp, \">\");\n" indent
| RStructList (_, typ) ->
- pr "%s fprintf (trace_buffer.fp, \"<struct guestfs_%s_list *>...
2009 Aug 17
1
[PATCH libguestfs] generator.ml: do not emit unused print_* functions
...--- a/src/generator.ml
+++ b/src/generator.ml
@@ -6129,11 +6129,6 @@ and generate_fish_cmds () =
) cols;
pr "}\n";
pr "\n";
- pr "static void print_%s (struct guestfs_%s *%s)\n" typ typ typ;
- pr "{\n";
- pr " print_%s_indent (%s, \"\");\n" typ typ;
- pr "}\n";
- pr "\n";
) structs;
(* Emit a print_TYPE_list function definition only if that function is used. *)
@@ -6145,6 +6140,18 @@ and generate_fish_cmds () =
| typ, _ -> () (* empty *)
) rstructs_used;
+...
2015 Jul 02
0
[PATCH] Fix various -Wformat problems.
...i;\n";
+ pr " size_t i;\n";
pr "\n";
pr " for (i = 0; i < %ss->len; ++i) {\n" typ;
- pr " printf (\"[%%d] = {\\n\", i);\n";
+ pr " printf (\"[%%zu] = {\\n\", i);\n";
pr " print_%s_indent (&%ss->val[i], \" \");\n" typ typ;
pr " printf (\"}\\n\");\n";
pr " }\n";
@@ -270,7 +270,7 @@ Guestfish will prompt for these separately."
pr "print_%s_indent (struct guestfs_%s *%s, const char *indent)\n" typ...
2015 Jul 02
0
[PATCH v2] Fix various -Wformat problems.
...i;\n";
+ pr " size_t i;\n";
pr "\n";
pr " for (i = 0; i < %ss->len; ++i) {\n" typ;
- pr " printf (\"[%%d] = {\\n\", i);\n";
+ pr " printf (\"[%%zu] = {\\n\", i);\n";
pr " print_%s_indent (&%ss->val[i], \" \");\n" typ typ;
pr " printf (\"}\\n\");\n";
pr " }\n";
@@ -270,7 +270,7 @@ Guestfish will prompt for these separately."
pr "print_%s_indent (struct guestfs_%s *%s, const char *indent)\n" typ...
2009 Aug 21
9
enable -Werror and all of gcc's warning options
Here is a bunch of small patches to make fish/ build
with most warnings enabled:
[1/9] edit.c: avoid warning about signed/unsigned comparison
[2/9] fish.c: avoid warnings
[3/9] tilde.c: avoid a warning
[4/9] fish.c: avoid "assignment discards qualifiers..." warning
[5/9] fish.c: avoid signed/unsigned-comparison warning
[6/9] fish.c: don't perform arithmetic on void*
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.