From 42c934d8b9025195de98aeabca3bdae1769a6883 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 24 Nov 2007 06:01:58 +0000 Subject: [PATCH] Use g_print to print out --help text in locale encoding. (#469551, Takao 2007-11-23 Matthias Clasen * glib/goption.c: Use g_print to print out --help text in locale encoding. (#469551, Takao Fujiwara) svn path=/branches/glib-2-14/; revision=5923 --- ChangeLog | 7 +++++++ glib/goption.c | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7b9c2051..a0031722f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-11-24 Matthias Clasen + + Merge from trunk: + + * glib/goption.c: Use g_print to print out --help text in + locale encoding. (#469551, Takao Fujiwara) + 2007-11-24 Matthias Clasen Merge from trunk: diff --git a/glib/goption.c b/glib/goption.c index c385140f0..9d8084b9d 100644 --- a/glib/goption.c +++ b/glib/goption.c @@ -205,8 +205,9 @@ g_option_error_quark (void) * program functionality that should be displayed as a paragraph * below the usage line, use g_option_context_set_summary(). * - * Note that the @parameter_string is translated (see - * g_option_context_set_translate_func()). + * Note that the @parameter_string is translated using the + * function set with g_option_context_set_translate_func(), so + * it should normally be passed untranslated. * * Returns: a newly created #GOptionContext, which must be * freed with g_option_context_free() after use. @@ -771,7 +772,7 @@ print_help (GOptionContext *context, gchar *help; help = g_option_context_get_help (context, main_help, group); - g_printf (help); + g_print ("%s", help); g_free (help); exit (0);