[kde-freebsd] 8-current/kde3 stty defaults incorrect under konsole

Ed Schouten ed at 80386.nl
Thu Jun 26 13:32:51 CEST 2008


* Ed Schouten <ed at 80386.nl> wrote:
> An even better approach would be to use CKILL/CQUIT/etc. There are
> non-standard either, but it's better than using the CTRL() macro
> directly. I'll come up with a patch soonish. :)

Something like this?

%%%
--- kdecore/kpty.cpp
+++ kdecore/kpty.cpp
@@ -127,9 +127,15 @@
 #include <kdebug.h>
 #include <kstandarddirs.h>	// locate
 
-// not defined on HP-UX for example
-#undef CTRL
-#define CTRL(x) ((x) & 037)
+#ifndef CINTR
+#define CINTR	0x03
+#endif
+#ifndef CQUIT
+#define CQUIT	0x1c
+#endif
+#ifndef CERASE
+#define CERASE	0x7f
+#endif
 
 #define TTY_GROUP "tty"
 
@@ -333,9 +339,9 @@
     ttmode.c_iflag |= IUTF8;
 #endif
 
-  ttmode.c_cc[VINTR] = CTRL('C' - '@');
-  ttmode.c_cc[VQUIT] = CTRL('\\' - '@');
-  ttmode.c_cc[VERASE] = 0177;
+  ttmode.c_cc[VINTR] = CINTR;
+  ttmode.c_cc[VQUIT] = CQUIT;
+  ttmode.c_cc[VERASE] = CERASE;
 
   _tcsetattr(d->slaveFd, &ttmode);
 
%%%

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-freebsd/attachments/20080626/459d1fd6/attachment.pgp 


More information about the kde-freebsd mailing list