Macro cleanup: FEAT_GUI and ALWAYS_USE_GUI

This commit is contained in:
Hettomei 2015-05-08 01:16:12 +02:00 committed by Justin M. Keyes
parent 4d79edccdc
commit 1b7dcb2f70

View File

@ -2234,15 +2234,11 @@ void mch_errmsg(char *str)
{ {
int len; int len;
#if (defined(UNIX) || defined(FEAT_GUI)) && !defined(ALWAYS_USE_GUI) #ifdef UNIX
/* On Unix use stderr if it's a tty. /* On Unix use stderr if it's a tty.
* When not going to start the GUI also use stderr. * When not going to start the GUI also use stderr.
* On Mac, when started from Finder, stderr is the console. */ * On Mac, when started from Finder, stderr is the console. */
if ( if (os_isatty(2)) {
# ifdef UNIX
isatty(2)
# endif
) {
fprintf(stderr, "%s", str); fprintf(stderr, "%s", str);
return; return;
} }
@ -2284,16 +2280,12 @@ void mch_errmsg(char *str)
*/ */
void mch_msg(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 /* On Unix use stdout if we have a tty. This allows "vim -h | more" and
* uses mch_errmsg() when started from the desktop. * uses mch_errmsg() when started from the desktop.
* When not going to start the GUI also use stdout. * When not going to start the GUI also use stdout.
* On Mac, when started from Finder, stderr is the console. */ * On Mac, when started from Finder, stderr is the console. */
if ( if (os_isatty(2)) {
# ifdef UNIX
isatty(2)
# endif
) {
printf("%s", str); printf("%s", str);
return; return;
} }