diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2002-12-12 23:52:29 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2002-12-12 23:52:29 +0000 |
commit | 37e7e80e5be26d4ff35a48877eb17eb73e4026f8 (patch) | |
tree | a08d42c6303bda7e56894debfb064ee675be8ac9 /gobject/gobject-query.c | |
parent | ab5fe79f8a9f3ad0b7f97c0a17468df08be54858 (diff) |
Add a test for positional parameters in g_snprintf(). Use g_printf()
* tests/string-test.c: Add a test for positional parameters in
g_snprintf().
* glib-genmarshal.c, gobject-query.c: Use g_printf() instead of
system printf. (#99319)
Diffstat (limited to 'gobject/gobject-query.c')
-rw-r--r-- | gobject/gobject-query.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/gobject/gobject-query.c b/gobject/gobject-query.c index e47a8d5dd..584c45113 100644 --- a/gobject/gobject-query.c +++ b/gobject/gobject-query.c @@ -20,7 +20,7 @@ #include <glib-object.h> -#include <stdio.h> +#include <glib/gprintf.h> #include <stdlib.h> #include <string.h> #ifdef HAVE_UNISTD_H @@ -66,9 +66,9 @@ show_nodes (GType type, if (type != root) for (i = 0; i < spacing; i++) - fprintf (f_out, "%s%s\n", indent, O_VLINE); + g_fprintf (f_out, "%s%s\n", indent, O_VLINE); - fprintf (f_out, "%s%s%s%s", + g_fprintf (f_out, "%s%s%s%s", indent, sibling ? O_BRANCH : (type != root ? O_LLEAF : O_SPACE), O_ESPACE, @@ -101,16 +101,16 @@ show_nodes (GType type, static gint help (gchar *arg) { - fprintf (stderr, "usage: query <qualifier> [-r <type>] [-{i|b} \"\"] [-s #] [-{h|x|y}]\n"); - fprintf (stderr, " -r specifiy root type\n"); - fprintf (stderr, " -n don't descend type tree\n"); - fprintf (stderr, " -h guess what ;)\n"); - fprintf (stderr, " -b specify indent string\n"); - fprintf (stderr, " -i specify incremental indent string\n"); - fprintf (stderr, " -s specify line spacing\n"); - fprintf (stderr, "qualifiers:\n"); - fprintf (stderr, " froots iterate over fundamental roots\n"); - fprintf (stderr, " tree print type tree\n"); + g_fprintf (stderr, "usage: query <qualifier> [-r <type>] [-{i|b} \"\"] [-s #] [-{h|x|y}]\n"); + g_fprintf (stderr, " -r specifiy root type\n"); + g_fprintf (stderr, " -n don't descend type tree\n"); + g_fprintf (stderr, " -h guess what ;)\n"); + g_fprintf (stderr, " -b specify indent string\n"); + g_fprintf (stderr, " -i specify incremental indent string\n"); + g_fprintf (stderr, " -s specify line spacing\n"); + g_fprintf (stderr, "qualifiers:\n"); + g_fprintf (stderr, " froots iterate over fundamental roots\n"); + g_fprintf (stderr, " tree print type tree\n"); return arg != NULL; } |