On Sun, 11 Jan 2015 10:16:16 +0900 Hiroshi Miura <[email protected]> wrote:
> Here is also a bug report on Ubuntu and posted a patch.
> 
> BTS: https://bugs.launchpad.net/ubuntu/+source/stardict-tools/+bug/1313920
> A patch: 
> https://launchpadlibrarian.net/194510738/stardict-tools-tabfile-fix-issue37.diff

This seems to be a better patch:

https://packages.altlinux.org/en/p7/srpms/stardict/patches/stardict-3.0.3-alt-tabfile.patch

-- 
Cheers,
  Andrew
--- stardict/tools/src/libtabfile.cpp
+++ stardict/tools/src/libtabfile.cpp
@@ -109,8 +109,7 @@ static bool check_duplicate_words(GArray *array)
 	for (i=1; i < array->len; i++) {
 		pworditem2 = &g_array_index(array, struct _worditem, i);
 		if(stardict_strcmp(pworditem1->word, pworditem2->word) == 0) {
-			g_warning("Error, duplicate word %s.", pworditem1->word);
-			return false;
+			g_warning("Duplicate word: %s", pworditem1->word);
 		}
 		pworditem1 = pworditem2;
 	}
--- stardict/tools/src/tabfile.cpp
+++ stardict/tools/src/tabfile.cpp
@@ -23,12 +23,14 @@ int main(int argc,char * argv [])
 {
 	if (argc<2) {
 		printf("please type this:\n./tabfile Chinese-idiom-quick.pdb.tab.utf8\n");
-		return FALSE;
+		return 1;
 	}
 
 	gtk_set_locale ();
 	g_type_init ();
+	int res = 0;
 	for (int i=1; i< argc; i++)
-		convert_tabfile (argv[i]);
-	return FALSE;
+		if (!convert_tabfile (argv[i]))
+			res = 1;
+	return res;
 }

Reply via email to