From 56677611c46b8274582de8dc04fe2f1a0e5034b3 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 3 Dec 2014 08:59:35 +0100 Subject: [PATCH] Vim: create settings folder if it doesn't exists. Patch by GCI2014 student Ezo. Thanks! --- .../{vim-7.4.patch => vim-7.4.patchset} | 1014 ++++++++++------- app-editors/vim/vim-7.4.recipe | 6 +- 2 files changed, 586 insertions(+), 434 deletions(-) rename app-editors/vim/patches/{vim-7.4.patch => vim-7.4.patchset} (94%) diff --git a/app-editors/vim/patches/vim-7.4.patch b/app-editors/vim/patches/vim-7.4.patchset similarity index 94% rename from app-editors/vim/patches/vim-7.4.patch rename to app-editors/vim/patches/vim-7.4.patchset index df7878609..bda8e5604 100644 --- a/app-editors/vim/patches/vim-7.4.patch +++ b/app-editors/vim/patches/vim-7.4.patchset @@ -1,7 +1,14 @@ -diff -Naur vim74/runtime/doc/eval.txt vim74.haiku/runtime/doc/eval.txt ---- vim74/runtime/doc/eval.txt 2013-08-10 13:24:53.048234496 +0200 -+++ vim74.haiku/runtime/doc/eval.txt 2013-09-08 11:28:37.017825792 +0200 -@@ -6393,12 +6393,14 @@ +From 2c8c98e880f988ed0326732d2dac27540ae7985b Mon Sep 17 00:00:00 2001 +From: Ezodev +Date: Tue, 2 Dec 2014 15:56:43 +0000 +Subject: applying patch vim-7.4.patch + + +diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt +index 743aec1..edfb508 100644 +--- a/runtime/doc/eval.txt ++++ b/runtime/doc/eval.txt +@@ -6393,12 +6393,14 @@ gui_athena Compiled with Athena GUI. gui_gnome Compiled with Gnome support (gui_gtk is also defined). gui_gtk Compiled with GTK+ GUI (any version). gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined). @@ -16,10 +23,11 @@ diff -Naur vim74/runtime/doc/eval.txt vim74.haiku/runtime/doc/eval.txt hangul_input Compiled with Hangul input support. |hangul| iconv Can use iconv() for conversion. insert_expand Compiled with support for CTRL-X expansion commands in -diff -Naur vim74/runtime/doc/gui.txt vim74.haiku/runtime/doc/gui.txt ---- vim74/runtime/doc/gui.txt 2013-08-10 13:24:53.060555264 +0200 -+++ vim74.haiku/runtime/doc/gui.txt 2013-09-08 11:29:11.019660800 +0200 -@@ -100,6 +100,7 @@ +diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt +index 1ae5495..0b25a91 100644 +--- a/runtime/doc/gui.txt ++++ b/runtime/doc/gui.txt +@@ -100,6 +100,7 @@ Recommended place for your personal GUI initializations: or $VIM/_gvimrc Amiga s:.gvimrc, home:.gvimrc, home:vimfiles:gvimrc or $VIM/.gvimrc @@ -27,10 +35,11 @@ diff -Naur vim74/runtime/doc/gui.txt vim74.haiku/runtime/doc/gui.txt The personal initialization files are searched in the order specified above and only the first one that is found is read. -diff -Naur vim74/runtime/doc/help.txt vim74.haiku/runtime/doc/help.txt ---- vim74/runtime/doc/help.txt 2013-08-10 13:24:54.061865984 +0200 -+++ vim74.haiku/runtime/doc/help.txt 2013-09-11 21:13:58.739246080 +0200 -@@ -189,6 +189,7 @@ +diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt +index f13a529..c0db658 100644 +--- a/runtime/doc/help.txt ++++ b/runtime/doc/help.txt +@@ -189,6 +189,7 @@ Remarks about specific systems ~ |os_os2.txt| OS/2 |os_qnx.txt| QNX |os_risc.txt| RISC-OS @@ -38,10 +47,11 @@ diff -Naur vim74/runtime/doc/help.txt vim74.haiku/runtime/doc/help.txt |os_unix.txt| Unix |os_vms.txt| VMS |os_win32.txt| MS-Windows 95/98/NT -diff -Naur vim74/runtime/doc/options.txt vim74.haiku/runtime/doc/options.txt ---- vim74/runtime/doc/options.txt 2013-08-10 13:24:57.058720256 +0200 -+++ vim74.haiku/runtime/doc/options.txt 2013-09-08 11:39:09.024641536 +0200 -@@ -3645,7 +3645,7 @@ +diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt +index fdc5ad2..c96335e 100644 +--- a/runtime/doc/options.txt ++++ b/runtime/doc/options.txt +@@ -3645,7 +3645,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'guitablabel' can be used to change the text in the labels. When 'e' is missing a non-GUI tab pages line may be used. The GUI tabs are only supported on some systems, currently @@ -50,7 +60,7 @@ diff -Naur vim74/runtime/doc/options.txt vim74.haiku/runtime/doc/options.txt *'go-f'* 'f' Foreground: Don't use fork() to detach the GUI from the shell where it was started. Use this for programs that wait for the -@@ -5747,7 +5747,12 @@ +@@ -5747,7 +5747,12 @@ A jump table for the options with a short description can be found at |Q_op|. $VIM/vimfiles, $VIMRUNTIME, $VIM/vimfiles/after, @@ -64,7 +74,7 @@ diff -Naur vim74/runtime/doc/options.txt vim74.haiku/runtime/doc/options.txt global {not in Vi} This is a list of directories which will be searched for runtime -@@ -7132,6 +7137,7 @@ +@@ -7132,6 +7137,7 @@ A jump table for the options with a short description can be found at |Q_op|. on MiNT: "vt52" on MS-DOS: "pcterm" on OS/2: "os2ansi" @@ -72,9 +82,11 @@ diff -Naur vim74/runtime/doc/options.txt vim74.haiku/runtime/doc/options.txt on Unix: "ansi" on VMS: "ansi" on Win 32: "win32") -diff -Naur vim74/runtime/doc/os_haiku.txt vim74.haiku/runtime/doc/os_haiku.txt ---- vim74/runtime/doc/os_haiku.txt 1970-01-01 01:00:00.000000000 +0100 -+++ vim74.haiku/runtime/doc/os_haiku.txt 2013-09-14 16:46:11.293863424 +0200 +diff --git a/runtime/doc/os_haiku.txt b/runtime/doc/os_haiku.txt +new file mode 100644 +index 0000000..b95e13d +--- /dev/null ++++ b/runtime/doc/os_haiku.txt @@ -0,0 +1,223 @@ +*os_haiku.txt* For Vim version 7.4. Last change: 2013 Sep 12 + @@ -299,10 +311,11 @@ diff -Naur vim74/runtime/doc/os_haiku.txt vim74.haiku/runtime/doc/os_haiku.txt + + + vim:tw=78:ts=8:ft=help:norl: -diff -Naur vim74/runtime/doc/starting.txt vim74.haiku/runtime/doc/starting.txt ---- vim74/runtime/doc/starting.txt 2013-08-10 13:25:01.048758784 +0200 -+++ vim74.haiku/runtime/doc/starting.txt 2013-09-08 11:22:58.029622272 +0200 -@@ -765,6 +765,7 @@ +diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt +index 47ad05f..39ceb6a 100644 +--- a/runtime/doc/starting.txt ++++ b/runtime/doc/starting.txt +@@ -765,6 +765,7 @@ accordingly. Vim proceeds in this order: or $VIM/_vimrc Amiga s:.vimrc, home:.vimrc, home:vimfiles:vimrc or $VIM/.vimrc @@ -310,7 +323,7 @@ diff -Naur vim74/runtime/doc/starting.txt vim74.haiku/runtime/doc/starting.txt The files are searched in the order specified above and only the first one that is found is read. -@@ -811,6 +812,7 @@ +@@ -811,6 +812,7 @@ accordingly. Vim proceeds in this order: "$HOME/_vimrc" (for MS-DOS and Win32) (*) "$HOME/vimfiles/vimrc" (for MS-DOS and Win32) (*) "$VIM/_vimrc" (for MS-DOS and Win32) (*) @@ -318,7 +331,7 @@ diff -Naur vim74/runtime/doc/starting.txt vim74.haiku/runtime/doc/starting.txt Note: For Unix, OS/2 and Amiga, when ".vimrc" does not exist, "_vimrc" is also tried, in case an MS-DOS compatible file system is used. For MS-DOS and Win32 ".vimrc" is checked -@@ -901,6 +903,7 @@ +@@ -901,6 +903,7 @@ sessions. Put it in a place so that it will be found by 3b: ~/.vimrc (Unix and OS/2) s:.vimrc (Amiga) $VIM\_vimrc (MS-DOS and Win32) @@ -326,10 +339,11 @@ diff -Naur vim74/runtime/doc/starting.txt vim74.haiku/runtime/doc/starting.txt Note that creating a vimrc file will cause the 'compatible' option to be off by default. See |compatible-default|. -diff -Naur vim74/runtime/doc/tags vim74.haiku/runtime/doc/tags ---- vim74/runtime/doc/tags 2013-08-10 14:23:34.050855936 +0200 -+++ vim74.haiku/runtime/doc/tags 2013-09-15 14:09:20.988545024 +0200 -@@ -4353,6 +4353,7 @@ +diff --git a/runtime/doc/tags b/runtime/doc/tags +index b7e16df..666f140 100644 +--- a/runtime/doc/tags ++++ b/runtime/doc/tags +@@ -4353,6 +4353,7 @@ GetLatestVimScripts-copyright pi_getscript.txt /*GetLatestVimScripts-copyright* GetLatestVimScripts_dat pi_getscript.txt /*GetLatestVimScripts_dat* Gnome gui_x11.txt /*Gnome* H motion.txt /*H* @@ -337,7 +351,7 @@ diff -Naur vim74/runtime/doc/tags vim74.haiku/runtime/doc/tags I insert.txt /*I* ICCF uganda.txt /*ICCF* IM-server mbyte.txt /*IM-server* -@@ -6245,6 +6246,20 @@ +@@ -6245,6 +6246,20 @@ g~ change.txt /*g~* g~g~ change.txt /*g~g~* g~~ change.txt /*g~~* h motion.txt /*h* @@ -358,7 +372,7 @@ diff -Naur vim74/runtime/doc/tags vim74.haiku/runtime/doc/tags hangul hangulin.txt /*hangul* hangulin.txt hangulin.txt /*hangulin.txt* has() eval.txt /*has()* -@@ -7244,6 +7259,7 @@ +@@ -7244,6 +7259,7 @@ os_390.txt os_390.txt /*os_390.txt* os_amiga.txt os_amiga.txt /*os_amiga.txt* os_beos.txt os_beos.txt /*os_beos.txt* os_dos.txt os_dos.txt /*os_dos.txt* @@ -366,10 +380,11 @@ diff -Naur vim74/runtime/doc/tags vim74.haiku/runtime/doc/tags os_mac.txt os_mac.txt /*os_mac.txt* os_mint.txt os_mint.txt /*os_mint.txt* os_msdos.txt os_msdos.txt /*os_msdos.txt* -diff -Naur vim74/runtime/doc/vi_diff.txt vim74.haiku/runtime/doc/vi_diff.txt ---- vim74/runtime/doc/vi_diff.txt 2013-08-10 13:25:07.057933824 +0200 -+++ vim74.haiku/runtime/doc/vi_diff.txt 2013-09-08 11:23:54.040370176 +0200 -@@ -140,6 +140,7 @@ +diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt +index f35cc02..85c14eb 100644 +--- a/runtime/doc/vi_diff.txt ++++ b/runtime/doc/vi_diff.txt +@@ -140,6 +140,7 @@ Support for different systems. - Atari MiNT - VMS - BeOS @@ -377,7 +392,7 @@ diff -Naur vim74/runtime/doc/vi_diff.txt vim74.haiku/runtime/doc/vi_diff.txt - Macintosh - Risc OS - IBM OS/390 -@@ -164,7 +165,7 @@ +@@ -164,7 +165,7 @@ Graphical User Interface (GUI). |gui| define your own menus. Better support for CTRL/SHIFT/ALT keys in combination with special keys and mouse. Supported for various platforms, such as X11 (with Motif and Athena interfaces), GTK, Win32 @@ -386,9 +401,10 @@ diff -Naur vim74/runtime/doc/vi_diff.txt vim74.haiku/runtime/doc/vi_diff.txt Multiple windows and buffers. |windows.txt| Vim can split the screen into several windows, each editing a -diff -Naur vim74/runtime/gvimrc_example.vim vim74.haiku/runtime/gvimrc_example.vim ---- vim74/runtime/gvimrc_example.vim 2010-05-15 13:03:31.015204352 +0200 -+++ vim74.haiku/runtime/gvimrc_example.vim 2013-09-08 11:35:38.065273856 +0200 +diff --git a/runtime/gvimrc_example.vim b/runtime/gvimrc_example.vim +index 5a5197e..e7e2538 100644 +--- a/runtime/gvimrc_example.vim ++++ b/runtime/gvimrc_example.vim @@ -9,6 +9,7 @@ " for Amiga: s:.gvimrc " for MS-DOS and Win32: $VIM\_gvimrc @@ -397,9 +413,10 @@ diff -Naur vim74/runtime/gvimrc_example.vim vim74.haiku/runtime/gvimrc_example.v " Make external commands work through a pipe instead of a pseudo-tty "set noguipty -diff -Naur vim74/runtime/vimrc_example.vim vim74.haiku/runtime/vimrc_example.vim ---- vim74/runtime/vimrc_example.vim 2011-04-15 20:58:36.034865152 +0200 -+++ vim74.haiku/runtime/vimrc_example.vim 2013-09-08 11:36:00.007864320 +0200 +diff --git a/runtime/vimrc_example.vim b/runtime/vimrc_example.vim +index 3e9b56f..7a99cf5 100644 +--- a/runtime/vimrc_example.vim ++++ b/runtime/vimrc_example.vim @@ -8,6 +8,7 @@ " for Amiga: s:.vimrc " for MS-DOS and Win32: $VIM\_vimrc @@ -408,10 +425,122 @@ diff -Naur vim74/runtime/vimrc_example.vim vim74.haiku/runtime/vimrc_example.vim " When started as "evim", evim.vim will already have done these settings. if v:progname =~? "evim" -diff -Naur vim74/src/configure.in vim74.haiku/src/configure.in ---- vim74/src/configure.in 2013-08-04 20:00:50.049020928 +0200 -+++ vim74.haiku/src/configure.in 2013-09-11 21:19:56.428343296 +0200 -@@ -87,6 +87,12 @@ +diff --git a/src/Makefile b/src/Makefile +index c830378..d0ac8fa 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -1289,6 +1289,23 @@ CARBONGUI_BUNDLE = gui_bundle + APPDIR = $(VIMNAME).app + CARBONGUI_TESTARG = VIMPROG=../$(APPDIR)/Contents/MacOS/$(VIMTARGET) + ++### Haiku GUI ++HAIKUGUI_SRC = gui.c gui_haiku.cc pty.c ++HAIKUGUI_OBJ = objects/gui.o objects/gui_haiku.o objects/pty.o ++HAIKUGUI_DEFS = -DFEAT_GUI_HAIKU ++HAIKUGUI_IPATH = ++HAIKUGUI_LIBS_DIR = ++HAIKUGUI_LIBS1 = -lbe -lroot -ltracker -ltranslation ++ifeq ($(strip $(word 1, $(subst -, , $(subst ., , $(shell $(CC) -dumpversion))))), 4) ++HAIKUGUI_LIBS1 += -lsupc++ ++endif ++HAIKUGUI_LIBS2 = ++HAIKUGUI_INSTALL = install_normal install_haiku_extra ++HAIKUGUI_TARGETS = installglinks_haiku ++HAIKUGUI_MAN_TARGETS = ++HAIKUGUI_TESTTARGET = gui ++HAIKUGUI_BUNDLE = ++ + # All GUI files + ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.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_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w16.pro gui_w32.pro gui_photon.pro +@@ -2559,6 +2576,9 @@ objects/gui_gtk_f.o: gui_gtk_f.c + objects/gui_gtk_x11.o: gui_gtk_x11.c + $(CCC) -o $@ gui_gtk_x11.c + ++objects/gui_haiku.o: gui_haiku.cc ++ $(CCC) -o $@ gui_haiku.cc ++ + objects/gui_motif.o: gui_motif.c + $(CCC) -o $@ gui_motif.c + +@@ -2669,6 +2689,9 @@ objects/option.o: option.c + objects/os_beos.o: os_beos.c + $(CCC) -o $@ os_beos.c + ++objects/os_haiku.rsrc: os_haiku.rdef ++ cat $< | $(CCC) -E - | grep -v '^#' | rc -o "$@" - ++ + objects/os_qnx.o: os_qnx.c + $(CCC) -o $@ os_qnx.c + +@@ -2828,6 +2851,62 @@ $(APPDIR)/Contents: + + + ############################################################################### ++### ++### Haiku installation ++### ++### This rule: ++### - add resources to already installed vim binary to avoid stripping ++### them during install; ++### - copy rgb.txt to runtime directory; ++### - update system MIME database with info about vim application. ++### ++install_haiku_extra: $(DEST_BIN)/$(VIMTARGET) objects/os_haiku.rsrc ++ xres -o $(DEST_BIN)/$(VIMTARGET) objects/os_haiku.rsrc ++ $(INSTALL_DATA) $(SCRIPTSOURCE)/rgb.txt $(DEST_RT) ++ mimeset $(DEST_BIN)/$(VIMTARGET) ++ ++### ++### List of g*-links that should be replaced with shell script equivalents. ++### This solves the problem of them from Tracker. ++### ++HAIKU_GLINKS = $(DEST_BIN)/$(GVIMTARGET) \ ++ $(DEST_BIN)/$(GVIEWTARGET) \ ++ $(DEST_BIN)/$(GVIMDIFFTARGET) \ ++ $(DEST_BIN)/$(RGVIMTARGET) \ ++ $(DEST_BIN)/$(RGVIEWTARGET) ++### ++### This rule: ++### - Replace gvim link with copy of vim binary. ++### - Replace g*-links with shell script equivalents to solve the problem ++### of calling them from Tracker, ++### - Add icon resources to mentioned g*-link shell scripts ++### - in case gui-less vim.con executable available use it. ++### ++installglinks_haiku: $(HAIKU_GLINKS) install_haiku_extra ++ @catattr -r "BEOS:ICON" $(DEST_BIN)/$(GVIMTARGET) > ~icon.attr ++ for i in $(HAIKU_GLINKS); do \ ++ rm $$i ; \ ++ echo "#!/bin/sh" > $$i ; \ ++ case $$i in \ ++ $(DEST_BIN)/$(GVIMTARGET)) \ ++ cp $(DEST_BIN)/$(VIMTARGET) $$i ; \ ++ if [ -f $(VIMTARGET).con ] ; then \ ++ $(STRIP) $(VIMTARGET).con ; \ ++ mv $(VIMTARGET).con $(DEST_BIN)/$(VIMTARGET) ; \ ++ fi ;; \ ++ $(DEST_BIN)/$(GVIEWTARGET)) printf "%s -R %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ ++ $(DEST_BIN)/$(GVIMDIFFTARGET)) printf "%s -d %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ ++ $(DEST_BIN)/$(RGVIMTARGET)) printf "%s -Z %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ ++ $(DEST_BIN)/$(RGVIEWTARGET)) printf "%s -Z -R %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ ++ *) printf "%s %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ ++ esac ; \ ++ chmod $(BINMOD) $$i ; \ ++ addattr -f ~icon.attr -t \'VICN\' BEOS:ICON $$i ; \ ++ done ++ addattr -f ~icon.attr -t \'VICN\' BEOS:ICON $(DEST_BIN)/$(VIMNAME)tutor ++ @rm ~icon.attr ++ ++############################################################################### + ### (automatically generated by 'make depend') + ### Dependencies: + objects/blowfish.o: blowfish.c vim.h auto/config.h feature.h os_unix.h \ +diff --git a/src/configure.in b/src/configure.in +index ed30bed..55a72be 100644 +--- a/src/configure.in ++++ b/src/configure.in +@@ -87,6 +87,12 @@ case `uname` in *) BEOS=no; AC_MSG_RESULT(no);; esac @@ -424,7 +553,7 @@ diff -Naur vim74/src/configure.in vim74.haiku/src/configure.in dnl If QNX is found, assume we don't want to use Xphoton dnl unless it was specifically asked for (--with-x) AC_MSG_CHECKING(for QNX) -@@ -1754,7 +1760,11 @@ +@@ -1754,7 +1760,11 @@ AC_ARG_ENABLE(netbeans, if test "$enable_netbeans" = "yes"; then AC_MSG_RESULT(no) dnl On Solaris we need the socket and nsl library. @@ -437,7 +566,7 @@ diff -Naur vim74/src/configure.in vim74.haiku/src/configure.in AC_CHECK_LIB(nsl, gethostbyname) AC_MSG_CHECKING(whether compiling netbeans integration is possible) AC_TRY_LINK([ -@@ -1967,11 +1977,11 @@ +@@ -1967,11 +1977,11 @@ else fi fi @@ -451,7 +580,7 @@ diff -Naur vim74/src/configure.in vim74.haiku/src/configure.in dnl Canonicalize the --enable-gui= argument so that it can be easily compared. dnl Do not use character classes for portability with old tools. -@@ -1985,10 +1995,23 @@ +@@ -1985,10 +1995,23 @@ SKIP_MOTIF=YES SKIP_ATHENA=YES SKIP_NEXTAW=YES SKIP_PHOTON=YES @@ -476,7 +605,7 @@ diff -Naur vim74/src/configure.in vim74.haiku/src/configure.in SKIP_PHOTON= case "$enable_gui_canon" in no) AC_MSG_RESULT(no GUI support) -@@ -2139,6 +2162,7 @@ +@@ -2139,6 +2162,7 @@ if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then SKIP_ATHENA=YES; SKIP_NEXTAW=YES; SKIP_PHOTON=YES; @@ -484,7 +613,7 @@ diff -Naur vim74/src/configure.in vim74.haiku/src/configure.in SKIP_CARBON=YES fi -@@ -2639,6 +2663,11 @@ +@@ -2639,6 +2663,11 @@ if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then enable_fontset="no" fi @@ -496,10 +625,11 @@ diff -Naur vim74/src/configure.in vim74.haiku/src/configure.in if test -z "$SKIP_PHOTON"; then GUITYPE=PHOTONGUI fi -diff -Naur vim74/src/eval.c vim74.haiku/src/eval.c ---- vim74/src/eval.c 2013-07-05 18:23:42.010223616 +0200 -+++ vim74.haiku/src/eval.c 2013-09-08 11:56:22.021233664 +0200 -@@ -12099,6 +12099,9 @@ +diff --git a/src/eval.c b/src/eval.c +index b9d739d..824f074 100644 +--- a/src/eval.c ++++ b/src/eval.c +@@ -12099,6 +12099,9 @@ f_has(argvars, rettv) "dos16", # endif #endif @@ -509,7 +639,7 @@ diff -Naur vim74/src/eval.c vim74.haiku/src/eval.c #ifdef MACOS "mac", #endif -@@ -12266,6 +12269,9 @@ +@@ -12266,6 +12269,9 @@ f_has(argvars, rettv) #ifdef FEAT_GUI_GNOME "gui_gnome", #endif @@ -519,10 +649,11 @@ diff -Naur vim74/src/eval.c vim74.haiku/src/eval.c #ifdef FEAT_GUI_MAC "gui_mac", #endif -diff -Naur vim74/src/ex_docmd.c vim74.haiku/src/ex_docmd.c ---- vim74/src/ex_docmd.c 2013-07-24 15:09:37.032768000 +0200 -+++ vim74.haiku/src/ex_docmd.c 2013-09-08 11:55:05.022806528 +0200 -@@ -7051,6 +7051,7 @@ +diff --git a/src/ex_docmd.c b/src/ex_docmd.c +index 24f80fb..119b8b8 100644 +--- a/src/ex_docmd.c ++++ b/src/ex_docmd.c +@@ -7051,6 +7051,7 @@ ex_shell(eap) || (defined(FEAT_GUI_GTK) && defined(FEAT_DND)) \ || defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_MAC) \ @@ -530,9 +661,10 @@ diff -Naur vim74/src/ex_docmd.c vim74.haiku/src/ex_docmd.c || defined(PROTO) /* -diff -Naur vim74/src/feature.h vim74.haiku/src/feature.h ---- vim74/src/feature.h 2013-05-18 20:18:20.024117248 +0200 -+++ vim74.haiku/src/feature.h 2013-09-08 11:54:33.023855104 +0200 +diff --git a/src/feature.h b/src/feature.h +index d4b9aea..e3b36d8 100644 +--- a/src/feature.h ++++ b/src/feature.h @@ -657,6 +657,14 @@ /* #define FEAT_MBYTE_IME */ # endif @@ -576,7 +708,7 @@ diff -Naur vim74/src/feature.h vim74.haiku/src/feature.h # define FEAT_BROWSE # endif #endif -@@ -817,6 +827,7 @@ +@@ -817,6 +828,7 @@ && defined(HAVE_X11_XPM_H)) \ || defined(FEAT_GUI_GTK) \ || defined(FEAT_GUI_PHOTON) \ @@ -584,7 +716,7 @@ diff -Naur vim74/src/feature.h vim74.haiku/src/feature.h || defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_MAC) # define FEAT_CON_DIALOG -@@ -834,7 +845,8 @@ +@@ -834,7 +846,8 @@ #if defined(FEAT_GUI_DIALOG) && \ (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \ || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) \ @@ -594,9 +726,183 @@ diff -Naur vim74/src/feature.h vim74.haiku/src/feature.h # define FEAT_GUI_TEXTDIALOG # ifndef ALWAYS_USE_GUI # define FEAT_CON_DIALOG -diff -Naur vim74/src/gui_haiku.cc vim74.haiku/src/gui_haiku.cc ---- vim74/src/gui_haiku.cc 1970-01-01 01:00:00.000000000 +0100 -+++ vim74.haiku/src/gui_haiku.cc 2013-09-15 22:15:47.316145664 +0200 +diff --git a/src/gui.c b/src/gui.c +index b667ba3..358ee09 100644 +--- a/src/gui.c ++++ b/src/gui.c +@@ -426,7 +426,7 @@ gui_init_check() + gui.menu_width = 0; + # endif + #endif +-#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) ++#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_HAIKU)) + gui.toolbar_height = 0; + #endif + #if defined(FEAT_FOOTER) && defined(FEAT_GUI_MOTIF) +@@ -1336,10 +1336,10 @@ gui_position_components(total_width) + text_area_y += gui.tabline_height; + #endif + +-#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) ++#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_HAIKU)) + if (vim_strchr(p_go, GO_TOOLBAR) != NULL) + { +-# ifdef FEAT_GUI_ATHENA ++# if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_HAIKU) + gui_mch_set_toolbar_pos(0, text_area_y, + gui.menu_width, gui.toolbar_height); + # endif +@@ -1347,6 +1347,13 @@ gui_position_components(total_width) + } + #endif + ++# if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_HAIKU)) ++ gui_mch_set_tabline_pos(0, text_area_y, ++ gui.menu_width, gui.tabline_height); ++ if (gui_has_tabline()) ++ text_area_y += gui.tabline_height; ++#endif ++ + text_area_width = gui.num_cols * gui.char_width + gui.border_offset * 2; + text_area_height = gui.num_rows * gui.char_height + gui.border_offset * 2; + +@@ -1418,7 +1425,7 @@ gui_get_base_height() + # endif + # endif + # if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \ +- || defined(FEAT_GUI_MOTIF)) ++ || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_HAIKU)) + if (gui_has_tabline()) + base_height += gui.tabline_height; + # endif +@@ -1461,6 +1468,10 @@ gui_resize_shell(pixel_width, pixel_height) + again: + busy = TRUE; + ++#ifdef FEAT_GUI_HAIKU ++ vim_lock_screen(); ++#endif ++ + /* Flush pending output before redrawing */ + out_flush(); + +@@ -1483,6 +1494,10 @@ again: + || gui.num_rows != Rows || gui.num_cols != Columns) + shell_resized(); + ++#ifdef FEAT_GUI_HAIKU ++ vim_unlock_screen(); ++#endif ++ + gui_update_scrollbars(TRUE); + gui_update_cursor(FALSE, TRUE); + #if defined(FEAT_XIM) && !defined(FEAT_GUI_GTK) +@@ -4238,9 +4253,9 @@ gui_update_scrollbars(force) + y += gui.menu_height; + #endif + +-#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_ATHENA)) ++#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_HAIKU)) + if (vim_strchr(p_go, GO_TOOLBAR) != NULL) +-# ifdef FEAT_GUI_ATHENA ++# if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_HAIKU) + y += gui.toolbar_height; + # else + # ifdef FEAT_GUI_MSWIN +@@ -4249,7 +4264,7 @@ gui_update_scrollbars(force) + # endif + #endif + +-#if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_MSWIN) ++#if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_HAIKU)) + if (gui_has_tabline()) + y += gui.tabline_height; + #endif +@@ -4994,9 +5009,10 @@ ex_gui(eap) + } + + #if ((defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32) \ +- || defined(FEAT_GUI_PHOTON)) && defined(FEAT_TOOLBAR)) || defined(PROTO) ++ || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_HAIKU)) \ ++ && defined(FEAT_TOOLBAR)) || defined(PROTO) + /* +- * This is shared between Athena, Motif and GTK. ++ * This is shared between Athena, Haiku, Motif and GTK. + */ + static void gfp_setname __ARGS((char_u *fname, void *cookie)); + +diff --git a/src/gui.h b/src/gui.h +index 89476c9..7d9336b 100644 +--- a/src/gui.h ++++ b/src/gui.h +@@ -33,6 +33,10 @@ + # include + #endif + ++#ifdef FEAT_GUI_HAIKU ++# include "gui_haiku.h" ++#endif ++ + #ifdef FEAT_GUI_MAC + # include + /*# include */ +@@ -70,7 +74,7 @@ + * GUIs that support dropping files on a running Vim. + */ + #if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MAC) \ +- || defined(FEAT_GUI_GTK) ++ || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_GTK) + # define HAVE_DROP_FILE + #endif + +@@ -203,6 +207,9 @@ typedef struct GuiScrollbar + scroll_shift is set to the number of shifts + to reduce the count. */ + #endif ++#if FEAT_GUI_HAIKU ++ VimScrollBar *id; /* Pointer to real scroll bar */ ++#endif + #ifdef FEAT_GUI_MAC + ControlHandle id; /* A handle to the scrollbar */ + #endif +@@ -403,7 +410,7 @@ typedef struct Gui + + #if defined(FEAT_GUI_TABLINE) \ + && (defined(FEAT_GUI_W32) || defined(FEAT_GUI_MOTIF) \ +- || defined(FEAT_GUI_MAC)) ++ || defined(FEAT_GUI_MAC) || defined(FEAT_GUI_HAIKU)) + int tabline_height; + #endif + +@@ -412,7 +419,7 @@ typedef struct Gui + #endif + + #if defined(FEAT_TOOLBAR) \ +- && (defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF)) ++ && (defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_HAIKU)) + int toolbar_height; /* height of the toolbar */ + #endif + +@@ -433,6 +440,14 @@ typedef struct Gui + guicolor_T currSpColor; /* Current special text color */ + #endif + ++#ifdef FEAT_GUI_HAIKU ++ VimApp *vimApp; ++ VimWindow *vimWindow; ++ VimFormView *vimForm; ++ VimTextAreaView *vimTextArea; ++ int vdcmp; /* Vim Direct Communication Message Port */ ++#endif ++ + #ifdef FEAT_GUI_MAC + WindowPtr VimWindow; + MenuHandle MacOSHelpMenu; /* Help menu provided by the MacOS */ +diff --git a/src/gui_haiku.cc b/src/gui_haiku.cc +new file mode 100644 +index 0000000..d86ea61 +--- /dev/null ++++ b/src/gui_haiku.cc @@ -0,0 +1,5252 @@ +/* vi:set ts=8 sts=4 sw=4: + * @@ -5850,9 +6156,11 @@ diff -Naur vim74/src/gui_haiku.cc vim74.haiku/src/gui_haiku.cc +} + +#endif //FEAT_GUI_TABLINE -diff -Naur vim74/src/gui_haiku.h vim74.haiku/src/gui_haiku.h ---- vim74/src/gui_haiku.h 1970-01-01 01:00:00.000000000 +0100 -+++ vim74.haiku/src/gui_haiku.h 2013-09-08 11:04:33.028311552 +0200 +diff --git a/src/gui_haiku.h b/src/gui_haiku.h +new file mode 100644 +index 0000000..414d127 +--- /dev/null ++++ b/src/gui_haiku.h @@ -0,0 +1,51 @@ +/* vi:set ts=8 sts=4 sw=4: + * @@ -5905,289 +6213,10 @@ diff -Naur vim74/src/gui_haiku.h vim74.haiku/src/gui_haiku.h +typedef struct VimScrollBar VimScrollBar; + +#endif -diff -Naur vim74/src/gui.c vim74.haiku/src/gui.c ---- vim74/src/gui.c 2013-06-30 17:41:48.054525952 +0200 -+++ vim74.haiku/src/gui.c 2013-09-08 13:53:34.025952256 +0200 -@@ -426,7 +426,7 @@ - gui.menu_width = 0; - # endif - #endif --#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) -+#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_HAIKU)) - gui.toolbar_height = 0; - #endif - #if defined(FEAT_FOOTER) && defined(FEAT_GUI_MOTIF) -@@ -1336,10 +1336,10 @@ - text_area_y += gui.tabline_height; - #endif - --#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) -+#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_HAIKU)) - if (vim_strchr(p_go, GO_TOOLBAR) != NULL) - { --# ifdef FEAT_GUI_ATHENA -+# if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_HAIKU) - gui_mch_set_toolbar_pos(0, text_area_y, - gui.menu_width, gui.toolbar_height); - # endif -@@ -1347,6 +1347,13 @@ - } - #endif - -+# if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_HAIKU)) -+ gui_mch_set_tabline_pos(0, text_area_y, -+ gui.menu_width, gui.tabline_height); -+ if (gui_has_tabline()) -+ text_area_y += gui.tabline_height; -+#endif -+ - text_area_width = gui.num_cols * gui.char_width + gui.border_offset * 2; - text_area_height = gui.num_rows * gui.char_height + gui.border_offset * 2; - -@@ -1418,7 +1425,7 @@ - # endif - # endif - # if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \ -- || defined(FEAT_GUI_MOTIF)) -+ || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_HAIKU)) - if (gui_has_tabline()) - base_height += gui.tabline_height; - # endif -@@ -1461,6 +1468,10 @@ - again: - busy = TRUE; - -+#ifdef FEAT_GUI_HAIKU -+ vim_lock_screen(); -+#endif -+ - /* Flush pending output before redrawing */ - out_flush(); - -@@ -1483,6 +1494,10 @@ - || gui.num_rows != Rows || gui.num_cols != Columns) - shell_resized(); - -+#ifdef FEAT_GUI_HAIKU -+ vim_unlock_screen(); -+#endif -+ - gui_update_scrollbars(TRUE); - gui_update_cursor(FALSE, TRUE); - #if defined(FEAT_XIM) && !defined(FEAT_GUI_GTK) -@@ -4238,9 +4253,9 @@ - y += gui.menu_height; - #endif - --#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_ATHENA)) -+#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_HAIKU)) - if (vim_strchr(p_go, GO_TOOLBAR) != NULL) --# ifdef FEAT_GUI_ATHENA -+# if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_HAIKU) - y += gui.toolbar_height; - # else - # ifdef FEAT_GUI_MSWIN -@@ -4249,7 +4264,7 @@ - # endif - #endif - --#if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_MSWIN) -+#if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_HAIKU)) - if (gui_has_tabline()) - y += gui.tabline_height; - #endif -@@ -4994,9 +5009,10 @@ - } - - #if ((defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32) \ -- || defined(FEAT_GUI_PHOTON)) && defined(FEAT_TOOLBAR)) || defined(PROTO) -+ || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_HAIKU)) \ -+ && defined(FEAT_TOOLBAR)) || defined(PROTO) - /* -- * This is shared between Athena, Motif and GTK. -+ * This is shared between Athena, Haiku, Motif and GTK. - */ - static void gfp_setname __ARGS((char_u *fname, void *cookie)); - -diff -Naur vim74/src/gui.h vim74.haiku/src/gui.h ---- vim74/src/gui.h 2013-06-17 22:22:49.066584576 +0200 -+++ vim74.haiku/src/gui.h 2013-09-08 11:12:43.025952256 +0200 -@@ -33,6 +33,10 @@ - # include - #endif - -+#ifdef FEAT_GUI_HAIKU -+# include "gui_haiku.h" -+#endif -+ - #ifdef FEAT_GUI_MAC - # include - /*# include */ -@@ -70,7 +74,7 @@ - * GUIs that support dropping files on a running Vim. - */ - #if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MAC) \ -- || defined(FEAT_GUI_GTK) -+ || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_GTK) - # define HAVE_DROP_FILE - #endif - -@@ -203,6 +207,9 @@ - scroll_shift is set to the number of shifts - to reduce the count. */ - #endif -+#if FEAT_GUI_HAIKU -+ VimScrollBar *id; /* Pointer to real scroll bar */ -+#endif - #ifdef FEAT_GUI_MAC - ControlHandle id; /* A handle to the scrollbar */ - #endif -@@ -403,7 +410,7 @@ - - #if defined(FEAT_GUI_TABLINE) \ - && (defined(FEAT_GUI_W32) || defined(FEAT_GUI_MOTIF) \ -- || defined(FEAT_GUI_MAC)) -+ || defined(FEAT_GUI_MAC) || defined(FEAT_GUI_HAIKU)) - int tabline_height; - #endif - -@@ -412,7 +419,7 @@ - #endif - - #if defined(FEAT_TOOLBAR) \ -- && (defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF)) -+ && (defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_HAIKU)) - int toolbar_height; /* height of the toolbar */ - #endif - -@@ -433,6 +440,14 @@ - guicolor_T currSpColor; /* Current special text color */ - #endif - -+#ifdef FEAT_GUI_HAIKU -+ VimApp *vimApp; -+ VimWindow *vimWindow; -+ VimFormView *vimForm; -+ VimTextAreaView *vimTextArea; -+ int vdcmp; /* Vim Direct Communication Message Port */ -+#endif -+ - #ifdef FEAT_GUI_MAC - WindowPtr VimWindow; - MenuHandle MacOSHelpMenu; /* Help menu provided by the MacOS */ -diff -Naur vim74/src/Makefile vim74.haiku/src/Makefile ---- vim74/src/Makefile 2013-08-10 14:21:15.034078720 +0200 -+++ vim74.haiku/src/Makefile 2013-09-12 20:30:02.171180032 +0200 -@@ -1289,6 +1289,23 @@ - APPDIR = $(VIMNAME).app - CARBONGUI_TESTARG = VIMPROG=../$(APPDIR)/Contents/MacOS/$(VIMTARGET) - -+### Haiku GUI -+HAIKUGUI_SRC = gui.c gui_haiku.cc pty.c -+HAIKUGUI_OBJ = objects/gui.o objects/gui_haiku.o objects/pty.o -+HAIKUGUI_DEFS = -DFEAT_GUI_HAIKU -+HAIKUGUI_IPATH = -+HAIKUGUI_LIBS_DIR = -+HAIKUGUI_LIBS1 = -lbe -lroot -ltracker -ltranslation -+ifeq ($(strip $(word 1, $(subst -, , $(subst ., , $(shell $(CC) -dumpversion))))), 4) -+HAIKUGUI_LIBS1 += -lsupc++ -+endif -+HAIKUGUI_LIBS2 = -+HAIKUGUI_INSTALL = install_normal install_haiku_extra -+HAIKUGUI_TARGETS = installglinks_haiku -+HAIKUGUI_MAN_TARGETS = -+HAIKUGUI_TESTTARGET = gui -+HAIKUGUI_BUNDLE = -+ - # All GUI files - ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.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_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w16.pro gui_w32.pro gui_photon.pro -@@ -2559,6 +2576,9 @@ - objects/gui_gtk_x11.o: gui_gtk_x11.c - $(CCC) -o $@ gui_gtk_x11.c - -+objects/gui_haiku.o: gui_haiku.cc -+ $(CCC) -o $@ gui_haiku.cc -+ - objects/gui_motif.o: gui_motif.c - $(CCC) -o $@ gui_motif.c - -@@ -2669,6 +2689,9 @@ - objects/os_beos.o: os_beos.c - $(CCC) -o $@ os_beos.c - -+objects/os_haiku.rsrc: os_haiku.rdef -+ cat $< | $(CCC) -E - | grep -v '^#' | rc -o "$@" - -+ - objects/os_qnx.o: os_qnx.c - $(CCC) -o $@ os_qnx.c - -@@ -2828,6 +2851,62 @@ - - - ############################################################################### -+### -+### Haiku installation -+### -+### This rule: -+### - add resources to already installed vim binary to avoid stripping -+### them during install; -+### - copy rgb.txt to runtime directory; -+### - update system MIME database with info about vim application. -+### -+install_haiku_extra: $(DEST_BIN)/$(VIMTARGET) objects/os_haiku.rsrc -+ xres -o $(DEST_BIN)/$(VIMTARGET) objects/os_haiku.rsrc -+ $(INSTALL_DATA) $(SCRIPTSOURCE)/rgb.txt $(DEST_RT) -+ mimeset $(DEST_BIN)/$(VIMTARGET) -+ -+### -+### List of g*-links that should be replaced with shell script equivalents. -+### This solves the problem of them from Tracker. -+### -+HAIKU_GLINKS = $(DEST_BIN)/$(GVIMTARGET) \ -+ $(DEST_BIN)/$(GVIEWTARGET) \ -+ $(DEST_BIN)/$(GVIMDIFFTARGET) \ -+ $(DEST_BIN)/$(RGVIMTARGET) \ -+ $(DEST_BIN)/$(RGVIEWTARGET) -+### -+### This rule: -+### - Replace gvim link with copy of vim binary. -+### - Replace g*-links with shell script equivalents to solve the problem -+### of calling them from Tracker, -+### - Add icon resources to mentioned g*-link shell scripts -+### - in case gui-less vim.con executable available use it. -+### -+installglinks_haiku: $(HAIKU_GLINKS) install_haiku_extra -+ @catattr -r "BEOS:ICON" $(DEST_BIN)/$(GVIMTARGET) > ~icon.attr -+ for i in $(HAIKU_GLINKS); do \ -+ rm $$i ; \ -+ echo "#!/bin/sh" > $$i ; \ -+ case $$i in \ -+ $(DEST_BIN)/$(GVIMTARGET)) \ -+ cp $(DEST_BIN)/$(VIMTARGET) $$i ; \ -+ if [ -f $(VIMTARGET).con ] ; then \ -+ $(STRIP) $(VIMTARGET).con ; \ -+ mv $(VIMTARGET).con $(DEST_BIN)/$(VIMTARGET) ; \ -+ fi ;; \ -+ $(DEST_BIN)/$(GVIEWTARGET)) printf "%s -R %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ -+ $(DEST_BIN)/$(GVIMDIFFTARGET)) printf "%s -d %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ -+ $(DEST_BIN)/$(RGVIMTARGET)) printf "%s -Z %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ -+ $(DEST_BIN)/$(RGVIEWTARGET)) printf "%s -Z -R %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ -+ *) printf "%s %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ -+ esac ; \ -+ chmod $(BINMOD) $$i ; \ -+ addattr -f ~icon.attr -t \'VICN\' BEOS:ICON $$i ; \ -+ done -+ addattr -f ~icon.attr -t \'VICN\' BEOS:ICON $(DEST_BIN)/$(VIMNAME)tutor -+ @rm ~icon.attr -+ -+############################################################################### - ### (automatically generated by 'make depend') - ### Dependencies: - objects/blowfish.o: blowfish.c vim.h auto/config.h feature.h os_unix.h \ -diff -Naur vim74/src/misc1.c vim74.haiku/src/misc1.c ---- vim74/src/misc1.c 2013-08-03 17:29:33.031981568 +0200 -+++ vim74.haiku/src/misc1.c 2013-09-08 10:34:11.039059456 +0200 +diff --git a/src/misc1.c b/src/misc1.c +index fd5d1fd..d9df41b 100644 +--- a/src/misc1.c ++++ b/src/misc1.c @@ -14,6 +14,10 @@ #include "vim.h" #include "version.h" @@ -6199,7 +6228,7 @@ diff -Naur vim74/src/misc1.c vim74.haiku/src/misc1.c static char_u *vim_version_dir __ARGS((char_u *vimdir)); static char_u *remove_tail __ARGS((char_u *p, char_u *pend, char_u *name)); #if defined(FEAT_CMDL_COMPL) -@@ -4179,7 +4183,16 @@ +@@ -4179,7 +4183,16 @@ vim_getenv(name, mustfree) vimruntime = (STRCMP(name, "VIMRUNTIME") == 0); if (!vimruntime && STRCMP(name, "VIM") != 0) @@ -6217,10 +6246,11 @@ diff -Naur vim74/src/misc1.c vim74.haiku/src/misc1.c /* * When expanding $VIMRUNTIME fails, try using $VIM/vim or $VIM. -diff -Naur vim74/src/normal.c vim74.haiku/src/normal.c ---- vim74/src/normal.c 2013-07-14 13:24:37.040108032 +0200 -+++ vim74.haiku/src/normal.c 2013-09-10 21:55:35.962330624 +0200 -@@ -2750,13 +2750,14 @@ +diff --git a/src/normal.c b/src/normal.c +index 80ada68..f77d52b 100644 +--- a/src/normal.c ++++ b/src/normal.c +@@ -2750,13 +2750,14 @@ do_mouse(oap, c, dir, count, fixindent) if (!is_click) return FALSE; #endif @@ -6237,9 +6267,10 @@ diff -Naur vim74/src/normal.c vim74.haiku/src/normal.c if (gui.in_use) { jump_flags = 0; -diff -Naur vim74/src/option.h vim74.haiku/src/option.h ---- vim74/src/option.h 2013-06-26 18:41:39.057147392 +0200 -+++ vim74.haiku/src/option.h 2013-09-08 10:40:12.042467328 +0200 +diff --git a/src/option.h b/src/option.h +index 167b562..36ace22 100644 +--- a/src/option.h ++++ b/src/option.h @@ -10,6 +10,8 @@ * option.h: definition of global variables for settable options */ @@ -6249,14 +6280,16 @@ diff -Naur vim74/src/option.h vim74.haiku/src/option.h /* * Default values for 'errorformat'. * The "%f|%l| %m" one is used for when the contents of the quickfix window is -@@ -1109,3 +1111,4 @@ +@@ -1109,3 +1111,4 @@ enum , WV_WRAP , WV_COUNT /* must be the last one */ }; +#endif //_OPTION_H_ -diff -Naur vim74/src/os_haiku.h vim74.haiku/src/os_haiku.h ---- vim74/src/os_haiku.h 1970-01-01 01:00:00.000000000 +0100 -+++ vim74.haiku/src/os_haiku.h 2013-09-10 21:55:56.656670720 +0200 +diff --git a/src/os_haiku.h b/src/os_haiku.h +new file mode 100644 +index 0000000..c9bfe75 +--- /dev/null ++++ b/src/os_haiku.h @@ -0,0 +1,29 @@ +/* vi:set ts=8 sts=4 sw=4: + * @@ -6287,9 +6320,11 @@ diff -Naur vim74/src/os_haiku.h vim74.haiku/src/os_haiku.h +# define DFLT_RUNTIMEPATH USR_VIM_DIR "/vimfiles," "$VIM/vimfiles" \ + ",$VIMRUNTIME," "$VIM/vimfiles/after," USR_VIM_DIR "/vimfiles/after" +#endif -diff -Naur vim74/src/os_haiku.rdef vim74.haiku/src/os_haiku.rdef ---- vim74/src/os_haiku.rdef 1970-01-01 01:00:00.000000000 +0100 -+++ vim74.haiku/src/os_haiku.rdef 2013-09-12 20:47:39.818151424 +0200 +diff --git a/src/os_haiku.rdef b/src/os_haiku.rdef +new file mode 100644 +index 0000000..215269e +--- /dev/null ++++ b/src/os_haiku.rdef @@ -0,0 +1,143 @@ +/* + * os_haiku.rdef @@ -6434,10 +6469,11 @@ diff -Naur vim74/src/os_haiku.rdef vim74.haiku/src/os_haiku.rdef + $"4CFAEF79764372DC201F65AC97B792C14FE6F387DBB4F83918273C6E9B866FD9" + $"FF17F6CF36F92F1B9E631E8B8F3FBC0000000049454E44AE426082" +}; -diff -Naur vim74/src/os_unix.c vim74.haiku/src/os_unix.c ---- vim74/src/os_unix.c 2013-07-03 16:32:32.020709376 +0200 -+++ vim74.haiku/src/os_unix.c 2013-09-11 21:47:52.978059264 +0200 -@@ -2092,7 +2092,7 @@ +diff --git a/src/os_unix.c b/src/os_unix.c +index 37cc3a7..ea205aa 100644 +--- a/src/os_unix.c ++++ b/src/os_unix.c +@@ -2092,7 +2092,7 @@ mch_settitle(title, icon) if (get_x11_windis() == OK) type = 1; #else @@ -6446,7 +6482,7 @@ diff -Naur vim74/src/os_unix.c vim74.haiku/src/os_unix.c if (gui.in_use) type = 1; # endif -@@ -2120,7 +2120,7 @@ +@@ -2120,7 +2120,7 @@ mch_settitle(title, icon) # endif set_x11_title(title); /* x11 */ #endif @@ -6455,7 +6491,7 @@ diff -Naur vim74/src/os_unix.c vim74.haiku/src/os_unix.c || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) else gui_mch_settitle(title, icon); -@@ -4153,7 +4153,7 @@ +@@ -4153,7 +4153,7 @@ mch_call_shell(cmd, options) if (!pipe_error) /* pty or pipe opened or not used */ { @@ -6464,10 +6500,11 @@ diff -Naur vim74/src/os_unix.c vim74.haiku/src/os_unix.c beos_cleanup_read_thread(); # endif -diff -Naur vim74/src/os_unix.h vim74.haiku/src/os_unix.h ---- vim74/src/os_unix.h 2013-06-12 20:09:44.053477376 +0200 -+++ vim74.haiku/src/os_unix.h 2013-09-08 10:53:04.045875200 +0200 -@@ -416,6 +416,8 @@ +diff --git a/src/os_unix.h b/src/os_unix.h +index 02eeafc..d4bfa37 100644 +--- a/src/os_unix.h ++++ b/src/os_unix.h +@@ -416,6 +416,8 @@ typedef struct dsc$descriptor DESC; #define DFLT_ERRORFILE "errors.err" @@ -6476,7 +6513,7 @@ diff -Naur vim74/src/os_unix.h vim74.haiku/src/os_unix.h #ifdef OS2 # define DFLT_RUNTIMEPATH "$HOME/vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/vimfiles/after" #else -@@ -430,6 +432,8 @@ +@@ -430,6 +432,8 @@ typedef struct dsc$descriptor DESC; # endif #endif @@ -6485,9 +6522,25 @@ diff -Naur vim74/src/os_unix.h vim74.haiku/src/os_unix.h #ifdef OS2 /* * Try several directories to put the temp files. -diff -Naur vim74/src/proto/gui_haiku.pro vim74.haiku/src/proto/gui_haiku.pro ---- vim74/src/proto/gui_haiku.pro 1970-01-01 01:00:00.000000000 +0100 -+++ vim74.haiku/src/proto/gui_haiku.pro 2013-09-13 21:09:33.540278784 +0200 +diff --git a/src/proto.h b/src/proto.h +index 191ecd8..0f86933 100644 +--- a/src/proto.h ++++ b/src/proto.h +@@ -238,6 +238,9 @@ extern char_u *vimpty_getenv __ARGS((const char_u *string)); /* from pty.c */ + extern char *vim_SelFile __ARGS((Widget toplevel, char *prompt, char *init_path, int (*show_entry)(), int x, int y, guicolor_T fg, guicolor_T bg, guicolor_T scroll_fg, guicolor_T scroll_bg)); + # endif + # endif ++# ifdef FEAT_GUI_HAIKU ++# include "gui_haiku.pro" ++# endif + # ifdef FEAT_GUI_MAC + # include "gui_mac.pro" + # endif +diff --git a/src/proto/gui_haiku.pro b/src/proto/gui_haiku.pro +new file mode 100644 +index 0000000..43b12ed +--- /dev/null ++++ b/src/proto/gui_haiku.pro @@ -0,0 +1,91 @@ +/* gui_haiku.cc - hand crafted */ +void gui_mch_prepare __ARGS((int *argc, char **argv)); @@ -6580,23 +6633,11 @@ diff -Naur vim74/src/proto/gui_haiku.pro vim74.haiku/src/proto/gui_haiku.pro +void gui_mch_update_tabline __ARGS((void)); +void gui_mch_set_curtab __ARGS((int nr)); +// char_u *gui_mch_font_dialog __ARGS((char_u *oldval)); -diff -Naur vim74/src/proto.h vim74.haiku/src/proto.h ---- vim74/src/proto.h 2013-02-26 14:18:19.015990784 +0100 -+++ vim74.haiku/src/proto.h 2013-09-10 20:20:53.868483072 +0200 -@@ -238,6 +238,9 @@ - extern char *vim_SelFile __ARGS((Widget toplevel, char *prompt, char *init_path, int (*show_entry)(), int x, int y, guicolor_T fg, guicolor_T bg, guicolor_T scroll_fg, guicolor_T scroll_bg)); - # endif - # endif -+# ifdef FEAT_GUI_HAIKU -+# include "gui_haiku.pro" -+# endif - # ifdef FEAT_GUI_MAC - # include "gui_mac.pro" - # endif -diff -Naur vim74/src/pty.c vim74.haiku/src/pty.c ---- vim74/src/pty.c 2012-01-20 21:07:56.056623104 +0100 -+++ vim74.haiku/src/pty.c 2013-09-08 10:58:43.004980736 +0200 -@@ -356,7 +356,7 @@ +diff --git a/src/pty.c b/src/pty.c +index 4dad54c..08082ff 100644 +--- a/src/pty.c ++++ b/src/pty.c +@@ -356,7 +356,7 @@ OpenPTY(ttyn) static char PtyProto[] = "/dev/ptym/ptyXY"; static char TtyProto[] = "/dev/pty/ttyXY"; # else @@ -6605,10 +6646,11 @@ diff -Naur vim74/src/pty.c vim74.haiku/src/pty.c static char PtyProto[] = "/dev/pt/XY"; static char TtyProto[] = "/dev/tt/XY"; # else -diff -Naur vim74/src/screen.c vim74.haiku/src/screen.c ---- vim74/src/screen.c 2013-07-13 12:23:00.031457280 +0200 -+++ vim74.haiku/src/screen.c 2013-09-08 13:30:04.007077888 +0200 -@@ -8167,6 +8167,10 @@ +diff --git a/src/screen.c b/src/screen.c +index a72ecaf..601320d 100644 +--- a/src/screen.c ++++ b/src/screen.c +@@ -8167,6 +8167,10 @@ retry: win_new_shellsize(); /* fit the windows in the new sized shell */ @@ -6619,7 +6661,7 @@ diff -Naur vim74/src/screen.c vim74.haiku/src/screen.c comp_col(); /* recompute columns for shown command and ruler */ /* -@@ -8410,6 +8414,10 @@ +@@ -8410,6 +8414,10 @@ give_up: } #endif @@ -6630,7 +6672,7 @@ diff -Naur vim74/src/screen.c vim74.haiku/src/screen.c entered = FALSE; --RedrawingDisabled; -@@ -9273,6 +9281,10 @@ +@@ -9273,6 +9281,10 @@ screen_ins_lines(off, row, line_count, end, wp) clip_scroll_selection(-line_count); #endif @@ -6641,7 +6683,7 @@ diff -Naur vim74/src/screen.c vim74.haiku/src/screen.c #ifdef FEAT_GUI /* Don't update the GUI cursor here, ScreenLines[] is invalid until the * scrolling is actually carried out. */ -@@ -9325,6 +9337,10 @@ +@@ -9325,6 +9337,10 @@ screen_ins_lines(off, row, line_count, end, wp) } } @@ -6652,7 +6694,7 @@ diff -Naur vim74/src/screen.c vim74.haiku/src/screen.c screen_stop_highlight(); windgoto(cursor_row, 0); -@@ -9494,6 +9510,10 @@ +@@ -9494,6 +9510,10 @@ screen_del_lines(off, row, line_count, end, force, wp) clip_scroll_selection(line_count); #endif @@ -6663,7 +6705,7 @@ diff -Naur vim74/src/screen.c vim74.haiku/src/screen.c #ifdef FEAT_GUI /* Don't update the GUI cursor here, ScreenLines[] is invalid until the * scrolling is actually carried out. */ -@@ -9553,6 +9573,10 @@ +@@ -9553,6 +9573,10 @@ screen_del_lines(off, row, line_count, end, force, wp) } } @@ -6674,10 +6716,11 @@ diff -Naur vim74/src/screen.c vim74.haiku/src/screen.c screen_stop_highlight(); #ifdef FEAT_VERTSPLIT -diff -Naur vim74/src/structs.h vim74.haiku/src/structs.h ---- vim74/src/structs.h 2013-07-03 15:35:59.052166656 +0200 -+++ vim74.haiku/src/structs.h 2013-09-08 11:00:02.008650752 +0200 -@@ -2415,6 +2415,13 @@ +diff --git a/src/structs.h b/src/structs.h +index f74d218..51c763c 100644 +--- a/src/structs.h ++++ b/src/structs.h +@@ -2415,6 +2415,13 @@ struct VimMenu HMENU submenu_id; /* If this is submenu, add children here */ HWND tearoff_handle; /* hWnd of tearoff if created */ #endif @@ -6691,10 +6734,11 @@ diff -Naur vim74/src/structs.h vim74.haiku/src/structs.h #ifdef FEAT_GUI_MAC /* MenuHandle id; */ /* short index; */ /* the item index within the father menu */ -diff -Naur vim74/src/term.c vim74.haiku/src/term.c ---- vim74/src/term.c 2013-07-04 22:29:28.027262976 +0200 -+++ vim74.haiku/src/term.c 2013-09-08 11:00:43.010485760 +0200 -@@ -1382,6 +1382,11 @@ +diff --git a/src/term.c b/src/term.c +index d4e4e0d..4180726 100644 +--- a/src/term.c ++++ b/src/term.c +@@ -1382,6 +1382,11 @@ static struct builtin_term builtin_termcaps[] = # define DEFAULT_TERM (char_u *)"beos-ansi" #endif @@ -6706,10 +6750,11 @@ diff -Naur vim74/src/term.c vim74.haiku/src/term.c #ifndef DEFAULT_TERM # define DEFAULT_TERM (char_u *)"dumb" #endif -diff -Naur vim74/src/ui.c vim74.haiku/src/ui.c ---- vim74/src/ui.c 2013-07-13 20:57:08.021495808 +0200 -+++ vim74.haiku/src/ui.c 2013-09-10 22:29:30.828637184 +0200 -@@ -3109,7 +3109,7 @@ +diff --git a/src/ui.c b/src/ui.c +index 18021c2..0d1461f 100644 +--- a/src/ui.c ++++ b/src/ui.c +@@ -3109,7 +3109,7 @@ mouse_find_win(rowp, colp) #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MAC) \ || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MSWIN) \ @@ -6718,10 +6763,11 @@ diff -Naur vim74/src/ui.c vim74.haiku/src/ui.c /* * Translate window coordinates to buffer position without any side effects */ -diff -Naur vim74/src/version.c vim74.haiku/src/version.c ---- vim74/src/version.c 2013-08-10 13:29:20.000786432 +0200 -+++ vim74.haiku/src/version.c 2013-09-08 11:03:25.036438016 +0200 -@@ -1029,6 +1029,9 @@ +diff --git a/src/version.c b/src/version.c +index f063557..5bcacf6 100644 +--- a/src/version.c ++++ b/src/version.c +@@ -1029,6 +1029,9 @@ list_version() MSG_PUTS(_("with X11-Athena GUI.")); # endif # else @@ -6731,7 +6777,7 @@ diff -Naur vim74/src/version.c vim74.haiku/src/version.c # ifdef FEAT_GUI_PHOTON MSG_PUTS(_("with Photon GUI.")); # else -@@ -1046,6 +1049,7 @@ +@@ -1046,6 +1049,7 @@ list_version() # endif # endif # endif @@ -6739,9 +6785,10 @@ diff -Naur vim74/src/version.c vim74.haiku/src/version.c # endif # endif # endif -diff -Naur vim74/src/vim.h vim74.haiku/src/vim.h ---- vim74/src/vim.h 2013-08-02 16:02:27.018350080 +0200 -+++ vim74.haiku/src/vim.h 2013-09-10 20:20:34.087556096 +0200 +diff --git a/src/vim.h b/src/vim.h +index 3d61f3a..e67c318 100644 +--- a/src/vim.h ++++ b/src/vim.h @@ -123,6 +123,7 @@ || defined(FEAT_GUI_MAC) \ || defined(FEAT_GUI_W32) \ @@ -6762,7 +6809,7 @@ diff -Naur vim74/src/vim.h vim74.haiku/src/vim.h #if (defined(UNIX) || defined(__EMX__) || defined(VMS)) \ && (!defined(MACOS_X) || defined(HAVE_CONFIG_H)) # include "os_unix.h" /* bring lots of system header files */ -@@ -1927,6 +1933,9 @@ +@@ -1927,6 +1933,9 @@ typedef struct VimClipboard int_u format; /* Vim's own special clipboard format */ int_u format_raw; /* Vim's raw text clipboard format */ # endif @@ -6772,3 +6819,106 @@ diff -Naur vim74/src/vim.h vim74.haiku/src/vim.h } VimClipboard; #else typedef int VimClipboard; /* This is required for the prototypes. */ +-- +1.8.3.4 + + +From fca8d5b58af9ff0b8568700c336e7e94d63be93c Mon Sep 17 00:00:00 2001 +From: Ezodev +Date: Tue, 2 Dec 2014 16:08:06 +0000 +Subject: Creating vim config directory on viminfo write + + +diff --git a/src/ex_cmds.c b/src/ex_cmds.c +index b79a259..e0ac11a 100644 +--- a/src/ex_cmds.c ++++ b/src/ex_cmds.c +@@ -14,6 +14,9 @@ + #include "vim.h" + #include "version.h" + ++#include ++#include ++ + #ifdef FEAT_EX_EXTRA + static int linelen __ARGS((int *has_tab)); + #endif +@@ -1753,7 +1756,8 @@ write_viminfo(file, forceit) + #ifdef WIN3264 + long perm = -1; + #endif +- ++ char* filenameSeparatorPos; ++ + if (no_viminfo()) + return; + +@@ -1761,6 +1765,18 @@ write_viminfo(file, forceit) + if (fname == NULL) + return; + ++ /* Ensure that configuration folder(for viminfo) exist */ ++ filenameSeparatorPos = strrchr(fname, '/'); ++ if(filenameSeparatorPos - fname > 1) { ++ // > 1 because root directory always exists anyway ++ *filenameSeparatorPos = '\0'; ++ // +Date: Tue, 2 Dec 2014 16:50:57 +0000 +Subject: Fixed types conflict(pointers) + + +diff --git a/src/ex_cmds.c b/src/ex_cmds.c +index e0ac11a..6d8de17 100644 +--- a/src/ex_cmds.c ++++ b/src/ex_cmds.c +@@ -1767,7 +1767,7 @@ write_viminfo(file, forceit) + + /* Ensure that configuration folder(for viminfo) exist */ + filenameSeparatorPos = strrchr(fname, '/'); +- if(filenameSeparatorPos - fname > 1) { ++ if(filenameSeparatorPos - (char*)fname > 1) { + // > 1 because root directory always exists anyway + *filenameSeparatorPos = '\0'; + // +Date: Tue, 2 Dec 2014 17:08:24 +0000 +Subject: fixed case where patch constains only filename + + +diff --git a/src/ex_cmds.c b/src/ex_cmds.c +index 6d8de17..4a96e7e 100644 +--- a/src/ex_cmds.c ++++ b/src/ex_cmds.c +@@ -1767,7 +1767,8 @@ write_viminfo(file, forceit) + + /* Ensure that configuration folder(for viminfo) exist */ + filenameSeparatorPos = strrchr(fname, '/'); +- if(filenameSeparatorPos - (char*)fname > 1) { ++ if(filenameSeparatorPos != NULL && ++ filenameSeparatorPos - (char*)fname > 1) { + // > 1 because root directory always exists anyway + *filenameSeparatorPos = '\0'; + //