mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-29 11:00:02 +01:00
Set program name before calling the pre-parse hooks.
2004-09-01 Anders Carlsson <andersca@gnome.org> * glib/goption.c: (g_option_context_parse): Set program name before calling the pre-parse hooks.
This commit is contained in:
parent
338d949559
commit
d1871edbdc
@ -1,3 +1,8 @@
|
|||||||
|
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
|
* glib/goption.c: (g_option_context_parse):
|
||||||
|
Set program name before calling the pre-parse hooks.
|
||||||
|
|
||||||
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
* glib/goption.c: (g_option_context_free), (print_help),
|
* glib/goption.c: (g_option_context_free), (print_help),
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
|
* glib/goption.c: (g_option_context_parse):
|
||||||
|
Set program name before calling the pre-parse hooks.
|
||||||
|
|
||||||
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
* glib/goption.c: (g_option_context_free), (print_help),
|
* glib/goption.c: (g_option_context_free), (print_help),
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
|
* glib/goption.c: (g_option_context_parse):
|
||||||
|
Set program name before calling the pre-parse hooks.
|
||||||
|
|
||||||
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
* glib/goption.c: (g_option_context_free), (print_help),
|
* glib/goption.c: (g_option_context_free), (print_help),
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
|
* glib/goption.c: (g_option_context_parse):
|
||||||
|
Set program name before calling the pre-parse hooks.
|
||||||
|
|
||||||
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
* glib/goption.c: (g_option_context_free), (print_help),
|
* glib/goption.c: (g_option_context_free), (print_help),
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
|
* glib/goption.c: (g_option_context_parse):
|
||||||
|
Set program name before calling the pre-parse hooks.
|
||||||
|
|
||||||
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
2004-09-01 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
* glib/goption.c: (g_option_context_free), (print_help),
|
* glib/goption.c: (g_option_context_free), (print_help),
|
||||||
|
@ -822,6 +822,24 @@ g_option_context_parse (GOptionContext *context,
|
|||||||
gint i, j, k;
|
gint i, j, k;
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
|
/* Set program name */
|
||||||
|
if (argc && argv)
|
||||||
|
{
|
||||||
|
gchar *prgname;
|
||||||
|
|
||||||
|
prgname = strrchr ((*argv)[0], G_DIR_SEPARATOR);
|
||||||
|
if (prgname)
|
||||||
|
prgname++;
|
||||||
|
else
|
||||||
|
prgname = (*argv)[0];
|
||||||
|
|
||||||
|
g_set_prgname (prgname);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_set_prgname ("<unknown>");
|
||||||
|
}
|
||||||
|
|
||||||
/* Call pre-parse hooks */
|
/* Call pre-parse hooks */
|
||||||
list = context->groups;
|
list = context->groups;
|
||||||
while (list)
|
while (list)
|
||||||
@ -847,16 +865,6 @@ g_option_context_parse (GOptionContext *context,
|
|||||||
|
|
||||||
if (argc && argv)
|
if (argc && argv)
|
||||||
{
|
{
|
||||||
gchar *prgname;
|
|
||||||
|
|
||||||
prgname = strrchr ((*argv)[0], G_DIR_SEPARATOR);
|
|
||||||
if (prgname)
|
|
||||||
prgname++;
|
|
||||||
else
|
|
||||||
prgname = (*argv)[0];
|
|
||||||
|
|
||||||
g_set_prgname (prgname);
|
|
||||||
|
|
||||||
for (i = 1; i < *argc; i++)
|
for (i = 1; i < *argc; i++)
|
||||||
{
|
{
|
||||||
gchar *arg;
|
gchar *arg;
|
||||||
@ -1062,10 +1070,6 @@ g_option_context_parse (GOptionContext *context,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
g_set_prgname ("<unknown>");
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user