From 97e76f4c979d7a0c4ed296c512c3024e3c6afa18 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sat, 2 Jul 2005 05:08:36 +0000 Subject: 02.07.2005 --- src/curconfig.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 src/curconfig.c (limited to 'src/curconfig.c') diff --git a/src/curconfig.c b/src/curconfig.c new file mode 100644 index 0000000..4a26a33 --- /dev/null +++ b/src/curconfig.c @@ -0,0 +1,95 @@ +#include +#include "internal.h" + +const char *rccGetEngineName(rcc_context ctx, rcc_engine_id engine_id) { + if (!ctx) return NULL; + return rccConfigGetEngineName(ctx->current_config, engine_id); +} + +const char *rccGetCharsetName(rcc_context ctx, rcc_charset_id charset_id) { + if (!ctx) return NULL; + return rccConfigGetCharsetName(ctx->current_config, charset_id); +} + +const char *rccGetAutoCharsetName(rcc_context ctx, rcc_charset_id charset_id) { + if (!ctx) return NULL; + return rccConfigGetAutoCharsetName(ctx->current_config, charset_id); +} + +rcc_engine_id rccGetEngineByName(rcc_context ctx, const char *name) { + if (!ctx) return (rcc_engine_id)-1; + return rccConfigGetEngineByName(ctx->current_config, name); +} + +rcc_charset_id rccGetCharsetByName(rcc_context ctx, const char *name) { + if (!ctx) return (rcc_charset_id)-1; + return rccConfigGetCharsetByName(ctx->current_config, name); +} + +rcc_charset_id rccGetAutoCharsetByName(rcc_context ctx, const char *name) { + if (!ctx) return (rcc_charset_id)-1; + return rccConfigGetAutoCharsetByName(ctx->current_config, name); +} + +rcc_engine_id rccGetSelectedEngine(rcc_context ctx) { + if (!ctx) return (rcc_engine_id)-1; + return rccConfigGetSelectedEngine(ctx->current_config); +} + +const char *rccGetSelectedEngineName(rcc_context ctx) { + if (!ctx) return NULL; + return rccConfigGetSelectedEngineName(ctx->current_config); +} + +rcc_engine_id rccGetCurrentEngine(rcc_context ctx) { + if (!ctx) return (rcc_engine_id)-1; + return rccConfigGetCurrentEngine(ctx->current_config); +} + +const char *rccGetCurrentEngineName(rcc_context ctx) { + if (!ctx) return NULL; + return rccConfigGetCurrentEngineName(ctx->current_config); +} + +rcc_charset_id rccGetSelectedCharset(rcc_context ctx, rcc_class_id class_id) { + return rccConfigGetSelectedCharset(ctx->current_config, class_id); +} + +const char *rccGetSelectedCharsetName(rcc_context ctx, rcc_class_id class_id) { + if (!ctx) return NULL; + return rccConfigGetSelectedCharsetName(ctx->current_config, class_id); +} + +rcc_charset_id rccGetCurrentCharset(rcc_context ctx, rcc_class_id class_id) { + return rccConfigGetCurrentCharset(ctx->current_config, class_id); +} + +const char *rccGetCurrentCharsetName(rcc_context ctx, rcc_class_id class_id) { + if (!ctx) return NULL; + return rccConfigGetCurrentCharsetName(ctx->current_config, class_id); +} + +int rccSetEngine(rcc_context ctx, rcc_engine_id engine_id) { + if (!ctx) return -1; + return rccConfigSetEngine(ctx->current_config, engine_id); +} + +int rccSetCharset(rcc_context ctx, rcc_class_id class_id, rcc_charset_id charset_id) { + if (!ctx) return -1; + return rccConfigSetCharset(ctx->current_config, class_id, charset_id); +} + +int rccSetEngineByName(rcc_context ctx, const char *name) { + if (!ctx) return -1; + return rccConfigSetEngineByName(ctx->current_config, name); +} + +int rccSetCharsetByName(rcc_context ctx, rcc_class_id class_id, const char *name) { + if (!ctx) return -1; + return rccConfigSetCharsetByName(ctx->current_config, class_id, name); +} + +rcc_charset_id rccGetLocaleCharset(rcc_context ctx, const char *locale_variable) { + if (!ctx) return (rcc_charset_id)-1; + return rccConfigGetLocaleCharset(ctx->current_config, locale_variable); +} -- cgit v1.2.3