From 5d5526c1a3ced245bdca159db4840e48971a0469 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 29 Nov 2008 01:40:38 +0000 Subject: [PATCH] =?utf8?q?Bug=20562639=20=E2=80=93=20g=5Fparse=5Fdebug=5Ff?= =?utf8?q?lags()=20parsing=20"help"?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2008-11-28 Behdad Esfahbod Bug 562639 – g_parse_debug_flags() parsing "help" * glib/gutils.c (g_parse_debug_string): Print available keys if string is "help". svn path=/trunk/; revision=7710 --- ChangeLog | 7 +++++++ glib/gutils.c | 14 +++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 031dee68..a1549684 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-11-28 Behdad Esfahbod + + Bug 562639 – g_parse_debug_flags() parsing "help" + + * glib/gutils.c (g_parse_debug_string): Print available keys if + string is "help". + 2008-11-28 Behdad Esfahbod Bug 562638 – GDebugKey key member should be const diff --git a/glib/gutils.c b/glib/gutils.c index d5407cae..4ce96549 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -615,7 +615,7 @@ debug_key_matches (const gchar *key, /** * g_parse_debug_string: * @string: a list of debug options separated by colons, spaces, or - * commas; or the string "all" to set all flags, or %NULL. + * commas, or %NULL. * @keys: pointer to an array of #GDebugKey which associate * strings with bit flags. * @nkeys: the number of #GDebugKeys in the array. @@ -625,6 +625,10 @@ debug_key_matches (const gchar *key, * within GDK and GTK+ to parse the debug options passed on the * command line or through environment variables. * + * If @string is equal to "all", all flags are set. If @string + * is equal to "help", all the available keys in @keys are printed + * out to standard error. + * * Returns: the combined set of bit flags. */ guint @@ -648,6 +652,14 @@ g_parse_debug_string (const gchar *string, for (i=0; i