aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-07-17 22:13:20 -0400
committerJustin M. Keyes <justinkz@gmail.com>2015-07-17 22:13:20 -0400
commit14ae3c0cbd4052b562814fbe7732b1f26bc4bb13 (patch)
tree67d7261d11e203d4ba1cbb437f3f76d2acbe1503 /src/nvim/message.c
parent4d79edccdc0243a02a20ef46184b8f87f2bda290 (diff)
parent3b06ce200b56c575a58cadc89bf237d8fa89fd4e (diff)
downloadrneovim-14ae3c0cbd4052b562814fbe7732b1f26bc4bb13.tar.gz
rneovim-14ae3c0cbd4052b562814fbe7732b1f26bc4bb13.tar.bz2
rneovim-14ae3c0cbd4052b562814fbe7732b1f26bc4bb13.zip
Merge #2609 'Macro cleanup'
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 5b4c90cc8f..8263ff4896 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -2234,15 +2234,11 @@ void mch_errmsg(char *str)
{
int len;
-#if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
+#ifdef UNIX
/* On Unix use stderr if it's a tty.
* When not going to start the GUI also use stderr.
* On Mac, when started from Finder, stderr is the console. */
- if (
-# ifdef UNIX
- isatty(2)
-# endif
- ) {
+ if (os_isatty(2)) {
fprintf(stderr, "%s", str);
return;
}
@@ -2284,16 +2280,12 @@ void mch_errmsg(char *str)
*/
void mch_msg(char *str)
{
-#if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI)
+#ifdef UNIX
/* On Unix use stdout if we have a tty. This allows "vim -h | more" and
* uses mch_errmsg() when started from the desktop.
* When not going to start the GUI also use stdout.
* On Mac, when started from Finder, stderr is the console. */
- if (
-# ifdef UNIX
- isatty(2)
-# endif
- ) {
+ if (os_isatty(2)) {
printf("%s", str);
return;
}