aboutsummaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2006-09-01 14:21:39 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2006-09-01 14:21:39 +0000
commita4b373bb16c56c106859f3b604a8aee1bacb7c1a (patch)
treed86c412001610d3a8aecffccc50dff1c9b052058 /shells
parent61e963aa56bb26d62e816c5520f092ae43f8e298 (diff)
downloadports-a4b373bb16c56c106859f3b604a8aee1bacb7c1a.tar.gz
ports-a4b373bb16c56c106859f3b604a8aee1bacb7c1a.zip
This port has served its purpose. Just use the shells/zsh port with
the multibyte option turned on.
Notes
Notes: svn path=/head/; revision=171809
Diffstat (limited to 'shells')
-rw-r--r--shells/Makefile1
-rw-r--r--shells/zsh+euc_hack/files/patch-Src::Zle::compmatch.c57
-rw-r--r--shells/zsh+euc_hack/files/patch-Src::Zle::zle.h11
-rw-r--r--shells/zsh+euc_hack/files/patch-Src::Zle::zle_main.c199
-rw-r--r--shells/zsh+euc_hack/files/patch-Src::Zle::zle_misc.c17
-rw-r--r--shells/zsh+euc_hack/files/patch-Src::Zle::zle_move.c40
-rw-r--r--shells/zsh+euc_hack/files/patch-Src::Zle::zle_refresh.c47
-rw-r--r--shells/zsh+euc_hack/files/patch-Src::Zle::zle_utils.c20
-rw-r--r--shells/zsh+euc_hack/files/patch-config.h.in9
9 files changed, 0 insertions, 401 deletions
diff --git a/shells/Makefile b/shells/Makefile
index 722d155ad446..bc391c45912d 100644
--- a/shells/Makefile
+++ b/shells/Makefile
@@ -35,6 +35,5 @@
SUBDIR += wapsh
SUBDIR += zoidberg
SUBDIR += zsh
- SUBDIR += zsh+euc_hack
.include <bsd.port.subdir.mk>
diff --git a/shells/zsh+euc_hack/files/patch-Src::Zle::compmatch.c b/shells/zsh+euc_hack/files/patch-Src::Zle::compmatch.c
deleted file mode 100644
index 79316162e712..000000000000
--- a/shells/zsh+euc_hack/files/patch-Src::Zle::compmatch.c
+++ /dev/null
@@ -1,57 +0,0 @@
---- Src/Zle/compmatch.c.orig Tue Feb 10 11:30:14 2004
-+++ Src/Zle/compmatch.c Thu Mar 25 19:51:03 2004
-@@ -1313,6 +1313,9 @@
- while (la && lb) {
- if (*sa != *sb) {
- /* Different characters, try the matchers. */
-+#ifdef ZSH_EUC
-+ono:
-+#endif
- for (t = 0, ms = bmatchers; ms && !t; ms = ms->next) {
- mp = ms->matcher;
- if (mp && !mp->flags && mp->wlen > 0 && mp->llen > 0 &&
-@@ -1358,6 +1361,13 @@
- }
- if (!t)
- break;
-+#ifdef ZSH_EUC
-+ } else if (locale_is_euc &&
-+ (_mbmap_euc[*(unsigned char*)sa] & _MB1) &&
-+ (_mbmap_euc[*((unsigned char*)sa+1)] & _MB2) &&
-+ *(sa+1) != *(sb+1)) {
-+ goto ono;
-+#endif
- } else {
- /* Same character, just take it. */
- if (rr <= 1) {
-@@ -1589,6 +1599,30 @@
- * characters, at this stage we still need the overall length
- * including Meta's as separate characters.
- */
-+#ifdef ZSH_EUC
-+ if (locale_is_euc) {
-+ if (sfx)
-+ for (l = 0, p = str, q = md->str;
-+ l < len && l < md->len && p[ind] == q[ind];
-+ l++, p += add, q += add);
-+ else
-+ for (l = 0, p = str, q = md->str;;) {
-+ if (!(l < len && l < md->len))
-+ break;
-+
-+ if ((_mbmap_euc[*(unsigned char*)p] & _MB1) && (_mbmap_euc[*((unsigned char*)p+1)] & _MB2)) {
-+ if (*p == *q && *(p+1) == *(q+1)) {
-+ l+=2, p+=2, q+=2;
-+ } else
-+ break;
-+ } else {
-+ if (*p != *q)
-+ break;
-+ l++, p++, q++;
-+ }
-+ }
-+ } else
-+#endif
- for (l = 0, p = str, q = md->str;
- l < len && l < md->len && p[ind] == q[ind];
- l++, p += add, q += add) {}
diff --git a/shells/zsh+euc_hack/files/patch-Src::Zle::zle.h b/shells/zsh+euc_hack/files/patch-Src::Zle::zle.h
deleted file mode 100644
index f0e1e59e93ec..000000000000
--- a/shells/zsh+euc_hack/files/patch-Src::Zle::zle.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- Src/Zle/zle.h.orig Tue May 23 17:20:57 2000
-+++ Src/Zle/zle.h Thu May 9 06:49:30 2002
-@@ -194,3 +194,8 @@
- /* Invalidate the completion list. */
-
- #define invalidatelist() runhookdef(INVALIDATELISTHOOK, NULL)
-+
-+#ifdef ZSH_EUC
-+#define _MB1 0x01
-+#define _MB2 0x02
-+#endif
diff --git a/shells/zsh+euc_hack/files/patch-Src::Zle::zle_main.c b/shells/zsh+euc_hack/files/patch-Src::Zle::zle_main.c
deleted file mode 100644
index 2f4ca58d6109..000000000000
--- a/shells/zsh+euc_hack/files/patch-Src::Zle::zle_main.c
+++ /dev/null
@@ -1,199 +0,0 @@
---- Src/Zle/zle_main.c.orig Fri May 18 00:56:13 2001
-+++ Src/Zle/zle_main.c Thu May 9 07:53:36 2002
-@@ -141,6 +141,163 @@
- static int delayzsetterm;
- #endif
-
-+#ifdef ZSH_EUC
-+/**/
-+mod_export int locale_is_euc;
-+
-+# if defined(__uxps__) || defined(sgi) || defined(aix) || defined(__CYGWIN__) || defined(linux)
-+char STRLANGEUCJP[] = { 'j', 'a', '_', 'J', 'P', '.', 'E', 'U', 'C', '\0' };
-+char STRLANGEUCKR[] = { 'k', 'o', '_', 'K', 'R', '.', 'E', 'U', 'C', '\0' };
-+# if defined(__uxps__)
-+char STRLANGEUCJPB[] = { 'j', 'a', 'p', 'a', 'n', '\0' };
-+char STRLANGEUCKRB[] = { 'k', 'o', 'r', 'e', 'a', '\0' };
-+# elif defined(linux)
-+char STRLANGEUCJPB[] = { 'j', 'a', '_', 'J', 'P', '.', 'u', 'j', 'i', 's',
-+ '\0' };
-+char STRLANGEUCKRB[] = { 'k', 'o', '_', 'K', 'R', '.', 'e', 'u', 'c', '\0' };
-+# elif defined(aix)
-+char STRLANGEUCJPB[] = { 'j', 'a', '_', 'J', 'P', '\0' };
-+char STRLANGEUCKRB[] = { 'k', 'o', '_', 'K', 'R', '\0' };
-+# else
-+char STRLANGEUCJPB[] = { '\0' };
-+char STRLANGEUCKRB[] = { '\0' };
-+# endif
-+char STRLANGSJIS[] = { 'j', 'a', '_', 'J', 'P', '.', 'S', 'J', 'I', 'S',
-+ '\0' };
-+char STRLANGSJISB[] = { '\0' };
-+char STRLANGBIG5[] = { 'z', 'h', '_', 'T', 'W', '.', 'B', 'i', 'g', '5',
-+ '\0' };
-+char STRLANGEUCZH[] = { '\0' };
-+char STRLANGEUCZHB[] = { '\0' };
-+# elif defined(__FreeBSD__)
-+char STRLANGEUCJP[] = { 'j', 'a', '_', 'J', 'P', '.', 'e', 'u', 'c', 'J',
-+ 'P', '\0' };
-+char STRLANGEUCJPB[] = { 'j', 'a', '_', 'J', 'P', '.', 'E', 'U', 'C', '\0' };
-+char STRLANGEUCKR[] = { 'k', 'o', '_', 'K', 'R', '.', 'e', 'u', 'c', 'K',
-+ 'R', '\0' };
-+char STRLANGEUCKRB[] = { 'k', 'o', '_', 'K', 'R', '.', 'E', 'U', 'C', '\0' };
-+char STRLANGEUCZH[] = { 'z', 'h', '_', 'C', 'N', '.', 'e', 'u', 'c', 'C',
-+ 'N', '\0' };
-+char STRLANGEUCZHB[] = { 'z', 'h', '_', 'C', 'N', '.', 'E', 'U', 'C', '\0' };
-+char STRLANGSJIS[] = { 'j', 'a', '_', 'J', 'P', '.', 'S', 'J', 'I', 'S',
-+ '\0' };
-+char STRLANGSJISB[] = { 'j', 'a', '_', 'J', 'P', '.', 'S', 'h', 'i', 'f',
-+ 't', '_', 'J', 'I', 'S', '\0' };
-+char STRLANGBIG5[] = { 'z', 'h', '_', 'T', 'W', '.', 'B', 'i', 'g', '5',
-+ '\0' };
-+# elif defined(__uxpm__)
-+char STRLANGEUCJP[] = { 'j', 'a', 'p', 'a', 'n', '\0' };
-+char STRLANGEUCKR[] = { 'k', 'o', 'r', 'e', 'a', '\0' };
-+char STRLANGEUCZH[] = { '\0' };
-+char STRLANGEUCJPB[] = { '\0' };
-+char STRLANGEUCKRB[] = { '\0' };
-+char STRLANGEUCZHB[] = { '\0' };
-+char STRLANGSJIS[] = { '\0' };
-+char STRLANGSJISB[] = { '\0' };
-+char STRLANGBIG5[] = { '\0' };
-+# elif defined(SOLARIS2)
-+char STRLANGEUCJP[] = { 'j', 'a', '\0' };
-+char STRLANGEUCKR[] = { 'k', 'o', '\0' };
-+char STRLANGEUCZH[] = { '\0' };
-+char STRLANGEUCJPB[] = { 'j', 'a', 'p', 'a', 'n', 'e', 's', 'e', '\0' };
-+char STRLANGEUCKRB[] = { 'k', 'o', 'r', 'e', 'a', 'n', '\0' };
-+char STRLANGEUCZHB[] = { '\0' };
-+char STRLANGSJIS[] = { '\0' };
-+char STRLANGSJISB[] = { '\0' };
-+char STRLANGBIG5[] = { '\0' };
-+# elif defined(hpux)
-+char STRLANGEUCJP[] = { 'j', 'a', '_', 'J', 'P', '.', 'e', 'u', 'c', 'J', 'P' };
-+char STRLANGEUCKR[] = { 'k', 'o', '_', 'K', 'R', '.', 'e', 'u', 'c', 'K', 'R' };
-+char STRLANGEUCZH[] = { '\0' };
-+char STRLANGEUCJPB[] = { '\0' };
-+char STRLANGEUCKRB[] = { '\0' };
-+char STRLANGEUCZHB[] = { '\0' };
-+char STRLANGSJIS[] = { '\0' };
-+char STRLANGSJISB[] = { '\0' };
-+char STRLANGBIG5[] = { '\0' };
-+# else
-+char STRLANGEUCJP[] = { '\0' };
-+char STRLANGEUCKR[] = { '\0' };
-+char STRLANGEUCZH[] = { '\0' };
-+char STRLANGEUCJPB[] = { '\0' };
-+char STRLANGEUCKRB[] = { '\0' };
-+char STRLANGEUCZHB[] = { '\0' };
-+char STRLANGSJIS[] = { '\0' };
-+char STRLANGSJISB[] = { '\0' };
-+char STRLANGBIG5[] = { '\0' };
-+# endif
-+
-+/**/
-+mod_export unsigned char _mbmap_euc[256] = {
-+/* first byte 0x8e,0xa0 - 0xf4 */
-+/* second byte 0xa0 - 0xfe */
-+/* 0 - 7f all 0 */
-+ 0,0,0,0,0,0,0,0,0,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MB1|_MB2, _MB1|_MB2,
-+/* c8 c9 ca cb */
-+ _MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
-+/* cc cd ce cf */
-+ _MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
-+/* d0 d1 d2 d3 */
-+ _MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
-+/* d4 d5 d6 d7 */
-+ _MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
-+/* d8 d9 da db */
-+ _MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
-+/* dc dd de df */
-+ _MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
-+/* e0 e1 e2 e3 */
-+ _MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
-+/* e4 e5 e6 e7 */
-+ _MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
-+/* e8 e9 ea eb */
-+ _MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
-+/* ec ed ee ef */
-+ _MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
-+/* f0 f1 f2 f3 */
-+ _MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
-+/* f4 f5 f6 f7 */
-+ _MB1|_MB2, _MB2, _MB2, _MB2,
-+/* f8 f9 fa fb */
-+ _MB2, _MB2, _MB2, _MB2,
-+/* fc fd fe ff */
-+ _MB2, _MB2, _MB2, 0,
-+};
-+
-+#endif
-+
- /* set up terminal */
-
- /**/
-@@ -1117,6 +1274,32 @@
- int
- setup_(Module m)
- {
-+#ifdef ZSH_EUC
-+ char *euc_locales[] = {
-+ STRLANGEUCJP,
-+ STRLANGEUCKR,
-+ STRLANGEUCZH,
-+ STRLANGEUCJPB,
-+ STRLANGEUCKRB,
-+ STRLANGEUCZHB,
-+ NULL
-+ };
-+ char **p;
-+ char *tcp;
-+
-+ locale_is_euc = 0;
-+
-+ if ((tcp = setlocale("LC_CTYPE", NULL)) != NULL ||
-+ (tcp = getenv("LANG")) != NULL) {
-+ for (p = euc_locales; *p != NULL; p++) {
-+ if (strcmp(tcp, *p) == 0) {
-+ locale_is_euc = 1;
-+ break;
-+ }
-+ }
-+ }
-+#endif
-+
- /* Set up editor entry points */
- trashzleptr = trashzle;
- refreshptr = zrefresh;
diff --git a/shells/zsh+euc_hack/files/patch-Src::Zle::zle_misc.c b/shells/zsh+euc_hack/files/patch-Src::Zle::zle_misc.c
deleted file mode 100644
index 44a265e6afb5..000000000000
--- a/shells/zsh+euc_hack/files/patch-Src::Zle::zle_misc.c
+++ /dev/null
@@ -1,17 +0,0 @@
---- Src/Zle/zle_misc.c.orig Mon Feb 13 19:58:39 2006
-+++ Src/Zle/zle_misc.c Thu Jul 13 17:52:43 2006
-@@ -111,6 +111,14 @@
- return ret;
- }
- if (zlecs + zmult <= zlell) {
-+#ifdef ZSH_EUC
-+ if (locale_is_euc) {
-+ if (zmult == 1 &&
-+ _mbmap_euc[line[cs]] & _MB1 &&
-+ _mbmap_euc[line[cs+1]] & _MB2)
-+ cs += 1;
-+ }
-+#endif
- zlecs += zmult;
- backdel(zmult);
- return 0;
diff --git a/shells/zsh+euc_hack/files/patch-Src::Zle::zle_move.c b/shells/zsh+euc_hack/files/patch-Src::Zle::zle_move.c
deleted file mode 100644
index 83c7e2064390..000000000000
--- a/shells/zsh+euc_hack/files/patch-Src::Zle::zle_move.c
+++ /dev/null
@@ -1,40 +0,0 @@
---- Src/Zle/zle_move.c.orig Tue Nov 1 19:20:25 2005
-+++ Src/Zle/zle_move.c Thu Jul 13 17:57:11 2006
-@@ -159,7 +159,18 @@
- int
- forwardchar(UNUSED(char **args))
- {
-- zlecs += zmult;
-+#ifdef ZSH_EUC
-+ if (locale_is_euc) {
-+ if (zmult == 1) {
-+ if (_mbmap_euc[line[zlecs]] & _MB1 &&
-+ zlecs+1 <= zlell &&
-+ _mbmap_euc[line[zlecs+1]] & _MB2) {
-+ zlecs++;
-+ }
-+ }
-+ }
-+#endif
-+ zlecs += zmult;
- if (zlecs > zlell)
- zlecs = zlell;
- if (zlecs < 0)
-@@ -171,6 +182,17 @@
- int
- backwardchar(UNUSED(char **args))
- {
-+#ifdef ZSH_EUC
-+ if (locale_is_euc) {
-+ if (zmult == 1) {
-+ if (_mbmap_euc[line[zlecs-1]] & _MB2 &&
-+ zlecs-2 >=0 &&
-+ _mbmap_euc[line[zlecs-2]] & _MB1) {
-+ zlecs--;
-+ }
-+ }
-+ }
-+#endif
- zlecs -= zmult;
- if (zlecs > zlell)
- zlecs = zlell;
diff --git a/shells/zsh+euc_hack/files/patch-Src::Zle::zle_refresh.c b/shells/zsh+euc_hack/files/patch-Src::Zle::zle_refresh.c
deleted file mode 100644
index 47d7aa6fa867..000000000000
--- a/shells/zsh+euc_hack/files/patch-Src::Zle::zle_refresh.c
+++ /dev/null
@@ -1,47 +0,0 @@
---- Src/Zle/zle_refresh.c.orig Mon Sep 10 19:48:51 2001
-+++ Src/Zle/zle_refresh.c Thu May 9 08:36:47 2002
-@@ -647,7 +647,11 @@
- static void
- refreshline(int ln)
- {
-+#ifdef ZSH_EUC
-+ unsigned char *nl, *ol, *p1; /* line buffer pointers */
-+#else
- char *nl, *ol, *p1; /* line buffer pointers */
-+#endif
- int ccs = 0, /* temporary count for cursor position */
- char_ins = 0, /* number of characters inserted/deleted */
- col_cleareol, /* clear to end-of-line from this column */
-@@ -753,7 +757,32 @@
- for (;;) {
- if (*nl && *ol && nl[1] == ol[1]) /* skip only if second chars match */
- /* skip past all matching characters */
-+#ifdef ZSH_EUC
-+ {
-+ if (locale_is_euc) {
-+ for (; *nl && (*nl == *ol); nl++, ol++, ccs++) {
-+ if (_mbmap_euc[*nl] & _MB1) {
-+ if (*(ol+1) == '\0')
-+ continue;
-+ if (_mbmap_euc[*(nl+1)] & _MB2) {
-+ if (*(nl+1) != *(ol+1))
-+ break;
-+ else {
-+ nl++;
-+ ol++;
-+ ccs++;
-+ }
-+ } else if (*(nl+1) == '\0') {
-+ continue;
-+ }
-+ }
-+ }
-+ } else
-+#endif
- for (; *nl && (*nl == *ol); nl++, ol++, ccs++) ;
-+#ifdef ZSH_EUC
-+ }
-+#endif
-
- if (!*nl) {
- if (ccs == winw && hasam && char_ins > 0 && ins_last
diff --git a/shells/zsh+euc_hack/files/patch-Src::Zle::zle_utils.c b/shells/zsh+euc_hack/files/patch-Src::Zle::zle_utils.c
deleted file mode 100644
index 6c61530ec524..000000000000
--- a/shells/zsh+euc_hack/files/patch-Src::Zle::zle_utils.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- Src/Zle/zle_utils.c.orig Mon Mar 26 17:58:34 2001
-+++ Src/Zle/zle_utils.c Thu May 9 17:57:20 2002
-@@ -197,6 +197,17 @@
- mod_export void
- backdel(int ct)
- {
-+#ifdef ZSH_EUC
-+ if (locale_is_euc) {
-+ if (ct == 1) {
-+ if (_mbmap_euc[line[cs-1]] & _MB2 &&
-+ cs-2 >=0 &&
-+ _mbmap_euc[line[cs-2]] & _MB1) {
-+ ct = 2;
-+ }
-+ }
-+ }
-+#endif
- shiftchars(cs -= ct, ct);
- }
-
diff --git a/shells/zsh+euc_hack/files/patch-config.h.in b/shells/zsh+euc_hack/files/patch-config.h.in
deleted file mode 100644
index 50ebd1b2fe8a..000000000000
--- a/shells/zsh+euc_hack/files/patch-config.h.in
+++ /dev/null
@@ -1,9 +0,0 @@
---- config.h.in.orig Tue Oct 16 21:46:09 2001
-+++ config.h.in Thu May 9 06:49:30 2002
-@@ -756,3 +756,6 @@
-
- /* Define if you have the socket library (-lsocket). */
- #undef HAVE_LIBSOCKET
-+
-+/* zsh euc completion */
-+#define ZSH_EUC 1