summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2013-11-14 19:45:49 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2013-11-14 19:45:49 +0100
commite92fff16d1d364f544a4f597883fbf31e80f94b9 (patch)
treecae61b7879b7feafc158815102e2e3e966f923fb
parent462cd145b8544a2f529d5bc188e6782c6043afd1 (diff)
downloadlibrcc-e92fff16d1d364f544a4f597883fbf31e80f94b9.tar.gz
librcc-e92fff16d1d364f544a4f597883fbf31e80f94b9.tar.bz2
librcc-e92fff16d1d364f544a4f597883fbf31e80f94b9.tar.xz
librcc-e92fff16d1d364f544a4f597883fbf31e80f94b9.zip
Fix complaining in example
-rw-r--r--.bzrignore1
-rw-r--r--ToDo3
-rw-r--r--VERSION2
-rw-r--r--examples/example2.c7
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();