diff options
author | jcid <devnull@localhost> | 2008-09-29 01:04:50 +0200 |
---|---|---|
committer | jcid <devnull@localhost> | 2008-09-29 01:04:50 +0200 |
commit | bc8c549e1036f6c1dd3f0fd526d790a6ada123a7 (patch) | |
tree | 5e8099de9bb310d5188807f739fe5b02889b652e | |
parent | a5148a6be8e38918df3f919505305e73b2f59f2c (diff) |
- Removed the remaining DEBUG_MSG in src/
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/cache.c | 9 | ||||
-rw-r--r-- | src/capi.c | 3 | ||||
-rw-r--r-- | src/debug.h | 30 | ||||
-rw-r--r-- | src/form.cc | 5 | ||||
-rw-r--r-- | src/nav.c | 5 | ||||
-rw-r--r-- | src/url.c | 6 | ||||
-rw-r--r-- | src/web.cc | 7 |
8 files changed, 9 insertions, 57 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index f5699da6..2d06d143 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -37,7 +37,6 @@ dillo_fltk_SOURCES = \ history.c \ prefs.c \ prefs.h \ - debug.h \ msg.h \ list.h \ url.c \ diff --git a/src/cache.c b/src/cache.c index dcc8802d..699faa3b 100644 --- a/src/cache.c +++ b/src/cache.c @@ -38,10 +38,7 @@ #define NULLKey 0 -#define DEBUG_LEVEL 5 -#include "debug.h" - -/* Maximun initial size for the automatically-growing data buffer */ +/* Maximum initial size for the automatically-growing data buffer */ #define MAX_INIT_BUF 1024*1024 /* Maximum filesize for a URL, before offering a download */ #define HUGE_FILESIZE 15*1024*1024 @@ -920,9 +917,9 @@ static int Cache_redirect(CacheEntry_t *entry, int Flags, BrowserWindow *bw) } else { /* Sub entity redirection (most probably an image) */ if (!entry->Data->len) { - DEBUG_MSG(3,">>>Image redirection without entity-content<<<\n"); + _MSG(">>>Image redirection without entity-content<<<\n"); } else { - DEBUG_MSG(3, ">>>Image redirection with entity-content<<<\n"); + _MSG(">>>Image redirection with entity-content<<<\n"); } } } @@ -32,9 +32,6 @@ /* for testing dpi chat */ #include "bookmark.h" -#define DEBUG_LEVEL 5 -#include "debug.h" - typedef struct { DilloUrl *url; /* local copy of web->url */ void *bw; diff --git a/src/debug.h b/src/debug.h deleted file mode 100644 index 14c9e922..00000000 --- a/src/debug.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __DEBUG_H__ -#define __DEBUG_H__ - -/* - * Simple debug messages. Add: - * - * #define DEBUG_LEVEL <n> - * #include "debug.h" - * - * to the file you are working on, or let DEBUG_LEVEL undefined to - * disable all messages. A higher level denotes a greater importance - * of the message. - */ - -#include <unistd.h> -#include <stdio.h> - - -# ifdef DEBUG_LEVEL -# define DEBUG_MSG(level, ...) \ - D_STMT_START { \ - if (DEBUG_LEVEL && (level) >= DEBUG_LEVEL) \ - printf(__VA_ARGS__); \ - } D_STMT_END -# else -# define DEBUG_MSG(level, ...) -# endif /* DEBUG_LEVEL */ - -#endif /* __DEBUG_H__ */ - diff --git a/src/form.cc b/src/form.cc index 05fa918d..53abef69 100644 --- a/src/form.cc +++ b/src/form.cc @@ -19,9 +19,6 @@ #include "dw/core.hh" #include "dw/textblock.hh" -#define DEBUG_LEVEL 10 -#include "debug.h" - #include "misc.h" #include "msg.h" #include "prefs.h" @@ -1967,7 +1964,7 @@ static dw::core::ui::Embed *Html_input_image(DilloHtml *html, } if (!button) - DEBUG_MSG(10, "Html_input_image: unable to create image submit.\n"); + MSG("Html_input_image: unable to create image submit.\n"); return button; } @@ -23,9 +23,6 @@ #include "capi.h" #include "timeout.hh" -//#define DEBUG_LEVEL 3 -#include "debug.h" - /* * For back and forward navigation, each bw keeps an url index, * and its scroll position. @@ -483,7 +480,7 @@ void a_Nav_reload(BrowserWindow *bw) choice = a_Dialog_choice3("Repost form data?", "Yes", "*No", "Cancel"); if (choice == 0) { /* "Yes" */ - DEBUG_MSG(3, "Nav_reload_confirmed\n"); + _MSG("Nav_reload_confirmed\n"); Nav_reload(bw); } @@ -49,9 +49,7 @@ #include <ctype.h> #include "url.h" - -//#define DEBUG_LEVEL 2 -#include "debug.h" +#include "msg.h" static const char *HEX = "0123456789ABCDEF"; @@ -392,7 +390,7 @@ DilloUrl* a_Url_new(const char *url_str, const char *base_url) /* Resolve the URL */ SolvedUrl = Url_resolve_relative(urlstr, NULL, base_url); - DEBUG_MSG(2, "SolvedUrl = %s\n", SolvedUrl->str); + _MSG("SolvedUrl = %s\n", SolvedUrl->str); /* Fill url data */ url = Url_object_new(SolvedUrl->str); @@ -25,10 +25,7 @@ #include "prefs.h" #include "web.hh" -#define DEBUG_LEVEL 5 -#include "debug.h" - -// Platform idependent part +// Platform independent part using namespace dw::core; @@ -61,7 +58,7 @@ int a_Web_dispatch_by_type (const char *Type, DilloWeb *Web, style::Style *widgetStyle; style::FontAttrs fontAttrs; - DEBUG_MSG(1, "a_Web_dispatch_by_type\n"); + _MSG("a_Web_dispatch_by_type\n"); dReturn_val_if_fail(Web->bw != NULL, -1); |