summaryrefslogtreecommitdiffstats
path: root/src/librcc.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/librcc.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/librcc.c')
-rw-r--r--src/librcc.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/librcc.c b/src/librcc.c
index 90ec5aa..0a66e9a 100644
--- a/src/librcc.c
+++ b/src/librcc.c
@@ -1,6 +1,6 @@
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
+#include <stdlib.h>
#include "../config.h"
@@ -20,12 +20,32 @@
#include "rccconfig.h"
#include "rccenca.h"
#include "rcclist.h"
+#include "plugin.h"
#include "engine.h"
#include "rccxml.h"
static int initialized = 0;
char *rcc_home_dir = NULL;
rcc_context rcc_default_ctx = NULL;
+static rcc_compiled_configuration_s compiled_configuration;
+
+rcc_compiled_configuration rccGetCompiledConfiguration() {
+ compiled_configuration.flags = 0;
+#ifdef HAVE_RCD
+ compiled_configuration.flags|=RCC_CC_FLAG_HAVE_RCD;
+#endif /* HAVE_RCD */
+#ifdef HAVE_ENCA
+ compiled_configuration.flags|=RCC_CC_FLAG_HAVE_ENCA;
+#endif /* HAVE_ENCA */
+#ifdef HAVE_DLOPEN
+ compiled_configuration.flags|=RCC_CC_FLAG_HAVE_DYNAMIC_ENGINES;
+#endif /* HAVE_DLOPEN */
+#ifdef HAVE_DB_H
+ compiled_configuration.flags|=RCC_CC_FLAG_HAVE_BERKLEY_DB;
+#endif /* HAVE_DB_H */
+
+ return &compiled_configuration;
+}
int rccInit() {
int err;
@@ -398,7 +418,7 @@ int rccConfigure(rcc_context ctx) {
return 0;
}
-char *rccCreateResult(rcc_context ctx, size_t len, size_t *rlen) {
+char *rccCreateResult(rcc_context ctx, size_t len) {
char *res;
if (!len) len = strlen(ctx->tmpbuffer);
@@ -409,7 +429,5 @@ char *rccCreateResult(rcc_context ctx, size_t len, size_t *rlen) {
memcpy(res, ctx->tmpbuffer, len);
res[len] = 0;
- if (rlen) *rlen = len;
-
return res;
}