summaryrefslogtreecommitdiffstats
path: root/ui/rccnames.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 /ui/rccnames.c
parent081011f386915bd037a3569e46ed5e4f10c490da (diff)
downloadlibrcc-97e76f4c979d7a0c4ed296c512c3024e3c6afa18.tar.gz
librcc-97e76f4c979d7a0c4ed296c512c3024e3c6afa18.tar.bz2
librcc-97e76f4c979d7a0c4ed296c512c3024e3c6afa18.tar.xz
librcc-97e76f4c979d7a0c4ed296c512c3024e3c6afa18.zip
02.07.2005
Diffstat (limited to 'ui/rccnames.c')
-rw-r--r--ui/rccnames.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/ui/rccnames.c b/ui/rccnames.c
new file mode 100644
index 0000000..e4f4b48
--- /dev/null
+++ b/ui/rccnames.c
@@ -0,0 +1,31 @@
+#include <stdio.h>
+
+#include "internal.h"
+
+const char *rccUiGetLanguageName(rcc_ui_context ctx, const char *lang) {
+ unsigned int i;
+ rcc_language_name *names;
+
+ if ((!ctx)||(!lang)) return NULL;
+
+ names = ctx->language_names;
+
+ for (i=0;names[i].sn;i++)
+ if (!strcmp(lang, names[i].sn)) return names[i].name;
+
+ return lang;
+}
+
+const char *rccUiGetOptionName(rcc_ui_context ctx, rcc_option option) {
+ unsigned int i;
+ rcc_option_name *names;
+
+ if (!ctx) return NULL;
+
+ names = ctx->option_names;
+
+ for (i=0;i<RCC_MAX_OPTIONS;i++)
+ if (names[i].option == option) return names[i].name;
+
+ return NULL;
+}