+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.501
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.501
-Problem: Vim does not compile with MorphOS.
-Solution: Add a Makefile and a few changes to make Vim work with MorphOS.
- (Ali Akcaagac)
-Files: runtime/doc/os_amiga.txt, src/INSTALLami.txt,
- src/Make_morphos.mak, src/memfile.c, src/term.c
-
-
-*** ../vim-6.2.500/runtime/doc/os_amiga.txt Sun Jun 1 12:20:34 2003
---- runtime/doc/os_amiga.txt Sun Apr 25 16:44:21 2004
-***************
-*** 1,4 ****
-! *os_amiga.txt* For Vim version 6.2. Last change: 2001 Sep 03
-
-
- VIM REFERENCE MANUAL by Bram Moolenaar
---- 1,4 ----
-! *os_amiga.txt* For Vim version 6.2. Last change: 2004 Apr 25
-
-
- VIM REFERENCE MANUAL by Bram Moolenaar
-***************
-*** 6,11 ****
---- 6,12 ----
-
- *Amiga*
- This file contains the particularities for the Amiga version of Vim.
-+ There is also a section specifically for |MorphOS| below.
-
- Installation on the Amiga:
- - Assign "VIM:" to the directory where the Vim "doc" directory is. Vim will
-***************
-*** 74,78 ****
---- 75,139 ----
- Commands that accept a single file name allow for embedded spaces in the file
- name. However, when using commands that accept several file names, embedded
- spaces need to be escaped with a backslash.
-+
-+ ------------------------------------------------------------------------------
-+ Vim for MorphOS *MorphOS*
-+
-+ [this section mostly by Ali Akcaagac]
-+
-+ For the latest info about the MorphOS version:
-+ http://www.akcaagac.com/index_vim.html
-+
-+
-+ Problems ~
-+
-+ There are a couple of problems which are not MorphOS related but more Vim and
-+ UN*X related. When starting up Vim in ram: it complains with a nag requester
-+ from MorphOS please simply ignore it. Another problem is when running Vim as
-+ is some plugins will cause a few problems which you can ignore as well.
-+ Hopefully someone will be fixing it over the time.
-+
-+ To pass all these problems for now you can either run:
-+
-+ vim <file to be edited>
-+
-+ or if you want to run Vim plain and enjoy the motion of Helpfiles etc. it then
-+ would be better to enter:
-+
-+ vim --noplugins <of course you can add a file>
-+
-+
-+ Installation ~
-+
-+ 1) Please copy the binary 'VIM' file to c:
-+ 2) Get the Vim runtime package from:
-+
-+ ftp://ftp.vim.org/pub/vim/amiga/vim62rt.tgz
-+
-+ and unpack it in your 'Apps' directory of the MorphOS installation. For me
-+ this would create following directory hierarchy:
-+
-+ MorphOS:Apps/Vim/Vim62/...
-+
-+ 3) Add the following lines to your s:shell-startup (Important!).
-+
-+ ;Begin VIM
-+ Set VIM=MorphOS:Apps/Vim/Vim62
-+ Assign HOME: ""
-+ ;End VIM
-+
-+ 4) Copy the '.vimrc' file to s:
-+
-+ 5) There is also a file named 'color-sequence' included in this archive. This
-+ will set the MorphOS Shell to show ANSI colors. Please copy the file to s:
-+ and change the s:shell-startup to:
-+
-+ ;Begin VIM
-+ Set VIM=MorphOS:Apps/Vim/Vim62
-+ Assign HOME: ""
-+ Execute S:Color-Sequence
-+ Cls
-+ ;End VIM
-+
-
- vim:tw=78:ts=8:ft=help:norl:
-*** ../vim-6.2.500/src/INSTALLami.txt Wed Jul 19 12:53:38 2000
---- src/INSTALLami.txt Sun Apr 25 16:46:09 2004
-***************
-*** 26,28 ****
---- 26,34 ----
-
- You will have to set the "VIM" environment variable to the location of the
- documentation files.
-+
-+
-+ MorphOS
-+
-+ Use the Make_morphos.mak Makefile:
-+ make -f Make_morphos.mak
-*** ../vim-6.2.500/src/Make_morphos.mak Sun Apr 25 16:57:38 2004
---- src/Make_morphos.mak Sun Apr 25 16:48:43 2004
-***************
-*** 0 ****
---- 1,54 ----
-+ #
-+ # Makefile for VIM, using MorphOS SDK (gcc 2.95.3)
-+ #
-+
-+ # Uncomment the following two lines and comment the two after in
-+ # case you want to play with GVIM MorphOS. But it's still known
-+ # to not work at all. So meanwhile it's better to stick with VIM.
-+
-+ # GVIM = -DFEAT_GUI_AMIGA
-+ # GVIMSRC = gui_amiga.c gui.c
-+
-+ GVIM =
-+ GVIMSRC =
-+
-+ CFLAGS = -c \
-+ -pipe \
-+ -O2 \
-+ -Wall \
-+ -DNO_ARP \
-+ -DUSE_TMPNAM \
-+ ${GVIM} \
-+ -noixemul \
-+ -Iproto
-+
-+ PRG = Vim
-+ LIBS = -noixemul -s
-+ CC = gcc
-+ LD = gcc
-+
-+ .c.o:
-+ ${CC} ${CFLAGS} $< -o $@
-+
-+ SRC = buffer.c charset.c diff.c \
-+ digraph.c edit.c eval.c \
-+ ex_cmds.c ex_cmds2.c ex_docmd.c \
-+ ex_eval.c ex_getln.c fileio.c \
-+ fold.c getchar.c main.c \
-+ mark.c memfile.c memline.c \
-+ menu.c message.c misc1.c \
-+ misc2.c move.c mbyte.c \
-+ normal.c ops.c option.c \
-+ os_amiga.c quickfix.c regexp.c \
-+ screen.c search.c syntax.c \
-+ tag.c term.c ui.c \
-+ undo.c window.c version.c \
-+ ${GVIMSRC}
-+
-+ OBJ = $(SRC:.c=.o)
-+
-+ $(PRG): $(OBJ)
-+ ${LD} -o $(PRG) $(OBJ) $(LIBS)
-+
-+ clean:
-+ rm -fv *.o $(PRG)
-*** ../vim-6.2.500/src/memfile.c Tue Apr 6 21:31:48 2004
---- src/memfile.c Sun Apr 25 16:53:51 2004
-***************
-*** 517,522 ****
---- 517,533 ----
- mf_ins_free(mfp, hp); /* put *hp in the free list */
- }
-
-+ #if defined(__MORPHOS__)
-+ /* function is missing in MorphOS libnix version */
-+ extern unsigned long *__stdfiledes;
-+
-+ static unsigned long
-+ fdtofh(int filedescriptor)
-+ {
-+ return __stdfiledes[filedescriptor];
-+ }
-+ #endif
-+
- /*
- * Sync the memory file *mfp to disk.
- * Flags:
-***************
-*** 660,673 ****
- Flush(fp->ufbfh);
- }
- # else
-! # if defined(_DCC) || defined(__GNUC__)
- {
-! # ifdef __GNUC__
- /* Have function (in libnix at least),
- * but ain't got no prototype anywhere. */
-! unsigned long fdtofh(int filedescriptor);
- # endif
--
- BPTR fh = (BPTR)fdtofh(mfp->mf_fd);
-
- if (fh != 0)
---- 671,683 ----
- Flush(fp->ufbfh);
- }
- # else
-! # if defined(_DCC) || defined(__GNUC__) || defined(__MORPHOS__)
- {
-! # if defined(__GNUC__) && !defined(__MORPHOS__)
- /* Have function (in libnix at least),
- * but ain't got no prototype anywhere. */
-! extern unsigned long fdtofh(int filedescriptor);
- # endif
- BPTR fh = (BPTR)fdtofh(mfp->mf_fd);
-
- if (fh != 0)
-*** ../vim-6.2.500/src/term.c Mon Apr 19 20:26:43 2004
---- src/term.c Sun Apr 25 16:48:43 2004
-***************
-*** 296,301 ****
---- 296,312 ----
- {(int)KS_UE, "\033[0m"},
- {(int)KS_CZH, "\033[3m"},
- {(int)KS_CZR, "\033[0m"},
-+ #if defined(__MORPHOS__)
-+ {(int)KS_CCO, "8"}, /* allow 8 colors */
-+ # ifdef TERMINFO
-+ {(int)KS_CAB, "\033[4%p1%dm"},/* set background color */
-+ {(int)KS_CAF, "\033[3%p1%dm"},/* set foreground color */
-+ # else
-+ {(int)KS_CAB, "\033[4%dm"}, /* set background color */
-+ {(int)KS_CAF, "\033[3%dm"}, /* set foreground color */
-+ # endif
-+ {(int)KS_OP, "\033[m"}, /* reset colors */
-+ #endif
- {(int)KS_MS, "y"},
- {(int)KS_UT, "y"}, /* guessed */
- {(int)KS_LE, "\b"},
-***************
-*** 304,309 ****
---- 315,323 ----
- # else
- {(int)KS_CM, "\033[%i%d;%dH"},
- # endif
-+ #if defined(__MORPHOS__)
-+ {(int)KS_SR, "\033M"},
-+ #endif
- # ifdef TERMINFO
- {(int)KS_CRI, "\033[%p1%dC"},
- # else
-*** ../vim-6.2.500/src/version.c Sun Apr 25 16:29:55 2004
---- src/version.c Sun Apr 25 16:56:39 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 501,
- /**/
-
---
-If they don't keep on exercising their lips, he thought, their brains
-start working.
- -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.502
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.502
-Problem: Building fails for generating message files.
-Solution: Add dummy message files.
-Files: src/po/ca.po, src/po/ru.po, src/po/sv.po
-
-
-*** ../vim-6.2.501/src/po/ca.po Mon Apr 26 12:28:17 2004
---- src/po/ca.po Mon Apr 26 12:03:21 2004
-***************
-*** 0 ****
---- 1,16 ----
-+ # Dummy Catalan messages for vim.
-+ # Get the real one from: ftp://ftp.vim.org/pub/vim/messages/ca.po
-+ #
-+ msgid ""
-+ msgstr ""
-+ "Project-Id-Version: vim 6.2\n"
-+ "POT-Creation-Date: 2003-11-01 20:10+0100\n"
-+ "PO-Revision-Date: 2004-01-19 13:57+0100\n"
-+ "Last-Translator: Bram Moolenaar <bram@vim.org>\n"
-+ "Language-Team: Catalan <ca@dodds.net>\n"
-+ "MIME-Version: 1.0\n"
-+ "Content-Type: text/plain; charset=iso-8859-1\n"
-+ "Content-Transfer-Encoding: 8bit\n"
-+
-+ msgid "This is a dummy translation file"
-+ msgstr "Dis be a dummy translashun stash"
-*** ../vim-6.2.501/src/po/ru.po Mon Apr 26 12:28:17 2004
---- src/po/ru.po Mon Apr 26 12:01:14 2004
-***************
-*** 0 ****
---- 1,16 ----
-+ # Dummy Russian translation for Vim
-+ # Get the real one from: ftp://ftp.vim.org/pub/vim/messages/ru.po
-+ #
-+ msgid ""
-+ msgstr ""
-+ "Project-Id-Version: Vim 6.2\n"
-+ "POT-Creation-Date: 2004-04-18 06:22+0400\n"
-+ "PO-Revision-Date: 2004-04-20 20:20+0400\n"
-+ "Last-Translator: Bram Moolenaar <bram@vim.org>\n"
-+ "Language-Team: vassily ragosin <vrr@users.sourceforge.net>\n"
-+ "MIME-Version: 1.0\n"
-+ "Content-Type: text/plain; charset=koi8-r\n"
-+ "Content-Transfer-Encoding: 8bit\n"
-+
-+ msgid "This is a dummy translation file"
-+ msgstr "Like, ya know, this is a dummy translation file"
-*** ../vim-6.2.501/src/po/sv.po Mon Apr 26 12:28:17 2004
---- src/po/sv.po Mon Apr 26 11:59:50 2004
-***************
-*** 0 ****
---- 1,16 ----
-+ # Dummy Swedish translation for Vim.
-+ # Get the real one from: ftp://ftp.vim.org/pub/vim/messages/sv.po
-+ #
-+ msgid ""
-+ msgstr ""
-+ "Project-Id-Version: Vim 6.2\n"
-+ "POT-Creation-Date: 2004-01-30 11:57+0100\n"
-+ "PO-Revision-Date: 2004-04-23 21:56+0200\n"
-+ "Last-Translator: Bram Moolenaar <bram@vim.org>\n"
-+ "Language-Team: Swedish Chef <http://bumr.net/>\n"
-+ "MIME-Version: 1.0\n"
-+ "Content-Type: text/plain; charset=ISO-8859-1\n"
-+ "Content-Transfer-Encoding: 8bit\n"
-+
-+ msgid "This is a dummy translation file"
-+ msgstr "Thees is a doommy trunsleshun feele"
-*** ../vim-6.2.501/src/version.c Sun Apr 25 16:58:57 2004
---- src/version.c Mon Apr 26 12:19:11 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 502,
- /**/
-
---
-How To Keep A Healthy Level Of Insanity:
-12. Sing along at the opera.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.503
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.503
-Problem: Mac: Can't compile MacRoman conversions without the GUI.
-Solution: Also link with the Carbon framework for the terminal version, for
- the MacRoman conversion functions. (Eckehard Berns)
- Remove -ltermcap from the GUI link command, it is not needed.
-Files: src/auto/configure, src/Makefile, src/configure.in
-
-
-*** ../vim-6.2.502/src/auto/configure Sun Apr 25 13:41:07 2004
---- src/auto/configure Sun Apr 25 13:22:47 2004
-***************
-*** 8248,8253 ****
---- 8252,8271 ----
- PERL_LIBS="$PERL_LIBS -ldl"
- fi
- fi
-+
-+ if test "x$MACOSX" = "xyes" && test "x$CARBON" = "xyes" \
-+ && test "x$GUITYPE" != "xCARBONGUI"; then
-+ echo $ac_n "checking whether we need -framework Carbon""... $ac_c" 1>&6
-+ echo "configure:8260: checking whether we need -framework Carbon" >&5
-+ if test "x$enable_multibyte" = "xyes" || test "x$features" == "xbig" \
-+ || test "x$features" = "xhuge"; then
-+ LIBS="$LIBS -framework Carbon"
-+ echo "$ac_t""yes" 1>&6
-+ else
-+ echo "$ac_t""no" 1>&6
-+ fi
-+ fi
-+
-
- trap '' 1 2 15
- cat > confcache <<\EOF
-*** ../vim-6.2.502/src/Makefile Thu Mar 25 19:29:55 2004
---- src/Makefile Sun Apr 25 13:23:42 2004
-***************
-*** 1142,1153 ****
- CARBONGUI_SRC = gui.c gui_mac.c
- CARBONGUI_OBJ = objects/gui.o objects/gui_mac.o objects/pty.o
- CARBONGUI_DEFS = -DFEAT_GUI_MAC -arch ppc -fno-common -fpascal-strings \
-! -Wall -Wno-unknown-pragmas \
-! -mdynamic-no-pic -pipe
- CARBONGUI_IPATH = -I. -Iproto
- CARBONGUI_LIBS_DIR =
- CARBONGUI_LIBS1 = -framework Carbon
-! CARBONGUI_LIBS2 = -ltermcap
- CARBONGUI_INSTALL = install_macosx
- CARBONGUI_TARGETS =
- CARBONGUI_MAN_TARGETS =
---- 1158,1169 ----
- CARBONGUI_SRC = gui.c gui_mac.c
- CARBONGUI_OBJ = objects/gui.o objects/gui_mac.o objects/pty.o
- CARBONGUI_DEFS = -DFEAT_GUI_MAC -arch ppc -fno-common -fpascal-strings \
-! -Wall -Wno-unknown-pragmas \
-! -mdynamic-no-pic -pipe
- CARBONGUI_IPATH = -I. -Iproto
- CARBONGUI_LIBS_DIR =
- CARBONGUI_LIBS1 = -framework Carbon
-! CARBONGUI_LIBS2 =
- CARBONGUI_INSTALL = install_macosx
- CARBONGUI_TARGETS =
- CARBONGUI_MAN_TARGETS =
-*** ../vim-6.2.502/src/configure.in Sun Apr 25 13:41:07 2004
---- src/configure.in Sun Apr 25 13:22:43 2004
-***************
-*** 2639,2644 ****
---- 2639,2658 ----
- PERL_LIBS="$PERL_LIBS -ldl"
- fi
- fi
-+
-+ if test "x$MACOSX" = "xyes" && test "x$CARBON" = "xyes" \
-+ && test "x$GUITYPE" != "xCARBONGUI"; then
-+ AC_MSG_CHECKING(whether we need -framework Carbon)
-+ dnl check for MACOSX without Carbon GUI, but with FEAT_MBYTE
-+ if test "x$enable_multibyte" = "xyes" || test "x$features" == "xbig" \
-+ || test "x$features" = "xhuge"; then
-+ LIBS="$LIBS -framework Carbon"
-+ AC_MSG_RESULT(yes)
-+ else
-+ AC_MSG_RESULT(no)
-+ fi
-+ fi
-+
-
- dnl write output files
- AC_OUTPUT(auto/config.mk:config.mk.in)
-*** ../vim-6.2.502/src/version.c Mon Apr 26 12:28:44 2004
---- src/version.c Mon Apr 26 12:31:49 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 503,
- /**/
-
---
-How To Keep A Healthy Level Of Insanity:
-13. Go to a poetry recital and ask why the poems don't rhyme.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.504
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.504
-Problem: Various problems with 'cindent', among which that a
- list of variable declarations is not indented properly.
-Solution: Fix the wrong indenting. Improve indenting of C++ methods.
- Add the 'i', 'b' and 'W' options to 'cinoptions'. (mostly by
- Helmut Stiegler)
- Improve indenting of preprocessor-continuation lines.
-Files: runtime/doc/indent.txt, src/misc1.c, src/testdir/test3.in,
- src/testdir/test3.ok
-
-
-*** ../vim-6.2.503/runtime/doc/indent.txt Sun Jun 1 12:20:33 2003
---- runtime/doc/indent.txt Sun Apr 25 11:57:22 2004
-***************
-*** 1,4 ****
-! *indent.txt* For Vim version 6.2. Last change: 2003 May 04
-
-
- VIM REFERENCE MANUAL by Bram Moolenaar
---- 1,4 ----
-! *indent.txt* For Vim version 6.2. Last change: 2004 Apr 25
-
-
- VIM REFERENCE MANUAL by Bram Moolenaar
-***************
-*** 228,234 ****
- a = a + 1; b = b + 1;
- <
- lN If N != 0 Vim will align with a case label instead of the
-! statement after it.
-
- cino= cino=l1 >
- switch (a) { switch (a) {
---- 228,234 ----
- a = a + 1; b = b + 1;
- <
- lN If N != 0 Vim will align with a case label instead of the
-! statement after it in the same line.
-
- cino= cino=l1 >
- switch (a) { switch (a) {
-***************
-*** 236,241 ****
---- 236,256 ----
- break; break;
- } }
- <
-+ bN If N != 0 Vim will align a final "break" with the case label,
-+ so that case..break looks like a sort of block. (default: 0).
-+
-+ cino= cino=b1 >
-+ switch (x) switch(x)
-+ { {
-+ case 1: case 1:
-+ a = b; a = b;
-+ break; break;
-+
-+ default: default:
-+ a = 0; a = 0;
-+ break; break;
-+ } }
-+ <
- gN Place C++ scope declarations N characters from the indent of the
- block they are in. (default 'shiftwidth'). A scope declaration
- can be "public:", "protected:" or "private:".
-***************
-*** 271,276 ****
---- 286,304 ----
- int int int
- func() func() func()
- <
-+ iN Indent C++ base class declarations and contructor
-+ initializations, if they start in a new line (otherwise they
-+ are aligned at the right side of the ':').
-+ (default 'shiftwidth').
-+
-+ cino= cino=i0 >
-+ class MyClass : class MyClass :
-+ public BaseClass public BaseClass
-+ {} {}
-+ MyClass::MyClass() : MyClass::MyClass() :
-+ BaseClass(3) BaseClass(3)
-+ {} {}
-+ <
- +N Indent a continuation line (a line that spills onto the next) N
- additional characters. (default 'shiftwidth').
-
-***************
-*** 347,352 ****
---- 375,394 ----
- && ( c2 && ( c2
- || c3)) || c3))
- foo; foo;
-+ <
-+ WN When in unclosed parentheses and N is non-zero and either
-+ using "(0" or "u0", respectively and the unclosed parentheses is
-+ the last non-white character in its line and it is not the
-+ closing parentheses, indent the following line N characters
-+ relative to the outer context (i.e. start of the line or the
-+ next unclosed parentheses). (default: 0).
-+
-+ cino=(0 cino=(0,W4 >
-+ a_long_line( a_long_line(
-+ argument, argument,
-+ argument); argument);
-+ a_short_line(argument, a_short_line(argument,
-+ argument); argument);
- <
- mN When N is non-zero, line up a line starting with a closing
- parentheses with the first character of the line with the
-*** ../vim-6.2.503/src/misc1.c Mon Apr 19 20:26:43 2004
---- src/misc1.c Mon Apr 26 18:58:23 2004
-***************
-*** 4351,4370 ****
- static char_u *after_label __ARGS((char_u *l));
- static int get_indent_nolabel __ARGS((linenr_T lnum));
- static int skip_label __ARGS((linenr_T, char_u **pp, int ind_maxcomment));
- static int cin_ispreproc __ARGS((char_u *));
- static int cin_iscomment __ARGS((char_u *));
- static int cin_islinecomment __ARGS((char_u *));
-! static int cin_isterminated __ARGS((char_u *, int));
-! static int cin_isfuncdecl __ARGS((char_u *));
- static int cin_isif __ARGS((char_u *));
- static int cin_iselse __ARGS((char_u *));
- static int cin_isdo __ARGS((char_u *));
- static int cin_iswhileofdo __ARGS((char_u *, linenr_T, int));
-! static int cin_ends_in __ARGS((char_u *, char_u *));
- static int cin_skip2pos __ARGS((pos_T *trypos));
- static pos_T *find_start_brace __ARGS((int));
- static pos_T *find_match_paren __ARGS((int, int));
-! static int find_last_paren __ARGS((char_u *l));
- static int find_match __ARGS((int lookfor, linenr_T ourscope, int ind_maxparen, int ind_maxcomment));
-
- /*
---- 4351,4377 ----
- static char_u *after_label __ARGS((char_u *l));
- static int get_indent_nolabel __ARGS((linenr_T lnum));
- static int skip_label __ARGS((linenr_T, char_u **pp, int ind_maxcomment));
-+ static int cin_first_id_amount __ARGS((void));
-+ static int cin_get_equal_amount __ARGS((linenr_T lnum));
- static int cin_ispreproc __ARGS((char_u *));
-+ static int cin_ispreproc_cont __ARGS((char_u **pp, linenr_T *lnump));
- static int cin_iscomment __ARGS((char_u *));
- static int cin_islinecomment __ARGS((char_u *));
-! static int cin_isterminated __ARGS((char_u *, int, int));
-! static int cin_isinit __ARGS((void));
-! static int cin_isfuncdecl __ARGS((char_u **, linenr_T));
- static int cin_isif __ARGS((char_u *));
- static int cin_iselse __ARGS((char_u *));
- static int cin_isdo __ARGS((char_u *));
- static int cin_iswhileofdo __ARGS((char_u *, linenr_T, int));
-! static int cin_isbreak __ARGS((char_u *));
-! static int cin_is_cpp_baseclass __ARGS((char_u *line, colnr_T *col));
-! static int cin_ends_in __ARGS((char_u *, char_u *, char_u *));
- static int cin_skip2pos __ARGS((pos_T *trypos));
- static pos_T *find_start_brace __ARGS((int));
- static pos_T *find_match_paren __ARGS((int, int));
-! static int corr_ind_maxparen __ARGS((int ind_maxparen, pos_T *startpos));
-! static int find_last_paren __ARGS((char_u *l, int start, int end));
- static int find_match __ARGS((int lookfor, linenr_T ourscope, int ind_maxparen, int ind_maxcomment));
-
- /*
-***************
-*** 4503,4509 ****
- continue;
-
- curwin->w_cursor = cursor_save;
-! if (cin_isterminated(line, TRUE)
- || cin_isscopedecl(line)
- || cin_iscase(line)
- || (cin_islabel_skip(&line) && cin_nocode(line)))
---- 4510,4516 ----
- continue;
-
- curwin->w_cursor = cursor_save;
-! if (cin_isterminated(line, TRUE, FALSE)
- || cin_isscopedecl(line)
- || cin_iscase(line)
- || (cin_islabel_skip(&line) && cin_nocode(line)))
-***************
-*** 4517,4522 ****
---- 4524,4550 ----
- }
-
- /*
-+ * Recognize structure initialization and enumerations.
-+ * Q&D-Implementation:
-+ * check for "=" at end or "enum" at beginning of line.
-+ */
-+ int
-+ cin_isinit(void)
-+ {
-+ char_u *s;
-+
-+ s = cin_skipcomment(ml_get_curline());
-+
-+ if (STRNCMP(s, "enum", 4) == 0 && !vim_isIDc(s[4]))
-+ return TRUE;
-+
-+ if (cin_ends_in(s, (char_u *)"=", (char_u *)"{"))
-+ return TRUE;
-+
-+ return FALSE;
-+ }
-+
-+ /*
- * Recognize a switch label: "case .*:" or "default:".
- */
- int
-***************
-*** 4677,4682 ****
---- 4705,4808 ----
- }
-
- /*
-+ * Return the indent of the first variable name after a type in a declaration.
-+ * int a, indent of "a"
-+ * static struct foo b, indent of "b"
-+ * enum bla c, indent of "c"
-+ * Returns zero when it doesn't look like a declaration.
-+ */
-+ static int
-+ cin_first_id_amount()
-+ {
-+ char_u *line, *p, *s;
-+ int len;
-+ pos_T fp;
-+ colnr_T col;
-+
-+ line = ml_get_curline();
-+ p = skipwhite(line);
-+ len = skiptowhite(p) - p;
-+ if (len == 6 && STRNCMP(p, "static", 6) == 0)
-+ {
-+ p = skipwhite(p + 6);
-+ len = skiptowhite(p) - p;
-+ }
-+ if (len == 6 && STRNCMP(p, "struct", 6) == 0)
-+ p = skipwhite(p + 6);
-+ else if (len == 4 && STRNCMP(p, "enum", 4) == 0)
-+ p = skipwhite(p + 4);
-+ else if ((len == 8 && STRNCMP(p, "unsigned", 8) == 0)
-+ || (len == 6 && STRNCMP(p, "signed", 6) == 0))
-+ {
-+ s = skipwhite(p + len);
-+ if ((STRNCMP(s, "int", 3) == 0 && vim_iswhite(s[3]))
-+ || (STRNCMP(s, "long", 4) == 0 && vim_iswhite(s[4]))
-+ || (STRNCMP(s, "short", 5) == 0 && vim_iswhite(s[5]))
-+ || (STRNCMP(s, "char", 4) == 0 && vim_iswhite(s[4])))
-+ p = s;
-+ }
-+ for (len = 0; vim_isIDc(p[len]); ++len)
-+ ;
-+ if (len == 0 || !vim_iswhite(p[len]) || cin_nocode(p))
-+ return 0;
-+
-+ p = skipwhite(p + len);
-+ fp.lnum = curwin->w_cursor.lnum;
-+ fp.col = (colnr_T)(p - line);
-+ getvcol(curwin, &fp, &col, NULL, NULL);
-+ return (int)col;
-+ }
-+
-+ /*
-+ * Return the indent of the first non-blank after an equal sign.
-+ * char *foo = "here";
-+ * Return zero if no (useful) equal sign found.
-+ * Return -1 if the line above "lnum" ends in a backslash.
-+ * foo = "asdf\
-+ * asdf\
-+ * here";
-+ */
-+ static int
-+ cin_get_equal_amount(lnum)
-+ linenr_T lnum;
-+ {
-+ char_u *line;
-+ char_u *s;
-+ colnr_T col;
-+ pos_T fp;
-+
-+ if (lnum > 1)
-+ {
-+ line = ml_get(lnum - 1);
-+ if (*line != NUL && line[STRLEN(line) - 1] == '\\')
-+ return -1;
-+ }
-+
-+ line = s = ml_get(lnum);
-+ while (*s != NUL && vim_strchr((char_u *)"=;{}\"'", *s) == NULL)
-+ {
-+ if (cin_iscomment(s)) /* ignore comments */
-+ s = cin_skipcomment(s);
-+ else
-+ ++s;
-+ }
-+ if (*s != '=')
-+ return 0;
-+
-+ s = skipwhite(s + 1);
-+ if (cin_nocode(s))
-+ return 0;
-+
-+ if (*s == '"') /* nice alignment for continued strings */
-+ ++s;
-+
-+ fp.lnum = lnum;
-+ fp.col = (colnr_T)(s - line);
-+ getvcol(curwin, &fp, &col, NULL, NULL);
-+ return (int)col;
-+ }
-+
-+ /*
- * Recognize a preprocessor statement: Any line that starts with '#'.
- */
- static int
-***************
-*** 4690,4695 ****
---- 4816,4855 ----
- }
-
- /*
-+ * Return TRUE if line "*pp" at "*lnump" is a preprocessor statement or a
-+ * continuation line of a preprocessor statement. Decrease "*lnump" to the
-+ * start and return the line in "*pp".
-+ */
-+ static int
-+ cin_ispreproc_cont(pp, lnump)
-+ char_u **pp;
-+ linenr_T *lnump;
-+ {
-+ char_u *line = *pp;
-+ linenr_T lnum = *lnump;
-+ int retval = FALSE;
-+
-+ while (1)
-+ {
-+ if (cin_ispreproc(line))
-+ {
-+ retval = TRUE;
-+ *lnump = lnum;
-+ break;
-+ }
-+ if (lnum == 1)
-+ break;
-+ line = ml_get(--lnum);
-+ if (*line == NUL || line[STRLEN(line) - 1] != '\\')
-+ break;
-+ }
-+
-+ if (lnum != *lnump)
-+ *pp = ml_get(*lnump);
-+ return retval;
-+ }
-+
-+ /*
- * Recognize the start of a C or C++ comment.
- */
- static int
-***************
-*** 4712,4752 ****
- /*
- * Recognize a line that starts with '{' or '}', or ends with ';', '{' or '}'.
- * Don't consider "} else" a terminated line.
-! * Also consider a line terminated if it ends in ','. This is not 100%
-! * correct, but this mostly means we are in initializations and then it's OK.
- */
- static int
-! cin_isterminated(s, incl_open)
- char_u *s;
- int incl_open; /* include '{' at the end as terminator */
- {
- s = cin_skipcomment(s);
-
- if (*s == '{' || (*s == '}' && !cin_iselse(s)))
-! return TRUE;
-
- while (*s)
- {
- /* skip over comments, "" strings and 'c'haracters */
- s = skip_string(cin_skipcomment(s));
-! if ((*s == ';' || (incl_open && *s == '{') || *s == '}' || *s == ',')
-! && cin_nocode(s + 1))
-! return TRUE;
- if (*s)
- s++;
- }
-! return FALSE;
- }
-
- /*
- * Recognize the basic picture of a function declaration -- it needs to
- * have an open paren somewhere and a close paren at the end of the line and
- * no semicolons anywhere.
- */
- static int
-! cin_isfuncdecl(s)
-! char_u *s;
- {
- while (*s && *s != '(' && *s != ';' && *s != '\'' && *s != '"')
- {
- if (cin_iscomment(s)) /* ignore comments */
---- 4872,4931 ----
- /*
- * Recognize a line that starts with '{' or '}', or ends with ';', '{' or '}'.
- * Don't consider "} else" a terminated line.
-! * Return the character terminating the line (ending char's have precedence if
-! * both apply in order to determine initializations).
- */
- static int
-! cin_isterminated(s, incl_open, incl_comma)
- char_u *s;
- int incl_open; /* include '{' at the end as terminator */
-+ int incl_comma; /* recognize a trailing comma */
- {
-+ char_u found_start = 0;
-+
- s = cin_skipcomment(s);
-
- if (*s == '{' || (*s == '}' && !cin_iselse(s)))
-! found_start = *s;
-
- while (*s)
- {
- /* skip over comments, "" strings and 'c'haracters */
- s = skip_string(cin_skipcomment(s));
-! if ((*s == ';' || (incl_open && *s == '{') || *s == '}'
-! || (incl_comma && *s == ','))
-! && cin_nocode(s + 1))
-! return *s;
-!
- if (*s)
- s++;
- }
-! return found_start;
- }
-
- /*
- * Recognize the basic picture of a function declaration -- it needs to
- * have an open paren somewhere and a close paren at the end of the line and
- * no semicolons anywhere.
-+ * When a line ends in a comma we continue looking in the next line.
-+ * "sp" points to a string with the line. When looking at other lines it must
-+ * be restored to the line. When it's NULL fetch lines here.
-+ * "lnum" is where we start looking.
- */
- static int
-! cin_isfuncdecl(sp, first_lnum)
-! char_u **sp;
-! linenr_T first_lnum;
- {
-+ char_u *s;
-+ linenr_T lnum = first_lnum;
-+ int retval = FALSE;
-+
-+ if (sp == NULL)
-+ s = ml_get(lnum);
-+ else
-+ s = *sp;
-+
- while (*s && *s != '(' && *s != ';' && *s != '\'' && *s != '"')
- {
- if (cin_iscomment(s)) /* ignore comments */
-***************
-*** 4760,4772 ****
- while (*s && *s != ';' && *s != '\'' && *s != '"')
- {
- if (*s == ')' && cin_nocode(s + 1))
-! return TRUE;
-! if (cin_iscomment(s)) /* ignore comments */
- s = cin_skipcomment(s);
- else
- ++s;
- }
-! return FALSE;
- }
-
- static int
---- 4939,4975 ----
- while (*s && *s != ';' && *s != '\'' && *s != '"')
- {
- if (*s == ')' && cin_nocode(s + 1))
-! {
-! /* ')' at the end: may have found a match
-! * Check for he previous line not to end in a backslash:
-! * #if defined(x) && \
-! * defined(y)
-! */
-! lnum = first_lnum - 1;
-! s = ml_get(lnum);
-! if (*s == NUL || s[STRLEN(s) - 1] != '\\')
-! retval = TRUE;
-! goto done;
-! }
-! if (*s == ',' && cin_nocode(s + 1))
-! {
-! /* ',' at the end: continue looking in the next line */
-! if (lnum >= curbuf->b_ml.ml_line_count)
-! break;
-!
-! s = ml_get(++lnum);
-! }
-! else if (cin_iscomment(s)) /* ignore comments */
- s = cin_skipcomment(s);
- else
- ++s;
- }
-!
-! done:
-! if (lnum != first_lnum && sp != NULL)
-! *sp = ml_get(first_lnum);
-!
-! return retval;
- }
-
- static int
-***************
-*** 4829,4842 ****
- return retval;
- }
-
- /*
- * Return TRUE if string "s" ends with the string "find", possibly followed by
- * white space and comments. Skip strings and comments.
- */
- static int
-! cin_ends_in(s, find)
- char_u *s;
- char_u *find;
- {
- char_u *p = s;
- char_u *r;
---- 5032,5150 ----
- return retval;
- }
-
-+ static int
-+ cin_isbreak(p)
-+ char_u *p;
-+ {
-+ return (STRNCMP(p, "break", 5) == 0 && !vim_isIDc(p[5]));
-+ }
-+
-+ /* Find the position of a C++ base-class declaration or
-+ * constructor-initialization. eg:
-+ *
-+ * class MyClass :
-+ * baseClass <-- here
-+ * class MyClass : public baseClass,
-+ * anotherBaseClass <-- here (should probably lineup ??)
-+ * MyClass::MyClass(...) :
-+ * baseClass(...) <-- here (constructor-initialization)
-+ */
-+ static int
-+ cin_is_cpp_baseclass(line, col)
-+ char_u *line;
-+ colnr_T *col;
-+ {
-+ char_u *s;
-+ int class_or_struct, lookfor_ctor_init, cpp_base_class;
-+
-+ *col = 0;
-+
-+ s = cin_skipcomment(line);
-+ if (*s == NUL)
-+ return FALSE;
-+
-+ cpp_base_class = lookfor_ctor_init = class_or_struct = FALSE;
-+
-+ while(*s != NUL)
-+ {
-+ if (s[0] == ':')
-+ {
-+ if (s[1] == ':')
-+ {
-+ /* skip double colon. It can't be a constructor
-+ * initialization any more */
-+ lookfor_ctor_init = FALSE;
-+ s = cin_skipcomment(s + 2);
-+ }
-+ else if (lookfor_ctor_init || class_or_struct)
-+ {
-+ /* we have something found, that looks like the start of
-+ * cpp-base-class-declaration or contructor-initialization */
-+ cpp_base_class = TRUE;
-+ lookfor_ctor_init = class_or_struct = FALSE;
-+ *col = 0;
-+ s = cin_skipcomment(s + 1);
-+ }
-+ else
-+ s = cin_skipcomment(s + 1);
-+ }
-+ else if ((STRNCMP(s, "class", 5) == 0 && !vim_isIDc(s[5]))
-+ || (STRNCMP(s, "struct", 6) == 0 && !vim_isIDc(s[6])))
-+ {
-+ class_or_struct = TRUE;
-+ lookfor_ctor_init = FALSE;
-+
-+ if (*s == 'c')
-+ s = cin_skipcomment(s + 5);
-+ else
-+ s = cin_skipcomment(s + 6);
-+ }
-+ else
-+ {
-+ if (s[0] == '{' || s[0] == '}' || s[0] == ';')
-+ {
-+ cpp_base_class = lookfor_ctor_init = class_or_struct = FALSE;
-+ }
-+ else if (s[0] == ')')
-+ {
-+ /* Constructor-initialization is assumed if we come across
-+ * something like "):" */
-+ class_or_struct = FALSE;
-+ lookfor_ctor_init = TRUE;
-+ }
-+ else if (!vim_isIDc(s[0]))
-+ {
-+ /* if it is not an identifier, we are wrong */
-+ class_or_struct = FALSE;
-+ lookfor_ctor_init = FALSE;
-+ }
-+ else if (*col == 0)
-+ {
-+ /* it can't be a constructor-initialization any more */
-+ lookfor_ctor_init = FALSE;
-+
-+ /* the first statement starts here: lineup with this one... */
-+ if (cpp_base_class && *col == 0)
-+ *col = (colnr_T)(s - line);
-+ }
-+
-+ s = cin_skipcomment(s + 1);
-+ }
-+ }
-+
-+ return cpp_base_class;
-+ }
-+
- /*
- * Return TRUE if string "s" ends with the string "find", possibly followed by
- * white space and comments. Skip strings and comments.
-+ * Ignore "ignore" after "find" if it's not NULL.
- */
- static int
-! cin_ends_in(s, find, ignore)
- char_u *s;
- char_u *find;
-+ char_u *ignore;
- {
- char_u *p = s;
- char_u *r;
-***************
-*** 4848,4854 ****
- if (STRNCMP(p, find, len) == 0)
- {
- r = skipwhite(p + len);
-! if (*r == NUL || cin_iscomment(r))
- return TRUE;
- }
- if (*p != NUL)
---- 5156,5164 ----
- if (STRNCMP(p, find, len) == 0)
- {
- r = skipwhite(p + len);
-! if (ignore != NULL && STRNCMP(r, ignore, STRLEN(ignore)) == 0)
-! r = skipwhite(r + STRLEN(ignore));
-! if (cin_nocode(r))
- return TRUE;
- }
- if (*p != NUL)
-***************
-*** 4951,4974 ****
- }
-
- /*
-! * Set w_cursor.col to the column number of the last ')' in line "l".
- */
- static int
-! find_last_paren(l)
-! char_u *l;
- {
-! int i;
-! int retval = FALSE;
-
- curwin->w_cursor.col = 0; /* default is start of line */
-
- for (i = 0; l[i]; i++)
- {
- i = (int)(skip_string(l + i) - l); /* ignore parens in quotes */
-! if (l[i] == ')')
- {
-! curwin->w_cursor.col = i;
-! retval = TRUE;
- }
- }
- return retval;
---- 5261,5313 ----
- }
-
- /*
-! * Return ind_maxparen corrected for the difference in line number between the
-! * cursor position and "startpos". This makes sure that searching for a
-! * matching paren above the cursor line doesn't find a match because of
-! * looking a few lines further.
- */
- static int
-! corr_ind_maxparen(ind_maxparen, startpos)
-! int ind_maxparen;
-! pos_T *startpos;
- {
-! long n = (long)startpos->lnum - (long)curwin->w_cursor.lnum;
-!
-! if (n > 0 && n < ind_maxparen / 2)
-! return ind_maxparen - (int)n;
-! return ind_maxparen;
-! }
-!
-! /*
-! * Set w_cursor.col to the column number of the last unmatched ')' or '{' in
-! * line "l".
-! */
-! static int
-! find_last_paren(l, start, end)
-! char_u *l;
-! int start, end;
-! {
-! int i;
-! int retval = FALSE;
-! int open_count = 0;
-
- curwin->w_cursor.col = 0; /* default is start of line */
-
- for (i = 0; l[i]; i++)
- {
-+ i = (int)(cin_skipcomment(l + i) - l); /* ignore parens in comments */
- i = (int)(skip_string(l + i) - l); /* ignore parens in quotes */
-! if (l[i] == start)
-! ++open_count;
-! else if (l[i] == end)
- {
-! if (open_count > 0)
-! --open_count;
-! else
-! {
-! curwin->w_cursor.col = i;
-! retval = TRUE;
-! }
- }
- }
- return retval;
-***************
-*** 5030,5035 ****
---- 5369,5379 ----
- int ind_case_code = curbuf->b_p_sw;
-
- /*
-+ * lineup break at end of case in switch() with case label
-+ */
-+ int ind_case_break = 0;
-+
-+ /*
- * spaces from the class declaration indent a scope declaration label
- * should be located
- */
-***************
-*** 5051,5056 ****
---- 5395,5406 ----
- int ind_func_type = curbuf->b_p_sw;
-
- /*
-+ * amount a cpp base class declaration or constructor initialization
-+ * should be indented
-+ */
-+ int ind_cpp_baseclass = curbuf->b_p_sw;
-+
-+ /*
- * additional spaces beyond the prevailing indent a continuation line
- * should be located
- */
-***************
-*** 5074,5079 ****
---- 5424,5436 ----
- int ind_unclosed_noignore = 0;
-
- /*
-+ * If the opening paren is the last nonwhite character on the line, and
-+ * ind_unclosed_wrapped is nonzero, use this indent relative to the outer
-+ * context (for very long lines).
-+ */
-+ int ind_unclosed_wrapped = 0;
-+
-+ /*
- * suppress ignoring white space when lining up with the character after
- * an unclosed parentheses.
- */
-***************
-*** 5139,5145 ****
---- 5496,5504 ----
- linenr_T ourscope;
- char_u *l;
- char_u *look;
-+ char_u terminated;
- int lookfor;
-+ #define LOOKFOR_INITIAL 0
- #define LOOKFOR_IF 1
- #define LOOKFOR_DO 2
- #define LOOKFOR_CASE 3
-***************
-*** 5147,5152 ****
---- 5506,5515 ----
- #define LOOKFOR_TERM 5
- #define LOOKFOR_UNTERM 6
- #define LOOKFOR_SCOPEDECL 7
-+ #define LOOKFOR_NOBREAK 8
-+ #define LOOKFOR_CPP_BASECLASS 9
-+ #define LOOKFOR_ENUM_OR_INIT 10
-+
- int whilelevel;
- linenr_T lnum;
- char_u *options;
-***************
-*** 5154,5159 ****
---- 5517,5524 ----
- int divider;
- int n;
- int iscase;
-+ int lookfor_break;
-+ int cont_amount = 0; /* amount for continuation line */
-
- for (options = curbuf->b_p_cino; *options; )
- {
-***************
-*** 5201,5215 ****
---- 5566,5583 ----
- case '^': ind_open_left_imag = n; break;
- case ':': ind_case = n; break;
- case '=': ind_case_code = n; break;
-+ case 'b': ind_case_break = n; break;
- case 'p': ind_param = n; break;
- case 't': ind_func_type = n; break;
- case '/': ind_comment = n; break;
- case 'c': ind_in_comment = n; break;
- case 'C': ind_in_comment2 = n; break;
-+ case 'i': ind_cpp_baseclass = n; break;
- case '+': ind_continuation = n; break;
- case '(': ind_unclosed = n; break;
- case 'u': ind_unclosed2 = n; break;
- case 'U': ind_unclosed_noignore = n; break;
-+ case 'W': ind_unclosed_wrapped = n; break;
- case 'w': ind_unclosed_whiteok = n; break;
- case 'm': ind_matching_paren = n; break;
- case ')': ind_maxparen = n; break;
-***************
-*** 5454,5487 ****
- * a previous non-empty line that matches the same paren.
- */
- amount = -1;
- our_paren_pos = *trypos;
-! if (theline[0] != ')')
- {
-! for (lnum = cur_curpos.lnum - 1; lnum > our_paren_pos.lnum; --lnum)
-! {
-! l = skipwhite(ml_get(lnum));
-! if (cin_nocode(l)) /* skip comment lines */
-! continue;
-! if (cin_ispreproc(l)) /* ignore #defines, #if, etc. */
-! continue;
-! curwin->w_cursor.lnum = lnum;
-
-! /* Skip a comment. XXX */
-! if ((trypos = find_start_comment(ind_maxcomment)) != NULL)
-! {
-! lnum = trypos->lnum + 1;
-! continue;
-! }
-
-! /* XXX */
-! if ((trypos = find_match_paren(ind_maxparen,
-! ind_maxcomment)) != NULL &&
-! trypos->lnum == our_paren_pos.lnum &&
-! trypos->col == our_paren_pos.col)
-! {
- amount = get_indent_lnum(lnum); /* XXX */
-! break;
-! }
- }
- }
-
---- 5822,5861 ----
- * a previous non-empty line that matches the same paren.
- */
- amount = -1;
-+ cur_amount = MAXCOL;
- our_paren_pos = *trypos;
-! for (lnum = cur_curpos.lnum - 1; lnum > our_paren_pos.lnum; --lnum)
- {
-! l = skipwhite(ml_get(lnum));
-! if (cin_nocode(l)) /* skip comment lines */
-! continue;
-! if (cin_ispreproc_cont(&l, &lnum)) /* ignore #defines, #if, etc. */
-! continue;
-! curwin->w_cursor.lnum = lnum;
-
-! /* Skip a comment. XXX */
-! if ((trypos = find_start_comment(ind_maxcomment)) != NULL)
-! {
-! lnum = trypos->lnum + 1;
-! continue;
-! }
-
-! /* XXX */
-! if ((trypos = find_match_paren(
-! corr_ind_maxparen(ind_maxparen, &cur_curpos),
-! ind_maxcomment)) != NULL
-! && trypos->lnum == our_paren_pos.lnum
-! && trypos->col == our_paren_pos.col)
-! {
- amount = get_indent_lnum(lnum); /* XXX */
-!
-! if (theline[0] == ')')
-! {
-! if (our_paren_pos.lnum != lnum && cur_amount > amount)
-! cur_amount = amount;
-! amount = -1;
-! }
-! break;
- }
- }
-
-***************
-*** 5493,5514 ****
- if (amount == -1)
- {
- amount = skip_label(our_paren_pos.lnum, &look, ind_maxcomment);
-- cur_amount = MAXCOL;
- if (theline[0] == ')' || ind_unclosed == 0
- || (!ind_unclosed_noignore && *skipwhite(look) == '('))
- {
- /*
- * If we're looking at a close paren, line up right there;
- * otherwise, line up with the next (non-white) character.
- */
- if (theline[0] != ')')
- {
-! if (ind_unclosed_whiteok)
- our_paren_pos.col++;
- else
- {
- col = our_paren_pos.col + 1;
-- l = ml_get(our_paren_pos.lnum);
- while (vim_iswhite(l[col]))
- col++;
- if (l[col] != NUL) /* In case of trailing space */
---- 5867,5917 ----
- if (amount == -1)
- {
- amount = skip_label(our_paren_pos.lnum, &look, ind_maxcomment);
- if (theline[0] == ')' || ind_unclosed == 0
- || (!ind_unclosed_noignore && *skipwhite(look) == '('))
- {
- /*
- * If we're looking at a close paren, line up right there;
- * otherwise, line up with the next (non-white) character.
-+ * When ind_unclosed_wrapped is set and the matching paren is
-+ * the last nonwhite character of the line, use either the
-+ * indent of the current line or the indentation of the next
-+ * outer paren and add ind_unclosed_wrapped (for very long
-+ * lines).
- */
- if (theline[0] != ')')
- {
-! cur_amount = MAXCOL;
-! l = ml_get(our_paren_pos.lnum);
-! if (ind_unclosed_wrapped
-! && cin_ends_in(l, (char_u *)"(", NULL))
-! {
-! /* look for opening unmatched paren, indent one level
-! * for each additional level */
-! n = 1;
-! for (col = 0; col < our_paren_pos.col; ++col)
-! {
-! switch (l[col])
-! {
-! case '(':
-! case '{': ++n;
-! break;
-!
-! case ')':
-! case '}': if (n > 1)
-! --n;
-! break;
-! }
-! }
-!
-! our_paren_pos.col = 0;
-! amount += n * ind_unclosed_wrapped;
-! }
-! else if (ind_unclosed_whiteok)
- our_paren_pos.col++;
- else
- {
- col = our_paren_pos.col + 1;
- while (vim_iswhite(l[col]))
- col++;
- if (l[col] != NUL) /* In case of trailing space */
-***************
-*** 5522,5529 ****
- * Find how indented the paren is, or the character after it
- * if we did the above "if".
- */
-! getvcol(curwin, &our_paren_pos, &col, NULL, NULL);
-! cur_amount = col;
- }
-
- if (theline[0] == ')' && ind_matching_paren)
---- 5925,5936 ----
- * Find how indented the paren is, or the character after it
- * if we did the above "if".
- */
-! if (our_paren_pos.col > 0)
-! {
-! getvcol(curwin, &our_paren_pos, &col, NULL, NULL);
-! if (cur_amount > (int)col)
-! cur_amount = col;
-! }
- }
-
- if (theline[0] == ')' && ind_matching_paren)
-***************
-*** 5532,5538 ****
- }
- else if (ind_unclosed == 0 || (!ind_unclosed_noignore
- && *skipwhite(look) == '('))
-! amount = cur_amount;
- else
- {
- /* add ind_unclosed2 for each '(' before our matching one */
---- 5939,5948 ----
- }
- else if (ind_unclosed == 0 || (!ind_unclosed_noignore
- && *skipwhite(look) == '('))
-! {
-! if (cur_amount != MAXCOL)
-! amount = cur_amount;
-! }
- else
- {
- /* add ind_unclosed2 for each '(' before our matching one */
-***************
-*** 5622,5629 ****
- * matching it will take us back to the start of the line.
- */
- lnum = ourscope;
-! if (find_last_paren(start) &&
-! (trypos = find_match_paren(ind_maxparen,
- ind_maxcomment)) != NULL)
- lnum = trypos->lnum;
-
---- 6032,6039 ----
- * matching it will take us back to the start of the line.
- */
- lnum = ourscope;
-! if (find_last_paren(start, '(', ')')
-! && (trypos = find_match_paren(ind_maxparen,
- ind_maxcomment)) != NULL)
- lnum = trypos->lnum;
-
-***************
-*** 5662,5674 ****
- * If we're looking at a "while", try to find a "do"
- * to match it with.
- */
-! lookfor = 0;
- if (cin_iselse(theline))
- lookfor = LOOKFOR_IF;
- else if (cin_iswhileofdo(theline, cur_curpos.lnum, ind_maxparen))
- /* XXX */
- lookfor = LOOKFOR_DO;
-! if (lookfor)
- {
- curwin->w_cursor.lnum = cur_curpos.lnum;
- if (find_match(lookfor, ourscope, ind_maxparen,
---- 6072,6084 ----
- * If we're looking at a "while", try to find a "do"
- * to match it with.
- */
-! lookfor = LOOKFOR_INITIAL;
- if (cin_iselse(theline))
- lookfor = LOOKFOR_IF;
- else if (cin_iswhileofdo(theline, cur_curpos.lnum, ind_maxparen))
- /* XXX */
- lookfor = LOOKFOR_DO;
-! if (lookfor != LOOKFOR_INITIAL)
- {
- curwin->w_cursor.lnum = cur_curpos.lnum;
- if (find_match(lookfor, ourscope, ind_maxparen,
-***************
-*** 5709,5714 ****
---- 6119,6126 ----
- }
- }
-
-+ lookfor_break = FALSE;
-+
- if (cin_iscase(theline)) /* it's a switch() label */
- {
- lookfor = LOOKFOR_CASE; /* find a previous switch() label */
-***************
-*** 5721,5727 ****
- }
- else
- {
-! lookfor = LOOKFOR_ANY;
- amount += ind_level; /* ind_level from start of block */
- }
- scope_amount = amount;
---- 6133,6142 ----
- }
- else
- {
-! if (ind_case_break && cin_isbreak(theline)) /* break; ... */
-! lookfor_break = TRUE;
-!
-! lookfor = LOOKFOR_INITIAL;
- amount += ind_level; /* ind_level from start of block */
- }
- scope_amount = amount;
-***************
-*** 5747,5755 ****
- */
- if (curwin->w_cursor.lnum <= ourscope)
- {
-! if (lookfor == LOOKFOR_UNTERM)
-! amount += ind_continuation;
-! else if (lookfor != LOOKFOR_TERM)
- {
- amount = scope_amount;
- if (theline[0] == '{')
---- 6162,6282 ----
- */
- if (curwin->w_cursor.lnum <= ourscope)
- {
-! /* we reached end of scope:
-! * if looking for a enum or structure initialization
-! * go further back:
-! * if it is an initializer (enum xxx or xxx =), then
-! * don't add ind_continuation, otherwise it is a variable
-! * declaration:
-! * int x,
-! * here; <-- add ind_continuation
-! */
-! if (lookfor == LOOKFOR_ENUM_OR_INIT)
-! {
-! if (curwin->w_cursor.lnum == 0
-! || curwin->w_cursor.lnum
-! < ourscope - ind_maxparen)
-! {
-! /* nothing found (abuse ind_maxparen as limit)
-! * assume terminated line (i.e. a variable
-! * initialization) */
-! if (cont_amount > 0)
-! amount = cont_amount;
-! else
-! amount += ind_continuation;
-! break;
-! }
-!
-! l = ml_get_curline();
-!
-! /*
-! * If we're in a comment now, skip to the start of the
-! * comment.
-! */
-! trypos = find_start_comment(ind_maxcomment);
-! if (trypos != NULL)
-! {
-! curwin->w_cursor.lnum = trypos->lnum + 1;
-! continue;
-! }
-!
-! /*
-! * Skip preprocessor directives and blank lines.
-! */
-! if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum))
-! continue;
-!
-! if (cin_nocode(l))
-! continue;
-!
-! /*
-! * If we are at top level and the line looks like a
-! * function declaration, we are done
-! * (it's a variable declaration).
-! */
-! if (start_brace != BRACE_IN_COL0
-! || !cin_isfuncdecl(&l, curwin->w_cursor.lnum))
-! {
-! terminated = cin_isterminated(l, FALSE, TRUE);
-!
-! /* if the line is terminated with another ','
-! * it is a continued variable initialization.
-! * don't add extra indent.
-! * TODO: does not work, if a function
-! * declaration is split over multiple lines:
-! * cin_isfuncdecl returns FALSE then.
-! */
-! if (terminated == ',')
-! break;
-!
-! /* if it es a enum declaration or an assignment,
-! * we are done.
-! */
-! if (terminated != ';' && cin_isinit())
-! break;
-!
-! /* nothing useful found */
-! if (terminated == 0 || terminated == '{')
-! continue;
-! }
-!
-! /* Skip parens and braces. Position the cursor over
-! * the rightmost paren, so that matching it will take
-! * us back to the start of the line.
-! */ /* XXX */
-! trypos = NULL;
-! if (find_last_paren(l, '(', ')'))
-! trypos = find_match_paren(ind_maxparen,
-! ind_maxcomment);
-!
-! if (trypos == NULL && find_last_paren(l, '{', '}'))
-! trypos = find_start_brace(ind_maxcomment);
-!
-! if (trypos != NULL)
-! {
-! curwin->w_cursor.lnum = trypos->lnum + 1;
-! continue;
-! }
-!
-! /* it's a variable declaration, add indentation
-! * like in
-! * int a,
-! * b;
-! */
-! if (cont_amount > 0)
-! amount = cont_amount;
-! else
-! amount += ind_continuation;
-! }
-! else if (lookfor == LOOKFOR_UNTERM)
-! {
-! if (cont_amount > 0)
-! amount = cont_amount;
-! else
-! amount += ind_continuation;
-! }
-! else if (lookfor != LOOKFOR_TERM
-! && lookfor != LOOKFOR_CPP_BASECLASS)
- {
- amount = scope_amount;
- if (theline[0] == '{')
-***************
-*** 5776,5781 ****
---- 6303,6313 ----
- iscase = cin_iscase(l);
- if (iscase || cin_isscopedecl(l))
- {
-+ /* we are only looking for cpp base class
-+ * declaration/initialization any longer */
-+ if (lookfor == LOOKFOR_CPP_BASECLASS)
-+ break;
-+
- /* When looking for a "do" we are not interested in
- * labels. */
- if (whilelevel > 0)
-***************
-*** 5786,5794 ****
- * c = 99 + <- this indent plus continuation
- *-> here;
- */
-! if (lookfor == LOOKFOR_UNTERM)
- {
-! amount += ind_continuation;
- break;
- }
-
---- 6318,6330 ----
- * c = 99 + <- this indent plus continuation
- *-> here;
- */
-! if (lookfor == LOOKFOR_UNTERM
-! || lookfor == LOOKFOR_ENUM_OR_INIT)
- {
-! if (cont_amount > 0)
-! amount = cont_amount;
-! else
-! amount += ind_continuation;
- break;
- }
-
-***************
-*** 5798,5803 ****
---- 6334,6340 ----
- * case yy:
- */
- if ( (iscase && lookfor == LOOKFOR_CASE)
-+ || (iscase && lookfor_break)
- || (!iscase && lookfor == LOOKFOR_SCOPEDECL))
- {
- /*
-***************
-*** 5829,5835 ****
- {
- if (n)
- amount = n;
-! break;
- }
-
- /*
---- 6366,6374 ----
- {
- if (n)
- amount = n;
-!
-! if (!lookfor_break)
-! break;
- }
-
- /*
-***************
-*** 5858,5873 ****
- */
- scope_amount = get_indent() + (iscase /* XXX */
- ? ind_case_code : ind_scopedecl_code);
-! lookfor = LOOKFOR_ANY;
- continue;
- }
-
- /*
- * Looking for a switch() label or C++ scope declaration,
-! * ignore other lines.
- */
- if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL)
- continue;
-
- /*
- * Ignore jump labels with nothing after them.
---- 6397,6417 ----
- */
- scope_amount = get_indent() + (iscase /* XXX */
- ? ind_case_code : ind_scopedecl_code);
-! lookfor = ind_case_break ? LOOKFOR_NOBREAK : LOOKFOR_ANY;
- continue;
- }
-
- /*
- * Looking for a switch() label or C++ scope declaration,
-! * ignore other lines, skip {}-blocks.
- */
- if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL)
-+ {
-+ if (find_last_paren(l, '{', '}') && (trypos =
-+ find_start_brace(ind_maxcomment)) != NULL)
-+ curwin->w_cursor.lnum = trypos->lnum + 1;
- continue;
-+ }
-
- /*
- * Ignore jump labels with nothing after them.
-***************
-*** 5886,5898 ****
- * unlocked it)
- */
- l = ml_get_curline();
-! if (cin_ispreproc(l) || cin_nocode(l))
- continue;
-
- /*
- * What happens next depends on the line being terminated.
- */
-! if (!cin_isterminated(l, FALSE))
- {
- /*
- * if we're in the middle of a paren thing,
---- 6430,6496 ----
- * unlocked it)
- */
- l = ml_get_curline();
-! if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum)
-! || cin_nocode(l))
- continue;
-
- /*
-+ * Are we at the start of a cpp base class declaration or
-+ * constructor initialization?
-+ */ /* XXX */
-+ if (lookfor != LOOKFOR_TERM && ind_cpp_baseclass
-+ && cin_is_cpp_baseclass(l, &col))
-+ {
-+ if (lookfor == LOOKFOR_UNTERM)
-+ {
-+ if (cont_amount > 0)
-+ amount = cont_amount;
-+ else
-+ amount += ind_continuation;
-+ }
-+ else if (col == 0 || theline[0] == '{')
-+ {
-+ amount = get_indent();
-+ if (find_last_paren(l, '(', ')')
-+ && (trypos = find_match_paren(ind_maxparen,
-+ ind_maxcomment)) != NULL)
-+ amount = get_indent_lnum(trypos->lnum); /* XXX */
-+ if (theline[0] != '{')
-+ amount += ind_cpp_baseclass;
-+ }
-+ else
-+ {
-+ curwin->w_cursor.col = col;
-+ getvcol(curwin, &curwin->w_cursor, &col, NULL, NULL);
-+ amount = (int)col;
-+ }
-+ break;
-+ }
-+ else if (lookfor == LOOKFOR_CPP_BASECLASS)
-+ {
-+ /* only look, whether there is a cpp base class
-+ * declaration or initialization before the opening brace. */
-+ if (cin_isterminated(l, TRUE, FALSE))
-+ break;
-+ else
-+ continue;
-+ }
-+
-+ /*
- * What happens next depends on the line being terminated.
-+ * If terminated with a ',' only consider it terminating if
-+ * there is anoter unterminated statement behind, eg:
-+ * 123,
-+ * sizeof
-+ * here
-+ * Otherwise check whether it is a enumeration or structure
-+ * initialisation (not indented) or a variable declaration
-+ * (indented).
- */
-! terminated = cin_isterminated(l, FALSE, TRUE);
-!
-! if (terminated == 0 || (lookfor != LOOKFOR_UNTERM
-! && terminated == ','))
- {
- /*
- * if we're in the middle of a paren thing,
-***************
-*** 5905,5913 ****
- * position the cursor over the rightmost paren, so that
- * matching it will take us back to the start of the line.
- */
-! (void)find_last_paren(l);
-! if ((trypos = find_match_paren(ind_maxparen,
-! ind_maxcomment)) != NULL)
- {
- /*
- * Check if we are on a case label now. This is
---- 6503,6521 ----
- * position the cursor over the rightmost paren, so that
- * matching it will take us back to the start of the line.
- */
-! (void)find_last_paren(l, '(', ')');
-! trypos = find_match_paren(
-! corr_ind_maxparen(ind_maxparen, &cur_curpos),
-! ind_maxcomment);
-!
-! /*
-! * If we are looking for ',', we also look for matching
-! * braces.
-! */
-! if (trypos == NULL && find_last_paren(l, '{', '}'))
-! trypos = find_start_brace(ind_maxcomment);
-!
-! if (trypos != NULL)
- {
- /*
- * Check if we are on a case label now. This is
-***************
-*** 5925,5930 ****
---- 6533,6556 ----
- }
-
- /*
-+ * Skip over continuation lines to find the one to get the
-+ * indent from
-+ * char *usethis = "bla\
-+ * bla",
-+ * here;
-+ */
-+ if (terminated == ',')
-+ {
-+ while (curwin->w_cursor.lnum > 1)
-+ {
-+ l = ml_get(curwin->w_cursor.lnum - 1);
-+ if (*l == NUL || l[STRLEN(l) - 1] != '\\')
-+ break;
-+ --curwin->w_cursor.lnum;
-+ }
-+ }
-+
-+ /*
- * Get indent and pointer to text for current line,
- * ignoring any jump label. XXX
- */
-***************
-*** 5938,5944 ****
- * -> {
- * }
- */
-! if (lookfor != LOOKFOR_TERM && theline[0] == '{')
- {
- amount = cur_amount;
- /*
---- 6564,6571 ----
- * -> {
- * }
- */
-! if (terminated != ',' && lookfor != LOOKFOR_TERM
-! && theline[0] == '{')
- {
- amount = cur_amount;
- /*
-***************
-*** 5950,5955 ****
---- 6577,6590 ----
- */
- if (*skipwhite(l) != '{')
- amount += ind_open_extra;
-+
-+ if (ind_cpp_baseclass)
-+ {
-+ /* have to look back, whether it is a cpp base
-+ * class declaration or initialization */
-+ lookfor = LOOKFOR_CPP_BASECLASS;
-+ continue;
-+ }
- break;
- }
-
-***************
-*** 5966,5974 ****
- * 100 +
- * -> here;
- */
-! if (lookfor == LOOKFOR_UNTERM)
- {
-! amount += ind_continuation;
- break;
- }
-
---- 6601,6613 ----
- * 100 +
- * -> here;
- */
-! if (lookfor == LOOKFOR_UNTERM
-! || lookfor == LOOKFOR_ENUM_OR_INIT)
- {
-! if (cont_amount > 0)
-! amount = cont_amount;
-! else
-! amount += ind_continuation;
- break;
- }
-
-***************
-*** 6040,6056 ****
- * -> here;
- */
- if (lookfor == LOOKFOR_UNTERM)
- break;
-
-! /*
-! * Found first unterminated line on a row, may line up
-! * with this line, remember its indent
-! * 100 +
-! * -> here;
-! */
-! amount = cur_amount;
-! if (lookfor != LOOKFOR_TERM)
-! lookfor = LOOKFOR_UNTERM;
- }
- }
-
---- 6679,6750 ----
- * -> here;
- */
- if (lookfor == LOOKFOR_UNTERM)
-+ {
-+ /* When line ends in a comma add extra indent */
-+ if (terminated == ',')
-+ amount += ind_continuation;
- break;
-+ }
-
-! if (lookfor == LOOKFOR_ENUM_OR_INIT)
-! {
-! /* Found two lines ending in ',', lineup with the
-! * lowest one, but check for cpp base class
-! * declaration/initialization, if it is an
-! * opening brace or we are looking just for
-! * enumerations/initializations. */
-! if (terminated == ',')
-! {
-! if (ind_cpp_baseclass == 0)
-! break;
-!
-! lookfor = LOOKFOR_CPP_BASECLASS;
-! continue;
-! }
-!
-! /* Ignore unterminated lines in between, but
-! * reduce indent. */
-! if (amount > cur_amount)
-! amount = cur_amount;
-! }
-! else
-! {
-! /*
-! * Found first unterminated line on a row, may
-! * line up with this line, remember its indent
-! * 100 +
-! * -> here;
-! */
-! amount = cur_amount;
-!
-! /*
-! * If previous line ends in ',', check whether we
-! * are in an initialization or enum
-! * struct xxx =
-! * {
-! * sizeof a,
-! * 124 };
-! * or a normal possible continuation line.
-! * but only, of no other statement has been found
-! * yet.
-! */
-! if (lookfor == LOOKFOR_INITIAL && terminated == ',')
-! {
-! lookfor = LOOKFOR_ENUM_OR_INIT;
-! cont_amount = cin_first_id_amount();
-! }
-! else
-! {
-! if (lookfor == LOOKFOR_INITIAL
-! && *l != NUL
-! && l[STRLEN(l) - 1] == '\\')
-! /* XXX */
-! cont_amount = cin_get_equal_amount(
-! curwin->w_cursor.lnum);
-! if (lookfor != LOOKFOR_TERM)
-! lookfor = LOOKFOR_UNTERM;
-! }
-! }
- }
- }
-
-***************
-*** 6069,6077 ****
- * 100 + <- line up with this one
- * -> here;
- */
-! if (lookfor == LOOKFOR_UNTERM)
- {
-! amount += ind_continuation;
- break;
- }
-
---- 6763,6775 ----
- * 100 + <- line up with this one
- * -> here;
- */
-! if (lookfor == LOOKFOR_UNTERM
-! || lookfor == LOOKFOR_ENUM_OR_INIT)
- {
-! if (cont_amount > 0)
-! amount = cont_amount;
-! else
-! amount += ind_continuation;
- break;
- }
-
-***************
-*** 6095,6100 ****
---- 6793,6809 ----
- else
- {
- /*
-+ * Skip single break line, if before a switch label. It
-+ * may be lined up with the case label.
-+ */
-+ if (lookfor == LOOKFOR_NOBREAK
-+ && cin_isbreak(skipwhite(ml_get_curline())))
-+ {
-+ lookfor = LOOKFOR_ANY;
-+ continue;
-+ }
-+
-+ /*
- * Handle "do {" line.
- */
- if (whilelevel > 0)
-***************
-*** 6114,6123 ****
- * x = 1;
- * y = foo +
- * -> here;
- */
-! if (lookfor == LOOKFOR_UNTERM)
- {
-! amount += ind_continuation;
- break;
- }
-
---- 6823,6840 ----
- * x = 1;
- * y = foo +
- * -> here;
-+ * or
-+ * int x = 1;
-+ * int foo,
-+ * -> here;
- */
-! if (lookfor == LOOKFOR_UNTERM
-! || lookfor == LOOKFOR_ENUM_OR_INIT)
- {
-! if (cont_amount > 0)
-! amount = cont_amount;
-! else
-! amount += ind_continuation;
- break;
- }
-
-***************
-*** 6132,6138 ****
- */
- if (lookfor == LOOKFOR_TERM)
- {
-! if (whilelevel == 0)
- break;
- }
-
---- 6849,6855 ----
- */
- if (lookfor == LOOKFOR_TERM)
- {
-! if (!lookfor_break && whilelevel == 0)
- break;
- }
-
-***************
-*** 6153,6160 ****
- */
- term_again:
- l = ml_get_curline();
-! if (find_last_paren(l) &&
-! (trypos = find_match_paren(ind_maxparen,
- ind_maxcomment)) != NULL)
- {
- /*
---- 6870,6877 ----
- */
- term_again:
- l = ml_get_curline();
-! if (find_last_paren(l, '(', ')')
-! && (trypos = find_match_paren(ind_maxparen,
- ind_maxcomment)) != NULL)
- {
- /*
-***************
-*** 6254,6261 ****
- */
- else if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
- && !cin_nocode(theline)
-! && cin_isfuncdecl(ml_get(cur_curpos.lnum + 1))
-! && !cin_isterminated(theline, FALSE))
- {
- amount = ind_func_type;
- }
---- 6971,6980 ----
- */
- else if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
- && !cin_nocode(theline)
-! && !cin_ends_in(theline, (char_u *)":", NULL)
-! && !cin_ends_in(theline, (char_u *)",", NULL)
-! && cin_isfuncdecl(NULL, cur_curpos.lnum + 1)
-! && !cin_isterminated(theline, FALSE, TRUE))
- {
- amount = ind_func_type;
- }
-***************
-*** 6283,6293 ****
- }
-
- /*
- * If the line looks like a function declaration, and we're
- * not in a comment, put it the left margin.
- */
-! if (cin_isfuncdecl(theline))
- break;
-
- /*
- * Finding the closing '}' of a previous function. Put
---- 7002,7092 ----
- }
-
- /*
-+ * Are we at the start of a cpp base class declaration or constructor
-+ * initialization?
-+ */ /* XXX */
-+ if (ind_cpp_baseclass != 0 && theline[0] != '{'
-+ && cin_is_cpp_baseclass(l, &col))
-+ {
-+ if (col == 0)
-+ {
-+ amount = get_indent() + ind_cpp_baseclass; /* XXX */
-+ if (find_last_paren(l, '(', ')')
-+ && (trypos = find_match_paren(ind_maxparen,
-+ ind_maxcomment)) != NULL)
-+ amount = get_indent_lnum(trypos->lnum)
-+ + ind_cpp_baseclass; /* XXX */
-+ }
-+ else
-+ {
-+ curwin->w_cursor.col = col;
-+ getvcol(curwin, &curwin->w_cursor, &col, NULL, NULL);
-+ amount = (int)col;
-+ }
-+ break;
-+ }
-+
-+ /*
-+ * Skip preprocessor directives and blank lines.
-+ */
-+ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum))
-+ continue;
-+
-+ if (cin_nocode(l))
-+ continue;
-+
-+ /*
-+ * If the previous line ends in ',', use one level of
-+ * indentation:
-+ * int foo,
-+ * bar;
-+ * do this before checking for '}' in case of eg.
-+ * enum foobar
-+ * {
-+ * ...
-+ * } foo,
-+ * bar;
-+ */
-+ n = 0;
-+ if (cin_ends_in(l, (char_u *)",", NULL)
-+ || (*l != NUL && (n = l[STRLEN(l) - 1]) == '\\'))
-+ {
-+ /* take us back to opening paren */
-+ if (find_last_paren(l, '(', ')')
-+ && (trypos = find_match_paren(ind_maxparen,
-+ ind_maxcomment)) != NULL)
-+ curwin->w_cursor.lnum = trypos->lnum;
-+
-+ /* For a line ending in ',' that is a continuation line go
-+ * back to the first line with a backslash:
-+ * char *foo = "bla\
-+ * bla",
-+ * here;
-+ */
-+ while (n == 0 && curwin->w_cursor.lnum > 1)
-+ {
-+ l = ml_get(curwin->w_cursor.lnum - 1);
-+ if (*l == NUL || l[STRLEN(l) - 1] != '\\')
-+ break;
-+ --curwin->w_cursor.lnum;
-+ }
-+
-+ amount = get_indent(); /* XXX */
-+
-+ if (amount == 0)
-+ amount = cin_first_id_amount();
-+ if (amount == 0)
-+ amount = ind_continuation;
-+ break;
-+ }
-+
-+ /*
- * If the line looks like a function declaration, and we're
- * not in a comment, put it the left margin.
- */
-! if (cin_isfuncdecl(NULL, cur_curpos.lnum)) /* XXX */
- break;
-+ l = ml_get_curline();
-
- /*
- * Finding the closing '}' of a previous function. Put
-***************
-*** 6302,6325 ****
- * char *string_array[] = { "foo",
- * / * x * / "b};ar" }; / * foobar * /
- */
-! if (cin_ends_in(l, (char_u *)"};"))
- break;
-
- /*
-- * Skip preprocessor directives and blank lines.
-- */
-- if (cin_ispreproc(l))
-- continue;
--
-- if (cin_nocode(l))
-- continue;
--
-- /*
- * If the PREVIOUS line is a function declaration, the current
- * line (and the ones that follow) needs to be indented as
- * parameters.
- */
-! if (cin_isfuncdecl(l))
- {
- amount = ind_param;
- break;
---- 7101,7115 ----
- * char *string_array[] = { "foo",
- * / * x * / "b};ar" }; / * foobar * /
- */
-! if (cin_ends_in(l, (char_u *)"};", NULL))
- break;
-
- /*
- * If the PREVIOUS line is a function declaration, the current
- * line (and the ones that follow) needs to be indented as
- * parameters.
- */
-! if (cin_isfuncdecl(&l, curwin->w_cursor.lnum))
- {
- amount = ind_param;
- break;
-***************
-*** 6332,6369 ****
- * bar;
- * indent_to_0 here;
- */
-! if (cin_ends_in(l, (char_u*)";"))
- {
- l = ml_get(curwin->w_cursor.lnum - 1);
-! if (cin_ends_in(l, (char_u *)",")
- || (*l != NUL && l[STRLEN(l) - 1] == '\\'))
- break;
- l = ml_get_curline();
- }
-
- /*
-- * If the previous line ends in ',', use one level of
-- * indentation:
-- * int foo,
-- * bar;
-- */
-- if (cin_ends_in(l, (char_u *)",")
-- || (*l != NUL && l[STRLEN(l) - 1] == '\\'))
-- {
-- amount = get_indent();
-- if (amount == 0)
-- amount = ind_param;
-- break;
-- }
--
-- /*
- * Doesn't look like anything interesting -- so just
- * use the indent of this line.
- *
- * Position the cursor over the rightmost paren, so that
- * matching it will take us back to the start of the line.
- */
-! find_last_paren(l);
-
- if ((trypos = find_match_paren(ind_maxparen,
- ind_maxcomment)) != NULL)
---- 7122,7144 ----
- * bar;
- * indent_to_0 here;
- */
-! if (cin_ends_in(l, (char_u*)";", NULL))
- {
- l = ml_get(curwin->w_cursor.lnum - 1);
-! if (cin_ends_in(l, (char_u *)",", NULL)
- || (*l != NUL && l[STRLEN(l) - 1] == '\\'))
- break;
- l = ml_get_curline();
- }
-
- /*
- * Doesn't look like anything interesting -- so just
- * use the indent of this line.
- *
- * Position the cursor over the rightmost paren, so that
- * matching it will take us back to the start of the line.
- */
-! find_last_paren(l, '(', ')');
-
- if ((trypos = find_match_paren(ind_maxparen,
- ind_maxcomment)) != NULL)
-***************
-*** 6375,6380 ****
---- 7150,7174 ----
- /* add extra indent for a comment */
- if (cin_iscomment(theline))
- amount += ind_comment;
-+
-+ /* add extra indent if the previous line ended in a backslash:
-+ * "asdfasdf\
-+ * here";
-+ * char *foo = "asdf\
-+ * here";
-+ */
-+ if (cur_curpos.lnum > 1)
-+ {
-+ l = ml_get(cur_curpos.lnum - 1);
-+ if (*l != NUL && l[STRLEN(l) - 1] == '\\')
-+ {
-+ cur_amount = cin_get_equal_amount(cur_curpos.lnum - 1);
-+ if (cur_amount > 0)
-+ amount = cur_amount;
-+ else if (cur_amount == 0)
-+ amount += ind_continuation;
-+ }
-+ }
- }
- }
-
-*** ../vim-6.2.503/src/testdir/test3.in Sun May 4 13:29:30 2003
---- src/testdir/test3.in Mon Apr 26 16:56:42 2004
-***************
-*** 504,509 ****
---- 504,513 ----
- int indented;
- {}
-
-+ char *a[] = {"aaa", "bbb",
-+ "ccc", NULL};
-+ // here
-+
- char *tab[] = {"aaa",
- "xx", /* xx */}; /* asdf */
- int not_indented;
-***************
-*** 523,538 ****
---- 527,709 ----
- bar;
- int foo;
-
-+ #if defined(foo) \
-+ && defined(bar)
- char * xx = "asdf\
- foo\
- bor";
- int x;
-
-+ char *foo = "asdf\
-+ asdf\
-+ asdf",
-+ *bar;
-+
-+ void f()
-+ {
-+ #if defined(foo) \
-+ && defined(bar)
-+ char *foo = "asdf\
-+ asdf\
-+ asdf",
-+ *bar;
-+ {
-+ int i;
-+ char *foo = "asdf\
-+ asdf\
-+ asdf",
-+ *bar;
-+ }
-+ #endif
-+ }
-+ #endif
-+
- int y; // comment
- // comment
-
- // comment
-
-+ {
-+ Constructor(int a,
-+ int b ) : BaseClass(a)
-+ {
-+ }
-+ }
-+
-+ void foo()
-+ {
-+ char one,
-+ two;
-+ struct bla piet,
-+ jan;
-+ enum foo kees,
-+ jannie;
-+ static unsigned sdf,
-+ krap;
-+ unsigned int piet,
-+ jan;
-+ int
-+ kees,
-+ jan;
-+ }
-+
-+ {
-+ t(int f,
-+ int d); // )
-+ d();
-+ }
-+
-+ Constructor::Constructor(int a,
-+ int b
-+ ) :
-+ BaseClass(a,
-+ b,
-+ c),
-+ mMember(b),
-+ {
-+ }
-+
-+ Constructor::Constructor(int a,
-+ int b ) :
-+ BaseClass(a)
-+ {
-+ }
-+
-+ Constructor::Constructor(int a,
-+ int b ) /*x*/ : /*x*/ BaseClass(a),
-+ member(b)
-+ {
-+ }
-+
-+ class CAbc :
-+ public BaseClass1,
-+ protected BaseClass2
-+ {
-+ int Test() { return FALSE; }
-+ int Test1() { return TRUE; }
-+
-+ CAbc(int a, int b ) :
-+ BaseClass(a)
-+ {
-+ switch(xxx)
-+ {
-+ case abc:
-+ asdf();
-+ break;
-+
-+ case 999:
-+ baer();
-+ break;
-+ }
-+ }
-+
-+ public: // <-- this was incoreectly indented before!!
-+ void testfall();
-+ protected:
-+ void testfall();
-+ };
-+
-+ class CAbc : public BaseClass1,
-+ protected BaseClass2
-+ {
-+ };
-+
-+ static struct
-+ {
-+ int a;
-+ int b;
-+ } variable[COUNT] =
-+ {
-+ {
-+ 123,
-+ 456
-+ },
-+ {
-+ 123,
-+ 456
-+ }
-+ };
-+
-+ static struct
-+ {
-+ int a;
-+ int b;
-+ } variable[COUNT] =
-+ {
-+ { 123, 456 },
-+ { 123, 456 }
-+ };
-+
-+ void asdf() /* ind_maxparen may cause trouble here */
-+ {
-+ if ((0
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1)) break;
-+ }
-+
- /* end of AUTO */
-
- STARTTEST
-***************
-*** 900,905 ****
---- 1071,1195 ----
- c1 && c2
- )
- foo;
-+ }
-+
-+ STARTTEST
-+ :set cino=b1
-+ 2kdd]]=][
-+ ENDTEST
-+
-+ void f()
-+ {
-+ switch (x)
-+ {
-+ case 1:
-+ a = b;
-+ break;
-+ default:
-+ a = 0;
-+ break;
-+ }
-+ }
-+
-+ STARTTEST
-+ :set cino=(0,W5
-+ 2kdd]]=][
-+ ENDTEST
-+
-+ void f()
-+ {
-+ invokeme(
-+ argu,
-+ ment);
-+ invokeme(
-+ argu,
-+ ment
-+ );
-+ invokeme(argu,
-+ ment
-+ );
-+ }
-+
-+ STARTTEST
-+ :set cino=/6
-+ 2kdd]]=][
-+ ENDTEST
-+
-+ void f()
-+ {
-+ statement;
-+ // comment 1
-+ // comment 2
-+ }
-+
-+ STARTTEST
-+ :set cino=
-+ 2kdd]]/comment 1/+1
-+ ==
-+ ENDTEST
-+
-+ void f()
-+ {
-+ statement;
-+ // comment 1
-+ // comment 2
-+ }
-+
-+ STARTTEST
-+ :set cino=g0
-+ 2kdd]]=][
-+ ENDTEST
-+
-+ class CAbc
-+ {
-+ int Test() { return FALSE; }
-+
-+ public: // comment
-+ void testfall();
-+ protected:
-+ void testfall();
-+ };
-+
-+ STARTTEST
-+ :set cino=(0,W2s
-+ 2kdd]]=][
-+ ENDTEST
-+
-+ {
-+ averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd(
-+ asdasdf,
-+ func(asdf,
-+ asdfadsf),
-+ asdfasdf
-+ );
-+
-+ /* those are ugly, but consequent */
-+
-+ func()->asd(asdasdf,
-+ averylongfunctionname(
-+ abc,
-+ dec)->averylongfunctionname(
-+ asdfadsf,
-+ asdfasdf,
-+ asdfasdf,
-+ ),
-+ func(asdfadf,
-+ asdfasdf
-+ ),
-+ asdasdf
-+ );
-+
-+ averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf(
-+ abc,
-+ dec)->asdfasdfasdf(
-+ asdfadsf,
-+ asdfasdf,
-+ asdfasdf,
-+ ),
-+ func(asdfadf,
-+ asdfasdf),
-+ asdasdf
-+ );
- }
-
- STARTTEST
-*** ../vim-6.2.503/src/testdir/test3.ok Sun May 4 13:29:34 2003
---- src/testdir/test3.ok Mon Apr 26 16:57:16 2004
-***************
-*** 492,497 ****
---- 492,501 ----
- int indented;
- {}
-
-+ char *a[] = {"aaa", "bbb",
-+ "ccc", NULL};
-+ // here
-+
- char *tab[] = {"aaa",
- "xx", /* xx */}; /* asdf */
- int not_indented;
-***************
-*** 511,526 ****
- bar;
- int foo;
-
- char * xx = "asdf\
-! foo\
-! bor";
- int x;
-
- int y; // comment
- // comment
-
- // comment
-
- /* end of AUTO */
-
-
---- 515,697 ----
- bar;
- int foo;
-
-+ #if defined(foo) \
-+ && defined(bar)
- char * xx = "asdf\
-! foo\
-! bor";
- int x;
-
-+ char *foo = "asdf\
-+ asdf\
-+ asdf",
-+ *bar;
-+
-+ void f()
-+ {
-+ #if defined(foo) \
-+ && defined(bar)
-+ char *foo = "asdf\
-+ asdf\
-+ asdf",
-+ *bar;
-+ {
-+ int i;
-+ char *foo = "asdf\
-+ asdf\
-+ asdf",
-+ *bar;
-+ }
-+ #endif
-+ }
-+ #endif
-+
- int y; // comment
- // comment
-
- // comment
-
-+ {
-+ Constructor(int a,
-+ int b ) : BaseClass(a)
-+ {
-+ }
-+ }
-+
-+ void foo()
-+ {
-+ char one,
-+ two;
-+ struct bla piet,
-+ jan;
-+ enum foo kees,
-+ jannie;
-+ static unsigned sdf,
-+ krap;
-+ unsigned int piet,
-+ jan;
-+ int
-+ kees,
-+ jan;
-+ }
-+
-+ {
-+ t(int f,
-+ int d); // )
-+ d();
-+ }
-+
-+ Constructor::Constructor(int a,
-+ int b
-+ ) :
-+ BaseClass(a,
-+ b,
-+ c),
-+ mMember(b),
-+ {
-+ }
-+
-+ Constructor::Constructor(int a,
-+ int b ) :
-+ BaseClass(a)
-+ {
-+ }
-+
-+ Constructor::Constructor(int a,
-+ int b ) /*x*/ : /*x*/ BaseClass(a),
-+ member(b)
-+ {
-+ }
-+
-+ class CAbc :
-+ public BaseClass1,
-+ protected BaseClass2
-+ {
-+ int Test() { return FALSE; }
-+ int Test1() { return TRUE; }
-+
-+ CAbc(int a, int b ) :
-+ BaseClass(a)
-+ {
-+ switch(xxx)
-+ {
-+ case abc:
-+ asdf();
-+ break;
-+
-+ case 999:
-+ baer();
-+ break;
-+ }
-+ }
-+
-+ public: // <-- this was incoreectly indented before!!
-+ void testfall();
-+ protected:
-+ void testfall();
-+ };
-+
-+ class CAbc : public BaseClass1,
-+ protected BaseClass2
-+ {
-+ };
-+
-+ static struct
-+ {
-+ int a;
-+ int b;
-+ } variable[COUNT] =
-+ {
-+ {
-+ 123,
-+ 456
-+ },
-+ {
-+ 123,
-+ 456
-+ }
-+ };
-+
-+ static struct
-+ {
-+ int a;
-+ int b;
-+ } variable[COUNT] =
-+ {
-+ { 123, 456 },
-+ { 123, 456 }
-+ };
-+
-+ void asdf() /* ind_maxparen may cause trouble here */
-+ {
-+ if ((0
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1
-+ && 1)) break;
-+ }
-+
- /* end of AUTO */
-
-
-***************
-*** 802,806 ****
---- 973,1071 ----
- c1 && c2
- )
- foo;
-+ }
-+
-+
-+ void f()
-+ {
-+ switch (x)
-+ {
-+ case 1:
-+ a = b;
-+ break;
-+ default:
-+ a = 0;
-+ break;
-+ }
-+ }
-+
-+
-+ void f()
-+ {
-+ invokeme(
-+ argu,
-+ ment);
-+ invokeme(
-+ argu,
-+ ment
-+ );
-+ invokeme(argu,
-+ ment
-+ );
-+ }
-+
-+
-+ void f()
-+ {
-+ statement;
-+ // comment 1
-+ // comment 2
-+ }
-+
-+
-+ void f()
-+ {
-+ statement;
-+ // comment 1
-+ // comment 2
-+ }
-+
-+
-+ class CAbc
-+ {
-+ int Test() { return FALSE; }
-+
-+ public: // comment
-+ void testfall();
-+ protected:
-+ void testfall();
-+ };
-+
-+
-+ {
-+ averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd(
-+ asdasdf,
-+ func(asdf,
-+ asdfadsf),
-+ asdfasdf
-+ );
-+
-+ /* those are ugly, but consequent */
-+
-+ func()->asd(asdasdf,
-+ averylongfunctionname(
-+ abc,
-+ dec)->averylongfunctionname(
-+ asdfadsf,
-+ asdfasdf,
-+ asdfasdf,
-+ ),
-+ func(asdfadf,
-+ asdfasdf
-+ ),
-+ asdasdf
-+ );
-+
-+ averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf(
-+ abc,
-+ dec)->asdfasdfasdf(
-+ asdfadsf,
-+ asdfasdf,
-+ asdfasdf,
-+ ),
-+ func(asdfadf,
-+ asdfasdf),
-+ asdasdf
-+ );
- }
-
-*** ../vim-6.2.503/src/version.c Mon Apr 26 12:37:27 2004
---- src/version.c Mon Apr 26 18:54:36 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 504,
- /**/
-
---
-`The Guide says there is an art to flying,' said Ford, `or at least a
-knack. The knack lies in learning how to throw yourself at the ground
-and miss.' He smiled weakly.
- -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.505
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.505
-Problem: Help for -P argument is missing. (Ronald Hoellwarth)
-Solution: Add the patch that was missing in 6.2.419.
-Files: runtime/doc/starting.txt
-
-
-*** ../vim-6.2.504/runtime/doc/starting.txt Sun Jun 1 12:20:35 2003
---- runtime/doc/starting.txt Wed Apr 14 01:44:52 2004
-***************
-*** 1,4 ****
-! *starting.txt* For Vim version 6.2. Last change: 2003 May 10
-
-
- VIM REFERENCE MANUAL by Bram Moolenaar
---- 1,4 ----
-! *starting.txt* For Vim version 6.2. Last change: 2004 Apr 14
-
-
- VIM REFERENCE MANUAL by Bram Moolenaar
-***************
-*** 530,539 ****
- restoring the session on login. See |gui-gnome-session|
- {not in Vi}
-
- -nb *-nb*
- -nb:{hostname}:{addr}:{password}
- Attempt connecting to Netbeans and become an editor server for
-! it. The second form specifies the hostname, address and
- password for connecting to Netbeans. |netbeans-run|
-
- Example for using a script file to change a name in several files:
---- 533,551 ----
- restoring the session on login. See |gui-gnome-session|
- {not in Vi}
-
-+ -P {parent-title} *-P*
-+ Win32 only: Specify the title of the parent application. When
-+ possible, Vim will run in an MDI window inside the
-+ application.
-+ {parent-title} must appear in the window title of the parent
-+ application. Make sure that it is specific enough.
-+
- -nb *-nb*
-+ -nb={fname}
- -nb:{hostname}:{addr}:{password}
- Attempt connecting to Netbeans and become an editor server for
-! it. The second form specifies a file to read connection info
-! from. The third form specifies the hostname, address and
- password for connecting to Netbeans. |netbeans-run|
-
- Example for using a script file to change a name in several files:
-*** ../vim-6.2.504/src/version.c Mon Apr 26 19:00:58 2004
---- src/version.c Tue Apr 27 10:01:51 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 505,
- /**/
-
---
-hundred-and-one symptoms of being an internet addict:
-29. Your phone bill comes to your doorstep in a box.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.506 (extra)
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.506 (extra)
-Problem: Win32: When 'encoding' is a codepage then reading a utf-8 file
- only works when iconv is available. Writing a file in another
- codepage uses the wrong kind of conversion.
-Solution: Use internal conversion functions. Enable reading and writing
- files with 'fileencoding' different from 'encoding' for all valid
- codepages and utf-8 without the need for iconv.
-Files: src/fileio.c, src/testdir/Make_dos.mak, src/testdir/test52.in,
- src/testdir/test52.ok
-
-
-*** ../vim-6.2.505/src/fileio.c Sun Apr 25 16:26:29 2004
---- src/fileio.c Tue Apr 27 15:31:34 2004
-***************
-*** 939,947 ****
-
- # ifdef WIN3264
- /*
-! * Conversion from an MS-Windows codepage to UTF-8 is handled here.
- */
-! if (fio_flags == 0 && enc_utf8)
- fio_flags = get_win_fio_flags(fenc);
- # endif
-
---- 939,948 ----
-
- # ifdef WIN3264
- /*
-! * Conversion from an MS-Windows codepage to UTF-8 or another codepage
-! * is handled with MultiByteToWideChar().
- */
-! if (fio_flags == 0)
- fio_flags = get_win_fio_flags(fenc);
- # endif
-
-***************
-*** 1329,1388 ****
- if (fio_flags & FIO_CODEPAGE)
- {
- /*
-! * Conversion from an MS-Windows codepage to UTF-8, using
-! * standard MS-Windows functions.
- */
- char_u *ucsp;
-! size_t from_size;
- int needed;
- char_u *p;
- int u8c;
-
- /*
-! * We can't tell if the last byte of an MBCS string is valid
-! * and MultiByteToWideChar() returns zero if it isn't.
-! * Try the whole string, and if that fails, bump the last byte
-! * into conv_rest and try again.
- */
-! from_size = size;
-! needed = MultiByteToWideChar(FIO_GET_CP(fio_flags),
-! MB_ERR_INVALID_CHARS, (LPCSTR)ptr, from_size,
-! NULL, 0);
-! if (needed == 0)
- {
-! conv_rest[0] = ptr[from_size - 1];
-! conv_restlen = 1;
-! --from_size;
- needed = MultiByteToWideChar(FIO_GET_CP(fio_flags),
-! MB_ERR_INVALID_CHARS, (LPCSTR)ptr, from_size,
- NULL, 0);
-! }
-
-! /* If there really is a conversion error, try using another
-! * conversion. */
-! if (needed == 0)
-! goto rewind_retry;
-
-! /* Put the result of conversion to UCS-2 at the end of the
-! * buffer, then convert from UCS-2 to UTF-8 into the start of
-! * the buffer. If there is not enough space just fail, there
-! * is probably something wrong. */
- ucsp = ptr + real_size - (needed * sizeof(WCHAR));
- if (ucsp < ptr + size)
- goto rewind_retry;
-! needed = MultiByteToWideChar(FIO_GET_CP(fio_flags),
- MB_ERR_INVALID_CHARS, (LPCSTR)ptr,
- from_size, (LPWSTR)ucsp, needed);
-
-! /* Now go from UCS-2 to UTF-8. */
-! p = ptr;
-! for (; needed > 0; --needed)
-! {
-! u8c = *ucsp++;
-! u8c += (*ucsp++ << 8);
-! p += utf_char2bytes(u8c, p);
- }
-- size = p - ptr;
- }
- else
- # endif
---- 1330,1462 ----
- if (fio_flags & FIO_CODEPAGE)
- {
- /*
-! * Conversion from an MS-Windows codepage or UTF-8 to UTF-8 or
-! * a codepage, using standard MS-Windows functions.
-! * 1. find out how many ucs-2 characters there are.
-! * 2. convert from 'fileencoding' to ucs-2
-! * 3. convert from ucs-2 to 'encoding'
- */
- char_u *ucsp;
-! size_t from_size = size;
- int needed;
- char_u *p;
- int u8c;
-+ int l, len;
-
- /*
-! * 1. find out how many ucs-2 characters there are.
- */
-! if (FIO_GET_CP(fio_flags) == CP_UTF8)
- {
-! /* Handle CP_UTF8 ourselves to be able to handle trailing
-! * bytes properly. First find out the number of
-! * characters and check for trailing bytes. */
-! needed = 0;
-! p = ptr;
-! for (len = from_size; len > 0; len -= l)
-! {
-! l = utf_ptr2len_check_len(p, len);
-! if (l > len) /* incomplete char */
-! {
-! if (l > CONV_RESTLEN)
-! /* weird overlong byte sequence */
-! goto rewind_retry;
-! mch_memmove(conv_rest, p, len);
-! conv_restlen = len;
-! from_size -= len;
-! break;
-! }
-! if (l == 1 && *p >= 0x80) /* illegal byte */
-! goto rewind_retry;
-! ++needed;
-! p += l;
-! }
-! }
-! else
-! {
-! /* We can't tell if the last byte of an MBCS string is
-! * valid and MultiByteToWideChar() returns zero if it
-! * isn't. Try the whole string, and if that fails, bump
-! * the last byte into conv_rest and try again. */
- needed = MultiByteToWideChar(FIO_GET_CP(fio_flags),
-! MB_ERR_INVALID_CHARS, (LPCSTR)ptr, from_size,
- NULL, 0);
-! if (needed == 0)
-! {
-! conv_rest[0] = ptr[from_size - 1];
-! conv_restlen = 1;
-! --from_size;
-! needed = MultiByteToWideChar(FIO_GET_CP(fio_flags),
-! MB_ERR_INVALID_CHARS, (LPCSTR)ptr, from_size,
-! NULL, 0);
-! }
-
-! /* If there really is a conversion error, try using another
-! * conversion. */
-! if (needed == 0)
-! goto rewind_retry;
-! }
-
-! /*
-! * 2. convert from 'fileencoding' to ucs-2
-! *
-! * Put the result of conversion to UCS-2 at the end of the
-! * buffer, then convert from UCS-2 to UTF-8 or "enc_codepage"
-! * into the start of the buffer. If there is not enough space
-! * just fail, there is probably something wrong.
-! */
- ucsp = ptr + real_size - (needed * sizeof(WCHAR));
- if (ucsp < ptr + size)
- goto rewind_retry;
-!
-! if (FIO_GET_CP(fio_flags) == CP_UTF8)
-! {
-! /* Convert from utf-8 to ucs-2. */
-! needed = 0;
-! p = ptr;
-! for (len = from_size; len > 0; len -= l)
-! {
-! l = utf_ptr2len_check_len(p, len);
-! u8c = utf_ptr2char(p);
-! ucsp[needed * 2] = (u8c & 0xff);
-! ucsp[needed * 2 + 1] = (u8c >> 8);
-! ++needed;
-! p += l;
-! }
-! }
-! else
-! needed = MultiByteToWideChar(FIO_GET_CP(fio_flags),
- MB_ERR_INVALID_CHARS, (LPCSTR)ptr,
- from_size, (LPWSTR)ucsp, needed);
-
-! /*
-! * 3. convert from ucs-2 to 'encoding'
-! */
-! if (enc_utf8)
-! {
-! /* From UCS-2 to UTF-8. Cannot fail. */
-! p = ptr;
-! for (; needed > 0; --needed)
-! {
-! u8c = *ucsp++;
-! u8c += (*ucsp++ << 8);
-! p += utf_char2bytes(u8c, p);
-! }
-! size = p - ptr;
-! }
-! else
-! {
-! BOOL bad = FALSE;
-!
-! /* From UCS-2 to "enc_codepage". If the conversion uses
-! * the default character "?", the data doesn't fit in this
-! * encoding, so fail (unless forced). */
-! size = WideCharToMultiByte(enc_codepage, 0,
-! (LPCWSTR)ucsp, needed,
-! (LPSTR)ptr, real_size, "?", &bad);
-! if (bad && !keep_dest_enc)
-! goto rewind_retry;
- }
- }
- else
- # endif
-***************
-*** 3442,3451 ****
- }
-
- # ifdef WIN3264
-! if (converted && wb_flags == 0 && get_win_fio_flags(fenc))
- {
-- wb_flags = get_win_fio_flags(fenc);
--
- /* Convert UTF-8 -> UCS-2 and UCS-2 -> DBCS. Worst-case * 4: */
- write_info.bw_conv_buflen = bufsize * 4;
- write_info.bw_conv_buf
---- 3516,3523 ----
- }
-
- # ifdef WIN3264
-! if (converted && wb_flags == 0 && (wb_flags = get_win_fio_flags(fenc)) != 0)
- {
- /* Convert UTF-8 -> UCS-2 and UCS-2 -> DBCS. Worst-case * 4: */
- write_info.bw_conv_buflen = bufsize * 4;
- write_info.bw_conv_buf
-***************
-*** 4474,4486 ****
- else if (flags & FIO_CODEPAGE)
- {
- /*
-! * Convert UTF-8 to UCS-2 and then to MS-Windows codepage.
- */
- char_u *from;
- size_t fromlen;
- char_u *to;
- int u8c;
- BOOL bad = FALSE;
-
- if (ip->bw_restlen > 0)
- {
---- 4546,4560 ----
- else if (flags & FIO_CODEPAGE)
- {
- /*
-! * Convert UTF-8 or codepage to UCS-2 and then to MS-Windows
-! * codepage.
- */
- char_u *from;
- size_t fromlen;
- char_u *to;
- int u8c;
- BOOL bad = FALSE;
-+ int needed;
-
- if (ip->bw_restlen > 0)
- {
-***************
-*** 4498,4535 ****
- fromlen = len;
- }
-
-- /* Convert from UTF-8 to UCS-2, to the start of the buffer.
-- * The buffer has been allocated to be big enough. */
- to = ip->bw_conv_buf;
-! while (fromlen > 0)
- {
-! n = utf_ptr2len_check_len(from, fromlen);
-! if (n > (int)fromlen)
-! break;
-! u8c = utf_ptr2char(from);
-! *to++ = (u8c & 0xff);
-! *to++ = (u8c >> 8);
-! fromlen -= n;
-! from += n;
-! }
-
-! /* copy remainder to ip->bw_rest[] to be used for the next call. */
-! mch_memmove(ip->bw_rest, from, fromlen);
-! ip->bw_restlen = fromlen;
-
-- /* Convert from UCS-2 to the codepage, using the remainder of the
-- * conversion buffer. If the conversion uses the default
-- * character "0", the data doesn't fit in this encoding, so fail. */
- fromlen = to - ip->bw_conv_buf;
-! len = WideCharToMultiByte(FIO_GET_CP(flags), 0,
-! (LPCWSTR)ip->bw_conv_buf, (int)fromlen / sizeof(WCHAR),
-! (LPSTR)to, ip->bw_conv_buflen - fromlen, 0, &bad);
-! if (bad)
- {
-! ip->bw_conv_error = TRUE;
-! return FAIL;
- }
-- buf = to;
- }
- # endif
-
---- 4572,4675 ----
- fromlen = len;
- }
-
- to = ip->bw_conv_buf;
-! if (enc_utf8)
- {
-! /* Convert from UTF-8 to UCS-2, to the start of the buffer.
-! * The buffer has been allocated to be big enough. */
-! while (fromlen > 0)
-! {
-! n = utf_ptr2len_check_len(from, fromlen);
-! if (n > (int)fromlen) /* incomplete byte sequence */
-! break;
-! u8c = utf_ptr2char(from);
-! *to++ = (u8c & 0xff);
-! *to++ = (u8c >> 8);
-! fromlen -= n;
-! from += n;
-! }
-
-! /* Copy remainder to ip->bw_rest[] to be used for the next
-! * call. */
-! if (fromlen > CONV_RESTLEN)
-! {
-! /* weird overlong sequence */
-! ip->bw_conv_error = TRUE;
-! return FAIL;
-! }
-! mch_memmove(ip->bw_rest, from, fromlen);
-! ip->bw_restlen = fromlen;
-! }
-! else
-! {
-! /* Convert from enc_codepage to UCS-2, to the start of the
-! * buffer. The buffer has been allocated to be big enough. */
-! ip->bw_restlen = 0;
-! needed = MultiByteToWideChar(enc_codepage,
-! MB_ERR_INVALID_CHARS, (LPCSTR)from, fromlen,
-! NULL, 0);
-! if (needed == 0)
-! {
-! /* When conversion fails there may be a trailing byte. */
-! ip->bw_restlen = 1;
-! needed = MultiByteToWideChar(enc_codepage,
-! MB_ERR_INVALID_CHARS, (LPCSTR)from, fromlen,
-! NULL, 0);
-! if (needed == 0)
-! {
-! /* Conversion doesn't work. */
-! ip->bw_conv_error = TRUE;
-! return FAIL;
-! }
-! /* Save the trailing byte for the next call. */
-! *ip->bw_rest = from[fromlen - 1];
-! }
-! needed = MultiByteToWideChar(enc_codepage, MB_ERR_INVALID_CHARS,
-! (LPCSTR)from, fromlen - ip->bw_restlen,
-! (LPWSTR)to, needed);
-! if (needed == 0)
-! {
-! /* Safety check: Conversion doesn't work. */
-! ip->bw_conv_error = TRUE;
-! return FAIL;
-! }
-! to += needed * 2;
-! }
-
- fromlen = to - ip->bw_conv_buf;
-! buf = to;
-! if (FIO_GET_CP(flags) == CP_UTF8)
- {
-! /* Convert from UCS-2 to UTF-8, using the remainder of the
-! * conversion buffer. Fails when out of space. */
-! for (from = ip->bw_conv_buf; fromlen > 1; fromlen -= 2)
-! {
-! u8c = *from++;
-! u8c += (*from++ << 8);
-! to += utf_char2bytes(u8c, to);
-! if (to + 6 >= ip->bw_conv_buf + ip->bw_conv_buflen)
-! {
-! ip->bw_conv_error = TRUE;
-! return FAIL;
-! }
-! }
-! len = to - buf;
-! }
-! else
-! {
-! /* Convert from UCS-2 to the codepage, using the remainder of
-! * the conversion buffer. If the conversion uses the default
-! * character "0", the data doesn't fit in this encoding, so
-! * fail. */
-! len = WideCharToMultiByte(FIO_GET_CP(flags), 0,
-! (LPCWSTR)ip->bw_conv_buf, (int)fromlen / sizeof(WCHAR),
-! (LPSTR)to, ip->bw_conv_buflen - fromlen, 0, &bad);
-! if (bad)
-! {
-! ip->bw_conv_error = TRUE;
-! return FAIL;
-! }
- }
- }
- # endif
-
-***************
-*** 4775,4789 ****
- #ifdef WIN3264
- /*
- * Check "ptr" for a MS-Windows codepage name and return the FIO_ flags needed
-! * for the conversion MS-Windows can do for us.
- */
- static int
- get_win_fio_flags(ptr)
- char_u *ptr;
- {
-! if (ptr[0] == 'c' && ptr[1] == 'p' && VIM_ISDIGIT(ptr[2]))
-! return FIO_PUT_CP(atoi(ptr + 2)) | FIO_CODEPAGE;
-! return 0;
- }
- #endif
-
---- 4915,4942 ----
- #ifdef WIN3264
- /*
- * Check "ptr" for a MS-Windows codepage name and return the FIO_ flags needed
-! * for the conversion MS-Windows can do for us. Also accept "utf-8".
-! * Used for conversion between 'encoding' and 'fileencoding'.
- */
- static int
- get_win_fio_flags(ptr)
- char_u *ptr;
- {
-! int cp;
-!
-! /* Cannot do this when 'encoding' is not utf-8 and not a codepage. */
-! if (!enc_utf8 && enc_codepage <= 0)
-! return 0;
-!
-! cp = encname2codepage(ptr);
-! if (cp == 0)
-! {
-! if (STRCMP(ptr, "utf-8") == 0)
-! cp = CP_UTF8;
-! else
-! return 0;
-! }
-! return FIO_PUT_CP(cp) | FIO_CODEPAGE;
- }
- #endif
-
-*** ../vim-6.2.505/src/testdir/Make_dos.mak Mon Mar 22 17:28:47 2004
---- src/testdir/Make_dos.mak Tue Apr 27 15:51:03 2004
-***************
-*** 24,30 ****
- test15.out test17.out test18.out test21.out test26.out \
- test30.out test31.out test32.out test33.out test34.out \
- test37.out test38.out test39.out test40.out test41.out \
-! test42.out
-
- SCRIPTS32 = test50.out
-
---- 24,30 ----
- test15.out test17.out test18.out test21.out test26.out \
- test30.out test31.out test32.out test33.out test34.out \
- test37.out test38.out test39.out test40.out test41.out \
-! test42.out test52.out
-
- SCRIPTS32 = test50.out
-
-***************
-*** 51,56 ****
---- 51,57 ----
- -del tiny.vim
- -del mbyte.vim
- -del X*
-+ -del viminfo
-
- .in.out:
- copy $*.ok test.ok
-***************
-*** 60,62 ****
---- 61,64 ----
- rename test.out $*.out
- -del X*
- -del test.ok
-+ -del viminfo
-*** ../vim-6.2.505/src/testdir/test52.in Tue Apr 27 16:24:44 2004
---- src/testdir/test52.in Tue Apr 27 16:20:18 2004
-***************
-*** 0 ****
---- 1,65 ----
-+ Tests for reading and writing files with conversion for Win32.
-+
-+ STARTTEST
-+ :so mbyte.vim
-+ :" make this a dummy test for non-Win32 systems
-+ :if !has("win32") | e! testk.ok | wq! test.out | endif
-+ :"
-+ :" write tests:
-+ :" combine three values for 'encoding' with three values for 'fileencoding'
-+ :" also write files for read tests
-+ /^1
-+ :set encoding=utf-8
-+ :.w! ++enc=utf-8 test.out
-+ :.w ++enc=cp1251 >>test.out
-+ :.w ++enc=cp866 >>test.out
-+ :.w! ++enc=utf-8 Xutf8
-+ /^2
-+ :set encoding=cp1251
-+ :.w ++enc=utf-8 >>test.out
-+ :.w ++enc=cp1251 >>test.out
-+ :.w ++enc=cp866 >>test.out
-+ :.w! ++enc=cp1251 Xcp1251
-+ /^3
-+ :set encoding=cp866
-+ :.w ++enc=utf-8 >>test.out
-+ :.w ++enc=cp1251 >>test.out
-+ :.w ++enc=cp866 >>test.out
-+ :.w! ++enc=cp866 Xcp866
-+ :"
-+ :" read three 'fileencoding's with utf-8 'encoding'
-+ :set encoding=utf-8 fencs=utf-8,cp1251
-+ :e Xutf8
-+ :.w ++enc=utf-8 >>test.out
-+ :e Xcp1251
-+ :.w ++enc=utf-8 >>test.out
-+ :set fencs=utf-8,cp866
-+ :e Xcp866
-+ :.w ++enc=utf-8 >>test.out
-+ :"
-+ :" read three 'fileencoding's with cp1251 'encoding'
-+ :set encoding=utf-8 fencs=utf-8,cp1251
-+ :e Xutf8
-+ :.w ++enc=cp1251 >>test.out
-+ :e Xcp1251
-+ :.w ++enc=cp1251 >>test.out
-+ :set fencs=utf-8,cp866
-+ :e Xcp866
-+ :.w ++enc=cp1251 >>test.out
-+ :"
-+ :" read three 'fileencoding's with cp866 'encoding'
-+ :set encoding=cp866 fencs=utf-8,cp1251
-+ :e Xutf8
-+ :.w ++enc=cp866 >>test.out
-+ :e Xcp1251
-+ :.w ++enc=cp866 >>test.out
-+ :set fencs=utf-8,cp866
-+ :e Xcp866
-+ :.w ++enc=cp866 >>test.out
-+ :"
-+ :qa!
-+ ENDTEST
-+
-+ 1 utf-8 text: Для Vim version 6.2. Последнее изменение: 1970 Jan 01
-+ 2 cp1251 text: Äëÿ Vim version 6.2. Ïîñëåäíåå èçìåíåíèå: 1970 Jan 01
-+ 3 cp866 text: \84«ï Vim version 6.2. \8f®á«¥¤¥¥ ¨§¬¥¥¨¥: 1970 Jan 01
-*** ../vim-6.2.505/src/testdir/test52.ok Tue Apr 27 16:24:44 2004
---- src/testdir/test52.ok Tue Apr 27 16:20:56 2004
-***************
-*** 0 ****
---- 1,18 ----
-+ 1 utf-8 text: Для Vim version 6.2. Последнее изменение: 1970 Jan 01
-+ 1 utf-8 text: Äëÿ Vim version 6.2. Ïîñëåäíåå èçìåíåíèå: 1970 Jan 01
-+ 1 utf-8 text: \84«ï Vim version 6.2. \8f®á«¥¤¥¥ ¨§¬¥¥¨¥: 1970 Jan 01
-+ 2 cp1251 text: Для Vim version 6.2. Последнее изменение: 1970 Jan 01
-+ 2 cp1251 text: Äëÿ Vim version 6.2. Ïîñëåäíåå èçìåíåíèå: 1970 Jan 01
-+ 2 cp1251 text: \84«ï Vim version 6.2. \8f®á«¥¤¥¥ ¨§¬¥¥¨¥: 1970 Jan 01
-+ 3 cp866 text: Для Vim version 6.2. Последнее изменение: 1970 Jan 01
-+ 3 cp866 text: Äëÿ Vim version 6.2. Ïîñëåäíåå èçìåíåíèå: 1970 Jan 01
-+ 3 cp866 text: \84«ï Vim version 6.2. \8f®á«¥¤¥¥ ¨§¬¥¥¨¥: 1970 Jan 01
-+ 1 utf-8 text: Для Vim version 6.2. Последнее изменение: 1970 Jan 01
-+ 2 cp1251 text: Для Vim version 6.2. Последнее изменение: 1970 Jan 01
-+ 3 cp866 text: Для Vim version 6.2. Последнее изменение: 1970 Jan 01
-+ 1 utf-8 text: Äëÿ Vim version 6.2. Ïîñëåäíåå èçìåíåíèå: 1970 Jan 01
-+ 2 cp1251 text: Äëÿ Vim version 6.2. Ïîñëåäíåå èçìåíåíèå: 1970 Jan 01
-+ 3 cp866 text: Äëÿ Vim version 6.2. Ïîñëåäíåå èçìåíåíèå: 1970 Jan 01
-+ 1 utf-8 text: \84«ï Vim version 6.2. \8f®á«¥¤¥¥ ¨§¬¥¥¨¥: 1970 Jan 01
-+ 2 cp1251 text: \84«ï Vim version 6.2. \8f®á«¥¤¥¥ ¨§¬¥¥¨¥: 1970 Jan 01
-+ 3 cp866 text: \84«ï Vim version 6.2. \8f®á«¥¤¥¥ ¨§¬¥¥¨¥: 1970 Jan 01
-*** ../vim-6.2.505/src/version.c Tue Apr 27 10:03:32 2004
---- src/version.c Tue Apr 27 16:23:35 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 506,
- /**/
-
---
-hundred-and-one symptoms of being an internet addict:
-34. You laugh at people with 14400 baud modems.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.507
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.507
-Problem: The ownership of the file with the password for the NetBeans
- connection is not checked. "-nb={file}" doesn't work for GTK.
-Solution: Only accept the file when owned by the user and not accessible by
- others. Detect "-nb=" for GTK.
-Files: src/netbeans.c, src/gui_gtk_x11.c
-
-
-*** ../vim-6.2.506/src/netbeans.c Sat Apr 17 21:14:10 2004
---- src/netbeans.c Tue Apr 27 18:16:51 2004
-***************
-*** 70,76 ****
- static long get_buf_size __ARGS((buf_T *));
-
- static void netbeans_connect __ARGS((void));
-! static void getConnInfo __ARGS((char *file, char **host, char **port, char **password));
-
- static void nb_init_graphics __ARGS((void));
- static void coloncmd __ARGS((char *cmd, ...));
---- 70,76 ----
- static long get_buf_size __ARGS((buf_T *));
-
- static void netbeans_connect __ARGS((void));
-! static int getConnInfo __ARGS((char *file, char **host, char **port, char **password));
-
- static void nb_init_graphics __ARGS((void));
- static void coloncmd __ARGS((char *cmd, ...));
-***************
-*** 247,262 ****
- char *arg = NULL;
-
- if (netbeansArg[3] == '=')
- /* "-nb=fname": Read info from specified file. */
-! getConnInfo(netbeansArg + 4, &hostname, &address, &password);
- else
- {
- if (netbeansArg[3] == ':')
- /* "-nb:<host>:<addr>:<password>": get info from argument */
- arg = netbeansArg + 4;
- if (arg == NULL && (fname = getenv("__NETBEANS_CONINFO")) != NULL)
- /* "-nb": get info from file specified in environment */
-! getConnInfo(fname, &hostname, &address, &password);
- else
- {
- if (arg != NULL)
---- 247,269 ----
- char *arg = NULL;
-
- if (netbeansArg[3] == '=')
-+ {
- /* "-nb=fname": Read info from specified file. */
-! if (getConnInfo(netbeansArg + 4, &hostname, &address, &password)
-! == FAIL)
-! return;
-! }
- else
- {
- if (netbeansArg[3] == ':')
- /* "-nb:<host>:<addr>:<password>": get info from argument */
- arg = netbeansArg + 4;
- if (arg == NULL && (fname = getenv("__NETBEANS_CONINFO")) != NULL)
-+ {
- /* "-nb": get info from file specified in environment */
-! if (getConnInfo(fname, &hostname, &address, &password) == FAIL)
-! return;
-! }
- else
- {
- if (arg != NULL)
-***************
-*** 326,335 ****
- server.sin_port = htons(port);
- if ((host = gethostbyname(hostname)) == NULL)
- {
-! if (access(hostname, R_OK) >= 0)
- {
- /* DEBUG: input file */
-! sd = open(hostname, O_RDONLY);
- goto theend;
- }
- PERROR("gethostbyname() in netbeans_connect()");
---- 333,342 ----
- server.sin_port = htons(port);
- if ((host = gethostbyname(hostname)) == NULL)
- {
-! if (mch_access(hostname, R_OK) >= 0)
- {
- /* DEBUG: input file */
-! sd = mch_open(hostname, O_RDONLY, 0);
- goto theend;
- }
- PERROR("gethostbyname() in netbeans_connect()");
-***************
-*** 421,463 ****
- /*
- * Obtain the NetBeans hostname, port address and password from a file.
- * Return the strings in allocated memory.
- */
-! static void
- getConnInfo(char *file, char **host, char **port, char **auth)
- {
-! FILE *fp = mch_fopen(file, "r");
- char_u buf[BUFSIZ];
- char_u *lp;
- char_u *nl;
-
- if (fp == NULL)
- PERROR("E660: Cannot open NetBeans connection info file");
-! else
- {
-! /* Read the file. There should be one of each parameter */
-! while ((lp = (char_u *)fgets((char *)buf, BUFSIZ, fp)) != NULL)
-! {
-! if ((nl = vim_strchr(lp, '\n')) != NULL)
-! *nl = 0; /* strip off the trailing newline */
-
-! if (STRNCMP(lp, "host=", 5) == 0)
-! {
-! vim_free(*host);
-! *host = (char *)vim_strsave(&buf[5]);
-! }
-! else if (STRNCMP(lp, "port=", 5) == 0)
-! {
-! vim_free(*port);
-! *port = (char *)vim_strsave(&buf[5]);
-! }
-! else if (STRNCMP(lp, "auth=", 5) == 0)
-! {
-! vim_free(*auth);
-! *auth = (char *)vim_strsave(&buf[5]);
-! }
- }
-- fclose(fp);
- }
- }
-
-
---- 428,491 ----
- /*
- * Obtain the NetBeans hostname, port address and password from a file.
- * Return the strings in allocated memory.
-+ * Return FAIL if the file could not be read, OK otherwise (no matter what it
-+ * contains).
- */
-! static int
- getConnInfo(char *file, char **host, char **port, char **auth)
- {
-! FILE *fp;
- char_u buf[BUFSIZ];
- char_u *lp;
- char_u *nl;
-+ #ifdef UNIX
-+ struct stat st;
-
-+ /*
-+ * For Unix only accept the file when it's owned by the current user and
-+ * not accessible by others.
-+ */
-+ if (mch_stat(file, &st) == 0
-+ && (st.st_uid != getuid() || (st.st_mode & 0077)))
-+ {
-+ EMSG2(_("E668: Ownership of NetBeans connection file invalid: \"%s\""),
-+ file);
-+ return FAIL;
-+ }
-+ #endif
-+
-+ fp = mch_fopen(file, "r");
- if (fp == NULL)
-+ {
- PERROR("E660: Cannot open NetBeans connection info file");
-! return FAIL;
-! }
-!
-! /* Read the file. There should be one of each parameter */
-! while ((lp = (char_u *)fgets((char *)buf, BUFSIZ, fp)) != NULL)
- {
-! if ((nl = vim_strchr(lp, '\n')) != NULL)
-! *nl = 0; /* strip off the trailing newline */
-
-! if (STRNCMP(lp, "host=", 5) == 0)
-! {
-! vim_free(*host);
-! *host = (char *)vim_strsave(&buf[5]);
-! }
-! else if (STRNCMP(lp, "port=", 5) == 0)
-! {
-! vim_free(*port);
-! *port = (char *)vim_strsave(&buf[5]);
-! }
-! else if (STRNCMP(lp, "auth=", 5) == 0)
-! {
-! vim_free(*auth);
-! *auth = (char *)vim_strsave(&buf[5]);
- }
- }
-+ fclose(fp);
-+
-+ return OK;
- }
-
-
-***************
-*** 578,584 ****
- if (file == NULL)
- outfd = -3;
- else
-! outfd = open(file, O_WRONLY|O_CREAT|O_TRUNC, 0666);
- }
-
- if (outfd >= 0)
---- 606,612 ----
- if (file == NULL)
- outfd = -3;
- else
-! outfd = mch_open(file, O_WRONLY|O_CREAT|O_TRUNC, 0666);
- }
-
- if (outfd >= 0)
-*** ../vim-6.2.506/src/gui_gtk_x11.c Mon Apr 5 20:28:39 2004
---- src/gui_gtk_x11.c Tue Apr 27 18:00:59 2004
-***************
-*** 480,486 ****
- break;
- #ifdef FEAT_NETBEANS_INTG
- /* darn, -nb has non-standard syntax */
-! if (argv[i][len] == ':'
- && (option->flags & ARG_INDEX_MASK) == ARG_NETBEANS)
- break;
- #endif
---- 480,486 ----
- break;
- #ifdef FEAT_NETBEANS_INTG
- /* darn, -nb has non-standard syntax */
-! if (vim_strchr(":=", argv[i][len]) != NULL
- && (option->flags & ARG_INDEX_MASK) == ARG_NETBEANS)
- break;
- #endif
-*** ../vim-6.2.506/src/version.c Tue Apr 27 16:27:09 2004
---- src/version.c Tue Apr 27 21:38:31 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 507,
- /**/
-
---
-Despite the cost of living, have you noticed how it remains so popular?
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.508
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.508
-Problem: Win32: "v:lang" does not show the current language for messages if
- it differs from the other locale settings.
-Solution: Use the value of the $LC_MESSAGES environment variable.
-Files: src/ex_cmds2.c
-
-
-*** ../vim-6.2.507/src/ex_cmds2.c Mon Apr 19 20:26:42 2004
---- src/ex_cmds2.c Tue Apr 27 22:26:37 2004
-***************
-*** 5489,5494 ****
---- 5489,5527 ----
- }
- #endif
-
-+ #if !defined(LC_MESSAGES) \
-+ && (((defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
-+ && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))) \
-+ || defined(FEAT_EVAL))
-+ static char_u *get_mess_env __ARGS((void));
-+
-+ /*
-+ * Get the language used for messages from the environment.
-+ */
-+ static char_u *
-+ get_mess_env()
-+ {
-+ char_u *p;
-+
-+ p = mch_getenv((char_u *)"LC_ALL");
-+ if (p == NULL || *p == NUL)
-+ {
-+ p = mch_getenv((char_u *)"LC_MESSAGES");
-+ if (p == NULL || *p == NUL)
-+ {
-+ p = mch_getenv((char_u *)"LANG");
-+ if (VIM_ISDIGIT(*p)) /* ignore something like "1043" */
-+ p = NULL;
-+ # if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
-+ if (p == NULL || *p == NUL)
-+ p = (char_u *)get_locale_val(LC_CTYPE);
-+ # endif
-+ }
-+ }
-+ return p;
-+ }
-+ #endif
-+
- #if defined(FEAT_EVAL) || defined(PROTO)
-
- /*
-***************
-*** 5508,5516 ****
- # endif
- set_vim_var_string(VV_CTYPE, loc, -1);
-
-! /* When LC_MESSAGES isn't defined use the value from LC_CTYPE. */
- # if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) && defined(LC_MESSAGES)
- loc = (char_u *)get_locale_val(LC_MESSAGES);
- # endif
- set_vim_var_string(VV_LANG, loc, -1);
-
---- 5541,5552 ----
- # endif
- set_vim_var_string(VV_CTYPE, loc, -1);
-
-! /* When LC_MESSAGES isn't defined use the value from $LC_MESSAGES, fall
-! * back to LC_CTYPE if it's empty. */
- # if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) && defined(LC_MESSAGES)
- loc = (char_u *)get_locale_val(LC_MESSAGES);
-+ # else
-+ loc = get_mess_env();
- # endif
- set_vim_var_string(VV_LANG, loc, -1);
-
-***************
-*** 5573,5587 ****
- {
- #ifndef LC_MESSAGES
- if (what == VIM_LC_MESSAGES)
-! {
-! p = mch_getenv((char_u *)"LC_ALL");
-! if (p == NULL || *p == NUL)
-! {
-! p = mch_getenv((char_u *)"LC_MESSAGES");
-! if (p == NULL || *p == NUL)
-! p = mch_getenv((char_u *)"LANG");
-! }
-! }
- else
- #endif
- p = (char_u *)setlocale(what, NULL);
---- 5609,5615 ----
- {
- #ifndef LC_MESSAGES
- if (what == VIM_LC_MESSAGES)
-! p = get_mess_env();
- else
- #endif
- p = (char_u *)setlocale(what, NULL);
-*** ../vim-6.2.507/src/version.c Tue Apr 27 21:42:53 2004
---- src/version.c Tue Apr 27 22:22:39 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 508,
- /**/
-
---
-Nothing is fool-proof to a sufficiently talented fool.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.509
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.509 (after 6.2.508)
-Problem: Crash when $LANG is not set.
-Solution: Add check for NULL pointer. (Ron Aaron)
-Files: src/ex_cmds2.c
-
-
-*** ../vim-6.2.508/src/ex_cmds2.c Tue Apr 27 22:27:24 2004
---- src/ex_cmds2.c Wed Apr 28 10:12:39 2004
-***************
-*** 5510,5517 ****
- if (p == NULL || *p == NUL)
- {
- p = mch_getenv((char_u *)"LANG");
-! if (VIM_ISDIGIT(*p)) /* ignore something like "1043" */
-! p = NULL;
- # if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
- if (p == NULL || *p == NUL)
- p = (char_u *)get_locale_val(LC_CTYPE);
---- 5510,5517 ----
- if (p == NULL || *p == NUL)
- {
- p = mch_getenv((char_u *)"LANG");
-! if (p != NULL && VIM_ISDIGIT(*p))
-! p = NULL; /* ignore something like "1043" */
- # if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
- if (p == NULL || *p == NUL)
- p = (char_u *)get_locale_val(LC_CTYPE);
-*** ../vim-6.2.508/src/version.c Tue Apr 27 22:27:24 2004
---- src/version.c Wed Apr 28 12:01:15 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 509,
- /**/
-
---
-Don't read everything you believe.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.510
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.510 (after 6.2.507)
-Problem: Warning for pointer conversion.
-Solution: Add a type cast.
-Files: src/gui_gtk_x11.c
-
-
-*** ../vim-6.2.509/src/gui_gtk_x11.c Tue Apr 27 21:42:53 2004
---- src/gui_gtk_x11.c Wed Apr 28 16:12:48 2004
-***************
-*** 480,486 ****
- break;
- #ifdef FEAT_NETBEANS_INTG
- /* darn, -nb has non-standard syntax */
-! if (vim_strchr(":=", argv[i][len]) != NULL
- && (option->flags & ARG_INDEX_MASK) == ARG_NETBEANS)
- break;
- #endif
---- 480,486 ----
- break;
- #ifdef FEAT_NETBEANS_INTG
- /* darn, -nb has non-standard syntax */
-! if (vim_strchr((char_u *)":=", argv[i][len]) != NULL
- && (option->flags & ARG_INDEX_MASK) == ARG_NETBEANS)
- break;
- #endif
-*** ../vim-6.2.509/src/version.c Wed Apr 28 12:02:26 2004
---- src/version.c Wed Apr 28 16:14:10 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 510,
- /**/
-
---
-George: "I just got a new set of golf clubs for my wife!"
- John: "Great trade!"
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.511
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.511
-Problem: Tags in Russian help files are in utf-8 encoding, which may be
- different from 'encoding'.
-Solution: Use the "TAG_FILE_ENCODING" field in the tags file to specify the
- encoding of the tags. Convert help tags from 'encoding' to the
- tag file encoding when searching for matches, do the reverse when
- listing help tags.
-Files: runtime/doc/tagsrch.txt, src/ex_cmds.c, src/tag.c
-
-
-*** ../vim-6.2.510/runtime/doc/tagsrch.txt Sun Jun 1 12:20:35 2003
---- runtime/doc/tagsrch.txt Wed Apr 28 11:58:29 2004
-***************
-*** 1,4 ****
-! *tagsrch.txt* For Vim version 6.2. Last change: 2003 May 18
-
-
- VIM REFERENCE MANUAL by Bram Moolenaar
---- 1,4 ----
-! *tagsrch.txt* For Vim version 6.2. Last change: 2004 Apr 28
-
-
- VIM REFERENCE MANUAL by Bram Moolenaar
-***************
-*** 546,565 ****
- The first lines in the tags file can contain lines that start with
- !_TAG_
- These are sorted to the first lines, only rare tags that start with "!" can
-! sort to before them. Vim only recognizes the line that indicates if the file
-! was sorted. When this line is found, Vim uses binary searching for the tags
-! file: >
-! !_TAG_FILE_SORTED<Tab>1
-! <
- A tag file may be case-fold sorted to avoid a linear search when 'ignorecase'
-! is on. See 'tagbsearch' for details. The value '2' should be used then: >
-! !_TAG_FILE_SORTED<Tab>2
-! <
- *tag-search*
- The command can be any Ex command, but often it is a search command.
-! Examples: >
-! tag1 file1 /^main(argc, argv)/
-! tag2 file2 108
-
- The command is always executed with 'magic' not set. The only special
- characters in a search pattern are "^" (begin-of-line) and "$" (<EOL>).
---- 548,575 ----
- The first lines in the tags file can contain lines that start with
- !_TAG_
- These are sorted to the first lines, only rare tags that start with "!" can
-! sort to before them. Vim recognizes two items. The first one is the line
-! that indicates if the file was sorted. When this line is found, Vim uses
-! binary searching for the tags file:
-! !_TAG_FILE_SORTED<Tab>1 ~
-!
- A tag file may be case-fold sorted to avoid a linear search when 'ignorecase'
-! is on. See 'tagbsearch' for details. The value '2' should be used then:
-! !_TAG_FILE_SORTED<Tab>2 ~
-!
-! The other tag that Vim recognizes, but only when compiled with the
-! |+multi_byte| feature, is the encoding of the tags file:
-! !_TAG_FILE_ENCODING<Tab>utf-8 ~
-! Here "utf-8" is the encoding used for the tags. Vim will then convert the tag
-! being searched for from 'encoding' to the encoding of the tags file. And when
-! listing tags the reverse happens. When the conversion fails the unconverted
-! tag is used.
-!
- *tag-search*
- The command can be any Ex command, but often it is a search command.
-! Examples:
-! tag1 file1 /^main(argc, argv)/ ~
-! tag2 file2 108 ~
-
- The command is always executed with 'magic' not set. The only special
- characters in a search pattern are "^" (begin-of-line) and "$" (<EOL>).
-*** ../vim-6.2.510/src/ex_cmds.c Mon Apr 19 20:26:42 2004
---- src/ex_cmds.c Wed Apr 28 15:02:02 2004
-***************
-*** 5275,5280 ****
---- 5275,5285 ----
- char_u *s;
- int i;
- char_u *fname;
-+ # ifdef FEAT_MBYTE
-+ int utf8 = MAYBE;
-+ int this_utf8;
-+ int firstline;
-+ # endif
-
- /*
- * Find all *.txt files.
-***************
-*** 5342,5349 ****
---- 5347,5375 ----
- }
- fname = gettail(files[fi]);
-
-+ # ifdef FEAT_MBYTE
-+ firstline = TRUE;
-+ # endif
- while (!vim_fgets(IObuff, IOSIZE, fd) && !got_int)
- {
-+ # ifdef FEAT_MBYTE
-+ if (firstline)
-+ {
-+ /* Detect utf-8 file by a non-ASCII char in the first line. */
-+ this_utf8 = FALSE;
-+ for (s = IObuff; *s != NUL; ++s)
-+ if (*s >= 0x80)
-+ this_utf8 = TRUE;
-+ if (utf8 == MAYBE)
-+ utf8 = this_utf8;
-+ else if (utf8 != this_utf8)
-+ {
-+ EMSG2(_("E670: Mix of help file encodings within a language: %s"), files[fi]);
-+ got_int = TRUE;
-+ }
-+ firstline = FALSE;
-+ }
-+ # endif
- p1 = vim_strchr(IObuff, '*'); /* find first '*' */
- while (p1 != NULL)
- {
-***************
-*** 5426,5431 ****
---- 5452,5462 ----
- ++p2;
- }
- }
-+
-+ # ifdef FEAT_MBYTE
-+ if (utf8 == TRUE)
-+ fprintf(fd_tags, "!_TAG_FILE_ENCODING\tutf-8\t//\n");
-+ # endif
-
- /*
- * Write the tags into the file.
-*** ../vim-6.2.510/src/tag.c Mon Apr 19 20:26:43 2004
---- src/tag.c Wed Apr 28 14:39:14 2004
-***************
-*** 1005,1010 ****
---- 1005,1060 ----
- #endif
-
- /*
-+ * Structure to hold info about the tag pattern being used.
-+ */
-+ typedef struct
-+ {
-+ char_u *pat; /* the pattern */
-+ int len; /* length of pat[] */
-+ char_u *head; /* start of pattern head */
-+ int headlen; /* length of head[] */
-+ regmatch_T regmatch; /* regexp program, may be NULL */
-+ } pat_T;
-+
-+ static void prepare_pats __ARGS((pat_T *pats, int has_re));
-+
-+ /*
-+ * Extract info from the tag search pattern "pats->pat".
-+ */
-+ static void
-+ prepare_pats(pats, has_re)
-+ pat_T *pats;
-+ int has_re;
-+ {
-+ pats->head = pats->pat;
-+ pats->headlen = pats->len;
-+ if (has_re)
-+ {
-+ /* When the pattern starts with '^' or "\\<", binary searching can be
-+ * used (much faster). */
-+ if (pats->pat[0] == '^')
-+ pats->head = pats->pat + 1;
-+ else if (pats->pat[0] == '\\' && pats->pat[1] == '<')
-+ pats->head = pats->pat + 2;
-+ if (pats->head == pats->pat)
-+ pats->headlen = 0;
-+ else
-+ for (pats->headlen = 0; pats->head[pats->headlen] != NUL;
-+ ++pats->headlen)
-+ if (vim_strchr((char_u *)(p_magic ? ".[~*\\$" : "\\$"),
-+ pats->head[pats->headlen]) != NULL)
-+ break;
-+ if (p_tl != 0 && pats->headlen > p_tl) /* adjust for 'taglength' */
-+ pats->headlen = p_tl;
-+ }
-+
-+ if (has_re)
-+ pats->regmatch.regprog = vim_regcomp(pats->pat, p_magic ? RE_MAGIC : 0);
-+ else
-+ pats->regmatch.regprog = NULL;
-+ }
-+
-+ /*
- * find_tags() - search for tags in tags files
- *
- * Return FAIL if search completely failed (*num_matches will be 0, *matchesp
-***************
-*** 1053,1059 ****
- char_u *p;
- char_u *s;
- int i;
-- regmatch_T regmatch; /* regexp program may be NULL */
- #ifdef FEAT_TAG_BINS
- struct tag_search_info /* Binary search file offsets */
- {
---- 1103,1108 ----
-***************
-*** 1124,1132 ****
- char_u *saved_pat = NULL; /* copy of pat[] */
- #endif
-
-! int patlen; /* length of pat[] */
-! char_u *pathead; /* start of pattern head */
-! int patheadlen; /* length of pathead[] */
- #ifdef FEAT_TAG_BINS
- int findall = (mincount == MAXCOL || mincount == TAG_MANY);
- /* find all matching tags */
---- 1173,1188 ----
- char_u *saved_pat = NULL; /* copy of pat[] */
- #endif
-
-! /* Use two sets of variables for the pattern: "orgpat" holds the values
-! * for the original pattern and "convpat" converted from 'encoding' to
-! * encoding of the tags file. "pats" point to either one of these. */
-! pat_T *pats;
-! pat_T orgpat; /* holds unconverted pattern info */
-! #ifdef FEAT_MBYTE
-! pat_T convpat; /* holds converted pattern info */
-! vimconv_T vimconv;
-! #endif
-!
- #ifdef FEAT_TAG_BINS
- int findall = (mincount == MAXCOL || mincount == TAG_MANY);
- /* find all matching tags */
-***************
-*** 1146,1151 ****
---- 1202,1212 ----
- int verbose = (flags & TAG_VERBOSE);
-
- help_save = curbuf->b_help;
-+ orgpat.pat = pat;
-+ pats = &orgpat;
-+ #ifdef FEAT_MBYTE
-+ vimconv.vc_type = CONV_NONE;
-+ #endif
-
- /*
- * Allocate memory for the buffers that are used
-***************
-*** 1176,1230 ****
- if (help_only) /* want tags from help file */
- curbuf->b_help = TRUE; /* will be restored later */
-
-! patlen = (int)STRLEN(pat);
- #ifdef FEAT_MULTI_LANG
- if (curbuf->b_help)
- {
- /* When "@ab" is specified use only the "ab" language, otherwise
- * search all languages. */
-! if (patlen > 3 && pat[patlen - 3] == '@'
-! && ASCII_ISALPHA(pat[patlen - 2])
-! && ASCII_ISALPHA(pat[patlen - 1]))
- {
-! saved_pat = vim_strnsave(pat, patlen - 3);
- if (saved_pat != NULL)
- {
-! help_lang_find = &pat[patlen - 2];
-! pat = saved_pat;
-! patlen -= 3;
- }
- }
- }
- #endif
-
-! if (p_tl != 0 && patlen > p_tl) /* adjust for 'taglength' */
-! patlen = p_tl;
-!
-! pathead = pat;
-! patheadlen = patlen;
-! if (has_re)
-! {
-! /* When the pattern starts with '^' or "\\<", binary searching can be
-! * used (much faster). */
-! if (pat[0] == '^')
-! pathead = pat + 1;
-! else if (pat[0] == '\\' && pat[1] == '<')
-! pathead = pat + 2;
-! if (pathead == pat)
-! patheadlen = 0;
-! else
-! for (patheadlen = 0; pathead[patheadlen] != NUL; ++patheadlen)
-! if (vim_strchr((char_u *)(p_magic ? ".[~*\\$" : "\\$"),
-! pathead[patheadlen]) != NULL)
-! break;
-! if (p_tl != 0 && patheadlen > p_tl) /* adjust for 'taglength' */
-! patheadlen = p_tl;
-! }
-!
-! if (has_re)
-! regmatch.regprog = vim_regcomp(pat, p_magic ? RE_MAGIC : 0);
-! else
-! regmatch.regprog = NULL;
-
- #ifdef FEAT_TAG_BINS
- /* This is only to avoid a compiler warning for using search_info
---- 1237,1266 ----
- if (help_only) /* want tags from help file */
- curbuf->b_help = TRUE; /* will be restored later */
-
-! pats->len = (int)STRLEN(pat);
- #ifdef FEAT_MULTI_LANG
- if (curbuf->b_help)
- {
- /* When "@ab" is specified use only the "ab" language, otherwise
- * search all languages. */
-! if (pats->len > 3 && pat[pats->len - 3] == '@'
-! && ASCII_ISALPHA(pat[pats->len - 2])
-! && ASCII_ISALPHA(pat[pats->len - 1]))
- {
-! saved_pat = vim_strnsave(pat, pats->len - 3);
- if (saved_pat != NULL)
- {
-! help_lang_find = &pat[pats->len - 2];
-! pats->pat = saved_pat;
-! pats->len -= 3;
- }
- }
- }
- #endif
-+ if (p_tl != 0 && pats->len > p_tl) /* adjust for 'taglength' */
-+ pats->len = p_tl;
-
-! prepare_pats(pats, has_re);
-
- #ifdef FEAT_TAG_BINS
- /* This is only to avoid a compiler warning for using search_info
-***************
-*** 1242,1254 ****
- * Only ignore case when TAG_NOIC not used or 'ignorecase' set.
- */
- #ifdef FEAT_TAG_BINS
-! regmatch.rm_ic = ((p_ic || !noic)
-! && (findall || patheadlen == 0 || !p_tbs));
- for (round = 1; round <= 2; ++round)
- {
-! linear = (patheadlen == 0 || !p_tbs || round == 2);
- #else
-! regmatch.rm_ic = (p_ic || !noic);
- #endif
-
- /*
---- 1278,1290 ----
- * Only ignore case when TAG_NOIC not used or 'ignorecase' set.
- */
- #ifdef FEAT_TAG_BINS
-! pats->regmatch.rm_ic = ((p_ic || !noic)
-! && (findall || pats->headlen == 0 || !p_tbs));
- for (round = 1; round <= 2; ++round)
- {
-! linear = (pats->headlen == 0 || !p_tbs || round == 2);
- #else
-! pats->regmatch.rm_ic = (p_ic || !noic);
- #endif
-
- /*
-***************
-*** 1566,1578 ****
- {
- state = TS_BINARY;
- sortic = TRUE;
-! regmatch.rm_ic = (p_ic || !noic);
- }
- else
- state = TS_LINEAR;
- }
-
-! if (state == TS_BINARY && regmatch.rm_ic && !sortic)
- {
- /* binary search won't work for ignoring case, use linear
- * search. */
---- 1602,1614 ----
- {
- state = TS_BINARY;
- sortic = TRUE;
-! pats->regmatch.rm_ic = (p_ic || !noic);
- }
- else
- state = TS_LINEAR;
- }
-
-! if (state == TS_BINARY && pats->regmatch.rm_ic && !sortic)
- {
- /* binary search won't work for ignoring case, use linear
- * search. */
-***************
-*** 1612,1623 ****
- #endif
- }
-
- /*
- * Figure out where the different strings are in this line.
- * For "normal" tags: Do a quick check if the tag matches.
- * This speeds up tag searching a lot!
- */
-! if (patheadlen
- #ifdef FEAT_EMACS_TAGS
- && !is_etag
- #endif
---- 1648,1687 ----
- #endif
- }
-
-+ #ifdef FEAT_MBYTE
-+ if (lbuf[0] == '!' && pats == &orgpat
-+ && STRNCMP(lbuf, "!_TAG_FILE_ENCODING\t", 20) == 0)
-+ {
-+ /* Convert the search pattern from 'encoding' to the
-+ * specified encoding. */
-+ for (p = lbuf + 20; *p > ' ' && *p < 127; ++p)
-+ ;
-+ *p = NUL;
-+ convert_setup(&vimconv, p_enc, lbuf + 20);
-+ if (vimconv.vc_type != CONV_NONE)
-+ {
-+ convpat.pat = string_convert(&vimconv, pats->pat, NULL);
-+ if (convpat.pat != NULL)
-+ {
-+ pats = &convpat;
-+ pats->len = (int)STRLEN(pats->pat);
-+ prepare_pats(pats, has_re);
-+ pats->regmatch.rm_ic = orgpat.regmatch.rm_ic;
-+ }
-+ }
-+
-+ /* Prepare for converting a match the other way around. */
-+ convert_setup(&vimconv, lbuf + 20, p_enc);
-+ continue;
-+ }
-+ #endif
-+
- /*
- * Figure out where the different strings are in this line.
- * For "normal" tags: Do a quick check if the tag matches.
- * This speeds up tag searching a lot!
- */
-! if (pats->headlen
- #ifdef FEAT_EMACS_TAGS
- && !is_etag
- #endif
-***************
-*** 1674,1682 ****
- cmplen = (int)(tagp.tagname_end - tagp.tagname);
- if (p_tl != 0 && cmplen > p_tl) /* adjust for 'taglength' */
- cmplen = p_tl;
-! if (has_re && patheadlen < cmplen)
-! cmplen = patheadlen;
-! else if (state == TS_LINEAR && patheadlen != cmplen)
- continue;
-
- #ifdef FEAT_TAG_BINS
---- 1738,1746 ----
- cmplen = (int)(tagp.tagname_end - tagp.tagname);
- if (p_tl != 0 && cmplen > p_tl) /* adjust for 'taglength' */
- cmplen = p_tl;
-! if (has_re && pats->headlen < cmplen)
-! cmplen = pats->headlen;
-! else if (state == TS_LINEAR && pats->headlen != cmplen)
- continue;
-
- #ifdef FEAT_TAG_BINS
-***************
-*** 1695,1704 ****
- * Compare the current tag with the searched tag.
- */
- if (sortic)
-! tagcmp = tag_strnicmp(tagp.tagname, pathead,
- (size_t)cmplen);
- else
-! tagcmp = STRNCMP(tagp.tagname, pathead, cmplen);
-
- /*
- * A match with a shorter tag means to search forward.
---- 1759,1768 ----
- * Compare the current tag with the searched tag.
- */
- if (sortic)
-! tagcmp = tag_strnicmp(tagp.tagname, pats->head,
- (size_t)cmplen);
- else
-! tagcmp = STRNCMP(tagp.tagname, pats->head, cmplen);
-
- /*
- * A match with a shorter tag means to search forward.
-***************
-*** 1706,1714 ****
- */
- if (tagcmp == 0)
- {
-! if (cmplen < patheadlen)
- tagcmp = -1;
-! else if (cmplen > patheadlen)
- tagcmp = 1;
- }
-
---- 1770,1778 ----
- */
- if (tagcmp == 0)
- {
-! if (cmplen < pats->headlen)
- tagcmp = -1;
-! else if (cmplen > pats->headlen)
- tagcmp = 1;
- }
-
-***************
-*** 1752,1758 ****
- }
- else if (state == TS_SKIP_BACK)
- {
-! if (MB_STRNICMP(tagp.tagname, pathead, cmplen) != 0)
- state = TS_STEP_FORWARD;
- else
- /* Have to skip back more. Restore the curr_offset
---- 1816,1822 ----
- }
- else if (state == TS_SKIP_BACK)
- {
-! if (MB_STRNICMP(tagp.tagname, pats->head, cmplen) != 0)
- state = TS_STEP_FORWARD;
- else
- /* Have to skip back more. Restore the curr_offset
-***************
-*** 1762,1768 ****
- }
- else if (state == TS_STEP_FORWARD)
- {
-! if (MB_STRNICMP(tagp.tagname, pathead, cmplen) != 0)
- {
- if ((off_t)ftell(fp) > search_info.match_offset)
- break; /* past last match */
---- 1826,1832 ----
- }
- else if (state == TS_STEP_FORWARD)
- {
-! if (MB_STRNICMP(tagp.tagname, pats->head, cmplen) != 0)
- {
- if ((off_t)ftell(fp) > search_info.match_offset)
- break; /* past last match */
-***************
-*** 1773,1779 ****
- else
- #endif
- /* skip this match if it can't match */
-! if (MB_STRNICMP(tagp.tagname, pathead, cmplen) != 0)
- continue;
-
- /*
---- 1837,1843 ----
- else
- #endif
- /* skip this match if it can't match */
-! if (MB_STRNICMP(tagp.tagname, pats->head, cmplen) != 0)
- continue;
-
- /*
-***************
-*** 1824,1863 ****
- if (p_tl != 0 && cmplen > p_tl) /* adjust for 'taglength' */
- cmplen = p_tl;
- /* if tag length does not match, don't try comparing */
-! if (patlen != cmplen)
- match = FALSE;
- else
- {
-! if (regmatch.rm_ic)
- {
-! match = (MB_STRNICMP(tagp.tagname, pat, cmplen) == 0);
- if (match)
-! match_no_ic = (STRNCMP(tagp.tagname, pat, cmplen) == 0);
- }
- else
-! match = (STRNCMP(tagp.tagname, pat, cmplen) == 0);
- }
-
- /*
- * Has a regexp: Also find tags matching regexp.
- */
- match_re = FALSE;
-! if (!match && regmatch.regprog != NULL)
- {
- int cc;
-
- cc = *tagp.tagname_end;
- *tagp.tagname_end = NUL;
-! match = vim_regexec(®match, tagp.tagname, (colnr_T)0);
- if (match)
- {
-! matchoff = (int)(regmatch.startp[0] - tagp.tagname);
-! if (regmatch.rm_ic)
- {
-! regmatch.rm_ic = FALSE;
-! match_no_ic = vim_regexec(®match, tagp.tagname,
- (colnr_T)0);
-! regmatch.rm_ic = TRUE;
- }
- }
- *tagp.tagname_end = cc;
---- 1888,1928 ----
- if (p_tl != 0 && cmplen > p_tl) /* adjust for 'taglength' */
- cmplen = p_tl;
- /* if tag length does not match, don't try comparing */
-! if (pats->len != cmplen)
- match = FALSE;
- else
- {
-! if (pats->regmatch.rm_ic)
- {
-! match = (MB_STRNICMP(tagp.tagname, pats->pat, cmplen) == 0);
- if (match)
-! match_no_ic = (STRNCMP(tagp.tagname, pats->pat,
-! cmplen) == 0);
- }
- else
-! match = (STRNCMP(tagp.tagname, pats->pat, cmplen) == 0);
- }
-
- /*
- * Has a regexp: Also find tags matching regexp.
- */
- match_re = FALSE;
-! if (!match && pats->regmatch.regprog != NULL)
- {
- int cc;
-
- cc = *tagp.tagname_end;
- *tagp.tagname_end = NUL;
-! match = vim_regexec(&pats->regmatch, tagp.tagname, (colnr_T)0);
- if (match)
- {
-! matchoff = (int)(pats->regmatch.startp[0] - tagp.tagname);
-! if (pats->regmatch.rm_ic)
- {
-! pats->regmatch.rm_ic = FALSE;
-! match_no_ic = vim_regexec(&pats->regmatch, tagp.tagname,
- (colnr_T)0);
-! pats->regmatch.rm_ic = TRUE;
- }
- }
- *tagp.tagname_end = cc;
-***************
-*** 1914,1920 ****
- else
- mtt = MT_GL_OTH;
- }
-! if (regmatch.rm_ic && !match_no_ic)
- mtt += MT_IC_OFF;
- if (match_re)
- mtt += MT_RE_OFF;
---- 1979,1985 ----
- else
- mtt = MT_GL_OTH;
- }
-! if (pats->regmatch.rm_ic && !match_no_ic)
- mtt += MT_IC_OFF;
- if (match_re)
- mtt += MT_RE_OFF;
-***************
-*** 1927,1932 ****
---- 1992,2026 ----
- */
- if (ga_grow(&ga_match[mtt], 1) == OK)
- {
-+ #ifdef FEAT_MBYTE
-+ char_u *conv_line = NULL;
-+ char_u *lbuf_line = lbuf;
-+
-+ if (vimconv.vc_type != CONV_NONE)
-+ {
-+ /* Convert the tag line from the encoding of the tags
-+ * file to 'encoding'. Then parse the line again. */
-+ conv_line = string_convert(&vimconv, lbuf, NULL);
-+ if (conv_line != NULL)
-+ {
-+ if (parse_tag_line(conv_line,
-+ #ifdef FEAT_EMACS_TAGS
-+ is_etag,
-+ #endif
-+ &tagp) == OK)
-+ lbuf_line = conv_line;
-+ else
-+ /* doesn't work, go back to unconverted line. */
-+ (void)parse_tag_line(lbuf,
-+ #ifdef FEAT_EMACS_TAGS
-+ is_etag,
-+ #endif
-+ &tagp);
-+ }
-+ }
-+ #else
-+ # define lbuf_line lbuf
-+ #endif
- if (help_only)
- {
- #ifdef FEAT_MULTI_LANG
-***************
-*** 2019,2025 ****
- * other tag: <mtt><tag_fname><NUL><NUL><lbuf>
- * without Emacs tags: <mtt><tag_fname><NUL><lbuf>
- */
-! len = (int)STRLEN(tag_fname) + (int)STRLEN(lbuf) + 3;
- #ifdef FEAT_EMACS_TAGS
- if (is_etag)
- len += (int)STRLEN(ebuf) + 1;
---- 2113,2119 ----
- * other tag: <mtt><tag_fname><NUL><NUL><lbuf>
- * without Emacs tags: <mtt><tag_fname><NUL><lbuf>
- */
-! len = (int)STRLEN(tag_fname) + (int)STRLEN(lbuf_line) + 3;
- #ifdef FEAT_EMACS_TAGS
- if (is_etag)
- len += (int)STRLEN(ebuf) + 1;
-***************
-*** 2049,2055 ****
- else
- *s++ = NUL;
- #endif
-! STRCPY(s, lbuf);
- }
- }
-
---- 2143,2149 ----
- else
- *s++ = NUL;
- #endif
-! STRCPY(s, lbuf_line);
- }
- }
-
-***************
-*** 2086,2091 ****
---- 2180,2189 ----
- else
- vim_free(mfp);
- }
-+ #ifdef FEAT_MBYTE
-+ /* Note: this makes the values in "tagp" invalid! */
-+ vim_free(conv_line);
-+ #endif
- }
- else /* Out of memory! Just forget about the rest. */
- {
-***************
-*** 2123,2128 ****
---- 2221,2238 ----
- vim_free(incstack[incstack_idx].etag_fname);
- }
- #endif
-+ #ifdef FEAT_MBYTE
-+ if (pats == &convpat)
-+ {
-+ /* Go back from converted pattern to original pattern. */
-+ vim_free(pats->pat);
-+ vim_free(pats->regmatch.regprog);
-+ orgpat.regmatch.rm_ic = pats->regmatch.rm_ic;
-+ pats = &orgpat;
-+ }
-+ if (vimconv.vc_type != CONV_NONE)
-+ convert_setup(&vimconv, NULL, NULL);
-+ #endif
-
- #ifdef FEAT_TAG_BINS
- if (sort_error)
-***************
-*** 2154,2166 ****
- /* stop searching when already did a linear search, or when
- * TAG_NOIC used, and 'ignorecase' not set
- * or already did case-ignore search */
-! if (stop_searching || linear || (!p_ic && noic) || regmatch.rm_ic)
- break;
- # ifdef FEAT_CSCOPE
- if (use_cscope)
- break;
- # endif
-! regmatch.rm_ic = TRUE; /* try another time while ignoring case */
- }
- #endif
-
---- 2264,2276 ----
- /* stop searching when already did a linear search, or when
- * TAG_NOIC used, and 'ignorecase' not set
- * or already did case-ignore search */
-! if (stop_searching || linear || (!p_ic && noic) || pats->regmatch.rm_ic)
- break;
- # ifdef FEAT_CSCOPE
- if (use_cscope)
- break;
- # endif
-! pats->regmatch.rm_ic = TRUE; /* try another time while ignoring case */
- }
- #endif
-
-***************
-*** 2173,2179 ****
-
- findtag_end:
- vim_free(lbuf);
-! vim_free(regmatch.regprog);
- vim_free(tag_fname);
- #ifdef FEAT_EMACS_TAGS
- vim_free(ebuf);
---- 2283,2289 ----
-
- findtag_end:
- vim_free(lbuf);
-! vim_free(pats->regmatch.regprog);
- vim_free(tag_fname);
- #ifdef FEAT_EMACS_TAGS
- vim_free(ebuf);
-*** ../vim-6.2.510/src/version.c Wed Apr 28 16:14:57 2004
---- src/version.c Wed Apr 28 16:17:12 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 511,
- /**/
-
---
-The future isn't what it used to be.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.512
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.512
-Problem: Translating "\"\n" is useless. (Gerfried Fuchs)
-Solution: Remove the _() around it.
-Files: src/main.c, src/memline.c
-
-
-*** ../vim-6.2.511/src/main.c Mon Apr 19 20:26:43 2004
---- src/main.c Wed Apr 28 11:00:12 2004
-***************
-*** 933,946 ****
- mch_errmsg(argv[-1]);
- mch_errmsg(" ");
- mch_errmsg(argv[0]);
-! mch_errmsg(_("\"\n"));
- mch_exit(2);
- }
- if ((scriptin[0] = mch_fopen(argv[0], READBIN)) == NULL)
- {
- mch_errmsg(_("Cannot open for reading: \""));
- mch_errmsg(argv[0]);
-! mch_errmsg(_("\"\n"));
- mch_exit(2);
- }
- if (save_typebuf() == FAIL)
---- 933,946 ----
- mch_errmsg(argv[-1]);
- mch_errmsg(" ");
- mch_errmsg(argv[0]);
-! mch_errmsg("\"\n");
- mch_exit(2);
- }
- if ((scriptin[0] = mch_fopen(argv[0], READBIN)) == NULL)
- {
- mch_errmsg(_("Cannot open for reading: \""));
- mch_errmsg(argv[0]);
-! mch_errmsg("\"\n");
- mch_exit(2);
- }
- if (save_typebuf() == FAIL)
-***************
-*** 984,990 ****
- {
- mch_errmsg(_("Cannot open for script output: \""));
- mch_errmsg(argv[0]);
-! mch_errmsg(_("\"\n"));
- mch_exit(2);
- }
- break;
---- 984,990 ----
- {
- mch_errmsg(_("Cannot open for script output: \""));
- mch_errmsg(argv[0]);
-! mch_errmsg("\"\n");
- mch_exit(2);
- }
- break;
-*** ../vim-6.2.511/src/memline.c Tue Apr 20 20:15:33 2004
---- src/memline.c Tue Apr 20 20:10:50 2004
-***************
-*** 3674,3684 ****
- (void)EMSG(_("E325: ATTENTION"));
- MSG_PUTS(_("\nFound a swap file by the name \""));
- msg_home_replace(fname);
-! MSG_PUTS(_("\"\n"));
- sx = swapfile_info(fname);
- MSG_PUTS(_("While opening file \""));
- msg_outtrans(buf->b_fname);
-! MSG_PUTS(_("\"\n"));
- if (mch_stat((char *)buf->b_fname, &st) != -1)
- {
- MSG_PUTS(_(" dated: "));
---- 3674,3684 ----
- (void)EMSG(_("E325: ATTENTION"));
- MSG_PUTS(_("\nFound a swap file by the name \""));
- msg_home_replace(fname);
-! MSG_PUTS("\"\n");
- sx = swapfile_info(fname);
- MSG_PUTS(_("While opening file \""));
- msg_outtrans(buf->b_fname);
-! MSG_PUTS("\"\n");
- if (mch_stat((char *)buf->b_fname, &st) != -1)
- {
- MSG_PUTS(_(" dated: "));
-*** ../vim-6.2.511/src/version.c Wed Apr 28 17:04:28 2004
---- src/version.c Wed Apr 28 17:36:56 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 512,
- /**/
-
---
-"Oh, no! NOT the Spanish Inquisition!"
-"NOBODY expects the Spanish Inquisition!!!"
- -- Monty Python sketch --
-"Oh, no! NOT another option!"
-"EVERYBODY expects another option!!!"
- -- Discussion in vim-dev mailing list --
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.513
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.513 (after 6.2.507)
-Problem: NetBeans: the check for owning the connection info file can be
- simplified. (Nikolay Molchanov)
-Solution: Only check if the access mode is right.
-Files: src/netbeans.c
-
-
-*** ../vim-6.2.512/src/netbeans.c Tue Apr 27 21:42:53 2004
---- src/netbeans.c Wed Apr 28 18:07:02 2004
-***************
-*** 442,454 ****
- struct stat st;
-
- /*
-! * For Unix only accept the file when it's owned by the current user and
-! * not accessible by others.
- */
-! if (mch_stat(file, &st) == 0
-! && (st.st_uid != getuid() || (st.st_mode & 0077)))
- {
-! EMSG2(_("E668: Ownership of NetBeans connection file invalid: \"%s\""),
- file);
- return FAIL;
- }
---- 442,453 ----
- struct stat st;
-
- /*
-! * For Unix only accept the file when it's not accessible by others.
-! * The open will then fail if we don't own the file.
- */
-! if (mch_stat(file, &st) == 0 && (st.st_mode & 0077) != 0)
- {
-! EMSG2(_("E668: Wrong access mode for NetBeans connection info file: \"%s\""),
- file);
- return FAIL;
- }
-*** ../vim-6.2.512/src/version.c Wed Apr 28 17:39:04 2004
---- src/version.c Wed Apr 28 19:41:33 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 513,
- /**/
-
---
-hundred-and-one symptoms of being an internet addict:
-45. You buy a Captain Kirk chair with a built-in keyboard and mouse.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.514
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.514
-Problem: When a highlight/syntax group name contains invalid characters
- there is no warning.
-Solution: Add an error for unprintable characters and a warning for other
- invalid characters.
-Files: src/syntax.c
-
-
-*** ../vim-6.2.513/src/syntax.c Mon Apr 19 20:26:43 2004
---- src/syntax.c Tue Apr 27 22:17:13 2004
-***************
-*** 7897,7905 ****
- */
- static int
- syn_add_group(name)
-! char_u *name;
- {
-! /* TODO: check that the name is ASCII letters, digits and underscore. */
- /*
- * First call for this growarray: init growing array.
- */
---- 7897,7923 ----
- */
- static int
- syn_add_group(name)
-! char_u *name;
- {
-! char_u *p;
-!
-! /* Check that the name is ASCII letters, digits and underscore. */
-! for (p = name; *p != NUL; ++p)
-! {
-! if (!vim_isprintc(*p))
-! {
-! EMSG(_("E669: Unprintable character in group name"));
-! return 0;
-! }
-! else if (!ASCII_ISALNUM(*p) && *p != '_')
-! {
-! /* This is an error, but since there previously was no check only
-! * give a warning. */
-! MSG(_("W18: Invalid character in group name"));
-! break;
-! }
-! }
-!
- /*
- * First call for this growarray: init growing array.
- */
-*** ../vim-6.2.513/src/version.c Wed Apr 28 19:42:38 2004
---- src/version.c Wed Apr 28 19:43:49 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 514,
- /**/
-
---
-hundred-and-one symptoms of being an internet addict:
-46. Your wife makes a new rule: "The computer cannot come to bed."
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.515
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.515
-Problem: When using the options window 'swapfile' is reset.
-Solution: Use ":setlocal" instead of ":set".
-Files: runtime/optwin.vim
-
-
-*** ../vim-6.2.514/runtime/optwin.vim Thu Jul 24 22:20:33 2003
---- runtime/optwin.vim Thu Apr 29 14:34:57 2004
-***************
-*** 1,7 ****
- " These commands create the option window.
- "
- " Maintainer: Bram Moolenaar <Bram@vim.org>
-! " Last Change: 2003 Jul 22
-
- " If there already is an option window, jump to that one.
- if bufwinnr("option-window") > 0
---- 1,7 ----
- " These commands create the option window.
- "
- " Maintainer: Bram Moolenaar <Bram@vim.org>
-! " Last Change: 2004 Apr 29
-
- " If there already is an option window, jump to that one.
- if bufwinnr("option-window") > 0
-***************
-*** 1133,1143 ****
- 1
-
- " reset 'modified', so that ":q" can be used to close the window
-! set nomodified
-
- if has("syntax")
- " Use Vim highlighting, with some additional stuff
-! set ft=vim
- syn match optwinHeader "^ \=[0-9].*"
- syn match optwinName "^[a-z]*\t" nextgroup=optwinComment
- syn match optwinComment ".*" contained
---- 1137,1147 ----
- 1
-
- " reset 'modified', so that ":q" can be used to close the window
-! setlocal nomodified
-
- if has("syntax")
- " Use Vim highlighting, with some additional stuff
-! setlocal ft=vim
- syn match optwinHeader "^ \=[0-9].*"
- syn match optwinName "^[a-z]*\t" nextgroup=optwinComment
- syn match optwinComment ".*" contained
-***************
-*** 1156,1162 ****
- noremap <silent> <buffer> <Space> :call <SID>Space()<CR>
-
- " Make the buffer be deleted when the window is closed.
-! set buftype=nofile bufhidden=delete noswapfile
-
- augroup optwin
- au! BufUnload,BufHidden option-window nested
---- 1160,1166 ----
- noremap <silent> <buffer> <Space> :call <SID>Space()<CR>
-
- " Make the buffer be deleted when the window is closed.
-! setlocal buftype=nofile bufhidden=delete noswapfile
-
- augroup optwin
- au! BufUnload,BufHidden option-window nested
-*** ../vim-6.2.514/src/version.c Wed Apr 28 19:45:29 2004
---- src/version.c Thu Apr 29 14:47:35 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 515,
- /**/
-
---
-hundred-and-one symptoms of being an internet addict:
-58. You turn on your computer and turn off your wife.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.516
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.516
-Problem: The sign column cannot be seen, looks like there are two spaces
- before the text. (Rob Retter)
-Solution: Add the SignColumn highlight group.
-Files: runtime/doc/options.txt, runtime/doc/sign.txt, src/option.c,
- src/screen.c, src/syntax.c, src/vim.h
-
-
-*** ../vim-6.2.515/runtime/doc/options.txt Mon Apr 19 17:00:44 2004
---- runtime/doc/options.txt Thu Apr 29 15:51:04 2004
-***************
-*** 1,4 ****
-! *options.txt* For Vim version 6.2. Last change: 2004 Apr 18
-
-
- VIM REFERENCE MANUAL by Bram Moolenaar
---- 1,4 ----
-! *options.txt* For Vim version 6.2. Last change: 2004 Apr 29
-
-
- VIM REFERENCE MANUAL by Bram Moolenaar
-***************
-*** 3052,3058 ****
- M:ModeMsg,n:LineNr,r:Question,
- s:StatusLine,S:StatusLineNC,c:VertSplit
- t:Title,v:Visual,w:WarningMsg,W:WildMenu,
-! f:Folded,F:FoldColumn")
- global
- {not in Vi}
- This option can be used to set highlighting mode for various
---- 3076,3084 ----
- M:ModeMsg,n:LineNr,r:Question,
- s:StatusLine,S:StatusLineNC,c:VertSplit
- t:Title,v:Visual,w:WarningMsg,W:WildMenu,
-! f:Folded,F:FoldColumn,A:DiffAdd,
-! C:DiffChange,D:DiffDelete,T:DiffText,
-! >:SignColumn")
- global
- {not in Vi}
- This option can be used to set highlighting mode for various
-***************
-*** 3084,3089 ****
---- 3110,3116 ----
- |hl-WildMenu| W wildcard matches displayed for 'wildmenu'
- |hl-Folded| f line used for closed folds
- |hl-FoldColumn| F 'foldcolumn'
-+ |hl-SignColumn| > column used for |signs|
-
- The display modes are:
- r reverse (termcap entry "mr" and "me")
-*** ../vim-6.2.515/runtime/doc/sign.txt Sun Jun 1 12:20:35 2003
---- runtime/doc/sign.txt Thu Apr 29 15:53:36 2004
-***************
-*** 1,4 ****
-! *sign.txt* For Vim version 6.2. Last change: 2003 Apr 19
-
-
- VIM REFERENCE MANUAL by Gordon Prieur
---- 1,4 ----
-! *sign.txt* For Vim version 6.2. Last change: 2004 Apr 29
-
-
- VIM REFERENCE MANUAL by Gordon Prieur
-***************
-*** 14,20 ****
- {only available when compiled with the |+signs| feature}
-
- ==============================================================================
-! 1. Introduction *sign-intro*
-
- When a debugger or other IPE tool is driving an editor it needs to be able
- to give specific highlights which quickly tell the user useful information
---- 14,20 ----
- {only available when compiled with the |+signs| feature}
-
- ==============================================================================
-! 1. Introduction *sign-intro* *signs*
-
- When a debugger or other IPE tool is driving an editor it needs to be able
- to give specific highlights which quickly tell the user useful information
-***************
-*** 45,51 ****
-
- When signs are defined for a file, Vim will automatically add a column of two
- characters to display them in. When the last sign is unplaced the column
-! disappears again.
-
- ==============================================================================
- 2. Commands *sign-commands* *:sig* *:sign*
---- 45,54 ----
-
- When signs are defined for a file, Vim will automatically add a column of two
- characters to display them in. When the last sign is unplaced the column
-! disappears again. The color of the column is set with the SignColumn group
-! |hl-SignColumn|. Example to set the color: >
-!
-! :highlight SignColumn guibg=darkgrey
-
- ==============================================================================
- 2. Commands *sign-commands* *:sig* *:sign*
-*** ../vim-6.2.515/src/option.c Mon Apr 19 20:26:43 2004
---- src/option.c Thu Apr 29 15:48:51 2004
-***************
-*** 1072,1078 ****
- {(char_u *)FALSE, (char_u *)0L}},
- {"highlight", "hl", P_STRING|P_VI_DEF|P_RCLR|P_COMMA|P_NODUP,
- (char_u *)&p_hl, PV_NONE,
-! {(char_u *)"8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText",
- (char_u *)0L}},
- {"history", "hi", P_NUM|P_VIM,
- (char_u *)&p_hi, PV_NONE,
---- 1072,1078 ----
- {(char_u *)FALSE, (char_u *)0L}},
- {"highlight", "hl", P_STRING|P_VI_DEF|P_RCLR|P_COMMA|P_NODUP,
- (char_u *)&p_hl, PV_NONE,
-! {(char_u *)"8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn",
- (char_u *)0L}},
- {"history", "hi", P_NUM|P_VIM,
- (char_u *)&p_hi, PV_NONE,
-*** ../vim-6.2.515/src/screen.c Mon Apr 19 20:26:43 2004
---- src/screen.c Thu Apr 29 16:25:40 2004
-***************
-*** 1864,1869 ****
---- 1864,1887 ----
- #endif
- }
-
-+ #ifdef FEAT_SIGNS
-+ static int draw_signcolumn __ARGS((win_T *wp));
-+
-+ /*
-+ * Return TRUE when window "wp" has a column to draw signs in.
-+ */
-+ static int
-+ draw_signcolumn(wp)
-+ win_T *wp;
-+ {
-+ return (wp->w_buffer->b_signlist != NULL
-+ # ifdef FEAT_NETBEANS_INTG
-+ || usingNetbeans
-+ # endif
-+ );
-+ }
-+ #endif
-+
- /*
- * Clear the rest of the window and mark the unused lines with "c1". use "c2"
- * as the filler character.
-***************
-*** 1877,1883 ****
- int endrow;
- enum hlf_value hl;
- {
-! #if defined(FEAT_FOLDING) || defined(FEAT_CMDWIN)
- int n = 0;
- # define FDC_OFF n
- #else
---- 1895,1901 ----
- int endrow;
- enum hlf_value hl;
- {
-! #if defined(FEAT_FOLDING) || defined(FEAT_SIGNS) || defined(FEAT_CMDWIN)
- int n = 0;
- # define FDC_OFF n
- #else
-***************
-*** 1901,1906 ****
---- 1919,1938 ----
- ' ', ' ', hl_attr(HLF_FC));
- }
- # endif
-+ # ifdef FEAT_SIGNS
-+ if (draw_signcolumn(wp))
-+ {
-+ int nn = n + 2;
-+
-+ /* draw the sign column left of the fold column */
-+ if (nn > wp->w_width)
-+ nn = wp->w_width;
-+ screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
-+ W_ENDCOL(wp) - nn, (int)W_ENDCOL(wp) - n,
-+ ' ', ' ', hl_attr(HLF_SC));
-+ n = nn;
-+ }
-+ # endif
- screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
- W_WINCOL(wp), W_ENDCOL(wp) - 1 - FDC_OFF,
- c2, c2, hl_attr(hl));
-***************
-*** 1937,1942 ****
---- 1969,1988 ----
- n = nn;
- }
- #endif
-+ #ifdef FEAT_SIGNS
-+ if (draw_signcolumn(wp))
-+ {
-+ int nn = n + 2;
-+
-+ /* draw the sign column after the fold column */
-+ if (nn > W_WIDTH(wp))
-+ nn = W_WIDTH(wp);
-+ screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
-+ W_WINCOL(wp) + n, (int)W_WINCOL(wp) + nn,
-+ ' ', ' ', hl_attr(HLF_SC));
-+ n = nn;
-+ }
-+ #endif
- screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow,
- W_WINCOL(wp) + FDC_OFF, (int)W_ENDCOL(wp),
- c1, c2, hl_attr(hl));
-***************
-*** 2032,2038 ****
-
- #ifdef FEAT_SIGNS
- /* If signs are being displayed, add two spaces. */
-! if (wp->w_buffer->b_signlist != NULL)
- {
- len = W_WIDTH(wp) - col;
- if (len > 0)
---- 2078,2084 ----
-
- #ifdef FEAT_SIGNS
- /* If signs are being displayed, add two spaces. */
-! if (draw_signcolumn(wp))
- {
- len = W_WIDTH(wp) - col;
- if (len > 0)
-***************
-*** 2963,2973 ****
- draw_state = WL_SIGN;
- /* Show the sign column when there are any signs in this
- * buffer or when using Netbeans. */
-! if ((wp->w_buffer->b_signlist != NULL
-! # ifdef FEAT_NETBEANS_INTG
-! || usingNetbeans
-! # endif
-! )
- # ifdef FEAT_DIFF
- && filler_todo <= 0
- # endif
---- 3009,3015 ----
- draw_state = WL_SIGN;
- /* Show the sign column when there are any signs in this
- * buffer or when using Netbeans. */
-! if (draw_signcolumn(wp)
- # ifdef FEAT_DIFF
- && filler_todo <= 0
- # endif
-***************
-*** 2980,2986 ****
-
- /* Draw two cells with the sign value or blank. */
- c_extra = ' ';
-! char_attr = 0;
- n_extra = 2;
-
- if (row == startrow)
---- 3022,3028 ----
-
- /* Draw two cells with the sign value or blank. */
- c_extra = ' ';
-! char_attr = hl_attr(HLF_SC);
- n_extra = 2;
-
- if (row == startrow)
-*** ../vim-6.2.515/src/syntax.c Wed Apr 28 19:45:29 2004
---- src/syntax.c Thu Apr 29 15:54:32 2004
-***************
-*** 5940,5945 ****
---- 5940,5946 ----
- "WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black",
- "Folded term=standout ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue",
- "FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue",
-+ "SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue",
- "DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue",
- "DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta",
- "DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan",
-***************
-*** 5960,5965 ****
---- 5961,5967 ----
- "WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black",
- "Folded term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=DarkGrey guifg=Cyan",
- "FoldColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan",
-+ "SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan",
- "DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue",
- "DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta",
- "DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan",
-*** ../vim-6.2.515/src/vim.h Tue Apr 20 12:52:53 2004
---- src/vim.h Thu Apr 29 15:48:18 2004
-***************
-*** 1074,1086 ****
- , HLF_CHD /* Changed diff line */
- , HLF_DED /* Deleted diff line */
- , HLF_TXD /* Text Changed in diff line */
- , HLF_COUNT /* MUST be the last one */
- };
-
- /* the HL_FLAGS must be in the same order as the HLF_ enums! */
- #define HL_FLAGS {'8', '@', 'd', 'e', 'h', 'i', 'l', 'm', 'M', \
- 'n', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
-! 'f', 'F', 'A', 'C', 'D', 'T'}
-
- /*
- * Boolean constants
---- 1074,1087 ----
- , HLF_CHD /* Changed diff line */
- , HLF_DED /* Deleted diff line */
- , HLF_TXD /* Text Changed in diff line */
-+ , HLF_SC /* Sign column */
- , HLF_COUNT /* MUST be the last one */
- };
-
- /* the HL_FLAGS must be in the same order as the HLF_ enums! */
- #define HL_FLAGS {'8', '@', 'd', 'e', 'h', 'i', 'l', 'm', 'M', \
- 'n', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
-! 'f', 'F', 'A', 'C', 'D', 'T', '>'}
-
- /*
- * Boolean constants
-*** ../vim-6.2.515/src/version.c Thu Apr 29 14:49:12 2004
---- src/version.c Thu Apr 29 16:33:00 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 516,
- /**/
-
---
-hundred-and-one symptoms of being an internet addict:
-61. Your best friends know your e-mail address, but neither your phone number
- nor the address where you live.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.517
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.517
-Problem: Using "r*" in Visual mode on multi-byte characters replaces
- too many characters. In Visual Block mode replacing with a
- multi-byte character doesn't work.
-Solution: Adjust the operator end for the difference in byte length of the
- original and the replaced character. Insert all bytes of a
- multi-byte character, take care of double-wide characters.
-Files: src/ops.c
-
-
-*** ../vim-6.2.516/src/ops.c Fri Apr 23 15:19:46 2004
---- src/ops.c Fri Apr 30 17:21:32 2004
-***************
-*** 1925,1930 ****
---- 1925,1933 ----
- int c;
- {
- int n, numc;
-+ #ifdef FEAT_MBYTE
-+ int num_chars;
-+ #endif
- char_u *newp, *oldp;
- size_t oldlen;
- struct block_def bd;
-***************
-*** 1978,1988 ****
- #ifdef FEAT_VIRTUALEDIT
- && !bd.is_oneChar
- #endif
-! && bd.end_char_vcols > 0 ? bd.end_char_vcols - 1 : 0);
- /* Figure out how many characters to replace. */
- numc = oap->end_vcol - oap->start_vcol + 1;
- if (bd.is_short && (!virtual_op || bd.is_MAX))
- numc -= (oap->end_vcol - bd.end_vcol) + 1;
- /* oldlen includes textlen, so don't double count */
- n += numc - bd.textlen;
-
---- 1981,2009 ----
- #ifdef FEAT_VIRTUALEDIT
- && !bd.is_oneChar
- #endif
-! && bd.end_char_vcols > 0) ? bd.end_char_vcols - 1 : 0;
- /* Figure out how many characters to replace. */
- numc = oap->end_vcol - oap->start_vcol + 1;
- if (bd.is_short && (!virtual_op || bd.is_MAX))
- numc -= (oap->end_vcol - bd.end_vcol) + 1;
-+
-+ #ifdef FEAT_MBYTE
-+ /* A double-wide character can be replaced only up to half the
-+ * times. */
-+ if ((*mb_char2cells)(c) > 1)
-+ {
-+ if ((numc & 1) && !bd.is_short)
-+ {
-+ ++bd.endspaces;
-+ ++n;
-+ }
-+ numc = numc / 2;
-+ }
-+
-+ /* Compute bytes needed, move character count to num_chars. */
-+ num_chars = numc;
-+ numc *= (*mb_char2len)(c);
-+ #endif
- /* oldlen includes textlen, so don't double count */
- n += numc - bd.textlen;
-
-***************
-*** 1998,2004 ****
- /* insert pre-spaces */
- copy_spaces(newp + bd.textcol, (size_t)bd.startspaces);
- /* insert replacement chars CHECK FOR ALLOCATED SPACE */
-! copy_chars(newp + STRLEN(newp), (size_t)numc, c);
- if (!bd.is_short)
- {
- /* insert post-spaces */
---- 2019,2034 ----
- /* insert pre-spaces */
- copy_spaces(newp + bd.textcol, (size_t)bd.startspaces);
- /* insert replacement chars CHECK FOR ALLOCATED SPACE */
-! #ifdef FEAT_MBYTE
-! if (has_mbyte)
-! {
-! n = STRLEN(newp);
-! while (--num_chars >= 0)
-! n += (*mb_char2bytes)(c, newp + n);
-! }
-! else
-! #endif
-! copy_chars(newp + STRLEN(newp), (size_t)numc, c);
- if (!bd.is_short)
- {
- /* insert post-spaces */
-***************
-*** 2036,2041 ****
---- 2066,2072 ----
- {
- /* This is slow, but it handles replacing a single-byte
- * with a multi-byte and the other way around. */
-+ oap->end.col += (*mb_char2len)(c) - (*mb_char2len)(n);
- n = State;
- State = REPLACE;
- ins_char(c);
-*** ../vim-6.2.516/src/version.c Thu Apr 29 16:36:50 2004
---- src/version.c Fri Apr 30 19:38:27 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 517,
- /**/
-
---
-hundred-and-one symptoms of being an internet addict:
-80. At parties, you introduce your spouse as your "service provider."
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.518
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.518
-Problem: Last line of a window is not updated after using "J" and then "D".
- (Adri Verhoef)
-Solution: When no line is found below a change that doesn't need updating,
- update all lines below the change.
-Files: src/screen.c
-
-
-*** ../vim-6.2.517/src/screen.c Thu Apr 29 16:36:50 2004
---- src/screen.c Sat May 1 14:13:00 2004
-***************
-*** 1484,1498 ****
-
- if (i >= wp->w_lines_valid)
- {
-! /* When buffer lines have been inserted/deleted, and
-! * insering/deleting window lines is not possible, need to
-! * check for redraw until the end of the window. This is
-! * also required when w_topline changed. */
-! if (buf->b_mod_xlines != 0
-! || (wp->w_topline == mod_top
-! && wp->w_lines_valid > 0
-! && wp->w_lines[0].wl_lnum != mod_top))
-! bot_start = 0;
- }
- else
- {
---- 1484,1493 ----
-
- if (i >= wp->w_lines_valid)
- {
-! /* We can't find a valid line below the changed lines,
-! * need to redraw until the end of the window.
-! * Inserting/deleting lines has no use. */
-! bot_start = 0;
- }
- else
- {
-*** ../vim-6.2.517/src/version.c Fri Apr 30 19:42:02 2004
---- src/version.c Sat May 1 14:17:27 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 518,
- /**/
-
---
-From "know your smileys":
- :^[/ mean-smiley-with-cigarette
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.519
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.519
-Problem: Mac: cannot read/write files in MacRoman format.
-Solution: Do internal conversion from/to MacRoman to/from utf-8 and latin1.
- (Eckehard Berns)
-Files: src/fileio.c
-
-
-*** ../vim-6.2.518/src/fileio.c Tue Apr 27 16:27:09 2004
---- src/fileio.c Sat May 1 21:00:35 2004
-***************
-*** 83,88 ****
---- 83,91 ----
- # define FIO_PUT_CP(x) (((x) & 0xffff) << 16) /* put codepage in top word */
- # define FIO_GET_CP(x) (((x)>>16) & 0xffff) /* get codepage from top word */
- # endif
-+ # ifdef MACOS_X
-+ # define FIO_MACROMAN 0x20 /* convert MacRoman */
-+ # endif
- # define FIO_ENDIAN_L 0x80 /* little endian */
- # define FIO_ENCRYPTED 0x1000 /* encrypt written bytes */
- # define FIO_NOCONVERT 0x2000 /* skip encoding conversion */
-***************
-*** 133,138 ****
---- 136,144 ----
- # ifdef WIN3264
- static int get_win_fio_flags __ARGS((char_u *ptr));
- # endif
-+ # ifdef MACOS_X
-+ static int get_mac_fio_flags __ARGS((char_u *ptr));
-+ # endif
- #endif
- static int move_lines __ARGS((buf_T *frombuf, buf_T *tobuf));
-
-***************
-*** 946,951 ****
---- 952,963 ----
- fio_flags = get_win_fio_flags(fenc);
- # endif
-
-+ # ifdef MACOS_X
-+ /* Conversion from Apple MacRoman to latin1 or UTF-8 */
-+ if (fio_flags == 0)
-+ fio_flags = get_mac_fio_flags(fenc);
-+ # endif
-+
- # ifdef USE_ICONV
- /*
- * Try using iconv() if we can't convert internally.
-***************
-*** 1106,1111 ****
---- 1118,1127 ----
- else if (fio_flags & FIO_CODEPAGE)
- size = size / ICONV_MULT; /* also worst case */
- # endif
-+ # ifdef MACOS_X
-+ else if (fio_flags & FIO_MACROMAN)
-+ size = size / ICONV_MULT; /* also worst case */
-+ # endif
- #endif
-
- #ifdef FEAT_MBYTE
-***************
-*** 1460,1465 ****
---- 1476,1521 ----
- }
- else
- # endif
-+ # ifdef MACOS_X
-+ if (fio_flags & FIO_MACROMAN)
-+ {
-+ /*
-+ * Conversion from Apple MacRoman char encoding to UTF-8 or
-+ * latin1, using standard Carbon framework.
-+ */
-+ CFStringRef cfstr;
-+ CFRange r;
-+ CFIndex len = size;
-+
-+ /* MacRoman is an 8-bit encoding, no need to move bytes to
-+ * conv_rest[]. */
-+ cfstr = CFStringCreateWithBytes(NULL, ptr, len,
-+ kCFStringEncodingMacRoman, 0);
-+ /*
-+ * If there is a conversion error, try using another
-+ * conversion.
-+ */
-+ if (cfstr == NULL)
-+ goto rewind_retry;
-+
-+ r.location = 0;
-+ r.length = CFStringGetLength(cfstr);
-+ if (r.length != CFStringGetBytes(cfstr, r,
-+ (enc_utf8) ? kCFStringEncodingUTF8
-+ : kCFStringEncodingISOLatin1,
-+ 0, /* no lossy conversion */
-+ 0, /* not external representation */
-+ ptr + size, real_size - size, &len))
-+ {
-+ CFRelease(cfstr);
-+ goto rewind_retry;
-+ }
-+ CFRelease(cfstr);
-+ mch_memmove(ptr, ptr + size, len);
-+ size = len;
-+ }
-+ else
-+ # endif
- if (fio_flags != 0)
- {
- int u8c;
-***************
-*** 3527,3532 ****
---- 3583,3599 ----
- }
- # endif
-
-+ # ifdef MACOS_X
-+ if (converted && wb_flags == 0 && (wb_flags = get_mac_fio_flags(fenc)) != 0)
-+ {
-+ write_info.bw_conv_buflen = bufsize * 3;
-+ write_info.bw_conv_buf
-+ = lalloc((long_u)write_info.bw_conv_buflen, TRUE);
-+ if (write_info.bw_conv_buf == NULL)
-+ end = 0;
-+ }
-+ # endif
-+
- # if defined(FEAT_EVAL) || defined(USE_ICONV)
- if (converted && wb_flags == 0)
- {
-***************
-*** 4673,4678 ****
---- 4740,4811 ----
- }
- # endif
-
-+ # ifdef MACOS_X
-+ else if (flags & FIO_MACROMAN)
-+ {
-+ /*
-+ * Convert UTF-8 or latin1 to Apple MacRoman.
-+ */
-+ CFStringRef cfstr;
-+ CFRange r;
-+ CFIndex l;
-+ char_u *from;
-+ size_t fromlen;
-+
-+ if (ip->bw_restlen > 0)
-+ {
-+ /* Need to concatenate the remainder of the previous call and
-+ * the bytes of the current call. Use the end of the
-+ * conversion buffer for this. */
-+ fromlen = len + ip->bw_restlen;
-+ from = ip->bw_conv_buf + ip->bw_conv_buflen - fromlen;
-+ mch_memmove(from, ip->bw_rest, (size_t)ip->bw_restlen);
-+ mch_memmove(from + ip->bw_restlen, buf, (size_t)len);
-+ }
-+ else
-+ {
-+ from = buf;
-+ fromlen = len;
-+ }
-+
-+ ip->bw_restlen = 0;
-+ cfstr = CFStringCreateWithBytes(NULL, from, fromlen,
-+ (enc_utf8) ?
-+ kCFStringEncodingUTF8 : kCFStringEncodingISOLatin1,
-+ 0);
-+ while (cfstr == NULL && ip->bw_restlen < 3 && fromlen > 1)
-+ {
-+ ip->bw_rest[ip->bw_restlen++] = from[--fromlen];
-+ cfstr = CFStringCreateWithBytes(NULL, from, fromlen,
-+ (enc_utf8) ?
-+ kCFStringEncodingUTF8 : kCFStringEncodingISOLatin1,
-+ 0);
-+ }
-+ if (cfstr == NULL)
-+ {
-+ ip->bw_conv_error = TRUE;
-+ return FAIL;
-+ }
-+
-+ r.location = 0;
-+ r.length = CFStringGetLength(cfstr);
-+ if (r.length != CFStringGetBytes(cfstr, r,
-+ kCFStringEncodingMacRoman,
-+ 0, /* no lossy conversion */
-+ 0, /* not external representation (since vim
-+ * handles this internally */
-+ ip->bw_conv_buf, ip->bw_conv_buflen, &l))
-+ {
-+ CFRelease(cfstr);
-+ ip->bw_conv_error = TRUE;
-+ return FAIL;
-+ }
-+ CFRelease(cfstr);
-+ buf = ip->bw_conv_buf;
-+ len = l;
-+ }
-+ # endif
-+
- # ifdef USE_ICONV
- if (ip->bw_iconv_fd != (iconv_t)-1)
- {
-***************
-*** 4940,4945 ****
---- 5073,5094 ----
- }
- #endif
-
-+ #ifdef MACOS_X
-+ /*
-+ * Check "ptr" for a Carbon supported encoding and return the FIO_ flags
-+ * needed for the internal conversion to/from utf-8 or latin1.
-+ */
-+ static int
-+ get_mac_fio_flags(ptr)
-+ char_u *ptr;
-+ {
-+ if ((enc_utf8 || STRCMP(p_enc, "latin1") == 0)
-+ && (enc_canon_props(ptr) & ENC_MACROMAN))
-+ return FIO_MACROMAN;
-+ return 0;
-+ }
-+ #endif
-+
- /*
- * Check for a Unicode BOM (Byte Order Mark) at the start of p[size].
- * "size" must be at least 2.
-*** ../vim-6.2.518/src/version.c Sat May 1 14:20:36 2004
---- src/version.c Sat May 1 21:02:36 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 519,
- /**/
-
---
-From "know your smileys":
- ~#:-( I just washed my hair, and I can't do nuthin' with it.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.520 (extra)
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.520 (extra)
-Problem: The NSIS installer is outdated.
-Solution: Make it work with NSIS 2.0. Also include console executables for
- Win 95/98/ME and Win NT/2000/XP. Use LZWA compression. Use
- "/oname" to avoid having to rename files before running NSIS.
-Files: Makefile, nsis/gvim.nsi
-
-
-*** ../vim-6.2.519/Makefile Fri Mar 12 15:26:18 2004
---- Makefile Sun May 2 15:06:28 2004
-***************
-*** 118,124 ****
- # - Rename the executables to "vimd16.exe", "xxdd16.exe", "installd16.exe" and
- # "uninstald16.exe".
- # 32 bit DOS version:
-! # - Set environment for compiling with DJGPP; "make -f Make_djg.mak".
- # - "rm testdir/*.out", "make -f Make_djg.mak test" and check the output.
- # - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
- # "uninstald32.exe".
---- 120,126 ----
- # - Rename the executables to "vimd16.exe", "xxdd16.exe", "installd16.exe" and
- # "uninstald16.exe".
- # 32 bit DOS version:
-! # - Set environment for compiling with DJGPP; "gmake -f Make_djg.mak".
- # - "rm testdir/*.out", "make -f Make_djg.mak test" and check the output.
- # - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
- # "uninstald32.exe".
-***************
-*** 156,165 ****
- # - "make doslang".
- # NSIS self installing exe:
- # - Unpack the doslang archive on the PC.
-! # - rename gvim_ole.exe to gvim.exe
-! # - rename installw32.exe to install.exe
-! # - rename uninstalw32.exe to uninstal.exe
-! # - rename xxdw32.exe to xxd/xxd.exe
- # - put gvimext.dll in src/GvimExt and VisVim.dll in src/VisVim (get them
- # from a binary archive or build them)
- # - make sure there is a diff.exe two levels up
---- 158,166 ----
- # - "make doslang".
- # NSIS self installing exe:
- # - Unpack the doslang archive on the PC.
-! # - Make sure gvim_ole.exe, vimd32.exe, vimw32.exe, installw32.exe,
-! # uninstalw32.exe and xxdw32.exe have been build as mentioned above.
-! # - Move the files from the "runtime" directory one level up.
- # - put gvimext.dll in src/GvimExt and VisVim.dll in src/VisVim (get them
- # from a binary archive or build them)
- # - make sure there is a diff.exe two levels up
-*** ../vim-6.2.519/nsis/gvim.nsi Tue Jun 3 21:43:31 2003
---- nsis/gvim.nsi Sun May 2 16:55:20 2004
-***************
-*** 1,6 ****
- # NSIS file to create a self-installing exe for Vim.
-! # It needs NSIS version 1.80 or later.
-! # Last modification: 2001 Oct 31
-
- # WARNING: if you make changes to this script, look out for $0 to be valid,
- # because this line is very dangerous: RMDir /r $0
---- 1,6 ----
- # NSIS file to create a self-installing exe for Vim.
-! # It requires NSIS version 2.0 or later.
-! # Last change: 2004 May 02
-
- # WARNING: if you make changes to this script, look out for $0 to be valid,
- # because this line is very dangerous: RMDir /r $0
-***************
-*** 17,40 ****
-
- Name "Vim ${VER_MAJOR}.${VER_MINOR}"
- OutFile gvim${VER_MAJOR}${VER_MINOR}.exe
-! CRCCheck on
- ComponentText "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer."
- DirText "Choose a directory to install Vim (must end in 'vim')"
-- SetDatablockOptimize on
- Icon icons\vim_16c.ico
-! EnabledBitmap icons\enabled.bmp
-! DisabledBitmap icons\disabled.bmp
- UninstallText "This will uninstall Vim ${VER_MAJOR}.${VER_MINOR} from your system."
- UninstallIcon icons\vim_uninst_16c.ico
-! BGGradient 004000 008200 ffffff
- LicenseText "You should read the following before installing:"
- LicenseData ..\doc\uganda.nsis.txt
-
- !ifdef HAVE_UPX
- !packhdr temp.dat "upx --best --compress-icons=1 temp.dat"
- !endif
-! # This add '\vim' to the user choice automagically.
-! InstallDir "C:\vim"
-
- # Types of installs we can perform:
- InstType Typical
---- 17,44 ----
-
- Name "Vim ${VER_MAJOR}.${VER_MINOR}"
- OutFile gvim${VER_MAJOR}${VER_MINOR}.exe
-! CRCCheck force
-! SetCompressor lzma
-! SetDatablockOptimize on
-!
- ComponentText "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer."
- DirText "Choose a directory to install Vim (must end in 'vim')"
- Icon icons\vim_16c.ico
-! # NSIS2 uses a different strategy with six diferent images in a strip...
-! #EnabledBitmap icons\enabled.bmp
-! #DisabledBitmap icons\disabled.bmp
- UninstallText "This will uninstall Vim ${VER_MAJOR}.${VER_MINOR} from your system."
- UninstallIcon icons\vim_uninst_16c.ico
-! BGGradient 004000 008200 FFFFFF
- LicenseText "You should read the following before installing:"
- LicenseData ..\doc\uganda.nsis.txt
-
- !ifdef HAVE_UPX
- !packhdr temp.dat "upx --best --compress-icons=1 temp.dat"
- !endif
-!
-! # This adds '\vim' to the user choice automagically.
-! InstallDir $PROGRAMFILES\Vim
-
- # Types of installs we can perform:
- InstType Typical
-***************
-*** 50,62 ****
- MessageBox MB_YESNO|MB_ICONQUESTION \
- "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer.$\n Continue?" \
- IDYES NoAbort
-!
-! Abort ; causes installer to quit.
-! NoAbort:
-
- # run the install program to check for already installed versions
- SetOutPath $TEMP
-! File ..\src\install.exe
- ExecWait "$TEMP\install.exe -uninstall-check"
- Delete $TEMP\install.exe
-
---- 54,65 ----
- MessageBox MB_YESNO|MB_ICONQUESTION \
- "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer.$\n Continue?" \
- IDYES NoAbort
-! Abort ; causes installer to quit.
-! NoAbort:
-
- # run the install program to check for already installed versions
- SetOutPath $TEMP
-! File /oname=install.exe ..\src\installw32.exe
- ExecWait "$TEMP\install.exe -uninstall-check"
- Delete $TEMP\install.exe
-
-***************
-*** 71,77 ****
-
- # If ReadINIStr failed for some reason, use default dir.
- StrCmp $INSTDIR "" 0 IniOK
-! StrCpy $INSTDIR "C:\vim"
- IniOK:
-
- # Should check for the value of $VIM and use it. Unfortunately I don't know
---- 74,80 ----
-
- # If ReadINIStr failed for some reason, use default dir.
- StrCmp $INSTDIR "" 0 IniOK
-! StrCpy $INSTDIR "$PROGRAMFILES\Vim"
- IniOK:
-
- # Should check for the value of $VIM and use it. Unfortunately I don't know
-***************
-*** 80,92 ****
- # StrCpy $INSTDIR "$VIM"
- # No_Vim:
-
-! # User variables:
-! # $0 - holds the directory the executables are installed to
-! # $1 - holds the parameters to be passed to install.exe. Starts with OLE
-! # registration (since a non-OLE gvim will not complain, and we want to
-! # always register an OLE gvim).
- StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}"
- StrCpy $1 "-register-OLE"
-
- FunctionEnd
-
---- 83,97 ----
- # StrCpy $INSTDIR "$VIM"
- # No_Vim:
-
-! # User variables:
-! # $0 - holds the directory the executables are installed to
-! # $1 - holds the parameters to be passed to install.exe. Starts with OLE
-! # registration (since a non-OLE gvim will not complain, and we want to
-! # always register an OLE gvim).
-! # $2 - holds the names to create batch files for
- StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}"
- StrCpy $1 "-register-OLE"
-+ StrCpy $2 "gvim evim gview gvimdiff"
-
- FunctionEnd
-
-***************
-*** 100,107 ****
- Function .onVerifyInstDir
- StrCpy $0 $INSTDIR 3 -3
- StrCmp $0 "vim" PathGood
-! Abort
-!
- PathGood:
- FunctionEnd
-
---- 105,111 ----
- Function .onVerifyInstDir
- StrCpy $0 $INSTDIR 3 -3
- StrCmp $0 "vim" PathGood
-! Abort
- PathGood:
- FunctionEnd
-
-***************
-*** 110,116 ****
- MessageBox MB_YESNO|MB_ICONQUESTION \
- "The installation process has been successfull. Happy Vimming! \
- $\n$\n Do you want to see the README file now?" IDNO NoReadme
-! Exec '$0\gvim.exe -R "$0\README.txt"'
- NoReadme:
- FunctionEnd
-
---- 114,120 ----
- MessageBox MB_YESNO|MB_ICONQUESTION \
- "The installation process has been successfull. Happy Vimming! \
- $\n$\n Do you want to see the README file now?" IDNO NoReadme
-! Exec '$0\gvim.exe -R "$0\README.txt"'
- NoReadme:
- FunctionEnd
-
-***************
-*** 143,364 ****
-
- ##########################################################
- Section "Vim executables and runtime files"
-! SectionIn 1 2 3
-!
-! # we need also this here if the user changes the instdir
-! StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}"
-!
-! SetOutPath $0
-! File ..\src\gvim.exe
-! File ..\src\install.exe
-! File ..\src\uninstal.exe
-! File ..\src\vimrun.exe
-! File ..\src\xxd\xxd.exe
-! File ..\..\diff.exe
-! File ..\vimtutor.bat
-! File ..\README.txt
-! File ..\uninstal.txt
-! File ..\*.vim
-! File ..\rgb.txt
-!
-! SetOutPath $0\colors
-! File ..\colors\*.*
-!
-! SetOutPath $0\compiler
-! File ..\compiler\*.*
-!
-! SetOutPath $0\doc
-! File ..\doc\*.txt
-! File ..\doc\tags
-!
-! SetOutPath $0\ftplugin
-! File ..\ftplugin\*.*
-
-! SetOutPath $0\indent
-! File ..\indent\*.*
-!
-! SetOutPath $0\macros
-! File ..\macros\*.*
-!
-! SetOutPath $0\plugin
-! File ..\plugin\*.*
-!
-! SetOutPath $0\syntax
-! File ..\syntax\*.*
-!
-! SetOutPath $0\tools
-! File ..\tools\*.*
-!
-! SetOutPath $0\tutor
-! File ..\tutor\*.*
-
- SectionEnd
-! ##########################################################
-! SectionDivider
- ##########################################################
- Section "Create icons on the Desktop"
-! SectionIn 1 3
-!
-! StrCpy $1 "$1 -install-icons"
-
- SectionEnd
- ##########################################################
- Section "Add Vim to the Start Menu"
-! SectionIn 1 3
-!
-! StrCpy $1 "$1 -add-start-menu"
-
- SectionEnd
- ##########################################################
- Section "Add an Edit-with-Vim context menu entry"
-! SectionIn 1 3
-!
-! SetOutPath $0
-! File ..\src\GvimExt\gvimext.dll
-!
-! StrCpy $1 "$1 -install-popup"
-
- SectionEnd
-! ##########################################################
-! SectionDivider
- ##########################################################
- Section "Create a _vimrc if it doesn't exist"
-! SectionIn 1 3
-!
-! StrCpy $1 "$1 -create-vimrc"
-
- SectionEnd
- ##########################################################
- Section "Create .bat files for command line use"
-! SectionIn 3
-!
-! StrCpy $1 "$1 -create-batfiles gvim evim gview gvimdiff"
-
- SectionEnd
- ##########################################################
- Section "Create plugin directories in HOME or VIM"
-! SectionIn 1 3
-!
-! StrCpy $1 "$1 -create-directories home"
-
- SectionEnd
- ##########################################################
- Section "Create plugin directories in VIM"
-! SectionIn 3
-!
-! StrCpy $1 "$1 -create-directories vim"
-
- SectionEnd
-
- ##########################################################
-- SectionDivider
-- ##########################################################
- Section "VisVim Extension for MS Visual Studio"
-! SectionIn 3
-!
-! SetOutPath $0
-! File ..\src\VisVim\VisVim.dll
-! File ..\src\VisVim\README_VisVim.txt
-! ExecWait "regsvr32.exe /s $0\VisVim.dll"
-
- SectionEnd
- ##########################################################
- !ifdef HAVE_NLS
-! Section "Native Language Support"
-! SectionIn 1 3
-!
-! SetOutPath $0\lang
-! File /r ..\lang\*.*
-! SetOutPath $0\keymap
-! File ..\keymap\README.txt
-! File ..\keymap\*.vim
-! SetOutPath $0
-! File ..\libintl.dll
-
-! SectionEnd
- !endif
- ##########################################################
- Section -call_install_exe
-!
-! SetOutPath $0
-! ExecWait "$0\install.exe $1"
-!
- SectionEnd
- ##########################################################
- Section -post
-!
-! BringToFront
-!
- SectionEnd
-
- ##########################################################
- Section Uninstall
-
-! # Apparently $INSTDIR is set to the directory where the uninstaller is created.
-! # Thus the "vim61" directory is included in it.
-! StrCpy $0 "$INSTDIR"
-!
-! ; If VisVim was installed, unregister the DLL
-! IfFileExists "$0\VisVim.dll" Has_VisVim No_VisVim
-! Has_VisVim:
-! ExecWait "regsvr32.exe /u /s $0\VisVim.dll"
-!
-! No_VisVim:
-!
-! ; delete the context menu entry and batch files
-! ExecWait "$0\uninstal.exe -nsis"
-!
-! # We may have been put to the background when uninstall did something.
-! BringToFront
-!
-! # ask the user if the Vim version dir must be removed
-! MessageBox MB_YESNO|MB_ICONQUESTION \
-! "Would you like to delete $0?$\n \
-! $\nIt contains the Vim executables and runtime files." IDNO NoRemoveExes
-!
-! Delete /REBOOTOK $0\gvimext.dll
-! ClearErrors
-! RMDir /r $0
-!
-! IfErrors ErrorMess NoErrorMess
-! ErrorMess:
-! MessageBox MB_OK|MB_ICONEXCLAMATION \
-! "Some files in $0 have not been deleted!$\nYou must do it manually."
-! NoErrorMess:
-!
-! NoRemoveExes:
-!
-! # get the parent dir of the installation
-! Push $INSTDIR
-! Call un.GetParent
-! Pop $0
-!
-! StrCpy $1 $0
-!
-! # if a plugin dir was created at installation ask the user to remove it
-! # first look in the root of the installation then in HOME
-! IfFileExists $1\vimfiles AskRemove 0
-! ReadEnvStr $1 "HOME"
-! StrCmp $1 "" NoRemove 0
-!
-! IfFileExists $1\vimfiles 0 NoRemove
-!
-! AskRemove:
-! MessageBox MB_YESNO|MB_ICONQUESTION \
-! "Remove all files in your $1\vimfiles directory? \
-! $\nIf you have created something there that you want to keep, click No" IDNO Fin
-! RMDir /r $1\vimfiles
-! NoRemove:
-!
-! # ask the user if the Vim root dir must be removed
-! MessageBox MB_YESNO|MB_ICONQUESTION \
-! "Would you like to remove $0?$\n \
-! $\nIt contains your Vim configuration files!" IDNO NoDelete
-! RMDir /r $0 ; skipped if no
-! NoDelete:
-!
-! Fin:
-!
-! Call un.onUnInstSuccess
-
- SectionEnd
---- 147,371 ----
-
- ##########################################################
- Section "Vim executables and runtime files"
-! SectionIn 1 2 3
-
-! # we need also this here if the user changes the instdir
-! StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}"
-
-+ SetOutPath $0
-+ File /oname=gvim.exe ..\src\gvim_ole.exe
-+ File /oname=install.exe ..\src\installw32.exe
-+ File /oname=uninstal.exe ..\src\uninstalw32.exe
-+ File ..\src\vimrun.exe
-+ File /oname=xxd.exe ..\src\xxdw32.exe
-+ File ..\..\diff.exe
-+ File ..\vimtutor.bat
-+ File ..\README.txt
-+ File ..\uninstal.txt
-+ File ..\*.vim
-+ File ..\rgb.txt
-+
-+ SetOutPath $0\colors
-+ File ..\colors\*.*
-+
-+ SetOutPath $0\compiler
-+ File ..\compiler\*.*
-+
-+ SetOutPath $0\doc
-+ File ..\doc\*.txt
-+ File ..\doc\tags
-+
-+ SetOutPath $0\ftplugin
-+ File ..\ftplugin\*.*
-+
-+ SetOutPath $0\indent
-+ File ..\indent\*.*
-+
-+ SetOutPath $0\macros
-+ File ..\macros\*.*
-+
-+ SetOutPath $0\plugin
-+ File ..\plugin\*.*
-+
-+ SetOutPath $0\syntax
-+ File ..\syntax\*.*
-+
-+ SetOutPath $0\tools
-+ File ..\tools\*.*
-+
-+ SetOutPath $0\tutor
-+ File ..\tutor\*.*
-+ SectionEnd
-+
-+ ##########################################################
-+ Section "Vim console program (vim.exe)"
-+ SectionIn 1 3
-+
-+ SetOutPath $0
-+ ReadRegStr $R0 HKLM \
-+ "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
-+ IfErrors 0 lbl_winnt
-+ # Windows 95/98/ME
-+ File /oname=vim.exe ..\src\vimd32.exe
-+ Goto lbl_done
-+ lbl_winnt:
-+ # Windows NT/2000/XT
-+ File /oname=vim.exe ..\src\vimw32.exe
-+ lbl_done:
-+ StrCpy $2 "$2 vim view vimdiff"
- SectionEnd
-!
- ##########################################################
- Section "Create icons on the Desktop"
-! SectionIn 1 3
-
-+ StrCpy $1 "$1 -install-icons"
- SectionEnd
-+
- ##########################################################
- Section "Add Vim to the Start Menu"
-! SectionIn 1 3
-
-+ StrCpy $1 "$1 -add-start-menu"
- SectionEnd
-+
- ##########################################################
- Section "Add an Edit-with-Vim context menu entry"
-! SectionIn 1 3
-
-+ SetOutPath $0
-+ File ..\src\GvimExt\gvimext.dll
-+ StrCpy $1 "$1 -install-popup"
- SectionEnd
-!
- ##########################################################
- Section "Create a _vimrc if it doesn't exist"
-! SectionIn 1 3
-
-+ StrCpy $1 "$1 -create-vimrc"
- SectionEnd
-+
- ##########################################################
- Section "Create .bat files for command line use"
-! SectionIn 3
-
-+ StrCpy $1 "$1 -create-batfiles $2"
- SectionEnd
-+
- ##########################################################
- Section "Create plugin directories in HOME or VIM"
-! SectionIn 1 3
-
-+ StrCpy $1 "$1 -create-directories home"
- SectionEnd
-+
- ##########################################################
- Section "Create plugin directories in VIM"
-! SectionIn 3
-
-+ StrCpy $1 "$1 -create-directories vim"
- SectionEnd
-
- ##########################################################
- Section "VisVim Extension for MS Visual Studio"
-! SectionIn 3
-
-+ SetOutPath $0
-+ File ..\src\VisVim\VisVim.dll
-+ File ..\src\VisVim\README_VisVim.txt
-+ ExecWait "regsvr32.exe /s $0\VisVim.dll"
- SectionEnd
-+
- ##########################################################
- !ifdef HAVE_NLS
-! Section "Native Language Support"
-! SectionIn 1 3
-
-! SetOutPath $0\lang
-! File /r ..\lang\*.*
-! SetOutPath $0\keymap
-! File ..\keymap\README.txt
-! File ..\keymap\*.vim
-! SetOutPath $0
-! File ..\libintl.dll
-! SectionEnd
- !endif
-+
- ##########################################################
- Section -call_install_exe
-! SetOutPath $0
-! ExecWait "$0\install.exe $1"
- SectionEnd
-+
- ##########################################################
- Section -post
-! BringToFront
- SectionEnd
-
- ##########################################################
- Section Uninstall
-+ # Apparently $INSTDIR is set to the directory where the uninstaller is
-+ # created. Thus the "vim61" directory is included in it.
-+ StrCpy $0 "$INSTDIR"
-+
-+ # If VisVim was installed, unregister the DLL
-+ IfFileExists "$0\VisVim.dll" Has_VisVim No_VisVim
-+ Has_VisVim:
-+ ExecWait "regsvr32.exe /u /s $0\VisVim.dll"
-+
-+ No_VisVim:
-+
-+ # delete the context menu entry and batch files
-+ ExecWait "$0\uninstal.exe -nsis"
-+
-+ # We may have been put to the background when uninstall did something.
-+ BringToFront
-+
-+ # ask the user if the Vim version dir must be removed
-+ MessageBox MB_YESNO|MB_ICONQUESTION \
-+ "Would you like to delete $0?$\n \
-+ $\nIt contains the Vim executables and runtime files." IDNO NoRemoveExes
-+
-+ Delete /REBOOTOK $0\gvimext.dll
-+ ClearErrors
-+ RMDir /r $0
-+
-+ IfErrors ErrorMess NoErrorMess
-+ ErrorMess:
-+ MessageBox MB_OK|MB_ICONEXCLAMATION \
-+ "Some files in $0 have not been deleted!$\nYou must do it manually."
-+ NoErrorMess:
-+
-+ NoRemoveExes:
-+ # get the parent dir of the installation
-+ Push $INSTDIR
-+ Call un.GetParent
-+ Pop $0
-+ StrCpy $1 $0
-+
-+ # if a plugin dir was created at installation ask the user to remove it
-+ # first look in the root of the installation then in HOME
-+ IfFileExists $1\vimfiles AskRemove 0
-+ ReadEnvStr $1 "HOME"
-+ StrCmp $1 "" NoRemove 0
-+
-+ IfFileExists $1\vimfiles 0 NoRemove
-+
-+ AskRemove:
-+ MessageBox MB_YESNO|MB_ICONQUESTION \
-+ "Remove all files in your $1\vimfiles directory? \
-+ $\nIf you have created something there that you want to keep, click No" IDNO Fin
-+ RMDir /r $1\vimfiles
-+ NoRemove:
-+
-+ # ask the user if the Vim root dir must be removed
-+ MessageBox MB_YESNO|MB_ICONQUESTION \
-+ "Would you like to remove $0?$\n \
-+ $\nIt contains your Vim configuration files!" IDNO NoDelete
-+ RMDir /r $0 ; skipped if no
-+ NoDelete:
-
-! Fin:
-! Call un.onUnInstSuccess
-
- SectionEnd
-*** ../vim-6.2.519/src/version.c Sat May 1 21:04:31 2004
---- src/version.c Sun May 2 16:46:38 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 520,
- /**/
-
---
-From "know your smileys":
- *<|:-) Santa Claus (Ho Ho Ho)
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.521
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.521
-Problem: When using silent Ex mode the "changing a readonly file" warning
- is omitted but the one second wait isn't. (Yakov Lerner)
-Solution: Skip the delay when "silent_mode" is set.
-Files: src/misc1.c
-
-
-*** ../vim-6.2.520/src/misc1.c Mon Apr 26 19:00:58 2004
---- src/misc1.c Sun May 2 16:15:50 2004
-***************
-*** 2774,2780 ****
- hl_attr(HLF_W) | MSG_HIST);
- msg_clr_eos();
- (void)msg_end();
-! if (msg_silent == 0)
- {
- out_flush();
- ui_delay(1000L, TRUE); /* give the user time to think about it */
---- 2774,2780 ----
- hl_attr(HLF_W) | MSG_HIST);
- msg_clr_eos();
- (void)msg_end();
-! if (msg_silent == 0 && !silent_mode)
- {
- out_flush();
- ui_delay(1000L, TRUE); /* give the user time to think about it */
-*** ../vim-6.2.520/src/version.c Sun May 2 16:57:24 2004
---- src/version.c Sun May 2 16:59:21 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 521,
- /**/
-
---
-From "know your smileys":
- ...---... SOS
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.522
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.522
-Problem: GUI: when changing 'cmdheight' in the gvimrc file the window
- layout is messed up. (Keith Dart)
-Solution: Skip updating the window layout when changing 'cmdheight' while
- still starting up.
-Files: src/option.c
-
-
-*** ../vim-6.2.521/src/option.c Thu Apr 29 16:36:50 2004
---- src/option.c Mon May 3 14:16:40 2004
-***************
-*** 6741,6747 ****
- errmsg = e_positive;
- p_ch = 1;
- }
-! if (p_ch != old_value)
- command_height(old_value);
- }
-
---- 6753,6766 ----
- errmsg = e_positive;
- p_ch = 1;
- }
-!
-! /* Only compute the new window layout when startup has been
-! * completed. Otherwise the frame sizes may be wrong. */
-! if (p_ch != old_value && full_screen
-! #ifdef FEAT_GUI
-! && !gui.starting
-! #endif
-! )
- command_height(old_value);
- }
-
-*** ../vim-6.2.521/src/version.c Sun May 2 17:00:06 2004
---- src/version.c Mon May 3 21:19:36 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 522,
- /**/
-
---
-A fool learns from his mistakes, a wise man from someone elses.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.523
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.523
-Problem: When loading a session and aborting when a swap file already
- exists, the user is left with useless windows. (Robert Webb)
-Solution: Load one file before creating the windows.
-Files: src/ex_docmd.c
-
-
-*** ../vim-6.2.522/src/ex_docmd.c Fri Apr 23 12:02:42 2004
---- src/ex_docmd.c Thu Apr 29 13:45:57 2004
-***************
-*** 8569,8574 ****
---- 8567,8573 ----
- int restore_size = TRUE;
- win_T *wp;
- char_u *sname;
-+ win_T *edited_win = NULL;
-
- if (ssop_flags & SSOP_BUFFERS)
- only_save_windows = FALSE; /* Save ALL buffers */
-***************
-*** 8657,8662 ****
---- 8656,8684 ----
- #endif
-
- /*
-+ * Before creating the window layout, try loading one file. If this is
-+ * aborted we don't end up with a number of useless windows.
-+ * This may have side effects! (e.g., compressed or network file).
-+ */
-+ for (wp = firstwin; wp != NULL; wp = wp->w_next)
-+ {
-+ if (ses_do_win(wp)
-+ && wp->w_buffer->b_ffname != NULL
-+ && !wp->w_buffer->b_help
-+ #ifdef FEAT_QUICKFIX
-+ && !bt_nofile(wp->w_buffer)
-+ #endif
-+ )
-+ {
-+ if (fputs("edit ", fd) < 0
-+ || ses_fname(fd, wp->w_buffer, &ssop_flags) == FAIL)
-+ return FAIL;
-+ edited_win = wp;
-+ break;
-+ }
-+ }
-+
-+ /*
- * Save current window layout.
- */
- if (put_line(fd, "set splitbelow splitright") == FAIL)
-***************
-*** 8702,8708 ****
- {
- if (!ses_do_win(wp))
- continue;
-! if (put_view(fd, wp, TRUE, &ssop_flags) == FAIL)
- return FAIL;
- if (nr > 1 && put_line(fd, "wincmd w") == FAIL)
- return FAIL;
---- 8724,8730 ----
- {
- if (!ses_do_win(wp))
- continue;
-! if (put_view(fd, wp, wp != edited_win, &ssop_flags) == FAIL)
- return FAIL;
- if (nr > 1 && put_line(fd, "wincmd w") == FAIL)
- return FAIL;
-*** ../vim-6.2.522/src/version.c Mon May 3 21:26:46 2004
---- src/version.c Mon May 3 21:28:08 2004
-***************
-*** 639,640 ****
---- 639,642 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 523,
- /**/
-
---
-I AM THANKFUL...
-...for all the complaining I hear about the government
-because it means we have freedom of speech.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.524 (extra)
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.524 (extra, after 6.2.520)
-Problem: Win32: (un)installing gvimext.dll may fail if it was used.
- The desktop and start menu links are created for the current user
- instead of all users.
- Using the home directory as working directory for the links is a
- bad idea for multi-user systems.
- Cannot use Vim from the "Open With..." menu.
-Solution: Force a reboot if necessary. (Alejandro Lopez-Valencia) Also use
- macros for the directory of the source and runtime files. Use
- "CSIDL_COMMON_*" instead of "CSIDL_*" when possible.
- Do not specify a working directory in the links.
- Add Vim to the "Open With..." menu. (Giuseppe Bilotta)
-Files: nsis/gvim.nsi, src/dosinst.c, src/dosinst.h, src/uninstal.c
-
-
-*** ../vim-6.2.523/nsis/gvim.nsi Sun May 2 16:57:24 2004
---- nsis/gvim.nsi Tue May 4 15:49:21 2004
-***************
-*** 3,11 ****
- # Last change: 2004 May 02
-
- # WARNING: if you make changes to this script, look out for $0 to be valid,
-! # because this line is very dangerous: RMDir /r $0
-
-! # comment next line if you don't have UPX.
- # Get it at http://upx.sourceforge.net
- !define HAVE_UPX
-
---- 3,20 ----
- # Last change: 2004 May 02
-
- # WARNING: if you make changes to this script, look out for $0 to be valid,
-! # because uninstall deletes most files in $0.
-
-! # Location of gvim_ole.exe, vimd32.exe, GvimExt/*, etc.
-! !define VIMSRC "..\src"
-!
-! # Location of runtime files
-! !define VIMRT ".."
-!
-! # Location of extra tools: diff.exe
-! !define VIMTOOLS ..\..
-!
-! # Comment the next line if you don't have UPX.
- # Get it at http://upx.sourceforge.net
- !define HAVE_UPX
-
-***************
-*** 15,20 ****
---- 24,33 ----
- !define VER_MINOR 2
- !define VER_MAJOR 6
-
-+ # ----------- No configurable settings below this line -----------
-+
-+ !include UpgradeDLL.nsh # for VisVim.dll
-+
- Name "Vim ${VER_MAJOR}.${VER_MINOR}"
- OutFile gvim${VER_MAJOR}${VER_MINOR}.exe
- CRCCheck force
-***************
-*** 31,44 ****
- UninstallIcon icons\vim_uninst_16c.ico
- BGGradient 004000 008200 FFFFFF
- LicenseText "You should read the following before installing:"
-! LicenseData ..\doc\uganda.nsis.txt
-
- !ifdef HAVE_UPX
- !packhdr temp.dat "upx --best --compress-icons=1 temp.dat"
- !endif
-
- # This adds '\vim' to the user choice automagically.
-! InstallDir $PROGRAMFILES\Vim
-
- # Types of installs we can perform:
- InstType Typical
---- 44,57 ----
- UninstallIcon icons\vim_uninst_16c.ico
- BGGradient 004000 008200 FFFFFF
- LicenseText "You should read the following before installing:"
-! LicenseData ${VIMRT}\doc\uganda.nsis.txt
-
- !ifdef HAVE_UPX
- !packhdr temp.dat "upx --best --compress-icons=1 temp.dat"
- !endif
-
- # This adds '\vim' to the user choice automagically.
-! InstallDir "$PROGRAMFILES\Vim"
-
- # Types of installs we can perform:
- InstType Typical
-***************
-*** 59,65 ****
-
- # run the install program to check for already installed versions
- SetOutPath $TEMP
-! File /oname=install.exe ..\src\installw32.exe
- ExecWait "$TEMP\install.exe -uninstall-check"
- Delete $TEMP\install.exe
-
---- 72,78 ----
-
- # run the install program to check for already installed versions
- SetOutPath $TEMP
-! File /oname=install.exe ${VIMSRC}\installw32.exe
- ExecWait "$TEMP\install.exe -uninstall-check"
- Delete $TEMP\install.exe
-
-***************
-*** 153,200 ****
- StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}"
-
- SetOutPath $0
-! File /oname=gvim.exe ..\src\gvim_ole.exe
-! File /oname=install.exe ..\src\installw32.exe
-! File /oname=uninstal.exe ..\src\uninstalw32.exe
-! File ..\src\vimrun.exe
-! File /oname=xxd.exe ..\src\xxdw32.exe
-! File ..\..\diff.exe
-! File ..\vimtutor.bat
-! File ..\README.txt
- File ..\uninstal.txt
-! File ..\*.vim
-! File ..\rgb.txt
-
- SetOutPath $0\colors
-! File ..\colors\*.*
-
- SetOutPath $0\compiler
-! File ..\compiler\*.*
-
- SetOutPath $0\doc
-! File ..\doc\*.txt
-! File ..\doc\tags
-
- SetOutPath $0\ftplugin
-! File ..\ftplugin\*.*
-
- SetOutPath $0\indent
-! File ..\indent\*.*
-
- SetOutPath $0\macros
-! File ..\macros\*.*
-
- SetOutPath $0\plugin
-! File ..\plugin\*.*
-
- SetOutPath $0\syntax
-! File ..\syntax\*.*
-
- SetOutPath $0\tools
-! File ..\tools\*.*
-
- SetOutPath $0\tutor
-! File ..\tutor\*.*
- SectionEnd
-
- ##########################################################
---- 166,213 ----
- StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}"
-
- SetOutPath $0
-! File /oname=gvim.exe ${VIMSRC}\gvim_ole.exe
-! File /oname=install.exe ${VIMSRC}\installw32.exe
-! File /oname=uninstal.exe ${VIMSRC}\uninstalw32.exe
-! File ${VIMSRC}\vimrun.exe
-! File /oname=xxd.exe ${VIMSRC}\xxdw32.exe
-! File ${VIMTOOLS}\diff.exe
-! File ${VIMRT}\vimtutor.bat
-! File ${VIMRT}\README.txt
- File ..\uninstal.txt
-! File ${VIMRT}\*.vim
-! File ${VIMRT}\rgb.txt
-
- SetOutPath $0\colors
-! File ${VIMRT}\colors\*.*
-
- SetOutPath $0\compiler
-! File ${VIMRT}\compiler\*.*
-
- SetOutPath $0\doc
-! File ${VIMRT}\doc\*.txt
-! File ${VIMRT}\doc\tags
-
- SetOutPath $0\ftplugin
-! File ${VIMRT}\ftplugin\*.*
-
- SetOutPath $0\indent
-! File ${VIMRT}\indent\*.*
-
- SetOutPath $0\macros
-! File ${VIMRT}\macros\*.*
-
- SetOutPath $0\plugin
-! File ${VIMRT}\plugin\*.*
-
- SetOutPath $0\syntax
-! File ${VIMRT}\syntax\*.*
-
- SetOutPath $0\tools
-! File ${VIMRT}\tools\*.*
-
- SetOutPath $0\tutor
-! File ${VIMRT}\tutor\*.*
- SectionEnd
-
- ##########################################################
-***************
-*** 206,221 ****
- "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
- IfErrors 0 lbl_winnt
- # Windows 95/98/ME
-! File /oname=vim.exe ..\src\vimd32.exe
- Goto lbl_done
- lbl_winnt:
- # Windows NT/2000/XT
-! File /oname=vim.exe ..\src\vimw32.exe
- lbl_done:
- StrCpy $2 "$2 vim view vimdiff"
- SectionEnd
-
- ##########################################################
- Section "Create icons on the Desktop"
- SectionIn 1 3
-
---- 219,241 ----
- "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
- IfErrors 0 lbl_winnt
- # Windows 95/98/ME
-! File /oname=vim.exe ${VIMSRC}\vimd32.exe
- Goto lbl_done
- lbl_winnt:
- # Windows NT/2000/XT
-! File /oname=vim.exe ${VIMSRC}\vimw32.exe
- lbl_done:
- StrCpy $2 "$2 vim view vimdiff"
- SectionEnd
-
- ##########################################################
-+ Section "Create .bat files for command line use"
-+ SectionIn 3
-+
-+ StrCpy $1 "$1 -create-batfiles $2"
-+ SectionEnd
-+
-+ ##########################################################
- Section "Create icons on the Desktop"
- SectionIn 1 3
-
-***************
-*** 233,241 ****
- Section "Add an Edit-with-Vim context menu entry"
- SectionIn 1 3
-
- SetOutPath $0
-! File ..\src\GvimExt\gvimext.dll
-! StrCpy $1 "$1 -install-popup"
- SectionEnd
-
- ##########################################################
---- 253,284 ----
- Section "Add an Edit-with-Vim context menu entry"
- SectionIn 1 3
-
-+ # Be aware of this sequence of events:
-+ # - user uninstalls Vim, gvimext.dll can't be removed (it's in use) and
-+ # is scheduled to be removed at next reboot.
-+ # - user installs Vim in same directory, gvimext.dll still exists.
-+ # If we now skip installing gvimext.dll, it will disappear at the next
-+ # reboot. Thus when copying gvimext.dll fails always schedule it to be
-+ # installed at the next reboot. Can't use UpgradeDLL!
-+ # We don't ask the user to reboot, the old dll will keep on working.
- SetOutPath $0
-! ClearErrors
-! SetOverwrite try
-! File /oname=gvimext.dll ${VIMSRC}\GvimExt\gvimext.dll
-! IfErrors 0 GvimExtDone
-!
-! # Can't copy gvimext.dll, create it under another name and rename it on
-! # next reboot.
-! GetTempFileName $3 $0
-! File /oname=$3 ${VIMSRC}\GvimExt\gvimext.dll
-! Rename /REBOOTOK $3 $0\gvimext.dll
-!
-! GvimExtDone:
-! SetOverwrite lastused
-!
-! # We don't have a separate entry for the "Open With..." menu, assume
-! # the user wants either both or none.
-! StrCpy $1 "$1 -install-popup -install-openwith"
- SectionEnd
-
- ##########################################################
-***************
-*** 246,258 ****
- SectionEnd
-
- ##########################################################
-- Section "Create .bat files for command line use"
-- SectionIn 3
--
-- StrCpy $1 "$1 -create-batfiles $2"
-- SectionEnd
--
-- ##########################################################
- Section "Create plugin directories in HOME or VIM"
- SectionIn 1 3
-
---- 289,294 ----
-***************
-*** 271,279 ****
- SectionIn 3
-
- SetOutPath $0
-! File ..\src\VisVim\VisVim.dll
-! File ..\src\VisVim\README_VisVim.txt
-! ExecWait "regsvr32.exe /s $0\VisVim.dll"
- SectionEnd
-
- ##########################################################
---- 307,314 ----
- SectionIn 3
-
- SetOutPath $0
-! !insertmacro UpgradeDLL "${VIMSRC}\VisVim\VisVim.dll" "$0\VisVim.dll" "$0"
-! File ${VIMSRC}\VisVim\README_VisVim.txt
- SectionEnd
-
- ##########################################################
-***************
-*** 282,293 ****
- SectionIn 1 3
-
- SetOutPath $0\lang
-! File /r ..\lang\*.*
- SetOutPath $0\keymap
-! File ..\keymap\README.txt
-! File ..\keymap\*.vim
- SetOutPath $0
-! File ..\libintl.dll
- SectionEnd
- !endif
-
---- 317,328 ----
- SectionIn 1 3
-
- SetOutPath $0\lang
-! File /r ${VIMRT}\lang\*.*
- SetOutPath $0\keymap
-! File ${VIMRT}\keymap\README.txt
-! File ${VIMRT}\keymap\*.vim
- SetOutPath $0
-! File ${VIMRT}\libintl.dll
- SectionEnd
- !endif
-
-***************
-*** 308,314 ****
- # created. Thus the "vim61" directory is included in it.
- StrCpy $0 "$INSTDIR"
-
-! # If VisVim was installed, unregister the DLL
- IfFileExists "$0\VisVim.dll" Has_VisVim No_VisVim
- Has_VisVim:
- ExecWait "regsvr32.exe /u /s $0\VisVim.dll"
---- 343,349 ----
- # created. Thus the "vim61" directory is included in it.
- StrCpy $0 "$INSTDIR"
-
-! # If VisVim was installed, unregister the DLL.
- IfFileExists "$0\VisVim.dll" Has_VisVim No_VisVim
- Has_VisVim:
- ExecWait "regsvr32.exe /u /s $0\VisVim.dll"
-***************
-*** 326,340 ****
- "Would you like to delete $0?$\n \
- $\nIt contains the Vim executables and runtime files." IDNO NoRemoveExes
-
-! Delete /REBOOTOK $0\gvimext.dll
- ClearErrors
-! RMDir /r $0
-
- IfErrors ErrorMess NoErrorMess
- ErrorMess:
- MessageBox MB_OK|MB_ICONEXCLAMATION \
- "Some files in $0 have not been deleted!$\nYou must do it manually."
- NoErrorMess:
-
- NoRemoveExes:
- # get the parent dir of the installation
---- 361,397 ----
- "Would you like to delete $0?$\n \
- $\nIt contains the Vim executables and runtime files." IDNO NoRemoveExes
-
-! Delete /REBOOTOK $0\*.dll
- ClearErrors
-! # Remove everything but *.dll files. Avoids that
-! # a lot remains when gvimext.dll cannot be deleted.
-! RMDir /r $0\colors
-! RMDir /r $0\compiler
-! RMDir /r $0\doc
-! RMDir /r $0\ftplugin
-! RMDir /r $0\indent
-! RMDir /r $0\macros
-! RMDir /r $0\plugin
-! RMDir /r $0\syntax
-! RMDir /r $0\tools
-! RMDir /r $0\tutor
-! RMDir /r $0\VisVim
-! RMDir /r $0\lang
-! RMDir /r $0\keymap
-! Delete $0\*.exe
-! Delete $0\*.bat
-! Delete $0\*.vim
-! Delete $0\*.txt
-
- IfErrors ErrorMess NoErrorMess
- ErrorMess:
- MessageBox MB_OK|MB_ICONEXCLAMATION \
- "Some files in $0 have not been deleted!$\nYou must do it manually."
- NoErrorMess:
-+
-+ # No error message if the "vim62" directory can't be removed, the
-+ # gvimext.dll may still be there.
-+ RMDir $0
-
- NoRemoveExes:
- # get the parent dir of the installation
-*** ../vim-6.2.523/src/dosinst.c Sun Apr 25 16:29:55 2004
---- src/dosinst.c Mon May 3 22:24:47 2004
-***************
-*** 32,38 ****
---- 32,40 ----
- directory to write .bat files in */
- char *default_vim_dir = NULL; /* when not NULL, use this as the default
- install dir for NSIS */
-+ #if 0
- char homedir[BUFSIZE]; /* home directory or "" */
-+ #endif
-
- /*
- * Structure used for each choice the user can make.
-***************
-*** 113,118 ****
---- 115,123 ----
- /* non-zero when selected to install the popup menu entry. */
- static int install_popup = 0;
-
-+ /* non-zero when selected to install the "Open with" entry. */
-+ static int install_openwith = 0;
-+
- /* non-zero when need to add an uninstall entry in the registry */
- static int need_uninstall_entry = 0;
-
-***************
-*** 679,684 ****
---- 684,690 ----
- else
- *oldvimrc = NUL;
-
-+ #if 0 /* currently not used */
- /*
- * Get default home directory.
- * Prefer $HOME if it's set. For Win NT use $HOMEDRIVE and $HOMEPATH.
-***************
-*** 709,714 ****
---- 715,721 ----
- *homedir = NUL;
- }
- }
-+ #endif
- }
-
- /*
-***************
-*** 1311,1316 ****
---- 1318,1324 ----
- /*
- * Add some entries to the registry:
- * - to add "Edit with Vim" to the context * menu
-+ * - to add Vim to the "Open with..." list
- * - to uninstall Vim
- */
- /*ARGSUSED*/
-***************
-*** 1367,1372 ****
---- 1375,1396 ----
- fprintf(fd, "\n");
- }
-
-+ if (install_openwith)
-+ {
-+ char bufg[BUFSIZE];
-+ struct stat st;
-+
-+ printf("Creating \"Open with ...\" list entry\n");
-+
-+ fprintf(fd, "[HKEY_CLASSES_ROOT\\Applications\\gvim.exe]\n\n");
-+ fprintf(fd, "[HKEY_CLASSES_ROOT\\Applications\\gvim.exe\\shell]\n\n");
-+ fprintf(fd, "[HKEY_CLASSES_ROOT\\Applications\\gvim.exe\\shell\\edit]\n\n");
-+ fprintf(fd, "[HKEY_CLASSES_ROOT\\Applications\\gvim.exe\\shell\\edit\\command]\n");
-+ fprintf(fd, "@=\"%sgvim.exe \\\"%%1\\\"\"\n\n", buf);
-+ fprintf(fd, "[HKEY_CLASSES_ROOT\\.htm\\OpenWithList\\gvim.exe]\n\n");
-+ fprintf(fd, "[HKEY_CLASSES_ROOT\\*\\OpenWithList\\gvim.exe]\n\n");
-+ }
-+
- printf("Creating an uninstall entry\n");
-
- /* The registry entries for uninstalling the menu */
-***************
-*** 1435,1440 ****
---- 1459,1502 ----
- add_dummy_choice();
- }
-
-+ static void
-+ change_openwith_choice(int idx)
-+ {
-+ if (install_openwith == 0)
-+ {
-+ choices[idx].text = "Add Vim to the \"Open With...\" list in the popup menu for the right\n mouse button so that you can edit any file with Vim";
-+ install_openwith = 1;
-+ }
-+ else
-+ {
-+ choices[idx].text = "Do NOT add Vim to the \"Open With...\" list in the popup menu for the\n right mouse button to edit any file with Vim";
-+ install_openwith = 0;
-+ }
-+ }
-+
-+ /*
-+ * Only add the choice for the open-with menu entry when gvim.exe was found
-+ * and and regedit.exe exist.
-+ */
-+ static void
-+ init_openwith_choice(void)
-+ {
-+ if (has_gvim
-+ #ifndef WIN3264
-+ && searchpath("regedit.exe") != NULL
-+ #endif
-+ )
-+ {
-+ choices[choice_count].changefunc = change_openwith_choice;
-+ choices[choice_count].installfunc = NULL;
-+ choices[choice_count].active = 1;
-+ change_openwith_choice(choice_count); /* set the text */
-+ ++choice_count;
-+ }
-+ else
-+ add_dummy_choice();
-+ }
-+
- #ifdef WIN3264
- /* create_shortcut
- *
-***************
-*** 1577,1582 ****
---- 1639,1650 ----
- }
-
- /*
-+ * We used to use "homedir" as the working directory, but that is a bad choice
-+ * on multi-user systems. Not specifying a directory appears to work best.
-+ */
-+ #define WORKDIR ""
-+
-+ /*
- * Create shortcut(s) in the Start Menu\Programs\Vim folder.
- */
- static void
-***************
-*** 1587,1614 ****
- if (has_vim)
- {
- if (build_shortcut("Vim", "vim.exe", "",
-! VIM_STARTMENU, homedir) == FAIL)
- return;
- if (build_shortcut("Vim Read-only", "vim.exe", "-R",
-! VIM_STARTMENU, homedir) == FAIL)
- return;
- if (build_shortcut("Vim Diff", "vim.exe", "-d",
-! VIM_STARTMENU, homedir) == FAIL)
- return;
- }
- if (has_gvim)
- {
- if (build_shortcut("gVim", "gvim.exe", "",
-! VIM_STARTMENU, homedir) == FAIL)
- return;
- if (build_shortcut("gVim Easy", "gvim.exe", "-y",
-! VIM_STARTMENU, homedir) == FAIL)
- return;
- if (build_shortcut("gVim Read-only", "gvim.exe", "-R",
-! VIM_STARTMENU, homedir) == FAIL)
- return;
- if (build_shortcut("gVim Diff", "gvim.exe", "-d",
-! VIM_STARTMENU, homedir) == FAIL)
- return;
- }
- if (build_shortcut("Uninstall",
---- 1655,1682 ----
- if (has_vim)
- {
- if (build_shortcut("Vim", "vim.exe", "",
-! VIM_STARTMENU, WORKDIR) == FAIL)
- return;
- if (build_shortcut("Vim Read-only", "vim.exe", "-R",
-! VIM_STARTMENU, WORKDIR) == FAIL)
- return;
- if (build_shortcut("Vim Diff", "vim.exe", "-d",
-! VIM_STARTMENU, WORKDIR) == FAIL)
- return;
- }
- if (has_gvim)
- {
- if (build_shortcut("gVim", "gvim.exe", "",
-! VIM_STARTMENU, WORKDIR) == FAIL)
- return;
- if (build_shortcut("gVim Easy", "gvim.exe", "-y",
-! VIM_STARTMENU, WORKDIR) == FAIL)
- return;
- if (build_shortcut("gVim Read-only", "gvim.exe", "-R",
-! VIM_STARTMENU, WORKDIR) == FAIL)
- return;
- if (build_shortcut("gVim Diff", "gvim.exe", "-d",
-! VIM_STARTMENU, WORKDIR) == FAIL)
- return;
- }
- if (build_shortcut("Uninstall",
-***************
-*** 1621,1627 ****
- VIM_STARTMENU, installdir) == FAIL)
- return;
- if (build_shortcut("Help", has_gvim ? "gvim.exe" : "vim.exe", "-c h",
-! VIM_STARTMENU, homedir) == FAIL)
- return;
- {
- char shell_folder_path[BUFSIZE];
---- 1689,1695 ----
- VIM_STARTMENU, installdir) == FAIL)
- return;
- if (build_shortcut("Help", has_gvim ? "gvim.exe" : "vim.exe", "-c h",
-! VIM_STARTMENU, WORKDIR) == FAIL)
- return;
- {
- char shell_folder_path[BUFSIZE];
-***************
-*** 1674,1680 ****
- if (choices[idx].arg)
- {
- (void)build_shortcut(icon_names[0], "gvim.exe",
-! "", "desktop", homedir);
- need_uninstall_entry = 1;
- }
- }
---- 1742,1748 ----
- if (choices[idx].arg)
- {
- (void)build_shortcut(icon_names[0], "gvim.exe",
-! "", "desktop", WORKDIR);
- need_uninstall_entry = 1;
- }
- }
-***************
-*** 1685,1691 ****
- if (choices[idx].arg)
- {
- (void)build_shortcut(icon_names[1], "gvim.exe",
-! "-y", "desktop", homedir);
- need_uninstall_entry = 1;
- }
- }
---- 1753,1759 ----
- if (choices[idx].arg)
- {
- (void)build_shortcut(icon_names[1], "gvim.exe",
-! "-y", "desktop", WORKDIR);
- need_uninstall_entry = 1;
- }
- }
-***************
-*** 1696,1702 ****
- if (choices[idx].arg)
- {
- (void)build_shortcut(icon_names[2], "gvim.exe",
-! "-R", "desktop", homedir);
- need_uninstall_entry = 1;
- }
- }
---- 1764,1770 ----
- if (choices[idx].arg)
- {
- (void)build_shortcut(icon_names[2], "gvim.exe",
-! "-R", "desktop", WORKDIR);
- need_uninstall_entry = 1;
- }
- }
-***************
-*** 1974,1979 ****
---- 2042,2050 ----
- /* Whether to add Vim to the popup menu */
- init_popup_choice();
-
-+ /* Whether to add Vim to the "Open With..." menu */
-+ init_openwith_choice();
-+
- /* Whether to add Vim to the Start Menu. */
- init_startmenu_choice();
-
-***************
-*** 1995,2000 ****
---- 2066,2073 ----
- printf(" Create a default _vimrc file if one does not already exist.\n");
- printf("-install-popup\n");
- printf(" Install the Edit-with-Vim context menu entry\n");
-+ printf("-install-openwith\n");
-+ printf(" Add Vim to the \"Open With...\" context menu list\n");
- #ifdef WIN3264
- printf("-add-start-menu");
- printf(" Add Vim to the start menu\n");
-***************
-*** 2054,2059 ****
---- 2127,2136 ----
- {
- init_popup_choice();
- }
-+ else if (strcmp(argv[i], "-install-openwith") == 0)
-+ {
-+ init_openwith_choice();
-+ }
- else if (strcmp(argv[i], "-add-start-menu") == 0)
- {
- init_startmenu_choice();
-***************
-*** 2178,2184 ****
- "select each file type.\n"
- "An alternative is the option offered here: Install an \"Edit with Vim\"\n"
- "entry in the popup menu for the right mouse button. This means you can\n"
-! "edit any file with Vim\n"
- ,
- "Add Vim to the Start menu\n"
- "-------------------------\n"
---- 2255,2268 ----
- "select each file type.\n"
- "An alternative is the option offered here: Install an \"Edit with Vim\"\n"
- "entry in the popup menu for the right mouse button. This means you can\n"
-! "edit any file with Vim.\n"
-! ,
-! "\"Open With...\" context menu entry\n"
-! "--------------------------------\n"
-! "(this choice is only available when gvim.exe is present)\n"
-! "This option adds Vim to the \"Open With...\" entry in the popup menu for\n"
-! "the right mouse button. This also makes it possible to edit HTML files\n"
-! "directly from Internet Explorer.\n"
- ,
- "Add Vim to the Start menu\n"
- "-------------------------\n"
-***************
-*** 2237,2243 ****
- (choices[i].installfunc)(i);
-
- /* Add some entries to the registry, if needed. */
-! if (install_popup || (need_uninstall_entry && interactive) || !interactive)
- install_registry();
-
- #ifdef WIN3264
---- 2321,2330 ----
- (choices[i].installfunc)(i);
-
- /* Add some entries to the registry, if needed. */
-! if (install_popup
-! || install_openwith
-! || (need_uninstall_entry && interactive)
-! || !interactive)
- install_registry();
-
- #ifdef WIN3264
-*** ../vim-6.2.523/src/dosinst.h Tue May 27 22:00:56 2003
---- src/dosinst.h Mon May 3 22:56:17 2004
-***************
-*** 213,228 ****
- /*
- * The following code was successfully built with make_mvc.mak.
- * The resulting executable worked on Windows 95, Millennium Edition, and
-! * 2000 Professional.
- */
-! LPITEMIDLIST pidl = 0; /* Pointer to an Item ID list allocated below */
-! LPMALLOC pMalloc; /* Pointer to an IMalloc interface */
-! int csidl;
-
- if (strcmp(shell_folder_name, "desktop") == 0)
-! csidl = CSIDL_DESKTOP;
- else if (strncmp(shell_folder_name, "Programs", 8) == 0)
-! csidl = CSIDL_PROGRAMS;
- else
- {
- printf("\nERROR (internal) unrecognised shell_folder_name: \"%s\"\n\n",
---- 213,241 ----
- /*
- * The following code was successfully built with make_mvc.mak.
- * The resulting executable worked on Windows 95, Millennium Edition, and
-! * 2000 Professional. But it was changed after testing...
- */
-! LPITEMIDLIST pidl = 0; /* Pointer to an Item ID list allocated below */
-! LPMALLOC pMalloc; /* Pointer to an IMalloc interface */
-! int csidl;
-! int alt_csidl = -1;
-! static int desktop_csidl = -1;
-! static int programs_csidl = -1;
-! int *pcsidl;
-! int r;
-
- if (strcmp(shell_folder_name, "desktop") == 0)
-! {
-! pcsidl = &desktop_csidl;
-! csidl = CSIDL_COMMON_DESKTOPDIRECTORY;
-! alt_csidl = CSIDL_DESKTOP;
-! }
- else if (strncmp(shell_folder_name, "Programs", 8) == 0)
-! {
-! pcsidl = &programs_csidl;
-! csidl = CSIDL_COMMON_PROGRAMS;
-! alt_csidl = CSIDL_PROGRAMS;
-! }
- else
- {
- printf("\nERROR (internal) unrecognised shell_folder_name: \"%s\"\n\n",
-***************
-*** 230,235 ****
---- 243,256 ----
- return FAIL;
- }
-
-+ /* Did this stuff before, use the same ID again. */
-+ if (*pcsidl >= 0)
-+ {
-+ csidl = *pcsidl;
-+ alt_csidl = -1;
-+ }
-+
-+ retry:
- /* Initialize pointer to IMalloc interface */
- if (NOERROR != SHGetMalloc(&pMalloc))
- {
-***************
-*** 241,265 ****
- /* Get an ITEMIDLIST corresponding to the folder code */
- if (NOERROR != SHGetSpecialFolderLocation(0, csidl, &pidl))
- {
-! printf("\nERROR getting ITEMIDLIST for shell_folder_name: \"%s\"\n\n",
- shell_folder_name);
-! return FAIL;
- }
-
- /* Translate that ITEMIDLIST to a string */
-! if (!SHGetPathFromIDList(pidl, shell_folder_path))
- {
- printf("\nERROR translating ITEMIDLIST for shell_folder_name: \"%s\"\n\n",
- shell_folder_name);
-- pMalloc->lpVtbl->Free(pMalloc, pidl);
-- pMalloc->lpVtbl->Release(pMalloc);
- return FAIL;
- }
-
-! /* Free the data associated with pidl */
-! pMalloc->lpVtbl->Free(pMalloc, pidl);
-! /* Release the IMalloc interface */
-! pMalloc->lpVtbl->Release(pMalloc);
-
- if (strncmp(shell_folder_name, "Programs\\", 9) == 0)
- strcat(shell_folder_path, shell_folder_name + 8);
---- 262,328 ----
- /* Get an ITEMIDLIST corresponding to the folder code */
- if (NOERROR != SHGetSpecialFolderLocation(0, csidl, &pidl))
- {
-! if (alt_csidl < 0 || NOERROR != SHGetSpecialFolderLocation(0,
-! alt_csidl, &pidl))
-! {
-! printf("\nERROR getting ITEMIDLIST for shell_folder_name: \"%s\"\n\n",
- shell_folder_name);
-! return FAIL;
-! }
-! csidl = alt_csidl;
-! alt_csidl = -1;
- }
-
- /* Translate that ITEMIDLIST to a string */
-! r = SHGetPathFromIDList(pidl, shell_folder_path);
-!
-! /* Free the data associated with pidl */
-! pMalloc->lpVtbl->Free(pMalloc, pidl);
-! /* Release the IMalloc interface */
-! pMalloc->lpVtbl->Release(pMalloc);
-!
-! if (!r)
- {
-+ if (alt_csidl >= 0)
-+ {
-+ /* We probably get here for Windows 95: the "all users"
-+ * desktop/start menu entry doesn't exist. */
-+ csidl = alt_csidl;
-+ alt_csidl = -1;
-+ goto retry;
-+ }
- printf("\nERROR translating ITEMIDLIST for shell_folder_name: \"%s\"\n\n",
- shell_folder_name);
- return FAIL;
- }
-
-! /* If there is an alternative: verify we can write in this directory.
-! * This should cause a retry when the "all users" directory exists but we
-! * are a normal user and can't write there. */
-! if (alt_csidl >= 0)
-! {
-! char tbuf[BUFSIZE];
-! FILE *fd;
-!
-! strcpy(tbuf, shell_folder_path);
-! strcat(tbuf, "\\vim write test");
-! fd = fopen(tbuf, "w");
-! if (fd == NULL)
-! {
-! csidl = alt_csidl;
-! alt_csidl = -1;
-! goto retry;
-! }
-! fclose(fd);
-! unlink(tbuf);
-! }
-!
-! /*
-! * Keep the found csidl for next time, so that we don't have to do the
-! * write test every time.
-! */
-! if (*pcsidl < 0)
-! *pcsidl = csidl;
-
- if (strncmp(shell_folder_name, "Programs\\", 9) == 0)
- strcat(shell_folder_path, shell_folder_name + 8);
-*** ../vim-6.2.523/src/uninstal.c Tue May 13 20:39:50 2003
---- src/uninstal.c Mon May 3 22:28:05 2004
-***************
-*** 11,16 ****
---- 11,17 ----
- * uninstal.c: Minimalistic uninstall program for Vim on MS-Windows
- * Removes:
- * - the "Edit with Vim" popup menu entry
-+ * - the Vim "Open With..." popup menu entry
- * - any Vim Batch files in the path
- * - icons for Vim on the Desktop
- * - the Vim entry in the Start Menu
-***************
-*** 57,62 ****
---- 58,88 ----
- return (r == ERROR_SUCCESS);
- }
-
-+ /*
-+ * Check if the "Open With..." menu entry exists and what gvim it refers to.
-+ * Returns non-zero when it's found.
-+ */
-+ static int
-+ openwith_gvim_path(char *buf)
-+ {
-+ HKEY key_handle;
-+ DWORD value_type;
-+ DWORD bufsize = BUFSIZE;
-+ int r;
-+
-+ /* Open the key where the path to gvim.exe is stored. */
-+ if (RegOpenKeyEx(HKEY_CLASSES_ROOT,
-+ "Applications\\gvim.exe\\shell\\edit\\command", 0, KEY_READ,
-+ &key_handle) != ERROR_SUCCESS)
-+ return 0;
-+
-+ /* get the DisplayName out of it to show the user */
-+ r = RegQueryValueEx(key_handle, "", 0, &value_type, (LPBYTE)buf, &bufsize);
-+ RegCloseKey(key_handle);
-+
-+ return (r == ERROR_SUCCESS);
-+ }
-+
- static void
- remove_popup(void)
- {
-***************
-*** 83,93 ****
- ++fail;
-
- if (fail == 6)
-! printf("No Vim registry entries could be removed\n");
- else if (fail)
-! printf("Some Vim registry entries could not be removed\n");
- else
-! printf("The Vim registry entries have been removed\n");
- }
- #endif
-
---- 109,146 ----
- ++fail;
-
- if (fail == 6)
-! printf("No Vim popup registry entries could be removed\n");
-! else if (fail)
-! printf("Some Vim popup registry entries could not be removed\n");
-! else
-! printf("The Vim popup registry entries have been removed\n");
-! }
-!
-! static void
-! remove_openwith(void)
-! {
-! int fail = 0;
-! HKEY kh;
-!
-! if (RegDeleteKey(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell\\edit\\command") != ERROR_SUCCESS)
-! ++fail;
-! if (RegDeleteKey(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell\\edit") != ERROR_SUCCESS)
-! ++fail;
-! if (RegDeleteKey(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell") != ERROR_SUCCESS)
-! ++fail;
-! if (RegDeleteKey(HKEY_CLASSES_ROOT, "Applications\\gvim.exe") != ERROR_SUCCESS)
-! ++fail;
-! if (RegDeleteKey(HKEY_CLASSES_ROOT, ".htm\\OpenWithList\\gvim.exe") != ERROR_SUCCESS)
-! ++fail;
-! if (RegDeleteKey(HKEY_CLASSES_ROOT, "*\\OpenWithList\\gvim.exe") != ERROR_SUCCESS)
-! ++fail;
-!
-! if (fail == 6)
-! printf("No Vim open-with registry entries could be removed\n");
- else if (fail)
-! printf("Some Vim open-with registry entries could not be removed\n");
- else
-! printf("The Vim open-with registry entries have been removed\n");
- }
- #endif
-
-***************
-*** 302,308 ****
---- 355,374 ----
- printf(" which uses \"%s\"\n", popup_path);
- printf("\nRemove it (y/n)? ");
- if (confirm())
-+ {
- remove_popup();
-+ /* Assume the "Open With" entry can be removed as well, don't
-+ * bother the user with asking him again. */
-+ remove_openwith();
-+ }
-+ }
-+ else if (openwith_gvim_path(popup_path))
-+ {
-+ printf(" - the Vim \"Open With...\" entry in the popup menu\n");
-+ printf(" which uses \"%s\"\n", popup_path);
-+ printf("\nRemove it (y/n)? ");
-+ if (confirm())
-+ remove_openwith();
- }
-
- if (get_shell_folder_path(path, "desktop"))
-*** ../vim-6.2.523/src/version.c Mon May 3 21:30:07 2004
---- src/version.c Tue May 4 15:42:08 2004
-***************
-*** 639,640 ****
---- 642,645 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 524,
- /**/
-
---
-hundred-and-one symptoms of being an internet addict:
-99. The hum of a cooling fan and the click of keys is comforting to you.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.525
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.525
-Problem: When the history contains a very long line ":history" causes a
- crash. (Volker Kiefel)
-Solution: Shorten the history entry to fit it in one line.
-Files: src/ex_getln.c
-
-
-*** ../vim-6.2.524/src/ex_getln.c Mon Apr 19 20:26:42 2004
---- src/ex_getln.c Tue May 4 19:21:08 2004
-***************
-*** 608,614 ****
- if (c == '=')
- {
- p = get_expr_line();
-! if (p != NULL && realloc_cmdbuff(STRLEN(p) + 1) == OK)
- {
- ccline.cmdlen = STRLEN(p);
- STRCPY(ccline.cmdbuff, p);
---- 608,615 ----
- if (c == '=')
- {
- p = get_expr_line();
-! if (p != NULL
-! && realloc_cmdbuff((int)STRLEN(p) + 1) == OK)
- {
- ccline.cmdlen = STRLEN(p);
- STRCPY(ccline.cmdbuff, p);
-***************
-*** 4809,4816 ****
- && hist[i].hisnum >= j && hist[i].hisnum <= k)
- {
- msg_putchar('\n');
-! sprintf((char *)IObuff, "%c%6d %s", i == idx ? '>' : ' ',
-! hist[i].hisnum, hist[i].hisstr);
- msg_outtrans(IObuff);
- out_flush();
- }
---- 4810,4822 ----
- && hist[i].hisnum >= j && hist[i].hisnum <= k)
- {
- msg_putchar('\n');
-! sprintf((char *)IObuff, "%c%6d ", i == idx ? '>' : ' ',
-! hist[i].hisnum);
-! if (vim_strsize(hist[i].hisstr) > (int)Columns - 10)
-! trunc_string(hist[i].hisstr, IObuff + STRLEN(IObuff),
-! (int)Columns - 10);
-! else
-! STRCAT(IObuff, hist[i].hisstr);
- msg_outtrans(IObuff);
- out_flush();
- }
-*** ../vim-6.2.524/src/version.c Tue May 4 15:53:18 2004
---- src/version.c Tue May 4 19:22:08 2004
-***************
-*** 639,640 ****
---- 642,645 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 525,
- /**/
-
---
-hundred-and-one symptoms of being an internet addict:
-106. When told to "go to your room" you inform your parents that you
- can't...because you were kicked out and banned.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.526
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.526
-Problem: When s:lang is "ja" the Japanese menus are not used.
-Solution: Add 'encoding' to the language when there is no charset.
-Files: runtime/menu.vim
-
-
-*** ../vim-6.2.525/runtime/menu.vim Mon Mar 1 16:43:34 2004
---- runtime/menu.vim Tue May 4 15:57:24 2004
-***************
-*** 2,8 ****
- " You can also use this as a start for your own set of menus.
- "
- " Maintainer: Bram Moolenaar <Bram@vim.org>
-! " Last Change: 2004 Mar 01
-
- " Note that ":an" (short for ":anoremenu") is often used to make a menu work
- " in all modes and avoid side effects from mappings defined by the user.
---- 2,8 ----
- " You can also use this as a start for your own set of menus.
- "
- " Maintainer: Bram Moolenaar <Bram@vim.org>
-! " Last Change: 2004 May 04
-
- " Note that ":an" (short for ":anoremenu") is often used to make a menu work
- " in all modes and avoid side effects from mappings defined by the user.
-***************
-*** 30,35 ****
---- 30,40 ----
- endif
- " A language name must be at least two characters, don't accept "C"
- if strlen(s:lang) > 1
-+ " When the language does not include the charset add 'encoding'
-+ if s:lang =~ '^\a\a$\|^\a\a_\a\a$'
-+ let s:lang = s:lang . '.' . &enc
-+ endif
-+
- " We always use a lowercase name.
- " Change "iso-8859" to "iso_8859" and "iso8859" to "iso_8859", some
- " systems appear to use this.
-*** ../vim-6.2.525/src/version.c Tue May 4 19:23:13 2004
---- src/version.c Tue May 4 21:12:08 2004
-***************
-*** 639,640 ****
---- 642,645 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 526,
- /**/
-
---
-hundred-and-one symptoms of being an internet addict:
-107. When using your phone you forget that you don't have to use your
- keyboard.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.527
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.527
-Problem: The 2html script uses ":wincmd p", which breaks when using some
- autocommands.
-Solution: Remember the window numbers and jump to them with ":wincmd w".
- Also add XHTML support. (Panagiotis Issaris)
-Files: runtime/syntax/2html.vim
-
-
-*** ../vim-6.2.526/runtime/syntax/2html.vim Mon Dec 29 20:49:00 2003
---- runtime/syntax/2html.vim Wed May 5 11:17:45 2004
-***************
-*** 1,7 ****
- " Vim syntax support file
- " Maintainer: Bram Moolenaar <Bram@vim.org>
-! " Last Change: 2003 Nov 13
- " (modified by David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>)
-
- " Transform a file into HTML, using the current syntax highlighting.
-
---- 1,8 ----
- " Vim syntax support file
- " Maintainer: Bram Moolenaar <Bram@vim.org>
-! " Last Change: 2004 May 05
- " (modified by David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>)
-+ " (XHTML support by Panagiotis Issaris <takis@lumumba.luc.ac.be>)
-
- " Transform a file into HTML, using the current syntax highlighting.
-
-***************
-*** 168,178 ****
---- 169,183 ----
- set report=1000000
-
- " Split window to create a buffer with the HTML file.
-+ let s:orgbufnr = winbufnr(0)
- if expand("%") == ""
- new Untitled.html
- else
- new %.html
- endif
-+ let s:newwin = winnr()
-+ let s:orgwin = bufwinnr(s:orgbufnr)
-+
- set modifiable
- %d
- let s:old_paste = &paste
-***************
-*** 180,192 ****
- let s:old_magic = &magic
- set magic
-
- " HTML header, with the title and generator ;-). Left free space for the CSS,
- " to be filled at the end.
- exe "normal! a<html>\n<head>\n<title>\e"
- exe "normal! a" . expand("%:p:~") . "</title>\n\e"
-! exe "normal! a<meta name=\"Generator\" content=\"Vim/" . version/100 . "." . version %100 . "\">\n\e"
- if s:html_encoding != ""
-! exe "normal! a<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:html_encoding . "\">\n\e"
- endif
- if exists("html_use_css")
- exe "normal! a<style type=\"text/css\">\n<!--\n-->\n</style>\n\e"
---- 185,204 ----
- let s:old_magic = &magic
- set magic
-
-+ if exists("use_xhtml")
-+ exe "normal! a<?xml version=\"1.0\"?>\n\e"
-+ let tag_close = '/>'
-+ else
-+ let tag_close = '>'
-+ endif
-+
- " HTML header, with the title and generator ;-). Left free space for the CSS,
- " to be filled at the end.
- exe "normal! a<html>\n<head>\n<title>\e"
- exe "normal! a" . expand("%:p:~") . "</title>\n\e"
-! exe "normal! a<meta name=\"Generator\" content=\"Vim/" . v:version/100 . "." . v:version %100 . '"' . tag_close . "\n\e"
- if s:html_encoding != ""
-! exe "normal! a<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:html_encoding . '"' . tag_close . "\n\e"
- endif
- if exists("html_use_css")
- exe "normal! a<style type=\"text/css\">\n<!--\n-->\n</style>\n\e"
-***************
-*** 197,203 ****
- exe "normal! a</head>\n<body>\n<pre>\n\e"
- endif
-
-! wincmd p
-
- " List of all id's
- let s:idlist = ","
---- 209,215 ----
- exe "normal! a</head>\n<body>\n<pre>\n\e"
- endif
-
-! exe s:orgwin . "wincmd w"
-
- " List of all id's
- let s:idlist = ","
-***************
-*** 274,290 ****
- endwhile
-
- if exists("html_no_pre")
-! let s:new = substitute(s:new, ' ', '\ \ ', 'g') . '<br>'
- endif
-! exe "normal! \<C-W>pa" . strtrans(s:new) . "\n\e\<C-W>p"
- let s:lnum = s:lnum + 1
- +
- endwhile
- " Finish with the last line
- if exists("html_no_pre")
-! exe "normal! \<C-W>pa\n</body>\n</html>\e"
- else
-! exe "normal! \<C-W>pa</pre>\n</body>\n</html>\e"
- endif
-
-
---- 286,309 ----
- endwhile
-
- if exists("html_no_pre")
-! if exists("use_xhtml")
-! let s:new = substitute(s:new, ' ', '\ \ ', 'g') . '<br/>'
-! else
-! let s:new = substitute(s:new, ' ', '\ \ ', 'g') . '<br>'
-! endif
- endif
-! exe s:newwin . "wincmd w"
-! exe "normal! a" . strtrans(s:new) . "\n\e"
-! exe s:orgwin . "wincmd w"
- let s:lnum = s:lnum + 1
- +
- endwhile
- " Finish with the last line
-+ exe s:newwin . "wincmd w"
- if exists("html_no_pre")
-! exe "normal! a\n</body>\n</html>\e"
- else
-! exe "normal! a</pre>\n</body>\n</html>\e"
- endif
-
-
-***************
-*** 375,388 ****
- let &paste = s:old_paste
- let &magic = s:old_magic
- let @/ = s:old_search
-! wincmd p
- let &l:et = s:old_et
-! wincmd p
-
-! " Save a little bit of memory (worths doing?)
- unlet s:old_et s:old_paste s:old_icon s:old_report s:old_title s:old_search
- unlet s:whatterm s:idlist s:lnum s:end s:fgc s:bgc s:old_magic
- unlet! s:col s:id s:attr s:len s:line s:new s:did_retab s:numblines
- delfunc s:HtmlColor
- delfunc s:CSS1
- if !exists("html_use_css")
---- 394,408 ----
- let &paste = s:old_paste
- let &magic = s:old_magic
- let @/ = s:old_search
-! exe s:orgwin . "wincmd w"
- let &l:et = s:old_et
-! exe s:newwin . "wincmd w"
-
-! " Save a little bit of memory (worth doing?)
- unlet s:old_et s:old_paste s:old_icon s:old_report s:old_title s:old_search
- unlet s:whatterm s:idlist s:lnum s:end s:fgc s:bgc s:old_magic
- unlet! s:col s:id s:attr s:len s:line s:new s:did_retab s:numblines
-+ unlet s:orgwin s:newwin s:orgbufnr
- delfunc s:HtmlColor
- delfunc s:CSS1
- if !exists("html_use_css")
-*** ../vim-6.2.526/src/version.c Tue May 4 21:16:25 2004
---- src/version.c Wed May 5 11:15:10 2004
-***************
-*** 639,640 ****
---- 642,645 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 527,
- /**/
-
---
-Corduroy pillows: They're making headlines!
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.528
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.528
-Problem: NetBeans: Changes of the "~" command are not reported.
-Solution: Call netbeans_inserted() after performing "~". (Gordon Prieur)
- Also change NetBeans debugging to append to the log file.
- Also fix that "~" in Visual block mode changes too much if there
- are multi-byte characters.
-Files: src/nbdebug.c, src/normal.c, src/ops.c
-
-
-*** ../vim-6.2.527/src/nbdebug.c Sun Oct 12 16:42:14 2003
---- src/nbdebug.c Wed Apr 14 19:55:02 2004
-***************
-*** 86,92 ****
- if (log_var && (file = getenv(log_var)) != NULL) {
- time_t now;
-
-! nb_debug = fopen(file, "w");
- time(&now);
- fprintf(nb_debug, "%s", asctime(localtime(&now)));
- if (level_var && (cp = getenv(level_var)) != NULL) {
---- 86,92 ----
- if (log_var && (file = getenv(log_var)) != NULL) {
- time_t now;
-
-! nb_debug = fopen(file, "a");
- time(&now);
- fprintf(nb_debug, "%s", asctime(localtime(&now)));
- if (level_var && (cp = getenv(level_var)) != NULL) {
-*** ../vim-6.2.527/src/normal.c Mon Apr 19 20:26:43 2004
---- src/normal.c Mon Apr 26 15:19:26 2004
-***************
-*** 6460,6465 ****
---- 6460,6470 ----
- long n;
- pos_T startpos;
- int did_change = 0;
-+ #ifdef FEAT_NETBEANS_INTG
-+ pos_T pos;
-+ char_u *ptr;
-+ int count;
-+ #endif
-
- if (checkclearopq(cap->oap))
- return;
-***************
-*** 6476,6481 ****
---- 6481,6489 ----
- return;
-
- startpos = curwin->w_cursor;
-+ #ifdef FEAT_NETBEANS_INTG
-+ pos = startpos;
-+ #endif
- for (n = cap->count1; n > 0; --n)
- {
- did_change |= swapchar(cap->oap->op_type, &curwin->w_cursor);
-***************
-*** 6485,6490 ****
---- 6493,6512 ----
- if (vim_strchr(p_ww, '~') != NULL
- && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
- {
-+ #ifdef FEAT_NETBEANS_INTG
-+ if (usingNetbeans)
-+ {
-+ if (did_change)
-+ {
-+ ptr = ml_get(pos.lnum);
-+ count = STRLEN(ptr) - pos.col;
-+ netbeans_inserted(curbuf, pos.lnum, pos.col,
-+ count, &ptr[pos.col], count);
-+ }
-+ pos.col = 0;
-+ pos.lnum++;
-+ }
-+ #endif
- ++curwin->w_cursor.lnum;
- curwin->w_cursor.col = 0;
- if (n > 1)
-***************
-*** 6498,6503 ****
---- 6520,6535 ----
- break;
- }
- }
-+ #ifdef FEAT_NETBEANS_INTG
-+ if (did_change && usingNetbeans)
-+ {
-+ ptr = ml_get(pos.lnum);
-+ count = curwin->w_cursor.col - pos.col;
-+ netbeans_inserted(curbuf, pos.lnum, pos.col,
-+ count, &ptr[pos.col], count);
-+ }
-+ #endif
-+
-
- check_cursor();
- curwin->w_set_curswant = TRUE;
-*** ../vim-6.2.527/src/ops.c Fri Apr 30 19:42:02 2004
---- src/ops.c Wed May 5 10:34:02 2004
-***************
-*** 2148,2155 ****
---- 2148,2159 ----
- pos_T pos;
- #ifdef FEAT_VISUAL
- struct block_def bd;
-+ int done;
- #endif
- int did_change = 0;
-+ #ifdef FEAT_MBYTE
-+ colnr_T col;
-+ #endif
-
- if (u_save((linenr_T)(oap->start.lnum - 1),
- (linenr_T)(oap->end.lnum + 1)) == FAIL)
-***************
-*** 2163,2174 ****
- {
- block_prep(oap, &bd, pos.lnum, FALSE);
- pos.col = bd.textcol;
-! while (--bd.textlen >= 0)
- {
- did_change |= swapchar(oap->op_type, &pos);
- if (inc(&pos) == -1) /* at end of file */
- break;
- }
- }
- if (did_change)
- changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L);
---- 2167,2195 ----
- {
- block_prep(oap, &bd, pos.lnum, FALSE);
- pos.col = bd.textcol;
-! for (done = 0; done < bd.textlen; ++done)
- {
- did_change |= swapchar(oap->op_type, &pos);
-+ # ifdef FEAT_MBYTE
-+ col = pos.col + 1;
-+ # endif
- if (inc(&pos) == -1) /* at end of file */
- break;
-+ # ifdef FEAT_MBYTE
-+ if (pos.col > col)
-+ /* Count extra bytes of a multi-byte character. */
-+ done += pos.col - col;
-+ # endif
- }
-+ # ifdef FEAT_NETBEANS_INTG
-+ if (usingNetbeans && did_change)
-+ {
-+ char_u *ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
-+
-+ netbeans_inserted(curbuf, pos.lnum, bd.textcol,
-+ bd.textlen, &ptr[bd.textcol], bd.textlen);
-+ }
-+ # endif
- }
- if (did_change)
- changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L);
-***************
-*** 2194,2201 ****
---- 2215,2246 ----
- break;
- }
- if (did_change)
-+ {
- changed_lines(oap->start.lnum, oap->start.col, oap->end.lnum + 1,
- 0L);
-+ #ifdef FEAT_NETBEANS_INTG
-+ if (usingNetbeans && did_change)
-+ {
-+ char_u *ptr;
-+ int count;
-+
-+ pos = oap->start;
-+ while (pos.lnum < oap->end.lnum)
-+ {
-+ ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
-+ count = STRLEN(ptr) - pos.col;
-+ netbeans_inserted(curbuf, pos.lnum, pos.col,
-+ count, &ptr[pos.col], count);
-+ pos.col = 0;
-+ pos.lnum++;
-+ }
-+ ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
-+ count = oap->end.col - pos.col + 1;
-+ netbeans_inserted(curbuf, pos.lnum, pos.col,
-+ count, &ptr[pos.col], count);
-+ }
-+ #endif
-+ }
- }
-
- #ifdef FEAT_VISUAL
-*** ../vim-6.2.527/src/version.c Wed May 5 11:17:53 2004
---- src/version.c Wed May 5 11:47:08 2004
-***************
-*** 639,640 ****
---- 642,645 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 528,
- /**/
-
---
-Nobody will ever need more than 640 kB RAM.
- -- Bill Gates, 1983
-Windows 98 requires 16 MB RAM.
- -- Bill Gates, 1999
-Logical conclusion: Nobody will ever need Windows 98.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.529 (extra)
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.529 (extra)
-Problem: VisVim only works for Admin. Doing it for one user doesn't work.
- (Alexandre Gouraud)
-Solution: When registering the module fails, simply continue.
-Files: src/VisVim/VisVim.cpp
-
-
-*** ../vim-6.2.528/src/VisVim/VisVim.cpp Mon Jan 7 17:16:20 2002
---- src/VisVim/VisVim.cpp Tue May 4 12:31:29 2004
-***************
-*** 86,92 ****
- // Registers object, typelib and all interfaces in typelib
- hRes = _Module.RegisterServer (TRUE);
- if (FAILED (hRes))
-! return hRes;
-
- _ATL_OBJMAP_ENTRY *pEntry = _Module.m_pObjMap;
- CRegKey key;
---- 86,97 ----
- // Registers object, typelib and all interfaces in typelib
- hRes = _Module.RegisterServer (TRUE);
- if (FAILED (hRes))
-! // Hack: When this fails we might be a normal user, while the
-! // admin already registered the module. Returning S_OK then
-! // makes it work. When the module was never registered it
-! // will soon fail in another way.
-! // old code: return hRes;
-! return S_OK;
-
- _ATL_OBJMAP_ENTRY *pEntry = _Module.m_pObjMap;
- CRegKey key;
-*** ../vim-6.2.528/src/version.c Wed May 5 11:49:55 2004
---- src/version.c Wed May 5 11:53:56 2004
-***************
-*** 639,640 ****
---- 642,645 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 529,
- /**/
-
---
-hundred-and-one symptoms of being an internet addict:
-113. You are asked about a bus schedule, you wonder if it is 16 or 32 bits.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.530
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.530
-Problem: Warning for missing prototype on the Amiga.
-Solution: Include time.h
-Files: src/version.c
-
-
-*** ../vim-6.2.529/src/version.c Wed May 5 11:54:50 2004
---- src/version.c Wed May 5 11:56:11 2004
-***************
-*** 10,13 ****
---- 10,17 ----
- #include "vim.h"
-
-+ #ifdef AMIGA
-+ # include <time.h> /* for time() */
-+ #endif
-+
- /*
- * Vim originated from Stevie version 3.6 (Fish disk 217) by GRWalter (Fred)
-***************
-*** 639,640 ****
---- 642,645 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 530,
- /**/
-
---
-hundred-and-one symptoms of being an internet addict:
-114. You are counting items, you go "0,1,2,3,4,5,6,7,8,9,A,B,C,D...".
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.531
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.531
-Problem: In silent ex mode no messages are given, which makes debugging
- very difficult.
-Solution: Do output messages when 'verbose' is set.
-Files: src/message.c, src/ui.c
-
-
-*** ../vim-6.2.530/src/message.c Fri Apr 16 22:03:45 2004
---- src/message.c Wed May 5 12:30:46 2004
-***************
-*** 1761,1772 ****
- if (msg_use_printf())
- {
- #ifdef WIN3264
-! if (!silent_mode)
- mch_settmode(TMODE_COOK); /* handle '\r' and '\n' correctly */
- #endif
- while (*s != NUL && (maxlen < 0 || (int)(s - str) < maxlen))
- {
-! if (!silent_mode)
- {
- p = &buf[0];
- /* NL --> CR NL translation (for Unix, not for "--version") */
---- 1761,1772 ----
- if (msg_use_printf())
- {
- #ifdef WIN3264
-! if (!(silent_mode && p_verbose == 0))
- mch_settmode(TMODE_COOK); /* handle '\r' and '\n' correctly */
- #endif
- while (*s != NUL && (maxlen < 0 || (int)(s - str) < maxlen))
- {
-! if (!(silent_mode && p_verbose == 0))
- {
- p = &buf[0];
- /* NL --> CR NL translation (for Unix, not for "--version") */
-***************
-*** 1806,1812 ****
- msg_didout = TRUE; /* assume that line is not empty */
-
- #ifdef WIN3264
-! if (!silent_mode)
- mch_settmode(TMODE_RAW);
- #endif
- return;
---- 1806,1812 ----
- msg_didout = TRUE; /* assume that line is not empty */
-
- #ifdef WIN3264
-! if (!(silent_mode && p_verbose == 0))
- mch_settmode(TMODE_RAW);
- #endif
- return;
-*** ../vim-6.2.530/src/ui.c Fri Apr 2 14:07:44 2004
---- src/ui.c Wed May 5 12:31:49 2004
-***************
-*** 33,40 ****
- }
- #endif
- #ifndef NO_CONSOLE
-! /* Don't output anything in silent mode ("ex -s") */
-! if (!silent_mode)
- {
- #ifdef FEAT_MBYTE
- char_u *tofree = NULL;
---- 33,40 ----
- }
- #endif
- #ifndef NO_CONSOLE
-! /* Don't output anything in silent mode ("ex -s") unless 'verbose' set */
-! if (!(silent_mode && p_verbose == 0))
- {
- #ifdef FEAT_MBYTE
- char_u *tofree = NULL;
-*** ../vim-6.2.530/src/version.c Wed May 5 11:56:50 2004
---- src/version.c Wed May 5 12:36:41 2004
-***************
-*** 643,644 ****
---- 643,646 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 531,
- /**/
-
---
-hundred-and-one symptoms of being an internet addict:
-116. You are living with your boyfriend who networks your respective
- computers so you can sit in separate rooms and email each other
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
+++ /dev/null
-To: vim-dev@vim.org
-Subject: Patch 6.2.532 (extra)
-Fcc: outbox
-From: Bram Moolenaar <Bram@moolenaar.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-------------
-
-Patch 6.2.532 (extra)
-Problem: Compiling for Win32s with VC 4.1 doesn't work.
-Solution: Don't use CP_UTF8 if it's not defined. Don't use CSIDL_COMMON*
- when not defined.
-Files: src/dosinst.h, src/fileio.c
-
-
-*** ../vim-6.2.531/src/dosinst.h Tue May 4 15:53:18 2004
---- src/dosinst.h Wed May 5 14:43:43 2004
-***************
-*** 227,240 ****
---- 227,248 ----
- if (strcmp(shell_folder_name, "desktop") == 0)
- {
- pcsidl = &desktop_csidl;
-+ #ifdef CSIDL_COMMON_DESKTOPDIRECTORY
- csidl = CSIDL_COMMON_DESKTOPDIRECTORY;
- alt_csidl = CSIDL_DESKTOP;
-+ #else
-+ csidl = CSIDL_DESKTOP;
-+ #endif
- }
- else if (strncmp(shell_folder_name, "Programs", 8) == 0)
- {
- pcsidl = &programs_csidl;
-+ #ifdef CSIDL_COMMON_PROGRAMS
- csidl = CSIDL_COMMON_PROGRAMS;
- alt_csidl = CSIDL_PROGRAMS;
-+ #else
-+ csidl = CSIDL_PROGRAMS;
-+ #endif
- }
- else
- {
-*** ../vim-6.2.531/src/fileio.c Sat May 1 21:04:31 2004
---- src/fileio.c Wed May 5 14:36:19 2004
-***************
-*** 1357,1385 ****
- int needed;
- char_u *p;
- int u8c;
-- int l, len;
-
- /*
- * 1. find out how many ucs-2 characters there are.
- */
- if (FIO_GET_CP(fio_flags) == CP_UTF8)
- {
- /* Handle CP_UTF8 ourselves to be able to handle trailing
- * bytes properly. First find out the number of
- * characters and check for trailing bytes. */
- needed = 0;
- p = ptr;
-! for (len = from_size; len > 0; len -= l)
- {
-! l = utf_ptr2len_check_len(p, len);
-! if (l > len) /* incomplete char */
- {
- if (l > CONV_RESTLEN)
- /* weird overlong byte sequence */
- goto rewind_retry;
-! mch_memmove(conv_rest, p, len);
-! conv_restlen = len;
-! from_size -= len;
- break;
- }
- if (l == 1 && *p >= 0x80) /* illegal byte */
---- 1357,1387 ----
- int needed;
- char_u *p;
- int u8c;
-
- /*
- * 1. find out how many ucs-2 characters there are.
- */
-+ # ifdef CP_UTF8 /* VC 4.1 doesn't define CP_UTF8 */
- if (FIO_GET_CP(fio_flags) == CP_UTF8)
- {
-+ int l, flen;
-+
- /* Handle CP_UTF8 ourselves to be able to handle trailing
- * bytes properly. First find out the number of
- * characters and check for trailing bytes. */
- needed = 0;
- p = ptr;
-! for (flen = from_size; flen > 0; flen -= l)
- {
-! l = utf_ptr2len_check_len(p, flen);
-! if (l > flen) /* incomplete char */
- {
- if (l > CONV_RESTLEN)
- /* weird overlong byte sequence */
- goto rewind_retry;
-! mch_memmove(conv_rest, p, flen);
-! conv_restlen = flen;
-! from_size -= flen;
- break;
- }
- if (l == 1 && *p >= 0x80) /* illegal byte */
-***************
-*** 1389,1394 ****
---- 1391,1397 ----
- }
- }
- else
-+ # endif
- {
- /* We can't tell if the last byte of an MBCS string is
- * valid and MultiByteToWideChar() returns zero if it
-***************
-*** 1425,1438 ****
- if (ucsp < ptr + size)
- goto rewind_retry;
-
- if (FIO_GET_CP(fio_flags) == CP_UTF8)
- {
- /* Convert from utf-8 to ucs-2. */
- needed = 0;
- p = ptr;
-! for (len = from_size; len > 0; len -= l)
- {
-! l = utf_ptr2len_check_len(p, len);
- u8c = utf_ptr2char(p);
- ucsp[needed * 2] = (u8c & 0xff);
- ucsp[needed * 2 + 1] = (u8c >> 8);
---- 1428,1444 ----
- if (ucsp < ptr + size)
- goto rewind_retry;
-
-+ # ifdef CP_UTF8 /* VC 4.1 doesn't define CP_UTF8 */
- if (FIO_GET_CP(fio_flags) == CP_UTF8)
- {
-+ int l, flen;
-+
- /* Convert from utf-8 to ucs-2. */
- needed = 0;
- p = ptr;
-! for (flen = from_size; flen > 0; flen -= l)
- {
-! l = utf_ptr2len_check_len(p, flen);
- u8c = utf_ptr2char(p);
- ucsp[needed * 2] = (u8c & 0xff);
- ucsp[needed * 2 + 1] = (u8c >> 8);
-***************
-*** 1441,1446 ****
---- 1447,1453 ----
- }
- }
- else
-+ # endif
- needed = MultiByteToWideChar(FIO_GET_CP(fio_flags),
- MB_ERR_INVALID_CHARS, (LPCSTR)ptr,
- from_size, (LPWSTR)ucsp, needed);
-***************
-*** 4705,4710 ****
---- 4712,4718 ----
-
- fromlen = to - ip->bw_conv_buf;
- buf = to;
-+ # ifdef CP_UTF8 /* VC 4.1 doesn't define CP_UTF8 */
- if (FIO_GET_CP(flags) == CP_UTF8)
- {
- /* Convert from UCS-2 to UTF-8, using the remainder of the
-***************
-*** 4723,4728 ****
---- 4731,4737 ----
- len = to - buf;
- }
- else
-+ #endif
- {
- /* Convert from UCS-2 to the codepage, using the remainder of
- * the conversion buffer. If the conversion uses the default
-***************
-*** 5064,5072 ****
---- 5073,5083 ----
- cp = encname2codepage(ptr);
- if (cp == 0)
- {
-+ # ifdef CP_UTF8 /* VC 4.1 doesn't define CP_UTF8 */
- if (STRCMP(ptr, "utf-8") == 0)
- cp = CP_UTF8;
- else
-+ # endif
- return 0;
- }
- return FIO_PUT_CP(cp) | FIO_CODEPAGE;
-*** ../vim-6.2.531/src/version.c Wed May 5 12:38:40 2004
---- src/version.c Wed May 5 14:45:21 2004
-***************
-*** 643,644 ****
---- 643,646 ----
- { /* Add new patch number below this line */
-+ /**/
-+ 532,
- /**/
-
---
-An actual excerpt from a classified section of a city newspaper:
-"Illiterate? Write today for free help!"
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
-/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
-\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///