summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-05-27 23:52:35 +0100
committerVincent Sanders <vince@kyllikki.org>2014-05-27 23:52:35 +0100
commit7d02ae916a9984efb619eac279b4d8e12db0b678 (patch)
treebef9147faf3cc1d0acd08ca98ec6435c6b43eea5 /amiga
parent662e950e48b4ad595e602dfc4d51feb9ce75dbbb (diff)
downloadnetsurf-7d02ae916a9984efb619eac279b4d8e12db0b678.tar.gz
netsurf-7d02ae916a9984efb619eac279b4d8e12db0b678.tar.bz2
make launch_url core operation use nsurl
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/launch.c18
-rwxr-xr-xamiga/launch.h2
2 files changed, 13 insertions, 7 deletions
diff --git a/amiga/launch.c b/amiga/launch.c
index 84d362fa1..1405d6a71 100755
--- a/amiga/launch.c
+++ b/amiga/launch.c
@@ -122,25 +122,31 @@ void ami_openurl_close(const char *scheme)
ami_openurl_free_list(&ami_unsupportedprotocols);
}
-void gui_launch_url(const char *url)
+nserror gui_launch_url(struct nsurl *url)
{
APTR procwin = SetProcWindow((APTR)-1L);
char *launchurl = NULL;
- if(ami_openurl_check_list(&ami_unsupportedprotocols, url) == FALSE)
+ if(ami_openurl_check_list(&ami_unsupportedprotocols, nsurl_access(url)) == FALSE)
{
if(IOpenURL)
{
URL_OpenA((STRPTR)url,NULL);
} else {
- if(launchurl = ASPrintf("URL:%s",url)) {
+ if(launchurl = ASPrintf("URL:%s", nsurl_access(url))) {
BPTR fptr = Open(launchurl,MODE_OLDFILE);
- if(fptr) Close(fptr);
- else ami_openurl_add_protocol(url);
+ if(fptr)
+ {
+ Close(fptr);
+ } else {
+ ami_openurl_add_protocol(nsurl_access(url));
+ }
FreeVec(launchurl);
}
}
}
- SetProcWindow(procwin);
+ SetProcWindow(procwin);
+
+ return NSERROR_OK;
}
diff --git a/amiga/launch.h b/amiga/launch.h
index 7baa6ca27..cab638b1d 100755
--- a/amiga/launch.h
+++ b/amiga/launch.h
@@ -26,6 +26,6 @@
void ami_openurl_open(void);
void ami_openurl_close(void);
-void gui_launch_url(const char *url);
+nserror gui_launch_url(struct nsurl *url);
#endif