mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 02:06:18 +01:00
If the remaining argument has an arg_description, display the synopsis as
2005-05-24 Matthias Clasen <mclasen@redhat.com> * glib/goption.c (print_help): If the remaining argument has an arg_description, display the synopsis as PROGNAME [OPTION...] REST (#305346, Noah Levitt)
This commit is contained in:
parent
d38febf6b3
commit
0b8e42a2f5
@ -1,3 +1,9 @@
|
|||||||
|
2005-05-24 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* glib/goption.c (print_help): If the remaining argument
|
||||||
|
has an arg_description, display the synopsis as
|
||||||
|
PROGNAME [OPTION...] REST (#305346, Noah Levitt)
|
||||||
|
|
||||||
2005-05-20 Federico Mena Quintero <federico@ximian.com>
|
2005-05-20 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
Merged from glib-2-6:
|
Merged from glib-2-6:
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2005-05-24 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* glib/goption.c (print_help): If the remaining argument
|
||||||
|
has an arg_description, display the synopsis as
|
||||||
|
PROGNAME [OPTION...] REST (#305346, Noah Levitt)
|
||||||
|
|
||||||
2005-05-20 Federico Mena Quintero <federico@ximian.com>
|
2005-05-20 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
Merged from glib-2-6:
|
Merged from glib-2-6:
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2005-05-24 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* glib/goption.c (print_help): If the remaining argument
|
||||||
|
has an arg_description, display the synopsis as
|
||||||
|
PROGNAME [OPTION...] REST (#305346, Noah Levitt)
|
||||||
|
|
||||||
2005-05-20 Federico Mena Quintero <federico@ximian.com>
|
2005-05-20 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
Merged from glib-2-6:
|
Merged from glib-2-6:
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2005-05-24 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* glib/goption.c (print_help): If the remaining argument
|
||||||
|
has an arg_description, display the synopsis as
|
||||||
|
PROGNAME [OPTION...] REST (#305346, Noah Levitt)
|
||||||
|
|
||||||
2005-05-20 Federico Mena Quintero <federico@ximian.com>
|
2005-05-20 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
Merged from glib-2-6:
|
Merged from glib-2-6:
|
||||||
|
@ -437,9 +437,27 @@ print_help (GOptionContext *context,
|
|||||||
GOptionEntry *entry;
|
GOptionEntry *entry;
|
||||||
GHashTable *shadow_map;
|
GHashTable *shadow_map;
|
||||||
gboolean seen[256];
|
gboolean seen[256];
|
||||||
|
gchar *rest_description;
|
||||||
|
|
||||||
g_print ("%s\n %s %s %s\n\n",
|
rest_description = NULL;
|
||||||
|
if (context->main_group)
|
||||||
|
{
|
||||||
|
for (i = 0; i < context->main_group->n_entries; i++)
|
||||||
|
{
|
||||||
|
entry = &context->main_group->entries[i];
|
||||||
|
if (entry->long_name[0] == 0)
|
||||||
|
{
|
||||||
|
rest_description = entry->arg_description;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
g_print ("%s\n %s %s%s%s%s%s\n\n",
|
||||||
_("Usage:"), g_get_prgname(), _("[OPTION...]"),
|
_("Usage:"), g_get_prgname(), _("[OPTION...]"),
|
||||||
|
rest_description ? " " : "",
|
||||||
|
rest_description ? rest_description : "",
|
||||||
|
context->parameter_string ? " " : "",
|
||||||
context->parameter_string ? context->parameter_string : "");
|
context->parameter_string ? context->parameter_string : "");
|
||||||
|
|
||||||
memset (seen, 0, sizeof (gboolean) * 256);
|
memset (seen, 0, sizeof (gboolean) * 256);
|
||||||
|
Loading…
Reference in New Issue
Block a user