summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-04-07 17:58:42 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-04-07 17:58:42 +0000
commitcc0f1c7e281de4e0b0e7339df502ac6a5fba436b (patch)
tree887470c7bf54121a8692826f49120fe946c56abe /desktop
parent4d55f43a3d6b87db37fc1f65be9ce121ac9d68a9 (diff)
downloadnetsurf-cc0f1c7e281de4e0b0e7339df502ac6a5fba436b.tar.gz
netsurf-cc0f1c7e281de4e0b0e7339df502ac6a5fba436b.tar.bz2
Add logging
svn path=/trunk/netsurf/; revision=3242
Diffstat (limited to 'desktop')
-rw-r--r--desktop/history_core.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/desktop/history_core.c b/desktop/history_core.c
index dcf8c6efd..b7d71c80e 100644
--- a/desktop/history_core.c
+++ b/desktop/history_core.c
@@ -224,7 +224,14 @@ void history_add(struct history *history, struct content *content,
warn_user("NoMemory", 0);
return;
}
+
+ LOG(("%s => %s : %s", content->url, url, content->title));
+ LOG(("%s", frag_id));
+
title = strdup(content->title ? content->title : url);
+
+ LOG(("after strdup"));
+
if (!entry || !url || !title) {
warn_user("NoMemory", 0);
free(entry);
@@ -400,9 +407,20 @@ void history_go(struct browser_window *bw, struct history *history,
char *url;
struct history_entry *current;
+ LOG(("%p %p %p", bw, history, entry));
+ LOG(("%s %s %s",
+ entry->page.url, entry->page.title, entry->page.frag_id));
+
if (entry->page.frag_id) {
- url = malloc(strlen(entry->page.url) +
- strlen(entry->page.frag_id) + 5);
+ size_t a, b;
+
+ a = strlen(entry->page.url);
+ LOG(("after a"));
+ b = strlen(entry->page.frag_id);
+ LOG(("after b"));
+ url = malloc(a + b + 5);
+ LOG(("after malloc"));
+
if (!url) {
warn_user("NoMemory", 0);
return;