summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--!NetSurf/!Run,feb4
-rw-r--r--desktop/browser.c11
-rw-r--r--desktop/fetch.c28
3 files changed, 19 insertions, 24 deletions
diff --git a/!NetSurf/!Run,feb b/!NetSurf/!Run,feb
index 7eb9c714b..70cb6b180 100644
--- a/!NetSurf/!Run,feb
+++ b/!NetSurf/!Run,feb
@@ -6,9 +6,9 @@ IconSprites <NetSurf$Dir>.!Sprites
RMensure WindowManager 3.80 Error 0 NetSurf requires the Nested Window Manager.
RMEnsure UtilityModule 3.70 RMensure CallASWI 0.00 RMload <NetSurf$Dir>.CallASWI
-RMensure SharedUnixLibrary 1.00 RMload <NetSurf$Dir>.SharedULib
+RMEnsure SharedUnixLibrary 1.00 RMLoad System:Modules.SharedULib
| drag the 'next' slot in the task manager to something huge and ridiculous,
| and/or increase the number below
Wimpslot -min 1600k
-<NetSurf$Dir>.!RunImage 2>stderr
+<NetSurf$Dir>.!RunImage 2>stderr \ No newline at end of file
diff --git a/desktop/browser.c b/desktop/browser.c
index 8ecf9eec8..8ff634fae 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1,5 +1,5 @@
/**
- * $Id: browser.c,v 1.10 2002/12/23 21:19:01 bursa Exp $
+ * $Id: browser.c,v 1.11 2002/12/25 20:17:18 bursa Exp $
*/
#include "netsurf/riscos/font.h"
@@ -412,9 +412,12 @@ void browser_window_open_location_historical(struct browser_window* bw, char* ur
browser_window_start_throbber(bw);
/* TODO: factor out code shared with browser_window_message(), case msg_FETCH_FINISHED */
- if (bw->url != NULL)
- xfree(bw->url);
- bw->url = xstrdup(url);
+ if (url != bw->url) /* reload <=> url == bw->url */
+ {
+ if (bw->url != NULL)
+ xfree(bw->url);
+ bw->url = xstrdup(url);
+ }
gmsg.type = msg_SET_URL;
gmsg.data.set_url.url = bw->url;
diff --git a/desktop/fetch.c b/desktop/fetch.c
index 02a74585b..4eabeb653 100644
--- a/desktop/fetch.c
+++ b/desktop/fetch.c
@@ -1,5 +1,5 @@
/**
- * $Id: fetch.c,v 1.2 2002/09/18 19:30:19 bursa Exp $
+ * $Id: fetch.c,v 1.3 2002/12/25 20:17:18 bursa Exp $
*/
#include "libxml/HTMLparser.h"
@@ -10,19 +10,20 @@
#include "netsurf/desktop/fetch.h"
#include "netsurf/render/utils.h"
#include "curl/curl.h"
+#include "libxml/uri.h"
#include <time.h>
#include <string.h>
#include <stdio.h>
void fetch_identify_location(struct fetch* f, char* location, char* previous)
{
- FILE* ff = fopen("identify", "a");
+/* FILE* ff = fopen("identify", "a");
fprintf(ff, "identify: '%s' '%s'", location, previous);
if (f->location != NULL)
fprintf(ff, " '%s'\n", f->location);
else
fprintf(ff, "\n");
- fclose(ff);
+ fclose(ff);*/
if (f->location != NULL)
xfree(f->location);
@@ -41,19 +42,10 @@ void fetch_identify_location(struct fetch* f, char* location, char* previous)
}
else if (previous != NULL)
{
- char* ext = strrchr(previous, '/');
-
- if (ext != NULL && ext != previous)
- {
- int len = (int)(ext - previous) + strlen(location) + 2;
- char* combined = xcalloc(len, sizeof(char));
- strncpy(combined, previous, (int)(ext - previous));
- strcpy(combined + (ext - previous), "/");
- strcpy(combined + (ext - previous) + 1, location);
- fetch_identify_location(f, combined, NULL);
- xfree(combined);
- return;
- }
+ f->location = xmlBuildURI(location, previous);
+ assert(f->location != NULL);
+ f->type = fetch_CURL;
+ return;
}
f->location = xcalloc(strlen(location) + strlen("http://") + 1, sizeof(char));
@@ -253,9 +245,9 @@ struct fetch* fetch_poll(struct fetch* f)
FILE* in;
gui_file_to_filename(f->location, actual_filename, 1024);
- in = fopen("files","a");
+/* in = fopen("files","a");
fprintf(in, "%s\n%s\n\n",f->location, actual_filename);
- fclose(in);
+ fclose(in);*/
in = fopen(actual_filename, "r");
if (in == NULL)