summaryrefslogtreecommitdiff
path: root/shells/fd
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2008-07-16 06:21:52 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2008-07-16 06:21:52 +0000
commitc0b1c50e9e8fbee8fcef73effd7026adbd299c15 (patch)
tree2e17b5d80aaf7c4cfe6d0610fa86346ef48ac4c6 /shells/fd
parent- Fix build on 6.x (gcc 3.x) (diff)
Add a patch to fix a paste-o problem under the INPUTKCODE=UTF8-mac
environment.
Notes
Notes: svn path=/head/; revision=216899
Diffstat (limited to 'shells/fd')
-rw-r--r--shells/fd/Makefile1
-rw-r--r--shells/fd/files/patch-ungetkey294
2 files changed, 95 insertions, 0 deletions
diff --git a/shells/fd/Makefile b/shells/fd/Makefile
index 27a223159e0d..df212f4b68c0 100644
--- a/shells/fd/Makefile
+++ b/shells/fd/Makefile
@@ -7,6 +7,7 @@
PORTNAME= fd
PORTVERSION= 2.09i
+PORTREVISION= 1
CATEGORIES= shells
MASTER_SITES= http://hp.vector.co.jp/authors/VA012337/soft/fd/old/ \
ftp://ftp.unixusers.net/src/fdclone/old/
diff --git a/shells/fd/files/patch-ungetkey2 b/shells/fd/files/patch-ungetkey2
new file mode 100644
index 000000000000..2a8309a171dc
--- /dev/null
+++ b/shells/fd/files/patch-ungetkey2
@@ -0,0 +1,94 @@
+--- input.c.orig 2008-04-19 00:00:00.000000000 +0900
++++ input.c 2008-07-16 15:11:17.000000000 +0900
+@@ -256,7 +256,7 @@ int key;
+ else if ((c = getch2()) == EOF) /*EMPTY*/;
+ else if (c != K_ESC) /*EMPTY*/;
+ else if (kbhit2(WAITKEYPAD * 1000L)) {
+- ungetkey2(c);
++ ungetkey2(c, 0);
+ c = EOF;
+ }
+
+@@ -266,7 +266,7 @@ int key;
+ else fprintf2(stderr, "%k\n", INTR_K);
+ }
+ else {
+- ungetkey2(c);
++ ungetkey2(c, 0);
+ c = EOF;
+ }
+ errno = duperrno;
+@@ -372,7 +372,7 @@ int sig;
+ {
+ int n;
+
+- for (n = ungetnum3 - 1; n >= 0; n--) ungetkey2((int)ungetbuf3[n]);
++ for (n = 0; n < ungetnum3; n++) ungetkey2((int)ungetbuf3[n], 0);
+ # ifndef _NOIME
+ if (imemode && !ungetnum3 && getime(sig, &n, 0) >= 0) /*EMPTY*/;
+ else
+--- main.c.orig 2008-04-19 00:00:00.000000000 +0900
++++ main.c 2008-07-16 15:08:58.000000000 +0900
+@@ -681,7 +681,7 @@ int forced;
+ checkscreen(-1, -1);
+ if (isorgpid()) {
+ if (x != n_column || y != n_line) rewritefile(1);
+- if (subwindow) ungetkey2(K_CTRL('L'));
++ if (subwindow) ungetkey2(K_CTRL('L'), 1);
+ }
+ }
+ }
+--- term.c.orig 2008-04-19 00:00:00.000000000 +0900
++++ term.c 2008-07-16 15:08:58.000000000 +0900
+@@ -2905,14 +2905,17 @@ int sig, code;
+ return(ch);
+ }
+
+-int ungetkey2(c)
+-int c;
++int ungetkey2(c, desc)
++int c, desc;
+ {
+ if (c == EOF || ttyio < 0) return(EOF);
+ if (ungetnum >= arraysize(ungetbuf)) return(EOF);
+- memmove((char *)&(ungetbuf[1]), (char *)&(ungetbuf[0]),
+- ungetnum * sizeof(u_char));
+- ungetbuf[0] = (u_char)c;
++ if (!desc) ungetbuf[ungetnum] = (u_char)c;
++ else {
++ memmove((char *)&(ungetbuf[1]),
++ (char *)&(ungetbuf[0]), ungetnum * sizeof(u_char));
++ ungetbuf[0] = (u_char)c;
++ }
+ ungetnum++;
+
+ return(c);
+@@ -3155,14 +3158,15 @@ int sig, code;
+ return(alternate(ch));
+ }
+
+-int ungetkey2(c)
+-int c;
++int ungetkey2(c, desc)
++int c, desc;
+ {
+ # ifdef TIOCSTI
+ u_char ch;
+ # endif
+
+ if (c == EOF || ttyio < 0) return(EOF);
++ if (!desc) return(ungetch2(c));
+ # ifdef TIOCSTI
+ ch = c;
+ Xioctl(ttyio, TIOCSTI, &ch);
+--- term.h.orig 2008-04-19 00:00:00.000000000 +0900
++++ term.h 2008-07-16 15:08:58.000000000 +0900
+@@ -217,7 +217,7 @@ extern int getkey2 __P_((int, int));
+ #else
+ extern int getkey3 __P_((int, int));
+ #endif
+-extern int ungetkey2 __P_((int));
++extern int ungetkey2 __P_((int, int));
+ extern int setscroll __P_((int, int));
+ extern int locate __P_((int, int));
+ extern int tflush __P_((VOID_A));