summaryrefslogtreecommitdiffstats
path: root/src/curconfig.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2005-08-09 23:22:36 +0000
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2005-08-09 23:22:36 +0000
commit63bf2a90a6d6fb0859e4c9dd9fcac85de9adc0f1 (patch)
treef18ef0378e787945d5fd722b2c2793b878143221 /src/curconfig.c
parent9d4628df369b92016b7fc3bfc7fed6d06ff2ca9a (diff)
downloadlibrcc-63bf2a90a6d6fb0859e4c9dd9fcac85de9adc0f1.tar.gz
librcc-63bf2a90a6d6fb0859e4c9dd9fcac85de9adc0f1.tar.bz2
librcc-63bf2a90a6d6fb0859e4c9dd9fcac85de9adc0f1.tar.xz
librcc-63bf2a90a6d6fb0859e4c9dd9fcac85de9adc0f1.zip
- Russian Engine is really renamed
- Translate to English is fixed - Default charset for "all" languages - Support for per-class additional and dissabled charsets - Use 'GetSomethingNumber' instead of 'GetSomethingList'. 'GetSomethingList' functions are depricated. - rccUiGetSomethingName gets id's on the input instead of names
Diffstat (limited to 'src/curconfig.c')
-rw-r--r--src/curconfig.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/curconfig.c b/src/curconfig.c
index ac1b722..6877f87 100644
--- a/src/curconfig.c
+++ b/src/curconfig.c
@@ -1,6 +1,34 @@
#include <stdio.h>
#include "internal.h"
+int rccGetCharsetNumber(rcc_context ctx) {
+ if (!ctx) {
+ if (rcc_default_ctx) ctx = rcc_default_ctx;
+ else return 0;
+ }
+
+ return rccConfigGetCharsetNumber(ctx->current_config);
+}
+
+int rccGetClassCharsetNumber(rcc_context ctx, rcc_class_id class_id) {
+ if (!ctx) {
+ if (rcc_default_ctx) ctx = rcc_default_ctx;
+ else return 0;
+ }
+
+ return rccConfigGetClassCharsetNumber(ctx->current_config, class_id);
+}
+
+int rccGetEngineNumber(rcc_context ctx) {
+ if (!ctx) {
+ if (rcc_default_ctx) ctx = rcc_default_ctx;
+ else return 0;
+ }
+
+ return rccConfigGetEngineNumber(ctx->current_config);
+}
+
+
const char *rccGetEngineName(rcc_context ctx, rcc_engine_id engine_id) {
if (!ctx) {
if (rcc_default_ctx) ctx = rcc_default_ctx;
@@ -19,6 +47,15 @@ const char *rccGetCharsetName(rcc_context ctx, rcc_charset_id charset_id) {
return rccConfigGetCharsetName(ctx->current_config, charset_id);
}
+const char *rccGetClassCharsetName(rcc_context ctx, rcc_class_id class_id, rcc_charset_id charset_id) {
+ if (!ctx) {
+ if (rcc_default_ctx) ctx = rcc_default_ctx;
+ else return NULL;
+ }
+
+ return rccConfigGetClassCharsetName(ctx->current_config, class_id, charset_id);
+}
+
const char *rccGetAutoCharsetName(rcc_context ctx, rcc_autocharset_id charset_id) {
if (!ctx) {
if (rcc_default_ctx) ctx = rcc_default_ctx;
@@ -46,6 +83,15 @@ rcc_charset_id rccGetCharsetByName(rcc_context ctx, const char *name) {
return rccConfigGetCharsetByName(ctx->current_config, name);
}
+rcc_charset_id rccGetClassCharsetByName(rcc_context ctx, rcc_class_id class_id, const char *name) {
+ if (!ctx) {
+ if (rcc_default_ctx) ctx = rcc_default_ctx;
+ else return (rcc_charset_id)-1;
+ }
+
+ return rccConfigGetClassCharsetByName(ctx->current_config, class_id, name);
+}
+
rcc_autocharset_id rccGetAutoCharsetByName(rcc_context ctx, const char *name) {
if (!ctx) {
if (rcc_default_ctx) ctx = rcc_default_ctx;
@@ -161,6 +207,14 @@ rcc_charset_id rccGetLocaleCharset(rcc_context ctx, const char *locale_variable)
return rccConfigGetLocaleCharset(ctx->current_config, locale_variable);
}
+rcc_charset_id rccGetLocaleClassCharset(rcc_context ctx, rcc_class_id class_id, const char *locale_variable) {
+ if (!ctx) {
+ if (rcc_default_ctx) ctx = rcc_default_ctx;
+ else return -1;
+ }
+ return rccConfigGetLocaleClassCharset(ctx->current_config, class_id, locale_variable);
+}
+
rcc_autocharset_id rccDetectCharset(rcc_context ctx, rcc_class_id class_id, const char *buf, size_t len) {
if (!ctx) {
if (rcc_default_ctx) ctx = rcc_default_ctx;
@@ -169,3 +223,12 @@ rcc_autocharset_id rccDetectCharset(rcc_context ctx, rcc_class_id class_id, cons
return rccConfigDetectCharset(ctx->current_config, class_id, buf, len);
}
+
+int rccIsDisabledCharset(rcc_context ctx, rcc_class_id class_id, rcc_charset_id charset_id) {
+ if (!ctx) {
+ if (rcc_default_ctx) ctx = rcc_default_ctx;
+ else return -1;
+ }
+
+ return rccConfigIsDisabledCharset(ctx->current_config, class_id, charset_id);
+}