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>
+
* glib/goption.c: (g_option_context_free), (print_help),
(g_option_context_parse):
Handle option contexts without a main group.
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>
+
* glib/goption.c: (g_option_context_free), (print_help),
(g_option_context_parse):
Handle option contexts without a main group.
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>
+
* glib/goption.c: (g_option_context_free), (print_help),
(g_option_context_parse):
Handle option contexts without a main group.
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>
+
* glib/goption.c: (g_option_context_free), (print_help),
(g_option_context_parse):
Handle option contexts without a main group.
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>
+
* glib/goption.c: (g_option_context_free), (print_help),
(g_option_context_parse):
Handle option contexts without a main group.
gint i, j, k;
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 */
list = context->groups;
while (list)
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++)
{
gchar *arg;
}
}
}
- else
- {
- g_set_prgname ("<unknown>");
- }
return TRUE;