summaryrefslogtreecommitdiffstats
path: root/src/lngconfig.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-02 05:08:36 +0000
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-02 05:08:36 +0000
commit97e76f4c979d7a0c4ed296c512c3024e3c6afa18 (patch)
treea83fe703fa3ef3a26eed5d6c5929fdcad7429072 /src/lngconfig.c
parent081011f386915bd037a3569e46ed5e4f10c490da (diff)
downloadlibrcc-97e76f4c979d7a0c4ed296c512c3024e3c6afa18.tar.gz
librcc-97e76f4c979d7a0c4ed296c512c3024e3c6afa18.tar.bz2
librcc-97e76f4c979d7a0c4ed296c512c3024e3c6afa18.tar.xz
librcc-97e76f4c979d7a0c4ed296c512c3024e3c6afa18.zip
02.07.2005
Diffstat (limited to 'src/lngconfig.c')
-rw-r--r--src/lngconfig.c46
1 files changed, 28 insertions, 18 deletions
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;i<RCC_MAX_OPTIONS;i++)
- config->options[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;i<RCC_MAX_OPTIONS;i++)
+ config->options[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)
+*/