summaryrefslogtreecommitdiff
path: root/library/Console-linux.cpp
diff options
context:
space:
mode:
authorPetr Mrázek2011-08-18 22:09:30 +0200
committerPetr Mrázek2011-08-18 22:09:30 +0200
commitd2d4ce898d769b15530851795d13da77103c624b (patch)
tree25636169c17903988a46e6ef0ad24bc9ff675fce /library/Console-linux.cpp
parente901194daa9b7974a568c0566133816b6c30c5ef (diff)
downloaddfhack-d2d4ce898d769b15530851795d13da77103c624b.tar.gz
dfhack-d2d4ce898d769b15530851795d13da77103c624b.tar.bz2
dfhack-d2d4ce898d769b15530851795d13da77103c624b.tar.xz
Added weather plugin info to readme, option to make the console not catch 'CTRL+C' on linux.
Diffstat (limited to 'library/Console-linux.cpp')
-rw-r--r--library/Console-linux.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/library/Console-linux.cpp b/library/Console-linux.cpp
index d599402a..ab3a147a 100644
--- a/library/Console-linux.cpp
+++ b/library/Console-linux.cpp
@@ -335,7 +335,11 @@ namespace DFHack
raw.c_cflag |= (CS8);
// local modes - choing off, canonical off, no extended functions,
// no signal chars (^Z,^C)
- raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
+#ifdef CONSOLE_NO_CATCH
+ raw.c_lflag &= ~( ECHO | ICANON | IEXTEN );
+#else
+ raw.c_lflag &= ~( ECHO | ICANON | IEXTEN | ISIG );
+#endif
// control chars - set return condition: min number of bytes and timer.
// We want read to return every single byte, without timeout.
raw.c_cc[VMIN] = 1; raw.c_cc[VTIME] = 0;// 1 byte, no timer