From 537c4b33fdf6e143243d5a0d286eeb247362e806 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Mon, 18 Jul 2005 15:22:28 +0000 Subject: API Improvements - Removed 'rlen' return parameters there not necessary for multibyte encodings - Two versions of recode functions: rccRecode -> rccRecode, rccSizedRecode - Class Types: CONST, SKIP_SAVELOAD - New recode functions: rccToCharset, rccFromCharset - More new recode functions: rccRecodeToCharset, rccRecodeFromCharset, rccRecodeCharsets - New function: rccGetCompiledConfiguration - All warnings are fixed - Perform "File Name" search only if there are non ISO8859-1 chars in the name. - Do not copy invalid characters, - skip them. - Fixed error in rccRecode with 'Recoding Cache' switched On. - Strip leading and trailing spaces in rccDB4 get/set --- src/fs.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/fs.c') diff --git a/src/fs.c b/src/fs.c index abf45b0..c378704 100644 --- a/src/fs.c +++ b/src/fs.c @@ -1,4 +1,5 @@ #include +#include #include #include @@ -22,6 +23,7 @@ #include "internal.h" #include "rcciconv.h" +#include "rccconfig.h" #ifndef strndup static char *rccStrndup(const char *str, size_t n) { @@ -142,9 +144,7 @@ returns: bit 2 Memory cleanup isn't required */ int rccFS1(rcc_language_config config, const char *fspath, char **prefix, char **name) { - int err; - int prefix_size; - char *result, *tmp; + char *result; char *path, *filename; path = *prefix; @@ -158,7 +158,12 @@ int rccFS1(rcc_language_config config, const char *fspath, char **prefix, char * else if (path) result = path; else return -1; - + if (rccIsASCII(result)) { + *name = result; + if ((path)&&(filename)) return 1; + return 3; + } + // Checking without recoding in case of autodetection if (rccGetOption(config->ctx, RCC_OPTION_AUTODETECT_FS_NAMES)) { if (rccIsFile(result)) { -- cgit v1.2.3