From e92fff16d1d364f544a4f597883fbf31e80f94b9 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 14 Nov 2013 19:45:49 +0100 Subject: Fix complaining in example --- .bzrignore | 1 + ToDo | 3 +++ VERSION | 2 +- examples/example2.c | 7 +++++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.bzrignore b/.bzrignore index a60ad34..c905381 100644 --- a/.bzrignore +++ b/.bzrignore @@ -44,3 +44,4 @@ CMakeCache.txt rcc-gtk3-config librcc.pc ar-lib +src/.dirstamp diff --git a/ToDo b/ToDo index 1f80fa9..2f50457 100644 --- a/ToDo +++ b/ToDo @@ -10,6 +10,9 @@ - Solve mpg123 slowdown. 0.3.x: + - Shall we always return result even if recoding is not required (not a NULL as now)? + Currently we have no way to know if something is failed or if we just have a correct + string already... - Language and Encoding autodetection improvements. + LibRCD should use DB4 with statistic for different languages + The statistic should be gathered using: diff --git a/VERSION b/VERSION index c0be11a..d3b5ba4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.11CVS +0.2.11 diff --git a/examples/example2.c b/examples/example2.c index 13c280e..f8b085c 100644 --- a/examples/example2.c +++ b/examples/example2.c @@ -65,14 +65,17 @@ int main(int argc, char *argv[]) { if (strlen(buf)<2) break; rccstring = rccFrom(NULL, 0, buf); + if (!rccstring) rccstring = strdup(buf); + if (rccstring) { recoded = rccTo(NULL, 1, rccstring); + if (!recoded) recoded = strdup(rccstring); if (recoded) { printf("%s", recoded); free(recoded); - } else printf("Recoding from UTF-8 is failed\n"); + } free(rccstring); - } else printf("Recoding to UTF-8 is failed\n"); + } } rccFree(); -- cgit v1.2.3