diff options
Diffstat (limited to 'chinese/zhcon/files')
-rw-r--r-- | chinese/zhcon/files/extrapatch-aa | 13 | ||||
-rw-r--r-- | chinese/zhcon/files/patch-aa | 11 | ||||
-rw-r--r-- | chinese/zhcon/files/patch-ab | 28 | ||||
-rw-r--r-- | chinese/zhcon/files/patch-src::Makefile.am | 15 | ||||
-rw-r--r-- | chinese/zhcon/files/patch-src::Makefile.in | 15 | ||||
-rw-r--r-- | chinese/zhcon/files/patch-src::display::fbdev.cpp | 29 | ||||
-rw-r--r-- | chinese/zhcon/files/patch-src::nativeinputserver.cpp | 45 | ||||
-rw-r--r-- | chinese/zhcon/files/patch-src::zhcon.cpp | 48 |
8 files changed, 152 insertions, 52 deletions
diff --git a/chinese/zhcon/files/extrapatch-aa b/chinese/zhcon/files/extrapatch-aa index 04ca74370675..e69de29bb2d1 100644 --- a/chinese/zhcon/files/extrapatch-aa +++ b/chinese/zhcon/files/extrapatch-aa @@ -1,13 +0,0 @@ ---- src/cin2mb.c.orig Tue Sep 11 02:27:51 2001 -+++ src/cin2mb.c Tue Sep 11 09:14:54 2001 -@@ -229,7 +229,10 @@ - buf[0] = buf[1] = buf[2] = buf[3] = '\0'; - if(fwrite(buf, sizeof(char), 4, fout)!=4) { - printf("Fatal write 0000 failed.\n"); -+ goto error_close_fout; - } -+ -+ return(0); - - error_close_fout: - if(fout!=NULL) fclose(fout); diff --git a/chinese/zhcon/files/patch-aa b/chinese/zhcon/files/patch-aa index 8bef2bd5570f..e69de29bb2d1 100644 --- a/chinese/zhcon/files/patch-aa +++ b/chinese/zhcon/files/patch-aa @@ -1,11 +0,0 @@ ---- configure.orig Sat Sep 8 19:16:35 2001 -+++ configure Sat Sep 8 19:16:51 2001 -@@ -707,7 +707,7 @@ - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. -- for ac_prog in ginstall scoinst install; do -+ for ac_prog in install scoinst ginstall; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then diff --git a/chinese/zhcon/files/patch-ab b/chinese/zhcon/files/patch-ab index 58d1e54162de..e69de29bb2d1 100644 --- a/chinese/zhcon/files/patch-ab +++ b/chinese/zhcon/files/patch-ab @@ -1,28 +0,0 @@ ---- zhcon/bsdfactory.cpp.orig Sun Sep 9 13:19:32 2001 -+++ zhcon/bsdfactory.cpp Sun Sep 9 13:54:13 2001 -@@ -102,11 +102,24 @@ - } - - printf ("len %d\n", buflen); -+#if (__FreeBSD__ <= 3) - if ((vga = open("/dev/vga", O_RDWR | O_NDELAY)) < 0) { -+#else -+ if ((vga = open("/dev/mem", O_RDWR | O_NDELAY)) < 0) { -+#endif - throw(runtime_error("Can not open vga device.\n")); - } - -- buf = static_cast<char *>(mmap(0, buflen, PROT_READ | PROT_WRITE, MAP_SHARED, vga, 0)); -+ if ((buf = static_cast<char *>(valloc(buflen))) == NULL) { -+ throw(runtime_error("Can not open vga device.\n")); -+ } -+ -+#if (__FreeBSD__ <= 3) -+#define GRAPH_BASE 0x0 -+#else -+#define GRAPH_BASE 0xA0000 -+#endif -+ buf = static_cast<char *>(mmap(buf, buflen, PROT_READ | PROT_WRITE, MAP_FILE|MAP_SHARED|MAP_FIXED, vga, GRAPH_BASE)); - close(vga); - - if (buf == MAP_FAILED) diff --git a/chinese/zhcon/files/patch-src::Makefile.am b/chinese/zhcon/files/patch-src::Makefile.am new file mode 100644 index 000000000000..769b7ae97887 --- /dev/null +++ b/chinese/zhcon/files/patch-src::Makefile.am @@ -0,0 +1,15 @@ +--- src/Makefile.am.orig Tue Dec 18 20:39:48 2001 ++++ src/Makefile.am Sun Feb 24 14:25:34 2002 +@@ -9,10 +9,10 @@ + + install-data-local: + $(mkinstalldirs) $(libdir)/zhcon/ +- $(INSTALL_DATA) $(srcdir)/zhcon.conf /etc/zhcon.conf ++ $(INSTALL_DATA) $(srcdir)/zhcon.conf $(PREFIX)/etc/zhcon.conf.sample + + uninstall-local: +- -rm -f /etc/zhcon.conf ++ -rm -f $(PREFIX)/etc/zhcon.conf.sample + + bin_PROGRAMS = zhcon + AM_INSTALL_PROGRAM_FLAGS= -m 4775 diff --git a/chinese/zhcon/files/patch-src::Makefile.in b/chinese/zhcon/files/patch-src::Makefile.in new file mode 100644 index 000000000000..91ba399f080a --- /dev/null +++ b/chinese/zhcon/files/patch-src::Makefile.in @@ -0,0 +1,15 @@ +--- src/Makefile.in.orig Sun Feb 17 02:15:15 2002 ++++ src/Makefile.in Sun Feb 24 14:25:35 2002 +@@ -441,10 +441,10 @@ + + install-data-local: + $(mkinstalldirs) $(libdir)/zhcon/ +- $(INSTALL_DATA) $(srcdir)/zhcon.conf /etc/zhcon.conf ++ $(INSTALL_DATA) $(srcdir)/zhcon.conf $(PREFIX)/etc/zhcon.conf.sample + + uninstall-local: +- -rm -f /etc/zhcon.conf ++ -rm -f $(PREFIX)/etc/zhcon.conf.sample + + # 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. diff --git a/chinese/zhcon/files/patch-src::display::fbdev.cpp b/chinese/zhcon/files/patch-src::display::fbdev.cpp new file mode 100644 index 000000000000..af259e4a71ab --- /dev/null +++ b/chinese/zhcon/files/patch-src::display::fbdev.cpp @@ -0,0 +1,29 @@ +--- src/display/fbdev.cpp.orig Fri Feb 15 20:15:58 2002 ++++ src/display/fbdev.cpp Sun Feb 24 14:25:35 2002 +@@ -202,7 +202,11 @@ + } + + // printf ("len %d\n", mpBufLen); ++#if (__FreeBSD__ <= 3) + if ((mFd = open("/dev/vga", O_RDWR | O_NDELAY)) < 0) { ++#else ++ if ((mFd = open("/dev/mem", O_RDWR | O_NDELAY)) < 0) { ++#endif + throw(runtime_error("Can not open vga device.\n")); + } + +@@ -229,8 +233,13 @@ + throw(runtime_error("color depth unsupported in this version\n" + "use 8bpp instead!")); + } ++#if (__FreeBSD__ <= 3) ++#define GRAPH_BASE 0x0 ++#else ++#define GRAPH_BASE 0xA0000 ++#endif + mpBuf = static_cast<char *>(mmap(0, mpBufLen, PROT_READ | PROT_WRITE, +- MAP_SHARED, mFd, 0)); ++ MAP_FILE|MAP_SHARED|MAP_FIXED, mFd, GRAPH_BASE)); + + if (mpBuf == MAP_FAILED) + throw(runtime_error("mmap() failed!")); diff --git a/chinese/zhcon/files/patch-src::nativeinputserver.cpp b/chinese/zhcon/files/patch-src::nativeinputserver.cpp new file mode 100644 index 000000000000..eb9f29db02b6 --- /dev/null +++ b/chinese/zhcon/files/patch-src::nativeinputserver.cpp @@ -0,0 +1,45 @@ +--- src/nativeinputserver.cpp.orig Sun Feb 10 01:18:58 2002 ++++ src/nativeinputserver.cpp Sun Feb 24 14:25:35 2002 +@@ -151,10 +151,31 @@ + } + else { + mInput.erase(mInput.end() - 1); +- Beep(); ++ //Beep(); ++ switch(c) ++ { ++ case '0': ++ case '1': ++ case '2': ++ case '3': ++ case '4': ++ case '5': ++ case '6': ++ case '7': ++ case '8': ++ case '9': ++ case '+': ++ case '=': ++ case '-': ++ case '_': ++ goto Select; ++ default: ++ Beep(); ++ } + } + } + } else { ++Select: + if (mList.mCount > 0) { + switch (c) { + case 033: +@@ -210,6 +231,9 @@ + if (c < mShownWords) { + s = Select(c); + rBuf = s; ++ mpIme->Reset(); ++ mInput = ""; ++ mList.Reset(); + } else + Beep(); + break; diff --git a/chinese/zhcon/files/patch-src::zhcon.cpp b/chinese/zhcon/files/patch-src::zhcon.cpp new file mode 100644 index 000000000000..acb3320dc494 --- /dev/null +++ b/chinese/zhcon/files/patch-src::zhcon.cpp @@ -0,0 +1,48 @@ +--- src/zhcon.cpp.orig Sun Feb 17 02:12:17 2002 ++++ src/zhcon.cpp Sun Feb 24 14:31:41 2002 +@@ -113,7 +113,7 @@ + string cfgfile = getenv("HOME"); + cfgfile += "/.zhconrc"; + if (access(cfgfile.c_str(), R_OK) != 0) +- cfgfile = "/etc/zhcon.conf"; ++ cfgfile = PREFIX"/etc/zhcon.conf"; + + // char c;cin>>c; + ConfigFile f(cfgfile.c_str()); +@@ -129,6 +129,7 @@ + InstallVtHandle(); + InstallSignal(); + ForkPty(); ++ SetEncode(mDefaultEncode, mDefaultEncode); + InitInputManager(f); + if (f.GetOption("startupmsg",true)) + StartupMsg(); +@@ -489,23 +490,23 @@ + string s; + s = f.GetOption(string("defaultencode"), string("gb2312")); + if (s == "gb2312") { +- SetEncode(GB2312,GB2312); ++ //SetEncode(GB2312,GB2312); + setenv("LC_ALL", "zh_CN.GB2312", 1); + mDefaultEncode = GB2312; + } else if (s == "gbk") { +- SetEncode(GBK,GBK); ++ //SetEncode(GBK,GBK); + setenv("LC_ALL", "zh_CN.GBK", 1); + mDefaultEncode = GBK; + } else if (s == "big5") { +- SetEncode(BIG5,BIG5); ++ //SetEncode(BIG5,BIG5); + setenv("LC_ALL", "zh_TW.Big5", 1); + mDefaultEncode = BIG5; + } else if (s == "jis") { +- SetEncode(JIS,JIS); ++ //SetEncode(JIS,JIS); + setenv("LC_ALL", "ja.JIS", 1); + mDefaultEncode = JIS; + } else if (s == "kscm") { +- SetEncode(KSCM,KSCM); ++ //SetEncode(KSCM,KSCM); + setenv("LC_ALL", "ko", 1); + mDefaultEncode = GBK; + } else { |