From: Eric W. <war...@us...> - 2001-12-01 01:48:29
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv1836 Modified Files: aim.c gaim.h module.c prefs.c util.c Log Message: remove DEBUG Index: aim.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/aim.c,v retrieving revision 1.172 retrieving revision 1.173 diff -u -d -r1.172 -r1.173 --- aim.c 2001/11/19 08:23:32 1.172 +++ aim.c 2001/12/01 01:48:26 1.173 @@ -80,6 +80,7 @@ int opt_away = 0; char *opt_away_arg = NULL; char *opt_rcfile_arg = NULL; +int opt_debug = 0; void BuddyTickerCreateWindow(void); @@ -540,6 +541,8 @@ "Use account NAME", "NAME"}, {"file", 'f', POPT_ARG_STRING, &opt_rcfile_arg, 'f', "Use FILE as config", "FILE"}, + {"debug", 'd', POPT_ARG_NONE, &opt_debug, 'd', + "Print debugging messages to stdout", NULL}, {0, 0, 0, 0, 0, 0, 0} }; #endif /* USE_GNOME */ @@ -550,11 +553,15 @@ /*{"login", optional_argument, NULL, 'l'}, */ {"user", required_argument, NULL, 'u'}, {"file", required_argument, NULL, 'f'}, + {"debug", no_argument, NULL, 'd'}, {"version", no_argument, NULL, 'v'}, {0, 0, 0, 0} }; #endif +#ifdef DEBUG + opt_debug = 1; +#endif #ifdef ENABLE_NLS bindtextdomain(PACKAGE, LOCALEDIR); @@ -660,7 +667,7 @@ #else opterr = 1; #endif - while ((opt = getopt_long(argc, argv, "ahu:f:v", long_options, NULL)) != -1) { + while ((opt = getopt_long(argc, argv, "adhu:f:v", long_options, NULL)) != -1) { switch (opt) { case 'u': /* set user */ opt_user = 1; @@ -668,6 +675,9 @@ break; case 'a': /* account editor */ opt_acct = 1; + break; + case 'd': /* debug */ + opt_debug = 1; break; case 'f': opt_rcfile_arg = g_strdup(optarg); Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.300 retrieving revision 1.301 diff -u -d -r1.300 -r1.301 --- gaim.h 2001/11/30 21:16:27 1.300 +++ gaim.h 2001/12/01 01:48:26 1.301 @@ -189,6 +189,7 @@ extern int opt_away; extern char *opt_away_arg; extern char *opt_rcfile_arg; +extern int opt_debug; extern guint misc_options; #define OPT_MISC_DEBUG 0x00000001 Index: module.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/module.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- module.c 2001/11/02 01:41:37 1.13 +++ module.c 2001/12/01 01:48:26 1.14 @@ -369,10 +369,9 @@ static void debug_event(enum gaim_event event, void *arg1, void *arg2, void *arg3, void *arg4) { -#ifndef DEBUG - if (!(misc_options & OPT_MISC_DEBUG)) + if (!opt_debug && !(misc_options & OPT_MISC_DEBUG)) return; -#endif + switch (event) { case event_quit: debug_printf("%s\n", event_name(event)); Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.204 retrieving revision 1.205 diff -u -d -r1.204 -r1.205 --- prefs.c 2001/11/26 22:33:21 1.204 +++ prefs.c 2001/12/01 01:48:26 1.205 @@ -2516,9 +2516,8 @@ if (scroll) gtk_adjustment_set_value(adj, adj->upper - adj->lower - adj->page_size); } -#ifdef DEBUG - g_print("%s", s); -#endif + if (opt_debug) + g_print("%s", s); g_free(s); } Index: util.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/util.c,v retrieving revision 1.111 retrieving revision 1.112 diff -u -d -r1.111 -r1.112 --- util.c 2001/11/02 01:41:37 1.111 +++ util.c 2001/12/01 01:48:26 1.112 @@ -771,6 +771,7 @@ " account(s) to use)\n" " -u, --user=NAME use account NAME\n" " -f, --file=FILE use FILE as config\n" + " -d, --debug print debugging messages to stdout\n" " -v, --version display version information window\n" " -h, --help display this help and exit\n", name); break; |