aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2012-03-11 01:37:56 +0800
committercy <cy@FreeBSD.org>2012-03-11 01:37:56 +0800
commit9526452f4d6e6688c34e71db34ef2c7beed1e92c (patch)
treec6faf3b7bf7531b7284fea174daf661c57762785 /devel
parent71041df595d81ec5030e47e11b7b2c626c6081c6 (diff)
downloadfreebsd-ports-graphics-9526452f4d6e6688c34e71db34ef2c7beed1e92c.tar.gz
freebsd-ports-graphics-9526452f4d6e6688c34e71db34ef2c7beed1e92c.tar.zst
freebsd-ports-graphics-9526452f4d6e6688c34e71db34ef2c7beed1e92c.zip
Fix backspace bug (Debian Bug#130199).
Assume maintainership. Obtained from: debian.org 004-backspace.dpatch Feature safe: yes
Diffstat (limited to 'devel')
-rw-r--r--devel/xxgdb/Makefile4
-rw-r--r--devel/xxgdb/files/patch-dialog.c79
2 files changed, 81 insertions, 2 deletions
diff --git a/devel/xxgdb/Makefile b/devel/xxgdb/Makefile
index b9233ad43f7..7affdb25f8a 100644
--- a/devel/xxgdb/Makefile
+++ b/devel/xxgdb/Makefile
@@ -7,12 +7,12 @@
PORTNAME= xxgdb
PORTVERSION= 1.12
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_XCONTRIB}
MASTER_SITE_SUBDIR= utilities
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= cy@FreeBSD.org
COMMENT= An X window interface for gdb
USE_IMAKE= yes
diff --git a/devel/xxgdb/files/patch-dialog.c b/devel/xxgdb/files/patch-dialog.c
new file mode 100644
index 00000000000..e2999e17d66
--- /dev/null
+++ b/devel/xxgdb/files/patch-dialog.c
@@ -0,0 +1,79 @@
+diff -urNad dialog.c dialog.c
+--- dialog.c 1995-06-20 00:15:13.000000000 +0200
++++ dialog.c 2008-05-16 17:31:45.000000000 +0200
+@@ -130,8 +130,8 @@
+ Cardinal i;
+
+ textblock.firstPos = 0;
+- textblock.length = 0;
+- textblock.ptr = "";
++ textblock.length = 1;
++ textblock.ptr = " ";
+
+ pos = XawTextGetInsertionPoint(w);
+ if (pos <= StartPos)
+@@ -142,6 +142,30 @@
+ XawTextSetInsertionPoint(w, i);
+ }
+
++/* Erases the preceding word.
++ * Simulates the action of the WERASE character (ctrl-W).
++ */
++/* ARGSUSED */
++void DeleteChar(w, event, params, num_params)
++ Widget w;
++ XEvent *event;
++ String *params;
++ Cardinal *num_params;
++{
++ XawTextBlock textblock;
++ XawTextPosition pos;
++
++ textblock.firstPos = 0;
++ textblock.length = 1;
++ textblock.ptr = " ";
++
++ pos = XawTextGetInsertionPoint(w);
++ if (pos > StartPos) {
++ XawTextReplace(w, pos-1, pos, &textblock);
++ XawTextSetInsertionPoint(w, pos-1);
++ }
++}
++
+
+ /* Deletes the entire current input line.
+ * simulates the action of the KILL character (ctrl-U).
+@@ -159,8 +183,8 @@
+ char *s;
+
+ textblock.firstPos = 0;
+- textblock.length = 0;
+- textblock.ptr = "";
++ textblock.length = 1;
++ textblock.ptr = " ";
+
+ pos = XawTextGetInsertionPoint(w);
+ if (w == dialogWindow) {
+@@ -307,6 +331,7 @@
+ {"SigQuit", (XtActionProc) SigQuit},
+ {"InsertSpace", (XtActionProc) InsertSpace},
+ {"Dispatch", (XtActionProc) Dispatch},
++ {"DeleteChar", (XtActionProc) DeleteChar},
+ {NULL, NULL}
+ };
+
+@@ -316,10 +341,10 @@
+ Ctrl<Key>|: SigQuit()\n\
+ Ctrl<Key>W: DeleteWord()\n\
+ Ctrl<Key>U: DeleteLine()\n\
+- Ctrl<Key>H: InsertSpace() delete-previous-character()\n\
+- <Key>Delete: InsertSpace() delete-previous-character()\n\
+- <Key>BackSpace: InsertSpace() delete-previous-character()\n\
+- <Key>Return: newline() Dispatch()\n\
++ Ctrl<Key>H: DeleteChar()\n\
++ <Key>Delete: DeleteChar()\n\
++ <Key>BackSpace: DeleteChar()\n\
++ <Key>Return: newline()Dispatch()\n\
+ ";
+
+ n = 0;