diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-01-26 14:30:30 +0000 |
---|---|---|
committer | Chris Wilson <cpwilson@src.gnome.org> | 2007-01-26 14:30:30 +0000 |
commit | d2dc82343a348aa22402c03b2a1677b6b73f7d5f (patch) | |
tree | c3db0d9306e298aba3c031b46e3ea80521ee16d2 /src/vteapp.c | |
parent | b01b8d2fe3e37a6d6f333c27a8890dfb49295a69 (diff) | |
download | vte-d2dc82343a348aa22402c03b2a1677b6b73f7d5f.tar.gz |
Janitorial work - near elimination of #ifdef VTE_DEBUG from within
2007-01-26 Chris Wilson <chris@chris-wilson.co.uk>
Janitorial work - near elimination of #ifdef VTE_DEBUG from within
functions, trimming over a thousand lines of code.
We introduce a _vte_debug_print macro to cover the more common
occurrence of printing a message at a certain debug level.
And a _VTE_DEBUG_ON for a conditional code block.
src/debug.h | 11
src/iso2022.c | 201 ++-------
src/keymap.c | 41 -
src/matcher.c | 24 -
src/pty.c | 134 +-----
src/reaper.c | 21
src/ring.c | 78 +--
src/table.c | 11
src/trie.c | 19
src/vte.c | 1187 ++++++++++---------------------------------------
src/vteaccess.c | 198 +++------
src/vteapp.c | 21
src/vtebg.c | 43 --
src/vteconv.c | 60 +-
src/vteconv.h | 12
src/vtedraw.c | 6
src/vtefc.c | 4
src/vteft2.c | 5
src/vteglyph.c | 27 -
src/vtepango.c | 11
src/vtepangox.c | 7
src/vteregex.c | 2
src/vteseq.c | 385 +++++-------------
src/vtexft.c | 26 -
24 files changed, 789 insertions(+), 1745 deletions(-)
svn path=/trunk/; revision=1539
Diffstat (limited to 'src/vteapp.c')
-rw-r--r-- | src/vteapp.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/vteapp.c b/src/vteapp.c index 4598b05a..8c2c2538 100644 --- a/src/vteapp.c +++ b/src/vteapp.c @@ -147,20 +147,12 @@ destroy_and_quit(GtkWidget *widget, gpointer data) static void destroy_and_quit_eof(GtkWidget *widget, gpointer data) { -#ifdef VTE_DEBUG - if (_vte_debug_on(VTE_DEBUG_MISC)) { - g_print("Detected EOF.\n"); - } -#endif + _vte_debug_print(VTE_DEBUG_MISC, "Detected EOF.\n"); } static void destroy_and_quit_exited(GtkWidget *widget, gpointer data) { -#ifdef VTE_DEBUG - if (_vte_debug_on(VTE_DEBUG_MISC)) { - g_print("Detected child exit.\n"); - } -#endif + _vte_debug_print(VTE_DEBUG_MISC, "Detected child exit.\n"); destroy_and_quit(widget, data); } @@ -392,7 +384,7 @@ take_xconsole_ownership(GtkWidget *widget, gpointer data) char *name, hostname[255]; GdkAtom atom; GtkClipboard *clipboard; - GtkTargetEntry targets[] = { + const GtkTargetEntry targets[] = { {"UTF8_STRING", 0, 0}, {"COMPOUND_TEXT", 0, 0}, {"TEXT", 0, 0}, @@ -790,11 +782,8 @@ main(int argc, char **argv) if (!console) { if (shell) { /* Launch a shell. */ - #ifdef VTE_DEBUG - if (_vte_debug_on(VTE_DEBUG_MISC)) { - vte_terminal_feed(terminal, message, -1); - } - #endif + _VTE_DEBUG_ON(VTE_DEBUG_MISC, + vte_terminal_feed(terminal, message, -1)); vte_terminal_fork_command(terminal, command, NULL, env_add, working_directory, |