comparison src/main.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 116b7394b8af
children 963cdeb42c41
comparison
equal deleted inserted replaced
12715:279ec0abb4ac 12716:351cf7c67bbe
297 # endif 297 # endif
298 ) 298 )
299 params.want_full_screen = FALSE; 299 params.want_full_screen = FALSE;
300 #endif 300 #endif
301 301
302 #if defined(FEAT_GUI_MAC) && defined(MACOS_X_UNIX) 302 #if defined(FEAT_GUI_MAC) && defined(MACOS_X_DARWIN)
303 /* When the GUI is started from Finder, need to display messages in a 303 /* When the GUI is started from Finder, need to display messages in a
304 * message box. isatty(2) returns TRUE anyway, thus we need to check the 304 * message box. isatty(2) returns TRUE anyway, thus we need to check the
305 * name to know we're not started from a terminal. */ 305 * name to know we're not started from a terminal. */
306 if (gui.starting && (!isatty(2) || strcmp("/dev/console", ttyname(2)) == 0)) 306 if (gui.starting && (!isatty(2) || strcmp("/dev/console", ttyname(2)) == 0))
307 { 307 {
925 925
926 #ifdef __QNXNTO__ 926 #ifdef __QNXNTO__
927 qnx_init(); /* PhAttach() for clipboard, (and gui) */ 927 qnx_init(); /* PhAttach() for clipboard, (and gui) */
928 #endif 928 #endif
929 929
930 #ifdef MAC_OS_CLASSIC
931 /* Prepare for possibly starting GUI sometime */
932 /* Macintosh needs this before any memory is allocated. */
933 gui_prepare(&paramp->argc, paramp->argv);
934 TIME_MSG("GUI prepared");
935 #endif
936
937 /* Init the table of Normal mode commands. */ 930 /* Init the table of Normal mode commands. */
938 init_normal_cmds(); 931 init_normal_cmds();
939 932
940 #if defined(HAVE_DATE_TIME) && defined(VMS) && defined(VAXC) 933 #if defined(HAVE_DATE_TIME) && defined(VMS) && defined(VAXC)
941 make_version(); /* Construct the long version string. */ 934 make_version(); /* Construct the long version string. */
982 early_arg_scan(paramp); 975 early_arg_scan(paramp);
983 976
984 #ifdef FEAT_SUN_WORKSHOP 977 #ifdef FEAT_SUN_WORKSHOP
985 findYourself(paramp->argv[0]); 978 findYourself(paramp->argv[0]);
986 #endif 979 #endif
987 #if defined(FEAT_GUI) && !defined(MAC_OS_CLASSIC) 980 #if defined(FEAT_GUI)
988 /* Prepare for possibly starting GUI sometime */ 981 /* Prepare for possibly starting GUI sometime */
989 gui_prepare(&paramp->argc, paramp->argv); 982 gui_prepare(&paramp->argc, paramp->argv);
990 TIME_MSG("GUI prepared"); 983 TIME_MSG("GUI prepared");
991 #endif 984 #endif
992 985
1722 { 1715 {
1723 char_u *initstr; 1716 char_u *initstr;
1724 1717
1725 initstr = gettail((char_u *)parmp->argv[0]); 1718 initstr = gettail((char_u *)parmp->argv[0]);
1726 1719
1727 #ifdef MACOS_X_UNIX 1720 #ifdef FEAT_GUI_MAC
1728 /* An issue has been seen when launching Vim in such a way that 1721 /* An issue has been seen when launching Vim in such a way that
1729 * $PWD/$ARGV[0] or $ARGV[0] is not the absolute path to the 1722 * $PWD/$ARGV[0] or $ARGV[0] is not the absolute path to the
1730 * executable or a symbolic link of it. Until this issue is resolved 1723 * executable or a symbolic link of it. Until this issue is resolved
1731 * we prohibit the GUI from being used. 1724 * we prohibit the GUI from being used.
1732 */ 1725 */
2617 msg_didany = i; 2610 msg_didany = i;
2618 TIME_MSG("reading stdin"); 2611 TIME_MSG("reading stdin");
2619 #if defined(HAS_SWAP_EXISTS_ACTION) 2612 #if defined(HAS_SWAP_EXISTS_ACTION)
2620 check_swap_exists_action(); 2613 check_swap_exists_action();
2621 #endif 2614 #endif
2622 #if !(defined(AMIGA) || defined(MACOS)) 2615 #if !(defined(AMIGA) || defined(MACOS_X))
2623 /* 2616 /*
2624 * Close stdin and dup it from stderr. Required for GPM to work 2617 * Close stdin and dup it from stderr. Required for GPM to work
2625 * properly, and for running external commands. 2618 * properly, and for running external commands.
2626 * Is there any other system that cannot do this? 2619 * Is there any other system that cannot do this?
2627 */ 2620 */