summaryrefslogtreecommitdiffstats
path: root/engines/russian.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-13 16:49:47 +0000
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-13 16:49:47 +0000
commit7233ff9095194b38586ce438379f08691a0fecdd (patch)
tree8c14b8899914b4ae9e0d6f62e14dd6b3519983cd /engines/russian.c
parentfad788d3f02564486039886b1de1cbf976776ac3 (diff)
downloadlibrcc-7233ff9095194b38586ce438379f08691a0fecdd.tar.gz
librcc-7233ff9095194b38586ce438379f08691a0fecdd.tar.bz2
librcc-7233ff9095194b38586ce438379f08691a0fecdd.tar.xz
librcc-7233ff9095194b38586ce438379f08691a0fecdd.zip
Engine Plugins
Diffstat (limited to 'engines/russian.c')
-rw-r--r--engines/russian.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/engines/russian.c b/engines/russian.c
new file mode 100644
index 0000000..f7e5146
--- /dev/null
+++ b/engines/russian.c
@@ -0,0 +1,25 @@
+#include <stdio.h>
+
+#include <librcd.h>
+#include <librcc.h>
+
+static rcc_charset_id AutoengineRussian(rcc_engine_context ctx, const char *buf, int len) {
+ return (rcc_charset_id)rcdGetRussianCharset(buf,len);
+}
+
+static rcc_engine russian_engine = {
+ "Russian", NULL, NULL, &AutoengineRussian, {"CP1251","KOI8-R","UTF-8","IBM866", NULL}
+};
+
+static rcc_engine ukrainian_engine = {
+ "Russian", NULL, NULL, &AutoengineRussian, {"CP1251","KOI8-U","UTF-8","IBM865", NULL}
+};
+
+rcc_engine *rccGetInfo(const char *lang) {
+ if (!lang) return NULL;
+
+ if (!strcmp(lang, "ru")) return &russian_engine;
+ if (!strcmp(lang, "uk")) return &ukrainian_engine;
+
+ return NULL;
+}