summaryrefslogtreecommitdiffstats
path: root/src/engine.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-18 15:22:28 +0000
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-18 15:22:28 +0000
commit537c4b33fdf6e143243d5a0d286eeb247362e806 (patch)
treed8a94cfaa4a71ffc826b7d8176c54445369539f3 /src/engine.c
parent4032f92867e5570f130e4175b3b4fb61240f9752 (diff)
downloadlibrcc-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/engine.c')
-rw-r--r--src/engine.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/engine.c b/src/engine.c
index 0ff1aa1..d83fbf7 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -4,6 +4,7 @@
#include "internal.h"
#include "plugin.h"
#include "rccconfig.h"
+#include "rccenca.h"
#include "engine.h"
@@ -15,11 +16,12 @@
# endif /* RCC_RCD_DYNAMIC */
#endif /* RCC_RCD_SUPPORT */
+#ifdef RCC_RCD_DYNAMIC
static rcc_library_handle rcd_handle = NULL;
+#endif /* RCC_RCD_DYNAMIC */
-rcc_charset_id rccAutoengineRussian(rcc_engine_context ctx, const char *buf, int len) {
+rcc_autocharset_id rccAutoengineRussian(rcc_engine_context ctx, const char *buf, int len) {
#ifdef RCC_RCD_SUPPORT
- rcc_charset_id id;
# ifdef RCC_RCD_DYNAMIC
if (!rcdGetRussianCharset) return (rcc_charset_id)-1;
# endif /* RCC_RCD_DYNAMIC */
@@ -30,8 +32,8 @@ rcc_charset_id rccAutoengineRussian(rcc_engine_context ctx, const char *buf, int
}
-static int rccRCDLibraryLoad() {
#ifdef RCC_RCD_DYNAMIC
+static int rccRCDLibraryLoad() {
if (rcd_handle) return 0;
rcd_handle = rccLibraryOpen(RCC_RCD_LIB);
@@ -46,19 +48,19 @@ static int rccRCDLibraryLoad() {
# endif /* RCC_DEBUG */
return -1;
}
-#endif /* RCC_RCD_DYNAMIC */
return 0;
}
+#endif /* RCC_RCD_DYNAMIC */
-static void rccRCDLibraryUnload() {
#ifdef RCC_RCD_DYNAMIC
+static void rccRCDLibraryUnload() {
if (rcd_handle) {
rccLibraryClose(rcd_handle);
rcd_handle = NULL;
}
-#endif /* RCC_RCD_DYNAMIC */
}
+#endif /* RCC_RCD_DYNAMIC */
int rccEngineInit() {
#ifdef RCC_RCD_DYNAMIC