mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 22:46:15 +01:00
Pass the option name also in the NO_ARG case. (#308602, Masatake YAMATO)
2005-06-22 Matthias Clasen <mclasen@redhat.com> * glib/goption.c (parse_short_option, parse_long_option): Pass the option name also in the NO_ARG case. (#308602, Masatake YAMATO)
This commit is contained in:
parent
1833a93ddd
commit
0c2739405c
@ -1,3 +1,9 @@
|
|||||||
|
2005-06-22 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* glib/goption.c (parse_short_option, parse_long_option):
|
||||||
|
Pass the option name also in the NO_ARG case. (#308602,
|
||||||
|
Masatake YAMATO)
|
||||||
|
|
||||||
2005-06-22 Tor Lillqvist <tml@novell.com>
|
2005-06-22 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
* glib/gfileutils.c (g_makepath): New function. Creates a
|
* glib/gfileutils.c (g_makepath): New function. Creates a
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2005-06-22 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* glib/goption.c (parse_short_option, parse_long_option):
|
||||||
|
Pass the option name also in the NO_ARG case. (#308602,
|
||||||
|
Masatake YAMATO)
|
||||||
|
|
||||||
2005-06-22 Tor Lillqvist <tml@novell.com>
|
2005-06-22 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
* glib/gfileutils.c (g_makepath): New function. Creates a
|
* glib/gfileutils.c (g_makepath): New function. Creates a
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2005-06-22 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* glib/goption.c (parse_short_option, parse_long_option):
|
||||||
|
Pass the option name also in the NO_ARG case. (#308602,
|
||||||
|
Masatake YAMATO)
|
||||||
|
|
||||||
2005-06-22 Tor Lillqvist <tml@novell.com>
|
2005-06-22 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
* glib/gfileutils.c (g_makepath): New function. Creates a
|
* glib/gfileutils.c (g_makepath): New function. Creates a
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2005-06-22 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* glib/goption.c (parse_short_option, parse_long_option):
|
||||||
|
Pass the option name also in the NO_ARG case. (#308602,
|
||||||
|
Masatake YAMATO)
|
||||||
|
|
||||||
2005-06-22 Tor Lillqvist <tml@novell.com>
|
2005-06-22 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
* glib/gfileutils.c (g_makepath): New function. Creates a
|
* glib/gfileutils.c (g_makepath): New function. Creates a
|
||||||
|
@ -904,8 +904,13 @@ parse_short_option (GOptionContext *context,
|
|||||||
{
|
{
|
||||||
if (NO_ARG (&group->entries[j]))
|
if (NO_ARG (&group->entries[j]))
|
||||||
{
|
{
|
||||||
|
gchar *option_name;
|
||||||
|
|
||||||
|
option_name = g_strdup_printf ("-%c", group->entries[j].short_name);
|
||||||
parse_arg (context, group, &group->entries[j],
|
parse_arg (context, group, &group->entries[j],
|
||||||
NULL, NULL, error);
|
NULL, option_name, error);
|
||||||
|
g_free (option_name);
|
||||||
|
|
||||||
*parsed = TRUE;
|
*parsed = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -972,8 +977,12 @@ parse_long_option (GOptionContext *context,
|
|||||||
if (NO_ARG (&group->entries[j]) &&
|
if (NO_ARG (&group->entries[j]) &&
|
||||||
strcmp (arg, group->entries[j].long_name) == 0)
|
strcmp (arg, group->entries[j].long_name) == 0)
|
||||||
{
|
{
|
||||||
|
gchar *option_name;
|
||||||
|
|
||||||
|
option_name = g_strconcat ("--", group->entries[j].long_name, NULL);
|
||||||
parse_arg (context, group, &group->entries[j],
|
parse_arg (context, group, &group->entries[j],
|
||||||
NULL, NULL, error);
|
NULL, option_name, error);
|
||||||
|
g_free(option_name);
|
||||||
|
|
||||||
add_pending_null (context, &((*argv)[*index]), NULL);
|
add_pending_null (context, &((*argv)[*index]), NULL);
|
||||||
*parsed = TRUE;
|
*parsed = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user