svn path=/trunk/netsurf/; revision=9779
This commit is contained in:
François Revel 2010-01-02 02:57:18 +00:00
parent 3ea6fa1fd9
commit 18e27fb499
3 changed files with 9 additions and 7 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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 */