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/lngconfig.c | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) (limited to 'src/lngconfig.c') diff --git a/src/lngconfig.c b/src/lngconfig.c index b7c40c4..5de0fae 100644 --- a/src/lngconfig.c +++ b/src/lngconfig.c @@ -116,8 +116,6 @@ int rccConfigInit(rcc_language_config config, rcc_context ctx) { config->language = NULL; config->charset = charsets; config->engine = -1; - for (i=0;ioptions[i] = 0; return 0; } @@ -161,7 +159,6 @@ rcc_language_config rccGetCurrentConfig(rcc_context ctx) { return rccGetConfig(ctx, language_id); } - rcc_engine_id rccConfigGetSelectedEngine(rcc_language_config config) { if (!config) return -1; @@ -270,11 +267,6 @@ const char *rccConfigGetCurrentCharsetName(rcc_language_config config, rcc_class return rccConfigGetCharsetName(config, charset_id); } -rcc_option_value rccConfigGetOption(rcc_language_config config, rcc_option option) { - if ((!config)||(option<0)||(option>=RCC_MAX_OPTIONS)) return -1; - - return config->options[option]; -} int rccConfigSetEngine(rcc_language_config config, rcc_engine_id engine_id) { unsigned int i; @@ -325,16 +317,6 @@ int rccConfigSetCharsetByName(rcc_language_config config, rcc_class_id class_id, return rccConfigSetCharset(config, class_id, charset_id); } -int rccConfigSetOption(rcc_language_config config, rcc_option option, rcc_option_value value) { - if ((!config)||(option>=RCC_MAX_OPTIONS)) return -1; - if (config->options[option] != value) { - if (config->ctx->current_config == config) config->ctx->configure = 1; - config->options[option]=value; - } - - return 0; -} - rcc_charset_id rccConfigGetLocaleCharset(rcc_language_config config, const char *locale_variable) { int err; rcc_charset *charsets; @@ -359,3 +341,31 @@ rcc_charset_id rccConfigGetLocaleCharset(rcc_language_config config, const char return rccConfigGetCharsetByName(config, stmp); } + +/* +int rccConfigInit(rcc_language_config config, rcc_context ctx) { + for (i=0;ioptions[i] = 0; +} + +rcc_option_value rccConfigGetOption(rcc_language_config config, rcc_option option) { + if ((!config)||(option<0)||(option>=RCC_MAX_OPTIONS)) return -1; + + return config->options[option]; +} + +int rccConfigSetOption(rcc_language_config config, rcc_option option, rcc_option_value value) { + if ((!config)||(option>=RCC_MAX_OPTIONS)) return -1; + if (config->options[option] != value) { + if (config->ctx->current_config == config) config->ctx->configure = 1; + config->options[option]=value; + } + + return 0; +} + +rcc_option_value rccConfigGetOption(rcc_language_config config, rcc_option option); +int rccConfigSetOption(rcc_language_config config, rcc_option option, rcc_option_value value); +#define rccGetOption(ctx, option) rccConfigGetOption(ctx->current_config, option) +#define rccSetOption(ctx,option,value) rccConfigSetOption(ctx->current_config, option, value) +*/ -- cgit v1.2.3