mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +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>
|
||||
|
||||
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>
|
||||
|
||||
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>
|
||||
|
||||
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>
|
||||
|
||||
Merged from glib-2-6:
|
||||
|
@ -437,9 +437,27 @@ print_help (GOptionContext *context,
|
||||
GOptionEntry *entry;
|
||||
GHashTable *shadow_map;
|
||||
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...]"),
|
||||
rest_description ? " " : "",
|
||||
rest_description ? rest_description : "",
|
||||
context->parameter_string ? " " : "",
|
||||
context->parameter_string ? context->parameter_string : "");
|
||||
|
||||
memset (seen, 0, sizeof (gboolean) * 256);
|
||||
|
Loading…
Reference in New Issue
Block a user