diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-06-28 23:44:19 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-06-28 23:44:19 +0000 |
commit | 081011f386915bd037a3569e46ed5e4f10c490da (patch) | |
tree | 6365a5bd41cf85b8eeb1db12740888da8f5926f8 /example | |
parent | c60519ab50b32dc282b385b3bbb2df319279f655 (diff) | |
download | librcc-081011f386915bd037a3569e46ed5e4f10c490da.tar.gz librcc-081011f386915bd037a3569e46ed5e4f10c490da.tar.bz2 librcc-081011f386915bd037a3569e46ed5e4f10c490da.tar.xz librcc-081011f386915bd037a3569e46ed5e4f10c490da.zip |
29.06.2005
Diffstat (limited to 'example')
-rw-r--r-- | example/Makefile.am | 7 | ||||
-rw-r--r-- | example/example.c | 31 | ||||
-rw-r--r-- | example/input.txt | 4 |
3 files changed, 0 insertions, 42 deletions
diff --git a/example/Makefile.am b/example/Makefile.am deleted file mode 100644 index 837a3cf..0000000 --- a/example/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -bin_PROGRAMS= example -example_SOURCES= example.c -example_LDADD= @RCD_LIBS@ -EXTRA_DIST= input.txt - -test: example - cat input.txt | ./example diff --git a/example/example.c b/example/example.c deleted file mode 100644 index 9666ae5..0000000 --- a/example/example.c +++ /dev/null @@ -1,31 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <librcd.h> - -main() { - enum russian_charsets res; - char buf[255]; - int l; - - while (fgets(buf,255,stdin)) { - if (strlen(buf)<2) break; - - res = get_russian_charset(buf,0); - switch(res) { - case RUSSIAN_CHARSET_WIN: - printf("CP1251: "); - break; - case RUSSIAN_CHARSET_ALT: - printf("CP866 : "); - break; - case RUSSIAN_CHARSET_KOI: - printf("KOI8-R: "); - break; - case RUSSIAN_CHARSET_UTF8: - printf("UTF8 : "); - break; - } - printf("%s",buf); - if (buf[strlen(buf)-1]!='\n') printf("\n"); - } -} diff --git a/example/input.txt b/example/input.txt deleted file mode 100644 index 8ea6e44..0000000 --- a/example/input.txt +++ /dev/null @@ -1,4 +0,0 @@ -ÐÒÉ×ÅÔ -ïðèâåò -¯à¨¢¥â -привет |