summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2010-01-02 02:57:18 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2010-01-02 02:57:18 +0000
commit18e27fb499e0bcada28b76082e49c3b2eaab22eb (patch)
tree3b241c6daaf7d5c1425daa1c21896b167de8da28
parent3ea6fa1fd995371e8b160e00ea4859256edc9568 (diff)
downloadnetsurf-18e27fb499e0bcada28b76082e49c3b2eaab22eb.tar.gz
netsurf-18e27fb499e0bcada28b76082e49c3b2eaab22eb.tar.bz2
C89.
svn path=/trunk/netsurf/; revision=9779
-rw-r--r--desktop/save_complete.c5
-rw-r--r--desktop/searchweb.c6
-rw-r--r--render/favicon.c5
3 files changed, 9 insertions, 7 deletions
diff --git a/desktop/save_complete.c b/desktop/save_complete.c
index 48438908d..d55cde08f 100644
--- a/desktop/save_complete.c
+++ b/desktop/save_complete.c
@@ -535,6 +535,7 @@ bool rewrite_urls(xmlNode *n, const char *base,
xmlChar *content;
for (child = n->children; child != 0; child = child->next) {
+ char *rewritten;
/* Get current content */
content = xmlNodeGetContent(child);
if (!content)
@@ -544,7 +545,7 @@ bool rewrite_urls(xmlNode *n, const char *base,
continue;
/* Rewrite @import rules */
- char *rewritten = rewrite_stylesheet_urls(
+ rewritten = rewrite_stylesheet_urls(
(const char *) content,
strlen((const char *) content),
(int *) &len, base, list);
@@ -728,6 +729,7 @@ bool save_complete_inventory(const char *path,
FILE *fp;
char *pathstring, *standardpath = (path[0] == '/') ?
(char *)(path + 1) : (char *)path;
+ struct save_complete_entry *entry;
snprintf(urlpath, sizeof urlpath, "file:///%s/Inventory",
standardpath);
@@ -744,7 +746,6 @@ bool save_complete_inventory(const char *path,
return false;
}
- struct save_complete_entry *entry;
for (entry = list; entry; entry = entry->next)
fprintf(fp, "%p %s\n", entry->content, entry->content->url);
diff --git a/desktop/searchweb.c b/desktop/searchweb.c
index 2995627f6..69ef10d05 100644
--- a/desktop/searchweb.c
+++ b/desktop/searchweb.c
@@ -96,9 +96,10 @@ void search_web_provider_details(int reference)
{
char buf[300];
int ref = 0;
+ FILE *f;
if (search_engines_file_location == NULL)
return;
- FILE *f = fopen(search_engines_file_location, "r");
+ f = fopen(search_engines_file_location, "r");
if (f == NULL)
return;
while (fgets(buf, sizeof(buf), f) != NULL) {
@@ -204,6 +205,7 @@ char *search_web_get_url(const char *encsearchterm)
void search_web_retrieve_ico(bool localdefault)
{
char *url;
+ struct content *icocontent;
if (localdefault) {
if (search_default_ico_location == NULL)
return;
@@ -219,7 +221,7 @@ void search_web_retrieve_ico(bool localdefault)
url = search_web_ico_name();
}
- struct content *icocontent = NULL;
+ icocontent = NULL;
if (url == NULL) {
warn_user(messages_get("NoMemory"), 0);
return;
diff --git a/render/favicon.c b/render/favicon.c
index 3160a0ff2..bc64f0a9e 100644
--- a/render/favicon.c
+++ b/render/favicon.c
@@ -41,11 +41,10 @@ char *favicon_get_icon_ref(struct content *c, xmlNode *html)
{
xmlNode *node;
char *rel, *href, *url, *url2;
- url2 = NULL;
url_func_result res;
-
union content_msg_data msg_data;
-
+
+ url2 = NULL;
node = html;
while (node) {
if (node->children) { /* children */