blob: ec773d0c07c1b29e5b56daee4e728257043bc417 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
--- kdecore/kpty.cpp
+++ kdecore/kpty.cpp
@@ -127,10 +127,15 @@
#include <kdebug.h>
#include <kstandarddirs.h> // locate
-// not defined on HP-UX for example
-#ifndef CTRL
-# define CTRL(x) ((x) & 037)
-#endif
+#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);
|