diff --git a/ChangeLog b/ChangeLog index 600909472b..ebe3fbed5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Apr 3 20:36:52 1998 Owen Taylor + + * gdk/gdk.c gtk/gtkmain.c: Accept debug options + in the form --g[td]k[-no]-debug=xxx as well + Fri Apr 3 18:33:47 1998 Owen Taylor * gtk-config.in: Added flags --prefix[=dir] and diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 600909472b..ebe3fbed5f 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +Fri Apr 3 20:36:52 1998 Owen Taylor + + * gdk/gdk.c gtk/gtkmain.c: Accept debug options + in the form --g[td]k[-no]-debug=xxx as well + Fri Apr 3 18:33:47 1998 Owen Taylor * gtk-config.in: Added flags --prefix[=dir] and diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 600909472b..ebe3fbed5f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Fri Apr 3 20:36:52 1998 Owen Taylor + + * gdk/gdk.c gtk/gtkmain.c: Accept debug options + in the form --g[td]k[-no]-debug=xxx as well + Fri Apr 3 18:33:47 1998 Owen Taylor * gtk-config.in: Added flags --prefix[=dir] and diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 600909472b..ebe3fbed5f 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +Fri Apr 3 20:36:52 1998 Owen Taylor + + * gdk/gdk.c gtk/gtkmain.c: Accept debug options + in the form --g[td]k[-no]-debug=xxx as well + Fri Apr 3 18:33:47 1998 Owen Taylor * gtk-config.in: Added flags --prefix[=dir] and diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 600909472b..ebe3fbed5f 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Fri Apr 3 20:36:52 1998 Owen Taylor + + * gdk/gdk.c gtk/gtkmain.c: Accept debug options + in the form --g[td]k[-no]-debug=xxx as well + Fri Apr 3 18:33:47 1998 Owen Taylor * gtk-config.in: Added flags --prefix[=dir] and diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 600909472b..ebe3fbed5f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Fri Apr 3 20:36:52 1998 Owen Taylor + + * gdk/gdk.c gtk/gtkmain.c: Accept debug options + in the form --g[td]k[-no]-debug=xxx as well + Fri Apr 3 18:33:47 1998 Owen Taylor * gtk-config.in: Added flags --prefix[=dir] and diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 600909472b..ebe3fbed5f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Fri Apr 3 20:36:52 1998 Owen Taylor + + * gdk/gdk.c gtk/gtkmain.c: Accept debug options + in the form --g[td]k[-no]-debug=xxx as well + Fri Apr 3 18:33:47 1998 Owen Taylor * gtk-config.in: Added flags --prefix[=dir] and diff --git a/gdk/gdk.c b/gdk/gdk.c index 8808b644bb..6d5ae500b8 100644 --- a/gdk/gdk.c +++ b/gdk/gdk.c @@ -327,31 +327,47 @@ gdk_init (int *argc, for (i = 1; i < *argc;) { #ifdef G_ENABLE_DEBUG - if (strcmp ("--gdk-debug", (*argv)[i]) == 0) + if ((strcmp ("--gdk-debug", (*argv)[i]) == 0) || + (strncmp ("--gdk-debug=", (*argv)[i], 12) == 0)) { - (*argv)[i] = NULL; - - if ((i + 1) < *argc && (*argv)[i + 1]) + gchar *equal_pos = strchr ((*argv)[i], '='); + + if (equal_pos != NULL) + { + gdk_debug_flags |= g_parse_debug_string (equal_pos+1, + gdk_debug_keys, + gdk_ndebug_keys); + } + else if ((i + 1) < *argc && (*argv)[i + 1]) { gdk_debug_flags |= g_parse_debug_string ((*argv)[i+1], gdk_debug_keys, gdk_ndebug_keys); - (*argv)[i + 1] = NULL; + (*argv)[i] = NULL; i += 1; } - } - else if (strcmp ("--gdk-no-debug", (*argv)[i]) == 0) - { (*argv)[i] = NULL; + } + else if ((strcmp ("--gdk-no-debug", (*argv)[i]) == 0) || + (strncmp ("--gdk-no-debug=", (*argv)[i], 15) == 0)) + { + gchar *equal_pos = strchr ((*argv)[i], '='); - if ((i + 1) < *argc && (*argv)[i + 1]) + if (equal_pos != NULL) + { + gdk_debug_flags &= ~g_parse_debug_string (equal_pos+1, + gdk_debug_keys, + gdk_ndebug_keys); + } + else if ((i + 1) < *argc && (*argv)[i + 1]) { gdk_debug_flags &= ~g_parse_debug_string ((*argv)[i+1], gdk_debug_keys, gdk_ndebug_keys); - (*argv)[i + 1] = NULL; + (*argv)[i] = NULL; i += 1; } + (*argv)[i] = NULL; } else #endif /* G_ENABLE_DEBUG */ diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index 8808b644bb..6d5ae500b8 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -327,31 +327,47 @@ gdk_init (int *argc, for (i = 1; i < *argc;) { #ifdef G_ENABLE_DEBUG - if (strcmp ("--gdk-debug", (*argv)[i]) == 0) + if ((strcmp ("--gdk-debug", (*argv)[i]) == 0) || + (strncmp ("--gdk-debug=", (*argv)[i], 12) == 0)) { - (*argv)[i] = NULL; - - if ((i + 1) < *argc && (*argv)[i + 1]) + gchar *equal_pos = strchr ((*argv)[i], '='); + + if (equal_pos != NULL) + { + gdk_debug_flags |= g_parse_debug_string (equal_pos+1, + gdk_debug_keys, + gdk_ndebug_keys); + } + else if ((i + 1) < *argc && (*argv)[i + 1]) { gdk_debug_flags |= g_parse_debug_string ((*argv)[i+1], gdk_debug_keys, gdk_ndebug_keys); - (*argv)[i + 1] = NULL; + (*argv)[i] = NULL; i += 1; } - } - else if (strcmp ("--gdk-no-debug", (*argv)[i]) == 0) - { (*argv)[i] = NULL; + } + else if ((strcmp ("--gdk-no-debug", (*argv)[i]) == 0) || + (strncmp ("--gdk-no-debug=", (*argv)[i], 15) == 0)) + { + gchar *equal_pos = strchr ((*argv)[i], '='); - if ((i + 1) < *argc && (*argv)[i + 1]) + if (equal_pos != NULL) + { + gdk_debug_flags &= ~g_parse_debug_string (equal_pos+1, + gdk_debug_keys, + gdk_ndebug_keys); + } + else if ((i + 1) < *argc && (*argv)[i + 1]) { gdk_debug_flags &= ~g_parse_debug_string ((*argv)[i+1], gdk_debug_keys, gdk_ndebug_keys); - (*argv)[i + 1] = NULL; + (*argv)[i] = NULL; i += 1; } + (*argv)[i] = NULL; } else #endif /* G_ENABLE_DEBUG */ diff --git a/glib/ChangeLog b/glib/ChangeLog index c12dda40a5..d6a7d966fc 100644 --- a/glib/ChangeLog +++ b/glib/ChangeLog @@ -1,3 +1,8 @@ +Fri Apr 3 20:36:35 1998 Owen Taylor + + * gutils.c (g_parse_debug_string): Make debug string + parsine case-insensitive + Fri Apr 3 17:03:18 PST 1998 Manish Singh * gstring.c: corrected possible overrun when inserting into diff --git a/glib/gutils.c b/glib/gutils.c index 28569e8c40..b15c4acf52 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -873,7 +873,7 @@ g_parse_debug_string (const gchar *string, g_return_val_if_fail (string != NULL, 0); - if (!strcmp (string, "ALL")) + if (!g_strcasecmp (string, "all")) { for (i=0; i /* so we get the right setlocale */ #include #include +#include #include "gtkbutton.h" #include "gtkhscrollbar.h" #include "gtkhseparator.h" @@ -215,31 +216,47 @@ gtk_init (int *argc, for (i = 1; i < *argc;) { - if (strcmp ("--gtk-debug", (*argv)[i]) == 0) + if ((strcmp ("--gtk-debug", (*argv)[i]) == 0) || + (strncmp ("--gtk-debug=", (*argv)[i], 12) == 0)) { - (*argv)[i] = NULL; + gchar *equal_pos = strchr ((*argv)[i], '='); - if ((i + 1) < *argc && (*argv)[i + 1]) + if (equal_pos != NULL) + { + gtk_debug_flags |= g_parse_debug_string (equal_pos+1, + gtk_debug_keys, + gtk_ndebug_keys); + } + else if ((i + 1) < *argc && (*argv)[i + 1]) { gtk_debug_flags |= g_parse_debug_string ((*argv)[i+1], gtk_debug_keys, gtk_ndebug_keys); - (*argv)[i + 1] = NULL; + (*argv)[i] = NULL; i += 1; } - } - else if (strcmp ("--gtk-no-debug", (*argv)[i]) == 0) - { (*argv)[i] = NULL; + } + else if ((strcmp ("--gtk-no-debug", (*argv)[i]) == 0) || + (strncmp ("--gtk-no-debug=", (*argv)[i], 15) == 0)) + { + gchar *equal_pos = strchr ((*argv)[i], '='); - if ((i + 1) < *argc && (*argv)[i + 1]) + if (equal_pos != NULL) + { + gtk_debug_flags &= ~g_parse_debug_string (equal_pos+1, + gtk_debug_keys, + gtk_ndebug_keys); + } + else if ((i + 1) < *argc && (*argv)[i + 1]) { gtk_debug_flags &= ~g_parse_debug_string ((*argv)[i+1], gtk_debug_keys, gtk_ndebug_keys); - (*argv)[i + 1] = NULL; + (*argv)[i] = NULL; i += 1; } + (*argv)[i] = NULL; } i += 1; }