diff options
Diffstat (limited to 'examples/example.c')
-rw-r--r-- | examples/example.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/example.c b/examples/example.c index 820bae0..43fc853 100644 --- a/examples/example.c +++ b/examples/example.c @@ -5,22 +5,23 @@ #include <librcc.h> -static rcc_class classes[] = { - { "input", RCC_CLASS_STANDARD, NULL, NULL, "Input Encoding", 0 }, - { "output", RCC_CLASS_STANDARD, "LC_CTYPE", NULL, "Output Encoding", 0 }, - { NULL } -}; int main() { const char *language; char buf[255]; char *recoded; + + rcc_class classes[] = { + { "input", RCC_CLASS_STANDARD, NULL, NULL, "Input Encoding", 0 }, + { "output", RCC_CLASS_STANDARD, "LC_CTYPE", NULL, "Output Encoding", 0 }, + { NULL } + }; setlocale(LC_ALL, ""); rccInit(); rccInitDefaultContext(NULL, 0, 0, classes, 0); - + language = rccGetCurrentLanguageName(NULL); if (language) printf("Current Language: %s\n\n", language); else printf("Unable Detect Language\n\n"); |