mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-10 04:45:48 +01:00
Set the program name from argv[0], noticed by Masatake YAMATO.
Fri Aug 27 00:45:41 2004 Matthias Clasen <maclas@gmx.de> * glib/goption.c (g_option_context_parse): Set the program name from argv[0], noticed by Masatake YAMATO.
This commit is contained in:
parent
b359dbbf5e
commit
c8dfe75d22
@ -1,3 +1,8 @@
|
|||||||
|
Fri Aug 27 00:45:41 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* glib/goption.c (g_option_context_parse): Set the program name
|
||||||
|
from argv[0], noticed by Masatake YAMATO.
|
||||||
|
|
||||||
2004-08-26 Tor Lillqvist <tml@iki.fi>
|
2004-08-26 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* tests/testglib.c (main): Test the new XDG basedir functions.
|
* tests/testglib.c (main): Test the new XDG basedir functions.
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Aug 27 00:45:41 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* glib/goption.c (g_option_context_parse): Set the program name
|
||||||
|
from argv[0], noticed by Masatake YAMATO.
|
||||||
|
|
||||||
2004-08-26 Tor Lillqvist <tml@iki.fi>
|
2004-08-26 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* tests/testglib.c (main): Test the new XDG basedir functions.
|
* tests/testglib.c (main): Test the new XDG basedir functions.
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Aug 27 00:45:41 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* glib/goption.c (g_option_context_parse): Set the program name
|
||||||
|
from argv[0], noticed by Masatake YAMATO.
|
||||||
|
|
||||||
2004-08-26 Tor Lillqvist <tml@iki.fi>
|
2004-08-26 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* tests/testglib.c (main): Test the new XDG basedir functions.
|
* tests/testglib.c (main): Test the new XDG basedir functions.
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Aug 27 00:45:41 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* glib/goption.c (g_option_context_parse): Set the program name
|
||||||
|
from argv[0], noticed by Masatake YAMATO.
|
||||||
|
|
||||||
2004-08-26 Tor Lillqvist <tml@iki.fi>
|
2004-08-26 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* tests/testglib.c (main): Test the new XDG basedir functions.
|
* tests/testglib.c (main): Test the new XDG basedir functions.
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Aug 27 00:45:41 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* glib/goption.c (g_option_context_parse): Set the program name
|
||||||
|
from argv[0], noticed by Masatake YAMATO.
|
||||||
|
|
||||||
2004-08-26 Tor Lillqvist <tml@iki.fi>
|
2004-08-26 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* tests/testglib.c (main): Test the new XDG basedir functions.
|
* tests/testglib.c (main): Test the new XDG basedir functions.
|
||||||
|
@ -258,7 +258,7 @@ print_help (GOptionContext *context,
|
|||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
g_print ("%s\n %s %s %s\n\n",
|
g_print ("%s\n %s %s %s\n\n",
|
||||||
_("Usage:"), g_get_prgname (), _("[OPTION...]"),
|
_("Usage:"), g_get_prgname(), _("[OPTION...]"),
|
||||||
context->parameter_string ? context->parameter_string : "");
|
context->parameter_string ? context->parameter_string : "");
|
||||||
|
|
||||||
list = context->groups;
|
list = context->groups;
|
||||||
@ -845,6 +845,16 @@ 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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user