Mercurial > vim
comparison src/message.c @ 12716:351cf7c67bbe v8.0.1236
patch 8.0.1236: Mac features are confusing
commit https://github.com/vim/vim/commit/d057301b1f28736f094affa17b190244ad56e8d9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 28 21:11:06 2017 +0200
patch 8.0.1236: Mac features are confusing
Problem: Mac features are confusing.
Solution: Make feature names more consistent, add "osxdarwin". Rename
feature flags, cleanup Mac code. (Kazunobu Kuriyama, closes #2178)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 28 Oct 2017 21:15:35 +0200 |
parents | e769c912fcd9 |
children | ebb4f6c93598 |
comparison
equal
deleted
inserted
replaced
12715:279ec0abb4ac | 12716:351cf7c67bbe |
---|---|
2658 while ((maxlen < 0 || (int)(s - str) < maxlen) && *s != NUL) | 2658 while ((maxlen < 0 || (int)(s - str) < maxlen) && *s != NUL) |
2659 { | 2659 { |
2660 if (!(silent_mode && p_verbose == 0)) | 2660 if (!(silent_mode && p_verbose == 0)) |
2661 { | 2661 { |
2662 /* NL --> CR NL translation (for Unix, not for "--version") */ | 2662 /* NL --> CR NL translation (for Unix, not for "--version") */ |
2663 /* NL --> CR translation (for Mac) */ | |
2664 p = &buf[0]; | 2663 p = &buf[0]; |
2665 if (*s == '\n' && !info_message) | 2664 if (*s == '\n' && !info_message) |
2666 *p++ = '\r'; | 2665 *p++ = '\r'; |
2667 #if defined(USE_CR) && !defined(MACOS_X_UNIX) | 2666 #if defined(USE_CR) |
2668 else | 2667 else |
2669 #endif | 2668 #endif |
2670 *p++ = *s; | 2669 *p++ = *s; |
2671 *p = '\0'; | 2670 *p = '\0'; |
2672 if (info_message) /* informative message, not an error */ | 2671 if (info_message) /* informative message, not an error */ |
3003 /* On Unix use stderr if it's a tty. | 3002 /* On Unix use stderr if it's a tty. |
3004 * When not going to start the GUI also use stderr. | 3003 * When not going to start the GUI also use stderr. |
3005 * On Mac, when started from Finder, stderr is the console. */ | 3004 * On Mac, when started from Finder, stderr is the console. */ |
3006 if ( | 3005 if ( |
3007 # ifdef UNIX | 3006 # ifdef UNIX |
3008 # ifdef MACOS_X_UNIX | 3007 # ifdef MACOS_X |
3009 (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0) | 3008 (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0) |
3010 # else | 3009 # else |
3011 isatty(2) | 3010 isatty(2) |
3012 # endif | 3011 # endif |
3013 # ifdef FEAT_GUI | 3012 # ifdef FEAT_GUI |
3070 * uses mch_errmsg() when started from the desktop. | 3069 * uses mch_errmsg() when started from the desktop. |
3071 * When not going to start the GUI also use stdout. | 3070 * When not going to start the GUI also use stdout. |
3072 * On Mac, when started from Finder, stderr is the console. */ | 3071 * On Mac, when started from Finder, stderr is the console. */ |
3073 if ( | 3072 if ( |
3074 # ifdef UNIX | 3073 # ifdef UNIX |
3075 # ifdef MACOS_X_UNIX | 3074 # ifdef MACOS_X |
3076 (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0) | 3075 (isatty(2) && strcmp("/dev/console", ttyname(2)) != 0) |
3077 # else | 3076 # else |
3078 isatty(2) | 3077 isatty(2) |
3079 # endif | 3078 # endif |
3080 # ifdef FEAT_GUI | 3079 # ifdef FEAT_GUI |