diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-18 15:22:28 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-18 15:22:28 +0000 |
commit | 537c4b33fdf6e143243d5a0d286eeb247362e806 (patch) | |
tree | d8a94cfaa4a71ffc826b7d8176c54445369539f3 /src/fs.c | |
parent | 4032f92867e5570f130e4175b3b4fb61240f9752 (diff) | |
download | librcc-537c4b33fdf6e143243d5a0d286eeb247362e806.tar.gz librcc-537c4b33fdf6e143243d5a0d286eeb247362e806.tar.bz2 librcc-537c4b33fdf6e143243d5a0d286eeb247362e806.tar.xz librcc-537c4b33fdf6e143243d5a0d286eeb247362e806.zip |
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
Diffstat (limited to 'src/fs.c')
-rw-r--r-- | src/fs.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -1,4 +1,5 @@ #include <stdio.h> +#include <stdlib.h> #include <string.h> #include <errno.h> @@ -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)) { |