From 537c4b33fdf6e143243d5a0d286eeb247362e806 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Mon, 18 Jul 2005 15:22:28 +0000 Subject: API Improvements - Removed 'rlen' return parameters there not necessary for multibyte encodings - Two versions of recode functions: rccRecode -> rccRecode, rccSizedRecode - Class Types: CONST, SKIP_SAVELOAD - New recode functions: rccToCharset, rccFromCharset - More new recode functions: rccRecodeToCharset, rccRecodeFromCharset, rccRecodeCharsets - New function: rccGetCompiledConfiguration - All warnings are fixed - Perform "File Name" search only if there are non ISO8859-1 chars in the name. - Do not copy invalid characters, - skip them. - Fixed error in rccRecode with 'Recoding Cache' switched On. - Strip leading and trailing spaces in rccDB4 get/set --- examples/example.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/example.c b/examples/example.c index 2053c61..820bae0 100644 --- a/examples/example.c +++ b/examples/example.c @@ -1,19 +1,20 @@ #include +#include +#include #include #include static rcc_class classes[] = { - { "input", RCC_CLASS_STANDARD, NULL, NULL, "Input Encoding" }, - { "output", RCC_CLASS_STANDARD, "LC_CTYPE", NULL, "Output Encoding" }, + { "input", RCC_CLASS_STANDARD, NULL, NULL, "Input Encoding", 0 }, + { "output", RCC_CLASS_STANDARD, "LC_CTYPE", NULL, "Output Encoding", 0 }, { NULL } }; -main() { +int main() { const char *language; char buf[255]; char *recoded; - int l; setlocale(LC_ALL, ""); @@ -26,7 +27,7 @@ main() { while (fgets(buf,255,stdin)) { if (strlen(buf)<2) break; - recoded = rccRecode(NULL, 0, 1, buf, 0, NULL); + recoded = rccRecode(NULL, 0, 1, buf); if (recoded) { printf(recoded); free(recoded); @@ -34,4 +35,5 @@ main() { } rccFree(); + return 0; } -- cgit v1.2.3