To: vim-dev@vim.org Subject: Patch 6.2.118 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.118 (extra) Problem: Mac: Compiling is done in a non-standard way. Solution: Use the Unix method for Mac OS X, with autoconf. Add "CARBONGUI" to Makefile and configure. (Eric Kow) Move a few prototypes from os_mac.pro to gui_mac.pro. Files: src/Makefile, src/auto/configure, src/configure.in, src/config.mk.in, src/gui_mac.c, src/os_mac.h, src/os_macosx.c, src/proto/gui_mac.pro, src/proto/os_mac.pro, src/infplist.xml, src/vim.h *** ../vim-6.2.117/src/Makefile Sun Oct 12 17:06:26 2003 --- src/Makefile Mon Sep 22 19:22:52 2003 *************** *** 1010,1019 **** --- 1010,1023 ---- #GUI_LIBS_DIR = $(NONE_LIBS_DIR) #GUI_LIBS1 = $(NONE_LIBS1) #GUI_LIBS2 = $(NONE_LIBS2) + #GUI_INSTALL = $(NONE_INSTALL) #GUI_TARGETS = $(NONE_TARGETS) #GUI_MAN_TARGETS= $(NONE_MAN_TARGETS) #GUI_TESTTARGET = $(NONE_TESTTARGET) + # Without a GUI install the normal way. + NONE_INSTALL = install_normal + ### GTK GUI GTK_SRC = gui.c gui_gtk.c gui_gtk_x11.c pty.c gui_gtk_f.c \ gui_beval.c *************** *** 1025,1030 **** --- 1029,1035 ---- GTK_LIBS_DIR = $(GUI_LIB_LOC) GTK_LIBS1 = GTK_LIBS2 = $(GTK_LIBNAME) + GTK_INSTALL = install_normal GTK_TARGETS = installglinks GTK_MAN_TARGETS = installghelplinks GTK_TESTTARGET = gui *************** *** 1038,1043 **** --- 1043,1049 ---- MOTIF_LIBS_DIR = $(GUI_LIB_LOC) MOTIF_LIBS1 = MOTIF_LIBS2 = $(MOTIF_LIBNAME) -lXt + MOTIF_INSTALL = install_normal MOTIF_TARGETS = installglinks MOTIF_MAN_TARGETS = installghelplinks MOTIF_TESTTARGET = gui *************** *** 1066,1072 **** ATHENA_LIBS_DIR = $(GUI_LIB_LOC) ATHENA_LIBS1 = $(XAW_LIB) ATHENA_LIBS2 = -lXt ! ATHENA_TARGETS = installglinks ATHENA_MAN_TARGETS = installghelplinks ATHENA_TESTTARGET = gui --- 1072,1079 ---- ATHENA_LIBS_DIR = $(GUI_LIB_LOC) ATHENA_LIBS1 = $(XAW_LIB) ATHENA_LIBS2 = -lXt ! ATHENA_INSTALL = install_normal ! ATHENA_TARGETS = installglinks ATHENA_MAN_TARGETS = installghelplinks ATHENA_TESTTARGET = gui *************** *** 1082,1087 **** --- 1089,1095 ---- NEXTAW_LIBS_DIR = $(GUI_LIB_LOC) NEXTAW_LIBS1 = $(NEXTAW_LIB) NEXTAW_LIBS2 = -lXt + NEXTAW_INSTALL = install_normal NEXTAW_TARGETS = installglinks NEXTAW_MAN_TARGETS = installghelplinks NEXTAW_TESTTARGET = gui *************** *** 1105,1110 **** --- 1113,1119 ---- BEOSGUI_LIBS_DIR = BEOSGUI_LIBS1 = -lbe -lroot BEOSGUI_LIBS2 = + BEOSGUI_INSTALL = install_normal BEOSGUI_TARGETS = installglinks BEOSGUI_MAN_TARGETS = installghelplinks BEOSGUI_TESTTARGET = gui *************** *** 1117,1126 **** --- 1126,1151 ---- PHOTONGUI_LIBS_DIR = PHOTONGUI_LIBS1 = -lph -lphexlib PHOTONGUI_LIBS2 = + PHOTONGUI_INSTALL = install_normal PHOTONGUI_TARGETS = installglinks PHOTONGUI_MAN_TARGETS = installghelplinks PHOTONGUI_TESTTARGET = gui + # CARBON GUI + CARBONGUI_SRC = gui.c gui_mac.c + CARBONGUI_OBJ = objects/gui.o objects/gui_mac.o objects/pty.o + CARBONGUI_DEFS = -arch ppc -fno-common -fpascal-strings \ + -Wall -Wno-unknown-pragmas \ + -mdynamic-no-pic -pipe + CARBONGUI_IPATH = -I. -Iproto -I/Developer/Headers/FlatCarbon + CARBONGUI_LIBS_DIR = + CARBONGUI_LIBS1 = -framework Carbon + CARBONGUI_LIBS2 = -ltermcap + CARBONGUI_INSTALL = gui_mac.rsrc install_macosx + CARBONGUI_TARGETS = + CARBONGUI_MAN_TARGETS = + CARBONGUI_TESTTARGET = + # All GUI files ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c pty.c ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w16.pro gui_w32.pro gui_amiga.pro gui_photon.pro *************** *** 1573,1579 **** # If you want to keep an older version, rename it before running "make # install". # ! install: installvim installtools install-languages install-icons installvim: installvimbin installruntime installlinks installhelplinks installmacros installtutor --- 1598,1606 ---- # If you want to keep an older version, rename it before running "make # install". # ! install: $(GUI_INSTALL) ! ! install_normal: installvim installtools install-languages install-icons installvim: installvimbin installruntime installlinks installhelplinks installmacros installtutor *************** *** 2135,2140 **** --- 2162,2170 ---- objects/gui_photon.o: gui_photon.c $(CCC) -o $@ gui_photon.c + objects/gui_mac.o: gui_mac.c + $(CCC) -o $@ gui_mac.c + objects/hangulin.o: hangulin.c $(CCC) -o $@ hangulin.c *************** *** 2210,2215 **** --- 2240,2248 ---- objects/os_qnx.o: os_qnx.c $(CCC) -o $@ os_qnx.c + objects/os_macosx.o: os_macosx.c + $(CCC) -o $@ os_macosx.c + objects/os_unix.o: os_unix.c $(CCC) -o $@ os_unix.c *************** *** 2269,2274 **** --- 2302,2393 ---- Makefile: @echo The name of the makefile MUST be "Makefile" (with capital M)!!!! + + ############################################################################### + ### MacOS X installation + ### + ### This creates a runnable Vim.app in the src directory + ### + ### TODO: install the runtime files in Vim.app instead of + ### requiring that they be in a seperate directory. + + REZ = /Developer/Tools/Rez + RESMRG = /Developer/Tools/ResMerger + APPDIR = $(VIMNAME).app + RESDIR = $(APPDIR)/Contents/Resources + # FIXME: i'm sure someone else can do something clever with grep + # sed and version.h here + VERSION = 6.2 + + ### Common flags + M4FLAGS += -DAPP_EXE=$(VIMNAME) -DAPP_NAME=$(VIMNAME) -DAPP_VER=$(VERSION) \ + -DICON_APP=$(ICON_APP) + + ### Icons + # You can download Douglas Stebila's icons: + # http://homepage.mac.com/dstebila/code/vim/ + # TODO: Honestly, why don't we just go ahead and do this? OS 9? + # If you place those *.icns at src directory, it will be detected by this + # Makefile automatically, and used for Vim. + ICON_APP = $(shell if [ -e app.icns ] ; then echo app.icns ; else echo gui_mac.icns ; fi) + ICON_DOC = $(shell if [ -e doc.icns ] ; then echo doc.icns ; else echo ; fi) + ICON_DOCTXT = $(shell if [ -e doc-txt.icns ] ; then echo doc-txt.icns ; else echo ; fi) + ICONS = $(addprefix $(RESDIR)/, $(ICON_APP) $(ICON_DOC) $(ICON_DOCTXT)) + + install_macosx: bundle-dir bundle-executable bundle-info bundle-resource \ + bundle-language + + bundle-dir: $(APPDIR)/Contents + cp -R ../runtime $(APPDIR) + + bundle-executable: $(VIMTARGET) + cp $(VIMTARGET) $(APPDIR)/Contents/MacOS/$(VIMTARGET) + + bundle-info: bundle-dir + @echo "Creating PkgInfo" + @echo -n "APPLVIM!" > $(APPDIR)/Contents/PkgInfo + @echo "Creating Info.plist" + m4 $(M4FLAGS) infplist.xml > $(APPDIR)/Contents/Info.plist + + bundle-resource: bundle-dir bundle-icons bundle-rsrc + + bundle-icons: $(ICONS) + + ### Classic resources + # Resource fork (in the form of a .rsrc file) for Classic Vim (Mac OS 9) + # This file is also required for OS X Vim. + bundle-rsrc: gui_mac.rsrc + @echo "Creating resource fork" + $(RESMRG) gui_mac.rsrc -dstIs DF -o $(RESDIR)/$(VIMNAME).rsrc + + gui_mac.rsrc: + open os_mac.rsr.hqx + sleep 1 + @echo + @echo "--------------------" + @echo "If this fails, run make install again after StuffIt Expander quits." + @echo "--------------------" + @echo + + # po/Make_osx.pl says something about generating a Mac message file + # for Ukrananian. Would somebody using Mac OS X in Ukranian + # *really* be upset that Carbon Vim was not localised in + # Ukranian? + # + #bundle-language: bundle-dir po/Make_osx.pl + # cd po && perl Make_osx.pl --outdir ../$(RESDIR) $(MULTILANG) + bundle-language: bundle-dir + + $(APPDIR)/Contents: + mkdir $(APPDIR) + mkdir $(APPDIR)/Contents + mkdir $(APPDIR)/Contents/MacOS + mkdir $(RESDIR) + mkdir $(RESDIR)/English.lproj + + $(RESDIR)/%.icns: %.icns + cp $< $@ + ############################################################################### ### (automatically generated by 'make depend') *** ../vim-6.2.117/src/auto/configure Sat Sep 27 19:20:53 2003 --- src/auto/configure Sat Sep 13 21:22:56 2003 *************** *** 60,66 **** ac_help="$ac_help --with-x use the X Window System" ac_help="$ac_help ! --enable-gui[=OPTS] X11 GUI [default=auto] [OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/beos/photon]" ac_help="$ac_help --enable-gtk-check If auto-select GUI, check for GTK [default=yes]" ac_help="$ac_help --- 60,66 ---- ac_help="$ac_help --with-x use the X Window System" ac_help="$ac_help ! --enable-gui[=OPTS] X11 GUI [default=auto] [OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/beos/photon/carbon]" ac_help="$ac_help --enable-gtk-check If auto-select GUI, check for GTK [default=yes]" ac_help="$ac_help *************** *** 74,79 **** --- 74,81 ---- ac_help="$ac_help --enable-nextaw-check If auto-select GUI, check for neXtaw [default=yes]" ac_help="$ac_help + --enable-carbon-check If auto-select GUI, check for Carbon [default=yes]" + ac_help="$ac_help --with-gtk-prefix=PFX Prefix where GTK is installed (optional)" ac_help="$ac_help --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)" *************** *** 1169,1174 **** --- 1171,1229 ---- *) QNX=no; echo "$ac_t""no" 1>&6;; esac + DEFAULT_VIMNAME=vim + echo $ac_n "checking for Darwin (Mac OS X)""... $ac_c" 1>&6 + echo "configure:1177: checking for Darwin (Mac OS X)" >&5 + if test "`(uname) 2>/dev/null`" = Darwin; then + echo "$ac_t""yes" 1>&6 + MACOSX=yes + OS_EXTRA_SCR="os_macosx.c"; + OS_EXTRA_OBJ="objects/os_macosx.o" + CFLAGS="$CFLAGS -DMACOS_X_UNIX" + + ac_safe=`echo "Carbon/Carbon.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for Carbon/Carbon.h""... $ac_c" 1>&6 + echo "configure:1187: checking for Carbon/Carbon.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:1197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" + fi + rm -f conftest* + fi + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + CARBON=yes + else + echo "$ac_t""no" 1>&6 + fi + + if test "x$CARBON" = "xyes"; then + if test -z "$with_x"; then + with_x=no + DEFAULT_VIMNAME=Vim + fi + fi + else + echo "$ac_t""no" 1>&6 + fi + *************** *** 1194,1211 **** fi echo $ac_n "checking --with-vim-name argument""... $ac_c" 1>&6 ! echo "configure:1198: checking --with-vim-name argument" >&5 # Check whether --with-vim-name or --without-vim-name was given. if test "${with_vim_name+set}" = set; then withval="$with_vim_name" VIMNAME="$withval"; echo "$ac_t""$VIMNAME" 1>&6 else ! VIMNAME="vim"; echo "$ac_t""Defaulting to vim" 1>&6 fi echo $ac_n "checking --with-ex-name argument""... $ac_c" 1>&6 ! echo "configure:1209: checking --with-ex-name argument" >&5 # Check whether --with-ex-name or --without-ex-name was given. if test "${with_ex_name+set}" = set; then withval="$with_ex_name" --- 1249,1266 ---- fi echo $ac_n "checking --with-vim-name argument""... $ac_c" 1>&6 ! echo "configure:1253: checking --with-vim-name argument" >&5 # Check whether --with-vim-name or --without-vim-name was given. if test "${with_vim_name+set}" = set; then withval="$with_vim_name" VIMNAME="$withval"; echo "$ac_t""$VIMNAME" 1>&6 else ! VIMNAME="$DEFAULT_VIMNAME"; echo "$ac_t""Defaulting to $VIMNAME" 1>&6 fi echo $ac_n "checking --with-ex-name argument""... $ac_c" 1>&6 ! echo "configure:1264: checking --with-ex-name argument" >&5 # Check whether --with-ex-name or --without-ex-name was given. if test "${with_ex_name+set}" = set; then withval="$with_ex_name" *************** *** 1515,1520 **** --- 1570,1595 ---- echo "$ac_t"">>> too old; need Perl version 5.003_01 or later <<<" 1>&6 fi fi + + if test "x$MACOSX" == "xyes"; then + dir=/System/Library/Perl + darwindir=$dir/darwin + if test -d $darwindir; then + PERL=/usr/bin/perl + else + dir=/System/Library/Perl/5.8.1 + darwindir=$dir/darwin-thread-multi-2level + if test -d $darwindir; then + PERL=/usr/bin/perl + fi + fi + if test -n "$PERL"; then + PERL_DIR=$dir + PERL_CFLAGS=-DFEAT_PERL -I$darwindir/CORE + PERL_OBJ=if_perl.o if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a + PERL_LIBS=-lperl -L$darwindir/CORE + fi + fi fi *************** *** 2345,2351 **** echo "$ac_t""$enable_fontset" 1>&6 test -z "$with_x" && with_x=yes ! test "${enable_gui-yes}" != no -a "x$QNX" != "xyes" && with_x=yes if test "$with_x" = no; then echo "$ac_t""defaulting to: don't HAVE_X11" 1>&6 else --- 2420,2426 ---- echo "$ac_t""$enable_fontset" 1>&6 test -z "$with_x" && with_x=yes ! test "${enable_gui-yes}" != no -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && with_x=yes if test "$with_x" = no; then echo "$ac_t""defaulting to: don't HAVE_X11" 1>&6 else *************** *** 3458,3467 **** fi fi ! test "x$with_x" = xno -a "x$BEOS" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no echo $ac_n "checking --enable-gui argument""... $ac_c" 1>&6 ! echo "configure:3465: checking --enable-gui argument" >&5 # Check whether --enable-gui or --disable-gui was given. if test "${enable_gui+set}" = set; then enableval="$enable_gui" --- 3533,3542 ---- fi fi ! test "x$with_x" = xno -a "x$BEOS" != "xyes" -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no echo $ac_n "checking --enable-gui argument""... $ac_c" 1>&6 ! echo "configure:3540: checking --enable-gui argument" >&5 # Check whether --enable-gui or --disable-gui was given. if test "${enable_gui+set}" = set; then enableval="$enable_gui" *************** *** 3471,3553 **** fi - ## Canonicalize the --enable-gui= argument so that it can be easily compared. - ## Do not use character classes for portability with old tools. enable_gui_canon=`echo "_$enable_gui" | \ sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ! if test "x$BEOS" = "xyes"; then ! SKIP_GTK=YES ! SKIP_GTK2=YES ! SKIP_GNOME=YES ! SKIP_MOTIF=YES ! SKIP_ATHENA=YES ! SKIP_NEXTAW=YES ! SKIP_PHOTON=YES SKIP_BEOS= - GUITYPE=NONE - case "$enable_gui_canon" in no) echo "$ac_t""no GUI support" 1>&6 SKIP_BEOS=YES ;; yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;; auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;; beos) echo "$ac_t""BeOS GUI support" 1>&6 ;; ! *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;; esac elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then - SKIP_GTK=YES - SKIP_GTK2=YES - SKIP_GNOME=YES - SKIP_MOTIF=YES - SKIP_ATHENA=YES - SKIP_NEXTAW=YES - SKIP_BEOS=YES SKIP_PHOTON= - GUITYPE=NONE - case "$enable_gui_canon" in no) echo "$ac_t""no GUI support" 1>&6 SKIP_PHOTON=YES ;; yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;; auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;; photon) echo "$ac_t""Photon GUI support" 1>&6 ;; ! *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;; esac else - SKIP_GTK= - SKIP_GTK2= - SKIP_GNOME= - SKIP_MOTIF= - SKIP_ATHENA= - SKIP_NEXTAW= - SKIP_BEOS=YES - SKIP_PHOTON=YES - GUITYPE=NONE case "$enable_gui_canon" in ! no|none) echo "$ac_t""no GUI support" 1>&6 ! SKIP_GTK=YES; SKIP_GTK2=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;; yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;; ! auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;; gtk) echo "$ac_t""GTK+ 1.x GUI support" 1>&6 ! SKIP_GTK2=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;; gtk2) echo "$ac_t""GTK+ 2.x GUI support" 1>&6 ! SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;; gnome) echo "$ac_t""GNOME 1.x GUI support" 1>&6 ! SKIP_GTK2=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;; gnome2) echo "$ac_t""GNOME 2.x GUI support" 1>&6 ! SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;; motif) echo "$ac_t""Motif GUI support" 1>&6 ! SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;; athena) echo "$ac_t""Athena GUI support" 1>&6 ! SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_NEXTAW=YES ;; nextaw) echo "$ac_t""neXtaw GUI support" 1>&6 ! SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES ;; *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;; esac --- 3546,3633 ---- fi enable_gui_canon=`echo "_$enable_gui" | \ sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ! SKIP_GTK=YES ! SKIP_GTK2=YES ! SKIP_GNOME=YES ! SKIP_MOTIF=YES ! SKIP_ATHENA=YES ! SKIP_NEXTAW=YES ! SKIP_PHOTON=YES ! SKIP_BEOS=YES ! SKIP_CARBON=YES ! GUITYPE=NONE ! if test "x$BEOS" = "xyes"; then SKIP_BEOS= case "$enable_gui_canon" in no) echo "$ac_t""no GUI support" 1>&6 SKIP_BEOS=YES ;; yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;; auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;; beos) echo "$ac_t""BeOS GUI support" 1>&6 ;; ! *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ! SKIP_BEOS=YES ;; esac elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then SKIP_PHOTON= case "$enable_gui_canon" in no) echo "$ac_t""no GUI support" 1>&6 SKIP_PHOTON=YES ;; yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;; auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;; photon) echo "$ac_t""Photon GUI support" 1>&6 ;; ! *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ! SKIP_PHOTON=YES ;; ! esac ! ! elif test "x$MACOSX" = "xyes" -a "x$with_x" = "xno" ; then ! SKIP_CARBON= ! case "$enable_gui_canon" in ! no) echo "$ac_t""no GUI support" 1>&6 ! SKIP_CARBON=YES ;; ! yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;; ! auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;; ! carbon) echo "$ac_t""Carbon GUI support" 1>&6 ;; ! *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ! SKIP_CARBON=YES ;; esac else case "$enable_gui_canon" in ! no|none) echo "$ac_t""no GUI support" 1>&6 ;; yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;; ! auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ! SKIP_GTK= ! SKIP_GTK2= ! SKIP_GNOME= ! SKIP_MOTIF= ! SKIP_ATHENA= ! SKIP_NEXTAW= ! SKIP_CARBON=;; gtk) echo "$ac_t""GTK+ 1.x GUI support" 1>&6 ! SKIP_GTK=;; gtk2) echo "$ac_t""GTK+ 2.x GUI support" 1>&6 ! SKIP_GTK= ! SKIP_GTK2=;; gnome) echo "$ac_t""GNOME 1.x GUI support" 1>&6 ! SKIP_GNOME= ! SKIP_GTK=;; gnome2) echo "$ac_t""GNOME 2.x GUI support" 1>&6 ! SKIP_GNOME= ! SKIP_GTK= ! SKIP_GTK2=;; motif) echo "$ac_t""Motif GUI support" 1>&6 ! SKIP_MOTIF=;; athena) echo "$ac_t""Athena GUI support" 1>&6 ! SKIP_ATHENA=;; nextaw) echo "$ac_t""neXtaw GUI support" 1>&6 ! SKIP_NEXTAW=;; *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;; esac *************** *** 3658,3663 **** --- 3738,3776 ---- fi fi + if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then + echo $ac_n "checking whether or not to look for Carbon""... $ac_c" 1>&6 + echo "configure:3744: checking whether or not to look for Carbon" >&5 + # Check whether --enable-carbon-check or --disable-carbon-check was given. + if test "${enable_carbon_check+set}" = set; then + enableval="$enable_carbon_check" + : + else + enable_carbon_check="yes" + fi + + echo "$ac_t""$enable_carbon_check" 1>&6; + if test "x$enable_carbon_check" = "xno"; then + SKIP_CARBON=YES + fi + fi + + if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then + echo $ac_n "checking for Carbon GUI""... $ac_c" 1>&6 + echo "configure:3761: checking for Carbon GUI" >&5 + echo "$ac_t""yes" 1>&6; + GUITYPE=CARBONGUI + SKIP_GTK=YES; + SKIP_GTK2=YES; + SKIP_GNOME=YES; + SKIP_MOTIF=YES; + SKIP_ATHENA=YES; + SKIP_NEXTAW=YES; + SKIP_PHOTON=YES; + SKIP_BEOS=YES; + SKIP_CARBON=YES + fi + *************** *** 5292,5298 **** for ac_hdr in stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \ termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \ ! iconv.h langinfo.h unistd.h stropts.h errno.h strings.h \ sys/resource.h sys/systeminfo.h locale.h \ sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \ poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \ --- 5408,5414 ---- for ac_hdr in stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \ termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \ ! iconv.h langinfo.h unistd.h stropts.h errno.h \ sys/resource.h sys/systeminfo.h locale.h \ sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \ poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \ *************** *** 5301,5317 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:5305: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:5315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 5417,5433 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:5421: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:5431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** *** 5338,5349 **** done echo $ac_n "checking if strings.h can be included after string.h""... $ac_c" 1>&6 ! echo "configure:5343: checking if strings.h can be included after string.h" >&5 cppflags_save=$CPPFLAGS CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext <&6 + echo "configure:5463: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:5473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" + fi + rm -f conftest* + fi + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 + fi + done + + fi + echo $ac_n "checking if strings.h can be included after string.h""... $ac_c" 1>&6 ! echo "configure:5502: checking if strings.h can be included after string.h" >&5 cppflags_save=$CPPFLAGS CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext </dev/null`" = Darwin; then + AC_MSG_RESULT(yes) + MACOSX=yes + OS_EXTRA_SCR="os_macosx.c"; + OS_EXTRA_OBJ="objects/os_macosx.o" + CFLAGS="$CFLAGS -DMACOS_X_UNIX" + + dnl If Carbon is found, assume we don't want X11 + dnl unless it was specifically asked for (--with-x) + AC_CHECK_HEADER(Carbon/Carbon.h, CARBON=yes) + if test "x$CARBON" = "xyes"; then + if test -z "$with_x"; then + with_x=no + DEFAULT_VIMNAME=Vim + fi + fi + else + AC_MSG_RESULT(no) + fi + AC_SUBST(OS_EXTRA_SRC) AC_SUBST(OS_EXTRA_OBJ) *************** *** 106,112 **** AC_MSG_CHECKING(--with-vim-name argument) AC_ARG_WITH(vim-name, [ --with-vim-name=NAME what to call the Vim executable], VIMNAME="$withval"; AC_MSG_RESULT($VIMNAME), ! VIMNAME="vim"; AC_MSG_RESULT(Defaulting to vim)) AC_SUBST(VIMNAME) AC_MSG_CHECKING(--with-ex-name argument) AC_ARG_WITH(ex-name, [ --with-ex-name=NAME what to call the Ex executable], --- 131,137 ---- AC_MSG_CHECKING(--with-vim-name argument) AC_ARG_WITH(vim-name, [ --with-vim-name=NAME what to call the Vim executable], VIMNAME="$withval"; AC_MSG_RESULT($VIMNAME), ! VIMNAME="$DEFAULT_VIMNAME"; AC_MSG_RESULT(Defaulting to $VIMNAME)) AC_SUBST(VIMNAME) AC_MSG_CHECKING(--with-ex-name argument) AC_ARG_WITH(ex-name, [ --with-ex-name=NAME what to call the Ex executable], *************** *** 295,300 **** --- 320,347 ---- AC_MSG_RESULT(>>> too old; need Perl version 5.003_01 or later <<<) fi fi + + if test "x$MACOSX" == "xyes"; then + dnl Mac OS X 10.2 or 10.3 + dir=/System/Library/Perl + darwindir=$dir/darwin + if test -d $darwindir; then + PERL=/usr/bin/perl + else + dnl Mac OS X 10.3 + dir=/System/Library/Perl/5.8.1 + darwindir=$dir/darwin-thread-multi-2level + if test -d $darwindir; then + PERL=/usr/bin/perl + fi + fi + if test -n "$PERL"; then + PERL_DIR=$dir + PERL_CFLAGS=-DFEAT_PERL -I$darwindir/CORE + PERL_OBJ=if_perl.o if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a + PERL_LIBS=-lperl -L$darwindir/CORE + fi + fi fi AC_SUBST(shrpenv) AC_SUBST(PERL_SRC) *************** *** 715,721 **** dnl defining FEAT_XFONTSET is delayed, so that it can be disabled for no GUI test -z "$with_x" && with_x=yes ! test "${enable_gui-yes}" != no -a "x$QNX" != "xyes" && with_x=yes if test "$with_x" = no; then AC_MSG_RESULT(defaulting to: don't HAVE_X11) else --- 762,768 ---- dnl defining FEAT_XFONTSET is delayed, so that it can be disabled for no GUI test -z "$with_x" && with_x=yes ! test "${enable_gui-yes}" != no -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && with_x=yes if test "$with_x" = no; then AC_MSG_RESULT(defaulting to: don't HAVE_X11) else *************** *** 815,903 **** fi fi ! test "x$with_x" = xno -a "x$BEOS" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no AC_MSG_CHECKING(--enable-gui argument) AC_ARG_ENABLE(gui, ! [ --enable-gui[=OPTS] X11 GUI [default=auto] [OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/beos/photon]], , enable_gui="auto") ! ## Canonicalize the --enable-gui= argument so that it can be easily compared. ! ## Do not use character classes for portability with old tools. enable_gui_canon=`echo "_$enable_gui" | \ sed 's/[[ _+-]]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ! if test "x$BEOS" = "xyes"; then ! SKIP_GTK=YES ! SKIP_GTK2=YES ! SKIP_GNOME=YES ! SKIP_MOTIF=YES ! SKIP_ATHENA=YES ! SKIP_NEXTAW=YES ! SKIP_PHOTON=YES SKIP_BEOS= - GUITYPE=NONE - case "$enable_gui_canon" in no) AC_MSG_RESULT(no GUI support) SKIP_BEOS=YES ;; yes|"") AC_MSG_RESULT(yes - automatic GUI support) ;; auto) AC_MSG_RESULT(auto - automatic GUI support) ;; beos) AC_MSG_RESULT(BeOS GUI support) ;; ! *) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported]) ;; esac elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then - SKIP_GTK=YES - SKIP_GTK2=YES - SKIP_GNOME=YES - SKIP_MOTIF=YES - SKIP_ATHENA=YES - SKIP_NEXTAW=YES - SKIP_BEOS=YES SKIP_PHOTON= - GUITYPE=NONE - case "$enable_gui_canon" in no) AC_MSG_RESULT(no GUI support) SKIP_PHOTON=YES ;; yes|"") AC_MSG_RESULT(yes - automatic GUI support) ;; auto) AC_MSG_RESULT(auto - automatic GUI support) ;; photon) AC_MSG_RESULT(Photon GUI support) ;; ! *) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported]) ;; esac else - SKIP_GTK= - SKIP_GTK2= - SKIP_GNOME= - SKIP_MOTIF= - SKIP_ATHENA= - SKIP_NEXTAW= - SKIP_BEOS=YES - SKIP_PHOTON=YES - GUITYPE=NONE case "$enable_gui_canon" in ! no|none) AC_MSG_RESULT(no GUI support) ! SKIP_GTK=YES; SKIP_GTK2=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;; ! yes|"") AC_MSG_RESULT(yes - automatic GUI support) ;; ! auto) AC_MSG_RESULT(auto - automatic GUI support) ;; gtk) AC_MSG_RESULT(GTK+ 1.x GUI support) ! SKIP_GTK2=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;; gtk2) AC_MSG_RESULT(GTK+ 2.x GUI support) ! SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;; gnome) AC_MSG_RESULT(GNOME 1.x GUI support) ! SKIP_GTK2=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;; gnome2) AC_MSG_RESULT(GNOME 2.x GUI support) ! SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;; motif) AC_MSG_RESULT(Motif GUI support) ! SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;; athena) AC_MSG_RESULT(Athena GUI support) ! SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_NEXTAW=YES ;; nextaw) AC_MSG_RESULT(neXtaw GUI support) ! SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES ;; *) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported]) ;; esac --- 862,957 ---- fi fi ! test "x$with_x" = xno -a "x$BEOS" != "xyes" -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no AC_MSG_CHECKING(--enable-gui argument) AC_ARG_ENABLE(gui, ! [ --enable-gui[=OPTS] X11 GUI [default=auto] [OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/beos/photon/carbon]], , enable_gui="auto") ! dnl Canonicalize the --enable-gui= argument so that it can be easily compared. ! dnl Do not use character classes for portability with old tools. enable_gui_canon=`echo "_$enable_gui" | \ sed 's/[[ _+-]]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ! dnl Skip everything by default. ! SKIP_GTK=YES ! SKIP_GTK2=YES ! SKIP_GNOME=YES ! SKIP_MOTIF=YES ! SKIP_ATHENA=YES ! SKIP_NEXTAW=YES ! SKIP_PHOTON=YES ! SKIP_BEOS=YES ! SKIP_CARBON=YES ! GUITYPE=NONE ! if test "x$BEOS" = "xyes"; then SKIP_BEOS= case "$enable_gui_canon" in no) AC_MSG_RESULT(no GUI support) SKIP_BEOS=YES ;; yes|"") AC_MSG_RESULT(yes - automatic GUI support) ;; auto) AC_MSG_RESULT(auto - automatic GUI support) ;; beos) AC_MSG_RESULT(BeOS GUI support) ;; ! *) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported]) ! SKIP_BEOS=YES ;; esac elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then SKIP_PHOTON= case "$enable_gui_canon" in no) AC_MSG_RESULT(no GUI support) SKIP_PHOTON=YES ;; yes|"") AC_MSG_RESULT(yes - automatic GUI support) ;; auto) AC_MSG_RESULT(auto - automatic GUI support) ;; photon) AC_MSG_RESULT(Photon GUI support) ;; ! *) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported]) ! SKIP_PHOTON=YES ;; ! esac ! ! elif test "x$MACOSX" = "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) ;; ! auto) AC_MSG_RESULT(auto - automatic GUI support) ;; ! 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 ! no|none) AC_MSG_RESULT(no GUI support) ;; ! yes|""|auto) AC_MSG_RESULT(yes/auto - automatic GUI support) ! SKIP_GTK= ! SKIP_GTK2= ! SKIP_GNOME= ! SKIP_MOTIF= ! SKIP_ATHENA= ! SKIP_NEXTAW= ! SKIP_CARBON=;; gtk) AC_MSG_RESULT(GTK+ 1.x GUI support) ! SKIP_GTK=;; gtk2) AC_MSG_RESULT(GTK+ 2.x GUI support) ! SKIP_GTK= ! SKIP_GTK2=;; gnome) AC_MSG_RESULT(GNOME 1.x GUI support) ! SKIP_GNOME= ! SKIP_GTK=;; gnome2) AC_MSG_RESULT(GNOME 2.x GUI support) ! SKIP_GNOME= ! SKIP_GTK= ! SKIP_GTK2=;; motif) AC_MSG_RESULT(Motif GUI support) ! SKIP_MOTIF=;; athena) AC_MSG_RESULT(Athena GUI support) ! SKIP_ATHENA=;; nextaw) AC_MSG_RESULT(neXtaw GUI support) ! SKIP_NEXTAW=;; *) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported]) ;; esac *************** *** 972,977 **** --- 1026,1059 ---- 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$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then + AC_MSG_CHECKING(for Carbon GUI) + dnl already did this + AC_MSG_RESULT(yes); + GUITYPE=CARBONGUI + dnl skip everything else + SKIP_GTK=YES; + SKIP_GTK2=YES; + SKIP_GNOME=YES; + SKIP_MOTIF=YES; + SKIP_ATHENA=YES; + SKIP_NEXTAW=YES; + SKIP_PHOTON=YES; + SKIP_BEOS=YES; + SKIP_CARBON=YES + fi + dnl dnl Get the cflags and libraries from the gtk-config script *************** *** 1567,1572 **** --- 1649,1660 ---- AC_DEFINE(FEAT_XFONTSET) fi + + dnl --------------------------------------------------------------------------- + dnl end of GUI-checking + dnl --------------------------------------------------------------------------- + + dnl Only really enable hangul input when GUI and XFONTSET are available if test "$enable_hangulinput" = "yes"; then if test "x$GUITYPE" = "xNONE"; then *************** *** 1622,1633 **** AC_CHECK_HEADERS(stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \ termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \ ! iconv.h langinfo.h unistd.h stropts.h errno.h strings.h \ sys/resource.h sys/systeminfo.h locale.h \ sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \ poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \ libgen.h util/debug.h util/msg18n.h frame.h \ sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h) dnl Check if strings.h and string.h can both be included when defined. AC_MSG_CHECKING([if strings.h can be included after string.h]) --- 1710,1726 ---- AC_CHECK_HEADERS(stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \ termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \ ! iconv.h langinfo.h unistd.h stropts.h errno.h \ sys/resource.h sys/systeminfo.h locale.h \ sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \ poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \ libgen.h util/debug.h util/msg18n.h frame.h \ sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h) + + dnl On Mac OS X strings.h exists but produces a warning message :-( + if test "x$MACOSX" != "xyes"; then + AC_CHECK_HEADERS(strings.h) + fi dnl Check if strings.h and string.h can both be included when defined. AC_MSG_CHECKING([if strings.h can be included after string.h]) *** ../vim-6.2.117/src/config.mk.in Sun Apr 20 16:10:18 2003 --- src/config.mk.in Sun Sep 7 20:25:02 2003 *************** *** 116,121 **** --- 116,122 ---- GUI_LIBS_DIR = $(@GUITYPE@_LIBS_DIR) GUI_LIBS1 = $(@GUITYPE@_LIBS1) GUI_LIBS2 = $(@GUITYPE@_LIBS2) + GUI_INSTALL = $(@GUITYPE@_INSTALL) GUI_TARGETS = $(@GUITYPE@_TARGETS) GUI_MAN_TARGETS = $(@GUITYPE@_MAN_TARGETS) GUI_TESTTARGET = $(@GUITYPE@_TESTTARGET) *** ../vim-6.2.117/src/gui_mac.c Sat Jul 26 21:25:27 2003 --- src/gui_mac.c Sun Oct 12 21:59:11 2003 *************** *** 206,212 **** #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) --- 206,212 ---- #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) *************** *** 613,622 **** } for (buf = firstbuf; buf != NULL; buf = buf->b_next) ! if (buf->b_ml.ml_mfp != NULL) ! if (SearchData.theFile.parID == buf->b_FSSpec.parID) ! if (SearchData.theFile.name[0] = buf->b_FSSpec.name[0]) ! if (STRNCMP(SearchData.theFile.name, buf->b_FSSpec.name, buf->b_FSSpec.name[0]+1)) { foundFile = true; break; --- 613,622 ---- } for (buf = firstbuf; buf != NULL; buf = buf->b_next) ! if (buf->b_ml.ml_mfp != NULL ! && SearchData.theFile.parID == buf->b_FSSpec.parID ! && SearchData.theFile.name[0] == buf->b_FSSpec.name[0] ! && STRNCMP(SearchData.theFile.name, buf->b_FSSpec.name, buf->b_FSSpec.name[0] + 1) == 0) { foundFile = true; break; *************** *** 822,828 **** CW_GetText GetTextData; Size actualSize; char_u *line; ! char_u *fullbuffer; long linesize; long lineStart; long BufferSize; --- 822,828 ---- CW_GetText GetTextData; Size actualSize; char_u *line; ! char_u *fullbuffer = NULL; long linesize; long lineStart; long BufferSize; *************** *** 875,883 **** HUnlock (GetTextData.theText); } } ! HLock (GetTextData.theText); ! fullbuffer[BufferSize-1] = 0; ! HUnlock (GetTextData.theText); if (foundFile == false) *GetTextData.theDate = fnfErr; else --- 875,886 ---- HUnlock (GetTextData.theText); } } ! if (fullbuffer != NULL) ! { ! HLock (GetTextData.theText); ! fullbuffer[BufferSize-1] = 0; ! HUnlock (GetTextData.theText); ! } if (foundFile == false) *GetTextData.theDate = fnfErr; else *************** *** 3160,3166 **** if (STRICMP (name, "hilite") == 0) { LMGetHiliteRGB (&MacColor); ! return (RGB (MacColor.red >> 8, MacColor.green >> 8, MacColor.blue >>8)); } /* Check if the name is one of the colors we know */ for (i = 0; i < sizeof(table) / sizeof(table[0]); i++) --- 3163,3169 ---- if (STRICMP (name, "hilite") == 0) { LMGetHiliteRGB (&MacColor); ! return (RGB (MacColor.red >> 8, MacColor.green >> 8, MacColor.blue >> 8)); } /* Check if the name is one of the colors we know */ for (i = 0; i < sizeof(table) / sizeof(table[0]); i++) *************** *** 3214,3220 **** if (STRICMP(color, name) == 0) { fclose(fd); ! return (guicolor_T) RGB(r,g,b); } } fclose(fd); --- 3217,3223 ---- if (STRICMP(color, name) == 0) { fclose(fd); ! return (guicolor_T) RGB(r, g, b); } } fclose(fd); *************** *** 5086,5091 **** --- 5089,5095 ---- status = ContextualMenuSelect(CntxMenu, where, false, kCMHelpItemNoHelp, HelpName, NULL, &CntxType, &CntxMenuID, &CntxMenuItem); if (status == noErr) + { if (CntxType == kCMMenuItemSelected) { /* Handle the menu CntxMenuID, CntxMenuItem */ *************** *** 5097,5102 **** --- 5101,5107 ---- { /* Should come up with the help */ } + } /* Restore original Port */ SetPort (savePort); /*OSX*/ *** ../vim-6.2.117/src/os_mac.h Mon Jul 28 14:38:38 2003 --- src/os_mac.h Sun Oct 12 21:14:34 2003 *************** *** 147,165 **** #endif #define HAVE_AVAIL_MEM /* #define SYNC_DUP_CLOSE sync() a file with dup() and close() */ ! #define HAVE_STRING_H ! #define HAVE_STRCSPN ! #define HAVE_MEMSET ! #define USE_TMPNAM /* use tmpnam() instead of mktemp() */ ! #define HAVE_FCNTL_H ! #define HAVE_QSORT ! #define HAVE_ST_MODE /* have stat.st_mode */ ! #if defined(__DATE__) && defined(__TIME__) ! # define HAVE_DATE_TIME #endif - #define HAVE_STRFTIME /* --- 147,167 ---- #endif #define HAVE_AVAIL_MEM + #ifndef HAVE_CONFIG_H /* #define SYNC_DUP_CLOSE sync() a file with dup() and close() */ ! # define HAVE_STRING_H ! # define HAVE_STRCSPN ! # define HAVE_MEMSET ! # define USE_TMPNAM /* use tmpnam() instead of mktemp() */ ! # define HAVE_FCNTL_H ! # define HAVE_QSORT ! # define HAVE_ST_MODE /* have stat.st_mode */ ! # if defined(__DATE__) && defined(__TIME__) ! # define HAVE_DATE_TIME ! # endif ! # define HAVE_STRFTIME #endif /* *************** *** 333,358 **** /**************/ #define mch_rename(src, dst) rename(src, dst) #define mch_remove(x) unlink((char *)(x)) ! #if defined(__MRC__) || defined(__SC__) ! # define mch_getenv(name) ((char_u *)getenv((char *)(name))) ! # define mch_setenv(name, val, x) setenv((name), (val)) ! #elif defined(__APPLE_CC__) ! # define mch_getenv(name) ((char_u *)getenv((char *)(name))) /*# define mch_setenv(name, val, x) setenv((name), (val)) */ /* Obsoleted by Dany on Oct 30, 2001 */ ! # define mch_setenv(name, val, x) setenv(name, val, x) ! #else ! /* vim_getenv() is in pty.c */ ! # define USE_VIMPTY_GETENV ! # define mch_getenv(x) vimpty_getenv(x) ! # define mch_setenv(name, val, x) setenv(name, val, x) #endif ! #ifdef __APPLE_CC__ /* Assuming compiling for MacOS X */ /* Trying to take advantage of the prebinding */ ! # define HAVE_TGETENT ! # define OSPEED_EXTERN ! # define UP_BC_PC_EXTERN #endif /* Some "prep work" definition to be able to compile the MacOS X --- 335,364 ---- /**************/ #define mch_rename(src, dst) rename(src, dst) #define mch_remove(x) unlink((char *)(x)) ! #ifndef mch_getenv ! # if defined(__MRC__) || defined(__SC__) ! # define mch_getenv(name) ((char_u *)getenv((char *)(name))) ! # define mch_setenv(name, val, x) setenv((name), (val)) ! # elif defined(__APPLE_CC__) ! # define mch_getenv(name) ((char_u *)getenv((char *)(name))) /*# define mch_setenv(name, val, x) setenv((name), (val)) */ /* Obsoleted by Dany on Oct 30, 2001 */ ! # define mch_setenv(name, val, x) setenv(name, val, x) ! # else ! /* vim_getenv() is in pty.c */ ! # define USE_VIMPTY_GETENV ! # define mch_getenv(x) vimpty_getenv(x) ! # define mch_setenv(name, val, x) setenv(name, val, x) ! # endif #endif ! #ifndef HAVE_CONFIG_H ! # ifdef __APPLE_CC__ /* Assuming compiling for MacOS X */ /* Trying to take advantage of the prebinding */ ! # define HAVE_TGETENT ! # define OSPEED_EXTERN ! # define UP_BC_PC_EXTERN ! # endif #endif /* Some "prep work" definition to be able to compile the MacOS X *************** *** 361,385 **** */ #ifdef MACOS_X_UNIX - # define RETSIGTYPE void - # define SIGRETURN return # define SIGPROTOARG (int) # define SIGDEFARG(s) (s) int s; # define SIGDUMMYARG 0 - /*# define USE_SYSTEM */ /* Output ship do debugger :(, but ot compile */ - # define HAVE_SYS_WAIT_H 1 /* Attempt */ - # define HAVE_TERMIOS_H 1 - # define SYS_SELECT_WITH_SYS_TIME 1 - # define HAVE_SELECT 1 - # define HAVE_SYS_SELECT_H 1 # undef HAVE_AVAIL_MEM ! # define HAVE_PUTENV ! # define HAVE_SETENV ! # define HAVE_RENAME # define mch_chdir(s) chdir(s) #endif ! #ifdef MACOS_X # define HAVE_PUTENV #endif --- 367,393 ---- */ #ifdef MACOS_X_UNIX # define SIGPROTOARG (int) # define SIGDEFARG(s) (s) int s; # define SIGDUMMYARG 0 # undef HAVE_AVAIL_MEM ! # ifndef HAVE_CONFIG_H ! # define RETSIGTYPE void ! # define SIGRETURN return ! /*# define USE_SYSTEM */ /* Output ship do debugger :(, but ot compile */ ! # define HAVE_SYS_WAIT_H 1 /* Attempt */ ! # define HAVE_TERMIOS_H 1 ! # define SYS_SELECT_WITH_SYS_TIME 1 ! # define HAVE_SELECT 1 ! # define HAVE_SYS_SELECT_H 1 ! # define HAVE_PUTENV ! # define HAVE_SETENV ! # define HAVE_RENAME ! # endif # define mch_chdir(s) chdir(s) #endif ! #if defined(MACOS_X) && !defined(HAVE_CONFIG_H) # define HAVE_PUTENV #endif *** ../vim-6.2.117/src/os_macosx.c Sun May 11 17:26:37 2003 --- src/os_macosx.c Sun Sep 7 21:45:56 2003 *************** *** 13,19 **** */ #ifdef MACOS_X_UNIX ! # include "os_unix.c" #else # include "os_mac.c" # include --- 13,19 ---- */ #ifdef MACOS_X_UNIX ! # include "vim.h" #else # include "os_mac.c" # include *** ../vim-6.2.117/src/proto/gui_mac.pro Sat Jul 26 21:25:27 2003 --- src/proto/gui_mac.pro Sun Sep 7 23:42:13 2003 *************** *** 135,138 **** --- 135,142 ---- void gui_mac_doMouseMovedEvent __ARGS((EventRecord *event)); void gui_mac_doMouseUpEvent __ARGS((EventRecord *theEvent)); + int C2PascalString (char_u *CString, Str255 *PascalString); + int GetFSSpecFromPath ( char_u *file, FSSpec *fileFSSpec); + char_u *FullPathFromFSSpec_save (FSSpec file); + /* vim: set ft=c : */ *** ../vim-6.2.117/src/proto/os_mac.pro Sun Sep 16 20:33:15 2001 --- src/proto/os_mac.pro Sun Sep 7 23:42:47 2003 *************** *** 45,55 **** int mch_has_exp_wildcard __ARGS((char_u *p)); void slash_n_colon_adjust __ARGS((char_u *buf)); - char_u *FullPathFromFSSpec_save (FSSpec file); int mch_copy_file(char_u *from, char_u *to); - int C2PascalString (char_u *CString, Str255 *PascalString); - int GetFSSpecFromPath ( char_u *file, FSSpec *fileFSSpec); int mch_has_resource_fork (char_u *file); int mch_copy_file_attribute(char_u *from, char_u *to); --- 45,52 ---- *** ../vim-6.2.117/src/infplist.xml Mon Oct 13 22:09:37 2003 --- src/infplist.xml Thu Aug 14 13:36:03 2003 *************** *** 0 **** --- 1,51 ---- + + + + + + + CFBundleInfoDictionaryVersion + 6.0 + + CFBundleExecutable + APP_EXE + CFBundleName + APP_NAME + CFBundlePackageType + APPL + CFBundleVersion + APP_VER + CFBundleShortVersionString + APP_VER + CFBundleSignature + VIM! + + CFBundleDevelopmentRegion + English + CSResourcesFileMapped + + CFBundleIconFile + ICON_APP + + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + * + + CFBundleTypeIconFile + doc-txt.icns + CFBundleTypeName + NSStringPboardType + CFBundleTypeOSTypes + + **** + + CFBundleTypeRole + Editor + + + + + *** ../vim-6.2.117/src/vim.h Sun Oct 12 17:25:14 2003 --- src/vim.h Sun Oct 12 21:10:15 2003 *************** *** 63,70 **** # define MACOS_CLASSIC #endif #if defined(MACOS_X_UNIX) ! # define MACOS_X # define UNIX #endif #if defined(MACOS_X) || defined(MACOS_CLASSIC) # define MACOS --- 63,72 ---- # define MACOS_CLASSIC #endif #if defined(MACOS_X_UNIX) ! # define MACOS_X ! # ifndef HAVE_CONFIG_H # define UNIX + # endif #endif #if defined(MACOS_X) || defined(MACOS_CLASSIC) # define MACOS *************** *** 187,193 **** # define __ARGS(x) x #endif ! #if (defined(UNIX) || defined(__EMX__) || defined(VMS)) && !defined(MACOS_X) # include "os_unix.h" /* bring lots of system header files */ #endif --- 189,196 ---- # define __ARGS(x) x #endif ! #if (defined(UNIX) || defined(__EMX__) || defined(VMS)) \ ! && (!defined(MACOS_X) || defined(HAVE_CONFIG_H)) # include "os_unix.h" /* bring lots of system header files */ #endif *** ../vim-6.2.117/src/version.c Sun Oct 12 20:20:38 2003 --- src/version.c Mon Oct 13 22:08:37 2003 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 118, /**/ -- hundred-and-one symptoms of being an internet addict: 197. Your desk collapses under the weight of your computer peripherals. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///