summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-11 21:58:20 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-11 21:58:20 +0200
commit097148e849136b49052b1b5123c714fb1d74db9b (patch)
treed5b0bf4ce9b435be94de3ff7b87e85ae99c1e484
parent4301a729eabafee388aaf8465cf780d3f84cec95 (diff)
patch 8.2.1422: the Mac GUI implementation is outdatedv8.2.1422
Problem: The Mac GUI implementation is outdated and probably doesn't even work. Solution: Remove the Mac GUI code. The MacVim project provides the supported Vim GUI version.
-rw-r--r--Filelist2
-rw-r--r--src/INSTALLmac.txt24
-rw-r--r--src/Makefile18
-rwxr-xr-xsrc/auto/configure118
-rw-r--r--src/configure.ac82
-rw-r--r--src/evalfunc.c8
-rw-r--r--src/feature.h20
-rw-r--r--src/fileio.c6
-rw-r--r--src/globals.h6
-rw-r--r--src/gui.c6
-rw-r--r--src/gui.h37
-rw-r--r--src/gui_mac.c6706
-rw-r--r--src/if_mzsch.c14
-rw-r--r--src/main.c39
-rw-r--r--src/misc2.c2
-rw-r--r--src/mouse.c4
-rw-r--r--src/option.h3
-rw-r--r--src/optiondefs.h12
-rw-r--r--src/os_mac.h19
-rw-r--r--src/os_mac_conv.c2
-rw-r--r--src/os_unix.c4
-rw-r--r--src/proto.h3
-rw-r--r--src/proto/gui_mac.pro153
-rw-r--r--src/structs.h12
-rw-r--r--src/version.c2
-rw-r--r--src/vim.h10
26 files changed, 48 insertions, 7264 deletions
diff --git a/Filelist b/Filelist
index 02574e9a18..fd8ff05e50 100644
--- a/Filelist
+++ b/Filelist
@@ -642,13 +642,11 @@ SRC_HAIKU = \
SRC_MAC = \
src/INSTALLmac.txt \
src/dehqx.py \
- src/gui_mac.c \
src/os_mac_rsrc/*.icns \
src/os_mac.h \
src/os_mac.rsr.hqx \
src/os_mac_conv.c \
src/os_macosx.m \
- src/proto/gui_mac.pro \
src/proto/os_mac_conv.pro \
# source files for VMS (in the extra archive)
diff --git a/src/INSTALLmac.txt b/src/INSTALLmac.txt
index e957682a14..ac122c351b 100644
--- a/src/INSTALLmac.txt
+++ b/src/INSTALLmac.txt
@@ -16,7 +16,7 @@ Summary
----------------------------------------------------------------------------
1 MacOS X
- 1.1. Carbon interface
+ 1.1. Terminal version
1.2. X (Athena, GTK, Motif) or plain text.
MacOS Classic is no longer supported. If you really want it use Vim 6.4.
@@ -27,9 +27,9 @@ MacOS Classic is no longer supported. If you really want it use Vim 6.4.
1.0 Considerations
- Only '/' supported as path separator.
+ Only '/' is supported as path separator.
-1.1 Carbon interface (default)
+1.1 Terminal version (default)
You can compile vim with the standard Unix routine:
cd .../src
@@ -37,14 +37,7 @@ MacOS Classic is no longer supported. If you really want it use Vim 6.4.
make test
sudo make install
- "make" will create a working Vim.app application bundle in the src
- directory. You can move this bundle (the Vim.app directory) anywhere
- you want. Or use "make install" to move it to /Applications.
-
- You need at least Xcode 1.5 to compile Vim 7.0.
-
- Configure will create a universal binary if possible. This requires
- installing the universal SDK (currently for 10.4).
+ You need at least Xcode 1.5.
To overrule the architecture do this before running make:
@@ -53,17 +46,16 @@ MacOS Classic is no longer supported. If you really want it use Vim 6.4.
./configure --with-mac-arch=ppc
-1.2 X-Windows or Plain Text
+1.2 X-Windows
- If you do not want the Carbon interface, you must explicitly tell
- configure to use a different GUI.
+ You must explicitly tell configure to use a GUI.
cd .../src
./configure --disable-darwin --enable-gui=gtk2
make; make install
- NOTE: The following GUI options are supported:
- no (for text), motif, athena, nextaw
+ NOTE: The following GUI options are possible (but might not work):
+ no (for terminal only), motif, athena, nextaw
gtk, gtk2, gnome, gnome2,
NOTE: You need to first install XFree86 and XDarwin.
diff --git a/src/Makefile b/src/Makefile
index 5d73fc91a3..35fe41e74c 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1373,24 +1373,6 @@ PHOTONGUI_MAN_TARGETS = yes
PHOTONGUI_TESTTARGET = gui
PHOTONGUI_BUNDLE =
-# CARBON GUI
-CARBONGUI_SRC = gui.c gui_mac.c
-CARBONGUI_OBJ = objects/gui.o objects/gui_mac.o
-CARBONGUI_DEFS = -DFEAT_GUI_MAC -fno-common -fpascal-strings \
- -Wall -Wno-unknown-pragmas \
- -mdynamic-no-pic -pipe
-CARBONGUI_IPATH = -I. -Iproto
-CARBONGUI_LIBS_DIR =
-CARBONGUI_LIBS1 = -framework Carbon
-CARBONGUI_LIBS2 =
-CARBONGUI_INSTALL = install_macosx
-CARBONGUI_TARGETS =
-CARBONGUI_MAN_TARGETS =
-CARBONGUI_TESTTARGET = gui
-CARBONGUI_BUNDLE = gui_bundle
-APPDIR = $(VIMNAME).app
-CARBONGUI_TESTARG = VIMPROG=../$(APPDIR)/Contents/MacOS/$(VIMTARGET)
-
### Haiku GUI
HAIKUGUI_SRC = gui.c gui_haiku.cc
HAIKUGUI_OBJ = objects/gui.o objects/gui_haiku.o
diff --git a/src/auto/configure b/src/auto/configure
index 54ee35d87a..fcb2f40e8c 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -829,7 +829,6 @@ enable_gtk3_check
enable_motif_check
enable_athena_check
enable_nextaw_check
-enable_carbon_check
enable_gtktest
with_gnome_includes
with_gnome_libs
@@ -1509,7 +1508,6 @@ Optional Features:
--enable-motif-check If auto-select GUI, check for Motif default=yes
--enable-athena-check If auto-select GUI, check for Athena default=yes
--enable-nextaw-check If auto-select GUI, check for neXtaw default=yes
- --enable-carbon-check If auto-select GUI, check for Carbon default=yes
--disable-gtktest Do not try to compile and run a test GTK program
--disable-icon-cache-update update disabled
--disable-desktop-database-update update disabled
@@ -4746,8 +4744,18 @@ rm -f core conftest.err conftest.$ac_objext \
OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
+ fi
+
+ if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
+ CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-Oz/'`
+ fi
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
- # On IRIX 5.3, sys/types and inttypes.h are conflicting.
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do :
@@ -4764,28 +4772,6 @@ fi
done
-ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
-if test "x$ac_cv_header_Carbon_Carbon_h" = xyes; then :
- CARBON=yes
-fi
-
-
- if test "x$CARBON" = "xyes"; then
- if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3; then
- with_x=no
- fi
- fi
- fi
-
- if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
- CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-Oz/'`
- fi
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
for ac_header in AvailabilityMacros.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
@@ -9212,7 +9198,6 @@ SKIP_ATHENA=YES
SKIP_NEXTAW=YES
SKIP_PHOTON=YES
SKIP_HAIKU=YES
-SKIP_CARBON=YES
GUITYPE=NONE
if test "x$HAIKU" = "xyes"; then
@@ -9247,25 +9232,6 @@ $as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
SKIP_PHOTON=YES ;;
esac
-elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
- SKIP_CARBON=
- case "$enable_gui_canon" in
- no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
-$as_echo "no GUI support" >&6; }
- SKIP_CARBON=YES ;;
- yes|"") { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
-$as_echo "yes - automatic GUI support" >&6; }
- gui_auto=yes ;;
- auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto - Carbon GUI is outdated - disable GUI support" >&5
-$as_echo "auto - Carbon GUI is outdated - disable GUI support" >&6; }
- SKIP_CARBON=YES ;;
- carbon) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Carbon GUI support" >&5
-$as_echo "Carbon GUI support" >&6; } ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
-$as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
- SKIP_CARBON=YES ;;
- esac
-
else
case "$enable_gui_canon" in
@@ -9278,8 +9244,7 @@ $as_echo "yes/auto - automatic GUI support" >&6; }
SKIP_GNOME=
SKIP_MOTIF=
SKIP_ATHENA=
- SKIP_NEXTAW=
- SKIP_CARBON=;;
+ SKIP_NEXTAW=;;
gtk2) { $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
$as_echo "GTK+ 2.x GUI support" >&6; }
SKIP_GTK2=;;
@@ -9409,56 +9374,6 @@ $as_echo "$enable_nextaw_check" >&6; };
fi
fi
-if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Carbon" >&5
-$as_echo_n "checking whether or not to look for Carbon... " >&6; }
- # Check whether --enable-carbon-check was given.
-if test "${enable_carbon_check+set}" = set; then :
- enableval=$enable_carbon_check;
-else
- enable_carbon_check="yes"
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_carbon_check" >&5
-$as_echo "$enable_carbon_check" >&6; };
- if test "x$enable_carbon_check" = "xno"; then
- SKIP_CARBON=YES
- fi
-fi
-
-
-if test "x$MACOS_X" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Carbon GUI" >&5
-$as_echo_n "checking for Carbon GUI... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- GUITYPE=CARBONGUI
- if test "$VIMNAME" = "vim"; then
- VIMNAME=Vim
- fi
-
- if test "x$MACARCH" = "xboth"; then
- CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
- else
- CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
- fi
-
- if test x$prefix = xNONE; then
- prefix=/Applications
- fi
-
- datadir='${prefix}/Vim.app/Contents/Resources'
-
- SKIP_GTK2=YES;
- SKIP_GNOME=YES;
- SKIP_MOTIF=YES;
- SKIP_ATHENA=YES;
- SKIP_NEXTAW=YES;
- SKIP_PHOTON=YES;
- SKIP_HAIKU=YES;
- SKIP_CARBON=YES
-fi
-
@@ -14860,11 +14775,7 @@ fi
if test "$MACOS_X" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
$as_echo_n "checking whether we need macOS frameworks... " >&6; }
- if test "$GUITYPE" = "CARBONGUI"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need Carbon" >&5
-$as_echo "yes, we need Carbon" >&6; }
- LIBS="$LIBS -framework Carbon"
- elif test "$MACOS_X_DARWIN" = "yes"; then
+ if test "$MACOS_X_DARWIN" = "yes"; then
if test "$features" = "tiny"; then
OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
@@ -14881,9 +14792,6 @@ $as_echo "yes, we need AppKit" >&6; }
$as_echo "no" >&6; }
fi
fi
-if test "x$MACARCH" = "xboth" && test "x$GUITYPE" = "xCARBONGUI"; then
- LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
-fi
DEPEND_CFLAGS_FILTER=
if test "$GCC" = yes; then
diff --git a/src/configure.ac b/src/configure.ac
index 054ea1dcb8..8a5216a8a3 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -262,16 +262,6 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
dnl TODO: use -arch i386 on Intel machines
dnl Removed -no-cpp-precomp, only for very old compilers.
CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
-
- dnl If Carbon is found, assume we don't want X11
- dnl unless it was specifically asked for (--with-x)
- dnl or Motif, Athena or GTK GUI is used.
- AC_CHECK_HEADER(Carbon/Carbon.h, CARBON=yes)
- if test "x$CARBON" = "xyes"; then
- if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3; then
- with_x=no
- fi
- fi
fi
dnl Avoid a bug with -O2 with gcc 4.0.1. Symptom: malloc() reports double
@@ -2406,7 +2396,6 @@ SKIP_ATHENA=YES
SKIP_NEXTAW=YES
SKIP_PHOTON=YES
SKIP_HAIKU=YES
-SKIP_CARBON=YES
GUITYPE=NONE
if test "x$HAIKU" = "xyes"; then
@@ -2432,20 +2421,6 @@ elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
SKIP_PHOTON=YES ;;
esac
-elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
- SKIP_CARBON=
- case "$enable_gui_canon" in
- no) AC_MSG_RESULT(no GUI support)
- SKIP_CARBON=YES ;;
- yes|"") AC_MSG_RESULT(yes - automatic GUI support)
- gui_auto=yes ;;
- auto) AC_MSG_RESULT(auto - Carbon GUI is outdated - disable GUI support)
- SKIP_CARBON=YES ;;
- carbon) AC_MSG_RESULT(Carbon GUI support) ;;
- *) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported])
- SKIP_CARBON=YES ;;
- esac
-
else
case "$enable_gui_canon" in
@@ -2456,8 +2431,7 @@ else
SKIP_GNOME=
SKIP_MOTIF=
SKIP_ATHENA=
- SKIP_NEXTAW=
- SKIP_CARBON=;;
+ SKIP_NEXTAW=;;
gtk2) AC_MSG_RESULT(GTK+ 2.x GUI support)
SKIP_GTK2=;;
gnome2) AC_MSG_RESULT(GNOME 2.x GUI support)
@@ -2544,52 +2518,6 @@ if test "x$SKIP_NEXTAW" != "xYES" -a "$enable_gui_canon" != "nextaw"; then
fi
fi
-if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
- AC_MSG_CHECKING(whether or not to look for Carbon)
- AC_ARG_ENABLE(carbon-check,
- [ --enable-carbon-check If auto-select GUI, check for Carbon [default=yes]],
- , enable_carbon_check="yes")
- AC_MSG_RESULT($enable_carbon_check);
- if test "x$enable_carbon_check" = "xno"; then
- SKIP_CARBON=YES
- fi
-fi
-
-
-if test "x$MACOS_X" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
- AC_MSG_CHECKING(for Carbon GUI)
- dnl already did the check, just give the message
- AC_MSG_RESULT(yes);
- GUITYPE=CARBONGUI
- if test "$VIMNAME" = "vim"; then
- VIMNAME=Vim
- fi
-
- if test "x$MACARCH" = "xboth"; then
- CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
- else
- CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
- fi
-
- dnl Default install directory is not /usr/local
- if test x$prefix = xNONE; then
- prefix=/Applications
- fi
-
- dnl Sorry for the hard coded default
- datadir='${prefix}/Vim.app/Contents/Resources'
-
- dnl skip everything else
- SKIP_GTK2=YES;
- SKIP_GNOME=YES;
- SKIP_MOTIF=YES;
- SKIP_ATHENA=YES;
- SKIP_NEXTAW=YES;
- SKIP_PHOTON=YES;
- SKIP_HAIKU=YES;
- SKIP_CARBON=YES
-fi
-
dnl define an autoconf function to check for a specified version of GTK, and
dnl try to compile/link a GTK program.
dnl
@@ -4454,10 +4382,7 @@ fi
if test "$MACOS_X" = "yes"; then
AC_MSG_CHECKING([whether we need macOS frameworks])
- if test "$GUITYPE" = "CARBONGUI"; then
- AC_MSG_RESULT([yes, we need Carbon])
- LIBS="$LIBS -framework Carbon"
- elif test "$MACOS_X_DARWIN" = "yes"; then
+ if test "$MACOS_X_DARWIN" = "yes"; then
if test "$features" = "tiny"; then
dnl Since no FEAT_CLIPBOARD, no longer need for os_macosx.m.
OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
@@ -4472,9 +4397,6 @@ if test "$MACOS_X" = "yes"; then
AC_MSG_RESULT([no])
fi
fi
-if test "x$MACARCH" = "xboth" && test "x$GUITYPE" = "xCARBONGUI"; then
- LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
-fi
dnl gcc 3.1 changed the meaning of -MM. The only solution appears to be to
dnl use "-isystem" instead of "-I" for all non-Vim include dirs.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 5607ef9e5b..bbc3404e5b 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -3920,13 +3920,7 @@ f_has(typval_T *argvars, typval_T *rettv)
0
#endif
},
- {"gui_mac",
-#ifdef FEAT_GUI_MAC
- 1
-#else
- 0
-#endif
- },
+ {"gui_mac", 0},
{"gui_motif",
#ifdef FEAT_GUI_MOTIF
1
diff --git a/src/feature.h b/src/feature.h
index 49175272f8..0c68f79f2a 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -632,7 +632,6 @@
#if defined(FEAT_NORMAL) \
&& (defined(FEAT_GUI_GTK) \
|| (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \
- || defined(FEAT_GUI_MAC) \
|| defined(FEAT_GUI_HAIKU) \
|| (defined(FEAT_GUI_MSWIN) \
&& (!defined(_MSC_VER) || _MSC_VER > 1020)))
@@ -646,8 +645,7 @@
#if defined(FEAT_NORMAL)
# define FEAT_BROWSE_CMD
# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
- || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_PHOTON) \
- || defined(FEAT_GUI_MAC)
+ || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_PHOTON)
# define FEAT_BROWSE
# endif
#endif
@@ -657,8 +655,7 @@
* there is no terminal version, and on Windows we can't figure out how to
* fork one off with :gui.
*/
-#if (defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)) \
- || (defined(FEAT_GUI_MAC) && !defined(MACOS_X_DARWIN))
+#if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)
# define ALWAYS_USE_GUI
#endif
@@ -673,8 +670,7 @@
|| defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_PHOTON) \
|| defined(FEAT_GUI_HAIKU) \
- || defined(FEAT_GUI_MSWIN) \
- || defined(FEAT_GUI_MAC)
+ || defined(FEAT_GUI_MSWIN)
# define FEAT_CON_DIALOG
# define FEAT_GUI_DIALOG
# else
@@ -690,7 +686,7 @@
#if defined(FEAT_GUI_DIALOG) && \
(defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) \
- || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) \
+ || defined(FEAT_GUI_PHOTON) \
|| defined(FEAT_GUI_HAIKU))
# define FEAT_GUI_TEXTDIALOG
# ifndef ALWAYS_USE_GUI
@@ -705,11 +701,6 @@
# define FEAT_TERMGUICOLORS
#endif
-// Mac specific thing: Codewarrior interface.
-#ifdef FEAT_GUI_MAC
-# define FEAT_CW_EDITOR
-#endif
-
/*
* +vartabs 'vartabstop' and 'varsofttabstop' options.
*/
@@ -1091,8 +1082,7 @@
#endif
#if defined(FEAT_MZSCHEME) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \
- || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
- || defined(FEAT_GUI_MAC))
+ || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
# define MZSCHEME_GUI_THREADS
#endif
diff --git a/src/fileio.c b/src/fileio.c
index 189d4f41ad..361109313b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -403,11 +403,6 @@ readfile(
*/
swap_mode = (st.st_mode & 0644) | 0600;
#endif
-#ifdef FEAT_CW_EDITOR
- // Get the FSSpec on MacOS
- // TODO: Update it properly when the buffer name changes
- (void)GetFSSpecFromPath(curbuf->b_ffname, &curbuf->b_FSSpec);
-#endif
#ifdef VMS
curbuf->b_fab_rfm = st.st_fab_rfm;
curbuf->b_fab_rat = st.st_fab_rat;
@@ -3389,7 +3384,6 @@ shorten_fnames(int force)
#if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \
|| defined(FEAT_GUI_MSWIN) \
- || defined(FEAT_GUI_MAC) \
|| defined(FEAT_GUI_HAIKU) \
|| defined(PROTO)
/*
diff --git a/src/globals.h b/src/globals.h
index 72b8a1e460..f64a874e4d 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1569,7 +1569,7 @@ EXTERN char e_failed[] INIT(= N_("E472: Command failed"));
#if defined(FEAT_GUI) && defined(FEAT_XFONTSET)
EXTERN char e_fontset[] INIT(= N_("E234: Unknown fontset: %s"));
#endif
-#if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MAC) \
+#if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_HAIKU)
EXTERN char e_font[] INIT(= N_("E235: Unknown font: %s"));
#endif
@@ -1806,10 +1806,6 @@ EXTERN char e_colon_required[] INIT(= N_("E1050: Colon required before a range")
EXTERN char e_alloc_color[] INIT(= N_("E254: Cannot allocate color %s"));
#endif
-#ifdef FEAT_GUI_MAC
-EXTERN short disallow_gui INIT(= FALSE);
-#endif
-
EXTERN char top_bot_msg[] INIT(= N_("search hit TOP, continuing at BOTTOM"));
EXTERN char bot_top_msg[] INIT(= N_("search hit BOTTOM, continuing at TOP"));
diff --git a/src/gui.c b/src/gui.c
index 5d003a38b2..5ae29facde 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -56,7 +56,7 @@ static int disable_flush = 0; // If > 0, gui_mch_flush() is disabled.
* this makes the thumb indicate the part of the text that is shown. Motif
* can't do this.
*/
-#if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MAC)
+#if defined(FEAT_GUI_ATHENA)
# define SCROLL_PAST_END
#endif
@@ -846,7 +846,7 @@ gui_exit(int rc)
}
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_MSWIN) \
- || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) || defined(PROTO)
+ || defined(FEAT_GUI_PHOTON) || defined(PROTO)
# define NEED_GUI_UPDATE_SCREEN 1
/*
* Called when the GUI shell is closed by the user. If there are no changed
@@ -1377,7 +1377,7 @@ gui_position_components(int total_width UNUSED)
#endif
# if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
- || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_MAC))
+ || defined(FEAT_GUI_MOTIF))
if (gui_has_tabline())
text_area_y += gui.tabline_height;
#endif
diff --git a/src/gui.h b/src/gui.h
index cfc4448168..8b8b7fb163 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -39,25 +39,6 @@
# include <X11/Intrinsic.h>
#endif
-#ifdef FEAT_GUI_MAC
-# include <Types.h>
-/*# include <Memory.h>*/
-# include <Quickdraw.h>
-# include <Fonts.h>
-# include <Events.h>
-# include <Menus.h>
-# if !(defined (TARGET_API_MAC_CARBON) && (TARGET_API_MAC_CARBON))
-# include <Windows.h>
-# endif
-# include <Controls.h>
-/*# include <TextEdit.h>*/
-# include <Dialogs.h>
-# include <OSUtils.h>
-/*
-# include <ToolUtils.h>
-# include <SegLoad.h>*/
-#endif
-
#ifdef FEAT_GUI_PHOTON
# include <Ph.h>
# include <Pt.h>
@@ -68,7 +49,7 @@
* On some systems scrolling needs to be done right away instead of in the
* main loop.
*/
-#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MAC) || defined(FEAT_GUI_GTK)
+#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK)
# define USE_ON_FLY_SCROLL
#endif
@@ -77,7 +58,6 @@
*/
#if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \
|| defined(FEAT_GUI_MSWIN) \
- || defined(FEAT_GUI_MAC) \
|| defined(FEAT_GUI_HAIKU)
# define HAVE_DROP_FILE
#endif
@@ -209,9 +189,6 @@ typedef struct GuiScrollbar
#if FEAT_GUI_HAIKU
VimScrollBar *id; // Pointer to real scroll bar
#endif
-#ifdef FEAT_GUI_MAC
- ControlHandle id; // A handle to the scrollbar
-#endif
#ifdef FEAT_GUI_PHOTON
PtWidget_t *id;
#endif
@@ -435,7 +412,7 @@ typedef struct Gui
#if defined(FEAT_GUI_TABLINE) \
&& (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) \
- || defined(FEAT_GUI_MAC) || defined(FEAT_GUI_HAIKU))
+ || defined(FEAT_GUI_HAIKU))
int tabline_height;
#endif
@@ -473,14 +450,6 @@ typedef struct Gui
int vdcmp; // Vim Direct Communication Message Port
#endif
-#ifdef FEAT_GUI_MAC
- WindowPtr VimWindow;
- MenuHandle MacOSHelpMenu; // Help menu provided by the MacOS
- int MacOSHelpItems; // Nr of help-items supplied by MacOS
- WindowPtr wid; // Window id of text area
- int visibility; // Is window partially/fully obscured?
-#endif
-
#ifdef FEAT_GUI_PHOTON
PtWidget_t *vimWindow; // PtWindow
PtWidget_t *vimTextArea; // PtRaw
@@ -599,6 +568,6 @@ typedef enum
# endif
#endif // FEAT_GUI_GTK
-#if defined(UNIX) && !defined(FEAT_GUI_MAC)
+#if defined(UNIX)
# define GUI_MAY_FORK
#endif
diff --git a/src/gui_mac.c b/src/gui_mac.c
deleted file mode 100644
index b19061705e..0000000000
--- a/src/gui_mac.c
+++ /dev/null
@@ -1,6706 +0,0 @@
-/* vi:set ts=8 sts=4 sw=4 noet:
- *
- * VIM - Vi IMproved by Bram Moolenaar
- * GUI/Motif support by Robert Webb
- * Macintosh port by Dany St-Amant
- * and Axel Kielhorn
- * Port to MPW by Bernhard Pruemmer
- * Initial Carbon port by Ammon Skidmore
- *
- * Do ":help uganda" in Vim to read copying and usage conditions.
- * Do ":help credits" in Vim to see a list of people who contributed.
- * See README.txt for an overview of the Vim source code.
- */
-
-/*
- * NOTES: - Vim 7+ does not support classic MacOS. Please use Vim 6.x
- * - Comments mentioning FAQ refer to the book:
- * "Macworld Mac Programming FAQs" from "IDG Books"
- */
-
-/*
- * TODO: Change still to merge from the macvim's iDisk
- *
- * error_ga, mch_errmsg, Navigation's changes in gui_mch_browse
- * uses of MenuItemIndex, changes in gui_mch_set_shellsize,
- * ScrapManager error handling.
- * Comments about function remaining to Carbonize.
- *
- */
-
-/*
- * TODO (Jussi)
- * * Clipboard does not work (at least some cases)
- * * ATSU font rendering has some problems
- * * Investigate and remove dead code (there is still lots of that)
- */
-
-#include <Devices.h> // included first to avoid CR problems
-#include "vim.h"
-
-#define USE_CARBONIZED
-#define USE_AEVENT // Enable AEVENT
-#undef USE_OFFSETED_WINDOW // Debugging feature: start Vim window OFFSETed
-
-// Compile as CodeWarrior External Editor
-#if defined(FEAT_CW_EDITOR) && !defined(USE_AEVENT)
-# define USE_AEVENT // Need Apple Event Support
-#endif
-
-// Vim's Scrap flavor.
-#define VIMSCRAPFLAVOR 'VIM!'
-#define SCRAPTEXTFLAVOR kScrapFlavorTypeUnicode
-
-static EventHandlerUPP mouseWheelHandlerUPP = NULL;
-SInt32 gMacSystemVersion;
-
-#ifdef MACOS_CONVERT
-# define USE_CARBONKEYHANDLER
-
-static int im_is_active = FALSE;
-# if 0
- // TODO: Implement me!
-static int im_start_row = 0;
-static int im_start_col = 0;
-# endif
-
-# define NR_ELEMS(x) (sizeof(x) / sizeof(x[0]))
-
-static TSMDocumentID gTSMDocument;
-
-static void im_on_window_switch(int active);
-static EventHandlerUPP keyEventHandlerUPP = NULL;
-static EventHandlerUPP winEventHandlerUPP = NULL;
-
-static pascal OSStatus gui_mac_handle_window_activate(
- EventHandlerCallRef nextHandler, EventRef theEvent, void *data);
-
-static pascal OSStatus gui_mac_handle_text_input(
- EventHandlerCallRef nextHandler, EventRef theEvent, void *data);
-
-static pascal OSStatus gui_mac_update_input_area(
- EventHandlerCallRef nextHandler, EventRef theEvent);
-
-static pascal OSStatus gui_mac_unicode_key_event(
- EventHandlerCallRef nextHandler, EventRef theEvent);
-
-#endif
-
-
-// Include some file. TODO: move into os_mac.h
-#include <Menus.h>
-#include <Resources.h>
-#include <Processes.h>
-#ifdef USE_AEVENT
-# include <AppleEvents.h>
-# include <AERegistry.h>
-#endif
-# include <Gestalt.h>
-#if UNIVERSAL_INTERFACES_VERSION >= 0x0330
-# include <ControlDefinitions.h>
-# include <Navigation.h> // Navigation only part of ??
-#endif
-
-// Help Manager (balloon.h, HM prefixed functions) are not supported
-// under Carbon (Jussi)
-# if 0
-// New Help Interface for Mac, not implemented yet.
-# include <MacHelp.h>
-# endif
-
-/*
- * These seem to be rectangle options. Why are they not found in
- * headers? (Jussi)
- */
-#define kNothing 0
-#define kCreateEmpty 2 //1
-#define kCreateRect 2
-#define kDestroy 3
-
-/*
- * Dany: Don't like those...
- */
-#define topLeft(r) (((Point*)&(r))[0])
-#define botRight(r) (((Point*)&(r))[1])
-
-
-// Time of last mouse click, to detect double-click
-static long lastMouseTick = 0;
-
-// ???
-static RgnHandle cursorRgn;
-static RgnHandle dragRgn;
-static Rect dragRect;
-static short dragRectEnbl;
-static short dragRectControl;
-
-// This variable is set when waiting for an event, which is the only moment
-// scrollbar dragging can be done directly. It's not allowed while commands
-// are executed, because it may move the cursor and that may cause unexpected
-// problems (e.g., while ":s" is working).
-static int allow_scrollbar = FALSE;
-
-// Last mouse click caused contextual menu, (to provide proper release)
-static short clickIsPopup;
-
-// Feedback Action for Scrollbar
-ControlActionUPP gScrollAction;
-ControlActionUPP gScrollDrag;
-
-// Keeping track of which scrollbar is being dragged
-static ControlHandle dragged_sb = NULL;
-
-// Vector of char_u --> control index for hotkeys in dialogs
-static short *gDialogHotKeys;
-
-static struct
-{
- FMFontFamily family;
- FMFontSize size;
- FMFontStyle style;
- Boolean isPanelVisible;
-} gFontPanelInfo = { 0, 0, 0, false };
-
-#ifdef MACOS_CONVERT
-# define USE_ATSUI_DRAWING
-int p_macatsui_last;
-ATSUStyle gFontStyle;
-ATSUStyle gWideFontStyle;
-Boolean gIsFontFallbackSet;
-UInt32 useAntialias_cached = 0x0;
-#endif
-
-// Colors Macros
-#define RGB(r,g,b) ((r) << 16) + ((g) << 8) + (b)
-#define Red(c) ((c & 0x00FF0000) >> 16)
-#define Green(c) ((c & 0x0000FF00) >> 8)
-#define Blue(c) ((c & 0x000000FF) >> 0)
-
-// Key mapping
-
-#define vk_Esc 0x35 // -> 1B
-
-#define vk_F1 0x7A // -> 10
-#define vk_F2 0x78 //0x63
-#define vk_F3 0x63 //0x76
-#define vk_F4 0x76 //0x60
-#define vk_F5 0x60 //0x61
-#define vk_F6 0x61 //0x62
-#define vk_F7 0x62 //0x63 ?
-#define vk_F8 0x64
-#define vk_F9 0x65
-#define vk_F10 0x6D
-#define vk_F11 0x67
-#define vk_F12 0x6F
-#define vk_F13 0x69
-#define vk_F14 0x6B
-#define vk_F15 0x71
-
-#define vk_Clr 0x47 // -> 1B (ESC)
-#define vk_Enter 0x4C // -> 03
-
-#define vk_Space 0x31 // -> 20
-#define vk_Tab 0x30 // -> 09
-#define vk_Return 0x24 // -> 0D
-// This is wrong for OSX, what is it for?
-#define vk_Delete 0X08 // -> 08 BackSpace
-
-#define vk_Help 0x72 // -> 05
-#define vk_Home 0x73 // -> 01
-#define vk_PageUp 0x74 // -> 0D
-#define vk_FwdDe