Tue, 06 Apr 2021 03:35:20 -0500
Port the updates from 2.14.2 and the upcoming 2.14.3 to 3.0.0
* Use the unicode version of the System and UserInfo plugins to fix
non-english languages in the Windows installer.
* Update the installer to use the inetc plugin so that https downloads will
work. This became necessary because Sourceforge now redirects http to
https.
* Standardize everything in pidgin/win32/winpidgin.c to use `wprintf`.
Testing Done:
Compiled and ran on windows 10.
Reviewed at https://reviews.imfreedom.org/r/595/
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
1 | /* |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
| 5212 | 4 | * |
| 15884 | 5 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 7 | * source distribution. | |
|
6483
d12ecdf8e489
[gaim-migrate @ 6997]
Christian Hammond <chipx86@chipx86.com>
parents:
5212
diff
changeset
|
8 | * |
| 5212 | 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This program is distributed in the hope that it will be useful, | |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 | * GNU General Public License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU General Public License | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
| 5212 | 21 | */ |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
22 | |
| 5212 | 23 | #include "debug.h" |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
24 | #include "prefs.h" |
| 5212 | 25 | |
|
38643
cb7fbf08fcb7
Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35597
diff
changeset
|
26 | static PurpleDebugUi *debug_ui = NULL; |
| 5212 | 27 | |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
28 | /* |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
29 | * This determines whether debug info should be written to the |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
30 | * console or not. |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
31 | * |
| 15884 | 32 | * It doesn't make sense to make this a normal Purple preference |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
33 | * because it's a command line option. This will always be FALSE, |
|
27542
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
34 | * unless the user explicitly started the UI with the -d flag. |
| 15884 | 35 | * It doesn't matter what this value was the last time Purple was |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
36 | * started, so it doesn't make sense to save it in prefs. |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
37 | */ |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
38 | static gboolean debug_enabled = FALSE; |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
39 | |
|
27542
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
40 | /* |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
41 | * These determine whether verbose or unsafe debugging are desired. I |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
42 | * don't want to make these purple preferences because their values should |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
43 | * not be remembered across instances of the UI. |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
44 | */ |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
45 | static gboolean debug_verbose = FALSE; |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
46 | static gboolean debug_unsafe = FALSE; |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
47 | |
|
34296
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
48 | static gboolean debug_colored = FALSE; |
|
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
49 | |
|
11504
eabc708c2ea9
[gaim-migrate @ 13749]
Richard Laager <rlaager@pidgin.im>
parents:
11256
diff
changeset
|
50 | static void |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
51 | purple_debug_vargs(PurpleDebugLevel level, const gchar *category, |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
52 | const gchar *format, va_list args) |
| 5212 | 53 | { |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
54 | PurpleDebugUi *ui; |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
55 | gchar *arg_s = NULL; |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
56 | |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
57 | if(!debug_enabled) { |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
58 | return; |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
59 | } |
| 5212 | 60 | |
| 15884 | 61 | g_return_if_fail(level != PURPLE_DEBUG_ALL); |
| 5212 | 62 | g_return_if_fail(format != NULL); |
| 63 | ||
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
64 | ui = purple_debug_get_ui(); |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
65 | if(!ui) { |
|
38643
cb7fbf08fcb7
Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35597
diff
changeset
|
66 | return; |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
67 | } |
|
13988
a178d3dcbb7f
[gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents:
13105
diff
changeset
|
68 | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
69 | if(!purple_debug_ui_is_enabled(ui, level, category)) { |
|
13988
a178d3dcbb7f
[gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents:
13105
diff
changeset
|
70 | return; |
|
39913
ce96d4639dc7
Remove redundant conditions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38643
diff
changeset
|
71 | } |
|
13988
a178d3dcbb7f
[gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents:
13105
diff
changeset
|
72 | |
|
a178d3dcbb7f
[gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents:
13105
diff
changeset
|
73 | arg_s = g_strdup_vprintf(format, args); |
|
34296
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
74 | g_strchomp(arg_s); /* strip trailing linefeeds */ |
|
13988
a178d3dcbb7f
[gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents:
13105
diff
changeset
|
75 | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
76 | if(debug_enabled) { |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
77 | GDateTime *now = NULL; |
|
13988
a178d3dcbb7f
[gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents:
13105
diff
changeset
|
78 | gchar *ts_s; |
|
34296
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
79 | const gchar *format_pre, *format_post; |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
80 | |
|
34296
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
81 | format_pre = ""; |
|
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
82 | format_post = ""; |
|
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
83 | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
84 | if(!debug_colored) { |
|
34296
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
85 | format_pre = ""; |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
86 | } else if(level == PURPLE_DEBUG_MISC) { |
|
34296
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
87 | format_pre = "\033[0;37m"; |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
88 | } else if(level == PURPLE_DEBUG_INFO) { |
|
34296
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
89 | format_pre = ""; |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
90 | } else if(level == PURPLE_DEBUG_WARNING) { |
|
34296
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
91 | format_pre = "\033[0;33m"; |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
92 | } else if(level == PURPLE_DEBUG_ERROR) { |
|
34296
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
93 | format_pre = "\033[1;31m"; |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
94 | } else if(level == PURPLE_DEBUG_FATAL) { |
|
34296
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
95 | format_pre = "\033[1;33;41m"; |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
96 | } |
|
34296
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
97 | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
98 | if(format_pre[0] != '\0') { |
|
34296
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
99 | format_post = "\033[0m"; |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
100 | } |
|
17040
cb33027a36e4
Force timestamps always on for debug log and debug window. Making this
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16478
diff
changeset
|
101 | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
102 | now = g_date_time_new_now_local(); |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
103 | ts_s = g_date_time_format(now, "(%H:%M:%S)"); |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
104 | g_date_time_unref(now); |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
105 | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
106 | if(category == NULL) { |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
107 | g_print("%s%s %s%s\n", format_pre, ts_s, arg_s, format_post); |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
108 | } else { |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
109 | g_print("%s%s %s: %s%s\n", format_pre, ts_s, category, arg_s, |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
110 | format_post); |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
111 | } |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
112 | |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
113 | g_free(ts_s); |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
114 | } |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
115 | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
116 | purple_debug_ui_print(ui, level, category, arg_s); |
| 5212 | 117 | |
|
13988
a178d3dcbb7f
[gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents:
13105
diff
changeset
|
118 | g_free(arg_s); |
| 5212 | 119 | } |
| 120 | ||
| 121 | void | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
122 | purple_debug(PurpleDebugLevel level, const gchar *category, |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
123 | const gchar *format, ...) |
| 5212 | 124 | { |
| 125 | va_list args; | |
| 126 | ||
| 15884 | 127 | g_return_if_fail(level != PURPLE_DEBUG_ALL); |
| 5212 | 128 | g_return_if_fail(format != NULL); |
| 129 | ||
| 130 | va_start(args, format); | |
| 15884 | 131 | purple_debug_vargs(level, category, format, args); |
| 5212 | 132 | va_end(args); |
| 133 | } | |
| 134 | ||
| 135 | void | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
136 | purple_debug_misc(const gchar *category, const gchar *format, ...) { |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
137 | va_list args; |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
138 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
139 | g_return_if_fail(format != NULL); |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
140 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
141 | va_start(args, format); |
| 15884 | 142 | purple_debug_vargs(PURPLE_DEBUG_MISC, category, format, args); |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
143 | va_end(args); |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
144 | } |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
145 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
146 | void |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
147 | purple_debug_info(const gchar *category, const gchar *format, ...) { |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
148 | va_list args; |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
149 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
150 | g_return_if_fail(format != NULL); |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
151 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
152 | va_start(args, format); |
| 15884 | 153 | purple_debug_vargs(PURPLE_DEBUG_INFO, category, format, args); |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
154 | va_end(args); |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
155 | } |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
156 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
157 | void |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
158 | purple_debug_warning(const gchar *category, const gchar *format, ...) { |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
159 | va_list args; |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
160 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
161 | g_return_if_fail(format != NULL); |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
162 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
163 | va_start(args, format); |
| 15884 | 164 | purple_debug_vargs(PURPLE_DEBUG_WARNING, category, format, args); |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
165 | va_end(args); |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
166 | } |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
167 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
168 | void |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
169 | purple_debug_error(const gchar *category, const gchar *format, ...) { |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
170 | va_list args; |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
171 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
172 | g_return_if_fail(format != NULL); |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
173 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
174 | va_start(args, format); |
| 15884 | 175 | purple_debug_vargs(PURPLE_DEBUG_ERROR, category, format, args); |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
176 | va_end(args); |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
177 | } |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
178 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
179 | void |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
180 | purple_debug_fatal(const gchar *category, const gchar *format, ...) { |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
181 | va_list args; |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
182 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
183 | g_return_if_fail(format != NULL); |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
184 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
185 | va_start(args, format); |
| 15884 | 186 | purple_debug_vargs(PURPLE_DEBUG_FATAL, category, format, args); |
|
6721
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
187 | va_end(args); |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
188 | } |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
189 | |
|
41d2d86860f3
[gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents:
6483
diff
changeset
|
190 | void |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
191 | purple_debug_set_enabled(gboolean enabled) { |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
192 | debug_enabled = enabled; |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
193 | } |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
194 | |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
195 | gboolean |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
196 | purple_debug_is_enabled() { |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
197 | return debug_enabled; |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
198 | } |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
199 | |
|
38643
cb7fbf08fcb7
Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35597
diff
changeset
|
200 | void |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
201 | purple_debug_set_ui(PurpleDebugUi *ui) { |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
202 | g_set_object(&debug_ui, ui); |
| 5212 | 203 | } |
| 204 | ||
|
27542
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
205 | gboolean |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
206 | purple_debug_is_verbose() { |
|
27542
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
207 | return debug_verbose; |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
208 | } |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
209 | |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
210 | void |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
211 | purple_debug_set_verbose(gboolean verbose) { |
|
27542
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
212 | debug_verbose = verbose; |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
213 | } |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
214 | |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
215 | gboolean |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
216 | purple_debug_is_unsafe() { |
|
27542
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
217 | return debug_unsafe; |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
218 | } |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
219 | |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
220 | void |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
221 | purple_debug_set_unsafe(gboolean unsafe) { |
|
27542
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
222 | debug_unsafe = unsafe; |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
223 | } |
|
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
224 | |
|
34296
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
225 | void |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
226 | purple_debug_set_colored(gboolean colored) { |
|
34296
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
227 | debug_colored = colored; |
|
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
228 | } |
|
d31a4f3b547e
Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
32438
diff
changeset
|
229 | |
|
38643
cb7fbf08fcb7
Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35597
diff
changeset
|
230 | PurpleDebugUi * |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
231 | purple_debug_get_ui(void) { |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
232 | return debug_ui; |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
233 | } |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
234 | |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
235 | gboolean |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
236 | purple_debug_ui_is_enabled(PurpleDebugUi *ui, PurpleDebugLevel level, |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
237 | const gchar *category) |
| 5212 | 238 | { |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
239 | PurpleDebugUiInterface *iface = NULL; |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
240 | |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
241 | g_return_val_if_fail(PURPLE_IS_DEBUG_UI(ui), FALSE); |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
242 | |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
243 | iface = PURPLE_DEBUG_UI_GET_IFACE(ui); |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
244 | if(iface != NULL && iface->is_enabled != NULL) { |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
245 | return iface->is_enabled(ui, level, category); |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
246 | } |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
247 | |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
248 | return FALSE; |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
249 | } |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
250 | |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
251 | void |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
252 | purple_debug_ui_print(PurpleDebugUi *ui, PurpleDebugLevel level, |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
253 | const gchar *category, const gchar *arg_s) |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
254 | { |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
255 | PurpleDebugUiInterface *iface = NULL; |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
256 | |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
257 | g_return_if_fail(PURPLE_IS_DEBUG_UI(ui)); |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
258 | |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
259 | if(!purple_debug_ui_is_enabled(ui, level, category)) { |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
260 | return; |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
261 | } |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
262 | |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
263 | iface = PURPLE_DEBUG_UI_GET_IFACE(ui); |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
264 | if(iface != NULL && iface->print != NULL) { |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
265 | iface->print(ui, level, category, arg_s); |
|
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
266 | } |
|
38643
cb7fbf08fcb7
Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35597
diff
changeset
|
267 | } |
|
cb7fbf08fcb7
Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35597
diff
changeset
|
268 | |
|
cb7fbf08fcb7
Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35597
diff
changeset
|
269 | G_DEFINE_INTERFACE(PurpleDebugUi, purple_debug_ui, G_TYPE_OBJECT); |
|
cb7fbf08fcb7
Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35597
diff
changeset
|
270 | |
|
cb7fbf08fcb7
Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35597
diff
changeset
|
271 | static void |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
272 | purple_debug_ui_default_init(PurpleDebugUiInterface *iface) { |
| 5212 | 273 | } |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
274 | |
|
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
275 | void |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
276 | purple_debug_init(void) { |
|
27542
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
277 | /* Read environment variables once per init */ |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
278 | if(g_getenv("PURPLE_UNSAFE_DEBUG")) { |
|
27542
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
279 | purple_debug_set_unsafe(TRUE); |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
280 | } |
|
27542
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
281 | |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
282 | if(g_getenv("PURPLE_VERBOSE_DEBUG")) { |
|
27542
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
283 | purple_debug_set_verbose(TRUE); |
|
40828
4ee19005534e
Modernize debug.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
284 | } |
|
27542
a7acdc4ba23f
Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20147
diff
changeset
|
285 | |
|
17318
ce44d0f8095d
Un-break the API so the next release doesn't have to be 3.0.0 :)
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
17040
diff
changeset
|
286 | purple_prefs_add_none("/purple/debug"); |
|
10307
f3ba80364053
[gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
287 | } |