mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-23 02:42:11 +03:00
[project @ 2002-12-25 20:17:18 by bursa]
Fix reloads and links. svn path=/import/netsurf/; revision=54
This commit is contained in:
parent
89c257d207
commit
f373b275dd
@ -6,9 +6,9 @@ IconSprites <NetSurf$Dir>.!Sprites
|
|||||||
|
|
||||||
RMensure WindowManager 3.80 Error 0 NetSurf requires the Nested Window Manager.
|
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 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,
|
| drag the 'next' slot in the task manager to something huge and ridiculous,
|
||||||
| and/or increase the number below
|
| and/or increase the number below
|
||||||
Wimpslot -min 1600k
|
Wimpslot -min 1600k
|
||||||
<NetSurf$Dir>.!RunImage 2>stderr
|
<NetSurf$Dir>.!RunImage 2>stderr
|
@ -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"
|
#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);
|
browser_window_start_throbber(bw);
|
||||||
|
|
||||||
/* TODO: factor out code shared with browser_window_message(), case msg_FETCH_FINISHED */
|
/* TODO: factor out code shared with browser_window_message(), case msg_FETCH_FINISHED */
|
||||||
if (bw->url != NULL)
|
if (url != bw->url) /* reload <=> url == bw->url */
|
||||||
xfree(bw->url);
|
{
|
||||||
bw->url = xstrdup(url);
|
if (bw->url != NULL)
|
||||||
|
xfree(bw->url);
|
||||||
|
bw->url = xstrdup(url);
|
||||||
|
}
|
||||||
|
|
||||||
gmsg.type = msg_SET_URL;
|
gmsg.type = msg_SET_URL;
|
||||||
gmsg.data.set_url.url = bw->url;
|
gmsg.data.set_url.url = bw->url;
|
||||||
|
@ -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"
|
#include "libxml/HTMLparser.h"
|
||||||
@ -10,19 +10,20 @@
|
|||||||
#include "netsurf/desktop/fetch.h"
|
#include "netsurf/desktop/fetch.h"
|
||||||
#include "netsurf/render/utils.h"
|
#include "netsurf/render/utils.h"
|
||||||
#include "curl/curl.h"
|
#include "curl/curl.h"
|
||||||
|
#include "libxml/uri.h"
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
void fetch_identify_location(struct fetch* f, char* location, char* previous)
|
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);
|
fprintf(ff, "identify: '%s' '%s'", location, previous);
|
||||||
if (f->location != NULL)
|
if (f->location != NULL)
|
||||||
fprintf(ff, " '%s'\n", f->location);
|
fprintf(ff, " '%s'\n", f->location);
|
||||||
else
|
else
|
||||||
fprintf(ff, "\n");
|
fprintf(ff, "\n");
|
||||||
fclose(ff);
|
fclose(ff);*/
|
||||||
|
|
||||||
if (f->location != NULL)
|
if (f->location != NULL)
|
||||||
xfree(f->location);
|
xfree(f->location);
|
||||||
@ -41,19 +42,10 @@ void fetch_identify_location(struct fetch* f, char* location, char* previous)
|
|||||||
}
|
}
|
||||||
else if (previous != NULL)
|
else if (previous != NULL)
|
||||||
{
|
{
|
||||||
char* ext = strrchr(previous, '/');
|
f->location = xmlBuildURI(location, previous);
|
||||||
|
assert(f->location != NULL);
|
||||||
if (ext != NULL && ext != previous)
|
f->type = fetch_CURL;
|
||||||
{
|
return;
|
||||||
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 = xcalloc(strlen(location) + strlen("http://") + 1, sizeof(char));
|
f->location = xcalloc(strlen(location) + strlen("http://") + 1, sizeof(char));
|
||||||
@ -253,9 +245,9 @@ struct fetch* fetch_poll(struct fetch* f)
|
|||||||
FILE* in;
|
FILE* in;
|
||||||
|
|
||||||
gui_file_to_filename(f->location, actual_filename, 1024);
|
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);
|
fprintf(in, "%s\n%s\n\n",f->location, actual_filename);
|
||||||
fclose(in);
|
fclose(in);*/
|
||||||
in = fopen(actual_filename, "r");
|
in = fopen(actual_filename, "r");
|
||||||
|
|
||||||
if (in == NULL)
|
if (in == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user