mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 04:26:50 +03:00
C89.
svn path=/trunk/netsurf/; revision=9779
This commit is contained in:
parent
3ea6fa1fd9
commit
18e27fb499
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user