From: Kalle Wallin Date: Mon, 12 Jul 2004 19:50:36 +0000 (+0000) Subject: Added configure option --disable-raw-mode X-Git-Tag: v0.12_alpha1~466 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a3d7f579b321e8476599fd246f67b56aaba5400b;p=ncmpc.git Added configure option --disable-raw-mode git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1855 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- diff --git a/configure.ac b/configure.ac index e2e0a23..e5f7280 100644 --- a/configure.ac +++ b/configure.ac @@ -101,6 +101,18 @@ else fi +dnl disbale raw mode +AC_MSG_CHECKING([Place the terminal into raw mode]) +AC_ARG_ENABLE([raw-mode], + AC_HELP_STRING([--disable-raw-mode], + [Disable raw terminal mode]), + [use_raw=$enableval], + [use_raw=yes]) +AC_MSG_RESULT([$use_raw]) +if test "x$use_raw" = "xyes" ; then + AC_DEFINE([ENABLE_RAW_MODE], [1], [Place the terminal into raw mode]) +fi + dnl Debugging AC_MSG_CHECKING([whether to build with debug support]) AC_ARG_ENABLE([debug], diff --git a/src/screen.c b/src/screen.c index 7b29f1f..c2c1e7f 100644 --- a/src/screen.c +++ b/src/screen.c @@ -465,7 +465,9 @@ screen_init(mpdclient_t *c) /* tell curses not to do NL->CR/NL on output */ nonl(); /* use raw mode (ignore interrupt,quit,suspend, and flow control ) */ +#ifdef ENABLE_RAW_MODE raw(); +#endif /* don't echo input */ noecho(); /* set cursor invisible */