Package: zhcon
Version: 1:0.2.6-10
Maintainer: Aron Xu
Bugs: The "zhcon" executable fails to launch.
Porject: http://anonscm.debian.org/cgit/chinese/zhcon.git/
Buggy patch link:
http://anonscm.debian.org/cgit/chinese/zhcon.git/commit/?id=c3237304f3dcfee82ccb44e18b015633a03f724e
Bug description:
The "0008-default-to-utf8.patch" file is a buggy patch, it causes the failure
of launching the "zhcon" executable. Please remove the patch.
Technical infomation:
The maintainer Aron Xu has misunderstood the usage of "getopt_long" function,
and therefore the code below in the patch "0008-default-to-utf8.patch":
static struct option long_options[] = {
{ "help", 0, NULL, 'h' },
{ "version", 0, NULL, 'V' },
{ "utf8", 0, NULL, 1 },
{ "drv", 1, NULL, 0 },
{ NULL, 0, NULL, 0 }
};
causes the "getopt_long" returns 1 while you use the "--utf8" switch, and then
the "switch-case" runs into "default" label and causes the entire program exits
abnormally.
If you do not add the "--utf8" switch, the code in below in line number 247:
if (strcmp (long_options[option_index].name, "utf8") == 0)
cause failure to run into the if-clause and therefore unable to set the UTF-8
locale.