From d21447d096a320a08b3efb2b8768fad0dcdcfd64 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 5 May 2016 22:28:51 +0100 Subject: move frontends into sub directory --- frontends/atari/findfile.c | 144 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 frontends/atari/findfile.c (limited to 'frontends/atari/findfile.c') diff --git a/frontends/atari/findfile.c b/frontends/atari/findfile.c new file mode 100644 index 000000000..45ca6d916 --- /dev/null +++ b/frontends/atari/findfile.c @@ -0,0 +1,144 @@ +/* + * Copyright 2010 Ole Loots + * + * This file is part of NetSurf, http://www.netsurf-browser.org/ + * + * NetSurf is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * NetSurf is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include + +#include "utils/log.h" +#include "utils/corestrings.h" + +#include "atari/gemtk/gemtk.h" +#include "atari/findfile.h" +#include "atari/gui.h" +#include "atari/osspec.h" + +char * local_file_to_url( const char * filename ) +{ + #define BACKSLASH 0x5C + char * url; + + LOG("in: %s", filename); + + if( strlen(filename) <= 2){ + return( NULL ); + } + + char * fname_local = malloc( strlen(filename)+1 ); + char * start = (char*)fname_local; + strcpy( start, filename ); + + /* convert backslashes: */ + for( unsigned int i=0; i