Commit 5b4ad208 authored by Anthony Wong's avatar Anthony Wong

Imported Upstream version 1.2

parent b83bfd65
......@@ -3,6 +3,7 @@
# libcangjie was written by these people:
Anthony Wong <anthony.wong@canonical.com>
antonyho <ntonyworkshop@gmail.com>
Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
jeremy-fouriaux <jeremy@raijin.(none)>
Koala Yeung <koalay@gmail.com>
......
## Arch Linux
libcangjie has not been included in official repository yet, but only in AUR.
If it works for you and you like it, please don't hesitate to vote it on
[upvote it](https://aur.archlinux.org/packages/libcangjie/). You can install it
with `yaourt`:
```
$ yaourt libcangjie
```
## Debian Unstable / Sid
libcangjie is included in the default Debian repositories, so you can just
......@@ -34,6 +45,15 @@ $ sudo apt-get install libcangjie2
Note that if you need the development headers, then you should also install
the `libcangjie2-dev` package.
## NixOS
libcangjie is included in the default NixOS channel, **starting with the
14.02 release**, so you can install it with `nix-env`:
```
$ nix-env --install libcangjie
```
## Build from the sources
### Dependencies
......@@ -45,7 +65,9 @@ To build this library, you will need the following:
### Install from a release tarball
_**Note:** There are no release tarballs at this point._
Download a release tarball from
[the download section](http://cangjians.github.io/downloads/libcangjie/) of
our website.
From the root folder of the unpacked tarball, do the usual Autotools dance:
......
#!/bin/bash
#!/bin/sh
set -e
set -x
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for libcangjie 1.1.
# Generated by GNU Autoconf 2.69 for libcangjie 1.2.
#
# Report bugs to <https://github.com/Cangjians/libcangjie/issues>.
#
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libcangjie'
PACKAGE_TARNAME='libcangjie'
PACKAGE_VERSION='1.1'
PACKAGE_STRING='libcangjie 1.1'
PACKAGE_VERSION='1.2'
PACKAGE_STRING='libcangjie 1.2'
PACKAGE_BUGREPORT='https://github.com/Cangjians/libcangjie/issues'
PACKAGE_URL='https://github.com/Cangjians/libcangjie'
......@@ -1325,7 +1325,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures libcangjie 1.1 to adapt to many kinds of systems.
\`configure' configures libcangjie 1.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1395,7 +1395,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libcangjie 1.1:";;
short | recursive ) echo "Configuration of libcangjie 1.2:";;
esac
cat <<\_ACEOF
......@@ -1511,7 +1511,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
libcangjie configure 1.1
libcangjie configure 1.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1789,7 +1789,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libcangjie $as_me 1.1, which was
It was created by libcangjie $as_me 1.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -2657,7 +2657,7 @@ fi
# Define the identity of the package.
PACKAGE='libcangjie'
VERSION='1.1'
VERSION='1.2'
cat >>confdefs.h <<_ACEOF
......@@ -12227,7 +12227,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libcangjie $as_me 1.1, which was
This file was extended by libcangjie $as_me 1.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -12294,7 +12294,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libcangjie config.status 1.1
libcangjie config.status 1.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
AC_PREREQ(2.63)
AC_INIT([libcangjie], [1.1], [https://github.com/Cangjians/libcangjie/issues], [libcangjie], [https://github.com/Cangjians/libcangjie])
AC_INIT([libcangjie], [1.2], [https://github.com/Cangjians/libcangjie/issues], [libcangjie], [https://github.com/Cangjians/libcangjie])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
......
......@@ -254,9 +254,9 @@
☆ 0 0 0 0 0 0 0 0 1 yyybi yyybi,za NA 0
♀ 0 0 0 0 0 0 0 0 1 yyybr yyybr NA 0
♂ 0 0 0 0 0 0 0 0 1 yyybq yyybq NA 0
、 0 0 0 0 0 0 0 1 0 i,xi,zxac i,xi,zxac , 3
。 0 0 0 0 0 0 0 1 0 xr,yyyco,zxad xr,yyyco,zxad . 2
〇 0 0 0 0 0 0 0 0 1 NA xxr,xxxxx NA 0
、 0 0 0 0 0 0 0 1 0 zxac zxac , 3
。 0 0 0 0 0 0 0 1 0 zxad zxad . 2
〇 0 0 0 0 0 0 0 0 1 NA xxxxx NA 0
〈 0 0 0 0 0 0 0 1 0 yyyae,zxby yyyae,za,zxby ' 6
〉 0 0 0 0 0 0 0 1 0 yyyaf,zxca yyyaf,za,zxca ' 5
《 0 0 0 0 0 0 0 1 0 yyyag,zxbu yyyag,za,zxbu " 6
......@@ -7228,7 +7228,7 @@
也 1 1 0 0 1 0 0 0 0 pd pd NA 23201
习 1 0 0 0 1 0 0 0 0 sim sim NA 0
乡 1 0 0 0 1 0 0 0 0 vvh vvh NA 0
乢 1 0 0 0 1 0 0 0 0 uu uu,xxxua NA 0
乢 1 0 0 0 1 0 0 0 0 uu uu,xxxuu NA 0
乣 1 0 0 0 1 0 0 0 0 viu viu NA 0
乤 1 0 0 0 1 0 0 0 0 myn myn NA 0
乥 1 0 0 0 1 0 0 0 0 hcn hcn NA 0
......@@ -7467,7 +7467,7 @@
低 1 1 0 0 1 0 0 0 0 ohpm,ohvi ohpm,ohvi NA 22459
住 1 1 0 0 1 0 0 0 0 oyg oyg NA 22545
佐 1 1 0 0 1 0 0 0 0 okm okm NA 22537
佑 1 1 0 0 1 0 0 0 0 okr,okrx okr,xokr NA 22536
佑 1 1 0 0 1 0 0 0 0 okr okr,xokr NA 22536
佒 1 1 0 0 1 0 0 0 0 olbk olbk NA 14173
体 1 1 0 0 1 0 0 0 0 odm odm NA 14177
佔 1 1 0 0 1 0 0 0 0 oyr oyr NA 22531
......@@ -17861,7 +17861,7 @@
矢 1 1 0 0 1 0 0 0 0 ok ok NA 22820
矣 1 1 0 0 1 0 0 0 0 iok iok NA 22159
矤 1 0 0 0 1 0 0 0 0 nok nok NA 0
知 1 1 0 0 1 0 0 0 0 okr okr NA 21568
知 1 1 0 0 1 0 0 0 0 okr,okrx okr NA 21568
矦 1 0 1 0 1 0 0 0 0 nmok nmok NA 0
矧 1 1 0 0 1 0 0 0 0 oknl oknl NA 12759
矨 1 1 0 0 1 0 0 0 0 okhk okhk NA 12758
......@@ -21518,7 +21518,7 @@
蘫 1 0 0 0 1 0 0 0 0 test test NA 0
蘬 1 1 0 0 1 0 0 0 0 thmb thmb NA 2677
蘭 1 1 0 0 1 0 0 0 0 tanw tanw NA 14857
蘮 1 1 0 0 1 0 0 0 0 twln twln,xxxta NA 3014
蘮 1 1 0 0 1 0 0 0 0 twln twln,xxxtw NA 3014
蘯 1 0 1 0 1 0 0 0 0 teht teht NA 0
蘰 1 0 0 0 1 0 0 0 0 tvfe tvfe,xtvfe NA 0
蘱 1 1 0 0 1 0 0 0 0 tfkc tfkc NA 2507
......@@ -27482,7 +27482,7 @@
鵷 1 1 0 0 1 0 0 0 0 juhaf juhaf NA 3559
鵸 1 1 0 0 1 0 0 0 0 krhaf krhaf NA 3552
鵹 1 1 0 0 1 0 0 0 0 hhhaf hhhaf NA 3537
鵺 1 0 0 0 1 0 0 0 0 ykhaf xxxyb,ykhaf NA 0
鵺 1 0 0 0 1 0 0 0 0 ykhaf xxxyk,ykhaf NA 0
鵻 1 1 0 0 1 0 0 0 0 hfog hfog NA 3540
鵼 1 0 1 0 1 0 0 0 0 jmhaf jmhaf NA 0
鵽 1 1 0 0 1 0 0 0 0 eeeef eeeef NA 3548
......@@ -27622,7 +27622,7 @@
鸃 1 1 0 0 1 0 0 0 0 hftgi hftgi NA 2272
鸄 1 1 0 0 1 0 0 0 0 hkhaf hkhaf,xhkha NA 2264
鸅 1 1 0 0 1 0 0 0 0 wjhaf wjhaf NA 2270
鸆 1 1 0 0 1 0 0 0 0 ykhaf xxxya,ykhaf NA 2271
鸆 1 1 0 0 1 0 0 0 0 ykhaf xxxyk,ykhaf NA 2271
鸇 1 1 0 0 1 0 0 0 0 ymhaf ymhaf NA 2273
鸈 1 0 0 0 1 0 0 0 0 tdhaf tdhaf NA 0
鸉 1 1 0 0 1 0 0 0 0 dhhaf dhhaf NA 2267
......@@ -60415,7 +60415,7 @@
𧷅 1 0 0 0 0 0 0 0 0 belmc belmc NA 0
𧷆 1 0 0 0 0 0 0 0 0 bcysd bcysd NA 0
𧷇 1 0 0 0 0 0 0 0 0 lmfbc lmfbc NA 0
𧷈 1 0 0 0 0 0 0 0 0 xmbuc hmbuc NA 0
𧷈 1 0 0 0 0 0 0 0 0 hmbuc hmbuc NA 0
𧷉 1 0 0 0 0 0 0 0 0 bcbcc bcbcc NA 0
𧷊 1 0 0 0 0 0 0 0 0 bchju bchju NA 0
𧷋 1 0 0 0 0 0 0 0 0 mwvbc mwvbc NA 0
......@@ -40,7 +40,8 @@ void usage(char *progname) {
printf(" default: big5,hkscs\n");
printf(" acceptable values:\n");
printf(" big5, hkscs, punctuation, chinese,\n");
printf(" zhuyin, kanji, katakana, symbols\n");
printf(" zhuyin, kanji, katakana, hiragana,\n");
printf(" symbols\n");
printf("-m, --mode=MODE specify the mode of query\n");
printf(" default: code\n");
printf(" acceptable values:\n");
......@@ -114,14 +115,14 @@ int main(int argc, char **argv) {
if (strstr(optarg, "hkscs") != NULL) {
opt_filter = opt_filter | CANGJIE_FILTER_HKSCS;
}
if (strstr(optarg, "puntuation") != NULL) {
if (strstr(optarg, "punctuation") != NULL) {
opt_filter = opt_filter | CANGJIE_FILTER_PUNCTUATION;
}
if (strstr(optarg, "chinese") != NULL) {
opt_filter = opt_filter | CANGJIE_FILTER_CHINESE;
}
if (strstr(optarg, "zhuyin") != NULL) {
opt_filter = opt_filter | CANGJIE_FILTER_BIG5;
opt_filter = opt_filter | CANGJIE_FILTER_ZHUYIN;
}
if (strstr(optarg, "kanji") != NULL) {
opt_filter = opt_filter | CANGJIE_FILTER_KANJI;
......@@ -219,6 +220,16 @@ int main(int argc, char **argv) {
cangjie_free(cj);
return CANGJIE_NOCHARS;
} else if (ret == CANGJIE_INVALID) {
printf("Invalid code '%s'\n", code);
cangjie_free(cj);
return CANGJIE_INVALID;
} else if (ret != CANGJIE_OK) {
printf("Other error %d with code '%s'\n", ret, code);
cangjie_free(cj);
return ret;
}
iter = chars;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment