diff options
-rw-r--r-- | src/main.c | 8 | ||||
-rw-r--r-- | src/os_unix.c | 10 | ||||
-rw-r--r-- | src/os_unix.h | 1 |
3 files changed, 3 insertions, 16 deletions
diff --git a/src/main.c b/src/main.c index 99263b8b77..e5958e74a6 100644 --- a/src/main.c +++ b/src/main.c @@ -46,6 +46,7 @@ #include "ui.h" #include "version.h" #include "window.h" +#include "os/input.h" #include "os/os.h" #include "os/signal.h" @@ -76,7 +77,7 @@ typedef struct { char_u *use_ef; /* 'errorfile' from -q argument */ int want_full_screen; - int stdout_isatty; /* is stdout a terminal? */ + bool stdout_isatty; /* is stdout a terminal? */ char_u *term; /* specified terminal name */ int ask_for_key; /* -x argument */ int no_swap_file; /* "-n" argument used */ @@ -1337,9 +1338,6 @@ static void command_line_scan(mparm_T *parmp) /* "--startuptime <file>" already handled */ break; - /* case 'd': -d {device} is handled in mch_check_win() for the - * Amiga */ - case 'q': /* "-q {errorfile}" QuickFix mode */ parmp->use_ef = (char_u *)argv[0]; break; @@ -1528,7 +1526,7 @@ static void allocate_generic_buffers(void) */ static void check_and_set_isatty(mparm_T *paramp) { - paramp->stdout_isatty = (mch_check_win(paramp->argc, paramp->argv) != FAIL); + paramp->stdout_isatty = os_isatty(STDOUT_FILENO); TIME_MSG("window checked"); } diff --git a/src/os_unix.c b/src/os_unix.c index d95e81bf35..6743b1a993 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -183,16 +183,6 @@ void mch_init() } /* - * Check_win checks whether we have an interactive stdout. - */ -int mch_check_win(int argc, char **argv) -{ - if (isatty(1)) - return OK; - return FAIL; -} - -/* * Return TRUE if the input comes from a terminal, FALSE otherwise. */ int mch_input_isatty() diff --git a/src/os_unix.h b/src/os_unix.h index 8bd1105721..88a895e670 100644 --- a/src/os_unix.h +++ b/src/os_unix.h @@ -7,7 +7,6 @@ void mch_write(char_u *s, int len); void mch_suspend(void); void mch_init(void); -int mch_check_win(int argc, char **argv); int mch_input_isatty(void); int mch_can_restore_title(void); int mch_can_restore_icon(void); |