diff options
author | lilydjwg | 2015-07-25 13:15:39 +0800 |
---|---|---|
committer | lilydjwg | 2015-07-25 13:15:39 +0800 |
commit | fb4c89483394108b6f9bc07281e3d8f0effade00 (patch) | |
tree | 77732e81b04764aec1020e6c428835d0b81f1af1 | |
download | aur-fb4c89483394108b6f9bc07281e3d8f0effade00.tar.gz |
import from AUR3
-rw-r--r-- | .SRCINFO | 40 | ||||
-rw-r--r-- | PKGBUILD | 71 | ||||
-rw-r--r-- | ascii.kbmode.patch | 22 | ||||
-rw-r--r-- | gcc4.3.patch | 111 | ||||
-rw-r--r-- | inputserver.fullcomma.patch | 11 | ||||
-rw-r--r-- | kernel-headers.2.6.26.patch | 16 | ||||
-rw-r--r-- | makefile.destdir.patch | 81 | ||||
-rw-r--r-- | sysconfigdir.patch | 11 | ||||
-rw-r--r-- | winime.amd64.patch | 70 | ||||
-rw-r--r-- | winime.autoselect.patch | 34 | ||||
-rw-r--r-- | winime.support.gbk.patch | 15 | ||||
-rw-r--r-- | zhcon.install | 7 |
12 files changed, 489 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..68f72f3e0eef --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,40 @@ +pkgbase = zhcon + pkgdesc = A Fast CJK Virtual Console + pkgver = 0.2.6 + pkgrel = 9 + url = http://zhcon.sourceforge.net + install = zhcon.install + arch = i686 + arch = x86_64 + license = GPL + depends = gpm + depends = glibc + depends = gcc-libs + depends = ncurses + depends = libcap + backup = etc/zhcon.conf + source = http://downloads.sourceforge.net/zhcon/zhcon-0.2.5.tar.gz + source = http://downloads.sourceforge.net/zhcon/zhcon-0.2.5-to-0.2.6.diff.gz + source = ascii.kbmode.patch + source = gcc4.3.patch + source = inputserver.fullcomma.patch + source = kernel-headers.2.6.26.patch + source = makefile.destdir.patch + source = sysconfigdir.patch + source = winime.amd64.patch + source = winime.autoselect.patch + source = winime.support.gbk.patch + md5sums = 79e1c68aab8341e32129f61c1670baeb + md5sums = 971f68507f9c48a6b5cbee4ba0c1e2a6 + md5sums = e051479e26c98f860852ad11aa826be4 + md5sums = b32d495256637f2ba99d9587097158f2 + md5sums = 9f23e130bd99d1dece51c9b4fb89ba7b + md5sums = a94810b078d9000a6a81bc22b8b053c9 + md5sums = ec022eb5ad99b26de38ceb14face9b0c + md5sums = 771173bd1bc3ac1aba103846431777e2 + md5sums = 86e25942c9c4b2468342a0e3f8401553 + md5sums = c00f39666861b7d18a60212d2fcebf6c + md5sums = 411b157c49a5c50cde24839ed32db4d9 + +pkgname = zhcon + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0c8dd7512841 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: Liu DongMiao <liudongmiao@gmail.com> + +pkgname=zhcon +pkgver=0.2.6 +pkgrel=9 +pkgdesc="A Fast CJK Virtual Console" +arch=(i686 x86_64) +url="http://zhcon.sourceforge.net" +license=(GPL) +depends=(gpm glibc gcc-libs ncurses libcap) +backup=('etc/zhcon.conf') +install=zhcon.install +source=(http://downloads.sourceforge.net/zhcon/zhcon-0.2.5.tar.gz + http://downloads.sourceforge.net/zhcon/zhcon-0.2.5-to-$pkgver.diff.gz + ascii.kbmode.patch + gcc4.3.patch + inputserver.fullcomma.patch + kernel-headers.2.6.26.patch + makefile.destdir.patch + sysconfigdir.patch + winime.amd64.patch + winime.autoselect.patch + winime.support.gbk.patch) +md5sums=('79e1c68aab8341e32129f61c1670baeb' + '971f68507f9c48a6b5cbee4ba0c1e2a6' + 'e051479e26c98f860852ad11aa826be4' + 'b32d495256637f2ba99d9587097158f2' + '9f23e130bd99d1dece51c9b4fb89ba7b' + 'a94810b078d9000a6a81bc22b8b053c9' + 'ec022eb5ad99b26de38ceb14face9b0c' + '771173bd1bc3ac1aba103846431777e2' + '86e25942c9c4b2468342a0e3f8401553' + 'c00f39666861b7d18a60212d2fcebf6c' + '411b157c49a5c50cde24839ed32db4d9') + +build() { + cd $srcdir/zhcon-0.2.5 + patch -p1 < $srcdir/zhcon-0.2.5-to-0.2.6.diff + + # stolen from gentoo, and a little change + patch -p1 < $srcdir/makefile.destdir.patch + patch -p1 < $srcdir/gcc4.3.patch + patch -p1 < $srcdir/kernel-headers.2.6.26.patch + patch -p1 < $srcdir/sysconfigdir.patch + patch -p1 < $srcdir/winime.amd64.patch + + # set keyboard mode to ascii, and restore it + patch -p1 < $srcdir/ascii.kbmode.patch + + # support gbk in winime/native input method + patch -p1 < $srcdir/winime.support.gbk.patch + + # autoselect when reached `mMaxCodes' + patch -p1 < $srcdir/winime.autoselect.patch + + # er, er... + patch -p1 < $srcdir/inputserver.fullcomma.patch + + ./configure --prefix=/usr --mandir=/usr/share/man + + make +} + +package() { + cd $srcdir/zhcon-0.2.5 + make -j1 DESTDIR=$pkgdir install + sed -i -e '/unicon/ d' $pkgdir/etc/zhcon.conf + install -D -m 755 tools/win2mb $pkgdir/usr/bin/win2mb +} + +# vim: ft=sh ts=2 sw=2 et: diff --git a/ascii.kbmode.patch b/ascii.kbmode.patch new file mode 100644 index 000000000000..b0b698ef34d2 --- /dev/null +++ b/ascii.kbmode.patch @@ -0,0 +1,22 @@ +--- a/src/main.cpp 2006-05-13 18:36:45.000000000 +0800 ++++ b/src/main.cpp 2009-10-08 12:19:24.000000000 +0800 +@@ -44,6 +44,10 @@ HzDecoder *gpDecoder = NULL; + Zhcon *gpZhcon = NULL; + + int main(int argc, char* argv[]) { ++ int oldkbmode; ++ bool restore = false; ++ if (!ioctl(0, KDGKBMODE, &oldkbmode) && !ioctl(0, KDSKBMODE, K_XLATE)) ++ restore = true; + try { + Zhcon con(argc, argv); + gpZhcon = &con; +@@ -54,6 +58,8 @@ int main(int argc, char* argv[]) { + } catch (...) { + cerr << "unknown exception caught" << endl; + } ++ if (restore) ++ ioctl(0, KDSKBMODE, oldkbmode); + + return EXIT_SUCCESS; + } diff --git a/gcc4.3.patch b/gcc4.3.patch new file mode 100644 index 000000000000..62accb23b111 --- /dev/null +++ b/gcc4.3.patch @@ -0,0 +1,111 @@ +--- a/src/basefont.cpp 2006-04-25 00:38:27.000000000 +0800 ++++ b/src/basefont.cpp 2009-10-08 12:10:35.000000000 +0800 +@@ -28,6 +28,7 @@ + #include "debug.h" + #include "hzdecoder.h" + #include "basefont.h" ++#include <cstring> + + BaseFont::BaseFont(string & fn, int w, int h) + :mFd(0) +--- a/src/display/fblinear4.cpp 2006-04-25 00:38:23.000000000 +0800 ++++ b/src/display/fblinear4.cpp 2009-10-08 12:10:35.000000000 +0800 +@@ -21,6 +21,7 @@ + #include <endian.h> + #include "global.h" + #include "fblinear4.h" ++#include <cstring> + + __u16 FBLinear4::nibbletab_cfb4[] = { + #if BYTE_ORDER == LITTLE_ENDIAN +--- a/src/display/fblinear8.cpp 2006-04-25 00:38:23.000000000 +0800 ++++ b/src/display/fblinear8.cpp 2009-10-08 12:10:35.000000000 +0800 +@@ -21,6 +21,7 @@ + #include <endian.h> + #include "global.h" + #include "fblinear8.h" ++#include <cstring> + + __u32 FBLinear8::nibbletab_cfb8[] = { + #if BYTE_ORDER == LITTLE_ENDIAN +--- a/src/display/fbvgaplanes.cpp 2006-04-25 00:38:23.000000000 +0800 ++++ b/src/display/fbvgaplanes.cpp 2009-10-08 12:10:35.000000000 +0800 +@@ -24,6 +24,7 @@ + #include <unistd.h> + #include "debug.h" + #include "fbvgaplanes.h" ++#include <cstring> + + #if defined(linux) + #include <sys/io.h> +--- a/src/display/vgadev.cpp 2006-05-13 19:01:22.000000000 +0800 ++++ b/src/display/vgadev.cpp 2009-10-08 12:10:35.000000000 +0800 +@@ -36,6 +36,7 @@ + #include "debug.h" + #include "vgadev.h" + #include "lrmi.h" ++#include <cstring> + + #define GRAPH_BASE 0xA0000 + #define GRAPH_ADDR 0x3ce +--- a/src/graphdev.cpp 2006-04-25 00:38:26.000000000 +0800 ++++ b/src/graphdev.cpp 2009-10-08 12:10:35.000000000 +0800 +@@ -26,6 +26,8 @@ + #include <sys/mman.h> + #include <assert.h> + #include <iostream> ++#include <cstdlib> ++#include <cstring> + #include "debug.h" + + #include "display/fbdev.h" +--- a/src/inputclient.cpp 2006-04-25 00:38:27.000000000 +0800 ++++ b/src/inputclient.cpp 2009-10-08 12:10:35.000000000 +0800 +@@ -16,6 +16,7 @@ + * * + ***************************************************************************/ + ++#include <cstdlib> + #include "inputclient.h" + + Console* InputClient::mpCon = NULL; +--- a/src/inputmanager.cpp 2006-05-03 01:18:39.000000000 +0800 ++++ b/src/inputmanager.cpp 2009-10-08 12:10:35.000000000 +0800 +@@ -24,6 +24,7 @@ using namespace std; + #include <unistd.h> + #include <sys/time.h> + #include <string> ++#include <cstdlib> + + #include "global.h" + #include "debug.h" +--- a/src/inputmanager.h 2006-04-25 00:38:26.000000000 +0800 ++++ b/src/inputmanager.h 2009-10-08 12:10:35.000000000 +0800 +@@ -26,6 +26,7 @@ + using namespace std; + #include <cassert> + #include <vector> ++#include <sys/types.h> + + #include "mouse.h" + #if defined(__FreeBSD__) +--- a/src/window.cpp 2006-04-25 00:38:25.000000000 +0800 ++++ b/src/window.cpp 2009-10-08 12:10:35.000000000 +0800 +@@ -23,6 +23,7 @@ + #include "global.h" + #include "debug.h" + #include "window.h" ++#include <cstring> + + //static members for all the windows + Window* Window::mpConsole = NULL; +--- a/src/zhcon.cpp 2006-05-15 04:12:01.000000000 +0800 ++++ b/src/zhcon.cpp 2009-10-08 12:10:35.000000000 +0800 +@@ -22,6 +22,7 @@ + #include <iostream> + #include <unistd.h> + #include <cstdlib> ++#include <cstring> + #include <cstdio> + #include <sys/ioctl.h> + diff --git a/inputserver.fullcomma.patch b/inputserver.fullcomma.patch new file mode 100644 index 000000000000..57724e74040a --- /dev/null +++ b/inputserver.fullcomma.patch @@ -0,0 +1,11 @@ +--- a/src/inputserver.cpp 2006-04-25 00:38:27.000000000 +0800 ++++ b/src/inputserver.cpp 2009-10-08 12:22:09.000000000 +0800 +@@ -20,7 +20,7 @@ + + InputServer::InputServer() + :mIsFullChar(false), +-mIsFullComma(false), ++mIsFullComma(true), + mClientBufLen(0) {} + + InputServer::~InputServer() {} diff --git a/kernel-headers.2.6.26.patch b/kernel-headers.2.6.26.patch new file mode 100644 index 000000000000..3f5ac35d94c8 --- /dev/null +++ b/kernel-headers.2.6.26.patch @@ -0,0 +1,16 @@ +--- a/src/display/lrmi.c 2006-04-25 00:38:23.000000000 +0800 ++++ b/src/display/lrmi.c 2009-10-08 12:15:59.000000000 +0800 +@@ -33,6 +33,13 @@ This software has NO WARRANTY. Use it a + + #include "lrmi.h" + ++#if defined(__linux__) && !defined(TF_MASK) ++ #define TF_MASK X86_EFLAGS_TF ++ #define IF_MASK X86_EFLAGS_IF ++ #define VIF_MASK X86_EFLAGS_VIF ++ #define IOPL_MASK X86_EFLAGS_IOPL ++#endif ++ + #define REAL_MEM_BASE ((void *)0x10000) + #define REAL_MEM_SIZE 0x10000 + #define REAL_MEM_BLOCKS 0x100 diff --git a/makefile.destdir.patch b/makefile.destdir.patch new file mode 100644 index 000000000000..fad8c027bd17 --- /dev/null +++ b/makefile.destdir.patch @@ -0,0 +1,81 @@ +--- a/doc/Makefile.in 2006-05-03 01:57:34.000000000 +0800 ++++ b/doc/Makefile.in 2009-10-08 12:05:47.000000000 +0800 +@@ -326,11 +326,11 @@ uninstall-am: uninstall-info-am uninstal + + + install-data-local: +- $(mkinstalldirs) $(mandir)/man1/ +- $(INSTALL_DATA) $(top_builddir)/doc/zhcon.1 $(mandir)/man1/zhcon.1 ++ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1/ ++ $(INSTALL_DATA) $(top_builddir)/doc/zhcon.1 $(DESTDIR)$(mandir)/man1/zhcon.1 + + uninstall-local: +- -rm -f $(mandir)/man1/zhcon.1 ++ -rm -f $(DESTDIR)$(mandir)/man1/zhcon.1 + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +--- a/font/Makefile.in 2006-05-03 01:57:34.000000000 +0800 ++++ b/font/Makefile.in 2009-10-08 12:05:47.000000000 +0800 +@@ -321,11 +321,11 @@ uninstall-am: uninstall-info-am uninstal + + + install-data-local: +- $(mkinstalldirs) $(libdir)/zhcon/font/ +- $(INSTALL_DATA) $(srcdir)/*.bpsf $(libdir)/zhcon/font/ ++ $(mkinstalldirs) $(DESTDIR)$(libdir)/zhcon/font/ ++ $(INSTALL_DATA) $(srcdir)/*.bpsf $(DESTDIR)$(libdir)/zhcon/font/ + + uninstall-local: +- -rm -f $(libdir)/zhcon/font/*.bpsf ++ -rm -f $(DESTDIR)$(libdir)/zhcon/font/*.bpsf + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +--- a/input/Makefile.in 2006-05-03 01:57:34.000000000 +0800 ++++ b/input/Makefile.in 2009-10-08 12:05:47.000000000 +0800 +@@ -321,11 +321,11 @@ uninstall-am: uninstall-info-am uninstal + + + install-data-local: +- $(mkinstalldirs) $(libdir)/zhcon/input/ +- $(INSTALL_DATA) $(srcdir)/*.mb $(libdir)/zhcon/input/ ++ $(mkinstalldirs) $(DESTDIR)$(libdir)/zhcon/input/ ++ $(INSTALL_DATA) $(srcdir)/*.mb $(DESTDIR)$(libdir)/zhcon/input/ + + uninstall-local: +- -rm -f $(libdir)/zhcon/input/*.mb ++ -rm -f $(DESTDIR)$(libdir)/zhcon/input/*.mb + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +--- a/src/Makefile.in 2006-05-03 01:57:34.000000000 +0800 ++++ b/src/Makefile.in 2009-10-08 12:05:47.000000000 +0800 +@@ -251,7 +251,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $( + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) +- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" ++ test -z "$(DESTDIR)$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ +@@ -602,14 +602,14 @@ uninstall-info: uninstall-info-recursive + + + install-exec-local: +- chmod 4755 $(bindir)/zhcon ++ chmod 755 $(DESTDIR)$(bindir)/zhcon + + install-data-local: +- $(mkinstalldirs) $(prefix)/etc +- $(INSTALL_DATA) $(srcdir)/zhcon.conf $(prefix)/etc/zhcon.conf ++ $(mkinstalldirs) $(DESTDIR)/etc ++ $(INSTALL_DATA) $(srcdir)/zhcon.conf $(DESTDIR)/etc/zhcon.conf + + uninstall-local: +- -rm -f $(prefix)/etc/zhcon.conf ++ -rm -f $(DESTDIR)/etc/zhcon.conf + + # the library search path. + #zhcon_LDFLAGS = $(all_libraries) -L/usr/lib/unicon diff --git a/sysconfigdir.patch b/sysconfigdir.patch new file mode 100644 index 000000000000..10b6e9511057 --- /dev/null +++ b/sysconfigdir.patch @@ -0,0 +1,11 @@ +--- a/src/zhcon.cpp 2006-05-15 04:12:01.000000000 +0800 ++++ b/src/zhcon.cpp 2009-10-08 12:14:23.000000000 +0800 +@@ -123,7 +123,7 @@ void Zhcon::Init() { + string cfgfile = getenv("HOME"); + cfgfile += "/.zhconrc"; + if (access(cfgfile.c_str(), R_OK) != 0) +- cfgfile = PREFIX "/etc/zhcon.conf"; ++ cfgfile = "/etc/zhcon.conf"; + + //for debug,a pause enable us to attach zhcon's pid in gdb + //char c;cin>>c; diff --git a/winime.amd64.patch b/winime.amd64.patch new file mode 100644 index 000000000000..b0ac3c2008ab --- /dev/null +++ b/winime.amd64.patch @@ -0,0 +1,70 @@ +--- a/src/winime.cpp 2006-04-25 00:38:28.000000000 +0800 ++++ b/src/winime.cpp 2009-10-08 12:16:52.000000000 +0800 +@@ -56,10 +56,10 @@ mCandilistBufLen(0) + + memcpy(&mHead, mpBuf, sizeof(mHead)); + int len = strlen(mHead.mCodeSet); +- mpIndex1 = (char **) (mpBuf + sizeof(mHead)); +- mpIndex2 = (char **) (mpBuf + sizeof(mHead) + len * sizeof(char *)); +- mpText = mpBuf + sizeof(mHead) + len * sizeof(char *) + +- len * len * sizeof(char *); ++ mpIndex1 = (int *) (mpBuf + sizeof(mHead)); ++ mpIndex2 = (int *) (mpBuf + sizeof(mHead) + len * sizeof(int)); ++ mpText = mpBuf + sizeof(mHead) + len * sizeof(int) + ++ len * len * sizeof(int); + } + + WinIme::~WinIme() { +@@ -246,32 +246,32 @@ int WinIme::Search(char c) { + // p = *t; + } + else +- p = mpIndex1[Index(c)]; ++ p = (char *)mpIndex1[Index(c)]; + + if (p == (char *) 0xffffffff) + found = false; +- p = (unsigned int) p + mpText; ++ p = (unsigned long) p + mpText; + } //2nd level index + else if (mNum == 1) { + int l = strlen(mHead.mCodeSet); + if (c == mHead.mWildChar) { + char **t; + t = +- find_if(mpIndex2 + Index(mInput[0]) * l, +- mpIndex2 + (Index(mInput[0]) + 1) * l, ++ find_if((char **)(mpIndex2 + Index(mInput[0]) * l), ++ (char **)(mpIndex2 + (Index(mInput[0]) + 1) * l), + bind2nd(not_equal_to < char *>(), + (char *) 0xffffffff)); +- if (t == mpIndex2 + (Index(mInput[0]) + 1) * l) ++ if (t == ((char **)mpIndex2) + (Index(mInput[0]) + 1) * l) + p = (char *) 0xffffffff; + else + p = *t; + } else +- p = mpIndex2[Index(mInput[0]) * l + Index(c)]; ++ p = (char *)(mpIndex2[Index(mInput[0]) * l + Index(c)]); + + if (p == (char *) 0xffffffff) + found = false; + +- p = (unsigned int) p + mpText; ++ p = (unsigned long) p + mpText; + } else if (mNum < mHead.mMaxCodes) { + p = mpOffset[mNum - 1]; + if (p == (char *) 0xffffffff) +--- a/src/winime.h 2006-04-25 00:38:26.000000000 +0800 ++++ b/src/winime.h 2009-10-08 12:16:52.000000000 +0800 +@@ -83,8 +83,8 @@ class WinIme { + char* mpOffset[12]; + int mFd; + char* mpBuf; +- char** mpIndex1; +- char** mpIndex2; ++ int *mpIndex1; ++ int *mpIndex2; + char* mpText; + char* mpCur; //current search position + unsigned int mBufSize; diff --git a/winime.autoselect.patch b/winime.autoselect.patch new file mode 100644 index 000000000000..7e36f43ca47f --- /dev/null +++ b/winime.autoselect.patch @@ -0,0 +1,34 @@ +--- a/src/nativeinputserver.cpp 2006-04-25 00:38:27.000000000 +0800 ++++ b/src/nativeinputserver.cpp 2009-10-08 14:13:02.000000000 +0800 +@@ -112,6 +112,12 @@ bool NativeInputServer::ProcessKey(char + //wIldchar should not occur in 1st char so check mCount + if (mpIme->InCodeSet(c) + || (!mInput.empty() && mpIme->IsWildChar(c))) { ++ if (mpIme->IsMaxCodes(mInput)) { ++ rBuf = Select(0); ++ mpIme->Reset(); ++ mInput = ""; ++ mList.Reset(); ++ } + flag = false; + while (!mStack.empty()) + mStack.pop(); +--- a/src/winime.h 2006-04-25 00:38:26.000000000 +0800 ++++ b/src/winime.h 2009-10-08 14:13:52.000000000 +0800 +@@ -42,6 +42,16 @@ class WinIme { + bool IsWildChar(char c) const { + return c == mHead.mWildChar; + } ++ bool IsMaxCodes(string& str) { ++ string ime (mHead.mName); ++ // "\xce\xe5\xb1\xca"(wubi) is U+4E94, U+7B14 in GBK ++ if (ime.size() >= 4 \ ++ && ime.compare(ime.size()-4, 4, "\xce\xe5\xb1\xca") == 0 \ ++ && str.compare(0, 1, "z") != 0) ++ return str.size() == 4; ++ else ++ return (int) str.size() == mHead.mMaxCodes; ++ } + string GetName(); + bool InCodeSet(char c) const; + int Search(string& s, int start); diff --git a/winime.support.gbk.patch b/winime.support.gbk.patch new file mode 100644 index 000000000000..730d60ee1aa4 --- /dev/null +++ b/winime.support.gbk.patch @@ -0,0 +1,15 @@ +--- a/src/winime.h 2006-04-25 00:38:26.000000000 +0800 ++++ b/src/winime.h 2009-10-08 12:18:23.000000000 +0800 +@@ -63,10 +63,10 @@ class WinIme { + return (c > 0x80 && c < 0xFF); + } + bool IsGB2312_1(char c) const { +- return c >= 0xA1 && c <= 0xF7; ++ return c >= 0x81 && c <= 0xFE; + } + bool IsGB2312_2(char c) const { +- return c >= 0xA1 && c <= 0xFE; ++ return c >= 0x40 && c <= 0xFE; + } + + void AddCandilist(char*& p,unsigned& buflen); diff --git a/zhcon.install b/zhcon.install new file mode 100644 index 000000000000..1689cfaa54dc --- /dev/null +++ b/zhcon.install @@ -0,0 +1,7 @@ +post_install() { + setcap cap_dac_override,cap_sys_rawio,cap_sys_tty_config=ep usr/bin/zhcon +} + +post_upgrade() { + post_install $1 +} |