24#include "atari/gemtk/gemtk.h"
31 #define BACKSLASH 0x5C
34 NSLOG(netsurf, INFO,
"in: %s", filename);
36 if( strlen(filename) <= 2){
40 char * fname_local = malloc( strlen(filename)+1 );
41 char * start = (
char*)fname_local;
42 strcpy( start, filename );
45 for(
unsigned int i=0; i<strlen(start); i++ ){
58 NSLOG(netsurf, INFO,
"out: %s", url);
76#ifndef NETSURF_GEM_RESPATH
77 #define NETSURF_GEM_RESPATH "./res/"
84 NSLOG(netsurf, INFO,
"%s (def: %s)", filename, def);
87 NSLOG(netsurf, INFO,
"checking %s", (
char *)&t);
89 if (access(buf, R_OK) == 0) {
95 NSLOG(netsurf, INFO,
"checking %s", (
char *)&t);
97 if (access(buf, R_OK) == 0) {
102 cdir = getenv(
"HOME");
105 strcat(t,
"/.netsurf/");
107 NSLOG(netsurf, INFO,
"checking %s", (
char *)&t);
109 if (access(buf, R_OK) == 0)
114 cdir = getenv(
"NETSURFRES");
118 strcat(buf, filename);
119 NSLOG(netsurf, INFO,
"checking %s", (
char *)&t);
120 if (access(buf, R_OK) == 0)
125 snprintf(t,
PATH_MAX,
"%s%s", getenv(
"HOME"), def + 1);
126 NSLOG(netsurf, INFO,
"checking %s", (
char *)&t);
131 NSLOG(netsurf, INFO,
"checking %s", (
char *)def);
char * local_file_to_url(const char *filename)
char * atari_find_resource(char *buf, const char *filename, const char *def)
#define NETSURF_GEM_RESPATH
Locate a shared resource file by searching known places in order.
Useful interned string pointers (interface).
#define FILE_SCHEME_PREFIX_LEN
File url prefix length.
#define FILE_SCHEME_PREFIX
File url prefix.
#define NSLOG(catname, level, logmsg, args...)
char * gemdos_realpath(const char *path, char *rpath)