diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-01-30 18:57:04 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-01-30 18:57:04 +0000 |
commit | 8373fe14cbf21148ccaf1fabe1a43e90a2def566 (patch) | |
tree | 3fc054a9da8ede3368c1eb55ad460b7bcb1c8546 /amiga/os3support.c | |
parent | 206639055572c11bcad0d71b22d325779dc83e95 (diff) | |
download | netsurf-8373fe14cbf21148ccaf1fabe1a43e90a2def566.tar.gz netsurf-8373fe14cbf21148ccaf1fabe1a43e90a2def566.tar.bz2 |
Enable the font scanner for OS3
Diffstat (limited to 'amiga/os3support.c')
-rw-r--r-- | amiga/os3support.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/amiga/os3support.c b/amiga/os3support.c index b2a7bf887..992fbe007 100644 --- a/amiga/os3support.c +++ b/amiga/os3support.c @@ -53,7 +53,11 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl struct BulletBase *BulletBase; struct OutlineFont *of = NULL; struct GlyphEngine *gengine; - + char *p; + + if(p = strrchr(fileName, '.')) + *p = '\0'; + otagpath = (STRPTR)ASPrintf("FONTS:%s.otag", fileName); fh = Open(otagpath, MODE_OLDFILE); @@ -355,6 +359,19 @@ char *strlwr(char *str) return str; } +char *strsep(char **s1, const char *s2) +{ + char *const p1 = *s1; + + if (p1 != NULL) { + *s1 = strpbrk(p1, s2); + if (*s1 != NULL) { + *(*s1)++ = '\0'; + } + } + return p1; +} + int scandir(const char *dir, struct dirent ***namelist, int (*filter)(const struct dirent *), int (*compar)(const struct dirent **, const struct dirent **)) |