From 3d12e8b154ff7c3dcbfbfe713cb623394c45b330 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 17 Feb 2010 03:25:23 +0000 Subject: [PATCH 0001/3803] Initialize branch F-13 for vim --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 00000000..baa94ef2 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-13 From c95e329784bc7c4aca00751bb58d87c5c79b7536 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 18 Feb 2010 14:12:03 +0000 Subject: [PATCH 0002/3803] - patchlevel 360 --- 7.2.360 | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 7.2.360 diff --git a/7.2.360 b/7.2.360 new file mode 100644 index 00000000..7cf46205 --- /dev/null +++ b/7.2.360 @@ -0,0 +1,96 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.360 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.360 +Problem: Ruby on MS-Windows: can't use sockets. +Solution: Call NtInitialize() during initialization. (Ariya Mizutani) +Files: src/if_ruby.c + + +*** ../vim-7.2.359/src/if_ruby.c 2009-05-22 18:20:23.000000000 +0200 +--- src/if_ruby.c 2010-02-17 15:04:00.000000000 +0100 +*************** +*** 48,53 **** +--- 48,58 ---- + # endif + #endif + ++ /* suggested by Ariya Mizutani */ ++ #if (_MSC_VER == 1200) ++ # undef _WIN32_WINNT ++ #endif ++ + #include + + #undef EXTERN +*************** +*** 132,137 **** +--- 137,143 ---- + #define ruby_errinfo (*dll_ruby_errinfo) + #define ruby_init dll_ruby_init + #define ruby_init_loadpath dll_ruby_init_loadpath ++ #define NtInitialize dll_NtInitialize + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + # define rb_w32_snprintf dll_rb_w32_snprintf + #endif +*************** +*** 186,191 **** +--- 192,198 ---- + static VALUE *dll_ruby_errinfo; + static void (*dll_ruby_init) (void); + static void (*dll_ruby_init_loadpath) (void); ++ static void (*dll_NtInitialize) (int*, char***); + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...); + #endif +*************** +*** 248,253 **** +--- 255,261 ---- + {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo}, + {"ruby_init", (RUBY_PROC*)&dll_ruby_init}, + {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath}, ++ {"NtInitialize", (RUBY_PROC*)&dll_NtInitialize}, + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf}, + #endif +*************** +*** 414,419 **** +--- 422,433 ---- + if (ruby_enabled(TRUE)) + { + #endif ++ #ifdef _WIN32 ++ /* suggested by Ariya Mizutani */ ++ int argc = 1; ++ char *argv[] = {"gvim.exe"}; ++ NtInitialize(&argc, &argv); ++ #endif + ruby_init(); + ruby_init_loadpath(); + ruby_io_init(); +*** ../vim-7.2.359/src/version.c 2010-02-11 18:54:38.000000000 +0100 +--- src/version.c 2010-02-17 15:10:22.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 360, + /**/ + +-- +"After a few years of marriage a man can look right at a woman +without seeing her and a woman can see right through a man +without looking at him." + - Helen Rowland + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From bb6a72a64689f28cfe4a9d01594653c9116152f7 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 18 Feb 2010 14:12:16 +0000 Subject: [PATCH 0003/3803] - patchlevel 361 --- 7.2.361 | 763 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 763 insertions(+) create mode 100644 7.2.361 diff --git a/7.2.361 b/7.2.361 new file mode 100644 index 00000000..ddc58579 --- /dev/null +++ b/7.2.361 @@ -0,0 +1,763 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.361 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.361 +Problem: Ruby 1.9 is not supported. +Solution: Add Ruby 1.9 support. (Msaki Suketa) +Files: src/Makefile, src/auto/configure, src/configure.in, src/if_ruby.c + + +*** ../vim-7.2.360/src/Makefile 2010-02-17 15:12:22.000000000 +0100 +--- src/Makefile 2010-02-17 16:21:01.000000000 +0100 +*************** +*** 395,401 **** + + # RUBY + # Uncomment this when you want to include the Ruby interface. +! #CONF_OPT_RUBY = --enable-rubyinterp + + # MZSCHEME + # Uncomment this when you want to include the MzScheme interface. +--- 395,403 ---- + + # RUBY + # Uncomment this when you want to include the Ruby interface. +! # Note: you need the development package (e.g., ruby1.9.1-dev on Ubuntu). +! # CONF_OPT_RUBY = --enable-rubyinterp +! # CONF_OPT_RUBY = --enable-rubyinterp --with-ruby-command=ruby1.9.1 + + # MZSCHEME + # Uncomment this when you want to include the MzScheme interface. +*** ../vim-7.2.360/src/auto/configure 2009-12-16 17:14:08.000000000 +0100 +--- src/auto/configure 2010-02-17 16:08:59.000000000 +0100 +*************** +*** 793,798 **** +--- 793,799 ---- + enable_tclinterp + with_tclsh + enable_rubyinterp ++ with_ruby_command + enable_cscope + enable_workshop + enable_netbeans +*************** +*** 1503,1508 **** +--- 1504,1510 ---- + --with-plthome=PLTHOME Use PLTHOME. + --with-python-config-dir=PATH Python's config directory + --with-tclsh=PATH which tclsh to use (default: tclsh8.0) ++ --with-ruby-command=RUBY name of the Ruby command (default: ruby) + --with-x use the X Window System + --with-gtk-prefix=PFX Prefix where GTK is installed (optional) + --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) +*************** +*** 5703,5711 **** + { $as_echo "$as_me:$LINENO: result: $enable_rubyinterp" >&5 + $as_echo "$enable_rubyinterp" >&6; } + if test "$enable_rubyinterp" = "yes"; then + +! # Extract the first word of "ruby", so it can be a program name with args. +! set dummy ruby; ac_word=$2 + { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_path_vi_cv_path_ruby+set}" = set; then +--- 5705,5725 ---- + { $as_echo "$as_me:$LINENO: result: $enable_rubyinterp" >&5 + $as_echo "$enable_rubyinterp" >&6; } + if test "$enable_rubyinterp" = "yes"; then ++ { $as_echo "$as_me:$LINENO: checking --with-ruby-command argument" >&5 ++ $as_echo_n "checking --with-ruby-command argument... " >&6; } + +! # Check whether --with-ruby-command was given. +! if test "${with_ruby_command+set}" = set; then +! withval=$with_ruby_command; RUBY_CMD="$withval"; { $as_echo "$as_me:$LINENO: result: $RUBY_CMD" >&5 +! $as_echo "$RUBY_CMD" >&6; } +! else +! RUBY_CMD="ruby"; { $as_echo "$as_me:$LINENO: result: defaulting to $RUBY_CMD" >&5 +! $as_echo "defaulting to $RUBY_CMD" >&6; } +! fi +! +! +! # Extract the first word of "$RUBY_CMD", so it can be a program name with args. +! set dummy $RUBY_CMD; ac_word=$2 + { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_path_vi_cv_path_ruby+set}" = set; then +*************** +*** 5752,5762 **** + $as_echo "OK" >&6; } + { $as_echo "$as_me:$LINENO: checking Ruby header files" >&5 + $as_echo_n "checking Ruby header files... " >&6; } +! rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null` + if test "X$rubyhdrdir" != "X"; then + { $as_echo "$as_me:$LINENO: result: $rubyhdrdir" >&5 + $as_echo "$rubyhdrdir" >&6; } + RUBY_CFLAGS="-I$rubyhdrdir" + rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'` + if test "X$rubylibs" != "X"; then + RUBY_LIBS="$rubylibs" +--- 5766,5782 ---- + $as_echo "OK" >&6; } + { $as_echo "$as_me:$LINENO: checking Ruby header files" >&5 + $as_echo_n "checking Ruby header files... " >&6; } +! rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["rubyhdrdir"] || Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null` + if test "X$rubyhdrdir" != "X"; then + { $as_echo "$as_me:$LINENO: result: $rubyhdrdir" >&5 + $as_echo "$rubyhdrdir" >&6; } + RUBY_CFLAGS="-I$rubyhdrdir" ++ rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["arch"]'` ++ if test -d "$rubyhdrdir/$rubyarch"; then ++ RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch" ++ fi ++ rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["ruby_version"].gsub(/\./, "")[0,2]'` ++ RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion" + rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'` + if test "X$rubylibs" != "X"; then + RUBY_LIBS="$rubylibs" +*************** +*** 5793,5800 **** + _ACEOF + + else +! { $as_echo "$as_me:$LINENO: result: not found" >&5 +! $as_echo "not found" >&6; } + fi + else + { $as_echo "$as_me:$LINENO: result: too old; need Ruby version 1.6.0 or later" >&5 +--- 5813,5820 ---- + _ACEOF + + else +! { $as_echo "$as_me:$LINENO: result: not found; disabling Ruby" >&5 +! $as_echo "not found; disabling Ruby" >&6; } + fi + else + { $as_echo "$as_me:$LINENO: result: too old; need Ruby version 1.6.0 or later" >&5 +*** ../vim-7.2.360/src/configure.in 2009-12-16 17:14:08.000000000 +0100 +--- src/configure.in 2010-02-17 16:00:58.000000000 +0100 +*************** +*** 949,965 **** + [enable_rubyinterp="no"]) + AC_MSG_RESULT($enable_rubyinterp) + if test "$enable_rubyinterp" = "yes"; then + AC_SUBST(vi_cv_path_ruby) +! AC_PATH_PROG(vi_cv_path_ruby, ruby) + if test "X$vi_cv_path_ruby" != "X"; then + AC_MSG_CHECKING(Ruby version) + if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then + AC_MSG_RESULT(OK) + AC_MSG_CHECKING(Ruby header files) +! rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null` + if test "X$rubyhdrdir" != "X"; then + AC_MSG_RESULT($rubyhdrdir) + RUBY_CFLAGS="-I$rubyhdrdir" + rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'` + if test "X$rubylibs" != "X"; then + RUBY_LIBS="$rubylibs" +--- 949,975 ---- + [enable_rubyinterp="no"]) + AC_MSG_RESULT($enable_rubyinterp) + if test "$enable_rubyinterp" = "yes"; then ++ AC_MSG_CHECKING(--with-ruby-command argument) ++ AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)], ++ RUBY_CMD="$withval"; AC_MSG_RESULT($RUBY_CMD), ++ RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD)) + AC_SUBST(vi_cv_path_ruby) +! AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD) + if test "X$vi_cv_path_ruby" != "X"; then + AC_MSG_CHECKING(Ruby version) + if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then + AC_MSG_RESULT(OK) + AC_MSG_CHECKING(Ruby header files) +! rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG[["rubyhdrdir"]] || Config::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null` + if test "X$rubyhdrdir" != "X"; then + AC_MSG_RESULT($rubyhdrdir) + RUBY_CFLAGS="-I$rubyhdrdir" ++ rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["arch"]]'` ++ if test -d "$rubyhdrdir/$rubyarch"; then ++ RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch" ++ fi ++ rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["ruby_version"]].gsub(/\./, "")[[0,2]]'` ++ RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion" + rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'` + if test "X$rubylibs" != "X"; then + RUBY_LIBS="$rubylibs" +*************** +*** 997,1003 **** + RUBY_PRO="if_ruby.pro" + AC_DEFINE(FEAT_RUBY) + else +! AC_MSG_RESULT(not found, disabling Ruby) + fi + else + AC_MSG_RESULT(too old; need Ruby version 1.6.0 or later) +--- 1007,1013 ---- + RUBY_PRO="if_ruby.pro" + AC_DEFINE(FEAT_RUBY) + else +! AC_MSG_RESULT(not found; disabling Ruby) + fi + else + AC_MSG_RESULT(too old; need Ruby version 1.6.0 or later) +*** ../vim-7.2.360/src/if_ruby.c 2010-02-17 15:11:35.000000000 +0100 +--- src/if_ruby.c 2010-02-17 16:08:47.000000000 +0100 +*************** +*** 54,59 **** +--- 54,62 ---- + #endif + + #include ++ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 ++ # include ++ #endif + + #undef EXTERN + #undef _ +*************** +*** 65,70 **** +--- 68,95 ---- + # define __OPENTRANSPORTPROVIDERS__ + #endif + ++ /* ++ * Backward compatiblity for Ruby 1.8 and earlier. ++ * Ruby 1.9 does not provide STR2CSTR, instead StringValuePtr is provided. ++ * Ruby 1.9 does not provide RXXX(s)->len and RXXX(s)->ptr, instead ++ * RXXX_LEN(s) and RXXX_PTR(s) are provided. ++ */ ++ #ifndef StringValuePtr ++ # define StringValuePtr(s) STR2CSTR(s) ++ #endif ++ #ifndef RARRAY_LEN ++ # define RARRAY_LEN(s) RARRAY(s)->len ++ #endif ++ #ifndef RARRAY_PTR ++ # define RARRAY_PTR(s) RARRAY(s)->ptr ++ #endif ++ #ifndef RSTRING_LEN ++ # define RSTRING_LEN(s) RSTRING(s)->len ++ #endif ++ #ifndef RSTRING_PTR ++ # define RSTRING_PTR(s) RSTRING(s)->ptr ++ #endif ++ + #include "vim.h" + #include "version.h" + +*************** +*** 134,140 **** + #define rb_str_concat dll_rb_str_concat + #define rb_str_new dll_rb_str_new + #define rb_str_new2 dll_rb_str_new2 +! #define ruby_errinfo (*dll_ruby_errinfo) + #define ruby_init dll_ruby_init + #define ruby_init_loadpath dll_ruby_init_loadpath + #define NtInitialize dll_NtInitialize +--- 159,169 ---- + #define rb_str_concat dll_rb_str_concat + #define rb_str_new dll_rb_str_new + #define rb_str_new2 dll_rb_str_new2 +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 +! # define rb_errinfo dll_rb_errinfo +! #else +! # define ruby_errinfo (*dll_ruby_errinfo) +! #endif + #define ruby_init dll_ruby_init + #define ruby_init_loadpath dll_ruby_init_loadpath + #define NtInitialize dll_NtInitialize +*************** +*** 142,147 **** +--- 171,184 ---- + # define rb_w32_snprintf dll_rb_w32_snprintf + #endif + ++ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 ++ # define ruby_script dll_ruby_script ++ # define rb_enc_find_index dll_rb_enc_find_index ++ # define rb_enc_find dll_rb_enc_find ++ # define rb_enc_str_new dll_rb_enc_str_new ++ # define rb_sprintf dll_rb_sprintf ++ #endif ++ + /* + * Pointers for dynamic link + */ +*************** +*** 189,195 **** +--- 226,236 ---- + static VALUE (*dll_rb_str_concat) (VALUE, VALUE); + static VALUE (*dll_rb_str_new) (const char*, long); + static VALUE (*dll_rb_str_new2) (const char*); ++ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 ++ static VALUE (*dll_rb_errinfo) (void); ++ #else + static VALUE *dll_ruby_errinfo; ++ #endif + static void (*dll_ruby_init) (void); + static void (*dll_ruby_init_loadpath) (void); + static void (*dll_NtInitialize) (int*, char***); +*************** +*** 197,202 **** +--- 238,251 ---- + static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...); + #endif + ++ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 ++ static void (*dll_ruby_script) (const char*); ++ static int (*dll_rb_enc_find_index) (const char*); ++ static rb_encoding* (*dll_rb_enc_find) (const char*); ++ static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*); ++ static VALUE (*dll_rb_sprintf) (const char*, ...); ++ #endif ++ + static HINSTANCE hinstRuby = 0; /* Instance of ruby.dll */ + + /* +*************** +*** 252,264 **** +--- 301,324 ---- + {"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat}, + {"rb_str_new", (RUBY_PROC*)&dll_rb_str_new}, + {"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2}, ++ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 ++ {"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo}, ++ #else + {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo}, ++ #endif + {"ruby_init", (RUBY_PROC*)&dll_ruby_init}, + {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath}, + {"NtInitialize", (RUBY_PROC*)&dll_NtInitialize}, + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf}, + #endif ++ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 ++ {"ruby_script", (RUBY_PROC*)&dll_ruby_script}, ++ {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, ++ {"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find}, ++ {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new}, ++ {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf}, ++ #endif + {"", NULL}, + }; + +*************** +*** 348,353 **** +--- 408,465 ---- + vim_free(script); + } + ++ /* ++ * In Ruby 1.9 or later, ruby String object has encoding. ++ * conversion buffer string of vim to ruby String object using ++ * VIM encoding option. ++ */ ++ static VALUE ++ vim_str2rb_enc_str(const char *s) ++ { ++ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 ++ int isnum; ++ long lval; ++ char_u *sval; ++ rb_encoding *enc; ++ ++ isnum = get_option_value((char_u *)"enc", &lval, &sval, 0); ++ if (isnum == 0) ++ { ++ enc = rb_enc_find((char *)sval); ++ vim_free(sval); ++ if (enc) { ++ return rb_enc_str_new(s, strlen(s), enc); ++ } ++ } ++ #endif ++ return rb_str_new2(s); ++ } ++ ++ static VALUE ++ eval_enc_string_protect(const char *str, int *state) ++ { ++ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 ++ int isnum; ++ long lval; ++ char_u *sval; ++ rb_encoding *enc; ++ VALUE v; ++ ++ isnum = get_option_value((char_u *)"enc", &lval, &sval, 0); ++ if (isnum == 0) ++ { ++ enc = rb_enc_find((char *)sval); ++ vim_free(sval); ++ if (enc) ++ { ++ v = rb_sprintf("#-*- coding:%s -*-\n%s", rb_enc_name(enc), str); ++ return rb_eval_string_protect(StringValuePtr(v), state); ++ } ++ } ++ #endif ++ return rb_eval_string_protect(str, state); ++ } ++ + void ex_rubydo(exarg_T *eap) + { + int state; +*************** +*** 360,368 **** + for (i = eap->line1; i <= eap->line2; i++) { + VALUE line, oldline; + +! line = oldline = rb_str_new2((char *)ml_get(i)); + rb_lastline_set(line); +! rb_eval_string_protect((char *) eap->arg, &state); + if (state) { + error_print(state); + break; +--- 472,480 ---- + for (i = eap->line1; i <= eap->line2; i++) { + VALUE line, oldline; + +! line = oldline = vim_str2rb_enc_str((char *)ml_get(i)); + rb_lastline_set(line); +! eval_enc_string_protect((char *) eap->arg, &state); + if (state) { + error_print(state); + break; +*************** +*** 373,379 **** + EMSG(_("E265: $_ must be an instance of String")); + return; + } +! ml_replace(i, (char_u *) STR2CSTR(line), 1); + changed(); + #ifdef SYNTAX_HL + syn_changed(i); /* recompute syntax hl. for this line */ +--- 485,491 ---- + EMSG(_("E265: $_ must be an instance of String")); + return; + } +! ml_replace(i, (char_u *) StringValuePtr(line), 1); + changed(); + #ifdef SYNTAX_HL + syn_changed(i); /* recompute syntax hl. for this line */ +*************** +*** 428,436 **** +--- 540,557 ---- + char *argv[] = {"gvim.exe"}; + NtInitialize(&argc, &argv); + #endif ++ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 ++ RUBY_INIT_STACK; ++ #endif + ruby_init(); ++ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 ++ ruby_script("vim-ruby"); ++ #endif + ruby_init_loadpath(); + ruby_io_init(); ++ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 ++ rb_enc_find_index("encdb"); ++ #endif + ruby_vim_init(); + ruby_initialized = 1; + #ifdef DYNAMIC_RUBY +*************** +*** 448,455 **** +--- 569,578 ---- + static void error_print(int state) + { + #ifndef DYNAMIC_RUBY ++ #if !(defined(RUBY_VERSION) && RUBY_VERSION >= 19) + RUBYEXTERN VALUE ruby_errinfo; + #endif ++ #endif + VALUE eclass; + VALUE einfo; + char buff[BUFSIZ]; +*************** +*** 482,490 **** + break; + case TAG_RAISE: + case TAG_FATAL: + eclass = CLASS_OF(ruby_errinfo); + einfo = rb_obj_as_string(ruby_errinfo); +! if (eclass == rb_eRuntimeError && RSTRING(einfo)->len == 0) { + EMSG(_("E272: unhandled exception")); + } + else { +--- 605,618 ---- + break; + case TAG_RAISE: + case TAG_FATAL: ++ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 ++ eclass = CLASS_OF(rb_errinfo()); ++ einfo = rb_obj_as_string(rb_errinfo()); ++ #else + eclass = CLASS_OF(ruby_errinfo); + einfo = rb_obj_as_string(ruby_errinfo); +! #endif +! if (eclass == rb_eRuntimeError && RSTRING_LEN(einfo) == 0) { + EMSG(_("E272: unhandled exception")); + } + else { +*************** +*** 493,499 **** + + epath = rb_class_path(eclass); + vim_snprintf(buff, BUFSIZ, "%s: %s", +! RSTRING(epath)->ptr, RSTRING(einfo)->ptr); + p = strchr(buff, '\n'); + if (p) *p = '\0'; + EMSG(buff); +--- 621,627 ---- + + epath = rb_class_path(eclass); + vim_snprintf(buff, BUFSIZ, "%s: %s", +! RSTRING_PTR(epath), RSTRING_PTR(einfo)); + p = strchr(buff, '\n'); + if (p) *p = '\0'; + EMSG(buff); +*************** +*** 511,518 **** + char *buff, *p; + + str = rb_obj_as_string(str); +! buff = ALLOCA_N(char, RSTRING(str)->len); +! strcpy(buff, RSTRING(str)->ptr); + p = strchr(buff, '\n'); + if (p) *p = '\0'; + MSG(buff); +--- 639,646 ---- + char *buff, *p; + + str = rb_obj_as_string(str); +! buff = ALLOCA_N(char, RSTRING_LEN(str)); +! strcpy(buff, RSTRING_PTR(str)); + p = strchr(buff, '\n'); + if (p) *p = '\0'; + MSG(buff); +*************** +*** 521,541 **** + + static VALUE vim_set_option(VALUE self UNUSED, VALUE str) + { +! do_set((char_u *)STR2CSTR(str), 0); + update_screen(NOT_VALID); + return Qnil; + } + + static VALUE vim_command(VALUE self UNUSED, VALUE str) + { +! do_cmdline_cmd((char_u *)STR2CSTR(str)); + return Qnil; + } + + static VALUE vim_evaluate(VALUE self UNUSED, VALUE str) + { + #ifdef FEAT_EVAL +! char_u *value = eval_to_string((char_u *)STR2CSTR(str), NULL, TRUE); + + if (value != NULL) + { +--- 649,669 ---- + + static VALUE vim_set_option(VALUE self UNUSED, VALUE str) + { +! do_set((char_u *)StringValuePtr(str), 0); + update_screen(NOT_VALID); + return Qnil; + } + + static VALUE vim_command(VALUE self UNUSED, VALUE str) + { +! do_cmdline_cmd((char_u *)StringValuePtr(str)); + return Qnil; + } + + static VALUE vim_evaluate(VALUE self UNUSED, VALUE str) + { + #ifdef FEAT_EVAL +! char_u *value = eval_to_string((char_u *)StringValuePtr(str), NULL, TRUE); + + if (value != NULL) + { +*************** +*** 640,648 **** + if (n > 0 && n <= buf->b_ml.ml_line_count) + { + char *line = (char *)ml_get_buf(buf, n, FALSE); +! return line ? rb_str_new2(line) : Qnil; + } +! rb_raise(rb_eIndexError, "index %d out of buffer", n); + #ifndef __GNUC__ + return Qnil; /* For stop warning */ + #endif +--- 768,776 ---- + if (n > 0 && n <= buf->b_ml.ml_line_count) + { + char *line = (char *)ml_get_buf(buf, n, FALSE); +! return line ? vim_str2rb_enc_str(line) : Qnil; + } +! rb_raise(rb_eIndexError, "line number %ld out of range", (long)n); + #ifndef __GNUC__ + return Qnil; /* For stop warning */ + #endif +*************** +*** 659,665 **** + + static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str) + { +! char *line = STR2CSTR(str); + aco_save_T aco; + + if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) +--- 787,793 ---- + + static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str) + { +! char *line = StringValuePtr(str); + aco_save_T aco; + + if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) +*************** +*** 683,689 **** + } + else + { +! rb_raise(rb_eIndexError, "index %d out of buffer", n); + #ifndef __GNUC__ + return Qnil; /* For stop warning */ + #endif +--- 811,817 ---- + } + else + { +! rb_raise(rb_eIndexError, "line number %ld out of range", (long)n); + #ifndef __GNUC__ + return Qnil; /* For stop warning */ + #endif +*************** +*** 729,735 **** + } + else + { +! rb_raise(rb_eIndexError, "index %d out of buffer", n); + } + return Qnil; + } +--- 857,863 ---- + } + else + { +! rb_raise(rb_eIndexError, "line number %ld out of range", n); + } + return Qnil; + } +*************** +*** 737,747 **** + static VALUE buffer_append(VALUE self, VALUE num, VALUE str) + { + buf_T *buf = get_buf(self); +! char *line = STR2CSTR(str); + long n = NUM2LONG(num); + aco_save_T aco; + +! if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL) + { + /* set curwin/curbuf for "buf" and save some things */ + aucmd_prepbuf(&aco, buf); +--- 865,878 ---- + static VALUE buffer_append(VALUE self, VALUE num, VALUE str) + { + buf_T *buf = get_buf(self); +! char *line = StringValuePtr(str); + long n = NUM2LONG(num); + aco_save_T aco; + +! if (line != NULL) { +! rb_raise(rb_eIndexError, "NULL line"); +! } +! else if (n >= 0 && n <= buf->b_ml.ml_line_count) + { + /* set curwin/curbuf for "buf" and save some things */ + aucmd_prepbuf(&aco, buf); +*************** +*** 763,769 **** + update_curbuf(NOT_VALID); + } + else { +! rb_raise(rb_eIndexError, "index %d out of buffer", n); + } + return str; + } +--- 894,900 ---- + update_curbuf(NOT_VALID); + } + else { +! rb_raise(rb_eIndexError, "line number %ld out of range", n); + } + return str; + } +*************** +*** 904,913 **** + win_T *win = get_win(self); + + Check_Type(pos, T_ARRAY); +! if (RARRAY(pos)->len != 2) + rb_raise(rb_eArgError, "array length must be 2"); +! lnum = RARRAY(pos)->ptr[0]; +! col = RARRAY(pos)->ptr[1]; + win->w_cursor.lnum = NUM2LONG(lnum); + win->w_cursor.col = NUM2UINT(col); + check_cursor(); /* put cursor on an existing line */ +--- 1035,1044 ---- + win_T *win = get_win(self); + + Check_Type(pos, T_ARRAY); +! if (RARRAY_LEN(pos) != 2) + rb_raise(rb_eArgError, "array length must be 2"); +! lnum = RARRAY_PTR(pos)[0]; +! col = RARRAY_PTR(pos)[1]; + win->w_cursor.lnum = NUM2LONG(lnum); + win->w_cursor.col = NUM2UINT(col); + check_cursor(); /* put cursor on an existing line */ +*************** +*** 924,930 **** + if (i > 0) rb_str_cat(str, ", ", 2); + rb_str_concat(str, rb_inspect(argv[i])); + } +! MSG(RSTRING(str)->ptr); + return Qnil; + } + +--- 1055,1061 ---- + if (i > 0) rb_str_cat(str, ", ", 2); + rb_str_concat(str, rb_inspect(argv[i])); + } +! MSG(RSTRING_PTR(str)); + return Qnil; + } + +*** ../vim-7.2.360/src/version.c 2010-02-17 15:11:35.000000000 +0100 +--- src/version.c 2010-02-17 15:59:12.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 361, + /**/ + +-- +"Marriage is when a man and woman become as one; the trouble starts +when they try to decide which one" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 38615932de9e2d134d709a3d3d311da316a63cca Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 18 Feb 2010 14:12:29 +0000 Subject: [PATCH 0004/3803] - patchlevel 362 --- 7.2.362 | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 7.2.362 diff --git a/7.2.362 b/7.2.362 new file mode 100644 index 00000000..2f62cf62 --- /dev/null +++ b/7.2.362 @@ -0,0 +1,95 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.362 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.362 (extra, after 7.2.352) +Problem: Win64: Vim doesn't work when cross-compiled with MingW libraries. +Solution: Instead of handling WM_NCCREATE, create wide text area window + class if the parent window iw side. (Sergey Khorev) +Files: src/gui_w32.c, src/gui_w48.c + + +*** ../vim-7.2.361/src/gui_w32.c 2009-12-24 16:11:24.000000000 +0100 +--- src/gui_w32.c 2010-02-17 16:26:58.000000000 +0100 +*************** +*** 1329,1334 **** +--- 1329,1335 ---- + WNDCLASS wndclass; + #ifdef FEAT_MBYTE + const WCHAR szVimWndClassW[] = VIM_CLASSW; ++ const WCHAR szTextAreaClassW[] = L"VimTextArea"; + WNDCLASSW wndclassw; + #endif + #ifdef GLOBAL_IME +*************** +*** 1479,1484 **** +--- 1480,1507 ---- + #endif + + /* Create the text area window */ ++ #ifdef FEAT_MBYTE ++ if (wide_WindowProc) ++ { ++ if (GetClassInfoW(s_hinst, szTextAreaClassW, &wndclassw) == 0) ++ { ++ wndclassw.style = CS_OWNDC; ++ wndclassw.lpfnWndProc = _TextAreaWndProc; ++ wndclassw.cbClsExtra = 0; ++ wndclassw.cbWndExtra = 0; ++ wndclassw.hInstance = s_hinst; ++ wndclassw.hIcon = NULL; ++ wndclassw.hCursor = LoadCursor(NULL, IDC_ARROW); ++ wndclassw.hbrBackground = NULL; ++ wndclassw.lpszMenuName = NULL; ++ wndclassw.lpszClassName = szTextAreaClassW; ++ ++ if (RegisterClassW(&wndclassw) == 0) ++ return FAIL; ++ } ++ } ++ else ++ #endif + if (GetClassInfo(s_hinst, szTextAreaClass, &wndclass) == 0) + { + wndclass.style = CS_OWNDC; +*** ../vim-7.2.361/src/gui_w48.c 2010-02-03 12:23:16.000000000 +0100 +--- src/gui_w48.c 2010-02-17 16:27:21.000000000 +0100 +*************** +*** 1084,1096 **** + case WM_NOTIFY: Handle_WM_Notify(hwnd, (LPNMHDR)lParam); + return TRUE; + #endif +- /* Workaround for the problem that MyWindowProc() returns FALSE on 64 +- * bit windows when cross-compiled using Mingw libraries. (Andy +- * Kittner) */ +- case WM_NCCREATE: +- MyWindowProc(hwnd, uMsg, wParam, lParam); +- return TRUE; +- + default: + return MyWindowProc(hwnd, uMsg, wParam, lParam); + } +--- 1084,1089 ---- +*** ../vim-7.2.361/src/version.c 2010-02-17 16:23:03.000000000 +0100 +--- src/version.c 2010-02-17 16:30:52.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 362, + /**/ + +-- +"Marriage is the process of finding out what kind of man your wife +would have preferred" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From dcd767cfa5685996bfc46ab31365cb02ef3f6738 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 18 Feb 2010 14:12:41 +0000 Subject: [PATCH 0005/3803] - patchlevel 363 --- 7.2.363 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 7.2.363 diff --git a/7.2.363 b/7.2.363 new file mode 100644 index 00000000..2447103b --- /dev/null +++ b/7.2.363 @@ -0,0 +1,70 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.363 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.363 +Problem: Can't dynamically load Perl 5.10. +Solution: Add the function Perl_croak_xs_usage. (Sergey Khorev) +Files: src/if_perl.xs + + +*** ../vim-7.2.362/src/if_perl.xs 2009-11-11 14:45:36.000000000 +0100 +--- src/if_perl.xs 2010-02-17 16:33:16.000000000 +0100 +*************** +*** 93,98 **** +--- 93,101 ---- + # define perl_free dll_perl_free + # define Perl_get_context dll_Perl_get_context + # define Perl_croak dll_Perl_croak ++ # if (PERL_REVISION == 5) && (PERL_VERSION >= 10) ++ # define Perl_croak_xs_usage dll_Perl_croak_xs_usage ++ # endif + # ifndef PROTO + # define Perl_croak_nocontext dll_Perl_croak_nocontext + # define Perl_call_argv dll_Perl_call_argv +*************** +*** 202,207 **** +--- 205,213 ---- + static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**); + static void* (*Perl_get_context)(void); + static void (*Perl_croak)(pTHX_ const char*, ...); ++ #if (PERL_REVISION == 5) && (PERL_VERSION >= 10) ++ static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params); ++ #endif + static void (*Perl_croak_nocontext)(const char*, ...); + static I32 (*Perl_dowantarray)(pTHX); + static void (*Perl_free_tmps)(pTHX); +*************** +*** 306,311 **** +--- 312,320 ---- + {"perl_parse", (PERL_PROC*)&perl_parse}, + {"Perl_get_context", (PERL_PROC*)&Perl_get_context}, + {"Perl_croak", (PERL_PROC*)&Perl_croak}, ++ #if (PERL_REVISION == 5) && (PERL_VERSION >= 10) ++ {"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage}, ++ #endif + {"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext}, + {"Perl_dowantarray", (PERL_PROC*)&Perl_dowantarray}, + {"Perl_free_tmps", (PERL_PROC*)&Perl_free_tmps}, +*** ../vim-7.2.362/src/version.c 2010-02-17 16:31:27.000000000 +0100 +--- src/version.c 2010-02-17 16:35:39.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 363, + /**/ + +-- +If you're sending someone Styrofoam, what do you pack it in? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 25356bbee7a131abad7e85a9356ed9bb0ce7ed19 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 18 Feb 2010 14:12:53 +0000 Subject: [PATCH 0006/3803] - patchlevel 364 --- 7.2.364 | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 7.2.364 diff --git a/7.2.364 b/7.2.364 new file mode 100644 index 00000000..c3c6e8b6 --- /dev/null +++ b/7.2.364 @@ -0,0 +1,91 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.364 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.364 (extra) +Problem: Can't build gvimext.dll on Win 7 x64 using MinGW (John Marriott) +Solution: Check if _MSC_VER is defined. (Andy Kittner) +Files: src/GvimExt/gvimext.h + + +*** ../vim-7.2.363/src/GvimExt/gvimext.h 2006-04-24 21:23:03.000000000 +0200 +--- src/GvimExt/gvimext.h 2010-02-17 17:20:00.000000000 +0100 +*************** +*** 14,22 **** + #if !defined(AFX_STDAFX_H__3389658B_AD83_11D3_9C1E_0090278BBD99__INCLUDED_) + #define AFX_STDAFX_H__3389658B_AD83_11D3_9C1E_0090278BBD99__INCLUDED_ + +! #if _MSC_VER > 1000 + #pragma once +! #endif // _MSC_VER > 1000 + + // Insert your headers here + // #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +--- 14,22 ---- + #if !defined(AFX_STDAFX_H__3389658B_AD83_11D3_9C1E_0090278BBD99__INCLUDED_) + #define AFX_STDAFX_H__3389658B_AD83_11D3_9C1E_0090278BBD99__INCLUDED_ + +! #if defined(_MSC_VER) && _MSC_VER > 1000 + #pragma once +! #endif + + // Insert your headers here + // #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +*************** +*** 34,40 **** + #define INC_OLE2 // WIN32, get ole2 from windows.h + + /* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */ +! #if _MSC_VER >= 1400 + # define _CRT_SECURE_NO_DEPRECATE + # define _CRT_NONSTDC_NO_DEPRECATE + #endif +--- 34,40 ---- + #define INC_OLE2 // WIN32, get ole2 from windows.h + + /* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */ +! #if defined(_MSC_VER) && _MSC_VER >= 1400 + # define _CRT_SECURE_NO_DEPRECATE + # define _CRT_NONSTDC_NO_DEPRECATE + #endif +*************** +*** 44,50 **** + #include + + /* Accommodate old versions of VC that don't have a modern Platform SDK */ +! #if _MSC_VER < 1300 + # undef UINT_PTR + # define UINT_PTR UINT + #endif +--- 44,50 ---- + #include + + /* Accommodate old versions of VC that don't have a modern Platform SDK */ +! #if defined(_MSC_VER) && _MSC_VER < 1300 + # undef UINT_PTR + # define UINT_PTR UINT + #endif +*** ../vim-7.2.363/src/version.c 2010-02-17 16:40:47.000000000 +0100 +--- src/version.c 2010-02-17 17:23:15.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 364, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +245. You use Real Audio to listen to a radio station from a distant + city rather than turn on your stereo system. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 417e2681cc3facc5a9addd573254f4639ec1186a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 18 Feb 2010 14:13:05 +0000 Subject: [PATCH 0007/3803] - patchlevel 365 --- 7.2.365 | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 7.2.365 diff --git a/7.2.365 b/7.2.365 new file mode 100644 index 00000000..e48990b9 --- /dev/null +++ b/7.2.365 @@ -0,0 +1,71 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.365 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.365 (extra) +Problem: MS-Windows with MingW: "File->Save As" does not work. (John + Marriott) +Solution: Correctly fill in structure size. (Andy Kittner) +Files: src/gui_w48.c + + +*** ../vim-7.2.364/src/gui_w48.c 2010-02-17 16:31:27.000000000 +0100 +--- src/gui_w48.c 2010-02-17 17:30:15.000000000 +0100 +*************** +*** 3345,3351 **** + #ifdef OPENFILENAME_SIZE_VERSION_400 + /* be compatible with Windows NT 4.0 */ + /* TODO: what to use for OPENFILENAMEW??? */ +! fileStruct.lStructSize = sizeof(OPENFILENAME_SIZE_VERSION_400); + #else + fileStruct.lStructSize = sizeof(fileStruct); + #endif +--- 3345,3351 ---- + #ifdef OPENFILENAME_SIZE_VERSION_400 + /* be compatible with Windows NT 4.0 */ + /* TODO: what to use for OPENFILENAMEW??? */ +! fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400; + #else + fileStruct.lStructSize = sizeof(fileStruct); + #endif +*************** +*** 3506,3512 **** + memset(&fileStruct, 0, sizeof(OPENFILENAME)); + #ifdef OPENFILENAME_SIZE_VERSION_400 + /* be compatible with Windows NT 4.0 */ +! fileStruct.lStructSize = sizeof(OPENFILENAME_SIZE_VERSION_400); + #else + fileStruct.lStructSize = sizeof(fileStruct); + #endif +--- 3506,3512 ---- + memset(&fileStruct, 0, sizeof(OPENFILENAME)); + #ifdef OPENFILENAME_SIZE_VERSION_400 + /* be compatible with Windows NT 4.0 */ +! fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400; + #else + fileStruct.lStructSize = sizeof(fileStruct); + #endif +*** ../vim-7.2.364/src/version.c 2010-02-17 17:24:23.000000000 +0100 +--- src/version.c 2010-02-17 17:31:54.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 365, + /**/ + + +-- +hundred-and-one symptoms of being an internet addict: +246. You use up your free 100 hours in less than a week. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e34f3f4861b91c3a463f012f1b69f8482e0594fa Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 18 Feb 2010 14:13:17 +0000 Subject: [PATCH 0008/3803] - patchlevel 366 --- 7.2.366 | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 7.2.366 diff --git a/7.2.366 b/7.2.366 new file mode 100644 index 00000000..952a0f2f --- /dev/null +++ b/7.2.366 @@ -0,0 +1,134 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.366 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.366 +Problem: CTRL-B doesn't go back to the first line of the buffer. +Solution: Avoid an overflow when adding MAXCOL. +Files: src/move.c + + +*** ../vim-7.2.365/src/move.c 2010-02-03 17:42:59.000000000 +0100 +--- src/move.c 2010-02-17 17:49:34.000000000 +0100 +*************** +*** 1610,1616 **** + * Add one line above "lp->lnum". This can be a filler line, a closed fold or + * a (wrapped) text line. Uses and sets "lp->fill". + * Returns the height of the added line in "lp->height". +! * Lines above the first one are incredibly high. + */ + static void + topline_back(lp) +--- 1610,1616 ---- + * Add one line above "lp->lnum". This can be a filler line, a closed fold or + * a (wrapped) text line. Uses and sets "lp->fill". + * Returns the height of the added line in "lp->height". +! * Lines above the first one are incredibly high: MAXCOL. + */ + static void + topline_back(lp) +*************** +*** 1942,1948 **** + { + loff.lnum = curwin->w_topline; + topline_back(&loff); +! if (used + loff.height > curwin->w_height) + break; + used += loff.height; + #ifdef FEAT_DIFF +--- 1942,1948 ---- + { + loff.lnum = curwin->w_topline; + topline_back(&loff); +! if (loff.height == MAXCOL || used + loff.height > curwin->w_height) + break; + used += loff.height; + #ifdef FEAT_DIFF +*************** +*** 2021,2027 **** + + /* Add one line above */ + topline_back(&loff); +! used += loff.height; + if (used > curwin->w_height) + break; + if (loff.lnum >= curwin->w_botline +--- 2021,2030 ---- + + /* Add one line above */ + topline_back(&loff); +! if (loff.height == MAXCOL) +! used = MAXCOL; +! else +! used += loff.height; + if (used > curwin->w_height) + break; + if (loff.lnum >= curwin->w_botline +*************** +*** 2175,2181 **** + if (below > above) /* add a line above the cursor */ + { + topline_back(&loff); +! used += loff.height; + if (used > curwin->w_height) + break; + above += loff.height; +--- 2178,2187 ---- + if (below > above) /* add a line above the cursor */ + { + topline_back(&loff); +! if (loff.height == MAXCOL) +! used = MAXCOL; +! else +! used += loff.height; + if (used > curwin->w_height) + break; + above += loff.height; +*************** +*** 2472,2480 **** + while (n <= curwin->w_height && loff.lnum >= 1) + { + topline_back(&loff); +! n += loff.height; + } +! if (n <= curwin->w_height) /* at begin of file */ + { + curwin->w_topline = 1; + #ifdef FEAT_DIFF +--- 2478,2489 ---- + while (n <= curwin->w_height && loff.lnum >= 1) + { + topline_back(&loff); +! if (loff.height == MAXCOL) +! n = MAXCOL; +! else +! n += loff.height; + } +! if (loff.lnum < 1) /* at begin of file */ + { + curwin->w_topline = 1; + #ifdef FEAT_DIFF +*** ../vim-7.2.365/src/version.c 2010-02-17 17:34:38.000000000 +0100 +--- src/version.c 2010-02-17 18:13:22.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 366, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +247. You use www.switchboard.com instead of dialing 411 and 555-12-12 + for directory assistance. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ab65c6c9b5764dc850c98c6016ba505fcf8131e3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 18 Feb 2010 14:13:38 +0000 Subject: [PATCH 0009/3803] - patchlevel 367 --- 7.2.367 | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.patches | 8 ++++++ vim-update.sh | 2 +- vim.spec | 21 +++++++++++++- 4 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 7.2.367 diff --git a/7.2.367 b/7.2.367 new file mode 100644 index 00000000..6d461c98 --- /dev/null +++ b/7.2.367 @@ -0,0 +1,77 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.367 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.367 +Problem: "xxd -r -p" doesn't work as documented. +Solution: Skip white space. (James Vega) +Files: src/xxd/xxd.c + + +*** ../vim-7.2.366/src/xxd/xxd.c 2009-06-16 18:29:37.000000000 +0200 +--- src/xxd/xxd.c 2010-02-17 18:25:11.000000000 +0100 +*************** +*** 231,237 **** + fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname); + fprintf(stderr, "Options:\n"); + fprintf(stderr, " -a toggle autoskip: A single '*' replaces nul-lines. Default off.\n"); +! fprintf(stderr, " -b binary digit dump (incompatible with -p,-i,-r). Default hex.\n"); + fprintf(stderr, " -c cols format octets per line. Default 16 (-i: 12, -ps: 30).\n"); + fprintf(stderr, " -E show characters in EBCDIC. Default ASCII.\n"); + fprintf(stderr, " -g number of octets per group in normal output. Default 2.\n"); +--- 231,237 ---- + fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname); + fprintf(stderr, "Options:\n"); + fprintf(stderr, " -a toggle autoskip: A single '*' replaces nul-lines. Default off.\n"); +! fprintf(stderr, " -b binary digit dump (incompatible with -ps,-i,-r). Default hex.\n"); + fprintf(stderr, " -c cols format octets per line. Default 16 (-i: 12, -ps: 30).\n"); + fprintf(stderr, " -E show characters in EBCDIC. Default ASCII.\n"); + fprintf(stderr, " -g number of octets per group in normal output. Default 2.\n"); +*************** +*** 276,286 **** + if (c == '\r') /* Doze style input file? */ + continue; + +! #if 0 /* this doesn't work when there is normal text after the hex codes in +! the last line that looks like hex */ +! if (c == ' ' || c == '\n' || c == '\t') /* allow multiple spaces */ + continue; +- #endif + + n3 = n2; + n2 = n1; +--- 276,286 ---- + if (c == '\r') /* Doze style input file? */ + continue; + +! /* Allow multiple spaces. This doesn't work when there is normal text +! * after the hex codes in the last line that looks like hex, thus only +! * use it for PostScript format. */ +! if (hextype == HEX_POSTSCRIPT && (c == ' ' || c == '\n' || c == '\t')) + continue; + + n3 = n2; + n2 = n1; +*** ../vim-7.2.366/src/version.c 2010-02-17 18:20:23.000000000 +0100 +--- src/version.c 2010-02-17 18:26:35.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 367, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +248. You sign your letters with your e-mail address instead of your name. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/README.patches b/README.patches index baa5ca79..6ea4483e 100644 --- a/README.patches +++ b/README.patches @@ -390,3 +390,11 @@ Individual patches for Vim 7.2: 1565 7.2.357 CR displayed wrong when changing 'fileformat' from/to "mac" 2384 7.2.358 compiler warnings on VMS 1805 7.2.359 crash when using the Netbeans join command + 2839 7.2.360 Ruby on MS-Windows: can't use sockets + 23442 7.2.361 Ruby 1.9 is not supported + 2964 7.2.362 (extra, after 7.2.352) Win64 cross-compile problems + 2521 7.2.363 Perl 5.10 dynamic loading doesn't work + 2958 7.2.364 (extra) can't build gvimext.dll on Win 7 x64 using MinGW + 2390 7.2.365 (extra) MS-Windows with MingW: "File->Save As" does not work + 3802 7.2.366 CTRL-B doesn't go back to the first line of the buffer + 3236 7.2.367 "xxd -r -p" doesn't work as documented diff --git a/vim-update.sh b/vim-update.sh index c92ea254..30af1777 100755 --- a/vim-update.sh +++ b/vim-update.sh @@ -1,6 +1,6 @@ #!/bin/bash -cd $HOME/src/fedora/rpms/vim/devel/ +cd $HOME/src/fedora/rpms/vim/F-13/ LANG=C SPEC=vim.spec diff --git a/vim.spec b/vim.spec index 563f43cb..e4b66c34 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim72%{?beta} -%define patchlevel 359 +%define patchlevel 367 Summary: The VIM editor URL: http://www.vim.org/ @@ -425,6 +425,14 @@ Patch356: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.356 Patch357: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.357 Patch358: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.358 Patch359: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.359 +Patch360: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.360 +Patch361: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.361 +Patch362: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.362 +Patch363: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.363 +Patch364: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.364 +Patch365: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.365 +Patch366: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.366 +Patch367: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.367 Patch3000: vim-7.0-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -922,6 +930,14 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch357 -p0 %patch358 -p0 %patch359 -p0 +%patch360 -p0 +%patch361 -p0 +%patch362 -p0 +%patch363 -p0 +%patch364 -p0 +%patch365 -p0 +%patch366 -p0 +%patch367 -p0 # install spell files @@ -1386,6 +1402,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Thu Feb 18 2010 Karsten Hopp 7.2.367-1 +- patchlevel 367 + * Fri Feb 12 2010 Karsten Hopp 7.2.359-1 - patchlevel 359 From baa2d49331dea14f8554e235f54f1d88b88c9028 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 18 Feb 2010 15:09:33 +0000 Subject: [PATCH 0010/3803] - patchlevel 368 --- 7.2.368 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.patches | 1 + vim.spec | 7 ++++++- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 7.2.368 diff --git a/7.2.368 b/7.2.368 new file mode 100644 index 00000000..43107699 --- /dev/null +++ b/7.2.368 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.368 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.368 (after 7.2.361) +Problem: Ruby interface: Appending line doesn't work. (Michael Henry) +Solution: Reverse check for NULL line. (James Vega) +Files: src/if_ruby.c + + +*** ../vim-7.2.367/src/if_ruby.c 2010-02-17 16:23:03.000000000 +0100 +--- src/if_ruby.c 2010-02-18 15:47:42.000000000 +0100 +*************** +*** 869,875 **** + long n = NUM2LONG(num); + aco_save_T aco; + +! if (line != NULL) { + rb_raise(rb_eIndexError, "NULL line"); + } + else if (n >= 0 && n <= buf->b_ml.ml_line_count) +--- 869,875 ---- + long n = NUM2LONG(num); + aco_save_T aco; + +! if (line == NULL) { + rb_raise(rb_eIndexError, "NULL line"); + } + else if (n >= 0 && n <= buf->b_ml.ml_line_count) +*** ../vim-7.2.367/src/version.c 2010-02-17 18:28:06.000000000 +0100 +--- src/version.c 2010-02-18 15:48:09.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 368, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +251. You've never seen your closest friends who usually live WAY too far away. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/README.patches b/README.patches index 6ea4483e..0a75ab90 100644 --- a/README.patches +++ b/README.patches @@ -398,3 +398,4 @@ Individual patches for Vim 7.2: 2390 7.2.365 (extra) MS-Windows with MingW: "File->Save As" does not work 3802 7.2.366 CTRL-B doesn't go back to the first line of the buffer 3236 7.2.367 "xxd -r -p" doesn't work as documented + 1623 7.2.368 (after 7.2.361) append line with Ruby interface doesn't work diff --git a/vim.spec b/vim.spec index e4b66c34..79c662e4 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim72%{?beta} -%define patchlevel 367 +%define patchlevel 368 Summary: The VIM editor URL: http://www.vim.org/ @@ -433,6 +433,7 @@ Patch364: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.364 Patch365: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.365 Patch366: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.366 Patch367: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.367 +Patch368: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.368 Patch3000: vim-7.0-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -938,6 +939,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch365 -p0 %patch366 -p0 %patch367 -p0 +%patch368 -p0 # install spell files @@ -1402,6 +1404,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Thu Feb 18 2010 Karsten Hopp 7.2.368-1 +- patchlevel 368 + * Thu Feb 18 2010 Karsten Hopp 7.2.367-1 - patchlevel 367 From 1ac2c5d3146e519827025bb51bc12c20f6e3ccaf Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:07:28 +0000 Subject: [PATCH 0011/3803] - patchlevel 369 --- 7.2.369 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 7.2.369 diff --git a/7.2.369 b/7.2.369 new file mode 100644 index 00000000..adcab24e --- /dev/null +++ b/7.2.369 @@ -0,0 +1,55 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.369 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.369 +Problem: Error message is not easy to understand. +Solution: Add quotes. (SungHyun Nam) +Files: src/ex_cmds2.c + + +*** ../vim-7.2.368/src/ex_cmds2.c 2010-02-03 15:14:15.000000000 +0100 +--- src/ex_cmds2.c 2010-02-18 21:16:20.000000000 +0100 +*************** +*** 1092,1098 **** + set_vim_var_nr(VV_PROFILING, 1L); + } + else if (do_profiling == PROF_NONE) +! EMSG(_("E750: First use :profile start ")); + else if (STRCMP(eap->arg, "pause") == 0) + { + if (do_profiling == PROF_YES) +--- 1092,1098 ---- + set_vim_var_nr(VV_PROFILING, 1L); + } + else if (do_profiling == PROF_NONE) +! EMSG(_("E750: First use \":profile start {fname}\"")); + else if (STRCMP(eap->arg, "pause") == 0) + { + if (do_profiling == PROF_YES) +*** ../vim-7.2.368/src/version.c 2010-02-18 15:51:25.000000000 +0100 +--- src/version.c 2010-02-24 13:58:28.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 369, + /**/ + +-- +MAN: You don't frighten us, English pig-dog! Go and boil your bottoms, + son of a silly person. I blow my nose on you, so-called Arthur-king, + you and your silly English K...kaniggets. + He puts hands to his ears and blows a raspberry. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 2ce6b39110eb1ed0ca51d73bdf6986a3d6b2d8d4 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:07:42 +0000 Subject: [PATCH 0012/3803] - patchlevel 370 --- 7.2.370 | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 7.2.370 diff --git a/7.2.370 b/7.2.370 new file mode 100644 index 00000000..3e8457e0 --- /dev/null +++ b/7.2.370 @@ -0,0 +1,156 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.370 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.370 (after 7.2.356) +Problem: A redraw may cause folds to be closed. +Solution: Revert part of the previous patch. Add a test. (Lech Lorens) +Files: src/diff.c, src/fold.c, src/option.c, src/testdir/test45.in, + src/testdir/test45.ok + + +*** ../vim-7.2.369/src/diff.c 2009-07-22 16:22:33.000000000 +0200 +--- src/diff.c 2010-02-24 14:31:12.000000000 +0100 +*************** +*** 1117,1142 **** + win_T *wp; + int addbuf; /* Add buffer to diff. */ + { + wp->w_p_diff = TRUE; + wp->w_p_scb = TRUE; + wp->w_p_wrap = FALSE; + # ifdef FEAT_FOLDING +! { +! win_T *old_curwin = curwin; +! +! curwin = wp; +! curbuf = curwin->w_buffer; +! set_string_option_direct((char_u *)"fdm", -1, (char_u *)"diff", + OPT_LOCAL|OPT_FREE, 0); +! curwin = old_curwin; +! curbuf = curwin->w_buffer; +! wp->w_p_fdc = diff_foldcolumn; +! wp->w_p_fen = TRUE; +! wp->w_p_fdl = 0; +! foldUpdateAll(wp); +! /* make sure topline is not halfway a fold */ +! changed_window_setting_win(wp); +! } + # endif + #ifdef FEAT_SCROLLBIND + if (vim_strchr(p_sbo, 'h') == NULL) +--- 1117,1147 ---- + win_T *wp; + int addbuf; /* Add buffer to diff. */ + { ++ # ifdef FEAT_FOLDING ++ win_T *old_curwin = curwin; ++ ++ /* close the manually opened folds */ ++ curwin = wp; ++ newFoldLevel(); ++ curwin = old_curwin; ++ # endif ++ + wp->w_p_diff = TRUE; + wp->w_p_scb = TRUE; + wp->w_p_wrap = FALSE; + # ifdef FEAT_FOLDING +! curwin = wp; +! curbuf = curwin->w_buffer; +! set_string_option_direct((char_u *)"fdm", -1, (char_u *)"diff", + OPT_LOCAL|OPT_FREE, 0); +! curwin = old_curwin; +! curbuf = curwin->w_buffer; +! wp->w_p_fdc = diff_foldcolumn; +! wp->w_p_fen = TRUE; +! wp->w_p_fdl = 0; +! foldUpdateAll(wp); +! /* make sure topline is not halfway a fold */ +! changed_window_setting_win(wp); + # endif + #ifdef FEAT_SCROLLBIND + if (vim_strchr(p_sbo, 'h') == NULL) +*** ../vim-7.2.369/src/fold.c 2010-02-03 18:14:41.000000000 +0100 +--- src/fold.c 2010-02-24 13:09:04.000000000 +0100 +*************** +*** 854,865 **** + && fp->fd_top < bot) + { + fp->fd_small = MAYBE; +- +- /* Not sure if this is the right place to reset fd_flags (suggested by +- * Lech Lorens). */ +- if (wp->w_foldinvalid) +- fp->fd_flags = FD_LEVEL; +- + ++fp; + } + +--- 854,859 ---- +*** ../vim-7.2.369/src/option.c 2010-02-11 17:02:04.000000000 +0100 +--- src/option.c 2010-02-24 13:09:44.000000000 +0100 +*************** +*** 6586,6592 **** +--- 6586,6596 ---- + || *curwin->w_p_fdm == NUL) + errmsg = e_invarg; + else ++ { + foldUpdateAll(curwin); ++ if (foldmethodIsDiff(curwin)) ++ newFoldLevel(); ++ } + } + # ifdef FEAT_EVAL + /* 'foldexpr' */ +*** ../vim-7.2.369/src/testdir/test45.in 2009-11-03 14:46:35.000000000 +0100 +--- src/testdir/test45.in 2010-02-24 13:02:39.000000000 +0100 +*************** +*** 36,41 **** +--- 36,43 ---- + k:call append("$", getline(".")) + jAcommentstart Acommentend:set fdl=1 + 3j:call append("$", getline(".")) ++ :set fdl=0 ++ zO j:call append("$", getline(".")) + :" test expression folding + :fun Flvl() + let l = getline(v:lnum) +*** ../vim-7.2.369/src/testdir/test45.ok 2009-11-03 14:46:35.000000000 +0100 +--- src/testdir/test45.ok 2010-02-24 12:58:55.000000000 +0100 +*************** +*** 11,16 **** +--- 11,17 ---- + folding 9 ii + 3 cc + 7 gg ++ 8 hh + expr 2 + 1 + 2 +*** ../vim-7.2.369/src/version.c 2010-02-24 13:59:09.000000000 +0100 +--- src/version.c 2010-02-24 14:28:20.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 370, + /**/ + +-- +MAN: Fetchez la vache! +GUARD: Quoi? +MAN: Fetchez la vache! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 3b13040d96bc3846d64ae6eafe1b8d923616f07f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:07:57 +0000 Subject: [PATCH 0013/3803] - patchlevel 371 --- 7.2.371 | 322 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 322 insertions(+) create mode 100644 7.2.371 diff --git a/7.2.371 b/7.2.371 new file mode 100644 index 00000000..db875b62 --- /dev/null +++ b/7.2.371 @@ -0,0 +1,322 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.371 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.371 +Problem: Build problems on Tandem NonStop. +Solution: A few changes to #ifdefs (Joachim Schmitz) +Files: src/auto/configure, src/configure.in, src/config.h.in, src/vim.h, + src/if_cscope.c, src/osdef1.h.in, src/tag.c + + +*** ../vim-7.2.370/src/auto/configure 2010-02-17 16:23:03.000000000 +0100 +--- src/auto/configure 2010-02-24 14:27:00.000000000 +0100 +*************** +*** 14038,14046 **** + + + +! +! +! for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \ + getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ + memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ + setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ +--- 14038,14044 ---- + + + +! for ac_func in bcmp fchdir fchown fsync getcwd getpseudotty \ + getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ + memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ + setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ +*************** +*** 14146,14151 **** +--- 14144,14281 ---- + fi + done + ++ { $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5 ++ $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } ++ if test "${ac_cv_sys_largefile_source+set}" = set; then ++ $as_echo_n "(cached) " >&6 ++ else ++ while :; do ++ cat >conftest.$ac_ext <<_ACEOF ++ /* confdefs.h. */ ++ _ACEOF ++ cat confdefs.h >>conftest.$ac_ext ++ cat >>conftest.$ac_ext <<_ACEOF ++ /* end confdefs.h. */ ++ #include /* for off_t */ ++ #include ++ int ++ main () ++ { ++ int (*fp) (FILE *, off_t, int) = fseeko; ++ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ++ ; ++ return 0; ++ } ++ _ACEOF ++ rm -f conftest.$ac_objext conftest$ac_exeext ++ if { (ac_try="$ac_link" ++ case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++ esac ++ eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++ $as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then ++ ac_cv_sys_largefile_source=no; break ++ else ++ $as_echo "$as_me: failed program was:" >&5 ++ sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++ fi ++ ++ rm -rf conftest.dSYM ++ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++ cat >conftest.$ac_ext <<_ACEOF ++ /* confdefs.h. */ ++ _ACEOF ++ cat confdefs.h >>conftest.$ac_ext ++ cat >>conftest.$ac_ext <<_ACEOF ++ /* end confdefs.h. */ ++ #define _LARGEFILE_SOURCE 1 ++ #include /* for off_t */ ++ #include ++ int ++ main () ++ { ++ int (*fp) (FILE *, off_t, int) = fseeko; ++ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ++ ; ++ return 0; ++ } ++ _ACEOF ++ rm -f conftest.$ac_objext conftest$ac_exeext ++ if { (ac_try="$ac_link" ++ case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++ esac ++ eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++ $as_echo "$ac_try_echo") >&5 ++ (eval "$ac_link") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then ++ ac_cv_sys_largefile_source=1; break ++ else ++ $as_echo "$as_me: failed program was:" >&5 ++ sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++ fi ++ ++ rm -rf conftest.dSYM ++ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++ ac_cv_sys_largefile_source=unknown ++ break ++ done ++ fi ++ { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5 ++ $as_echo "$ac_cv_sys_largefile_source" >&6; } ++ case $ac_cv_sys_largefile_source in #( ++ no | unknown) ;; ++ *) ++ cat >>confdefs.h <<_ACEOF ++ #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source ++ _ACEOF ++ ;; ++ esac ++ rm -rf conftest* ++ ++ # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug ++ # in glibc 2.1.3, but that breaks too many other things. ++ # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. ++ if test $ac_cv_sys_largefile_source != unknown; then ++ ++ cat >>confdefs.h <<\_ACEOF ++ #define HAVE_FSEEKO 1 ++ _ACEOF ++ ++ fi ++ + + { $as_echo "$as_me:$LINENO: checking for st_blksize" >&5 + $as_echo_n "checking for st_blksize... " >&6; } +*** ../vim-7.2.370/src/configure.in 2010-02-17 16:23:03.000000000 +0100 +--- src/configure.in 2010-02-24 14:18:49.000000000 +0100 +*************** +*** 2642,2655 **** + AC_DEFINE(BAD_GETCWD) + fi + +! dnl Check for functions in one big call, to reduce the size of configure +! AC_CHECK_FUNCS(bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \ + getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ + memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ + setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ + sigvec strcasecmp strerror strftime stricmp strncasecmp \ + strnicmp strpbrk strtol tgetent towlower towupper iswupper \ + usleep utime utimes) + + dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible + AC_MSG_CHECKING(for st_blksize) +--- 2642,2657 ---- + AC_DEFINE(BAD_GETCWD) + fi + +! dnl Check for functions in one big call, to reduce the size of configure. +! dnl Can only be used for functions that do not require any include. +! AC_CHECK_FUNCS(bcmp fchdir fchown fsync getcwd getpseudotty \ + getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ + memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ + setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ + sigvec strcasecmp strerror strftime stricmp strncasecmp \ + strnicmp strpbrk strtol tgetent towlower towupper iswupper \ + usleep utime utimes) ++ AC_FUNC_FSEEKO + + dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible + AC_MSG_CHECKING(for st_blksize) +*** ../vim-7.2.370/src/config.h.in 2009-11-17 17:13:03.000000000 +0100 +--- src/config.h.in 2010-02-24 14:20:26.000000000 +0100 +*************** +*** 144,150 **** + #undef HAVE_FCHOWN + #undef HAVE_FSEEKO + #undef HAVE_FSYNC +- #undef HAVE_FTELLO + #undef HAVE_GETCWD + #undef HAVE_GETPSEUDOTTY + #undef HAVE_GETPWNAM +--- 144,149 ---- +*** ../vim-7.2.370/src/vim.h 2010-02-03 15:14:15.000000000 +0100 +--- src/vim.h 2010-02-24 14:08:14.000000000 +0100 +*************** +*** 52,58 **** + + /* user ID of root is usually zero, but not for everybody */ + #ifdef __TANDEM +! # define _TANDEM_SOURCE + # include + # define ROOT_UID 65535 + #else +--- 52,60 ---- + + /* user ID of root is usually zero, but not for everybody */ + #ifdef __TANDEM +! # ifndef _TANDEM_SOURCE +! # define _TANDEM_SOURCE +! # endif + # include + # define ROOT_UID 65535 + #else +*** ../vim-7.2.370/src/if_cscope.c 2010-01-19 14:59:14.000000000 +0100 +--- src/if_cscope.c 2010-02-24 14:10:21.000000000 +0100 +*************** +*** 2278,2284 **** +--- 2278,2288 ---- + /* Use sigaction() to limit the waiting time to two seconds. */ + sigemptyset(&sa.sa_mask); + sa.sa_handler = sig_handler; ++ # ifdef SA_NODEFER + sa.sa_flags = SA_NODEFER; ++ # else ++ sa.sa_flags = 0; ++ # endif + sigaction(SIGALRM, &sa, &old); + alarm(2); /* 2 sec timeout */ + +*** ../vim-7.2.370/src/osdef1.h.in 2007-02-27 16:47:59.000000000 +0100 +--- src/osdef1.h.in 2010-02-24 14:20:50.000000000 +0100 +*************** +*** 25,31 **** + extern int fseeko __ARGS((FILE *, off_t, int)); + #endif + extern long ftell __ARGS((FILE *)); +! #ifdef HAVE_FTELLO + extern off_t ftello __ARGS((FILE *)); + #endif + extern void rewind __ARGS((FILE *)); +--- 25,31 ---- + extern int fseeko __ARGS((FILE *, off_t, int)); + #endif + extern long ftell __ARGS((FILE *)); +! #ifdef HAVE_FSEEKO + extern off_t ftello __ARGS((FILE *)); + #endif + extern void rewind __ARGS((FILE *)); +*** ../vim-7.2.370/src/tag.c 2009-05-17 13:30:58.000000000 +0200 +--- src/tag.c 2010-02-24 14:20:12.000000000 +0100 +*************** +*** 90,97 **** + /* + * We use ftello() here, if available. It returns off_t instead of long, + * which helps if long is 32 bit and off_t is 64 bit. + */ +! #ifdef HAVE_FTELLO + # define ftell ftello + #endif + +--- 90,98 ---- + /* + * We use ftello() here, if available. It returns off_t instead of long, + * which helps if long is 32 bit and off_t is 64 bit. ++ * We assume that when fseeko() is available then ftello() is too. + */ +! #ifdef HAVE_FSEEKO + # define ftell ftello + #endif + +*** ../vim-7.2.370/src/version.c 2010-02-24 14:34:10.000000000 +0100 +--- src/version.c 2010-02-24 14:45:37.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 371, + /**/ + +-- + A cow comes flying over the battlements, lowing aggressively. The cow + lands on GALAHAD'S PAGE, squashing him completely. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e1c53acefed232893571acc6157b3602c926c7c8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:08:10 +0000 Subject: [PATCH 0014/3803] - patchlevel 372 --- 7.2.372 | 303 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 303 insertions(+) create mode 100644 7.2.372 diff --git a/7.2.372 b/7.2.372 new file mode 100644 index 00000000..064893c8 --- /dev/null +++ b/7.2.372 @@ -0,0 +1,303 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.372 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.372 (extra) +Problem: Cross-compiling GvimExt and xxd doesn't work. +Solution: Change the build files. (Markus Heidelberg) +Files: src/INSTALLpc.txt, src/GvimExt/Make_ming.mak, src/Make_cyg.mak, + src/Make_ming.mak, src/xxd/Make_cyg.mak + + +*** ../vim-7.2.371/src/INSTALLpc.txt 2008-07-13 19:20:53.000000000 +0200 +--- src/INSTALLpc.txt 2010-01-19 12:37:03.000000000 +0100 +*************** +*** 215,222 **** + + You should not need to do *any* editing of any files to get vim compiled this + way. If, for some reason, you want the console-mode-only version of vim (this +! is NOT recommended on Win32, especially on '95/'98!!!), you need only change +! the 'gvim.exe' to 'vim.exe' in the 'make' commands given above. + + If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX' + (also free!) and compress the file (typical compression is 50%). UPX can be +--- 215,223 ---- + + You should not need to do *any* editing of any files to get vim compiled this + way. If, for some reason, you want the console-mode-only version of vim (this +! is NOT recommended on Win32, especially on '95/'98!!!), you can use: +! +! make -f Make_ming.mak GUI=no vim.exe + + If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX' + (also free!) and compress the file (typical compression is 50%). UPX can be +*************** +*** 240,246 **** + The Cygnus one many not fully work yet. + With Cygnus gcc you can use the Unix Makefile instead (you need to get the + Unix archive then). Then you get a Cygwin application (feels like Vim is +! runnin on Unix), while with Make_cyg.mak you get a Windows application (like + with the other makefiles). + + +--- 241,247 ---- + The Cygnus one many not fully work yet. + With Cygnus gcc you can use the Unix Makefile instead (you need to get the + Unix archive then). Then you get a Cygwin application (feels like Vim is +! running on Unix), while with Make_cyg.mak you get a Windows application (like + with the other makefiles). + + +*************** +*** 259,268 **** +--- 260,272 ---- + If you like, you can compile the 'mingw' Win32 version from the comfort of + your Linux (or other unix) box. To do this, you need to follow a few steps: + 1) Install the mingw32 cross-compiler. See ++ http://www.mingw.org/wiki/LinuxCrossMinGW + http://www.libsdl.org/extras/win32/cross/README.txt + 2) Get and unpack both the Unix sources and the extra archive + 3) in 'Make_ming.mak', set 'CROSS' to 'yes' instead of 'no'. + Make further changes to 'Make_ming.mak' as you wish. ++ If your cross-compiler prefix differs from the predefined value, ++ set 'CROSS_COMPILE' corresponding. + 4) make -f Make_ming.mak gvim.exe + + Now you have created the Windows binary from your Linux box! Have fun... +*** ../vim-7.2.371/src/GvimExt/Make_ming.mak 2005-01-09 22:15:44.000000000 +0100 +--- src/GvimExt/Make_ming.mak 2010-02-24 14:56:37.000000000 +0100 +*************** +*** 20,36 **** + ifeq ($(CROSS),yes) + DEL = rm + ifeq ($(MINGWOLD),yes) +- CXX = i586-mingw32msvc-g++ + CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks +- WINDRES = i586-mingw32msvc-windres + else +- CXX = i386-mingw32msvc-g++ + CXXFLAGS := -O2 -mno-cygwin +- WINDRES = i386-mingw32msvc-windres + endif + else +- CXX := g++ +- WINDRES := windres + CXXFLAGS := -O2 -mno-cygwin + ifneq (sh.exe, $(SHELL)) + DEL = rm +--- 20,30 ---- +*************** +*** 38,43 **** +--- 32,39 ---- + DEL = del + endif + endif ++ CXX := $(CROSS_COMPILE)g++ ++ WINDRES := $(CROSS_COMPILE)windres + LIBS := -luuid + RES := gvimext.res + DEFFILE = gvimext_ming.def +*** ../vim-7.2.371/src/Make_cyg.mak 2009-09-11 12:48:56.000000000 +0200 +--- src/Make_cyg.mak 2010-02-24 14:59:02.000000000 +0100 +*************** +*** 1,6 **** + # + # Makefile for VIM on Win32, using Cygnus gcc +! # Last updated by Dan Sharp. Last Change: 2007 Sep 29 + # + # Also read INSTALLpc.txt! + # +--- 1,6 ---- + # + # Makefile for VIM on Win32, using Cygnus gcc +! # Last updated by Dan Sharp. Last Change: 2010 Feb 24 + # + # Also read INSTALLpc.txt! + # +*************** +*** 32,40 **** + # OLE no or yes: set to yes to make OLE gvim (no) + # DEBUG no or yes: set to yes if you wish a DEBUGging build (no) + # CPUNR No longer supported, use ARCH. +! # ARCH i386 through pentium4: select -march argument to compile with (i386) + # USEDLL no or yes: set to yes to use the Runtime library DLL (no) + # For USEDLL=yes the cygwin1.dll is required to run Vim. + # POSTSCRIPT no or yes: set to yes for PostScript printing (no) + # FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG) + # WINVER Lowest Win32 version to support. (0x0400) +--- 32,43 ---- + # OLE no or yes: set to yes to make OLE gvim (no) + # DEBUG no or yes: set to yes if you wish a DEBUGging build (no) + # CPUNR No longer supported, use ARCH. +! # ARCH i386 through pentium4: select -march argument to compile with +! # (i386) + # USEDLL no or yes: set to yes to use the Runtime library DLL (no) + # For USEDLL=yes the cygwin1.dll is required to run Vim. ++ # "no" does not work with latest version of Cygwin, use ++ # Make_ming.mak instead. Or set CC to gcc-3. + # POSTSCRIPT no or yes: set to yes for PostScript printing (no) + # FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG) + # WINVER Lowest Win32 version to support. (0x0400) +*************** +*** 99,104 **** +--- 102,108 ---- + INCLUDES = -march=$(ARCH) -Iproto + + #>>>>> name of the compiler and linker, name of lib directory ++ CROSS_COMPILE = + CC = gcc + RC = windres + +*************** +*** 467,476 **** + $(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(LIBS) -luuid -lole32 $(EXTRA_LIBS) + + xxd/xxd.exe: xxd/xxd.c +! $(MAKE) -C xxd -f Make_cyg.mak USEDLL=$(USEDLL) + + GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h +! $(MAKE) -C GvimExt -f Make_ming.mak + + vimrun.exe: vimrun.c + $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIBS) +--- 471,480 ---- + $(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(LIBS) -luuid -lole32 $(EXTRA_LIBS) + + xxd/xxd.exe: xxd/xxd.c +! $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) USEDLL=$(USEDLL) + + GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h +! $(MAKE) -C GvimExt -f Make_ming.mak CROSS_COMPILE=$(CROSS_COMPILE) + + vimrun.exe: vimrun.c + $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIBS) +*** ../vim-7.2.371/src/Make_ming.mak 2009-09-11 12:48:56.000000000 +0200 +--- src/Make_ming.mak 2010-02-24 15:01:31.000000000 +0100 +*************** +*** 241,255 **** + DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \ + -DHAVE_PATHDEF -DFEAT_$(FEATURES) + ifeq ($(CROSS),yes) +! # cross-compiler: +! CC = i586-pc-mingw32msvc-gcc + DEL = rm + MKDIR = mkdir -p +! WINDRES = i586-pc-mingw32msvc-windres + else + # normal (Windows) compilation: +- CC = gcc + ifneq (sh.exe, $(SHELL)) + DEL = rm + MKDIR = mkdir -p + DIRSLASH = / +--- 241,255 ---- + DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \ + -DHAVE_PATHDEF -DFEAT_$(FEATURES) + ifeq ($(CROSS),yes) +! # cross-compiler prefix: +! CROSS_COMPILE = i586-pc-mingw32msvc- + DEL = rm + MKDIR = mkdir -p +! DIRSLASH = / + else + # normal (Windows) compilation: + ifneq (sh.exe, $(SHELL)) ++ CROSS_COMPILE = + DEL = rm + MKDIR = mkdir -p + DIRSLASH = / +*************** +*** 258,265 **** + MKDIR = mkdir + DIRSLASH = \\ + endif +- WINDRES = windres + endif + + #>>>>> end of choices + ########################################################################### +--- 258,266 ---- + MKDIR = mkdir + DIRSLASH = \\ + endif + endif ++ CC := $(CROSS_COMPILE)gcc ++ WINDRES := $(CROSS_COMPILE)windres + + #>>>>> end of choices + ########################################################################### +*************** +*** 549,558 **** + upx vim.exe + + xxd/xxd.exe: xxd/xxd.c +! $(MAKE) -C xxd -f Make_cyg.mak + + GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h + $(MAKE) -C GvimExt -f Make_ming.mak + + clean: + -$(DEL) $(OUTDIR)$(DIRSLASH)*.o +--- 550,560 ---- + upx vim.exe + + xxd/xxd.exe: xxd/xxd.c +! $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) + + GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h + $(MAKE) -C GvimExt -f Make_ming.mak ++ $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) + + clean: + -$(DEL) $(OUTDIR)$(DIRSLASH)*.o +*** ../vim-7.2.371/src/xxd/Make_cyg.mak 2004-06-13 17:48:52.000000000 +0200 +--- src/xxd/Make_cyg.mak 2010-02-24 15:05:24.000000000 +0100 +*************** +*** 12,17 **** +--- 12,18 ---- + LIBS = + endif + ++ CC = gcc + CFLAGS = -O2 -Wall -DWIN32 $(DEFINES) + + ifneq (sh.exe, $(SHELL)) +*************** +*** 21,27 **** + endif + + xxd.exe: xxd.c +! gcc $(CFLAGS) -s -o xxd.exe xxd.c $(LIBS) + + clean: + -$(DEL) xxd.exe +--- 22,28 ---- + endif + + xxd.exe: xxd.c +! $(CC) $(CFLAGS) -s -o xxd.exe xxd.c $(LIBS) + + clean: + -$(DEL) xxd.exe +*** ../vim-7.2.371/src/version.c 2010-02-24 14:46:58.000000000 +0100 +--- src/version.c 2010-02-24 15:05:48.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 372, + /**/ + +-- +Ten bugs in the hand is better than one as yet undetected. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9874d92132614068f0a76ae1631d01a42d48599f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:08:23 +0000 Subject: [PATCH 0015/3803] - patchlevel 373 --- 7.2.373 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 7.2.373 diff --git a/7.2.373 b/7.2.373 new file mode 100644 index 00000000..1bb4773d --- /dev/null +++ b/7.2.373 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.373 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.373 +Problem: Gcc 4.5 adds more error messages. (Chris Indy) +Solution: Update default 'errorformat'. +Files: src/option.h + + +*** ../vim-7.2.372/src/option.h 2008-06-24 23:59:49.000000000 +0200 +--- src/option.h 2010-02-24 15:20:03.000000000 +0100 +*************** +*** 33,39 **** + # ifdef EBCDIC + #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" + # else +! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" + # endif + # endif + # endif +--- 33,39 ---- + # ifdef EBCDIC + #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" + # else +! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-Gfrom %f:%l:%c,%-Gfrom %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" + # endif + # endif + # endif +*** ../vim-7.2.372/src/version.c 2010-02-24 15:07:45.000000000 +0100 +--- src/version.c 2010-02-24 15:24:43.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 373, + /**/ + +-- +ARTHUR: Right! Knights! Forward! + ARTHUR leads a charge toward the castle. Various shots of them battling on, + despite being hit by a variety of farm animals. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 2c0ca19ed9de4243fa4a32f56b74967e4bd2145b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:08:37 +0000 Subject: [PATCH 0016/3803] - patchlevel 374 --- 7.2.374 | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 7.2.374 diff --git a/7.2.374 b/7.2.374 new file mode 100644 index 00000000..50d3e74d --- /dev/null +++ b/7.2.374 @@ -0,0 +1,168 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.374 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.374 +Problem: Ruby eval() doesn't understand Vim types. +Solution: Add the vim_to_ruby() function. (George Gensure) +Files: src/eval.c, src/if_ruby.c + + +*** ../vim-7.2.373/src/eval.c 2010-01-19 15:51:29.000000000 +0100 +--- src/eval.c 2010-02-24 15:36:40.000000000 +0100 +*************** +*** 5872,5878 **** + return item1 == NULL && item2 == NULL; + } + +! #if defined(FEAT_PYTHON) || defined(FEAT_MZSCHEME) || defined(PROTO) + /* + * Return the dictitem that an entry in a hashtable points to. + */ +--- 5872,5879 ---- + return item1 == NULL && item2 == NULL; + } + +! #if defined(FEAT_RUBY) || defined(FEAT_PYTHON) || defined(FEAT_MZSCHEME) \ +! || defined(PROTO) + /* + * Return the dictitem that an entry in a hashtable points to. + */ +*** ../vim-7.2.373/src/if_ruby.c 2010-02-18 15:51:25.000000000 +0100 +--- src/if_ruby.c 2010-02-24 15:45:15.000000000 +0100 +*************** +*** 660,679 **** + return Qnil; + } + + static VALUE vim_evaluate(VALUE self UNUSED, VALUE str) + { + #ifdef FEAT_EVAL +! char_u *value = eval_to_string((char_u *)StringValuePtr(str), NULL, TRUE); + +! if (value != NULL) + { +! VALUE val = rb_str_new2((char *)value); +! vim_free(value); +! return val; + } +! else + #endif +- return Qnil; + } + + static VALUE buffer_new(buf_T *buf) +--- 660,747 ---- + return Qnil; + } + ++ #ifdef FEAT_EVAL ++ static VALUE vim_to_ruby(typval_T *tv) ++ { ++ VALUE result = Qnil; ++ ++ if (tv->v_type == VAR_STRING) ++ { ++ result = rb_str_new2((char *)tv->vval.v_string); ++ } ++ else if (tv->v_type == VAR_NUMBER) ++ { ++ result = INT2NUM(tv->vval.v_number); ++ } ++ # ifdef FEAT_FLOAT ++ else if (tv->v_type == VAR_FLOAT) ++ { ++ result = rb_float_new(tv->vval.v_float); ++ } ++ # endif ++ else if (tv->v_type == VAR_LIST) ++ { ++ list_T *list = tv->vval.v_list; ++ listitem_T *curr; ++ ++ result = rb_ary_new(); ++ ++ if (list != NULL) ++ { ++ for (curr = list->lv_first; curr != NULL; curr = curr->li_next) ++ { ++ rb_ary_push(result, vim_to_ruby(&curr->li_tv)); ++ } ++ } ++ } ++ else if (tv->v_type == VAR_DICT) ++ { ++ result = rb_hash_new(); ++ ++ if (tv->vval.v_dict != NULL) ++ { ++ hashtab_T *ht = &tv->vval.v_dict->dv_hashtab; ++ long_u todo = ht->ht_used; ++ hashitem_T *hi; ++ dictitem_T *di; ++ ++ for (hi = ht->ht_array; todo > 0; ++hi) ++ { ++ if (!HASHITEM_EMPTY(hi)) ++ { ++ --todo; ++ ++ di = dict_lookup(hi); ++ rb_hash_aset(result, rb_str_new2((char *)hi->hi_key), ++ vim_to_ruby(&di->di_tv)); ++ } ++ } ++ } ++ } /* else return Qnil; */ ++ ++ return result; ++ } ++ #endif ++ + static VALUE vim_evaluate(VALUE self UNUSED, VALUE str) + { + #ifdef FEAT_EVAL +! typval_T *tv; +! VALUE result; + +! tv = eval_expr((char_u *)StringValuePtr(str), NULL); +! if (tv == NULL) + { +! return Qnil; + } +! result = vim_to_ruby(tv); +! +! free_tv(tv); +! +! return result; +! #else +! return Qnil; + #endif + } + + static VALUE buffer_new(buf_T *buf) +*** ../vim-7.2.373/src/version.c 2010-02-24 15:25:13.000000000 +0100 +--- src/version.c 2010-02-24 15:46:57.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 374, + /**/ + +-- +ARTHUR: (as the MAN next to him is squashed by a sheep) Knights! Run away! + Midst echoing shouts of "run away" the KNIGHTS retreat to cover with the odd + cow or goose hitting them still. The KNIGHTS crouch down under cover. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 42e1e53e556af0bacb34bd5fc826d85475262211 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:08:51 +0000 Subject: [PATCH 0017/3803] - patchlevel 375 --- 7.2.375 | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 7.2.375 diff --git a/7.2.375 b/7.2.375 new file mode 100644 index 00000000..3374cd1b --- /dev/null +++ b/7.2.375 @@ -0,0 +1,64 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.375 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.375 +Problem: ml_get errors when using ":bprevious" in a BufEnter autocmd. + (Dominique Pelle) +Solution: Clear w_valid when entering another buffer. +Files: src/buffer.c + + +*** ../vim-7.2.374/src/buffer.c 2010-01-19 14:59:14.000000000 +0100 +--- src/buffer.c 2010-02-24 16:29:22.000000000 +0100 +*************** +*** 115,121 **** + #endif + + /* mark cursor position as being invalid */ +! changed_line_abv_curs(); + + if (curbuf->b_ffname != NULL + #ifdef FEAT_NETBEANS_INTG +--- 115,121 ---- + #endif + + /* mark cursor position as being invalid */ +! curwin->w_valid = 0; + + if (curbuf->b_ffname != NULL + #ifdef FEAT_NETBEANS_INTG +*************** +*** 1399,1404 **** +--- 1399,1407 ---- + curwin->w_topline_was_set = FALSE; + #endif + ++ /* mark cursor position as being invalid */ ++ curwin->w_valid = 0; ++ + /* Make sure the buffer is loaded. */ + if (curbuf->b_ml.ml_mfp == NULL) /* need to load the file */ + { +*** ../vim-7.2.374/src/version.c 2010-02-24 15:47:58.000000000 +0100 +--- src/version.c 2010-02-24 16:30:03.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 375, + /**/ + +-- +Error:015 - Unable to exit Windows. Try the door. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e87f5507e554732dc8a7a905ebf9ed44b503b664 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:09:04 +0000 Subject: [PATCH 0018/3803] - patchlevel 376 --- 7.2.376 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 7.2.376 diff --git a/7.2.376 b/7.2.376 new file mode 100644 index 00000000..718875b2 --- /dev/null +++ b/7.2.376 @@ -0,0 +1,50 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.376 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.376 +Problem: ml_get error when using SiSU syntax. (Nathan Thomas) +Solution: If the match ends below the last line move it to the end of the + last line. +Files: src/syntax.c + + +*** ../vim-7.2.375/src/syntax.c 2010-01-19 14:59:14.000000000 +0100 +--- src/syntax.c 2010-02-24 17:14:13.000000000 +0100 +*************** +*** 3086,3091 **** +--- 3086,3097 ---- + col = regmatch->startpos[0].col; + off = spp->sp_offsets[idx]; + } ++ if (result->lnum > syn_buf->b_ml.ml_line_count) ++ { ++ /* a "\n" at the end of the pattern may take us below the last line */ ++ result->lnum = syn_buf->b_ml.ml_line_count; ++ col = STRLEN(ml_get_buf(syn_buf, result->lnum, FALSE)); ++ } + if (off != 0) + { + base = ml_get_buf(syn_buf, result->lnum, FALSE); +*** ../vim-7.2.375/src/version.c 2010-02-24 16:58:30.000000000 +0100 +--- src/version.c 2010-02-24 17:15:48.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 376, + /**/ + +-- +press CTRL-ALT-DEL for more information + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b5f93cd1d3bf9b2bae9f1d7c6952b4f4dba1a6e3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:09:19 +0000 Subject: [PATCH 0019/3803] - patchlevel 377 --- 7.2.377 | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 7.2.377 diff --git a/7.2.377 b/7.2.377 new file mode 100644 index 00000000..e854ce71 --- /dev/null +++ b/7.2.377 @@ -0,0 +1,66 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.377 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.377 (extra, after 7.2.372) +Problem: Misplaced assignment. Duplicate build line for gvimext.dll. +Solution: Move setting CROSS_COMPILE to before ifneq. Remove the wrong + build line. (Markus Heidelberg) +Files: src/Make_ming.mak + + +*** ../vim-7.2.376/src/Make_ming.mak 2010-02-24 15:07:45.000000000 +0100 +--- src/Make_ming.mak 2010-02-26 22:01:07.000000000 +0100 +*************** +*** 248,255 **** + DIRSLASH = / + else + # normal (Windows) compilation: +- ifneq (sh.exe, $(SHELL)) + CROSS_COMPILE = + DEL = rm + MKDIR = mkdir -p + DIRSLASH = / +--- 248,255 ---- + DIRSLASH = / + else + # normal (Windows) compilation: + CROSS_COMPILE = ++ ifneq (sh.exe, $(SHELL)) + DEL = rm + MKDIR = mkdir -p + DIRSLASH = / +*************** +*** 553,559 **** + $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) + + GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h +- $(MAKE) -C GvimExt -f Make_ming.mak + $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) + + clean: +--- 553,558 ---- +*** ../vim-7.2.376/src/version.c 2010-02-24 17:22:14.000000000 +0100 +--- src/version.c 2010-02-26 22:01:45.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 377, + /**/ + +-- +FIRST HEAD: All right! All right! We'll kill him first and then have tea and + biscuits. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 6d13a487b9c9222e2328f6300b5737170daa762e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:09:32 +0000 Subject: [PATCH 0020/3803] - patchlevel 378 --- 7.2.378 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 7.2.378 diff --git a/7.2.378 b/7.2.378 new file mode 100644 index 00000000..de2251f4 --- /dev/null +++ b/7.2.378 @@ -0,0 +1,69 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.378 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.378 +Problem: C function declaration indented too much. (Rui) +Solution: Don't see a line containing { or } as a type. (Matt Wozniski) +Files: src/misc1.c + + +*** ../vim-7.2.377/src/misc1.c 2010-01-06 17:46:03.000000000 +0100 +--- src/misc1.c 2010-02-26 22:36:50.000000000 +0100 +*************** +*** 7727,7737 **** + /* + * If the NEXT line is a function declaration, the current + * line needs to be indented as a function type spec. +! * Don't do this if the current line looks like a comment +! * or if the current line is terminated, ie. ends in ';'. + */ + 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) +--- 7727,7740 ---- + /* + * If the NEXT line is a function declaration, the current + * line needs to be indented as a function type spec. +! * Don't do this if the current line looks like a comment or if the +! * current line is terminated, ie. ends in ';', or if the current line +! * contains { or }: "void f() {\n if (1)" + */ + else if (cur_curpos.lnum < curbuf->b_ml.ml_line_count + && !cin_nocode(theline) ++ && vim_strchr(theline, '{') == NULL ++ && vim_strchr(theline, '}') == NULL + && !cin_ends_in(theline, (char_u *)":", NULL) + && !cin_ends_in(theline, (char_u *)",", NULL) + && cin_isfuncdecl(NULL, cur_curpos.lnum + 1) +*** ../vim-7.2.377/src/version.c 2010-02-26 22:05:17.000000000 +0100 +--- src/version.c 2010-03-02 12:30:30.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 378, + /**/ + +-- + An extraordinary TALL KNIGHT in all black (possibly John with Mike on his + shoulders) walks out from the dark trees. He is extremely fierce and + gruesome countenance. He walks towards KING ARTHUR and PATSY, who are + wazzing like mad. (Salopian slang, meaning very scared. almost to the + point of wetting oneself, e.g. before an important football match or + prior to a postering. Salopian slang meaning a beating by the school + praeposters. Sorry about the Salopian slant to this stage direction - Ed.) + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 57d295f81eee67ecbb8b67ca0bf25d1fcc8b9b12 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:09:46 +0000 Subject: [PATCH 0021/3803] - patchlevel 379 --- 7.2.379 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 7.2.379 diff --git a/7.2.379 b/7.2.379 new file mode 100644 index 00000000..8a600e9e --- /dev/null +++ b/7.2.379 @@ -0,0 +1,55 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.379 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.379 +Problem: 'eventignore' is set to an invalid value inside ":doau". (Antony + Scriven) +Solution: Don't include the leading comma when the option was empty. +Files: src/fileio.c + + +*** ../vim-7.2.378/src/fileio.c 2010-01-19 14:59:14.000000000 +0100 +--- src/fileio.c 2010-03-01 21:01:04.000000000 +0100 +*************** +*** 7925,7931 **** + new_ei = vim_strnsave(p_ei, (int)(STRLEN(p_ei) + STRLEN(what))); + if (new_ei != NULL) + { +! STRCAT(new_ei, what); + set_string_option_direct((char_u *)"ei", -1, new_ei, + OPT_FREE, SID_NONE); + vim_free(new_ei); +--- 7925,7934 ---- + new_ei = vim_strnsave(p_ei, (int)(STRLEN(p_ei) + STRLEN(what))); + if (new_ei != NULL) + { +! if (*what == ',' && *p_ei == NUL) +! STRCPY(new_ei, what + 1); +! else +! STRCAT(new_ei, what); + set_string_option_direct((char_u *)"ei", -1, new_ei, + OPT_FREE, SID_NONE); + vim_free(new_ei); +*** ../vim-7.2.378/src/version.c 2010-03-02 12:37:01.000000000 +0100 +--- src/version.c 2010-03-02 12:46:45.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 379, + /**/ + +-- +Back up my hard drive? I can't find the reverse switch! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d9d360a4e0f06a7aaac0d904153c68534c4f27dd Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:09:58 +0000 Subject: [PATCH 0022/3803] - patchlevel 380 --- 7.2.380 | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 7.2.380 diff --git a/7.2.380 b/7.2.380 new file mode 100644 index 00000000..2cdd8318 --- /dev/null +++ b/7.2.380 @@ -0,0 +1,104 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.380 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.380 (after 7.2.363) +Problem: Perl interface builds with 5.10.1 but not with 5.10.0. +Solution: Change the #ifdefs. (Sergey Khorev) +Files: src/if_perl.xs + + +*** ../vim-7.2.379/src/if_perl.xs 2010-02-17 16:40:47.000000000 +0100 +--- src/if_perl.xs 2010-03-02 15:07:01.000000000 +0100 +*************** +*** 62,67 **** +--- 62,72 ---- + # define PERL589_OR_LATER + #endif + ++ #if (PERL_REVISION == 5) && ((PERL_VERSION > 10) || \ ++ (PERL_VERSION == 10) && (PERL_SUBVERSION >= 1)) ++ # define PERL5101_OR_LATER ++ #endif ++ + #ifndef pTHX + # define pTHX void + # define pTHX_ +*************** +*** 93,99 **** + # define perl_free dll_perl_free + # define Perl_get_context dll_Perl_get_context + # define Perl_croak dll_Perl_croak +! # if (PERL_REVISION == 5) && (PERL_VERSION >= 10) + # define Perl_croak_xs_usage dll_Perl_croak_xs_usage + # endif + # ifndef PROTO +--- 98,104 ---- + # define perl_free dll_perl_free + # define Perl_get_context dll_Perl_get_context + # define Perl_croak dll_Perl_croak +! # ifdef PERL5101_OR_LATER + # define Perl_croak_xs_usage dll_Perl_croak_xs_usage + # endif + # ifndef PROTO +*************** +*** 205,211 **** + static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**); + static void* (*Perl_get_context)(void); + static void (*Perl_croak)(pTHX_ const char*, ...); +! #if (PERL_REVISION == 5) && (PERL_VERSION >= 10) + static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params); + #endif + static void (*Perl_croak_nocontext)(const char*, ...); +--- 210,216 ---- + static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**); + static void* (*Perl_get_context)(void); + static void (*Perl_croak)(pTHX_ const char*, ...); +! #ifdef PERL5101_OR_LATER + static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params); + #endif + static void (*Perl_croak_nocontext)(const char*, ...); +*************** +*** 312,318 **** + {"perl_parse", (PERL_PROC*)&perl_parse}, + {"Perl_get_context", (PERL_PROC*)&Perl_get_context}, + {"Perl_croak", (PERL_PROC*)&Perl_croak}, +! #if (PERL_REVISION == 5) && (PERL_VERSION >= 10) + {"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage}, + #endif + {"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext}, +--- 317,323 ---- + {"perl_parse", (PERL_PROC*)&perl_parse}, + {"Perl_get_context", (PERL_PROC*)&Perl_get_context}, + {"Perl_croak", (PERL_PROC*)&Perl_croak}, +! #ifdef PERL5101_OR_LATER + {"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage}, + #endif + {"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext}, +*** ../vim-7.2.379/src/version.c 2010-03-02 12:47:58.000000000 +0100 +--- src/version.c 2010-03-02 15:13:21.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 380, + /**/ + +-- +FATHER: Make sure the Prince doesn't leave this room until I come and + get him. +FIRST GUARD: Not ... to leave the room ... even if you come and get him. +FATHER: No. Until I come and get him. +SECOND GUARD: Hic. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 17ea7f0cc49f28128651bba6f912e6aef7f9aaa4 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:10:12 +0000 Subject: [PATCH 0023/3803] - patchlevel 381 --- 7.2.381 | 218 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 7.2.381 diff --git a/7.2.381 b/7.2.381 new file mode 100644 index 00000000..977a8ecd --- /dev/null +++ b/7.2.381 @@ -0,0 +1,218 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.381 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.381 +Problem: No completion for :behave. +Solution: Add :behave completion. Minor related fixes. (Dominique Pelle) +Files: src/ex_docmd.c, src/ex_getln.c, src/proto/ex_docmd.pro, src/vim.h + + +*** ../vim-7.2.380/src/ex_docmd.c 2010-02-03 15:14:15.000000000 +0100 +--- src/ex_docmd.c 2010-03-02 15:55:05.000000000 +0100 +*************** +*** 26,35 **** + long_u uc_argt; /* The argument type */ + char_u *uc_rep; /* The command's replacement string */ + long uc_def; /* The default value for a range/count */ +- scid_T uc_scriptID; /* SID where the command was defined */ + int uc_compl; /* completion type */ +! # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL) + char_u *uc_compl_arg; /* completion argument if any */ + # endif + } ucmd_T; + +--- 26,37 ---- + long_u uc_argt; /* The argument type */ + char_u *uc_rep; /* The command's replacement string */ + long uc_def; /* The default value for a range/count */ + int uc_compl; /* completion type */ +! # ifdef FEAT_EVAL +! scid_T uc_scriptID; /* SID where the command was defined */ +! # ifdef FEAT_CMDL_COMPL + char_u *uc_compl_arg; /* completion argument if any */ ++ # endif + # endif + } ucmd_T; + +*************** +*** 3156,3172 **** + return NULL; + } + for (ea.cmdidx = (cmdidx_T)0; (int)ea.cmdidx < (int)CMD_SIZE; +! ea.cmdidx = (cmdidx_T)((int)ea.cmdidx + 1)) +! if (STRNCMP(cmdnames[(int)ea.cmdidx].cmd_name, cmd, (size_t)len) == 0) + break; + + #ifdef FEAT_USR_CMDS + if (cmd[0] >= 'A' && cmd[0] <= 'Z') +- { + while (ASCII_ISALNUM(*p) || *p == '*') /* Allow * wild card */ + ++p; +- len = (int)(p - cmd); +- } + #endif + } + +--- 3158,3172 ---- + return NULL; + } + for (ea.cmdidx = (cmdidx_T)0; (int)ea.cmdidx < (int)CMD_SIZE; +! ea.cmdidx = (cmdidx_T)((int)ea.cmdidx + 1)) +! if (STRNCMP(cmdnames[(int)ea.cmdidx].cmd_name, cmd, +! (size_t)len) == 0) + break; + + #ifdef FEAT_USR_CMDS + if (cmd[0] >= 'A' && cmd[0] <= 'Z') + while (ASCII_ISALNUM(*p) || *p == '*') /* Allow * wild card */ + ++p; + #endif + } + +*************** +*** 3809,3814 **** +--- 3809,3817 ---- + set_context_in_profile_cmd(xp, arg); + break; + #endif ++ case CMD_behave: ++ xp->xp_context = EXPAND_BEHAVE; ++ break; + + #endif /* FEAT_CMDL_COMPL */ + +*************** +*** 10847,10852 **** +--- 10850,10873 ---- + EMSG2(_(e_invarg2), eap->arg); + } + ++ #if defined(FEAT_CMDL_COMPL) || defined(PROTO) ++ /* ++ * Function given to ExpandGeneric() to obtain the possible arguments of the ++ * ":behave {mswin,xterm}" command. ++ */ ++ char_u * ++ get_behave_arg(xp, idx) ++ expand_T *xp UNUSED; ++ int idx; ++ { ++ if (idx == 0) ++ return (char_u *)"mswin"; ++ if (idx == 1) ++ return (char_u *)"xterm"; ++ return NULL; ++ } ++ #endif ++ + #ifdef FEAT_AUTOCMD + static int filetype_detect = FALSE; + static int filetype_plugin = FALSE; +*** ../vim-7.2.380/src/ex_getln.c 2010-02-03 15:14:15.000000000 +0100 +--- src/ex_getln.c 2010-03-02 15:28:13.000000000 +0100 +*************** +*** 4492,4497 **** +--- 4492,4498 ---- + } tab[] = + { + {EXPAND_COMMANDS, get_command_name, FALSE}, ++ {EXPAND_BEHAVE, get_behave_arg, TRUE}, + #ifdef FEAT_USR_CMDS + {EXPAND_USER_COMMANDS, get_user_commands, FALSE}, + {EXPAND_USER_CMD_FLAGS, get_user_cmd_flags, FALSE}, +*** ../vim-7.2.380/src/proto/ex_docmd.pro 2008-07-04 11:43:13.000000000 +0200 +--- src/proto/ex_docmd.pro 2010-03-02 15:37:37.000000000 +0100 +*************** +*** 52,55 **** +--- 52,56 ---- + int put_eol __ARGS((FILE *fd)); + int put_line __ARGS((FILE *fd, char *s)); + void dialog_msg __ARGS((char_u *buff, char *format, char_u *fname)); ++ char_u *get_behave_arg __ARGS((expand_T *xp, int idx)); + /* vim: set ft=c : */ +*** ../vim-7.2.380/src/vim.h 2010-02-24 14:46:58.000000000 +0100 +--- src/vim.h 2010-03-02 15:30:13.000000000 +0100 +*************** +*** 595,601 **** + + /* + * Terminal highlighting attribute bits. +! * Attibutes above HL_ALL are used for syntax highlighting. + */ + #define HL_NORMAL 0x00 + #define HL_INVERSE 0x01 +--- 595,601 ---- + + /* + * Terminal highlighting attribute bits. +! * Attributes above HL_ALL are used for syntax highlighting. + */ + #define HL_NORMAL 0x00 + #define HL_INVERSE 0x01 +*************** +*** 721,726 **** +--- 721,727 ---- + #define EXPAND_CSCOPE 33 + #define EXPAND_SIGN 34 + #define EXPAND_PROFILE 35 ++ #define EXPAND_BEHAVE 36 + + /* Values for exmode_active (0 is no exmode) */ + #define EXMODE_NORMAL 1 +*************** +*** 1262,1268 **** + } hlf_T; + + /* The HL_FLAGS must be in the same order as the HLF_ enums! +! * When chainging this also adjust the default for 'highlight'. */ + #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', '>', \ +--- 1263,1269 ---- + } hlf_T; + + /* The HL_FLAGS must be in the same order as the HLF_ enums! +! * When changing this also adjust the default for 'highlight'. */ + #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', '>', \ +*************** +*** 1430,1436 **** + #ifdef FEAT_MBYTE + /* We need to call mb_stricmp() even when we aren't dealing with a multi-byte + * encoding because mb_stricmp() takes care of all ascii and non-ascii +! * encodings, including characters with umluats in latin1, etc., while + * STRICMP() only handles the system locale version, which often does not + * handle non-ascii properly. */ + +--- 1431,1437 ---- + #ifdef FEAT_MBYTE + /* We need to call mb_stricmp() even when we aren't dealing with a multi-byte + * encoding because mb_stricmp() takes care of all ascii and non-ascii +! * encodings, including characters with umlauts in latin1, etc., while + * STRICMP() only handles the system locale version, which often does not + * handle non-ascii properly. */ + +*** ../vim-7.2.380/src/version.c 2010-03-02 15:14:22.000000000 +0100 +--- src/version.c 2010-03-02 15:51:24.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 381, + /**/ + +-- +I'd like to meet the man who invented sex and see what he's working on now. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 0e9b129630fc874d387d848db986b8d1063b30fa Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:10:25 +0000 Subject: [PATCH 0024/3803] - patchlevel 382 --- 7.2.382 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.2.382 diff --git a/7.2.382 b/7.2.382 new file mode 100644 index 00000000..56fcfa44 --- /dev/null +++ b/7.2.382 @@ -0,0 +1,58 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.382 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.382 +Problem: Accessing freed memory when closing the cmdline window when + 'bufhide' is set to "wipe". +Solution: Check if the buffer still exists before invoking close_buffer() + (Dominique Pelle) +Files: src/ex_getln.c + + +*** ../vim-7.2.381/src/ex_getln.c 2010-03-02 15:55:51.000000000 +0100 +--- src/ex_getln.c 2010-03-02 16:29:38.000000000 +0100 +*************** +*** 6252,6258 **** + bp = curbuf; + win_goto(old_curwin); + win_close(wp, TRUE); +! close_buffer(NULL, bp, DOBUF_WIPE); + + /* Restore window sizes. */ + win_size_restore(&winsizes); +--- 6252,6262 ---- + bp = curbuf; + win_goto(old_curwin); + win_close(wp, TRUE); +! +! /* win_close() may have already wiped the buffer when 'bh' is +! * set to 'wipe' */ +! if (buf_valid(bp)) +! close_buffer(NULL, bp, DOBUF_WIPE); + + /* Restore window sizes. */ + win_size_restore(&winsizes); +*** ../vim-7.2.381/src/version.c 2010-03-02 15:55:51.000000000 +0100 +--- src/version.c 2010-03-02 17:22:11.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 382, + /**/ + +-- +You had connectors? Eeee, when I were a lad we 'ad to carry the +bits between the computer and the terminal with a spoon... + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 764b34ea675edee7382bca52d1a2a7d6d6609da7 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:10:38 +0000 Subject: [PATCH 0025/3803] - patchlevel 383 --- 7.2.383 | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 7.2.383 diff --git a/7.2.383 b/7.2.383 new file mode 100644 index 00000000..25fa7142 --- /dev/null +++ b/7.2.383 @@ -0,0 +1,101 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.383 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.383 +Problem: Vim doesn't build cleanly with MSVC 2010. +Solution: Change a few types. (George Reilly) +Files: src/ex_cmds2.c, src/if_python.c, src/syntax.c + + +*** ../vim-7.2.382/src/ex_cmds2.c 2010-02-24 13:59:08.000000000 +0100 +--- src/ex_cmds2.c 2010-03-02 17:42:54.000000000 +0100 +*************** +*** 1165,1171 **** + char_u *arg; + { + char_u *end_subcmd; +- int len; + + /* Default: expand subcommands. */ + xp->xp_context = EXPAND_PROFILE; +--- 1165,1170 ---- +*************** +*** 1176,1183 **** + if (*end_subcmd == NUL) + return; + +! len = end_subcmd - arg; +! if (len == 5 && STRNCMP(arg, "start", 5) == 0) + { + xp->xp_context = EXPAND_FILES; + xp->xp_pattern = skipwhite(end_subcmd); +--- 1175,1181 ---- + if (*end_subcmd == NUL) + return; + +! if (end_subcmd - arg == 5 && STRNCMP(arg, "start", 5) == 0) + { + xp->xp_context = EXPAND_FILES; + xp->xp_pattern = skipwhite(end_subcmd); +*** ../vim-7.2.382/src/if_python.c 2009-11-11 15:06:59.000000000 +0100 +--- src/if_python.c 2010-03-02 17:43:39.000000000 +0100 +*************** +*** 2080,2086 **** + return -1; + + /* When column is out of range silently correct it. */ +! len = STRLEN(ml_get_buf(this->win->w_buffer, lnum, FALSE)); + if (col > len) + col = len; + +--- 2080,2086 ---- + return -1; + + /* When column is out of range silently correct it. */ +! len = (long)STRLEN(ml_get_buf(this->win->w_buffer, lnum, FALSE)); + if (col > len) + col = len; + +*** ../vim-7.2.382/src/syntax.c 2010-02-24 17:22:14.000000000 +0100 +--- src/syntax.c 2010-03-02 17:45:25.000000000 +0100 +*************** +*** 3090,3096 **** + { + /* a "\n" at the end of the pattern may take us below the last line */ + result->lnum = syn_buf->b_ml.ml_line_count; +! col = STRLEN(ml_get_buf(syn_buf, result->lnum, FALSE)); + } + if (off != 0) + { +--- 3090,3096 ---- + { + /* a "\n" at the end of the pattern may take us below the last line */ + result->lnum = syn_buf->b_ml.ml_line_count; +! col = (int)STRLEN(ml_get_buf(syn_buf, result->lnum, FALSE)); + } + if (off != 0) + { +*** ../vim-7.2.382/src/version.c 2010-03-02 17:23:10.000000000 +0100 +--- src/version.c 2010-03-02 17:48:50.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 383, + /**/ + +-- +You were lucky to have a LAKE! There were a hundred and sixty of +us living in a small shoebox in the middle of the road. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From cef82b9973152abf266af713a63a6cc3e248757e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:10:51 +0000 Subject: [PATCH 0026/3803] - patchlevel 384 --- 7.2.384 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 7.2.384 diff --git a/7.2.384 b/7.2.384 new file mode 100644 index 00000000..24fc6807 --- /dev/null +++ b/7.2.384 @@ -0,0 +1,59 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.384 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.384 (extra) +Problem: Vim doesn't build properly with MSVC 2010. +Solution: Add the nmake version to the build file. (George Reilly) +Files: src/Make_mvc.mak, src/testdir/Make_dos.mak + + +*** ../vim-7.2.383/src/Make_mvc.mak 2009-09-11 12:48:56.000000000 +0200 +--- src/Make_mvc.mak 2010-03-02 17:44:22.000000000 +0100 +*************** +*** 361,366 **** +--- 361,369 ---- + !if "$(_NMAKE_VER)" == "10.00.20506.01" + MSVCVER = 10.0 + !endif ++ !if "$(_NMAKE_VER)" == "10.00.30128.01" ++ MSVCVER = 10.0 ++ !endif + !endif + + # Abort bulding VIM if version of VC is unrecognised. +*** ../vim-7.2.383/src/testdir/Make_dos.mak 2010-01-19 15:51:29.000000000 +0100 +--- src/testdir/Make_dos.mak 2010-03-02 17:45:48.000000000 +0100 +*************** +*** 56,61 **** +--- 56,62 ---- + -if exist small.vim del small.vim + -if exist tiny.vim del tiny.vim + -if exist mbyte.vim del mbyte.vim ++ -if exist mzscheme.vim del mzscheme.vim + -del X* + -if exist viminfo del viminfo + +*** ../vim-7.2.383/src/version.c 2010-03-02 17:50:30.000000000 +0100 +--- src/version.c 2010-03-02 17:59:09.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 384, + /**/ + +-- +Yah, well, we had to carve our electrons out of driftwood we'd +find. In the winter. Uphill. Both ways. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e2323cf130a9c9bf2b7e969c23152bce773690a3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:11:04 +0000 Subject: [PATCH 0027/3803] - patchlevel 385 --- 7.2.385 | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 7.2.385 diff --git a/7.2.385 b/7.2.385 new file mode 100644 index 00000000..9f9a9178 --- /dev/null +++ b/7.2.385 @@ -0,0 +1,63 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.385 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.385 +Problem: When in the command line window dragging status line only works + for last-but-one window. (Jean Johner) +Solution: Remove the code that disallows this. +Files: src/ui.c + + +*** ../vim-7.2.384/src/ui.c 2010-01-19 14:59:14.000000000 +0100 +--- src/ui.c 2010-03-02 18:06:30.000000000 +0100 +*************** +*** 2598,2611 **** + if (cmdwin_type != 0 && wp != curwin) + { + /* A click outside the command-line window: Use modeless +! * selection if possible. Allow dragging the status line of +! * windows just above the command-line window. */ +! if (wp->w_winrow + wp->w_height +! != curwin->w_prev->w_winrow + curwin->w_prev->w_height) +! { +! on_status_line = 0; +! dragwin = NULL; +! } + # ifdef FEAT_VERTSPLIT + on_sep_line = 0; + # endif +--- 2598,2604 ---- + if (cmdwin_type != 0 && wp != curwin) + { + /* A click outside the command-line window: Use modeless +! * selection if possible. Allow dragging the status lines. */ + # ifdef FEAT_VERTSPLIT + on_sep_line = 0; + # endif +*** ../vim-7.2.384/src/version.c 2010-03-02 17:59:39.000000000 +0100 +--- src/version.c 2010-03-02 18:14:29.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 385, + /**/ + +-- +You were lucky. We lived for three months in a brown paper bag in a +septic tank. We used to have to get up at six o'clock in the morning, +clean the bag, eat a crust of stale bread, go to work down mill for +fourteen hours a day week in-week out. When we got home, our Dad +would thrash us to sleep with his belt! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 0d12ac6fc8f444738ba12ac89f68e45b4995ab38 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:11:18 +0000 Subject: [PATCH 0028/3803] - patchlevel 386 --- 7.2.386 | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 7.2.386 diff --git a/7.2.386 b/7.2.386 new file mode 100644 index 00000000..7212b27c --- /dev/null +++ b/7.2.386 @@ -0,0 +1,61 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.386 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.386 +Problem: Focus hack for KDE 3.1 causes problems for other window managers. +Solution: Remove the hack. (forwarded by Joel Bradshaw) +Files: src/gui_gtk.c + + +*** ../vim-7.2.385/src/gui_gtk.c 2009-05-17 16:23:20.000000000 +0200 +--- src/gui_gtk.c 2010-03-10 12:07:59.000000000 +0100 +*************** +*** 2313,2331 **** + gtk_widget_destroy(dialog); + } + +- /* Terrible hack: When the text area still has focus when we remove the +- * dialog, somehow gvim loses window focus. This is with "point to type" +- * in the KDE 3.1 window manager. Warp the mouse pointer to outside the +- * window and back to avoid that. */ +- if (!gui.in_focus) +- { +- int x, y; +- +- gdk_window_get_pointer(gui.drawarea->window, &x, &y, NULL); +- gui_mch_setmouse(-100, -100); +- gui_mch_setmouse(x, y); +- } +- + return response > 0 ? response : 0; + } + +--- 2313,2318 ---- +*** ../vim-7.2.385/src/version.c 2010-03-02 18:15:47.000000000 +0100 +--- src/version.c 2010-03-10 12:09:00.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 386, + /**/ + +-- +ARTHUR: Well, I AM king... +DENNIS: Oh king, eh, very nice. An' how'd you get that, eh? By exploitin' + the workers -- by 'angin' on to outdated imperialist dogma which + perpetuates the economic an' social differences in our society! If + there's ever going to be any progress-- + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 84f32794b6e31647cfae642c95c51be498d52eff Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:11:31 +0000 Subject: [PATCH 0029/3803] - patchlevel 387 --- 7.2.387 | 238 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 238 insertions(+) create mode 100644 7.2.387 diff --git a/7.2.387 b/7.2.387 new file mode 100644 index 00000000..ccbd6e4c --- /dev/null +++ b/7.2.387 @@ -0,0 +1,238 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.387 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.387 +Problem: Ruby with MingW still doesn't build all versions. +Solution: More #ifdefs for the Ruby code. (Sergey Khorev) +Files: src/if_ruby.c + + +*** ../vim-7.2.386/src/if_ruby.c 2010-02-24 15:47:58.000000000 +0100 +--- src/if_ruby.c 2010-03-10 12:40:30.000000000 +0100 +*************** +*** 39,46 **** + # define rb_cTrueClass (*dll_rb_cTrueClass) + # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + /* +! * On ver 1.8, all Ruby functions are exported with "__declspce(dllimport)" +! * in ruby.h. But it cause trouble for these variables, because it is + * defined in this file. When defined this RUBY_EXPORT it modified to + * "extern" and be able to avoid this problem. + */ +--- 39,46 ---- + # define rb_cTrueClass (*dll_rb_cTrueClass) + # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + /* +! * On ver 1.8, all Ruby functions are exported with "__declspec(dllimport)" +! * in ruby.h. But it causes trouble for these variables, because it is + * defined in this file. When defined this RUBY_EXPORT it modified to + * "extern" and be able to avoid this problem. + */ +*************** +*** 53,58 **** +--- 53,65 ---- + # undef _WIN32_WINNT + #endif + ++ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 ++ /* Ruby 1.9 defines a number of static functions which use rb_num2long and ++ * rb_int2big */ ++ # define rb_num2long rb_num2long_stub ++ # define rb_int2big rb_int2big_stub ++ #endif ++ + #include + #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + # include +*************** +*** 159,165 **** + #define rb_str_concat dll_rb_str_concat + #define rb_str_new dll_rb_str_new + #define rb_str_new2 dll_rb_str_new2 +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + # define rb_errinfo dll_rb_errinfo + #else + # define ruby_errinfo (*dll_ruby_errinfo) +--- 166,179 ---- + #define rb_str_concat dll_rb_str_concat + #define rb_str_new dll_rb_str_new + #define rb_str_new2 dll_rb_str_new2 +! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 +! # define rb_string_value_ptr dll_rb_string_value_ptr +! # define rb_float_new dll_rb_float_new +! # define rb_ary_new dll_rb_ary_new +! # define rb_ary_push dll_rb_ary_push +! #endif +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ +! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 + # define rb_errinfo dll_rb_errinfo + #else + # define ruby_errinfo (*dll_ruby_errinfo) +*************** +*** 226,232 **** + static VALUE (*dll_rb_str_concat) (VALUE, VALUE); + static VALUE (*dll_rb_str_new) (const char*, long); + static VALUE (*dll_rb_str_new2) (const char*); +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + static VALUE (*dll_rb_errinfo) (void); + #else + static VALUE *dll_ruby_errinfo; +--- 240,247 ---- + static VALUE (*dll_rb_str_concat) (VALUE, VALUE); + static VALUE (*dll_rb_str_new) (const char*, long); + static VALUE (*dll_rb_str_new2) (const char*); +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ +! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 + static VALUE (*dll_rb_errinfo) (void); + #else + static VALUE *dll_ruby_errinfo; +*************** +*** 235,240 **** +--- 250,264 ---- + static void (*dll_ruby_init_loadpath) (void); + static void (*dll_NtInitialize) (int*, char***); + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 ++ static char * (*dll_rb_string_value_ptr) (volatile VALUE*); ++ static VALUE (*dll_rb_float_new) (double); ++ static VALUE (*dll_rb_ary_new) (void); ++ static VALUE (*dll_rb_ary_push) (VALUE, VALUE); ++ #endif ++ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 ++ static VALUE (*dll_rb_int2big)(SIGNED_VALUE); ++ #endif ++ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...); + #endif + +*************** +*** 246,251 **** +--- 270,286 ---- + static VALUE (*dll_rb_sprintf) (const char*, ...); + #endif + ++ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 ++ static SIGNED_VALUE rb_num2long_stub(VALUE x) ++ { ++ return dll_rb_num2long(x); ++ } ++ static VALUE rb_int2big_stub(SIGNED_VALUE x) ++ { ++ return dll_rb_int2big(x); ++ } ++ #endif ++ + static HINSTANCE hinstRuby = 0; /* Instance of ruby.dll */ + + /* +*************** +*** 301,317 **** + {"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat}, + {"rb_str_new", (RUBY_PROC*)&dll_rb_str_new}, + {"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2}, +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + {"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo}, + #else + {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo}, + #endif + {"ruby_init", (RUBY_PROC*)&dll_ruby_init}, + {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath}, +! {"NtInitialize", (RUBY_PROC*)&dll_NtInitialize}, + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf}, + #endif + #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + {"ruby_script", (RUBY_PROC*)&dll_ruby_script}, + {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, +--- 336,368 ---- + {"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat}, + {"rb_str_new", (RUBY_PROC*)&dll_rb_str_new}, + {"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2}, +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ +! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 + {"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo}, + #else + {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo}, + #endif + {"ruby_init", (RUBY_PROC*)&dll_ruby_init}, + {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath}, +! { +! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER < 19 +! "NtInitialize", +! #else +! "ruby_sysinit", +! #endif +! (RUBY_PROC*)&dll_NtInitialize}, + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf}, + #endif ++ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 ++ {"rb_string_value_ptr", (RUBY_PROC*)&dll_rb_string_value_ptr}, ++ {"rb_float_new", (RUBY_PROC*)&dll_rb_float_new}, ++ {"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new}, ++ {"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push}, ++ #endif ++ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 ++ {"rb_int2big", (RUBY_PROC*)&dll_rb_int2big}, ++ #endif + #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + {"ruby_script", (RUBY_PROC*)&dll_ruby_script}, + {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, +*************** +*** 569,575 **** + static void error_print(int state) + { + #ifndef DYNAMIC_RUBY +! #if !(defined(RUBY_VERSION) && RUBY_VERSION >= 19) + RUBYEXTERN VALUE ruby_errinfo; + #endif + #endif +--- 620,627 ---- + static void error_print(int state) + { + #ifndef DYNAMIC_RUBY +! #if !(defined(RUBY_VERSION) && RUBY_VERSION >= 19) \ +! && !(defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19) + RUBYEXTERN VALUE ruby_errinfo; + #endif + #endif +*************** +*** 605,611 **** + break; + case TAG_RAISE: + case TAG_FATAL: +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + eclass = CLASS_OF(rb_errinfo()); + einfo = rb_obj_as_string(rb_errinfo()); + #else +--- 657,664 ---- + break; + case TAG_RAISE: + case TAG_FATAL: +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ +! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 + eclass = CLASS_OF(rb_errinfo()); + einfo = rb_obj_as_string(rb_errinfo()); + #else +*** ../vim-7.2.386/src/version.c 2010-03-10 12:24:44.000000000 +0100 +--- src/version.c 2010-03-10 12:45:55.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 387, + /**/ + +-- +Vim is like Emacs without all the typing. (John "Johann" Spetz) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From bd03dfbeec7047703c6352609b3e8cdf3f8e7c45 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:11:44 +0000 Subject: [PATCH 0030/3803] - patchlevel 388 --- 7.2.388 | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 7.2.388 diff --git a/7.2.388 b/7.2.388 new file mode 100644 index 00000000..1a8a7a88 --- /dev/null +++ b/7.2.388 @@ -0,0 +1,86 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.388 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.388 (extra part of 7.2.387) +Problem: Ruby with MingW still doesn't build all versions. +Solution: Different approach to build file. (Sergey Khorev) +Files: src/Make_ming.mak + + +*** ../vim-7.2.387/src/Make_ming.mak 2010-02-26 22:05:17.000000000 +0100 +--- src/Make_ming.mak 2010-03-10 12:34:25.000000000 +0100 +*************** +*** 212,234 **** + RUBY_VER_LONG = 1.6 + endif + +- ifeq ($(RUBY_VER), 16) + ifndef RUBY_PLATFORM + RUBY_PLATFORM = i586-mswin32 +! endif +! ifndef RUBY_INSTALL_NAME +! RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER) +! endif + else +- ifndef RUBY_PLATFORM + RUBY_PLATFORM = i386-mswin32 + endif + ifndef RUBY_INSTALL_NAME + RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER) + endif + endif + +! RUBYINC =-I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM) + ifeq (no, $(DYNAMIC_RUBY)) + RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME) + endif +--- 212,236 ---- + RUBY_VER_LONG = 1.6 + endif + + ifndef RUBY_PLATFORM ++ ifeq ($(RUBY_VER), 16) + RUBY_PLATFORM = i586-mswin32 +! else ifneq ("X$(wildcard, $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32)", X) +! RUBY_PLATFORM = i386-mingw32 + else + RUBY_PLATFORM = i386-mswin32 + endif ++ endif ++ + ifndef RUBY_INSTALL_NAME ++ ifeq ($(RUBY_VER), 16) ++ RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER) ++ else + RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER) + endif + endif + +! RUBYINC =-I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM) -I $(RUBY)/include/ruby-$(RUBY_VER_LONG) -I $(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM) + ifeq (no, $(DYNAMIC_RUBY)) + RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME) + endif +*** ../vim-7.2.387/src/version.c 2010-03-10 12:46:38.000000000 +0100 +--- src/version.c 2010-03-10 13:18:38.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 388, + /**/ + +-- +Q: Is selling software the same as selling hardware? +A: No, good hardware is sold new, good software has already been used by many. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 0be68c2c3f6ea2d935e872a6ab0b32c25090967d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:11:57 +0000 Subject: [PATCH 0031/3803] - patchlevel 389 --- 7.2.389 | 161 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 7.2.389 diff --git a/7.2.389 b/7.2.389 new file mode 100644 index 00000000..a4af355f --- /dev/null +++ b/7.2.389 @@ -0,0 +1,161 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.389 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.389 +Problem: synIDattr() cannot return the font. +Solution: Support the "font" argument. (Christian Brabandt) +Files: runtime/doc/eval.txt, src/eval.c, src/syntax.c + + +*** ../vim-7.2.388/runtime/doc/eval.txt 2010-01-19 15:51:29.000000000 +0100 +--- runtime/doc/eval.txt 2010-03-10 12:52:12.000000000 +0100 +*************** +*** 5370,5375 **** +--- 5388,5395 ---- + the color, cterm: color number as a string, + term: empty string) + "bg" background color (as with "fg") ++ "font" font name (only available in the GUI) ++ |highlight-font| + "sp" special color (as with "fg") |highlight-guisp| + "fg#" like "fg", but for the GUI and the GUI is + running the name in "#RRGGBB" form +*************** +*** 5379,5384 **** +--- 5399,5405 ---- + "italic" "1" if italic + "reverse" "1" if reverse + "inverse" "1" if inverse (= reverse) ++ "standout" "1" if standout + "underline" "1" if underlined + "undercurl" "1" if undercurled + +*** ../vim-7.2.388/src/eval.c 2010-02-24 15:47:58.000000000 +0100 +--- src/eval.c 2010-03-10 12:54:27.000000000 +0100 +*************** +*** 16627,16633 **** + p = highlight_has_attr(id, HL_BOLD, modec); + break; + +! case 'f': /* fg[#] */ + p = highlight_color(id, what, modec); + break; + +--- 16627,16633 ---- + p = highlight_has_attr(id, HL_BOLD, modec); + break; + +! case 'f': /* fg[#] or font */ + p = highlight_color(id, what, modec); + break; + +*** ../vim-7.2.388/src/syntax.c 2010-03-02 17:50:30.000000000 +0100 +--- src/syntax.c 2010-03-10 13:05:39.000000000 +0100 +*************** +*** 8326,8332 **** + char_u * + highlight_color(id, what, modec) + int id; +! char_u *what; /* "fg", "bg", "sp", "fg#", "bg#" or "sp#" */ + int modec; /* 'g' for GUI, 'c' for cterm, 't' for term */ + { + static char_u name[20]; +--- 8326,8332 ---- + char_u * + highlight_color(id, what, modec) + int id; +! char_u *what; /* "font", "fg", "bg", "sp", "fg#", "bg#" or "sp#" */ + int modec; /* 'g' for GUI, 'c' for cterm, 't' for term */ + { + static char_u name[20]; +*************** +*** 8334,8353 **** + int fg = FALSE; + # ifdef FEAT_GUI + int sp = FALSE; + # endif + + if (id <= 0 || id > highlight_ga.ga_len) + return NULL; + +! if (TOLOWER_ASC(what[0]) == 'f') + fg = TRUE; + # ifdef FEAT_GUI +! else if (TOLOWER_ASC(what[0]) == 's') + sp = TRUE; + if (modec == 'g') + { + /* return #RRGGBB form (only possible when GUI is running) */ +! if (gui.in_use && what[1] && what[2] == '#') + { + guicolor_T color; + long_u rgb; +--- 8334,8363 ---- + int fg = FALSE; + # ifdef FEAT_GUI + int sp = FALSE; ++ int font = FALSE; + # endif + + if (id <= 0 || id > highlight_ga.ga_len) + return NULL; + +! if (TOLOWER_ASC(what[0]) == 'f' && TOLOWER_ASC(what[1]) == 'g') + fg = TRUE; + # ifdef FEAT_GUI +! else if (TOLOWER_ASC(what[0]) == 'f' && TOLOWER_ASC(what[1]) == 'o' +! && TOLOWER_ASC(what[2]) == 'n' && TOLOWER_ASC(what[3]) == 't') +! font = TRUE; +! else if (TOLOWER_ASC(what[0]) == 's' && TOLOWER_ASC(what[1]) == 'p') + sp = TRUE; ++ else if (!(TOLOWER_ASC(what[0]) == 'b' && TOLOWER_ASC(what[1]) == 'g')) ++ return NULL; + if (modec == 'g') + { ++ /* return font name */ ++ if (font) ++ return HL_TABLE()[id - 1].sg_font_name; ++ + /* return #RRGGBB form (only possible when GUI is running) */ +! if (gui.in_use && what[2] == '#') + { + guicolor_T color; + long_u rgb; +*************** +*** 8374,8379 **** +--- 8384,8391 ---- + return (HL_TABLE()[id - 1].sg_gui_sp_name); + return (HL_TABLE()[id - 1].sg_gui_bg_name); + } ++ if (font || sp) ++ return NULL; + # endif + if (modec == 'c') + { +*** ../vim-7.2.388/src/version.c 2010-03-10 13:19:28.000000000 +0100 +--- src/version.c 2010-03-10 13:33:25.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 389, + /**/ + +-- +WOMAN: Dennis, there's some lovely filth down here. Oh -- how d'you do? +ARTHUR: How do you do, good lady. I am Arthur, King of the Britons. + Who's castle is that? +WOMAN: King of the who? + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9404b7f2af18dee600b014028bd2c17f63cbf199 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:12:11 +0000 Subject: [PATCH 0032/3803] - patchlevel 390 --- 7.2.390 | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 7.2.390 diff --git a/7.2.390 b/7.2.390 new file mode 100644 index 00000000..d10ed2a4 --- /dev/null +++ b/7.2.390 @@ -0,0 +1,72 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.390 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.390 +Problem: In some situations the popup menu can be displayed wrong. +Solution: Remove the popup menu if the cursor moved. (Lech Lorens) +Files: src/edit.c + + +*** ../vim-7.2.389/src/edit.c 2010-01-19 14:59:14.000000000 +0100 +--- src/edit.c 2010-03-10 14:09:56.000000000 +0100 +*************** +*** 4684,4689 **** +--- 4684,4690 ---- + int startcol = 0; /* column where searched text starts */ + colnr_T curs_col; /* cursor column */ + int n; ++ int save_w_wrow; + + compl_direction = ins_compl_key2dir(c); + if (!compl_started) +*************** +*** 5067,5072 **** +--- 5068,5074 ---- + /* + * Find next match (and following matches). + */ ++ save_w_wrow = curwin->w_wrow; + n = ins_compl_next(TRUE, ins_compl_key2count(c), ins_compl_use_match(c)); + + /* may undisplay the popup menu */ +*************** +*** 5220,5225 **** +--- 5222,5233 ---- + /* RedrawingDisabled may be set when invoked through complete(). */ + n = RedrawingDisabled; + RedrawingDisabled = 0; ++ ++ /* If the cursor moved we need to remove the pum first. */ ++ setcursor(); ++ if (save_w_wrow != curwin->w_wrow) ++ ins_compl_del_pum(); ++ + ins_compl_show_pum(); + setcursor(); + RedrawingDisabled = n; +*** ../vim-7.2.389/src/version.c 2010-03-10 13:43:22.000000000 +0100 +--- src/version.c 2010-03-10 14:13:55.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 390, + /**/ + +-- +`When any government, or any church for that matter, undertakes to say to + its subjects, "This you may not read, this you must not see, this you are + forbidden to know," the end result is tyranny and oppression no matter how + holy the motives' -- Robert A Heinlein, "If this goes on --" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 2da1221fd8301e966c666ec6684b282ec0cfcf5d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:12:24 +0000 Subject: [PATCH 0033/3803] - patchlevel 391 --- 7.2.391 | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 7.2.391 diff --git a/7.2.391 b/7.2.391 new file mode 100644 index 00000000..731408de --- /dev/null +++ b/7.2.391 @@ -0,0 +1,121 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.391 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.391 +Problem: Internal alloc(0) error when doing "CTRL-V $ c". (Martti Kuparinen) +Solution: Fix computations in getvcol(). (partly by Lech Lorens) +Files: src/charset.c, src/memline.c + + +*** ../vim-7.2.390/src/charset.c 2009-11-03 16:03:59.000000000 +0100 +--- src/charset.c 2010-03-10 14:38:14.000000000 +0100 +*************** +*** 1255,1261 **** + + vcol = 0; + ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE); +! posptr = ptr + pos->col; + + /* + * This function is used very often, do some speed optimizations. +--- 1255,1264 ---- + + vcol = 0; + ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE); +! if (pos->col == MAXCOL) +! posptr = NULL; /* continue until the NUL */ +! else +! posptr = ptr + pos->col; + + /* + * This function is used very often, do some speed optimizations. +*************** +*** 1313,1319 **** + incr = CHARSIZE(c); + } + +! if (ptr >= posptr) /* character at pos->col */ + break; + + vcol += incr; +--- 1316,1322 ---- + incr = CHARSIZE(c); + } + +! if (posptr != NULL && ptr >= posptr) /* character at pos->col */ + break; + + vcol += incr; +*************** +*** 1334,1340 **** + break; + } + +! if (ptr >= posptr) /* character at pos->col */ + break; + + vcol += incr; +--- 1337,1343 ---- + break; + } + +! if (posptr != NULL && ptr >= posptr) /* character at pos->col */ + break; + + vcol += incr; +*** ../vim-7.2.390/src/memline.c 2010-02-11 18:54:38.000000000 +0100 +--- src/memline.c 2010-03-10 14:38:25.000000000 +0100 +*************** +*** 2113,2124 **** + if (buf->b_ml.ml_mfp == NULL) /* there are no lines */ + return (char_u *)""; + +! /* +! * See if it is the same line as requested last time. +! * Otherwise may need to flush last used line. +! * Don't use the last used line when 'swapfile' is reset, need to load all +! * blocks. +! */ + if (buf->b_ml.ml_line_lnum != lnum || mf_dont_release) + { + ml_flush_line(buf); +--- 2113,2124 ---- + if (buf->b_ml.ml_mfp == NULL) /* there are no lines */ + return (char_u *)""; + +! /* +! * See if it is the same line as requested last time. +! * Otherwise may need to flush last used line. +! * Don't use the last used line when 'swapfile' is reset, need to load all +! * blocks. +! */ + if (buf->b_ml.ml_line_lnum != lnum || mf_dont_release) + { + ml_flush_line(buf); +*** ../vim-7.2.390/src/version.c 2010-03-10 14:15:28.000000000 +0100 +--- src/version.c 2010-03-10 14:31:02.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 391, + /**/ + +-- +WOMAN: King of the who? +ARTHUR: The Britons. +WOMAN: Who are the Britons? +ARTHUR: Well, we all are. we're all Britons and I am your king. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 90b7d6d9ab7f411e8b071855fc9282d34f865030 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:12:37 +0000 Subject: [PATCH 0034/3803] - patchlevel 392 --- 7.2.392 | 184 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 7.2.392 diff --git a/7.2.392 b/7.2.392 new file mode 100644 index 00000000..c253d91b --- /dev/null +++ b/7.2.392 @@ -0,0 +1,184 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.392 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.392 +Problem: Netbeans hangs reading from a socket at the maximum block size. +Solution: Use select() or poll(). (Xavier de Gaye) +Files: src/vim.h, src/os_unixx.h, src/if_xcmdsrv.c, src/netbeans.c + + +*** ../vim-7.2.391/src/vim.h 2010-03-02 15:55:51.000000000 +0100 +--- src/vim.h 2010-03-10 15:14:03.000000000 +0100 +*************** +*** 477,482 **** +--- 477,499 ---- + # include + #endif + ++ # if defined(HAVE_SYS_SELECT_H) && \ ++ (!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME)) ++ # include ++ # endif ++ ++ # ifndef HAVE_SELECT ++ # ifdef HAVE_SYS_POLL_H ++ # include ++ # define HAVE_POLL ++ # else ++ # ifdef HAVE_POLL_H ++ # include ++ # define HAVE_POLL ++ # endif ++ # endif ++ # endif ++ + /* ================ end of the header file puzzle =============== */ + + /* +*** ../vim-7.2.391/src/os_unixx.h 2006-03-25 22:48:00.000000000 +0100 +--- src/os_unixx.h 2010-03-10 15:14:49.000000000 +0100 +*************** +*** 28,38 **** + # include + # endif + +- # if defined(HAVE_SYS_SELECT_H) && \ +- (!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME)) +- # include +- # endif +- + # ifndef WEXITSTATUS + # ifdef HAVE_UNION_WAIT + # define WEXITSTATUS(stat_val) ((stat_val).w_T.w_Retcode) +--- 28,33 ---- +*************** +*** 65,80 **** + # include + #endif + +- #ifndef HAVE_SELECT +- # ifdef HAVE_SYS_POLL_H +- # include +- # else +- # ifdef HAVE_POLL_H +- # include +- # endif +- # endif +- #endif +- + #ifdef HAVE_SYS_STREAM_H + # include + #endif +--- 60,65 ---- +*** ../vim-7.2.391/src/if_xcmdsrv.c 2009-05-16 17:29:37.000000000 +0200 +--- src/if_xcmdsrv.c 2010-03-10 15:14:09.000000000 +0100 +*************** +*** 21,41 **** + # include + # endif + +- # if defined(HAVE_SYS_SELECT_H) && \ +- (!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME)) +- # include +- # endif +- +- # ifndef HAVE_SELECT +- # ifdef HAVE_SYS_POLL_H +- # include +- # else +- # ifdef HAVE_POLL_H +- # include +- # endif +- # endif +- # endif +- + /* + * This file provides procedures that implement the command server + * functionality of Vim when in contact with an X11 server. +--- 21,26 ---- +*** ../vim-7.2.391/src/netbeans.c 2010-01-19 15:12:33.000000000 +0100 +--- src/netbeans.c 2010-03-10 15:21:37.000000000 +0100 +*************** +*** 736,741 **** +--- 736,749 ---- + #ifndef FEAT_GUI_GTK + static int level = 0; + #endif ++ #ifdef HAVE_SELECT ++ struct timeval tval; ++ fd_set rfds; ++ #else ++ # ifdef HAVE_POLL ++ struct pollfd fds; ++ # endif ++ #endif + + if (sd < 0) + { +*************** +*** 755,763 **** + return; /* out of memory! */ + } + +! /* Keep on reading for as long as there is something to read. */ + for (;;) + { + len = sock_read(sd, buf, MAXMSGSIZE); + if (len <= 0) + break; /* error or nothing more to read */ +--- 763,788 ---- + return; /* out of memory! */ + } + +! /* Keep on reading for as long as there is something to read. +! * Use select() or poll() to avoid blocking on a message that is exactly +! * MAXMSGSIZE long. */ + for (;;) + { ++ #ifdef HAVE_SELECT ++ FD_ZERO(&rfds); ++ FD_SET(sd, &rfds); ++ tval.tv_sec = 0; ++ tval.tv_usec = 0; ++ if (select(sd + 1, &rfds, NULL, NULL, &tval) <= 0) ++ break; ++ #else ++ # ifdef HAVE_POLL ++ fds.fd = sd; ++ fds.events = POLLIN; ++ if (poll(&fds, 1, 0) <= 0) ++ break; ++ # endif ++ #endif + len = sock_read(sd, buf, MAXMSGSIZE); + if (len <= 0) + break; /* error or nothing more to read */ +*** ../vim-7.2.391/src/version.c 2010-03-10 14:46:21.000000000 +0100 +--- src/version.c 2010-03-10 16:10:48.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 392, + /**/ + +-- +WOMAN: I didn't know we had a king. I thought we were an autonomous + collective. +DENNIS: You're fooling yourself. We're living in a dictatorship. A + self-perpetuating autocracy in which the working classes-- +WOMAN: Oh there you go, bringing class into it again. +DENNIS: That's what it's all about if only people would-- + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e769f1b2e80f32c14cef15a72337f8511a8f2398 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:12:50 +0000 Subject: [PATCH 0035/3803] - patchlevel 393 --- 7.2.393 | 281 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 281 insertions(+) create mode 100644 7.2.393 diff --git a/7.2.393 b/7.2.393 new file mode 100644 index 00000000..796f6548 --- /dev/null +++ b/7.2.393 @@ -0,0 +1,281 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.393 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.393 +Problem: Mac: Can't build with different Xcode developer tools directory. +Solution: make "Developer" directory name configurable. (Rainer Muller) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.2.392/src/configure.in 2010-02-24 14:46:58.000000000 +0100 +--- src/configure.in 2010-03-10 16:16:48.000000000 +0100 +*************** +*** 116,121 **** +--- 116,137 ---- + MACARCH="$withval"; AC_MSG_RESULT($MACARCH), + MACARCH="current"; AC_MSG_RESULT(defaulting to $MACARCH)) + ++ AC_MSG_CHECKING(--with-developer-dir argument) ++ AC_ARG_WITH(developer-dir, [ --with-developer-dir=PATH use PATH as location for Xcode developer tools], ++ DEVELOPER_DIR="$withval"; AC_MSG_RESULT($DEVELOPER_DIR), ++ DEVELOPER_DIR=""; AC_MSG_RESULT(not present)) ++ ++ if test "x$DEVELOPER_DIR" = "x"; then ++ AC_PATH_PROG(XCODE_SELECT, xcode-select) ++ if test "x$XCODE_SELECT" != "x"; then ++ AC_MSG_CHECKING(for developer dir using xcode-select) ++ DEVELOPER_DIR=`$XCODE_SELECT -print-path` ++ AC_MSG_RESULT([$DEVELOPER_DIR]) ++ else ++ DEVELOPER_DIR=/Developer ++ fi ++ fi ++ + if test "x$MACARCH" = "xboth"; then + AC_MSG_CHECKING(for 10.4 universal SDK) + dnl There is a terrible inconsistency (but we appear to get away with it): +*************** +*** 127,133 **** + save_cppflags="$CPPFLAGS" + save_cflags="$CFLAGS" + save_ldflags="$LDFLAGS" +! CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" + AC_TRY_LINK([ ], [ ], + AC_MSG_RESULT(found, will make universal binary), + +--- 143,149 ---- + save_cppflags="$CPPFLAGS" + save_cflags="$CFLAGS" + save_ldflags="$LDFLAGS" +! CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" + AC_TRY_LINK([ ], [ ], + AC_MSG_RESULT(found, will make universal binary), + +*************** +*** 157,165 **** + dnl TODO: use -arch i386 on Intel machines + CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" + if test "x$MACARCH" = "xboth"; then +! CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon" + else +! CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon" + fi + + dnl If Carbon is found, assume we don't want X11 +--- 173,181 ---- + dnl TODO: use -arch i386 on Intel machines + CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" + if test "x$MACARCH" = "xboth"; then +! CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon" + else +! CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon" + fi + + dnl If Carbon is found, assume we don't want X11 +*************** +*** 3233,3239 **** + fi + fi + if test "x$MACARCH" = "xboth"; then +! LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" + fi + + dnl gcc 3.1 changed the meaning of -MM. The only solution appears to be to +--- 3249,3255 ---- + fi + fi + if test "x$MACARCH" = "xboth"; then +! LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" + fi + + dnl gcc 3.1 changed the meaning of -MM. The only solution appears to be to +*** ../vim-7.2.392/src/auto/configure 2010-02-24 14:46:58.000000000 +0100 +--- src/auto/configure 2010-03-10 16:19:47.000000000 +0100 +*************** +*** 718,723 **** +--- 718,724 ---- + VIMNAME + OS_EXTRA_OBJ + OS_EXTRA_SRC ++ XCODE_SELECT + CPP_MM + STRIP + AWK +*************** +*** 774,779 **** +--- 775,781 ---- + enable_option_checking + enable_darwin + with_mac_arch ++ with_developer_dir + with_local_dir + with_vim_name + with_ex_name +*************** +*** 1492,1497 **** +--- 1494,1500 ---- + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-mac-arch=ARCH current, intel, ppc or both ++ --with-developer-dir=PATH use PATH as location for Xcode developer tools + --with-local-dir=PATH search PATH instead of /usr/local for local libraries. + --without-local-dir do not search /usr/local for local libraries. + --with-vim-name=NAME what to call the Vim executable +*************** +*** 3833,3845 **** + fi + + + if test "x$MACARCH" = "xboth"; then + { $as_echo "$as_me:$LINENO: checking for 10.4 universal SDK" >&5 + $as_echo_n "checking for 10.4 universal SDK... " >&6; } + save_cppflags="$CPPFLAGS" + save_cflags="$CFLAGS" + save_ldflags="$LDFLAGS" +! CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +--- 3836,3913 ---- + fi + + ++ { $as_echo "$as_me:$LINENO: checking --with-developer-dir argument" >&5 ++ $as_echo_n "checking --with-developer-dir argument... " >&6; } ++ ++ # Check whether --with-developer-dir was given. ++ if test "${with_developer_dir+set}" = set; then ++ withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { $as_echo "$as_me:$LINENO: result: $DEVELOPER_DIR" >&5 ++ $as_echo "$DEVELOPER_DIR" >&6; } ++ else ++ DEVELOPER_DIR=""; { $as_echo "$as_me:$LINENO: result: not present" >&5 ++ $as_echo "not present" >&6; } ++ fi ++ ++ ++ if test "x$DEVELOPER_DIR" = "x"; then ++ # Extract the first word of "xcode-select", so it can be a program name with args. ++ set dummy xcode-select; ac_word=$2 ++ { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++ $as_echo_n "checking for $ac_word... " >&6; } ++ if test "${ac_cv_path_XCODE_SELECT+set}" = set; then ++ $as_echo_n "(cached) " >&6 ++ else ++ case $XCODE_SELECT in ++ [\\/]* | ?:[\\/]*) ++ ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path. ++ ;; ++ *) ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++ for as_dir in $PATH ++ do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_path_XCODE_SELECT="$as_dir/$ac_word$ac_exec_ext" ++ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++ done ++ done ++ IFS=$as_save_IFS ++ ++ ;; ++ esac ++ fi ++ XCODE_SELECT=$ac_cv_path_XCODE_SELECT ++ if test -n "$XCODE_SELECT"; then ++ { $as_echo "$as_me:$LINENO: result: $XCODE_SELECT" >&5 ++ $as_echo "$XCODE_SELECT" >&6; } ++ else ++ { $as_echo "$as_me:$LINENO: result: no" >&5 ++ $as_echo "no" >&6; } ++ fi ++ ++ ++ if test "x$XCODE_SELECT" != "x"; then ++ { $as_echo "$as_me:$LINENO: checking for developer dir using xcode-select" >&5 ++ $as_echo_n "checking for developer dir using xcode-select... " >&6; } ++ DEVELOPER_DIR=`$XCODE_SELECT -print-path` ++ { $as_echo "$as_me:$LINENO: result: $DEVELOPER_DIR" >&5 ++ $as_echo "$DEVELOPER_DIR" >&6; } ++ else ++ DEVELOPER_DIR=/Developer ++ fi ++ fi ++ + if test "x$MACARCH" = "xboth"; then + { $as_echo "$as_me:$LINENO: checking for 10.4 universal SDK" >&5 + $as_echo_n "checking for 10.4 universal SDK... " >&6; } + save_cppflags="$CPPFLAGS" + save_cflags="$CFLAGS" + save_ldflags="$LDFLAGS" +! CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +*************** +*** 3960,3968 **** + OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" + CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" + if test "x$MACARCH" = "xboth"; then +! CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon" + else +! CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon" + fi + + # On IRIX 5.3, sys/types and inttypes.h are conflicting. +--- 4028,4036 ---- + OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" + CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" + if test "x$MACARCH" = "xboth"; then +! CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon" + else +! CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon" + fi + + # On IRIX 5.3, sys/types and inttypes.h are conflicting. +*************** +*** 17319,17325 **** + fi + fi + if test "x$MACARCH" = "xboth"; then +! LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" + fi + + DEPEND_CFLAGS_FILTER= +--- 17387,17393 ---- + fi + fi + if test "x$MACARCH" = "xboth"; then +! LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" + fi + + DEPEND_CFLAGS_FILTER= +*** ../vim-7.2.392/src/version.c 2010-03-10 16:11:57.000000000 +0100 +--- src/version.c 2010-03-10 16:26:00.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 393, + /**/ + +-- +There are 2 kinds of people in my world: those who know Unix, Perl, Vim, GNU, +Linux, etc, and those who know COBOL. It gets very difficult for me at +parties, not knowing which group to socialise with :-) + Sitaram Chamarty + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 57a5f64f3c22f61ed5a18481ffbb78a6fd8b5b94 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:13:03 +0000 Subject: [PATCH 0036/3803] - patchlevel 394 --- 7.2.394 | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 7.2.394 diff --git a/7.2.394 b/7.2.394 new file mode 100644 index 00000000..50235e04 --- /dev/null +++ b/7.2.394 @@ -0,0 +1,99 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.394 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.394 +Problem: .lzma and .xz files are not supported. +Solution: Recognize .lzma and .xz files so that they can be edited. +Files: runtime/plugin/gzip.vim + + +*** ../vim-7.2.393/runtime/plugin/gzip.vim 2005-07-27 23:12:49.000000000 +0200 +--- runtime/plugin/gzip.vim 2010-03-10 17:07:22.000000000 +0100 +*************** +*** 1,6 **** + " Vim plugin for editing compressed files. + " Maintainer: Bram Moolenaar +! " Last Change: 2005 Jul 26 + + " Exit quickly when: + " - this plugin was already loaded +--- 1,6 ---- + " Vim plugin for editing compressed files. + " Maintainer: Bram Moolenaar +! " Last Change: 2010 Mar 10 + + " Exit quickly when: + " - this plugin was already loaded +*************** +*** 20,36 **** + " + " Set binary mode before reading the file. + " Use "gzip -d", gunzip isn't always available. +! autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z setlocal bin + autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn") + autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d") + autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress") + autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip") + autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2") + autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f") + autocmd FileAppendPre *.gz call gzip#appre("gzip -dn") + autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d") + autocmd FileAppendPre *.Z call gzip#appre("uncompress") + autocmd FileAppendPost *.gz call gzip#write("gzip") + autocmd FileAppendPost *.bz2 call gzip#write("bzip2") + autocmd FileAppendPost *.Z call gzip#write("compress -f") + augroup END +--- 20,44 ---- + " + " Set binary mode before reading the file. + " Use "gzip -d", gunzip isn't always available. +! autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz setlocal bin + autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn") + autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d") + autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress") ++ autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d") ++ autocmd BufReadPost,FileReadPost *.xz call gzip#read("xz -d") + autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip") + autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2") + autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f") ++ autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma -z") ++ autocmd BufWritePost,FileWritePost *.xz call gzip#write("xz -z") + autocmd FileAppendPre *.gz call gzip#appre("gzip -dn") + autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d") + autocmd FileAppendPre *.Z call gzip#appre("uncompress") ++ autocmd FileAppendPre *.lzma call gzip#appre("lzma -d") ++ autocmd FileAppendPre *.xz call gzip#appre("xz -d") + autocmd FileAppendPost *.gz call gzip#write("gzip") + autocmd FileAppendPost *.bz2 call gzip#write("bzip2") + autocmd FileAppendPost *.Z call gzip#write("compress -f") ++ autocmd FileAppendPost *.lzma call gzip#write("lzma -z") ++ autocmd FileAppendPost *.xz call gzip#write("xz -z") + augroup END +*** ../vim-7.2.393/src/version.c 2010-03-10 16:27:27.000000000 +0100 +--- src/version.c 2010-03-10 17:12:43.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 394, + /**/ + +-- +ARTHUR: Be quiet! +DENNIS: --but by a two-thirds majority in the case of more-- +ARTHUR: Be quiet! I order you to be quiet! +WOMAN: Order, eh -- who does he think he is? +ARTHUR: I am your king! + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 712a65387a95658bc207337f9ea36519741f0892 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:13:15 +0000 Subject: [PATCH 0037/3803] - patchlevel 395 --- 7.2.395 | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 7.2.395 diff --git a/7.2.395 b/7.2.395 new file mode 100644 index 00000000..1b5b1bae --- /dev/null +++ b/7.2.395 @@ -0,0 +1,60 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.395 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.395 +Problem: In help CTRL=] on g?g? escapes the ?, causing it to fail. (Tony + Mechelynck) +Solution: Don't escape ? for a help command. (Sergey Khorev) +Files: src/normal.c + + +*** ../vim-7.2.394/src/normal.c 2010-01-19 15:23:38.000000000 +0100 +--- src/normal.c 2010-03-13 13:04:46.000000000 +0100 +*************** +*** 5526,5536 **** + break; + + default: + if (curbuf->b_help) + STRCPY(buf, "he! "); + else + { +- tag_cmd = TRUE; + if (g_cmd) + STRCPY(buf, "tj "); + else +--- 5526,5536 ---- + break; + + default: ++ tag_cmd = TRUE; + if (curbuf->b_help) + STRCPY(buf, "he! "); + else + { + if (g_cmd) + STRCPY(buf, "tj "); + else +*** ../vim-7.2.394/src/version.c 2010-03-10 17:14:07.000000000 +0100 +--- src/version.c 2010-03-17 13:05:11.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 395, + /**/ + +-- +There are three kinds of people: Those who can count & those who can't. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From bc78b41b39f08bf99498afdadadaceacfdf612bc Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:13:28 +0000 Subject: [PATCH 0038/3803] - patchlevel 396 --- 7.2.396 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 7.2.396 diff --git a/7.2.396 b/7.2.396 new file mode 100644 index 00000000..f1269231 --- /dev/null +++ b/7.2.396 @@ -0,0 +1,51 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.396 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.396 +Problem: Get E38 errors. (Dasn) +Solution: Set cursor to line 1 instead of 0. (Dominique Pelle) +Files: src/popupmnu.c + + +*** ../vim-7.2.395/src/popupmnu.c 2010-01-19 18:05:05.000000000 +0100 +--- src/popupmnu.c 2010-03-17 12:59:01.000000000 +0100 +*************** +*** 640,646 **** + + curbuf->b_changed = 0; + curbuf->b_p_ma = FALSE; +! curwin->w_cursor.lnum = 0; + curwin->w_cursor.col = 0; + + if (curwin != curwin_save && win_valid(curwin_save)) +--- 640,646 ---- + + curbuf->b_changed = 0; + curbuf->b_p_ma = FALSE; +! curwin->w_cursor.lnum = 1; + curwin->w_cursor.col = 0; + + if (curwin != curwin_save && win_valid(curwin_save)) +*** ../vim-7.2.395/src/version.c 2010-03-17 13:07:01.000000000 +0100 +--- src/version.c 2010-03-17 14:47:30.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 396, + /**/ + +-- +There are 10 kinds of people: Those who understand binary and those who don't. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5b6120ca93e5fa8726fa628e18bf600ddcbbb173 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:13:42 +0000 Subject: [PATCH 0039/3803] - patchlevel 397 --- 7.2.397 | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 7.2.397 diff --git a/7.2.397 b/7.2.397 new file mode 100644 index 00000000..218a069a --- /dev/null +++ b/7.2.397 @@ -0,0 +1,67 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.397 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.397 +Problem: Redundant check for w_lines_valid. +Solution: Remove the if. (Lech Lorens) +Files: src/fold.c + + +*** ../vim-7.2.396/src/fold.c 2010-02-24 14:34:10.000000000 +0100 +--- src/fold.c 2010-03-17 13:03:00.000000000 +0100 +*************** +*** 1053,1067 **** + { + int i; + +! if (win->w_lines_valid > 0) +! for (i = 0; i < win->w_lines_valid; ++i) +! if (win->w_lines[i].wl_valid) +! { +! if (lnum < win->w_lines[i].wl_lnum) +! return -1; +! if (lnum <= win->w_lines[i].wl_lastlnum) +! return i; +! } + return -1; + } + +--- 1053,1066 ---- + { + int i; + +! for (i = 0; i < win->w_lines_valid; ++i) +! if (win->w_lines[i].wl_valid) +! { +! if (lnum < win->w_lines[i].wl_lnum) +! return -1; +! if (lnum <= win->w_lines[i].wl_lastlnum) +! return i; +! } + return -1; + } + +*** ../vim-7.2.396/src/version.c 2010-03-17 14:47:56.000000000 +0100 +--- src/version.c 2010-03-17 16:43:34.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 397, + /**/ + +-- +Did you ever stop to think... and forget to start again? + -- Steven Wright + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a91b517a59d57f438409eda01e79bacba2ee4153 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:13:55 +0000 Subject: [PATCH 0040/3803] - patchlevel 398 --- 7.2.398 | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 7.2.398 diff --git a/7.2.398 b/7.2.398 new file mode 100644 index 00000000..a0ccc96c --- /dev/null +++ b/7.2.398 @@ -0,0 +1,152 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.398 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.398 +Problem: When moving windows the cursor ends up in the wrong line. +Solution: Set the window width and height properly. (Lech Lorens) +Files: src/window.c + + +*** ../vim-7.2.397/src/window.c 2010-01-27 20:26:41.000000000 +0100 +--- src/window.c 2010-03-17 16:40:06.000000000 +0100 +*************** +*** 991,1018 **** + wp->w_p_scr = curwin->w_p_scr; + if (need_status) + { +! --oldwin->w_height; + oldwin->w_status_height = need_status; + } + if (flags & (WSP_TOP | WSP_BOT)) + { + /* set height and row of new window to full height */ + wp->w_winrow = tabline_height(); +! wp->w_height = curfrp->fr_height - (p_ls > 0); + wp->w_status_height = (p_ls > 0); + } + else + { + /* height and row of new window is same as current window */ + wp->w_winrow = oldwin->w_winrow; +! wp->w_height = oldwin->w_height; + wp->w_status_height = oldwin->w_status_height; + } + frp->fr_height = curfrp->fr_height; + + /* "new_size" of the current window goes to the new window, use + * one column for the vertical separator */ +! wp->w_width = new_size; + if (before) + wp->w_vsep_width = 1; + else +--- 991,1018 ---- + wp->w_p_scr = curwin->w_p_scr; + if (need_status) + { +! win_new_height(oldwin, oldwin->w_height - 1); + oldwin->w_status_height = need_status; + } + if (flags & (WSP_TOP | WSP_BOT)) + { + /* set height and row of new window to full height */ + wp->w_winrow = tabline_height(); +! win_new_height(wp, curfrp->fr_height - (p_ls > 0)); + wp->w_status_height = (p_ls > 0); + } + else + { + /* height and row of new window is same as current window */ + wp->w_winrow = oldwin->w_winrow; +! win_new_height(wp, oldwin->w_height); + wp->w_status_height = oldwin->w_status_height; + } + frp->fr_height = curfrp->fr_height; + + /* "new_size" of the current window goes to the new window, use + * one column for the vertical separator */ +! win_new_width(wp, new_size); + if (before) + wp->w_vsep_width = 1; + else +*************** +*** 1049,1061 **** + if (flags & (WSP_TOP | WSP_BOT)) + { + wp->w_wincol = 0; +! wp->w_width = Columns; + wp->w_vsep_width = 0; + } + else + { + wp->w_wincol = oldwin->w_wincol; +! wp->w_width = oldwin->w_width; + wp->w_vsep_width = oldwin->w_vsep_width; + } + frp->fr_width = curfrp->fr_width; +--- 1049,1061 ---- + if (flags & (WSP_TOP | WSP_BOT)) + { + wp->w_wincol = 0; +! win_new_width(wp, Columns); + wp->w_vsep_width = 0; + } + else + { + wp->w_wincol = oldwin->w_wincol; +! win_new_width(wp, oldwin->w_width); + wp->w_vsep_width = oldwin->w_vsep_width; + } + frp->fr_width = curfrp->fr_width; +*************** +*** 1111,1117 **** + } + + /* +! * make the new window the current window and redraw + */ + if (do_equal || dir != 0) + win_equal(wp, TRUE, +--- 1111,1117 ---- + } + + /* +! * equalize the window sizes. + */ + if (do_equal || dir != 0) + win_equal(wp, TRUE, +*************** +*** 1143,1148 **** +--- 1143,1152 ---- + if (size != 0) + p_wh = size; + } ++ ++ /* ++ * make the new window the current window ++ */ + win_enter(wp, FALSE); + #ifdef FEAT_VERTSPLIT + if (flags & WSP_VERT) +*** ../vim-7.2.397/src/version.c 2010-03-17 16:45:04.000000000 +0100 +--- src/version.c 2010-03-17 16:53:51.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 398, + /**/ + +-- +It's not hard to meet expenses, they're everywhere. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From eed495cca2e06acf2dccd747928813a2b8dc943a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:14:09 +0000 Subject: [PATCH 0041/3803] - patchlevel 399 --- 7.2.399 | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 7.2.399 diff --git a/7.2.399 b/7.2.399 new file mode 100644 index 00000000..16ffa0f4 --- /dev/null +++ b/7.2.399 @@ -0,0 +1,63 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.399 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.399 (extra, after 7.2.388) +Problem: Cannot compile on MingW. +Solution: Move ifneq to separate line. (Vlad Sandrini, Dominique Pelle) +Files: src/Make_ming.mak + + +*** ../vim-7.2.398/src/Make_ming.mak 2010-03-10 13:19:28.000000000 +0100 +--- src/Make_ming.mak 2010-03-17 17:23:31.000000000 +0100 +*************** +*** 215,226 **** + ifndef RUBY_PLATFORM + ifeq ($(RUBY_VER), 16) + RUBY_PLATFORM = i586-mswin32 +! else ifneq ("X$(wildcard, $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32)", X) + RUBY_PLATFORM = i386-mingw32 + else + RUBY_PLATFORM = i386-mswin32 + endif + endif + + ifndef RUBY_INSTALL_NAME + ifeq ($(RUBY_VER), 16) +--- 215,228 ---- + ifndef RUBY_PLATFORM + ifeq ($(RUBY_VER), 16) + RUBY_PLATFORM = i586-mswin32 +! else +! ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),) + RUBY_PLATFORM = i386-mingw32 + else + RUBY_PLATFORM = i386-mswin32 + endif + endif ++ endif + + ifndef RUBY_INSTALL_NAME + ifeq ($(RUBY_VER), 16) +*** ../vim-7.2.398/src/version.c 2010-03-17 16:54:51.000000000 +0100 +--- src/version.c 2010-03-17 17:23:40.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 399, + /**/ + +-- +Life is a gift, living is an art. (Bram Moolenaar) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 266939bb29a8efbf41253d2cfaf5ad1dbc6f1462 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:14:23 +0000 Subject: [PATCH 0042/3803] - patchlevel 400 --- 7.2.400 | 454 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 454 insertions(+) create mode 100644 7.2.400 diff --git a/7.2.400 b/7.2.400 new file mode 100644 index 00000000..0c3c5487 --- /dev/null +++ b/7.2.400 @@ -0,0 +1,454 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.400 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.400 (after 7.2.387) +Problem: Dynamic Ruby is not initialised properly for version 1.9.1. + Ruby cannot create strings from NULL. +Solution: Cleanup #ifdefs. Handle NULL like an empty string. Add + ruby_init_stack. (Sergey Khorev) +Files: src/if_ruby.c + + +*** ../vim-7.2.399/src/if_ruby.c 2010-03-10 12:46:38.000000000 +0100 +--- src/if_ruby.c 2010-03-17 17:37:53.000000000 +0100 +*************** +*** 53,58 **** +--- 53,63 ---- + # undef _WIN32_WINNT + #endif + ++ #if (defined(RUBY_VERSION) && RUBY_VERSION >= 19) \ ++ || (defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19) ++ # define RUBY19_OR_LATER 1 ++ #endif ++ + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 + /* Ruby 1.9 defines a number of static functions which use rb_num2long and + * rb_int2big */ +*************** +*** 61,67 **** + #endif + + #include +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + # include + #endif + +--- 66,72 ---- + #endif + + #include +! #ifdef RUBY19_OR_LATER + # include + #endif + +*************** +*** 172,179 **** + # define rb_ary_new dll_rb_ary_new + # define rb_ary_push dll_rb_ary_push + #endif +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ +! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 + # define rb_errinfo dll_rb_errinfo + #else + # define ruby_errinfo (*dll_ruby_errinfo) +--- 177,183 ---- + # define rb_ary_new dll_rb_ary_new + # define rb_ary_push dll_rb_ary_push + #endif +! #ifdef RUBY19_OR_LATER + # define rb_errinfo dll_rb_errinfo + #else + # define ruby_errinfo (*dll_ruby_errinfo) +*************** +*** 185,196 **** + # define rb_w32_snprintf dll_rb_w32_snprintf + #endif + +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + # define ruby_script dll_ruby_script + # define rb_enc_find_index dll_rb_enc_find_index + # define rb_enc_find dll_rb_enc_find + # define rb_enc_str_new dll_rb_enc_str_new + # define rb_sprintf dll_rb_sprintf + #endif + + /* +--- 189,201 ---- + # define rb_w32_snprintf dll_rb_w32_snprintf + #endif + +! #ifdef RUBY19_OR_LATER + # define ruby_script dll_ruby_script + # define rb_enc_find_index dll_rb_enc_find_index + # define rb_enc_find dll_rb_enc_find + # define rb_enc_str_new dll_rb_enc_str_new + # define rb_sprintf dll_rb_sprintf ++ # define ruby_init_stack dll_ruby_init_stack + #endif + + /* +*************** +*** 240,247 **** + static VALUE (*dll_rb_str_concat) (VALUE, VALUE); + static VALUE (*dll_rb_str_new) (const char*, long); + static VALUE (*dll_rb_str_new2) (const char*); +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ +! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 + static VALUE (*dll_rb_errinfo) (void); + #else + static VALUE *dll_ruby_errinfo; +--- 245,251 ---- + static VALUE (*dll_rb_str_concat) (VALUE, VALUE); + static VALUE (*dll_rb_str_new) (const char*, long); + static VALUE (*dll_rb_str_new2) (const char*); +! #ifdef RUBY19_OR_LATER + static VALUE (*dll_rb_errinfo) (void); + #else + static VALUE *dll_ruby_errinfo; +*************** +*** 255,276 **** + static VALUE (*dll_rb_ary_new) (void); + static VALUE (*dll_rb_ary_push) (VALUE, VALUE); + #endif +! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 + static VALUE (*dll_rb_int2big)(SIGNED_VALUE); + #endif + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...); + #endif + +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + static void (*dll_ruby_script) (const char*); + static int (*dll_rb_enc_find_index) (const char*); + static rb_encoding* (*dll_rb_enc_find) (const char*); + static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*); + static VALUE (*dll_rb_sprintf) (const char*, ...); + #endif + +! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 + static SIGNED_VALUE rb_num2long_stub(VALUE x) + { + return dll_rb_num2long(x); +--- 259,281 ---- + static VALUE (*dll_rb_ary_new) (void); + static VALUE (*dll_rb_ary_push) (VALUE, VALUE); + #endif +! #ifdef RUBY19_OR_LATER + static VALUE (*dll_rb_int2big)(SIGNED_VALUE); + #endif + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...); + #endif + +! #ifdef RUBY19_OR_LATER + static void (*dll_ruby_script) (const char*); + static int (*dll_rb_enc_find_index) (const char*); + static rb_encoding* (*dll_rb_enc_find) (const char*); + static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*); + static VALUE (*dll_rb_sprintf) (const char*, ...); ++ static void (*ruby_init_stack)(VALUE*); + #endif + +! #ifdef RUBY19_OR_LATER + static SIGNED_VALUE rb_num2long_stub(VALUE x) + { + return dll_rb_num2long(x); +*************** +*** 336,343 **** + {"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat}, + {"rb_str_new", (RUBY_PROC*)&dll_rb_str_new}, + {"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2}, +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ +! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 + {"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo}, + #else + {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo}, +--- 341,347 ---- + {"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat}, + {"rb_str_new", (RUBY_PROC*)&dll_rb_str_new}, + {"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2}, +! #ifdef RUBY19_OR_LATER + {"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo}, + #else + {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo}, +*************** +*** 360,374 **** + {"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new}, + {"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push}, + #endif +! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 + {"rb_int2big", (RUBY_PROC*)&dll_rb_int2big}, +- #endif +- #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + {"ruby_script", (RUBY_PROC*)&dll_ruby_script}, + {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, + {"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find}, + {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new}, + {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf}, + #endif + {"", NULL}, + }; +--- 364,377 ---- + {"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new}, + {"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push}, + #endif +! #ifdef RUBY19_OR_LATER + {"rb_int2big", (RUBY_PROC*)&dll_rb_int2big}, + {"ruby_script", (RUBY_PROC*)&dll_ruby_script}, + {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, + {"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find}, + {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new}, + {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf}, ++ {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack}, + #endif + {"", NULL}, + }; +*************** +*** 467,473 **** + static VALUE + vim_str2rb_enc_str(const char *s) + { +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + int isnum; + long lval; + char_u *sval; +--- 470,476 ---- + static VALUE + vim_str2rb_enc_str(const char *s) + { +! #ifdef RUBY19_OR_LATER + int isnum; + long lval; + char_u *sval; +*************** +*** 489,495 **** + static VALUE + eval_enc_string_protect(const char *str, int *state) + { +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + int isnum; + long lval; + char_u *sval; +--- 492,498 ---- + static VALUE + eval_enc_string_protect(const char *str, int *state) + { +! #ifdef RUBY19_OR_LATER + int isnum; + long lval; + char_u *sval; +*************** +*** 591,606 **** + char *argv[] = {"gvim.exe"}; + NtInitialize(&argc, &argv); + #endif +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + RUBY_INIT_STACK; + #endif + ruby_init(); +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + ruby_script("vim-ruby"); + #endif + ruby_init_loadpath(); + ruby_io_init(); +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + rb_enc_find_index("encdb"); + #endif + ruby_vim_init(); +--- 594,609 ---- + char *argv[] = {"gvim.exe"}; + NtInitialize(&argc, &argv); + #endif +! #ifdef RUBY19_OR_LATER + RUBY_INIT_STACK; + #endif + ruby_init(); +! #ifdef RUBY19_OR_LATER + ruby_script("vim-ruby"); + #endif + ruby_init_loadpath(); + ruby_io_init(); +! #ifdef RUBY19_OR_LATER + rb_enc_find_index("encdb"); + #endif + ruby_vim_init(); +*************** +*** 657,664 **** + break; + case TAG_RAISE: + case TAG_FATAL: +! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ +! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 + eclass = CLASS_OF(rb_errinfo()); + einfo = rb_obj_as_string(rb_errinfo()); + #else +--- 660,666 ---- + break; + case TAG_RAISE: + case TAG_FATAL: +! #ifdef RUBY19_OR_LATER + eclass = CLASS_OF(rb_errinfo()); + einfo = rb_obj_as_string(rb_errinfo()); + #else +*************** +*** 720,775 **** + + if (tv->v_type == VAR_STRING) + { +! result = rb_str_new2((char *)tv->vval.v_string); + } + else if (tv->v_type == VAR_NUMBER) + { +! result = INT2NUM(tv->vval.v_number); + } + # ifdef FEAT_FLOAT + else if (tv->v_type == VAR_FLOAT) + { +! result = rb_float_new(tv->vval.v_float); + } + # endif + else if (tv->v_type == VAR_LIST) + { +! list_T *list = tv->vval.v_list; +! listitem_T *curr; + +! result = rb_ary_new(); + +! if (list != NULL) +! { +! for (curr = list->lv_first; curr != NULL; curr = curr->li_next) +! { +! rb_ary_push(result, vim_to_ruby(&curr->li_tv)); +! } +! } + } + else if (tv->v_type == VAR_DICT) + { +! result = rb_hash_new(); + +! if (tv->vval.v_dict != NULL) +! { +! hashtab_T *ht = &tv->vval.v_dict->dv_hashtab; +! long_u todo = ht->ht_used; +! hashitem_T *hi; +! dictitem_T *di; +! +! for (hi = ht->ht_array; todo > 0; ++hi) +! { +! if (!HASHITEM_EMPTY(hi)) +! { +! --todo; + +! di = dict_lookup(hi); +! rb_hash_aset(result, rb_str_new2((char *)hi->hi_key), + vim_to_ruby(&di->di_tv)); +! } +! } +! } + } /* else return Qnil; */ + + return result; +--- 722,778 ---- + + if (tv->v_type == VAR_STRING) + { +! result = rb_str_new2((char *)(tv->vval.v_string == NULL +! ? "" : tv->vval.v_string)); + } + else if (tv->v_type == VAR_NUMBER) + { +! result = INT2NUM(tv->vval.v_number); + } + # ifdef FEAT_FLOAT + else if (tv->v_type == VAR_FLOAT) + { +! result = rb_float_new(tv->vval.v_float); + } + # endif + else if (tv->v_type == VAR_LIST) + { +! list_T *list = tv->vval.v_list; +! listitem_T *curr; + +! result = rb_ary_new(); + +! if (list != NULL) +! { +! for (curr = list->lv_first; curr != NULL; curr = curr->li_next) +! { +! rb_ary_push(result, vim_to_ruby(&curr->li_tv)); +! } +! } + } + else if (tv->v_type == VAR_DICT) + { +! result = rb_hash_new(); + +! if (tv->vval.v_dict != NULL) +! { +! hashtab_T *ht = &tv->vval.v_dict->dv_hashtab; +! long_u todo = ht->ht_used; +! hashitem_T *hi; +! dictitem_T *di; +! +! for (hi = ht->ht_array; todo > 0; ++hi) +! { +! if (!HASHITEM_EMPTY(hi)) +! { +! --todo; + +! di = dict_lookup(hi); +! rb_hash_aset(result, rb_str_new2((char *)hi->hi_key), + vim_to_ruby(&di->di_tv)); +! } +! } +! } + } /* else return Qnil; */ + + return result; +*************** +*** 785,791 **** + tv = eval_expr((char_u *)StringValuePtr(str), NULL); + if (tv == NULL) + { +! return Qnil; + } + result = vim_to_ruby(tv); + +--- 788,794 ---- + tv = eval_expr((char_u *)StringValuePtr(str), NULL); + if (tv == NULL) + { +! return Qnil; + } + result = vim_to_ruby(tv); + +*** ../vim-7.2.399/src/version.c 2010-03-17 17:24:58.000000000 +0100 +--- src/version.c 2010-03-17 18:14:31.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 400, + /**/ + +-- +Q: What do you call a fish without an eye? +A: fsh! +Q: What do you call a deer with no eyes? +A: no eye deer. +Q: What do you call a deer with no eyes and no legs? +A: still no eye deer. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 87691c4421bd0a95ada4fc34f0ff391ffe7bf01f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:14:36 +0000 Subject: [PATCH 0043/3803] - patchlevel 401 --- 7.2.401 | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 7.2.401 diff --git a/7.2.401 b/7.2.401 new file mode 100644 index 00000000..032076ab --- /dev/null +++ b/7.2.401 @@ -0,0 +1,61 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.401 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.401 +Problem: ":e dir" with 'wildmode' set to "list" doesn't highlight + directory names with a space. (Alexandre Provencio) +Solution: Remove the backslash before checking if the name is a directory. + (Dominique Pelle) +Files: src/ex_getln.c + + +*** ../vim-7.2.400/src/ex_getln.c 2010-03-02 17:23:10.000000000 +0100 +--- src/ex_getln.c 2010-03-17 19:00:54.000000000 +0100 +*************** +*** 3948,3955 **** + || xp->xp_context == EXPAND_SHELLCMD + || xp->xp_context == EXPAND_BUFFERS) + { +! /* highlight directories */ +! j = (mch_isdir(files_found[k])); + if (showtail) + p = L_SHOWFILE(k); + else +--- 3948,3959 ---- + || xp->xp_context == EXPAND_SHELLCMD + || xp->xp_context == EXPAND_BUFFERS) + { +! char_u *halved_slash; +! +! /* highlight directories */ +! halved_slash = backslash_halve_save(files_found[k]); +! j = mch_isdir(halved_slash); +! vim_free(halved_slash); + if (showtail) + p = L_SHOWFILE(k); + else +*** ../vim-7.2.400/src/version.c 2010-03-17 18:15:17.000000000 +0100 +--- src/version.c 2010-03-17 19:12:22.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 401, + /**/ + +-- +Two cows are standing together in a field. One asks the other: +"So what do you think about this Mad Cow Disease?" +The other replies: "That doesn't concern me. I'm a helicopter." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 556859e0e3bd1ad56720ad430facc6c08a852d38 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:14:49 +0000 Subject: [PATCH 0044/3803] - patchlevel 402 --- 7.2.402 | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 7.2.402 diff --git a/7.2.402 b/7.2.402 new file mode 100644 index 00000000..7c256bb1 --- /dev/null +++ b/7.2.402 @@ -0,0 +1,91 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.402 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.402 +Problem: This gives a #705 error: let X = function('haslocaldir') + let X = function('getcwd') +Solution: Don't give E705 when the name is found in the hashtab. (Sergey + Khorev) +Files: src/eval.c + + +*** ../vim-7.2.401/src/eval.c 2010-03-10 13:43:22.000000000 +0100 +--- src/eval.c 2010-03-17 19:35:01.000000000 +0100 +*************** +*** 19103,19108 **** +--- 19103,19116 ---- + hashtab_T *ht; + char_u *p; + ++ ht = find_var_ht(name, &varname); ++ if (ht == NULL || *varname == NUL) ++ { ++ EMSG2(_(e_illvar), name); ++ return; ++ } ++ v = find_var_in_ht(ht, varname, TRUE); ++ + if (tv->v_type == VAR_FUNC) + { + if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':') +*************** +*** 19112,19118 **** + EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name); + return; + } +! if (function_exists(name)) + { + EMSG2(_("E705: Variable name conflicts with existing function: %s"), + name); +--- 19120,19129 ---- + EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name); + return; + } +! /* Don't allow hiding a function. When "v" is not NULL we migth be +! * assigning another function to the same var, the type is checked +! * below. */ +! if (v == NULL && function_exists(name)) + { + EMSG2(_("E705: Variable name conflicts with existing function: %s"), + name); +*************** +*** 19120,19133 **** + } + } + +- ht = find_var_ht(name, &varname); +- if (ht == NULL || *varname == NUL) +- { +- EMSG2(_(e_illvar), name); +- return; +- } +- +- v = find_var_in_ht(ht, varname, TRUE); + if (v != NULL) + { + /* existing variable, need to clear the value */ +--- 19131,19136 ---- +*** ../vim-7.2.401/src/version.c 2010-03-17 19:13:19.000000000 +0100 +--- src/version.c 2010-03-17 19:36:09.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 402, + /**/ + +-- +Michael: There is no such thing as a dump question. +Bernard: Sure there is. For example "what is a core dump?" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ee68449e17e825a1ef0bbfccf996f687145b93b2 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:15:02 +0000 Subject: [PATCH 0045/3803] - patchlevel 403 --- 7.2.403 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 7.2.403 diff --git a/7.2.403 b/7.2.403 new file mode 100644 index 00000000..d2949dbc --- /dev/null +++ b/7.2.403 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.403 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.403 (after 7.2.400) +Problem: Compiler warning for pointer type. (Tony Mechelynck) +Solution: Move type cast to the right place. +Files: src/if_ruby.c + + +*** ../vim-7.2.402/src/if_ruby.c 2010-03-17 18:15:17.000000000 +0100 +--- src/if_ruby.c 2010-03-19 23:08:06.000000000 +0100 +*************** +*** 722,729 **** + + if (tv->v_type == VAR_STRING) + { +! result = rb_str_new2((char *)(tv->vval.v_string == NULL +! ? "" : tv->vval.v_string)); + } + else if (tv->v_type == VAR_NUMBER) + { +--- 722,729 ---- + + if (tv->v_type == VAR_STRING) + { +! result = rb_str_new2(tv->vval.v_string == NULL +! ? "" : (char *)(tv->vval.v_string)); + } + else if (tv->v_type == VAR_NUMBER) + { +*** ../vim-7.2.402/src/version.c 2010-03-17 19:53:44.000000000 +0100 +--- src/version.c 2010-03-19 23:07:13.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 403, + /**/ + +-- +If "R" is Reverse, how come "D" is FORWARD? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 61ab6aa843288f165ffc2e7e95dfb6220b0ed5de Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:15:16 +0000 Subject: [PATCH 0046/3803] - patchlevel 404 --- 7.2.404 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 7.2.404 diff --git a/7.2.404 b/7.2.404 new file mode 100644 index 00000000..fa1a0b6b --- /dev/null +++ b/7.2.404 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.404 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.404 +Problem: Pointers for composing characters are not properly initialized. +Solution: Compute the size of the pointer, not what it points to. (Yukihiro + Nakadaira) +Files: src/screen.c + + +*** ../vim-7.2.403/src/screen.c 2010-02-03 15:47:59.000000000 +0100 +--- src/screen.c 2010-03-23 13:48:05.000000000 +0100 +*************** +*** 7536,7542 **** + new_ScreenLines = (schar_T *)lalloc((long_u)( + (Rows + 1) * Columns * sizeof(schar_T)), FALSE); + #ifdef FEAT_MBYTE +! vim_memset(new_ScreenLinesC, 0, sizeof(u8char_T) * MAX_MCO); + if (enc_utf8) + { + new_ScreenLinesUC = (u8char_T *)lalloc((long_u)( +--- 7536,7542 ---- + new_ScreenLines = (schar_T *)lalloc((long_u)( + (Rows + 1) * Columns * sizeof(schar_T)), FALSE); + #ifdef FEAT_MBYTE +! vim_memset(new_ScreenLinesC, 0, sizeof(u8char_T *) * MAX_MCO); + if (enc_utf8) + { + new_ScreenLinesUC = (u8char_T *)lalloc((long_u)( +*** ../vim-7.2.403/src/version.c 2010-03-19 23:08:22.000000000 +0100 +--- src/version.c 2010-03-23 13:54:47.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 404, + /**/ + +-- +LAUNCELOT: Isn't there a St. Aaaaarrrrrrggghhh's in Cornwall? +ARTHUR: No, that's Saint Ives. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From bafe393ea72b62b578044d7177f3be76a651a8a6 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:15:28 +0000 Subject: [PATCH 0047/3803] - patchlevel 405 --- 7.2.405 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 7.2.405 diff --git a/7.2.405 b/7.2.405 new file mode 100644 index 00000000..b79a19aa --- /dev/null +++ b/7.2.405 @@ -0,0 +1,48 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.405 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.405 +Problem: When built with small features the matching text is not + highlighted for ":s/pat/repl/c". +Solution: Remove the #ifdef for IncSearch. (James Vega) +Files: src/syntax.c + + +*** ../vim-7.2.404/src/syntax.c 2010-03-10 13:43:22.000000000 +0100 +--- src/syntax.c 2010-03-23 14:36:10.000000000 +0100 +*************** +*** 6205,6214 **** + { + CENT("ErrorMsg term=standout ctermbg=DarkRed ctermfg=White", + "ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White"), +- #ifdef FEAT_SEARCH_EXTRA + CENT("IncSearch term=reverse cterm=reverse", + "IncSearch term=reverse cterm=reverse gui=reverse"), +- #endif + CENT("ModeMsg term=bold cterm=bold", + "ModeMsg term=bold cterm=bold gui=bold"), + CENT("NonText term=bold ctermfg=Blue", +--- 6205,6212 ---- +*** ../vim-7.2.404/src/version.c 2010-03-23 13:56:53.000000000 +0100 +--- src/version.c 2010-03-23 14:37:08.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 405, + /**/ + +-- +Dreams are free, but there's a small charge for alterations. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a559a2ca5ad5d07a53e6150375af05f48012b88e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:15:41 +0000 Subject: [PATCH 0048/3803] - patchlevel 406 --- 7.2.406 | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 7.2.406 diff --git a/7.2.406 b/7.2.406 new file mode 100644 index 00000000..cff265f5 --- /dev/null +++ b/7.2.406 @@ -0,0 +1,123 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.406 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.406 +Problem: Patch 7.2.119 introduces uninit mem read. (Dominique Pelle) +Solution: Only used ScreeenLinesC when ScreeenLinesUC is not zero. (Yukihiro + Nakadaira) Also clear ScreeenLinesC when allocating. +Files: src/screen.c + + +*** ../vim-7.2.405/src/screen.c 2010-03-23 13:56:53.000000000 +0100 +--- src/screen.c 2010-03-23 15:26:44.000000000 +0100 +*************** +*** 25,34 **** + * one character which occupies two display cells. + * For UTF-8 a multi-byte character is converted to Unicode and stored in + * ScreenLinesUC[]. ScreenLines[] contains the first byte only. For an ASCII +! * character without composing chars ScreenLinesUC[] will be 0. When the +! * character occupies two display cells the next byte in ScreenLines[] is 0. + * ScreenLinesC[][] contain up to 'maxcombine' composing characters +! * (drawn on top of the first character). They are 0 when not used. + * ScreenLines2[] is only used for euc-jp to store the second byte if the + * first byte is 0x8e (single-width character). + * +--- 25,35 ---- + * one character which occupies two display cells. + * For UTF-8 a multi-byte character is converted to Unicode and stored in + * ScreenLinesUC[]. ScreenLines[] contains the first byte only. For an ASCII +! * character without composing chars ScreenLinesUC[] will be 0 and +! * ScreenLinesC[][] is not used. When the character occupies two display +! * cells the next byte in ScreenLines[] is 0. + * ScreenLinesC[][] contain up to 'maxcombine' composing characters +! * (drawn on top of the first character). There is 0 after the last one used. + * ScreenLines2[] is only used for euc-jp to store the second byte if the + * first byte is 0x8e (single-width character). + * +*************** +*** 4893,4898 **** +--- 4894,4900 ---- + + /* + * Return if the composing characters at "off_from" and "off_to" differ. ++ * Only to be used when ScreenLinesUC[off_from] != 0. + */ + static int + comp_char_differs(off_from, off_to) +*************** +*** 6281,6286 **** +--- 6283,6289 ---- + /* + * Return TRUE if composing characters for screen posn "off" differs from + * composing characters in "u8cc". ++ * Only to be used when ScreenLinesUC[off] != 0. + */ + static int + screen_comp_differs(off, u8cc) +*************** +*** 6461,6468 **** + && c == 0x8e + && ScreenLines2[off] != ptr[1]) + || (enc_utf8 +! && (ScreenLinesUC[off] != (u8char_T)(c >= 0x80 ? u8c : 0) +! || screen_comp_differs(off, u8cc))) + #endif + || ScreenAttrs[off] != attr + || exmode_active; +--- 6464,6473 ---- + && c == 0x8e + && ScreenLines2[off] != ptr[1]) + || (enc_utf8 +! && (ScreenLinesUC[off] != +! (u8char_T)(c < 0x80 && u8cc[0] == 0 ? 0 : u8c) +! || (ScreenLinesUC[off] != 0 +! && screen_comp_differs(off, u8cc)))) + #endif + || ScreenAttrs[off] != attr + || exmode_active; +*************** +*** 7542,7548 **** + new_ScreenLinesUC = (u8char_T *)lalloc((long_u)( + (Rows + 1) * Columns * sizeof(u8char_T)), FALSE); + for (i = 0; i < p_mco; ++i) +! new_ScreenLinesC[i] = (u8char_T *)lalloc((long_u)( + (Rows + 1) * Columns * sizeof(u8char_T)), FALSE); + } + if (enc_dbcs == DBCS_JPNU) +--- 7547,7553 ---- + new_ScreenLinesUC = (u8char_T *)lalloc((long_u)( + (Rows + 1) * Columns * sizeof(u8char_T)), FALSE); + for (i = 0; i < p_mco; ++i) +! new_ScreenLinesC[i] = (u8char_T *)lalloc_clear((long_u)( + (Rows + 1) * Columns * sizeof(u8char_T)), FALSE); + } + if (enc_dbcs == DBCS_JPNU) +*** ../vim-7.2.405/src/version.c 2010-03-23 14:39:07.000000000 +0100 +--- src/version.c 2010-03-23 15:34:11.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 406, + /**/ + +-- +VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur + and his knights seemed hopeless, when, suddenly ... the animator + suffered a fatal heart attack. +ANIMATOR: Aaaaagh! +VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could + continue. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From fbfa3e8990d65037da9d29897f7596d5ea371384 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:15:53 +0000 Subject: [PATCH 0049/3803] - patchlevel 407 --- 7.2.407 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 7.2.407 diff --git a/7.2.407 b/7.2.407 new file mode 100644 index 00000000..0237a9d1 --- /dev/null +++ b/7.2.407 @@ -0,0 +1,69 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.407 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.407 +Problem: When using an expression in ":s" backslashes in the result are + dropped. (Sergey Goldgaber, Christian Brabandt) +Solution: Double backslashes. +Files: src/regexp.c + + +*** ../vim-7.2.406/src/regexp.c 2009-11-26 20:41:19.000000000 +0100 +--- src/regexp.c 2010-03-23 16:22:35.000000000 +0100 +*************** +*** 6963,6968 **** +--- 6963,6970 ---- + eval_result = eval_to_string(source + 2, NULL, TRUE); + if (eval_result != NULL) + { ++ int had_backslash = FALSE; ++ + for (s = eval_result; *s != NUL; mb_ptr_adv(s)) + { + /* Change NL to CR, so that it becomes a line break. +*************** +*** 6970,6976 **** +--- 6972,6991 ---- + if (*s == NL) + *s = CAR; + else if (*s == '\\' && s[1] != NUL) ++ { + ++s; ++ had_backslash = TRUE; ++ } ++ } ++ if (had_backslash && backslash) ++ { ++ /* Backslashes will be consumed, need to double them. */ ++ s = vim_strsave_escaped(eval_result, (char_u *)"\\"); ++ if (s != NULL) ++ { ++ vim_free(eval_result); ++ eval_result = s; ++ } + } + + dst += STRLEN(eval_result); +*** ../vim-7.2.406/src/version.c 2010-03-23 15:36:29.000000000 +0100 +--- src/version.c 2010-03-23 16:26:22.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 407, + /**/ + +-- +Sorry, no fortune today. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 631def158158bd9a5c0d12552cdef56c654437cc Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:16:06 +0000 Subject: [PATCH 0050/3803] - patchlevel 408 --- 7.2.408 | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 7.2.408 diff --git a/7.2.408 b/7.2.408 new file mode 100644 index 00000000..25ac3a9c --- /dev/null +++ b/7.2.408 @@ -0,0 +1,73 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.408 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.408 +Problem: With ":g/the/s/foo/bar/" the '[ and '] marks can be set to a line + that was not changed. +Solution: Only set '[ and '] marks when a substitution was done. +Files: src/ex_cmds.c + + +*** ../vim-7.2.407/src/ex_cmds.c 2009-07-09 20:06:30.000000000 +0200 +--- src/ex_cmds.c 2010-03-23 17:31:17.000000000 +0100 +*************** +*** 4238,4243 **** +--- 4238,4244 ---- + char_u *sub_firstline; /* allocated copy of first sub line */ + int endcolumn = FALSE; /* cursor in last column when done */ + pos_T old_cursor = curwin->w_cursor; ++ int start_nsubs; + + cmd = eap->arg; + if (!global_busy) +*************** +*** 4245,4250 **** +--- 4246,4252 ---- + sub_nsubs = 0; + sub_nlines = 0; + } ++ start_nsubs = sub_nsubs; + + if (eap->cmdidx == CMD_tilde) + which_pat = RE_LAST; /* use last used regexp */ +*************** +*** 5106,5112 **** + if (do_count) + curwin->w_cursor = old_cursor; + +! if (sub_nsubs) + { + /* Set the '[ and '] marks. */ + curbuf->b_op_start.lnum = eap->line1; +--- 5108,5114 ---- + if (do_count) + curwin->w_cursor = old_cursor; + +! if (sub_nsubs > start_nsubs) + { + /* Set the '[ and '] marks. */ + curbuf->b_op_start.lnum = eap->line1; +*** ../vim-7.2.407/src/version.c 2010-03-23 16:27:15.000000000 +0100 +--- src/version.c 2010-03-23 17:35:40.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 408, + /**/ + +-- +Permission is granted to read this message out aloud on Kings Cross Road, +London, under the condition that the orator is properly dressed. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From cb96e0f18ba951615d34eaca1bc49e8a4aae34dc Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:16:19 +0000 Subject: [PATCH 0051/3803] - patchlevel 409 --- 7.2.409 | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 7.2.409 diff --git a/7.2.409 b/7.2.409 new file mode 100644 index 00000000..fdda4a00 --- /dev/null +++ b/7.2.409 @@ -0,0 +1,60 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.409 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.409 +Problem: Summary of number of substitutes is incorrect for ":folddo". (Jean + Johner) +Solution: Reset sub_nsubs and sub_nlines in global_exe(). +Files: src/ex_cmds.c + + +*** ../vim-7.2.408/src/ex_cmds.c 2010-03-23 17:36:24.000000000 +0100 +--- src/ex_cmds.c 2010-03-23 17:42:49.000000000 +0100 +*************** +*** 5238,5245 **** + type = *eap->cmd; + cmd = eap->arg; + which_pat = RE_LAST; /* default: use last used regexp */ +- sub_nsubs = 0; +- sub_nlines = 0; + + /* + * undocumented vi feature: +--- 5238,5243 ---- +*************** +*** 5343,5348 **** +--- 5341,5348 ---- + /* When the command writes a message, don't overwrite the command. */ + msg_didout = TRUE; + ++ sub_nsubs = 0; ++ sub_nlines = 0; + global_need_beginline = FALSE; + global_busy = 1; + old_lcount = curbuf->b_ml.ml_line_count; +*** ../vim-7.2.408/src/version.c 2010-03-23 17:36:24.000000000 +0100 +--- src/version.c 2010-03-23 17:47:53.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 409, + /**/ + +-- +BRIDGEKEEPER: What is your favorite colour? +LAUNCELOT: Blue. +BRIDGEKEEPER: Right. Off you go. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 6832ccdb358141c529bce3765560265c904ee464 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:16:32 +0000 Subject: [PATCH 0052/3803] - patchlevel 410 --- 7.2.410 | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 7.2.410 diff --git a/7.2.410 b/7.2.410 new file mode 100644 index 00000000..660b0681 --- /dev/null +++ b/7.2.410 @@ -0,0 +1,78 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.410 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.410 +Problem: Highlighting directories for completion doesn't work properly. +Solution: Don't halve backslashes when not needed, expaned "~/". + (Dominique Pelle) +Files: src/ex_getln.c + + +*** ../vim-7.2.409/src/ex_getln.c 2010-03-17 19:13:19.000000000 +0100 +--- src/ex_getln.c 2010-03-23 18:00:56.000000000 +0100 +*************** +*** 3948,3959 **** + || xp->xp_context == EXPAND_SHELLCMD + || xp->xp_context == EXPAND_BUFFERS) + { +- char_u *halved_slash; +- + /* highlight directories */ +! halved_slash = backslash_halve_save(files_found[k]); +! j = mch_isdir(halved_slash); +! vim_free(halved_slash); + if (showtail) + p = L_SHOWFILE(k); + else +--- 3948,3973 ---- + || xp->xp_context == EXPAND_SHELLCMD + || xp->xp_context == EXPAND_BUFFERS) + { + /* highlight directories */ +! if (xp->xp_numfiles != -1) +! { +! char_u *halved_slash; +! char_u *exp_path; +! +! /* Expansion was done before and special characters +! * were escaped, need to halve backslashes. Also +! * $HOME has been replaced with ~/. */ +! exp_path = expand_env_save_opt(files_found[k], TRUE); +! halved_slash = backslash_halve_save( +! exp_path != NULL ? exp_path : files_found[k]); +! j = mch_isdir(halved_slash != NULL ? halved_slash +! : files_found[k]); +! vim_free(exp_path); +! vim_free(halved_slash); +! } +! else +! /* Expansion was done here, file names are literal. */ +! j = mch_isdir(files_found[k]); + if (showtail) + p = L_SHOWFILE(k); + else +*** ../vim-7.2.409/src/version.c 2010-03-23 17:49:19.000000000 +0100 +--- src/version.c 2010-03-23 18:04:25.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 410, + /**/ + +-- +BRIDGEKEEPER: What is your favorite colour? +GAWAIN: Blue ... No yelloooooww! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 65ea48d18125b66139ed56ae066ae1412e794d6d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Mar 2010 23:16:54 +0000 Subject: [PATCH 0053/3803] - patchlevel 411 --- 7.2.411 | 47 ++++++++++++++++++++++++++ README.patches | 44 ++++++++++++++++++++++++ vim.spec | 91 +++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 181 insertions(+), 1 deletion(-) create mode 100644 7.2.411 diff --git a/7.2.411 b/7.2.411 new file mode 100644 index 00000000..4a619ee7 --- /dev/null +++ b/7.2.411 @@ -0,0 +1,47 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.411 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.411 +Problem: When parsing 'cino' a comma isn't skipped properly. +Solution: Skip the comma. (Lech Lorens) +Files: src/misc1.c + + +*** ../vim-7.2.410/src/misc1.c 2010-03-02 12:37:01.000000000 +0100 +--- src/misc1.c 2010-03-23 18:18:15.000000000 +0100 +*************** +*** 6270,6275 **** +--- 6270,6277 ---- + case 'l': ind_keep_case_label = n; break; + case '#': ind_hash_comment = n; break; + } ++ if (*options == ',') ++ ++options; + } + + /* remember where the cursor was when we started */ +*** ../vim-7.2.410/src/version.c 2010-03-23 18:06:47.000000000 +0100 +--- src/version.c 2010-03-23 18:22:13.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 411, + /**/ + +-- +BRIDGEKEEPER: What is your favorite editor? +GAWAIN: Emacs ... No, Viiiiiiiiiiimmmmmmm! + "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/README.patches b/README.patches index 0a75ab90..b7fbf3ba 100644 --- a/README.patches +++ b/README.patches @@ -27,6 +27,7 @@ Collection of patches for Vim 7.2: 108889 7.2.001-100.gz patches 7.2.001 to 7.2.100, gzip'ed 208102 7.2.101-200.gz patches 7.2.101 to 7.2.200, gzip'ed 82163 7.2.201-300.gz patches 7.2.201 to 7.2.300, gzip'ed + 94475 7.2.301-400.gz patches 7.2.301 to 7.2.400, gzip'ed Individual patches for Vim 7.2: @@ -399,3 +400,46 @@ Individual patches for Vim 7.2: 3802 7.2.366 CTRL-B doesn't go back to the first line of the buffer 3236 7.2.367 "xxd -r -p" doesn't work as documented 1623 7.2.368 (after 7.2.361) append line with Ruby interface doesn't work + 1872 7.2.369 error message for :profile is not easy to understand + 4352 7.2.370 (after 7.2.356) a redraw may cause folds to be closed + 10029 7.2.371 build problems on Tandem NonStop + 9674 7.2.372 (extra) cross-compiling GvimExt and xxd doesn't work. + 2901 7.2.373 new messages from gcc 4.5 are not in 'errorformat' + 4434 7.2.374 Ruby eval() doesn't understand Vim types + 1794 7.2.375 ml_get errors when using ":bprevious" in a BufEnter autocmd + 1577 7.2.376 ml_get error when using SiSU syntax + 1983 7.2.377 (extra, after 7.2.372) small mistakes in Ming build file + 2832 7.2.378 C function declaration indented too much + 1758 7.2.379 'eventignore' is set to an invalid value inside ":doau" + 3699 7.2.380 (after 7.2.363) Perl builds with 5.10.1 but not with 5.10.0 + 6835 7.2.381 no completion for :behave + 1766 7.2.382 close cmdline window when 'bufhide' is "wipe" uses freed mem + 3021 7.2.383 Vim doesn't build cleanly with MSVC 2010 + 1849 7.2.384 (extra) Vim doesn't build properly with MSVC 2010 + 2147 7.2.385 can't drag status line when in the command line window + 2051 7.2.386 KDE 3.1 focus hack causes problems for other window managers + 8233 7.2.387 Ruby with MingW still doesn't build all versions + 2486 7.2.388 (extra part of 7.2.387) Ruby with MingW + 4805 7.2.389 synIDattr() cannot return the font + 2302 7.2.390 in some situations the popup menu can be displayed wrong + 3426 7.2.391 internal alloc(0) error when doing "CTRL-V $ c" + 4898 7.2.392 netbeans hangs reading from a socket at the maximum block size + 9605 7.2.393 Mac: Can't build with different Xcode developer tools dir + 4298 7.2.394 .lzma and .xz files are not supported + 1554 7.2.395 in help CTRL=] on g?g? escapes the ?, causing it to fail + 1554 7.2.396 get E38 errors + 1722 7.2.397 redundant check for w_lines_valid + 4127 7.2.398 when moving windows the cursor ends up in the wrong line + 1784 7.2.399 (extra, after 7.2.388) cannot compile on MingW + 12865 7.2.400 (after 7.2.387) Ruby problems with init and empty string + 1982 7.2.401 wildmode list doesn't highlight directory names with a space + 2649 7.2.402 error 705 when re-using funcref variable + 1548 7.2.403 (after 7.2.400) compiler warning for pointer type + 1880 7.2.404 pointers for composing characters are not properly initialized + 1636 7.2.405 with small features match is not highlighted for ":s/p/r/c" + 4701 7.2.406 (after 7.2.119) uninit memory read + 1916 7.2.407 when using :s with an expression backslashes are dropped + 2152 7.2.408 ":g/the/s/a/b/" can set '[ and '] marks to an unchanged line + 1814 7.2.409 summary of number of substitutes is incorrect for ":folddo" + 2526 7.2.410 highlighting directories for completion doesn't work properly + 1462 7.2.411 when parsing 'cino' a comma isn't skipped properly diff --git a/vim.spec b/vim.spec index 79c662e4..d332f5a5 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim72%{?beta} -%define patchlevel 368 +%define patchlevel 411 Summary: The VIM editor URL: http://www.vim.org/ @@ -434,6 +434,49 @@ Patch365: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.365 Patch366: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.366 Patch367: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.367 Patch368: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.368 +Patch369: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.369 +Patch370: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.370 +Patch371: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.371 +Patch372: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.372 +Patch373: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.373 +Patch374: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.374 +Patch375: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.375 +Patch376: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.376 +Patch377: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.377 +Patch378: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.378 +Patch379: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.379 +Patch380: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.380 +Patch381: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.381 +Patch382: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.382 +Patch383: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.383 +Patch384: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.384 +Patch385: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.385 +Patch386: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.386 +Patch387: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.387 +Patch388: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.388 +Patch389: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.389 +Patch390: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.390 +Patch391: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.391 +Patch392: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.392 +Patch393: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.393 +Patch394: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.394 +Patch395: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.395 +Patch396: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.396 +Patch397: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.397 +Patch398: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.398 +Patch399: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.399 +Patch400: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.400 +Patch401: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.401 +Patch402: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.402 +Patch403: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.403 +Patch404: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.404 +Patch405: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.405 +Patch406: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.406 +Patch407: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.407 +Patch408: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.408 +Patch409: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.409 +Patch410: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.410 +Patch411: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.411 Patch3000: vim-7.0-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -940,6 +983,49 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch366 -p0 %patch367 -p0 %patch368 -p0 +%patch369 -p0 +%patch370 -p0 +%patch371 -p0 +%patch372 -p0 +%patch373 -p0 +%patch374 -p0 +%patch375 -p0 +%patch376 -p0 +%patch377 -p0 +%patch378 -p0 +%patch379 -p0 +%patch380 -p0 +%patch381 -p0 +%patch382 -p0 +%patch383 -p0 +%patch384 -p0 +%patch385 -p0 +%patch386 -p0 +%patch387 -p0 +%patch388 -p0 +%patch389 -p0 +%patch390 -p0 +%patch391 -p0 +%patch392 -p0 +%patch393 -p0 +%patch394 -p0 +%patch395 -p0 +%patch396 -p0 +%patch397 -p0 +%patch398 -p0 +%patch399 -p0 +%patch400 -p0 +%patch401 -p0 +%patch402 -p0 +%patch403 -p0 +%patch404 -p0 +%patch405 -p0 +%patch406 -p0 +%patch407 -p0 +%patch408 -p0 +%patch409 -p0 +%patch410 -p0 +%patch411 -p0 # install spell files @@ -1404,6 +1490,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Fri Mar 26 2010 Karsten Hopp 7.2.411-1 +- patchlevel 411 + * Thu Feb 18 2010 Karsten Hopp 7.2.368-1 - patchlevel 368 From 3a0ef340f37d7b8b225f3069400bf29f9e19893f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 20 Apr 2010 10:17:57 +0000 Subject: [PATCH 0054/3803] - fix rvim manpage (#583180) --- vim.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vim.spec b/vim.spec index d332f5a5..e19933f8 100644 --- a/vim.spec +++ b/vim.spec @@ -1289,7 +1289,7 @@ for i in fr.UTF-8 it.UTF-8 pl.UTF-8; do rm -rf $RPM_BUILD_ROOT/%{_mandir}/$i done -for i in rvim gvim.1 gvimdiff.1; do +for i in rvim.1 gvim.1 gvimdiff.1; do echo ".so man1/vim.1" > $RPM_BUILD_ROOT/%{_mandir}/man1/$i done @@ -1490,6 +1490,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Tue Apr 20 2010 Karsten Hopp 7.2.%{nil}411-1 +- fix rvim manpage (#583180) + * Fri Mar 26 2010 Karsten Hopp 7.2.411-1 - patchlevel 411 From 8bc8e57e4e91817db271c571f90c96e0089bdccf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 15:00:27 +0000 Subject: [PATCH 0055/3803] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 8482b06e..00000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: vim -# $Id$ -NAME := vim -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index baa94ef2..00000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-13 From aa4ff9298233a3adc840a85bc45f342f3aa607ca Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 3 Aug 2010 12:32:40 +0200 Subject: [PATCH 0056/3803] test --- vim.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim.spec b/vim.spec index 3aac1982..afea79fe 100644 --- a/vim.spec +++ b/vim.spec @@ -24,7 +24,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{beta}%{patchlevel} -Release: 2%{?dist} +Release: 3%{?dist} License: Vim Group: Applications/Editors Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}%{?beta}%{?CVSDATE}.tar.bz2 From 48ab2cf88e1c5486cacb0d872a5c4aa285ed52cb Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 16 Nov 2010 12:10:07 +0100 Subject: [PATCH 0057/3803] - patchlevel 056 --- 7.3.056 | 542 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 542 insertions(+) create mode 100644 7.3.056 diff --git a/7.3.056 b/7.3.056 new file mode 100644 index 00000000..49c91b62 --- /dev/null +++ b/7.3.056 @@ -0,0 +1,542 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.056 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.056 +Problem: "getline" argument in do_cmdline() shadows global. +Solution: Rename the argument. +Files: src/ex_docmd.c + + +*** ../vim-7.3.055/src/ex_docmd.c 2010-11-10 18:59:50.000000000 +0100 +--- src/ex_docmd.c 2010-11-16 11:24:40.000000000 +0100 +*************** +*** 733,739 **** + * do_cmdline(): execute one Ex command line + * + * 1. Execute "cmdline" when it is not NULL. +! * If "cmdline" is NULL, or more lines are needed, getline() is used. + * 2. Split up in parts separated with '|'. + * + * This function can be called recursively! +--- 733,739 ---- + * do_cmdline(): execute one Ex command line + * + * 1. Execute "cmdline" when it is not NULL. +! * If "cmdline" is NULL, or more lines are needed, fgetline() is used. + * 2. Split up in parts separated with '|'. + * + * This function can be called recursively! +*************** +*** 741,747 **** + * flags: + * DOCMD_VERBOSE - The command will be included in the error message. + * DOCMD_NOWAIT - Don't call wait_return() and friends. +! * DOCMD_REPEAT - Repeat execution until getline() returns NULL. + * DOCMD_KEYTYPED - Don't reset KeyTyped. + * DOCMD_EXCRESET - Reset the exception environment (used for debugging). + * DOCMD_KEEPLINE - Store first typed line (for repeating with "."). +--- 741,747 ---- + * flags: + * DOCMD_VERBOSE - The command will be included in the error message. + * DOCMD_NOWAIT - Don't call wait_return() and friends. +! * DOCMD_REPEAT - Repeat execution until fgetline() returns NULL. + * DOCMD_KEYTYPED - Don't reset KeyTyped. + * DOCMD_EXCRESET - Reset the exception environment (used for debugging). + * DOCMD_KEEPLINE - Store first typed line (for repeating with "."). +*************** +*** 749,763 **** + * return FAIL if cmdline could not be executed, OK otherwise + */ + int +! do_cmdline(cmdline, getline, cookie, flags) + char_u *cmdline; +! char_u *(*getline) __ARGS((int, void *, int)); +! void *cookie; /* argument for getline() */ + int flags; + { + char_u *next_cmdline; /* next cmd to execute */ + char_u *cmdline_copy = NULL; /* copy of cmd line */ +! int used_getline = FALSE; /* used "getline" to obtain command */ + static int recursive = 0; /* recursive depth */ + int msg_didout_before_start = 0; + int count = 0; /* line number count */ +--- 749,763 ---- + * return FAIL if cmdline could not be executed, OK otherwise + */ + int +! do_cmdline(cmdline, fgetline, cookie, flags) + char_u *cmdline; +! char_u *(*fgetline) __ARGS((int, void *, int)); +! void *cookie; /* argument for fgetline() */ + int flags; + { + char_u *next_cmdline; /* next cmd to execute */ + char_u *cmdline_copy = NULL; /* copy of cmd line */ +! int used_getline = FALSE; /* used "fgetline" to obtain command */ + static int recursive = 0; /* recursive depth */ + int msg_didout_before_start = 0; + int count = 0; /* line number count */ +*************** +*** 775,788 **** + struct msglist **saved_msg_list = NULL; + struct msglist *private_msg_list; + +! /* "getline" and "cookie" passed to do_one_cmd() */ + char_u *(*cmd_getline) __ARGS((int, void *, int)); + void *cmd_cookie; + struct loop_cookie cmd_loop_cookie; + void *real_cookie; + int getline_is_func; + #else +! # define cmd_getline getline + # define cmd_cookie cookie + #endif + static int call_depth = 0; /* recursiveness */ +--- 775,788 ---- + struct msglist **saved_msg_list = NULL; + struct msglist *private_msg_list; + +! /* "fgetline" and "cookie" passed to do_one_cmd() */ + char_u *(*cmd_getline) __ARGS((int, void *, int)); + void *cmd_cookie; + struct loop_cookie cmd_loop_cookie; + void *real_cookie; + int getline_is_func; + #else +! # define cmd_getline fgetline + # define cmd_cookie cookie + #endif + static int call_depth = 0; /* recursiveness */ +*************** +*** 822,831 **** + cstack.cs_lflags = 0; + ga_init2(&lines_ga, (int)sizeof(wcmd_T), 10); + +! real_cookie = getline_cookie(getline, cookie); + + /* Inside a function use a higher nesting level. */ +! getline_is_func = getline_equal(getline, cookie, get_func_line); + if (getline_is_func && ex_nesting_level == func_level(real_cookie)) + ++ex_nesting_level; + +--- 822,831 ---- + cstack.cs_lflags = 0; + ga_init2(&lines_ga, (int)sizeof(wcmd_T), 10); + +! real_cookie = getline_cookie(fgetline, cookie); + + /* Inside a function use a higher nesting level. */ +! getline_is_func = getline_equal(fgetline, cookie, get_func_line); + if (getline_is_func && ex_nesting_level == func_level(real_cookie)) + ++ex_nesting_level; + +*************** +*** 837,843 **** + breakpoint = func_breakpoint(real_cookie); + dbg_tick = func_dbg_tick(real_cookie); + } +! else if (getline_equal(getline, cookie, getsourceline)) + { + fname = sourcing_name; + breakpoint = source_breakpoint(real_cookie); +--- 837,843 ---- + breakpoint = func_breakpoint(real_cookie); + dbg_tick = func_dbg_tick(real_cookie); + } +! else if (getline_equal(fgetline, cookie, getsourceline)) + { + fname = sourcing_name; + breakpoint = source_breakpoint(real_cookie); +*************** +*** 881,887 **** + * KeyTyped is only set when calling vgetc(). Reset it here when not + * calling vgetc() (sourced command lines). + */ +! if (!(flags & DOCMD_KEYTYPED) && !getline_equal(getline, cookie, getexline)) + KeyTyped = FALSE; + + /* +--- 881,888 ---- + * KeyTyped is only set when calling vgetc(). Reset it here when not + * calling vgetc() (sourced command lines). + */ +! if (!(flags & DOCMD_KEYTYPED) +! && !getline_equal(fgetline, cookie, getexline)) + KeyTyped = FALSE; + + /* +*************** +*** 894,900 **** + do + { + #ifdef FEAT_EVAL +! getline_is_func = getline_equal(getline, cookie, get_func_line); + #endif + + /* stop skipping cmds for an error msg after all endif/while/for */ +--- 895,901 ---- + do + { + #ifdef FEAT_EVAL +! getline_is_func = getline_equal(fgetline, cookie, get_func_line); + #endif + + /* stop skipping cmds for an error msg after all endif/while/for */ +*************** +*** 909,915 **** + + /* + * 1. If repeating a line in a loop, get a line from lines_ga. +! * 2. If no line given: Get an allocated line with getline(). + * 3. If a line is given: Make a copy, so we can mess with it. + */ + +--- 910,916 ---- + + /* + * 1. If repeating a line in a loop, get a line from lines_ga. +! * 2. If no line given: Get an allocated line with fgetline(). + * 3. If a line is given: Make a copy, so we can mess with it. + */ + +*************** +*** 938,949 **** + } + #ifdef FEAT_PROFILE + else if (do_profiling == PROF_YES +! && getline_equal(getline, cookie, getsourceline)) + script_line_end(); + #endif + + /* Check if a sourced file hit a ":finish" command. */ +! if (source_finished(getline, cookie)) + { + retval = FAIL; + break; +--- 939,950 ---- + } + #ifdef FEAT_PROFILE + else if (do_profiling == PROF_YES +! && getline_equal(fgetline, cookie, getsourceline)) + script_line_end(); + #endif + + /* Check if a sourced file hit a ":finish" command. */ +! if (source_finished(fgetline, cookie)) + { + retval = FAIL; + break; +*************** +*** 954,960 **** + && *dbg_tick != debug_tick) + { + *breakpoint = dbg_find_breakpoint( +! getline_equal(getline, cookie, getsourceline), + fname, sourcing_lnum); + *dbg_tick = debug_tick; + } +--- 955,961 ---- + && *dbg_tick != debug_tick) + { + *breakpoint = dbg_find_breakpoint( +! getline_equal(fgetline, cookie, getsourceline), + fname, sourcing_lnum); + *dbg_tick = debug_tick; + } +*************** +*** 969,975 **** + dbg_breakpoint(fname, sourcing_lnum); + /* Find next breakpoint. */ + *breakpoint = dbg_find_breakpoint( +! getline_equal(getline, cookie, getsourceline), + fname, sourcing_lnum); + *dbg_tick = debug_tick; + } +--- 970,976 ---- + dbg_breakpoint(fname, sourcing_lnum); + /* Find next breakpoint. */ + *breakpoint = dbg_find_breakpoint( +! getline_equal(fgetline, cookie, getsourceline), + fname, sourcing_lnum); + *dbg_tick = debug_tick; + } +*************** +*** 978,984 **** + { + if (getline_is_func) + func_line_start(real_cookie); +! else if (getline_equal(getline, cookie, getsourceline)) + script_line_start(); + } + # endif +--- 979,985 ---- + { + if (getline_is_func) + func_line_start(real_cookie); +! else if (getline_equal(fgetline, cookie, getsourceline)) + script_line_start(); + } + # endif +*************** +*** 987,993 **** + if (cstack.cs_looplevel > 0) + { + /* Inside a while/for loop we need to store the lines and use them +! * again. Pass a different "getline" function to do_one_cmd() + * below, so that it stores lines in or reads them from + * "lines_ga". Makes it possible to define a function inside a + * while/for loop. */ +--- 988,994 ---- + if (cstack.cs_looplevel > 0) + { + /* Inside a while/for loop we need to store the lines and use them +! * again. Pass a different "fgetline" function to do_one_cmd() + * below, so that it stores lines in or reads them from + * "lines_ga". Makes it possible to define a function inside a + * while/for loop. */ +*************** +*** 995,1021 **** + cmd_cookie = (void *)&cmd_loop_cookie; + cmd_loop_cookie.lines_gap = &lines_ga; + cmd_loop_cookie.current_line = current_line; +! cmd_loop_cookie.getline = getline; + cmd_loop_cookie.cookie = cookie; + cmd_loop_cookie.repeating = (current_line < lines_ga.ga_len); + } + else + { +! cmd_getline = getline; + cmd_cookie = cookie; + } + #endif + +! /* 2. If no line given, get an allocated line with getline(). */ + if (next_cmdline == NULL) + { + /* + * Need to set msg_didout for the first line after an ":if", + * otherwise the ":if" will be overwritten. + */ +! if (count == 1 && getline_equal(getline, cookie, getexline)) + msg_didout = TRUE; +! if (getline == NULL || (next_cmdline = getline(':', cookie, + #ifdef FEAT_EVAL + cstack.cs_idx < 0 ? 0 : (cstack.cs_idx + 1) * 2 + #else +--- 996,1022 ---- + cmd_cookie = (void *)&cmd_loop_cookie; + cmd_loop_cookie.lines_gap = &lines_ga; + cmd_loop_cookie.current_line = current_line; +! cmd_loop_cookie.getline = fgetline; + cmd_loop_cookie.cookie = cookie; + cmd_loop_cookie.repeating = (current_line < lines_ga.ga_len); + } + else + { +! cmd_getline = fgetline; + cmd_cookie = cookie; + } + #endif + +! /* 2. If no line given, get an allocated line with fgetline(). */ + if (next_cmdline == NULL) + { + /* + * Need to set msg_didout for the first line after an ":if", + * otherwise the ":if" will be overwritten. + */ +! if (count == 1 && getline_equal(fgetline, cookie, getexline)) + msg_didout = TRUE; +! if (fgetline == NULL || (next_cmdline = fgetline(':', cookie, + #ifdef FEAT_EVAL + cstack.cs_idx < 0 ? 0 : (cstack.cs_idx + 1) * 2 + #else +*************** +*** 1142,1148 **** + * If the command was typed, remember it for the ':' register. + * Do this AFTER executing the command to make :@: work. + */ +! if (getline_equal(getline, cookie, getexline) + && new_last_cmdline != NULL) + { + vim_free(last_cmdline); +--- 1143,1149 ---- + * If the command was typed, remember it for the ':' register. + * Do this AFTER executing the command to make :@: work. + */ +! if (getline_equal(fgetline, cookie, getexline) + && new_last_cmdline != NULL) + { + vim_free(last_cmdline); +*************** +*** 1163,1169 **** + #ifdef FEAT_EVAL + /* reset did_emsg for a function that is not aborted by an error */ + if (did_emsg && !force_abort +! && getline_equal(getline, cookie, get_func_line) + && !func_has_abort(real_cookie)) + did_emsg = FALSE; + +--- 1164,1170 ---- + #ifdef FEAT_EVAL + /* reset did_emsg for a function that is not aborted by an error */ + if (did_emsg && !force_abort +! && getline_equal(fgetline, cookie, get_func_line) + && !func_has_abort(real_cookie)) + did_emsg = FALSE; + +*************** +*** 1202,1208 **** + if (breakpoint != NULL) + { + *breakpoint = dbg_find_breakpoint( +! getline_equal(getline, cookie, getsourceline), + fname, + ((wcmd_T *)lines_ga.ga_data)[current_line].lnum-1); + *dbg_tick = debug_tick; +--- 1203,1209 ---- + if (breakpoint != NULL) + { + *breakpoint = dbg_find_breakpoint( +! getline_equal(fgetline, cookie, getsourceline), + fname, + ((wcmd_T *)lines_ga.ga_data)[current_line].lnum-1); + *dbg_tick = debug_tick; +*************** +*** 1296,1303 **** + #endif + ) + && !(did_emsg && used_getline +! && (getline_equal(getline, cookie, getexmodeline) +! || getline_equal(getline, cookie, getexline))) + && (next_cmdline != NULL + #ifdef FEAT_EVAL + || cstack.cs_idx >= 0 +--- 1297,1304 ---- + #endif + ) + && !(did_emsg && used_getline +! && (getline_equal(fgetline, cookie, getexmodeline) +! || getline_equal(fgetline, cookie, getexline))) + && (next_cmdline != NULL + #ifdef FEAT_EVAL + || cstack.cs_idx >= 0 +*************** +*** 1316,1324 **** + * unclosed conditional. + */ + if (!got_int && !did_throw +! && ((getline_equal(getline, cookie, getsourceline) +! && !source_finished(getline, cookie)) +! || (getline_equal(getline, cookie, get_func_line) + && !func_has_ended(real_cookie)))) + { + if (cstack.cs_flags[cstack.cs_idx] & CSF_TRY) +--- 1317,1325 ---- + * unclosed conditional. + */ + if (!got_int && !did_throw +! && ((getline_equal(fgetline, cookie, getsourceline) +! && !source_finished(fgetline, cookie)) +! || (getline_equal(fgetline, cookie, get_func_line) + && !func_has_ended(real_cookie)))) + { + if (cstack.cs_flags[cstack.cs_idx] & CSF_TRY) +*************** +*** 1354,1360 **** + /* If a missing ":endtry", ":endwhile", ":endfor", or ":endif" or a memory + * lack was reported above and the error message is to be converted to an + * exception, do this now after rewinding the cstack. */ +! do_errthrow(&cstack, getline_equal(getline, cookie, get_func_line) + ? (char_u *)"endfunction" : (char_u *)NULL); + + if (trylevel == 0) +--- 1355,1361 ---- + /* If a missing ":endtry", ":endwhile", ":endfor", or ":endif" or a memory + * lack was reported above and the error message is to be converted to an + * exception, do this now after rewinding the cstack. */ +! do_errthrow(&cstack, getline_equal(fgetline, cookie, get_func_line) + ? (char_u *)"endfunction" : (char_u *)NULL); + + if (trylevel == 0) +*************** +*** 1449,1457 **** + */ + if (did_throw) + need_rethrow = TRUE; +! if ((getline_equal(getline, cookie, getsourceline) + && ex_nesting_level > source_level(real_cookie)) +! || (getline_equal(getline, cookie, get_func_line) + && ex_nesting_level > func_level(real_cookie) + 1)) + { + if (!did_throw) +--- 1450,1458 ---- + */ + if (did_throw) + need_rethrow = TRUE; +! if ((getline_equal(fgetline, cookie, getsourceline) + && ex_nesting_level > source_level(real_cookie)) +! || (getline_equal(fgetline, cookie, get_func_line) + && ex_nesting_level > func_level(real_cookie) + 1)) + { + if (!did_throw) +*************** +*** 1460,1475 **** + else + { + /* When leaving a function, reduce nesting level. */ +! if (getline_equal(getline, cookie, get_func_line)) + --ex_nesting_level; + /* + * Go to debug mode when returning from a function in which we are + * single-stepping. + */ +! if ((getline_equal(getline, cookie, getsourceline) +! || getline_equal(getline, cookie, get_func_line)) + && ex_nesting_level + 1 <= debug_break_level) +! do_debug(getline_equal(getline, cookie, getsourceline) + ? (char_u *)_("End of sourced file") + : (char_u *)_("End of function")); + } +--- 1461,1476 ---- + else + { + /* When leaving a function, reduce nesting level. */ +! if (getline_equal(fgetline, cookie, get_func_line)) + --ex_nesting_level; + /* + * Go to debug mode when returning from a function in which we are + * single-stepping. + */ +! if ((getline_equal(fgetline, cookie, getsourceline) +! || getline_equal(fgetline, cookie, get_func_line)) + && ex_nesting_level + 1 <= debug_break_level) +! do_debug(getline_equal(fgetline, cookie, getsourceline) + ? (char_u *)_("End of sourced file") + : (char_u *)_("End of function")); + } +*** ../vim-7.3.055/src/version.c 2010-11-16 11:28:33.000000000 +0100 +--- src/version.c 2010-11-16 11:27:09.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 56, + /**/ + +-- +Lawmakers made it obligatory for everybody to take at least one bath +each week -- on Saturday night. + [real standing law in Vermont, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f616a1d9f82b9d80aa7ab66dea8fef30b498c66f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 16 Nov 2010 12:10:08 +0100 Subject: [PATCH 0058/3803] - patchlevel 56 --- README.patches | 1 + vim.spec | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index 61cdee8b..c4fd9f3f 100644 --- a/README.patches +++ b/README.patches @@ -81,3 +81,4 @@ Individual patches for Vim 7.3: 2948 7.3.053 complete() function doesn't reset complete direction 3354 7.3.054 can define a user command for :Print, but it doesn't work 10470 7.3.055 endless loop when recursively comparing lists and dicts + 17935 7.3.056 "getline" argument in do_cmdline() shadows global diff --git a/vim.spec b/vim.spec index d6693f1f..3385c398 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 055 +%define patchlevel 056 Summary: The VIM editor URL: http://www.vim.org/ @@ -119,6 +119,7 @@ Patch052: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.052 Patch053: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.053 Patch054: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.054 Patch055: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.055 +Patch056: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.056 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -318,6 +319,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch053 -p0 %patch054 -p0 %patch055 -p0 +%patch056 -p0 # install spell files @@ -785,6 +787,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Tue Nov 16 2010 Karsten Hopp 7.3.056-1 +- patchlevel 056 + * Thu Nov 11 2010 Karsten Hopp 7.3.055-1 - patchlevel 055 From 4dc91a9491710032fb9f22a7c20c63c8d54f47a2 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 16 Nov 2010 17:57:16 +0100 Subject: [PATCH 0059/3803] - patchlevel 057 --- 7.3.057 | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 7.3.057 diff --git a/7.3.057 b/7.3.057 new file mode 100644 index 00000000..d4ea2bc0 --- /dev/null +++ b/7.3.057 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.057 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.057 +Problem: Segfault with command line abbreviation. (Randy Morris) +Solution: Don't retrigger the abbreviation when abandoning the command line. + Continue editing the command line after the error. +Files: src/ex_getln.c + + +*** ../vim-7.3.056/src/ex_getln.c 2010-11-10 15:37:00.000000000 +0100 +--- src/ex_getln.c 2010-11-16 14:03:09.000000000 +0100 +*************** +*** 712,718 **** + } + } + beep_flush(); +! c = ESC; + } + #endif + else +--- 712,722 ---- + } + } + beep_flush(); +! got_int = FALSE; /* don't abandon the command line */ +! did_emsg = FALSE; +! emsg_on_display = FALSE; +! redrawcmd(); +! goto cmdline_not_changed; + } + #endif + else +*** ../vim-7.3.056/src/version.c 2010-11-16 11:29:30.000000000 +0100 +--- src/version.c 2010-11-16 14:04:25.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 57, + /**/ + +-- +FROG: How you English say: I one more time, mac, I unclog my nose towards + you, sons of a window-dresser, so, you think you could out-clever us + French fellows with your silly knees-bent creeping about advancing + behaviour. (blows a raspberry) I wave my private parts at your aunties, + you brightly-coloured, mealy-templed, cranberry-smelling, electric + donkey-bottom biters. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 4a8814d990aa73c6bd1cf28add42301a85566995 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 16 Nov 2010 17:57:17 +0100 Subject: [PATCH 0060/3803] - patchlevel 058 --- 7.3.058 | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 7.3.058 diff --git a/7.3.058 b/7.3.058 new file mode 100644 index 00000000..b1ede331 --- /dev/null +++ b/7.3.058 @@ -0,0 +1,158 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.058 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.058 +Problem: Error "code converter not found" when loading Ruby script. +Solution: Load Gem module. (Yasuhiro Matsumoto) +Files: src/if_ruby.c + + +*** ../vim-7.3.057/src/if_ruby.c 2010-10-27 17:40:53.000000000 +0200 +--- src/if_ruby.c 2010-11-16 14:37:48.000000000 +0100 +*************** +*** 229,234 **** +--- 229,237 ---- + # define rb_enc_find_index dll_rb_enc_find_index + # define rb_enc_find dll_rb_enc_find + # define rb_enc_str_new dll_rb_enc_str_new ++ # define rb_intern2 dll_rb_intern2 ++ # define rb_const_remove dll_rb_const_remove ++ # define Init_prelude dll_Init_prelude + # define rb_sprintf dll_rb_sprintf + # define ruby_init_stack dll_ruby_init_stack + #endif +*************** +*** 317,322 **** +--- 320,328 ---- + static int (*dll_rb_enc_find_index) (const char*); + static rb_encoding* (*dll_rb_enc_find) (const char*); + static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*); ++ static ID (*dll_rb_intern2) (const char*, long); ++ static void (*dll_Init_prelude) (void); ++ static VALUE (*dll_rb_const_remove) (VALUE, ID); + static VALUE (*dll_rb_sprintf) (const char*, ...); + static void (*ruby_init_stack)(VALUE*); + #endif +*************** +*** 425,430 **** +--- 431,439 ---- + {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, + {"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find}, + {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new}, ++ {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2}, ++ {"rb_const_remove", (RUBY_PROC*)&dll_rb_const_remove}, ++ {"Init_prelude", (RUBY_PROC*)&dll_Init_prelude}, + {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf}, + {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack}, + #endif +*************** +*** 662,667 **** +--- 671,682 ---- + ruby_io_init(); + #ifdef RUBY19_OR_LATER + rb_enc_find_index("encdb"); ++ ++ /* This avoids the error "Encoding::ConverterNotFoundError: code ++ * converter not found (UTF-16LE to ASCII-8BIT)". */ ++ rb_define_module("Gem"); ++ Init_prelude(); ++ rb_const_remove(rb_cObject, rb_intern2("TMP_RUBY_PREFIX", 15)); + #endif + ruby_vim_init(); + ruby_initialized = 1; +*************** +*** 946,958 **** + + static VALUE get_buffer_line(buf_T *buf, linenr_T n) + { +! if (n > 0 && n <= buf->b_ml.ml_line_count) +! { +! char *line = (char *)ml_get_buf(buf, n, FALSE); +! return line ? vim_str2rb_enc_str(line) : Qnil; +! } +! rb_raise(rb_eIndexError, "line number %ld out of range", (long)n); +! return Qnil; /* For stop warning */ + } + + static VALUE buffer_aref(VALUE self, VALUE num) +--- 961,969 ---- + + static VALUE get_buffer_line(buf_T *buf, linenr_T n) + { +! if (n <= 0 || n > buf->b_ml.ml_line_count) +! rb_raise(rb_eIndexError, "line number %ld out of range", (long)n); +! return vim_str2rb_enc_str((char *)ml_get_buf(buf, n, FALSE)); + } + + static VALUE buffer_aref(VALUE self, VALUE num) +*************** +*** 991,999 **** + else + { + rb_raise(rb_eIndexError, "line number %ld out of range", (long)n); +- #ifndef __GNUC__ +- return Qnil; /* For stop warning */ +- #endif + } + return str; + } +--- 1002,1007 ---- +*************** +*** 1048,1054 **** + long n = NUM2LONG(num); + aco_save_T aco; + +! if (line == NULL) { + rb_raise(rb_eIndexError, "NULL line"); + } + else if (n >= 0 && n <= buf->b_ml.ml_line_count) +--- 1056,1063 ---- + long n = NUM2LONG(num); + aco_save_T aco; + +! if (line == NULL) +! { + rb_raise(rb_eIndexError, "NULL line"); + } + else if (n >= 0 && n <= buf->b_ml.ml_line_count) +*************** +*** 1072,1078 **** + + update_curbuf(NOT_VALID); + } +! else { + rb_raise(rb_eIndexError, "line number %ld out of range", n); + } + return str; +--- 1081,1088 ---- + + update_curbuf(NOT_VALID); + } +! else +! { + rb_raise(rb_eIndexError, "line number %ld out of range", n); + } + return str; +*** ../vim-7.3.057/src/version.c 2010-11-16 14:05:48.000000000 +0100 +--- src/version.c 2010-11-16 14:44:42.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 58, + /**/ + +-- +SIGIRO -- irony detected (iron core dumped) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 6a5e3a5c636bc906b7ee41f44bf42a278f0fa3da Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 16 Nov 2010 17:57:17 +0100 Subject: [PATCH 0061/3803] - patchlevel 059 --- 7.3.059 | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 7.3.059 diff --git a/7.3.059 b/7.3.059 new file mode 100644 index 00000000..6e99f876 --- /dev/null +++ b/7.3.059 @@ -0,0 +1,116 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.059 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.059 +Problem: Netbeans: Problem with recursively handling messages for Athena + and Motif. +Solution: Call netbeans_parse_messages() in the main loop, like it's done + for GTK. (Xavier de Gaye) +Files: src/gui_x11.c, src/netbeans.c + + +*** ../vim-7.3.058/src/gui_x11.c 2010-08-15 21:57:25.000000000 +0200 +--- src/gui_x11.c 2010-11-16 14:53:18.000000000 +0100 +*************** +*** 2895,2900 **** +--- 2895,2905 ---- + focus = gui.in_focus; + } + ++ #if defined(FEAT_NETBEANS_INTG) ++ /* Process any queued netbeans messages. */ ++ netbeans_parse_messages(); ++ #endif ++ + /* + * Don't use gui_mch_update() because then we will spin-lock until a + * char arrives, instead we use XtAppProcessEvent() to hang until an +*** ../vim-7.3.058/src/netbeans.c 2010-09-30 21:03:13.000000000 +0200 +--- src/netbeans.c 2010-11-16 14:52:55.000000000 +0100 +*************** +*** 726,734 **** + static char_u *buf = NULL; + int len = 0; + int readlen = 0; +- #if defined(NB_HAS_GUI) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32) +- static int level = 0; +- #endif + #ifdef HAVE_SELECT + struct timeval tval; + fd_set rfds; +--- 726,731 ---- +*************** +*** 744,756 **** + return; + } + +- #if defined(NB_HAS_GUI) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32) +- /* recursion guard; this will be called from the X event loop at unknown +- * moments */ +- if (NB_HAS_GUI) +- ++level; +- #endif +- + /* Allocate a buffer to read into. */ + if (buf == NULL) + { +--- 741,746 ---- +*************** +*** 803,823 **** + return; /* don't try to parse it */ + } + +! #if defined(NB_HAS_GUI) && !defined(FEAT_GUI_W32) +! /* Let the main loop handle messages. */ +! if (NB_HAS_GUI) +! { +! # ifdef FEAT_GUI_GTK +! if (gtk_main_level() > 0) +! gtk_main_quit(); +! # else +! /* Parse the messages now, but avoid recursion. */ +! if (level == 1) +! netbeans_parse_messages(); +! +! --level; +! # endif +! } + #endif + } + +--- 793,801 ---- + return; /* don't try to parse it */ + } + +! #if defined(NB_HAS_GUI) && defined(FEAT_GUI_GTK) +! if (NB_HAS_GUI && gtk_main_level() > 0) +! gtk_main_quit(); + #endif + } + +*** ../vim-7.3.058/src/version.c 2010-11-16 14:46:14.000000000 +0100 +--- src/version.c 2010-11-16 14:50:57.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 59, + /**/ + + +-- +ARTHUR: If you do not open these doors, we will take this castle by force ... + [A bucket of slops land on ARTHUR. He tries to retain his dignity.] + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ffaeff0cdeaaae79d21bb3a30105ec930b57d5e5 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 16 Nov 2010 17:57:17 +0100 Subject: [PATCH 0062/3803] - patchlevel 060 --- 7.3.060 | 227 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 7.3.060 diff --git a/7.3.060 b/7.3.060 new file mode 100644 index 00000000..0edf20ce --- /dev/null +++ b/7.3.060 @@ -0,0 +1,227 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.060 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.060 +Problem: Netbeans: crash when socket is disconnected unexpectedly. +Solution: Don't cleanup when a read fails, put a message in the queue and + disconnect later. (Xavier de Gaye) +Files: src/netbeans.c + + +*** ../vim-7.3.059/src/netbeans.c 2010-11-16 15:04:51.000000000 +0100 +--- src/netbeans.c 2010-11-16 15:48:36.000000000 +0100 +*************** +*** 135,148 **** + static int needupdate = 0; + static int inAtomic = 0; + + static void +! netbeans_close(void) + { +- if (!NETBEANS_OPEN) +- return; +- +- netbeans_send_disconnect(); +- + #ifdef FEAT_GUI_X11 + if (inputHandler != (XtInputId)NULL) + { +--- 135,146 ---- + static int needupdate = 0; + static int inAtomic = 0; + ++ /* ++ * Close the socket and remove the input handlers. ++ */ + static void +! nb_close_socket(void) + { + #ifdef FEAT_GUI_X11 + if (inputHandler != (XtInputId)NULL) + { +*************** +*** 167,179 **** + # endif + #endif + + #ifdef FEAT_BEVAL + bevalServers &= ~BEVAL_NETBEANS; + #endif + +- sock_close(nbsock); +- nbsock = -1; +- + needupdate = 0; + inAtomic = 0; + nb_free(); +--- 165,191 ---- + # endif + #endif + ++ sock_close(nbsock); ++ nbsock = -1; ++ } ++ ++ /* ++ * Close the connection and cleanup. ++ * May be called when nb_close_socket() was called earlier. ++ */ ++ static void ++ netbeans_close(void) ++ { ++ if (NETBEANS_OPEN) ++ { ++ netbeans_send_disconnect(); ++ nb_close_socket(); ++ } ++ + #ifdef FEAT_BEVAL + bevalServers &= ~BEVAL_NETBEANS; + #endif + + needupdate = 0; + inAtomic = 0; + nb_free(); +*************** +*** 632,640 **** + char_u *p; + queue_T *node; + +- if (!NETBEANS_OPEN) +- return; +- + while (head.next != NULL && head.next != &head) + { + node = head.next; +--- 644,649 ---- +*************** +*** 720,725 **** +--- 729,736 ---- + } + #endif + ++ #define DETACH_MSG "DETACH\n" ++ + void + netbeans_read() + { +*************** +*** 780,801 **** + break; /* did read everything that's available */ + } + + if (readlen <= 0) + { +! /* read error or didn't read anything */ +! netbeans_close(); +! nbdebug(("messageFromNetbeans: Error in read() from socket\n")); + if (len < 0) + { + nbdebug(("read from Netbeans socket\n")); + PERROR(_("read from Netbeans socket")); + } +- return; /* don't try to parse it */ + } + + #if defined(NB_HAS_GUI) && defined(FEAT_GUI_GTK) + if (NB_HAS_GUI && gtk_main_level() > 0) +! gtk_main_quit(); + #endif + } + +--- 791,822 ---- + break; /* did read everything that's available */ + } + ++ /* Reading a socket disconnection (readlen == 0), or a socket error. */ + if (readlen <= 0) + { +! /* Queue a "DETACH" netbeans message in the command queue in order to +! * terminate the netbeans session later. Do not end the session here +! * directly as we may be running in the context of a call to +! * netbeans_parse_messages(): +! * netbeans_parse_messages +! * -> autocmd triggered while processing the netbeans cmd +! * -> ui_breakcheck +! * -> gui event loop or select loop +! * -> netbeans_read() +! */ +! save((char_u *)DETACH_MSG, strlen(DETACH_MSG)); +! nb_close_socket(); +! + if (len < 0) + { + nbdebug(("read from Netbeans socket\n")); + PERROR(_("read from Netbeans socket")); + } + } + + #if defined(NB_HAS_GUI) && defined(FEAT_GUI_GTK) + if (NB_HAS_GUI && gtk_main_level() > 0) +! gtk_main_quit(); + #endif + } + +*************** +*** 1164,1169 **** +--- 1185,1194 ---- + + nbdebug(("REP %d: \n", cmdno)); + ++ /* Avoid printing an annoying error message. */ ++ if (!NETBEANS_OPEN) ++ return; ++ + sprintf(reply, "%d\n", cmdno); + nb_send(reply, "nb_reply_nil"); + } +*************** +*** 2753,2763 **** + { + #ifdef FEAT_GUI + # if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \ +! && !defined(FEAT_GUI_W32) + if (gui.in_use) + { +! EMSG(_("E838: netbeans is not supported with this GUI")); +! return; + } + # endif + #endif +--- 2778,2788 ---- + { + #ifdef FEAT_GUI + # if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \ +! && !defined(FEAT_GUI_W32) + if (gui.in_use) + { +! EMSG(_("E838: netbeans is not supported with this GUI")); +! return; + } + # endif + #endif +*** ../vim-7.3.059/src/version.c 2010-11-16 15:04:51.000000000 +0100 +--- src/version.c 2010-11-16 15:22:39.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 60, + /**/ + +-- + Another bucket of what can only be described as human ordure hits ARTHUR. +ARTHUR: ... Right! (to the KNIGHTS) That settles it! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 44c928f6b7412ed514a11a2da867e2f142a412b2 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 16 Nov 2010 17:57:18 +0100 Subject: [PATCH 0063/3803] - patchlevel 061 --- 7.3.061 | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 7.3.061 diff --git a/7.3.061 b/7.3.061 new file mode 100644 index 00000000..2b0bdacf --- /dev/null +++ b/7.3.061 @@ -0,0 +1,89 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.061 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.061 +Problem: Remote ":drop" does not respect 'autochdir'. (Peter Odding) +Solution: Don't restore the directory when 'autochdir' is set. (Benjamin + Fritz) +Files: src/main.c + + +*** ../vim-7.3.060/src/main.c 2010-09-29 17:26:57.000000000 +0200 +--- src/main.c 2010-11-16 16:16:11.000000000 +0100 +*************** +*** 3817,3822 **** +--- 3817,3824 ---- + /* Check if we have at least one argument. */ + if (filec <= 0) + mainerr_arg_missing((char_u *)filev[-1]); ++ ++ /* Temporarily cd to the current directory to handle relative file names. */ + if (mch_dirname(cwd, MAXPATHL) != OK) + return NULL; + if ((p = vim_strsave_escaped_ext(cwd, +*************** +*** 3858,3870 **** + ga_concat(&ga, p); + vim_free(p); + } + /* The :drop commands goes to Insert mode when 'insertmode' is set, use + * CTRL-\ CTRL-N again. */ +! ga_concat(&ga, (char_u *)"|if exists('*inputrestore')|call inputrestore()|endif"); +! ga_concat(&ga, (char_u *)":cd -"); + if (sendReply) +! ga_concat(&ga, (char_u *)":call SetupRemoteReplies()"); +! ga_concat(&ga, (char_u *)":"); + if (inicmd != NULL) + { + /* Can't use after "inicmd", because an "startinsert" would cause +--- 3860,3879 ---- + ga_concat(&ga, p); + vim_free(p); + } ++ ga_concat(&ga, (char_u *)"|if exists('*inputrestore')|call inputrestore()|endif"); ++ + /* The :drop commands goes to Insert mode when 'insertmode' is set, use + * CTRL-\ CTRL-N again. */ +! ga_concat(&ga, (char_u *)""); +! +! /* Switch back to the correct current directory (prior to temporary path +! * switch) unless 'autochdir' is set, in which case it will already be +! * correct after the :drop command. */ +! ga_concat(&ga, (char_u *)":if !exists('+acd')||!&acd|cd -|endif"); +! + if (sendReply) +! ga_concat(&ga, (char_u *)":call SetupRemoteReplies()"); +! ga_concat(&ga, (char_u *)":"); + if (inicmd != NULL) + { + /* Can't use after "inicmd", because an "startinsert" would cause +*** ../vim-7.3.060/src/version.c 2010-11-16 15:48:57.000000000 +0100 +--- src/version.c 2010-11-16 16:19:58.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 61, + /**/ + +-- +BEDEVERE: Stand by for attack!! + [CUT TO enormous army forming up. Trebuchets, rows of PIKEMEN, siege + towers, pennants flying, shouts of "Stand by for attack!" Traditional + army build-up shots. The shouts echo across the ranks of the army. + We see various groups reacting, and stirring themselves in readiness.] +ARTHUR: Who are they? +BEDEVERE: Oh, just some friends! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 801eae1f2db850edc4eb45f54a38efd612f05428 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 16 Nov 2010 17:57:18 +0100 Subject: [PATCH 0064/3803] - patchlevel 61 --- README.patches | 5 +++++ vim.spec | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index c4fd9f3f..df9cb73a 100644 --- a/README.patches +++ b/README.patches @@ -82,3 +82,8 @@ Individual patches for Vim 7.3: 3354 7.3.054 can define a user command for :Print, but it doesn't work 10470 7.3.055 endless loop when recursively comparing lists and dicts 17935 7.3.056 "getline" argument in do_cmdline() shadows global + 1980 7.3.057 segfault with command line abbreviation + 4735 7.3.058 error "code converter not found" when loading Ruby script + 3226 7.3.059 Netbeans: Problem with recursive messages for Athena/Motif + 5326 7.3.060 Netbeans: crash when socket is disconnected unexpectedly + 3307 7.3.061 remote ":drop" does not respect 'autochdir' diff --git a/vim.spec b/vim.spec index 3385c398..63471003 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 056 +%define patchlevel 061 Summary: The VIM editor URL: http://www.vim.org/ @@ -120,6 +120,11 @@ Patch053: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.053 Patch054: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.054 Patch055: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.055 Patch056: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.056 +Patch057: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.057 +Patch058: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.058 +Patch059: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.059 +Patch060: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.060 +Patch061: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.061 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -320,6 +325,11 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch054 -p0 %patch055 -p0 %patch056 -p0 +%patch057 -p0 +%patch058 -p0 +%patch059 -p0 +%patch060 -p0 +%patch061 -p0 # install spell files @@ -787,6 +797,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Tue Nov 16 2010 Karsten Hopp 7.3.061-1 +- patchlevel 061 + * Tue Nov 16 2010 Karsten Hopp 7.3.056-1 - patchlevel 056 From 25f6c22c9e9d396812fb56434502084a845c7371 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 17 Nov 2010 00:10:16 +0100 Subject: [PATCH 0065/3803] - patchlevel 062 --- 7.3.062 | 609 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 609 insertions(+) create mode 100644 7.3.062 diff --git a/7.3.062 b/7.3.062 new file mode 100644 index 00000000..ee69b3ae --- /dev/null +++ b/7.3.062 @@ -0,0 +1,609 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.062 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.062 +Problem: Python doesn't work properly when installed in another directory + than expected. +Solution: Figure out home directory in configure and use Py_SetPythonHome() + at runtime. (Roland Puntaier) +Files: src/configure.in, src/auto/configure, src/if_python.c, + src/if_python3.c + + +*** ../vim-7.3.061/src/configure.in 2010-11-03 22:32:18.000000000 +0100 +--- src/configure.in 2010-11-16 17:47:36.000000000 +0100 +*************** +*** 891,899 **** + + PYTHON_LIBS="${vi_cv_path_python_plibs}" + if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}" + else +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}" + fi + PYTHON_SRC="if_python.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +--- 891,899 ---- + + PYTHON_LIBS="${vi_cv_path_python_plibs}" + if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\"" + else +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\"" + fi + PYTHON_SRC="if_python.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +*************** +*** 905,911 **** + if test "${vi_cv_var_python_version}" = "1.4"; then + PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" + fi +! PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'" + + dnl On FreeBSD linking with "-pthread" is required to use threads. + dnl _THREAD_SAFE must be used for compiling then. +--- 905,911 ---- + if test "${vi_cv_var_python_version}" = "1.4"; then + PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" + fi +! PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'" + + dnl On FreeBSD linking with "-pthread" is required to use threads. + dnl _THREAD_SAFE must be used for compiling then. +*************** +*** 1063,1071 **** + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}" + fi + PYTHON3_SRC="if_python3.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +--- 1063,1071 ---- + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +*************** +*** 1143,1151 **** + if test "$python_ok" = yes && test "$python3_ok" = yes; then + AC_DEFINE(DYNAMIC_PYTHON) + AC_DEFINE(DYNAMIC_PYTHON3) +! AC_MSG_CHECKING(whether we can do without RTLD_GLOBAL) + cflags_save=$CFLAGS +! CFLAGS="$CFLAGS $PYTHON3_CFLAGS" + ldflags_save=$LDFLAGS + LDFLAGS="$LDFLAGS -ldl" + AC_RUN_IFELSE([ +--- 1143,1151 ---- + if test "$python_ok" = yes && test "$python3_ok" = yes; then + AC_DEFINE(DYNAMIC_PYTHON) + AC_DEFINE(DYNAMIC_PYTHON3) +! AC_MSG_CHECKING(whether we can do without RTLD_GLOBAL for Python) + cflags_save=$CFLAGS +! CFLAGS="$CFLAGS $PYTHON_CFLAGS" + ldflags_save=$LDFLAGS + LDFLAGS="$LDFLAGS -ldl" + AC_RUN_IFELSE([ +*************** +*** 1156,1170 **** + * Only the first pyhton version used will be switched on. + */ + +! int no_rtl_global_needed_for(char *python_instsoname) + { + int needed = 0; + void* pylib = dlopen(python_instsoname, RTLD_LAZY); + if (pylib != 0) + { + void (*init)(void) = dlsym(pylib, "Py_Initialize"); + int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString"); + void (*final)(void) = dlsym(pylib, "Py_Finalize"); + (*init)(); + needed = (*simple)("import termios") == -1; + (*final)(); +--- 1156,1172 ---- + * Only the first pyhton version used will be switched on. + */ + +! int no_rtl_global_needed_for(char *python_instsoname, char *prefix) + { + int needed = 0; + void* pylib = dlopen(python_instsoname, RTLD_LAZY); + if (pylib != 0) + { ++ void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome"); + void (*init)(void) = dlsym(pylib, "Py_Initialize"); + int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString"); + void (*final)(void) = dlsym(pylib, "Py_Finalize"); ++ (*pfx)(prefix); + (*init)(); + needed = (*simple)("import termios") == -1; + (*final)(); +*************** +*** 1176,1188 **** + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("libpython2.7.so.1.0") && no_rtl_global_needed_for("libpython3.1.so.1.0")) + not_needed = 1; + return !not_needed; + }], + [AC_MSG_RESULT(yes);AC_DEFINE(PY_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)]) + CFLAGS=$cflags_save + LDFLAGS=$ldflags_save + PYTHON_SRC="if_python.c" + PYTHON_OBJ="objects/if_python.o" + PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" +--- 1178,1237 ---- + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}")) + not_needed = 1; + return !not_needed; + }], + [AC_MSG_RESULT(yes);AC_DEFINE(PY_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)]) ++ + CFLAGS=$cflags_save + LDFLAGS=$ldflags_save ++ ++ AC_MSG_CHECKING(whether we can do without RTLD_GLOBAL for Python3) ++ cflags_save=$CFLAGS ++ CFLAGS="$CFLAGS $PYTHON3_CFLAGS" ++ ldflags_save=$LDFLAGS ++ LDFLAGS="$LDFLAGS -ldl" ++ AC_RUN_IFELSE([ ++ #include ++ #include ++ /* If this program fails, then RTLD_GLOBAL is needed. ++ * RTLD_GLOBAL will be used and then it is not possible to ++ * have both python versions enabled in the same vim instance. ++ * Only the first pyhton version used will be switched on. ++ */ ++ ++ int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix) ++ { ++ int needed = 0; ++ void* pylib = dlopen(python_instsoname, RTLD_LAZY); ++ if (pylib != 0) ++ { ++ void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome"); ++ void (*init)(void) = dlsym(pylib, "Py_Initialize"); ++ int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString"); ++ void (*final)(void) = dlsym(pylib, "Py_Finalize"); ++ (*pfx)(prefix); ++ (*init)(); ++ needed = (*simple)("import termios") == -1; ++ (*final)(); ++ dlclose(pylib); ++ } ++ return !needed; ++ } ++ ++ int main(int argc, char** argv) ++ { ++ int not_needed = 0; ++ if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}")) ++ not_needed = 1; ++ return !not_needed; ++ }], ++ [AC_MSG_RESULT(yes);AC_DEFINE(PY3_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)]) ++ ++ CFLAGS=$cflags_save ++ LDFLAGS=$ldflags_save ++ + PYTHON_SRC="if_python.c" + PYTHON_OBJ="objects/if_python.o" + PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" +*** ../vim-7.3.061/src/auto/configure 2010-11-03 22:32:18.000000000 +0100 +--- src/auto/configure 2010-11-16 17:47:42.000000000 +0100 +*************** +*** 5326,5334 **** + + PYTHON_LIBS="${vi_cv_path_python_plibs}" + if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}" + else +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}" + fi + PYTHON_SRC="if_python.c" + if test "x$MACOSX" = "xyes"; then +--- 5326,5334 ---- + + PYTHON_LIBS="${vi_cv_path_python_plibs}" + if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\"" + else +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\"" + fi + PYTHON_SRC="if_python.c" + if test "x$MACOSX" = "xyes"; then +*************** +*** 5339,5345 **** + if test "${vi_cv_var_python_version}" = "1.4"; then + PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" + fi +! PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5 + $as_echo_n "checking if -pthread should be used... " >&6; } +--- 5339,5345 ---- + if test "${vi_cv_var_python_version}" = "1.4"; then + PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" + fi +! PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5 + $as_echo_n "checking if -pthread should be used... " >&6; } +*************** +*** 5601,5609 **** + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}" + fi + PYTHON3_SRC="if_python3.c" + if test "x$MACOSX" = "xyes"; then +--- 5601,5609 ---- + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + if test "x$MACOSX" = "xyes"; then +*************** +*** 5708,5717 **** + + $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h + +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL" >&5 +! $as_echo_n "checking whether we can do without RTLD_GLOBAL... " >&6; } + cflags_save=$CFLAGS +! CFLAGS="$CFLAGS $PYTHON3_CFLAGS" + ldflags_save=$LDFLAGS + LDFLAGS="$LDFLAGS -ldl" + if test "$cross_compiling" = yes; then : +--- 5708,5717 ---- + + $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h + +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5 +! $as_echo_n "checking whether we can do without RTLD_GLOBAL for Python... " >&6; } + cflags_save=$CFLAGS +! CFLAGS="$CFLAGS $PYTHON_CFLAGS" + ldflags_save=$LDFLAGS + LDFLAGS="$LDFLAGS -ldl" + if test "$cross_compiling" = yes; then : +*************** +*** 5730,5744 **** + * Only the first pyhton version used will be switched on. + */ + +! int no_rtl_global_needed_for(char *python_instsoname) + { + int needed = 0; + void* pylib = dlopen(python_instsoname, RTLD_LAZY); + if (pylib != 0) + { + void (*init)(void) = dlsym(pylib, "Py_Initialize"); + int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString"); + void (*final)(void) = dlsym(pylib, "Py_Finalize"); + (*init)(); + needed = (*simple)("import termios") == -1; + (*final)(); +--- 5730,5746 ---- + * Only the first pyhton version used will be switched on. + */ + +! int no_rtl_global_needed_for(char *python_instsoname, char *prefix) + { + int needed = 0; + void* pylib = dlopen(python_instsoname, RTLD_LAZY); + if (pylib != 0) + { ++ void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome"); + void (*init)(void) = dlsym(pylib, "Py_Initialize"); + int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString"); + void (*final)(void) = dlsym(pylib, "Py_Finalize"); ++ (*pfx)(prefix); + (*init)(); + needed = (*simple)("import termios") == -1; + (*final)(); +*************** +*** 5750,5756 **** + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("libpython2.7.so.1.0") && no_rtl_global_needed_for("libpython3.1.so.1.0")) + not_needed = 1; + return !not_needed; + } +--- 5752,5758 ---- + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}")) + not_needed = 1; + return !not_needed; + } +*************** +*** 5767,5774 **** +--- 5769,5844 ---- + conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + ++ + CFLAGS=$cflags_save + LDFLAGS=$ldflags_save ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5 ++ $as_echo_n "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; } ++ cflags_save=$CFLAGS ++ CFLAGS="$CFLAGS $PYTHON3_CFLAGS" ++ ldflags_save=$LDFLAGS ++ LDFLAGS="$LDFLAGS -ldl" ++ if test "$cross_compiling" = yes; then : ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++ as_fn_error "cannot run test program while cross compiling ++ See \`config.log' for more details." "$LINENO" 5; } ++ else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ /* end confdefs.h. */ ++ ++ #include ++ #include ++ /* If this program fails, then RTLD_GLOBAL is needed. ++ * RTLD_GLOBAL will be used and then it is not possible to ++ * have both python versions enabled in the same vim instance. ++ * Only the first pyhton version used will be switched on. ++ */ ++ ++ int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix) ++ { ++ int needed = 0; ++ void* pylib = dlopen(python_instsoname, RTLD_LAZY); ++ if (pylib != 0) ++ { ++ void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome"); ++ void (*init)(void) = dlsym(pylib, "Py_Initialize"); ++ int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString"); ++ void (*final)(void) = dlsym(pylib, "Py_Finalize"); ++ (*pfx)(prefix); ++ (*init)(); ++ needed = (*simple)("import termios") == -1; ++ (*final)(); ++ dlclose(pylib); ++ } ++ return !needed; ++ } ++ ++ int main(int argc, char** argv) ++ { ++ int not_needed = 0; ++ if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}")) ++ not_needed = 1; ++ return !not_needed; ++ } ++ _ACEOF ++ if ac_fn_c_try_run "$LINENO"; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++ $as_echo "yes" >&6; };$as_echo "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h ++ ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++ $as_echo "no" >&6; } ++ fi ++ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++ fi ++ ++ ++ CFLAGS=$cflags_save ++ LDFLAGS=$ldflags_save ++ + PYTHON_SRC="if_python.c" + PYTHON_OBJ="objects/if_python.o" + PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" +*** ../vim-7.3.061/src/if_python.c 2010-10-23 14:02:48.000000000 +0200 +--- src/if_python.c 2010-11-16 17:07:00.000000000 +0100 +*************** +*** 102,108 **** + # include + # define FARPROC void* + # define HINSTANCE void* +! # ifdef PY_NO_RTLD_GLOBAL + # define load_dll(n) dlopen((n), RTLD_LAZY) + # else + # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL) +--- 102,108 ---- + # include + # define FARPROC void* + # define HINSTANCE void* +! # if defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL) + # define load_dll(n) dlopen((n), RTLD_LAZY) + # else + # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL) +*************** +*** 168,173 **** +--- 168,174 ---- + # define Py_BuildValue dll_Py_BuildValue + # define Py_FindMethod dll_Py_FindMethod + # define Py_InitModule4 dll_Py_InitModule4 ++ # define Py_SetPythonHome dll_Py_SetPythonHome + # define Py_Initialize dll_Py_Initialize + # define Py_Finalize dll_Py_Finalize + # define Py_IsInitialized dll_Py_IsInitialized +*************** +*** 226,231 **** +--- 227,233 ---- + static PyObject*(*dll_Py_BuildValue)(char *, ...); + static PyObject*(*dll_Py_FindMethod)(struct PyMethodDef[], PyObject *, char *); + static PyObject*(*dll_Py_InitModule4)(char *, struct PyMethodDef *, char *, PyObject *, int); ++ static void(*dll_Py_SetPythonHome)(char *home); + static void(*dll_Py_Initialize)(void); + static void(*dll_Py_Finalize)(void); + static int(*dll_Py_IsInitialized)(void); +*************** +*** 310,315 **** +--- 312,318 ---- + # else + {"Py_InitModule4", (PYTHON_PROC*)&dll_Py_InitModule4}, + # endif ++ {"Py_SetPythonHome", (PYTHON_PROC*)&dll_Py_SetPythonHome}, + {"Py_Initialize", (PYTHON_PROC*)&dll_Py_Initialize}, + {"Py_Finalize", (PYTHON_PROC*)&dll_Py_Finalize}, + {"Py_IsInitialized", (PYTHON_PROC*)&dll_Py_IsInitialized}, +*************** +*** 349,355 **** + { + int i; + +! #if !defined(PY_NO_RTLD_GLOBAL) && defined(UNIX) && defined(FEAT_PYTHON3) + /* Can't have Python and Python3 loaded at the same time. + * It cause a crash, because RTLD_GLOBAL is needed for + * standard C extension libraries of one or both python versions. */ +--- 352,358 ---- + { + int i; + +! #if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON3) + /* Can't have Python and Python3 loaded at the same time. + * It cause a crash, because RTLD_GLOBAL is needed for + * standard C extension libraries of one or both python versions. */ +*************** +*** 543,548 **** +--- 546,555 ---- + } + #endif + ++ #ifdef PYTHON_HOME ++ Py_SetPythonHome(PYTHON_HOME); ++ #endif ++ + init_structs(); + + #if !defined(MACOS) || defined(MACOS_X_UNIX) +*** ../vim-7.3.061/src/if_python3.c 2010-10-23 14:02:48.000000000 +0200 +--- src/if_python3.c 2010-11-16 17:07:26.000000000 +0100 +*************** +*** 80,86 **** + # include + # define FARPROC void* + # define HINSTANCE void* +! # ifdef PY_NO_RTLD_GLOBAL + # define load_dll(n) dlopen((n), RTLD_LAZY) + # else + # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL) +--- 80,86 ---- + # include + # define FARPROC void* + # define HINSTANCE void* +! # if defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL) + # define load_dll(n) dlopen((n), RTLD_LAZY) + # else + # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL) +*************** +*** 132,137 **** +--- 132,138 ---- + # define PyType_Ready py3_PyType_Ready + #undef Py_BuildValue + # define Py_BuildValue py3_Py_BuildValue ++ # define Py_SetPythonHome py3_Py_SetPythonHome + # define Py_Initialize py3_Py_Initialize + # define Py_Finalize py3_Py_Finalize + # define Py_IsInitialized py3_Py_IsInitialized +*************** +*** 170,175 **** +--- 171,177 ---- + * Pointers for dynamic link + */ + static int (*py3_PySys_SetArgv)(int, wchar_t **); ++ static void (*py3_Py_SetPythonHome)(wchar_t *home); + static void (*py3_Py_Initialize)(void); + static PyObject* (*py3_PyList_New)(Py_ssize_t size); + static PyGILState_STATE (*py3_PyGILState_Ensure)(void); +*************** +*** 254,259 **** +--- 256,262 ---- + } py3_funcname_table[] = + { + {"PySys_SetArgv", (PYTHON_PROC*)&py3_PySys_SetArgv}, ++ {"Py_SetPythonHome", (PYTHON_PROC*)&py3_Py_SetPythonHome}, + {"Py_Initialize", (PYTHON_PROC*)&py3_Py_Initialize}, + {"PyArg_ParseTuple", (PYTHON_PROC*)&py3_PyArg_ParseTuple}, + {"PyList_New", (PYTHON_PROC*)&py3_PyList_New}, +*************** +*** 336,342 **** + int i; + void *ucs_from_string, *ucs_from_string_and_size; + +! # if !defined(PY_NO_RTLD_GLOBAL) && defined(UNIX) && defined(FEAT_PYTHON) + /* Can't have Python and Python3 loaded at the same time. + * It cause a crash, because RTLD_GLOBAL is needed for + * standard C extension libraries of one or both python versions. */ +--- 339,345 ---- + int i; + void *ucs_from_string, *ucs_from_string_and_size; + +! # if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON) + /* Can't have Python and Python3 loaded at the same time. + * It cause a crash, because RTLD_GLOBAL is needed for + * standard C extension libraries of one or both python versions. */ +*************** +*** 539,544 **** +--- 542,552 ---- + + init_structs(); + ++ ++ #ifdef PYTHON3_HOME ++ Py_SetPythonHome(PYTHON3_HOME); ++ #endif ++ + /* initialise threads */ + PyEval_InitThreads(); + +*** ../vim-7.3.061/src/version.c 2010-11-16 16:25:46.000000000 +0100 +--- src/version.c 2010-11-16 17:12:40.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 62, + /**/ + +-- +ARTHUR: CHARGE! + [The mighty ARMY charges. Thundering noise of feet. Clatter of coconuts. + Shouts etc. Suddenly there is a wail of a siren and a couple of police + cars roar round in front of the charging ARMY and the POLICE leap out and + stop them. TWO POLICEMAN and the HISTORIAN'S WIFE. Black Marias skid up + behind them.] +HISTORIAN'S WIFE: They're the ones, I'm sure. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 1b7cbbed0343f05e33f63198639963ba5538b969 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 17 Nov 2010 00:10:16 +0100 Subject: [PATCH 0066/3803] - patchlevel 62 --- README.patches | 1 + vim.spec | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index df9cb73a..afa757e1 100644 --- a/README.patches +++ b/README.patches @@ -87,3 +87,4 @@ Individual patches for Vim 7.3: 3226 7.3.059 Netbeans: Problem with recursive messages for Athena/Motif 5326 7.3.060 Netbeans: crash when socket is disconnected unexpectedly 3307 7.3.061 remote ":drop" does not respect 'autochdir' + 23639 7.3.062 Python has problems when installed in an unusual directory diff --git a/vim.spec b/vim.spec index 63471003..297eab04 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 061 +%define patchlevel 062 Summary: The VIM editor URL: http://www.vim.org/ @@ -125,6 +125,7 @@ Patch058: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.058 Patch059: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.059 Patch060: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.060 Patch061: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.061 +Patch062: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.062 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -330,6 +331,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch059 -p0 %patch060 -p0 %patch061 -p0 +%patch062 -p0 # install spell files @@ -797,6 +799,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Wed Nov 17 2010 Karsten Hopp 7.3.062-1 +- patchlevel 062 + * Tue Nov 16 2010 Karsten Hopp 7.3.061-1 - patchlevel 061 From d561c27a7e94a505f018985f6e263d18bda04c63 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 24 Nov 2010 13:10:11 +0100 Subject: [PATCH 0067/3803] - patchlevel 063 --- 7.3.063 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 7.3.063 diff --git a/7.3.063 b/7.3.063 new file mode 100644 index 00000000..27516ff2 --- /dev/null +++ b/7.3.063 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.063 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.063 +Problem: Win32: Running a filter command makes Vim lose focus. +Solution: Use SW_SHOWMINNOACTIVE instead of SW_SHOWMINIMIZED. (Hong Xu) +Files: src/os_win32.c + + +*** ../vim-7.3.062/src/os_win32.c 2010-11-10 15:37:00.000000000 +0100 +--- src/os_win32.c 2010-11-24 12:31:46.000000000 +0100 +*************** +*** 3185,3193 **** + * It's nicer to run a filter command in a minimized window, but in + * Windows 95 this makes the command MUCH slower. We can't do it under + * Win32s either as it stops the synchronous spawn workaround working. + */ + if ((options & SHELL_DOOUT) && !mch_windows95() && !gui_is_win32s()) +! si.wShowWindow = SW_SHOWMINIMIZED; + else + si.wShowWindow = SW_SHOWNORMAL; + si.cbReserved2 = 0; +--- 3185,3194 ---- + * It's nicer to run a filter command in a minimized window, but in + * Windows 95 this makes the command MUCH slower. We can't do it under + * Win32s either as it stops the synchronous spawn workaround working. ++ * Don't activate the window to keep focus on Vim. + */ + if ((options & SHELL_DOOUT) && !mch_windows95() && !gui_is_win32s()) +! si.wShowWindow = SW_SHOWMINNOACTIVE; + else + si.wShowWindow = SW_SHOWNORMAL; + si.cbReserved2 = 0; +*** ../vim-7.3.062/src/version.c 2010-11-16 19:25:56.000000000 +0100 +--- src/version.c 2010-11-24 12:32:52.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 63, + /**/ + +-- +SOLDIER: Where did you get the coconuts? +ARTHUR: Through ... We found them. +SOLDIER: Found them? In Mercea. The coconut's tropical! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 4944966f02520f7c547eee108091cd424e85afbd Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 24 Nov 2010 13:10:15 +0100 Subject: [PATCH 0068/3803] - patchlevel 63 --- README.patches | 1 + vim.spec | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index afa757e1..08c27660 100644 --- a/README.patches +++ b/README.patches @@ -88,3 +88,4 @@ Individual patches for Vim 7.3: 5326 7.3.060 Netbeans: crash when socket is disconnected unexpectedly 3307 7.3.061 remote ":drop" does not respect 'autochdir' 23639 7.3.062 Python has problems when installed in an unusual directory + 2250 7.3.063 Win32: Running a filter command makes Vim lose focus diff --git a/vim.spec b/vim.spec index 297eab04..8c739b6e 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 062 +%define patchlevel 063 Summary: The VIM editor URL: http://www.vim.org/ @@ -126,6 +126,7 @@ Patch059: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.059 Patch060: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.060 Patch061: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.061 Patch062: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.062 +Patch063: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.063 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -332,6 +333,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch060 -p0 %patch061 -p0 %patch062 -p0 +%patch063 -p0 # install spell files @@ -799,6 +801,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Wed Nov 24 2010 Karsten Hopp 7.3.063-1 +- patchlevel 063 + * Wed Nov 17 2010 Karsten Hopp 7.3.062-1 - patchlevel 062 From 8bc426fc9e142a6632e5bdc5fd7656db57747f43 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 24 Nov 2010 18:10:12 +0100 Subject: [PATCH 0069/3803] - patchlevel 064 --- 7.3.064 | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 7.3.064 diff --git a/7.3.064 b/7.3.064 new file mode 100644 index 00000000..cbd49ad9 --- /dev/null +++ b/7.3.064 @@ -0,0 +1,72 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.064 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.064 +Problem: Win32: ":dis +" shows nothing, but "+p does insert text. +Solution: Display the * register, since that's what will be inserted. + (Christian Brabandt) +Files: src/globals.h, src/ops.c + + +*** ../vim-7.3.063/src/globals.h 2010-08-15 21:57:27.000000000 +0200 +--- src/globals.h 2010-11-24 14:06:47.000000000 +0100 +*************** +*** 510,515 **** +--- 510,516 ---- + EXTERN VimClipboard clip_plus; /* CLIPBOARD selection in X11 */ + # else + # define clip_plus clip_star /* there is only one clipboard */ ++ # define ONE_CLIPBOARD + # endif + EXTERN int clip_unnamed INIT(= FALSE); + EXTERN int clip_autoselect INIT(= FALSE); +*** ../vim-7.3.063/src/ops.c 2010-10-09 17:21:42.000000000 +0200 +--- src/ops.c 2010-11-24 14:26:25.000000000 +0100 +*************** +*** 3979,3985 **** + for (i = -1; i < NUM_REGISTERS && !got_int; ++i) + { + name = get_register_name(i); +! if (arg != NULL && vim_strchr(arg, name) == NULL) + continue; /* did not ask for this register */ + + #ifdef FEAT_CLIPBOARD +--- 3979,3990 ---- + for (i = -1; i < NUM_REGISTERS && !got_int; ++i) + { + name = get_register_name(i); +! if (arg != NULL && vim_strchr(arg, name) == NULL +! #ifdef ONE_CLIPBOARD +! /* Star register and plus register contain the same thing. */ +! && (name != '*' || vim_strchr(arg, '+') == NULL) +! #endif +! ) + continue; /* did not ask for this register */ + + #ifdef FEAT_CLIPBOARD +*** ../vim-7.3.063/src/version.c 2010-11-24 12:35:14.000000000 +0100 +--- src/version.c 2010-11-24 14:24:03.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 64, + /**/ + +-- +FIRST SOLDIER: So they wouldn't be able to bring a coconut back anyway. +SECOND SOLDIER: Wait a minute! Suppose two swallows carried it together? +FIRST SOLDIER: No, they'd have to have it on a line. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 7ba5077896844f1fd902c985737762ab09b369e7 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 24 Nov 2010 18:10:12 +0100 Subject: [PATCH 0070/3803] - patchlevel 065 --- 7.3.065 | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 7.3.065 diff --git a/7.3.065 b/7.3.065 new file mode 100644 index 00000000..cd9b2a75 --- /dev/null +++ b/7.3.065 @@ -0,0 +1,120 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.065 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.065 +Problem: Can't get current line number in a source file. +Solution: Add the item, similar to . +Files: src/ex_docmd.c + + +*** ../vim-7.3.064/src/ex_docmd.c 2010-11-16 11:29:30.000000000 +0100 +--- src/ex_docmd.c 2010-11-24 15:41:51.000000000 +0100 +*************** +*** 9538,9554 **** + #define SPEC_CFILE 4 + "", /* ":so" file name */ + #define SPEC_SFILE 5 + #ifdef FEAT_AUTOCMD + "", /* autocommand file name */ +! # define SPEC_AFILE 6 + "", /* autocommand buffer number */ +! # define SPEC_ABUF 7 + "", /* autocommand match name */ +! # define SPEC_AMATCH 8 + #endif + #ifdef FEAT_CLIENTSERVER + "" +! # define SPEC_CLIENT 9 + #endif + }; + +--- 9538,9560 ---- + #define SPEC_CFILE 4 + "", /* ":so" file name */ + #define SPEC_SFILE 5 ++ "", /* ":so" file line number */ ++ #define SPEC_SLNUM 6 + #ifdef FEAT_AUTOCMD + "", /* autocommand file name */ +! # define SPEC_AFILE 7 + "", /* autocommand buffer number */ +! # define SPEC_ABUF 8 + "", /* autocommand match name */ +! # define SPEC_AMATCH 9 + #endif + #ifdef FEAT_CLIENTSERVER + "" +! # ifdef FEAT_AUTOCMD +! # define SPEC_CLIENT 10 +! # else +! # define SPEC_CLIENT 7 +! # endif + #endif + }; + +*************** +*** 9573,9578 **** +--- 9579,9585 ---- + * '' to WORD under the cursor + * '' to path name under the cursor + * '' to sourced file name ++ * '' to sourced file line number + * '' to file name for autocommand + * '' to buffer number for autocommand + * '' to matching name for autocommand +*************** +*** 9604,9613 **** + #ifdef FEAT_MODIFY_FNAME + int skip_mod = FALSE; + #endif +- +- #if defined(FEAT_AUTOCMD) || defined(FEAT_CLIENTSERVER) + char_u strbuf[30]; +- #endif + + *errormsg = NULL; + if (escaped != NULL) +--- 9611,9617 ---- +*************** +*** 9796,9801 **** +--- 9800,9814 ---- + return NULL; + } + break; ++ case SPEC_SLNUM: /* line in file for ":so" command */ ++ if (sourcing_name == NULL || sourcing_lnum == 0) ++ { ++ *errormsg = (char_u *)_("E842: no line number to use for \"\""); ++ return NULL; ++ } ++ sprintf((char *)strbuf, "%ld", (long)sourcing_lnum); ++ result = strbuf; ++ break; + #if defined(FEAT_CLIENTSERVER) + case SPEC_CLIENT: /* Source of last submitted input */ + sprintf((char *)strbuf, PRINTF_HEX_LONG_U, +*** ../vim-7.3.064/src/version.c 2010-11-24 14:28:53.000000000 +0100 +--- src/version.c 2010-11-24 15:49:57.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 65, + /**/ + + +-- +If you don't get everything you want, think of +everything you didn't get and don't want. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a90a35b3d23668682ac7a2581e6481a78e977857 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 24 Nov 2010 18:10:13 +0100 Subject: [PATCH 0071/3803] - patchlevel 066 --- 7.3.066 | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 7.3.066 diff --git a/7.3.066 b/7.3.066 new file mode 100644 index 00000000..f4a6fd0b --- /dev/null +++ b/7.3.066 @@ -0,0 +1,90 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.066 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.066 +Problem: Crash when changing to another window while in a :vimgrep command. + (Christian Brabandt) +Solution: When wiping out the dummy before, remove it from aucmd_win. +Files: src/quickfix.c + + +*** ../vim-7.3.065/src/quickfix.c 2010-09-21 16:56:29.000000000 +0200 +--- src/quickfix.c 2010-11-24 16:27:40.000000000 +0100 +*************** +*** 3432,3437 **** +--- 3432,3438 ---- + char_u *fname; + { + buf_T *newbuf; ++ buf_T *newbuf_to_wipe = NULL; + int failed = TRUE; + aco_save_T aco; + +*************** +*** 3468,3482 **** + failed = FALSE; + if (curbuf != newbuf) + { +! /* Bloody autocommands changed the buffer! */ +! if (buf_valid(newbuf)) +! wipe_buffer(newbuf, FALSE); + newbuf = curbuf; + } + } + + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + } + + if (!buf_valid(newbuf)) +--- 3469,3487 ---- + failed = FALSE; + if (curbuf != newbuf) + { +! /* Bloody autocommands changed the buffer! Can happen when +! * using netrw and editing a remote file. Use the current +! * buffer instead, delete the dummy one after restoring the +! * window stuff. */ +! newbuf_to_wipe = newbuf; + newbuf = curbuf; + } + } + + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); ++ if (newbuf_to_wipe != NULL && buf_valid(newbuf_to_wipe)) ++ wipe_buffer(newbuf_to_wipe, FALSE); + } + + if (!buf_valid(newbuf)) +*** ../vim-7.3.065/src/version.c 2010-11-24 15:50:54.000000000 +0100 +--- src/version.c 2010-11-24 16:30:44.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 66, + /**/ + +-- +CART DRIVER: Bring out your dead! + We follow the cart through a wretched, impoverished plague-ridden village. + A few starved mongrels run about in the mud scavenging. In the open + doorway of one house perhaps we jug glimpse a pair of legs dangling from + the ceiling. In another doorway an OLD WOMAN is beating a cat against a + wall rather like one does with a mat. The cart passes round a dead donkey + or cow in the mud. And a MAN tied to a cart is being hammered to death by + four NUNS with huge mallets. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d256b7bbf3709cb1297c1c71ab7e44d4ddcfc2cb Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 24 Nov 2010 18:10:13 +0100 Subject: [PATCH 0072/3803] - patchlevel 067 --- 7.3.067 | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 7.3.067 diff --git a/7.3.067 b/7.3.067 new file mode 100644 index 00000000..c32c645a --- /dev/null +++ b/7.3.067 @@ -0,0 +1,68 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.067 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.067 (after 7.3.058) +Problem: Ruby: Init_prelude is not always available. +Solution: Remove use of Init_prelude. (Yasuhiro Matsumoto) +Files: src/if_ruby.c + + +*** ../vim-7.3.066/src/if_ruby.c 2010-11-16 14:46:14.000000000 +0100 +--- src/if_ruby.c 2010-11-24 16:53:06.000000000 +0100 +*************** +*** 231,237 **** + # define rb_enc_str_new dll_rb_enc_str_new + # define rb_intern2 dll_rb_intern2 + # define rb_const_remove dll_rb_const_remove +- # define Init_prelude dll_Init_prelude + # define rb_sprintf dll_rb_sprintf + # define ruby_init_stack dll_ruby_init_stack + #endif +--- 231,236 ---- +*************** +*** 433,439 **** + {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new}, + {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2}, + {"rb_const_remove", (RUBY_PROC*)&dll_rb_const_remove}, +- {"Init_prelude", (RUBY_PROC*)&dll_Init_prelude}, + {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf}, + {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack}, + #endif +--- 432,437 ---- +*************** +*** 675,681 **** + /* This avoids the error "Encoding::ConverterNotFoundError: code + * converter not found (UTF-16LE to ASCII-8BIT)". */ + rb_define_module("Gem"); +- Init_prelude(); + rb_const_remove(rb_cObject, rb_intern2("TMP_RUBY_PREFIX", 15)); + #endif + ruby_vim_init(); +--- 673,678 ---- +*** ../vim-7.3.066/src/version.c 2010-11-24 16:31:55.000000000 +0100 +--- src/version.c 2010-11-24 16:53:35.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 67, + /**/ + +-- +CART DRIVER: Bring out your dead! +LARGE MAN: Here's one! +CART DRIVER: Ninepence. +BODY: I'm not dead! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From eb47e8d6e19c07e277166b5db54dfa6e1e037315 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 24 Nov 2010 18:10:13 +0100 Subject: [PATCH 0073/3803] - patchlevel 068 --- 7.3.068 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 7.3.068 diff --git a/7.3.068 b/7.3.068 new file mode 100644 index 00000000..8acbcab9 --- /dev/null +++ b/7.3.068 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.068 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.068 +Problem: Using freed memory when doing ":saveas" and an autocommand sets + 'autochdir'. (Kevin Klement) +Solution: Get the value of fname again after executing autocommands. +Files: src/ex_cmds.c + + +*** ../vim-7.3.067/src/ex_cmds.c 2010-10-15 20:20:00.000000000 +0200 +--- src/ex_cmds.c 2010-11-24 17:53:07.000000000 +0100 +*************** +*** 2705,2710 **** +--- 2705,2714 ---- + TRUE); + do_modelines(0); + } ++ ++ /* Autocommands may have changed buffer names, esp. when ++ * 'autochdir' is set. */ ++ fname = curbuf->b_sfname; + #endif + } + +*** ../vim-7.3.067/src/version.c 2010-11-24 17:03:34.000000000 +0100 +--- src/version.c 2010-11-24 17:55:11.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 68, + /**/ + +-- +I used to wonder about the meaning of life. But I looked it +up in the dictionary under "L" and there it was - the meaning +of life. It was less than I expected. - Dogbert + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f7f62f9a571f2791a9ed7120fbb4f804a88b002a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 24 Nov 2010 18:10:14 +0100 Subject: [PATCH 0074/3803] - patchlevel 68 --- README.patches | 5 +++++ vim.spec | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index 08c27660..263d2ebb 100644 --- a/README.patches +++ b/README.patches @@ -89,3 +89,8 @@ Individual patches for Vim 7.3: 3307 7.3.061 remote ":drop" does not respect 'autochdir' 23639 7.3.062 Python has problems when installed in an unusual directory 2250 7.3.063 Win32: Running a filter command makes Vim lose focus + 2493 7.3.064 Win32: ":dis +" shows nothing, but "+p does insert text + 3389 7.3.065 can't get current line number in a source file + 2852 7.3.066 crash when changing to another window during :vimgrep command + 2315 7.3.067 Ruby: Init_prelude is not always available + 1550 7.3.068 using freed memory on ":saveas" if autocommand sets 'acd' diff --git a/vim.spec b/vim.spec index 8c739b6e..68c7d1d4 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 063 +%define patchlevel 068 Summary: The VIM editor URL: http://www.vim.org/ @@ -127,6 +127,11 @@ Patch060: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.060 Patch061: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.061 Patch062: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.062 Patch063: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.063 +Patch064: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.064 +Patch065: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.065 +Patch066: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.066 +Patch067: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.067 +Patch068: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.068 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -334,6 +339,11 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch061 -p0 %patch062 -p0 %patch063 -p0 +%patch064 -p0 +%patch065 -p0 +%patch066 -p0 +%patch067 -p0 +%patch068 -p0 # install spell files @@ -801,6 +811,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Wed Nov 24 2010 Karsten Hopp 7.3.068-1 +- patchlevel 068 + * Wed Nov 24 2010 Karsten Hopp 7.3.063-1 - patchlevel 063 From 3aeac0f180e4b8575ebfd6ec6fadd6f99c112ec0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Nov 2010 00:10:14 +0100 Subject: [PATCH 0075/3803] - patchlevel 069 --- 7.3.069 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 7.3.069 diff --git a/7.3.069 b/7.3.069 new file mode 100644 index 00000000..d7761290 --- /dev/null +++ b/7.3.069 @@ -0,0 +1,49 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.069 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.069 +Problem: GTK: pressing Enter in inputdialog() doesn't work like clicking OK + as documented. +Solution: call gtk_entry_set_activates_default(). (Britton Kerin) +Files: src/gui_gtk.c + + +*** ../vim-7.3.068/src/gui_gtk.c 2010-08-15 21:57:32.000000000 +0200 +--- src/gui_gtk.c 2010-11-24 18:44:21.000000000 +0100 +*************** +*** 1287,1292 **** +--- 1287,1295 ---- + entry = gtk_entry_new(); + gtk_widget_show(entry); + ++ /* Make Enter work like pressing OK. */ ++ gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE); ++ + text = CONVERT_TO_UTF8(textfield); + gtk_entry_set_text(GTK_ENTRY(entry), (const char *)text); + CONVERT_TO_UTF8_FREE(text); +*** ../vim-7.3.068/src/version.c 2010-11-24 17:59:27.000000000 +0100 +--- src/version.c 2010-11-24 18:46:39.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 69, + /**/ + +-- +Why I like vim: +> I like VIM because, when I ask a question in this newsgroup, I get a +> one-line answer. With xemacs, I get a 1Kb lisp script with bugs in it ;-) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b1e6cb9d2f2b7f73d4cece63ff5b36d9a99c07cf Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 25 Nov 2010 00:10:15 +0100 Subject: [PATCH 0076/3803] - patchlevel 69 --- README.patches | 1 + vim.spec | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index 263d2ebb..8d31bb3f 100644 --- a/README.patches +++ b/README.patches @@ -94,3 +94,4 @@ Individual patches for Vim 7.3: 2852 7.3.066 crash when changing to another window during :vimgrep command 2315 7.3.067 Ruby: Init_prelude is not always available 1550 7.3.068 using freed memory on ":saveas" if autocommand sets 'acd' + 1618 7.3.069 GTK: pressing Enter in inputdialog() doesn't work like OK diff --git a/vim.spec b/vim.spec index 68c7d1d4..d3d85d28 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 068 +%define patchlevel 069 Summary: The VIM editor URL: http://www.vim.org/ @@ -132,6 +132,7 @@ Patch065: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.065 Patch066: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.066 Patch067: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.067 Patch068: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.068 +Patch069: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.069 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -344,6 +345,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch066 -p0 %patch067 -p0 %patch068 -p0 +%patch069 -p0 # install spell files @@ -811,6 +813,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Thu Nov 25 2010 Karsten Hopp 7.3.069-1 +- patchlevel 069 + * Wed Nov 24 2010 Karsten Hopp 7.3.068-1 - patchlevel 068 From 35c50963a8e5a823f42510365477712dd764ea62 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 2 Dec 2010 18:10:14 +0100 Subject: [PATCH 0077/3803] - patchlevel 070 --- 7.3.070 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 7.3.070 diff --git a/7.3.070 b/7.3.070 new file mode 100644 index 00000000..0da893f9 --- /dev/null +++ b/7.3.070 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.070 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.070 +Problem: Can set environment variables in the sandbox, could be abused. +Solution: Disallow it. +Files: src/eval.c + + +*** ../vim-7.3.069/src/eval.c 2010-11-10 20:31:24.000000000 +0100 +--- src/eval.c 2010-12-02 14:42:31.000000000 +0100 +*************** +*** 2326,2332 **** + else if (endchars != NULL + && vim_strchr(endchars, *skipwhite(arg)) == NULL) + EMSG(_(e_letunexp)); +! else + { + c1 = name[len]; + name[len] = NUL; +--- 2326,2332 ---- + else if (endchars != NULL + && vim_strchr(endchars, *skipwhite(arg)) == NULL) + EMSG(_(e_letunexp)); +! else if (!check_secure()) + { + c1 = name[len]; + name[len] = NUL; +*** ../vim-7.3.069/src/version.c 2010-11-24 18:48:08.000000000 +0100 +--- src/version.c 2010-12-02 14:46:44.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 70, + /**/ + +-- +The only way the average employee can speak to an executive is by taking a +second job as a golf caddie. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d47030c78ac769c5ac5641cf1afe8ad6ff0bec57 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 2 Dec 2010 18:10:15 +0100 Subject: [PATCH 0078/3803] - patchlevel 071 --- 7.3.071 | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 7.3.071 diff --git a/7.3.071 b/7.3.071 new file mode 100644 index 00000000..75b6979f --- /dev/null +++ b/7.3.071 @@ -0,0 +1,65 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.071 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.071 +Problem: Editing a file in a window that's in diff mode resets 'diff' + but not cursor binding. +Solution: Reset cursor binding in two more places. +Files: src/quickfix.c, src/option.c + + +*** ../vim-7.3.070/src/quickfix.c 2010-11-24 16:31:55.000000000 +0100 +--- src/quickfix.c 2010-12-02 15:02:00.000000000 +0100 +*************** +*** 2359,2364 **** +--- 2359,2365 ---- + set_option_value((char_u *)"bt", 0L, (char_u *)"quickfix", + OPT_LOCAL); + set_option_value((char_u *)"bh", 0L, (char_u *)"wipe", OPT_LOCAL); ++ RESET_BINDING(curwin); + #ifdef FEAT_DIFF + curwin->w_p_diff = FALSE; + #endif +*** ../vim-7.3.070/src/option.c 2010-10-13 14:05:29.000000000 +0200 +--- src/option.c 2010-12-02 15:12:02.000000000 +0100 +*************** +*** 9756,9761 **** +--- 9759,9767 ---- + #ifdef FEAT_SCROLLBIND + to->wo_scb = from->wo_scb; + #endif ++ #ifdef FEAT_CURSORBIND ++ to->wo_crb = from->wo_crb; ++ #endif + #ifdef FEAT_SPELL + to->wo_spell = from->wo_spell; + #endif +*** ../vim-7.3.070/src/version.c 2010-12-02 14:47:56.000000000 +0100 +--- src/version.c 2010-12-02 15:31:12.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 71, + /**/ + +-- +A salesperson says: Translation: +"backward compatible" Old technology +"Premium" Overpriced +"Can't keep it on the shelf" Unavailable +"Stands alone" Piece of shit +"Proprietary" Incompatible + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 716f5c8e839041d70c716ea376a70a9f7a6311d2 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 2 Dec 2010 18:10:15 +0100 Subject: [PATCH 0079/3803] - patchlevel 072 --- 7.3.072 | 295 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 295 insertions(+) create mode 100644 7.3.072 diff --git a/7.3.072 b/7.3.072 new file mode 100644 index 00000000..88e54f9e --- /dev/null +++ b/7.3.072 @@ -0,0 +1,295 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.072 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.072 +Problem: Can't complete file names while ignoring case. +Solution: Add 'wildignorecase'. +Files: src/ex_docmd.c, src/ex_getln.c, src/misc1.c, src/option.c, + src/option.h, src/vim.h, runtime/doc/options.txt + + +*** ../vim-7.3.071/src/ex_docmd.c 2010-11-24 15:50:54.000000000 +0100 +--- src/ex_docmd.c 2010-12-02 15:58:10.000000000 +0100 +*************** +*** 4524,4535 **** + else /* n == 2 */ + { + expand_T xpc; + + ExpandInit(&xpc); + xpc.xp_context = EXPAND_FILES; + p = ExpandOne(&xpc, eap->arg, NULL, +! WILD_LIST_NOTFOUND|WILD_ADD_SLASH, +! WILD_EXPAND_FREE); + if (p == NULL) + return FAIL; + } +--- 4524,4537 ---- + else /* n == 2 */ + { + expand_T xpc; ++ int options = WILD_LIST_NOTFOUND|WILD_ADD_SLASH; + + ExpandInit(&xpc); + xpc.xp_context = EXPAND_FILES; ++ if (p_wic) ++ options += WILD_ICASE; + p = ExpandOne(&xpc, eap->arg, NULL, +! options, WILD_EXPAND_FREE); + if (p == NULL) + return FAIL; + } +*** ../vim-7.3.071/src/ex_getln.c 2010-11-16 14:05:48.000000000 +0100 +--- src/ex_getln.c 2010-11-28 15:07:49.000000000 +0100 +*************** +*** 3339,3348 **** + p2 = NULL; + else + { + p2 = ExpandOne(xp, p1, + vim_strnsave(&ccline.cmdbuff[i], xp->xp_pattern_len), +! WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE +! |options, type); + vim_free(p1); + /* longest match: make sure it is not shorter, happens with :help */ + if (p2 != NULL && type == WILD_LONGEST) +--- 3339,3352 ---- + p2 = NULL; + else + { ++ int use_options = options | ++ WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE; ++ ++ if (p_wic) ++ use_options += WILD_ICASE; + p2 = ExpandOne(xp, p1, + vim_strnsave(&ccline.cmdbuff[i], xp->xp_pattern_len), +! use_options, type); + vim_free(p1); + /* longest match: make sure it is not shorter, happens with :help */ + if (p2 != NULL && type == WILD_LONGEST) +*************** +*** 3428,3433 **** +--- 3432,3438 ---- + * options = WILD_KEEP_ALL: don't remove 'wildignore' entries + * options = WILD_SILENT: don't print warning messages + * options = WILD_ESCAPE: put backslash before special chars ++ * options = WILD_ICASE: ignore case for files + * + * The variables xp->xp_context and xp->xp_backslash must have been set! + */ +*************** +*** 4361,4366 **** +--- 4366,4372 ---- + char_u ***matches; /* return: array of pointers to matches */ + { + char_u *file_str = NULL; ++ int options = WILD_ADD_SLASH|WILD_SILENT; + + if (xp->xp_context == EXPAND_UNSUCCESSFUL) + { +*************** +*** 4379,4387 **** + if (file_str == NULL) + return EXPAND_UNSUCCESSFUL; + + /* find all files that match the description */ +! if (ExpandFromContext(xp, file_str, matchcount, matches, +! WILD_ADD_SLASH|WILD_SILENT) == FAIL) + { + *matchcount = 0; + *matches = NULL; +--- 4385,4395 ---- + if (file_str == NULL) + return EXPAND_UNSUCCESSFUL; + ++ if (p_wic) ++ options += WILD_ICASE; ++ + /* find all files that match the description */ +! if (ExpandFromContext(xp, file_str, matchcount, matches, options) == FAIL) + { + *matchcount = 0; + *matches = NULL; +*************** +*** 4433,4439 **** + char_u *pat; + int *num_file; + char_u ***file; +! int options; + { + #ifdef FEAT_CMDL_COMPL + regmatch_T regmatch; +--- 4441,4447 ---- + char_u *pat; + int *num_file; + char_u ***file; +! int options; /* EW_ flags */ + { + #ifdef FEAT_CMDL_COMPL + regmatch_T regmatch; +*************** +*** 4487,4492 **** +--- 4495,4503 ---- + flags |= (EW_FILE | EW_PATH); + else + flags = (flags | EW_DIR) & ~EW_FILE; ++ if (options & WILD_ICASE) ++ flags |= EW_ICASE; ++ + /* Expand wildcards, supporting %:h and the like. */ + ret = expand_wildcards_eval(&pat, num_file, file, flags); + if (free_pat) +*** ../vim-7.3.071/src/misc1.c 2010-08-16 21:46:12.000000000 +0200 +--- src/misc1.c 2010-11-28 15:02:57.000000000 +0100 +*************** +*** 9161,9167 **** + #ifdef CASE_INSENSITIVE_FILENAME + regmatch.rm_ic = TRUE; /* Behave like Terminal.app */ + #else +! regmatch.rm_ic = FALSE; /* Don't ever ignore case */ + #endif + regmatch.regprog = vim_regcomp(pat, RE_MAGIC); + vim_free(pat); +--- 9161,9170 ---- + #ifdef CASE_INSENSITIVE_FILENAME + regmatch.rm_ic = TRUE; /* Behave like Terminal.app */ + #else +! if (flags & EW_ICASE) +! regmatch.rm_ic = TRUE; /* 'wildignorecase' set */ +! else +! regmatch.rm_ic = FALSE; /* Don't ignore case */ + #endif + regmatch.regprog = vim_regcomp(pat, RE_MAGIC); + vim_free(pat); +*************** +*** 9643,9649 **** + if (paths == NULL) + return 0; + +! files = globpath(paths, pattern, 0); + vim_free(paths); + if (files == NULL) + return 0; +--- 9646,9652 ---- + if (paths == NULL) + return 0; + +! files = globpath(paths, pattern, (flags & EW_ICASE) ? WILD_ICASE : 0); + vim_free(paths); + if (files == NULL) + return 0; +*** ../vim-7.3.071/src/option.c 2010-12-02 15:33:10.000000000 +0100 +--- src/option.c 2010-12-02 15:12:02.000000000 +0100 +*************** +*** 2740,2746 **** + (char_u *)&p_wc, PV_NONE, + {(char_u *)(long)Ctrl_E, (char_u *)(long)TAB} + SCRIPTID_INIT}, +! {"wildcharm", "wcm", P_NUM|P_VI_DEF, + (char_u *)&p_wcm, PV_NONE, + {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"wildignore", "wig", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, +--- 2740,2746 ---- + (char_u *)&p_wc, PV_NONE, + {(char_u *)(long)Ctrl_E, (char_u *)(long)TAB} + SCRIPTID_INIT}, +! {"wildcharm", "wcm", P_NUM|P_VI_DEF, + (char_u *)&p_wcm, PV_NONE, + {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"wildignore", "wig", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, +*************** +*** 2750,2755 **** +--- 2750,2758 ---- + (char_u *)NULL, PV_NONE, + #endif + {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, ++ {"wildignorecase", "wic", P_BOOL|P_VI_DEF, ++ (char_u *)&p_wic, PV_NONE, ++ {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"wildmenu", "wmnu", P_BOOL|P_VI_DEF, + #ifdef FEAT_WILDMENU + (char_u *)&p_wmnu, PV_NONE, +*** ../vim-7.3.071/src/option.h 2010-08-15 21:57:28.000000000 +0200 +--- src/option.h 2010-11-28 14:29:18.000000000 +0100 +*************** +*** 872,877 **** +--- 872,878 ---- + EXTERN char_u *p_ww; /* 'whichwrap' */ + EXTERN long p_wc; /* 'wildchar' */ + EXTERN long p_wcm; /* 'wildcharm' */ ++ EXTERN long p_wic; /* 'wildignorecase' */ + EXTERN char_u *p_wim; /* 'wildmode' */ + #ifdef FEAT_WILDMENU + EXTERN int p_wmnu; /* 'wildmenu' */ +*** ../vim-7.3.071/src/vim.h 2010-10-20 19:17:43.000000000 +0200 +--- src/vim.h 2010-11-28 14:49:02.000000000 +0100 +*************** +*** 798,803 **** +--- 798,804 ---- + #define WILD_KEEP_ALL 32 + #define WILD_SILENT 64 + #define WILD_ESCAPE 128 ++ #define WILD_ICASE 256 + + /* Flags for expand_wildcards() */ + #define EW_DIR 0x01 /* include directory names */ +*************** +*** 808,813 **** +--- 809,815 ---- + #define EW_SILENT 0x20 /* don't print "1 returned" from shell */ + #define EW_EXEC 0x40 /* executable files */ + #define EW_PATH 0x80 /* search in 'path' too */ ++ #define EW_ICASE 0x100 /* ignore case */ + /* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND + * is used when executing commands and EW_SILENT for interactive expanding. */ + +*** ../vim-7.3.071/runtime/doc/options.txt 2010-10-20 17:44:01.000000000 +0200 +--- runtime/doc/options.txt 2010-12-02 11:15:01.000000000 +0100 +*************** +*** 7748,7753 **** +--- 7756,7772 ---- + a pattern from the list. This avoids problems when a future version + uses another default. + ++ ++ *'wildignorecase* *'wic'* *'nowildignorecase* *'nowic'* ++ 'wildignorecase' 'wic' boolean (default off) ++ global ++ {not in Vi} ++ When set case is ignored when completing file names and directories. ++ Has no effect on systems where file name case is generally ignored. ++ Does not apply when the shell is used to expand wildcards, which ++ happens when there are special characters. ++ ++ + *'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'* + 'wildmenu' 'wmnu' boolean (default off) + global +*** ../vim-7.3.071/src/version.c 2010-12-02 15:33:10.000000000 +0100 +--- src/version.c 2010-12-02 15:57:14.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 72, + /**/ + +-- +I recommend ordering large cargo containers of paper towels to make up +whatever budget underruns you have. Paper products are always useful and they +have the advantage of being completely flushable if you need to make room in +the storage area later. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f942a47f9b3d5ab915e9fefeb25220b28fdfd3a6 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 2 Dec 2010 18:10:15 +0100 Subject: [PATCH 0080/3803] - patchlevel 073 --- 7.3.073 | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 7.3.073 diff --git a/7.3.073 b/7.3.073 new file mode 100644 index 00000000..4a79e20b --- /dev/null +++ b/7.3.073 @@ -0,0 +1,92 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.073 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.073 +Problem: Double free memory when netbeans command follows DETACH. +Solution: Only free the node when owned. (Xavier de Gaye) +Files: src/netbeans.c + + +*** ../vim-7.3.072/src/netbeans.c 2010-11-16 15:48:57.000000000 +0100 +--- src/netbeans.c 2010-12-02 16:59:11.000000000 +0100 +*************** +*** 643,648 **** +--- 643,649 ---- + { + char_u *p; + queue_T *node; ++ int own_node; + + while (head.next != NULL && head.next != &head) + { +*************** +*** 681,700 **** + *p++ = NUL; + if (*p == NUL) + { + head.next = node->next; + node->next->prev = node->prev; + } + + /* now, parse and execute the commands */ + nb_parse_cmd(node->buffer); + +! if (*p == NUL) + { + /* buffer finished, dispose of the node and buffer */ + vim_free(node->buffer); + vim_free(node); + } +! else + { + /* more follows, move to the start */ + STRMOVE(node->buffer, p); +--- 682,706 ---- + *p++ = NUL; + if (*p == NUL) + { ++ own_node = TRUE; + head.next = node->next; + node->next->prev = node->prev; + } ++ else ++ own_node = FALSE; + + /* now, parse and execute the commands */ + nb_parse_cmd(node->buffer); + +! if (own_node) + { + /* buffer finished, dispose of the node and buffer */ + vim_free(node->buffer); + vim_free(node); + } +! /* Check that "head" wasn't changed under our fingers, e.g. when a +! * DETACH command was handled. */ +! else if (head.next == node) + { + /* more follows, move to the start */ + STRMOVE(node->buffer, p); +*** ../vim-7.3.072/src/version.c 2010-12-02 16:01:23.000000000 +0100 +--- src/version.c 2010-12-02 17:00:29.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 73, + /**/ + +-- +If the Universe is constantly expanding, why can't I ever find a parking space? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 0ce1a092d6b4bb7cab7317af8ec7ef5d45446feb Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 2 Dec 2010 18:10:16 +0100 Subject: [PATCH 0081/3803] - patchlevel 73 --- README.patches | 4 ++++ vim.spec | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index 8d31bb3f..589e2233 100644 --- a/README.patches +++ b/README.patches @@ -95,3 +95,7 @@ Individual patches for Vim 7.3: 2315 7.3.067 Ruby: Init_prelude is not always available 1550 7.3.068 using freed memory on ":saveas" if autocommand sets 'acd' 1618 7.3.069 GTK: pressing Enter in inputdialog() doesn't work like OK + 1604 7.3.070 can set environment variables in the sandbox + 2095 7.3.071 cursor binding not reset when editing another file + 9432 7.3.072 can't complete file names while ignoring case + 2466 7.3.073 double free memory when netbeans command follows DETACH diff --git a/vim.spec b/vim.spec index d3d85d28..dc5088be 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 069 +%define patchlevel 073 Summary: The VIM editor URL: http://www.vim.org/ @@ -133,6 +133,10 @@ Patch066: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.066 Patch067: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.067 Patch068: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.068 Patch069: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.069 +Patch070: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.070 +Patch071: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.071 +Patch072: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.072 +Patch073: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.073 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -346,6 +350,10 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch067 -p0 %patch068 -p0 %patch069 -p0 +%patch070 -p0 +%patch071 -p0 +%patch072 -p0 +%patch073 -p0 # install spell files @@ -813,6 +821,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Thu Dec 02 2010 Karsten Hopp 7.3.073-1 +- patchlevel 073 + * Thu Nov 25 2010 Karsten Hopp 7.3.069-1 - patchlevel 069 From 172c1c8c0cf10a5e0b279678e5d62b8a2199e995 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Fri, 3 Dec 2010 00:10:18 +0100 Subject: [PATCH 0082/3803] - patchlevel 074 --- 7.3.074 | 235 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 7.3.074 diff --git a/7.3.074 b/7.3.074 new file mode 100644 index 00000000..1223d6dc --- /dev/null +++ b/7.3.074 @@ -0,0 +1,235 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.074 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.074 +Problem: Can't use the "+ register like "* for yank and put. +Solution: Add "unnamedplus" to the 'clipboard' option. (Ivan Krasilnikov) +Files: runtime/doc/options.txt, src/eval.c, src/globals.h, src/ops.c, + src/option.c + + +*** ../vim-7.3.073/runtime/doc/options.txt 2010-12-02 16:01:23.000000000 +0100 +--- runtime/doc/options.txt 2010-12-02 21:22:48.000000000 +0100 +*************** +*** 1434,1439 **** +--- 1434,1448 ---- + explicitly accessed using the "* notation. Also see + |gui-clipboard|. + ++ unnamedplus A variant of "unnamed" flag which uses the clipboard ++ register '+' (|quoteplus|) instead of register '*' for ++ all operations except yank. Yank shall copy the text ++ into register '+' and also into '*' when "unnamed" is ++ included. ++ Only available with the |+x11| feature. ++ Availability can be checked with: > ++ if has('unnamedplus') ++ < + autoselect Works like the 'a' flag in 'guioptions': If present, + then whenever Visual mode is started, or the Visual + area extended, Vim tries to become the owner of the +*** ../vim-7.3.073/src/eval.c 2010-12-02 14:47:56.000000000 +0100 +--- src/eval.c 2010-12-02 17:30:23.000000000 +0100 +*************** +*** 12135,12140 **** +--- 12139,12147 ---- + #ifdef FEAT_TOOLBAR + "toolbar", + #endif ++ #if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) ++ "unnamedplus", ++ #endif + #ifdef FEAT_USR_CMDS + "user-commands", /* was accidentally included in 5.4 */ + "user_commands", +*** ../vim-7.3.073/src/globals.h 2010-11-24 14:28:53.000000000 +0100 +--- src/globals.h 2010-12-02 20:07:42.000000000 +0100 +*************** +*** 512,518 **** + # define clip_plus clip_star /* there is only one clipboard */ + # define ONE_CLIPBOARD + # endif +! EXTERN int clip_unnamed INIT(= FALSE); + EXTERN int clip_autoselect INIT(= FALSE); + EXTERN int clip_autoselectml INIT(= FALSE); + EXTERN int clip_html INIT(= FALSE); +--- 512,522 ---- + # define clip_plus clip_star /* there is only one clipboard */ + # define ONE_CLIPBOARD + # endif +! +! #define CLIP_UNNAMED 1 +! #define CLIP_UNNAMED_PLUS 2 +! EXTERN int clip_unnamed INIT(= 0); /* above two values or'ed */ +! + EXTERN int clip_autoselect INIT(= FALSE); + EXTERN int clip_autoselectml INIT(= FALSE); + EXTERN int clip_html INIT(= FALSE); +*** ../vim-7.3.073/src/ops.c 2010-11-24 14:28:53.000000000 +0100 +--- src/ops.c 2010-12-02 21:33:04.000000000 +0100 +*************** +*** 1584,1592 **** + adjust_clip_reg(rp) + int *rp; + { +! /* If no reg. specified, and "unnamed" is in 'clipboard', use '*' reg. */ +! if (*rp == 0 && clip_unnamed) +! *rp = '*'; + if (!clip_star.available && *rp == '*') + *rp = 0; + if (!clip_plus.available && *rp == '+') +--- 1584,1594 ---- + adjust_clip_reg(rp) + int *rp; + { +! /* If no reg. specified, and "unnamed" or "unnamedplus" is in 'clipboard', +! * use '*' or '+' reg, respectively. "unnamedplus" prevails. */ +! if (*rp == 0 && clip_unnamed != 0) +! *rp = ((clip_unnamed & CLIP_UNNAMED_PLUS) && clip_plus.available) +! ? '+' : '*'; + if (!clip_star.available && *rp == '*') + *rp = 0; + if (!clip_plus.available && *rp == '+') +*************** +*** 2842,2847 **** +--- 2844,2850 ---- + char_u *p; + char_u *pnew; + struct block_def bd; ++ int did_star = FALSE; + + /* check for read-only register */ + if (oap->regname != 0 && !valid_yank_reg(oap->regname, TRUE)) +*************** +*** 3115,3121 **** + */ + if (clip_star.available + && (curr == &(y_regs[STAR_REGISTER]) +! || (!deleting && oap->regname == 0 && clip_unnamed))) + { + if (curr != &(y_regs[STAR_REGISTER])) + /* Copy the text from register 0 to the clipboard register. */ +--- 3118,3125 ---- + */ + if (clip_star.available + && (curr == &(y_regs[STAR_REGISTER]) +! || (!deleting && oap->regname == 0 +! && (clip_unnamed & CLIP_UNNAMED)))) + { + if (curr != &(y_regs[STAR_REGISTER])) + /* Copy the text from register 0 to the clipboard register. */ +*************** +*** 3123,3128 **** +--- 3127,3133 ---- + + clip_own_selection(&clip_star); + clip_gen_set_selection(&clip_star); ++ did_star = TRUE; + } + + # ifdef FEAT_X11 +*************** +*** 3130,3141 **** + * If we were yanking to the '+' register, send result to selection. + * Also copy to the '*' register, in case auto-select is off. + */ +! else if (clip_plus.available && curr == &(y_regs[PLUS_REGISTER])) + { + /* No need to copy to * register upon 'unnamed' now - see below */ + clip_own_selection(&clip_plus); + clip_gen_set_selection(&clip_plus); +! if (!clip_isautosel()) + { + copy_yank_reg(&(y_regs[STAR_REGISTER])); + clip_own_selection(&clip_star); +--- 3135,3153 ---- + * If we were yanking to the '+' register, send result to selection. + * Also copy to the '*' register, in case auto-select is off. + */ +! if (clip_plus.available +! && (curr == &(y_regs[PLUS_REGISTER]) +! || (!deleting && oap->regname == 0 +! && (clip_unnamed & CLIP_UNNAMED_PLUS)))) + { ++ if (curr != &(y_regs[PLUS_REGISTER])) ++ /* Copy the text from register 0 to the clipboard register. */ ++ copy_yank_reg(&(y_regs[PLUS_REGISTER])); ++ + /* No need to copy to * register upon 'unnamed' now - see below */ + clip_own_selection(&clip_plus); + clip_gen_set_selection(&clip_plus); +! if (!clip_isautosel() && !did_star) + { + copy_yank_reg(&(y_regs[STAR_REGISTER])); + clip_own_selection(&clip_star); +*** ../vim-7.3.073/src/option.c 2010-12-02 16:01:23.000000000 +0100 +--- src/option.c 2010-12-02 21:41:32.000000000 +0100 +*************** +*** 7307,7313 **** + static char_u * + check_clipboard_option() + { +! int new_unnamed = FALSE; + int new_autoselect = FALSE; + int new_autoselectml = FALSE; + int new_html = FALSE; +--- 7307,7313 ---- + static char_u * + check_clipboard_option() + { +! int new_unnamed = 0; + int new_autoselect = FALSE; + int new_autoselectml = FALSE; + int new_html = FALSE; +*************** +*** 7319,7327 **** + { + if (STRNCMP(p, "unnamed", 7) == 0 && (p[7] == ',' || p[7] == NUL)) + { +! new_unnamed = TRUE; + p += 7; + } + else if (STRNCMP(p, "autoselect", 10) == 0 + && (p[10] == ',' || p[10] == NUL)) + { +--- 7319,7333 ---- + { + if (STRNCMP(p, "unnamed", 7) == 0 && (p[7] == ',' || p[7] == NUL)) + { +! new_unnamed |= CLIP_UNNAMED; + p += 7; + } ++ else if (STRNCMP(p, "unnamedplus", 11) == 0 ++ && (p[11] == ',' || p[11] == NUL)) ++ { ++ new_unnamed |= CLIP_UNNAMED_PLUS; ++ p += 11; ++ } + else if (STRNCMP(p, "autoselect", 10) == 0 + && (p[10] == ',' || p[10] == NUL)) + { +*** ../vim-7.3.073/src/version.c 2010-12-02 17:09:48.000000000 +0100 +--- src/version.c 2010-12-02 21:34:40.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 74, + /**/ + +-- +The budget process was invented by an alien race of sadistic beings who +resemble large cats. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 46fb25af3a35285cdb645b8db78a20cc937e1a9b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Fri, 3 Dec 2010 00:10:18 +0100 Subject: [PATCH 0083/3803] - patchlevel 075 --- 7.3.075 | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 7.3.075 diff --git a/7.3.075 b/7.3.075 new file mode 100644 index 00000000..91cbb516 --- /dev/null +++ b/7.3.075 @@ -0,0 +1,132 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.075 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.075 (after 7.3.072) +Problem: Missing part of 'wildignorecase' +Solution: Also adjust expand() +Files: src/eval.c + + +*** ../vim-7.3.074/src/eval.c 2010-12-02 21:43:10.000000000 +0100 +--- src/eval.c 2010-12-02 17:30:23.000000000 +0100 +*************** +*** 9876,9882 **** + char_u *s; + int len; + char_u *errormsg; +! int flags = WILD_SILENT|WILD_USE_NL|WILD_LIST_NOTFOUND; + expand_T xpc; + int error = FALSE; + +--- 9876,9882 ---- + char_u *s; + int len; + char_u *errormsg; +! int options = WILD_SILENT|WILD_USE_NL|WILD_LIST_NOTFOUND; + expand_T xpc; + int error = FALSE; + +*************** +*** 9894,9905 **** + * for 'wildignore' and don't put matches for 'suffixes' at the end. */ + if (argvars[1].v_type != VAR_UNKNOWN + && get_tv_number_chk(&argvars[1], &error)) +! flags |= WILD_KEEP_ALL; + if (!error) + { + ExpandInit(&xpc); + xpc.xp_context = EXPAND_FILES; +! rettv->vval.v_string = ExpandOne(&xpc, s, NULL, flags, WILD_ALL); + } + else + rettv->vval.v_string = NULL; +--- 9894,9907 ---- + * for 'wildignore' and don't put matches for 'suffixes' at the end. */ + if (argvars[1].v_type != VAR_UNKNOWN + && get_tv_number_chk(&argvars[1], &error)) +! options |= WILD_KEEP_ALL; + if (!error) + { + ExpandInit(&xpc); + xpc.xp_context = EXPAND_FILES; +! if (p_wic) +! options += WILD_ICASE; +! rettv->vval.v_string = ExpandOne(&xpc, s, NULL, options, WILD_ALL); + } + else + rettv->vval.v_string = NULL; +*************** +*** 11672,11678 **** + typval_T *argvars; + typval_T *rettv; + { +! int flags = WILD_SILENT|WILD_USE_NL; + expand_T xpc; + int error = FALSE; + +--- 11674,11680 ---- + typval_T *argvars; + typval_T *rettv; + { +! int options = WILD_SILENT|WILD_USE_NL; + expand_T xpc; + int error = FALSE; + +*************** +*** 11680,11693 **** + * for 'wildignore' and don't put matches for 'suffixes' at the end. */ + if (argvars[1].v_type != VAR_UNKNOWN + && get_tv_number_chk(&argvars[1], &error)) +! flags |= WILD_KEEP_ALL; + rettv->v_type = VAR_STRING; + if (!error) + { + ExpandInit(&xpc); + xpc.xp_context = EXPAND_FILES; + rettv->vval.v_string = ExpandOne(&xpc, get_tv_string(&argvars[0]), +! NULL, flags, WILD_ALL); + } + else + rettv->vval.v_string = NULL; +--- 11682,11697 ---- + * for 'wildignore' and don't put matches for 'suffixes' at the end. */ + if (argvars[1].v_type != VAR_UNKNOWN + && get_tv_number_chk(&argvars[1], &error)) +! options |= WILD_KEEP_ALL; + rettv->v_type = VAR_STRING; + if (!error) + { + ExpandInit(&xpc); + xpc.xp_context = EXPAND_FILES; ++ if (p_wic) ++ options += WILD_ICASE; + rettv->vval.v_string = ExpandOne(&xpc, get_tv_string(&argvars[0]), +! NULL, options, WILD_ALL); + } + else + rettv->vval.v_string = NULL; +*** ../vim-7.3.074/src/version.c 2010-12-02 21:43:10.000000000 +0100 +--- src/version.c 2010-12-02 21:43:59.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 75, + /**/ + +-- +Engineers will go without food and hygiene for days to solve a problem. +(Other times just because they forgot.) + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From aa679fed1c96b3189e4e0ebe6494828b08fa4c66 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Fri, 3 Dec 2010 00:10:19 +0100 Subject: [PATCH 0084/3803] - patchlevel 75 --- README.patches | 2 ++ vim.spec | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index 589e2233..f1f54640 100644 --- a/README.patches +++ b/README.patches @@ -99,3 +99,5 @@ Individual patches for Vim 7.3: 2095 7.3.071 cursor binding not reset when editing another file 9432 7.3.072 can't complete file names while ignoring case 2466 7.3.073 double free memory when netbeans command follows DETACH + 7659 7.3.074 can't use the "+ register like "* for yank and put + 3872 7.3.075 (after 7.3.072) also use 'wildignorecase' in expand() diff --git a/vim.spec b/vim.spec index dc5088be..27152620 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 073 +%define patchlevel 075 Summary: The VIM editor URL: http://www.vim.org/ @@ -137,6 +137,8 @@ Patch070: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.070 Patch071: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.071 Patch072: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.072 Patch073: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.073 +Patch074: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.074 +Patch075: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.075 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -354,6 +356,8 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch071 -p0 %patch072 -p0 %patch073 -p0 +%patch074 -p0 +%patch075 -p0 # install spell files @@ -821,6 +825,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Fri Dec 03 2010 Karsten Hopp 7.3.075-1 +- patchlevel 075 + * Thu Dec 02 2010 Karsten Hopp 7.3.073-1 - patchlevel 073 From 90a73e999687e2cd67e9d26ee75b2a9111498ca8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 8 Dec 2010 18:10:19 +0100 Subject: [PATCH 0085/3803] - patchlevel 076 --- 7.3.076 | 203 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 7.3.076 diff --git a/7.3.076 b/7.3.076 new file mode 100644 index 00000000..9ec7db42 --- /dev/null +++ b/7.3.076 @@ -0,0 +1,203 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.076 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.076 +Problem: Clang warnings for dead code. +Solution: Remove it. (Carlo Teubner) +Files: src/gui_gtk.c, src/if_ruby.c, src/misc2.c, src/netbeans.c, + src/spell.c + + +*** ../vim-7.3.075/src/gui_gtk.c 2010-11-24 18:48:08.000000000 +0100 +--- src/gui_gtk.c 2010-12-08 12:25:17.000000000 +0100 +*************** +*** 1798,1804 **** + char_u *repl_text; + gboolean direction_down; + SharedFindReplace *sfr; +- int rc; + + flags = (int)(long)data; /* avoid a lint warning here */ + +--- 1798,1803 ---- +*************** +*** 1824,1830 **** + + repl_text = CONVERT_FROM_UTF8(repl_text); + find_text = CONVERT_FROM_UTF8(find_text); +! rc = gui_do_findrepl(flags, find_text, repl_text, direction_down); + CONVERT_FROM_UTF8_FREE(repl_text); + CONVERT_FROM_UTF8_FREE(find_text); + } +--- 1823,1829 ---- + + repl_text = CONVERT_FROM_UTF8(repl_text); + find_text = CONVERT_FROM_UTF8(find_text); +! gui_do_findrepl(flags, find_text, repl_text, direction_down); + CONVERT_FROM_UTF8_FREE(repl_text); + CONVERT_FROM_UTF8_FREE(find_text); + } +*** ../vim-7.3.075/src/if_ruby.c 2010-11-24 17:03:34.000000000 +0100 +--- src/if_ruby.c 2010-12-08 12:30:38.000000000 +0100 +*************** +*** 586,594 **** + if (u_save(eap->line1 - 1, eap->line2 + 1) != OK) + return; + for (i = eap->line1; i <= eap->line2; i++) { +! VALUE line, oldline; + +! line = oldline = vim_str2rb_enc_str((char *)ml_get(i)); + rb_lastline_set(line); + eval_enc_string_protect((char *) eap->arg, &state); + if (state) { +--- 586,594 ---- + if (u_save(eap->line1 - 1, eap->line2 + 1) != OK) + return; + for (i = eap->line1; i <= eap->line2; i++) { +! VALUE line; + +! line = vim_str2rb_enc_str((char *)ml_get(i)); + rb_lastline_set(line); + eval_enc_string_protect((char *) eap->arg, &state); + if (state) { +*** ../vim-7.3.075/src/misc2.c 2010-08-15 21:57:32.000000000 +0200 +--- src/misc2.c 2010-12-08 12:42:44.000000000 +0100 +*************** +*** 200,206 **** + } + #endif + +- idx = -1; + ptr = line; + while (col <= wcol && *ptr != NUL) + { +--- 200,205 ---- +*************** +*** 1223,1229 **** + #endif + + /* +! * copy a string into newly allocated memory + */ + char_u * + vim_strsave(string) +--- 1222,1228 ---- + #endif + + /* +! * Copy "string" into newly allocated memory. + */ + char_u * + vim_strsave(string) +*************** +*** 1239,1244 **** +--- 1238,1249 ---- + return p; + } + ++ /* ++ * Copy up to "len" bytes of "string" into newly allocated memory and ++ * terminate with a NUL. ++ * The allocated memory always has size "len + 1", also when "string" is ++ * shorter. ++ */ + char_u * + vim_strnsave(string, len) + char_u *string; +*** ../vim-7.3.075/src/netbeans.c 2010-12-02 17:09:48.000000000 +0100 +--- src/netbeans.c 2010-12-08 12:43:57.000000000 +0100 +*************** +*** 960,966 **** + keyQ_T *key_node = keyHead.next; + queue_T *cmd_node = head.next; + nbbuf_T buf; +- buf_T *bufp; + int i; + + /* free the netbeans buffer list */ +--- 960,965 ---- +*************** +*** 969,975 **** + buf = buf_list[i]; + vim_free(buf.displayname); + vim_free(buf.signmap); +! if ((bufp=buf.bufp) != NULL) + { + buf.bufp->b_netbeans_file = FALSE; + buf.bufp->b_was_netbeans_file = FALSE; +--- 968,974 ---- + buf = buf_list[i]; + vim_free(buf.displayname); + vim_free(buf.signmap); +! if (buf.bufp != NULL) + { + buf.bufp->b_netbeans_file = FALSE; + buf.bufp->b_was_netbeans_file = FALSE; +*** ../vim-7.3.075/src/spell.c 2010-09-29 18:32:47.000000000 +0200 +--- src/spell.c 2010-12-08 12:47:13.000000000 +0100 +*************** +*** 9839,9848 **** + { + /* be quick for ASCII */ + if (wp->w_s->b_spell_ismw[*p]) +- { + s = p + 1; /* skip a mid-word character */ +- l = MB_BYTE2LEN(*s); +- } + } + else + { +--- 9839,9845 ---- +*************** +*** 9850,9859 **** + if (c < 256 ? wp->w_s->b_spell_ismw[c] + : (wp->w_s->b_spell_ismw_mb != NULL + && vim_strchr(wp->w_s->b_spell_ismw_mb, c) != NULL)) +- { + s = p + l; +- l = MB_BYTE2LEN(*s); +- } + } + + c = mb_ptr2char(s); +--- 9847,9853 ---- +*************** +*** 13813,13823 **** + su->su_sfmaxscore = cleanup_suggestions(gap, + su->su_sfmaxscore, SUG_CLEAN_COUNT(su)); + else +- { +- i = su->su_maxscore; + su->su_maxscore = cleanup_suggestions(gap, + su->su_maxscore, SUG_CLEAN_COUNT(su)); +- } + } + } + } +--- 13807,13814 ---- +*** ../vim-7.3.075/src/version.c 2010-12-02 21:44:35.000000000 +0100 +--- src/version.c 2010-12-08 13:10:00.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 76, + /**/ + +-- +Never enter the boss's office unless it's absolutely necessary. Every boss +saves one corner of the desk for useless assignments that are doled out like +Halloween candy to each visitor. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ce63867025da7cb4da2c5dcde4023c98833d8536 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 8 Dec 2010 18:10:20 +0100 Subject: [PATCH 0086/3803] - patchlevel 077 --- 7.3.077 | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 7.3.077 diff --git a/7.3.077 b/7.3.077 new file mode 100644 index 00000000..c0af4b96 --- /dev/null +++ b/7.3.077 @@ -0,0 +1,134 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.077 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.077 +Problem: When updating crypt of swapfile fails there is no error message. + (Carlo Teubner) +Solution: Add the error message. +Files: src/memline.c + + +*** ../vim-7.3.076/src/memline.c 2010-08-15 21:57:31.000000000 +0200 +--- src/memline.c 2010-12-08 12:39:10.000000000 +0100 +*************** +*** 582,587 **** +--- 582,590 ---- + idx = ip->ip_index + 1; /* go to next index */ + page_count = 1; + } ++ ++ if (error > 0) ++ EMSG(_("E843: Error while updating swap file crypt")); + } + + mfp->mf_old_key = NULL; +*************** +*** 2384,2390 **** + * Make a copy of the line if necessary. + */ + /* +! * get a pointer to a (read-only copy of a) line + * + * On failure an error message is given and IObuff is returned (to avoid + * having to check for error everywhere). +--- 2387,2393 ---- + * Make a copy of the line if necessary. + */ + /* +! * Return a pointer to a (read-only copy of a) line. + * + * On failure an error message is given and IObuff is returned (to avoid + * having to check for error everywhere). +*************** +*** 2397,2403 **** + } + + /* +! * ml_get_pos: get pointer to position 'pos' + */ + char_u * + ml_get_pos(pos) +--- 2400,2406 ---- + } + + /* +! * Return pointer to position "pos". + */ + char_u * + ml_get_pos(pos) +*************** +*** 2407,2413 **** + } + + /* +! * ml_get_curline: get pointer to cursor line. + */ + char_u * + ml_get_curline() +--- 2410,2416 ---- + } + + /* +! * Return pointer to cursor line. + */ + char_u * + ml_get_curline() +*************** +*** 2416,2422 **** + } + + /* +! * ml_get_cursor: get pointer to cursor position + */ + char_u * + ml_get_cursor() +--- 2419,2425 ---- + } + + /* +! * Return pointer to cursor position. + */ + char_u * + ml_get_cursor() +*************** +*** 2426,2432 **** + } + + /* +! * get a pointer to a line in a specific buffer + * + * "will_change": if TRUE mark the buffer dirty (chars in the line will be + * changed) +--- 2429,2435 ---- + } + + /* +! * Return a pointer to a line in a specific buffer + * + * "will_change": if TRUE mark the buffer dirty (chars in the line will be + * changed) +*** ../vim-7.3.076/src/version.c 2010-12-08 13:11:15.000000000 +0100 +--- src/version.c 2010-12-08 13:15:44.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 77, + /**/ + +-- +An operatingsystem is just a name you give to the rest of bloating +idiosyncratic machine-based-features you left out of your editor. + (author unknown) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ca15bd681278ab18ad26b21f149b51c66153833c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 8 Dec 2010 18:10:20 +0100 Subject: [PATCH 0087/3803] - patchlevel 078 --- 7.3.078 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.078 diff --git a/7.3.078 b/7.3.078 new file mode 100644 index 00000000..ae8a9dad --- /dev/null +++ b/7.3.078 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.078 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.078 +Problem: Warning for unused variable. +Solution: Adjuste #ifdefs. +Files: src/ops.c + + +*** ../vim-7.3.077/src/ops.c 2010-12-02 21:43:10.000000000 +0100 +--- src/ops.c 2010-12-08 14:21:48.000000000 +0100 +*************** +*** 2844,2850 **** +--- 2844,2852 ---- + char_u *p; + char_u *pnew; + struct block_def bd; ++ #if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) + int did_star = FALSE; ++ #endif + + /* check for read-only register */ + if (oap->regname != 0 && !valid_yank_reg(oap->regname, TRUE)) +*************** +*** 3127,3133 **** +--- 3129,3137 ---- + + clip_own_selection(&clip_star); + clip_gen_set_selection(&clip_star); ++ # ifdef FEAT_X11 + did_star = TRUE; ++ # endif + } + + # ifdef FEAT_X11 +*** ../vim-7.3.077/src/version.c 2010-12-08 13:16:58.000000000 +0100 +--- src/version.c 2010-12-08 14:22:42.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 78, + /**/ + +-- +A)bort, R)etry, D)o it right this time + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 83132bdb4a1d11e9cf537aac44861a9e3c3879e0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 8 Dec 2010 18:10:21 +0100 Subject: [PATCH 0088/3803] - patchlevel 079 --- 7.3.079 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 7.3.079 diff --git a/7.3.079 b/7.3.079 new file mode 100644 index 00000000..493d52f3 --- /dev/null +++ b/7.3.079 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.079 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.079 +Problem: Duplicate lines in makefile. +Solution: Remove the lines. (Hong Xu) +Files: src/Make_mvc.mak + + +*** ../vim-7.3.078/src/Make_mvc.mak 2010-11-03 21:59:23.000000000 +0100 +--- src/Make_mvc.mak 2010-12-08 14:53:16.000000000 +0100 +*************** +*** 380,388 **** + !if "$(_NMAKE_VER)" == "10.00.30319.01" + MSVCVER = 10.0 + !endif +- !if "$(_NMAKE_VER)" == "9.00.30729.01" +- MSVCVER = 9.0 +- !endif + !endif + + # Abort bulding VIM if version of VC is unrecognised. +--- 380,385 ---- +*** ../vim-7.3.078/src/version.c 2010-12-08 14:23:08.000000000 +0100 +--- src/version.c 2010-12-08 14:54:02.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 79, + /**/ + +-- +login: yes +password: I don't know, please tell me +password is incorrect +login: yes +password: incorrect + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 831749a4bb96f1729a110630a9478eee99e0a362 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 8 Dec 2010 18:10:21 +0100 Subject: [PATCH 0089/3803] - patchlevel 080 --- 7.3.080 | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 7.3.080 diff --git a/7.3.080 b/7.3.080 new file mode 100644 index 00000000..6cf9f6d7 --- /dev/null +++ b/7.3.080 @@ -0,0 +1,205 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.080 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.080 +Problem: Spell doesn't work on VMS. +Solution: Use different file names. (Zoltan Bartos, Zoltan Arpadffy) +Files: src/spell.c + + +*** ../vim-7.3.079/src/spell.c 2010-12-08 13:11:15.000000000 +0100 +--- src/spell.c 2010-12-08 17:01:13.000000000 +0100 +*************** +*** 327,332 **** +--- 327,342 ---- + typedef long idx_T; + #endif + ++ #ifdef VMS ++ # define SPL_FNAME_TMPL "%s_%s.spl" ++ # define SPL_FNAME_ADD "_add." ++ # define SPL_FNAME_ASCII "_ascii." ++ #else ++ # define SPL_FNAME_TMPL "%s.%s.spl" ++ # define SPL_FNAME_ADD ".add." ++ # define SPL_FNAME_ASCII ".ascii." ++ #endif ++ + /* Flags used for a word. Only the lowest byte can be used, the region byte + * comes above it. */ + #define WF_REGION 0x01 /* region byte follows */ +*************** +*** 2471,2484 **** + * Find the first spell file for "lang" in 'runtimepath' and load it. + */ + vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5, +! "spell/%s.%s.spl", lang, spell_enc()); + r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl); + + if (r == FAIL && *sl.sl_lang != NUL) + { + /* Try loading the ASCII version. */ + vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5, +! "spell/%s.ascii.spl", lang); + r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl); + + #ifdef FEAT_AUTOCMD +--- 2481,2504 ---- + * Find the first spell file for "lang" in 'runtimepath' and load it. + */ + vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5, +! #ifdef VMS +! "spell/%s_%s.spl", +! #else +! "spell/%s.%s.spl", +! #endif +! lang, spell_enc()); + r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl); + + if (r == FAIL && *sl.sl_lang != NUL) + { + /* Try loading the ASCII version. */ + vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5, +! #ifdef VMS +! "spell/%s_ascii.spl", +! #else +! "spell/%s.ascii.spl", +! #endif +! lang); + r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl); + + #ifdef FEAT_AUTOCMD +*************** +*** 2496,2502 **** + + if (r == FAIL) + { +! smsg((char_u *)_("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""), + lang, spell_enc(), lang); + } + else if (sl.sl_slang != NULL) +--- 2516,2527 ---- + + if (r == FAIL) + { +! smsg((char_u *) +! #ifdef VMS +! _("Warning: Cannot find word list \"%s_%s.spl\" or \"%s_ascii.spl\""), +! #else +! _("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""), +! #endif + lang, spell_enc(), lang); + } + else if (sl.sl_slang != NULL) +*************** +*** 2530,2536 **** + int_wordlist_spl(fname) + char_u *fname; + { +! vim_snprintf((char *)fname, MAXPATHL, "%s.%s.spl", + int_wordlist, spell_enc()); + } + +--- 2555,2561 ---- + int_wordlist_spl(fname) + char_u *fname; + { +! vim_snprintf((char *)fname, MAXPATHL, SPL_FNAME_TMPL, + int_wordlist, spell_enc()); + } + +*************** +*** 2785,2792 **** + if (lp->sl_fname == NULL) + goto endFAIL; + +! /* Check for .add.spl. */ +! lp->sl_add = strstr((char *)gettail(fname), ".add.") != NULL; + } + else + lp = old_lp; +--- 2810,2817 ---- + if (lp->sl_fname == NULL) + goto endFAIL; + +! /* Check for .add.spl (_add.spl for VMS). */ +! lp->sl_add = strstr((char *)gettail(fname), SPL_FNAME_ADD) != NULL; + } + else + lp = old_lp; +*************** +*** 9109,9116 **** + /* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, sizeof(wfname), "%s.%s.spl", fnames[0], +! spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + } + else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0) + { +--- 9134,9141 ---- + /* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL, +! fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + } + else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0) + { +*************** +*** 9119,9133 **** + } + else + /* Name should be language, make the file name from it. */ +! vim_snprintf((char *)wfname, sizeof(wfname), "%s.%s.spl", fnames[0], +! spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + + /* Check for .ascii.spl. */ +! if (strstr((char *)gettail(wfname), ".ascii.") != NULL) + spin.si_ascii = TRUE; + + /* Check for .add.spl. */ +! if (strstr((char *)gettail(wfname), ".add.") != NULL) + spin.si_add = TRUE; + } + +--- 9144,9158 ---- + } + else + /* Name should be language, make the file name from it. */ +! vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL, +! fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + + /* Check for .ascii.spl. */ +! if (strstr((char *)gettail(wfname), SPL_FNAME_ASCII) != NULL) + spin.si_ascii = TRUE; + + /* Check for .add.spl. */ +! if (strstr((char *)gettail(wfname), SPL_FNAME_ADD) != NULL) + spin.si_add = TRUE; + } + +*** ../vim-7.3.079/src/version.c 2010-12-08 14:54:58.000000000 +0100 +--- src/version.c 2010-12-08 16:58:03.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 80, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +5. You find yourself brainstorming for new subjects to search. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f8a2dc968430a6d27f110b75fd3800c3716c8088 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 8 Dec 2010 18:10:21 +0100 Subject: [PATCH 0090/3803] - patchlevel 80 --- README.patches | 5 +++++ vim.spec | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index f1f54640..48d27ad2 100644 --- a/README.patches +++ b/README.patches @@ -101,3 +101,8 @@ Individual patches for Vim 7.3: 2466 7.3.073 double free memory when netbeans command follows DETACH 7659 7.3.074 can't use the "+ register like "* for yank and put 3872 7.3.075 (after 7.3.072) also use 'wildignorecase' in expand() + 5538 7.3.076 Clang warnings for dead code + 3099 7.3.077 when updating swapfile crypt fails there is no error message + 1565 7.3.078 warning for unused variable + 1377 7.3.079 duplicate lines in MSVC makefile + 6011 7.3.080 spelling doesn't work on VMS diff --git a/vim.spec b/vim.spec index 27152620..e88b6f69 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 075 +%define patchlevel 080 Summary: The VIM editor URL: http://www.vim.org/ @@ -139,6 +139,11 @@ Patch072: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.072 Patch073: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.073 Patch074: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.074 Patch075: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.075 +Patch076: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.076 +Patch077: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.077 +Patch078: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.078 +Patch079: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.079 +Patch080: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.080 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -358,6 +363,11 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch073 -p0 %patch074 -p0 %patch075 -p0 +%patch076 -p0 +%patch077 -p0 +%patch078 -p0 +%patch079 -p0 +%patch080 -p0 # install spell files @@ -825,6 +835,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Wed Dec 08 2010 Karsten Hopp 7.3.080-1 +- patchlevel 080 + * Fri Dec 03 2010 Karsten Hopp 7.3.075-1 - patchlevel 075 From 782b58473d65f99bae3b876a3a639827c6592d3d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 9 Dec 2010 00:10:12 +0100 Subject: [PATCH 0091/3803] - patchlevel 081 --- 7.3.081 | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 7.3.081 diff --git a/7.3.081 b/7.3.081 new file mode 100644 index 00000000..635b9b50 --- /dev/null +++ b/7.3.081 @@ -0,0 +1,84 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.081 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.081 +Problem: Non-printable characters in 'statusline' cause trouble. (ZyX) +Solution: Use transstr(). (partly by Caio Ariede) +Files: src/screen.c + + +*** ../vim-7.3.080/src/screen.c 2010-08-15 21:57:32.000000000 +0200 +--- src/screen.c 2010-12-08 19:27:20.000000000 +0100 +*************** +*** 3405,3413 **** + # endif + ) + { +! int_u text_sign; + # ifdef FEAT_SIGN_ICONS +! int_u icon_sign; + # endif + + /* Draw two cells with the sign value or blank. */ +--- 3405,3413 ---- + # endif + ) + { +! int text_sign; + # ifdef FEAT_SIGN_ICONS +! int icon_sign; + # endif + + /* Draw two cells with the sign value or blank. */ +*************** +*** 6522,6529 **** + stl, use_sandbox, + fillchar, maxwidth, hltab, tabtab); + vim_free(stl); +- len = (int)STRLEN(buf); + + while (width < maxwidth && len < (int)sizeof(buf) - 1) + { + #ifdef FEAT_MBYTE +--- 6522,6538 ---- + stl, use_sandbox, + fillchar, maxwidth, hltab, tabtab); + vim_free(stl); + ++ /* Make all characters printable. */ ++ p = transstr(buf); ++ if (p != NULL) ++ { ++ vim_strncpy(buf, p, sizeof(buf) - 1); ++ vim_free(p); ++ } ++ ++ /* fill up with "fillchar" */ ++ len = (int)STRLEN(buf); + while (width < maxwidth && len < (int)sizeof(buf) - 1) + { + #ifdef FEAT_MBYTE +*** ../vim-7.3.080/src/version.c 2010-12-08 17:09:27.000000000 +0100 +--- src/version.c 2010-12-08 19:31:40.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 81, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +6. You refuse to go to a vacation spot with no electricity and no phone lines. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e96537f314abced9ec8e503933647ab8699cb53d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 9 Dec 2010 00:10:13 +0100 Subject: [PATCH 0092/3803] - patchlevel 81 --- README.patches | 1 + vim.spec | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index 48d27ad2..faf57f48 100644 --- a/README.patches +++ b/README.patches @@ -106,3 +106,4 @@ Individual patches for Vim 7.3: 1565 7.3.078 warning for unused variable 1377 7.3.079 duplicate lines in MSVC makefile 6011 7.3.080 spelling doesn't work on VMS + 2257 7.3.081 non-printable characters in 'statusline' cause trouble diff --git a/vim.spec b/vim.spec index e88b6f69..2b48cc43 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 080 +%define patchlevel 081 Summary: The VIM editor URL: http://www.vim.org/ @@ -144,6 +144,7 @@ Patch077: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.077 Patch078: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.078 Patch079: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.079 Patch080: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.080 +Patch081: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.081 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -368,6 +369,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch078 -p0 %patch079 -p0 %patch080 -p0 +%patch081 -p0 # install spell files @@ -835,6 +837,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Thu Dec 09 2010 Karsten Hopp 7.3.081-1 +- patchlevel 081 + * Wed Dec 08 2010 Karsten Hopp 7.3.080-1 - patchlevel 080 From 07ad2d20dad2b1d727f3e4307ad3ebd8025e81cf Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 3 Jan 2011 17:46:34 +0100 Subject: [PATCH 0093/3803] - patchlevel 082 --- 7.3.082 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 7.3.082 diff --git a/7.3.082 b/7.3.082 new file mode 100644 index 00000000..5753c05e --- /dev/null +++ b/7.3.082 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.082 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.082 +Problem: Leaking file descriptor when hostname doesn't exist. +Solution: Remove old debugging lines. +Files: src/netbeans.c + + +*** ../vim-7.3.081/src/netbeans.c 2010-12-08 13:11:15.000000000 +0100 +--- src/netbeans.c 2010-12-17 12:13:32.000000000 +0100 +*************** +*** 323,334 **** + 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; +- } + nbdebug(("error in gethostbyname() in netbeans_connect()\n")); + PERROR("gethostbyname() in netbeans_connect()"); + goto theend; +--- 323,328 ---- +*** ../vim-7.3.081/src/version.c 2010-12-08 19:56:52.000000000 +0100 +--- src/version.c 2010-12-17 12:17:11.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 82, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +1. At lunch time, sit in your parked car with sunglasses on and point + a hair dryer at passing cars. See if they slow down. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 78ae54e492e295ffcabe937508b02cfee67762fa Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 3 Jan 2011 17:46:34 +0100 Subject: [PATCH 0094/3803] - patchlevel 083 --- 7.3.083 | 362 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 362 insertions(+) create mode 100644 7.3.083 diff --git a/7.3.083 b/7.3.083 new file mode 100644 index 00000000..f337d210 --- /dev/null +++ b/7.3.083 @@ -0,0 +1,362 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.083 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.083 +Problem: When a read() or write() is interrupted by a signal it fails. +Solution: Add read_eintr() and write_eintr(). +Files: src/fileio.c, src/proto/fileio.pro, src/memfile.c, src/memline.c, + src/os_unix.c, src/undo.c, src/vim.h + + +*** ../vim-7.3.082/src/fileio.c 2010-08-15 21:57:26.000000000 +0200 +--- src/fileio.c 2010-12-17 16:04:30.000000000 +0100 +*************** +*** 918,924 **** + { + /* Read the first line (and a bit more). Immediately rewind to + * the start of the file. If the read() fails "len" is -1. */ +! len = vim_read(fd, firstline, 80); + lseek(fd, (off_t)0L, SEEK_SET); + for (p = firstline; p < firstline + len; ++p) + if (*p >= 0x80) +--- 918,924 ---- + { + /* Read the first line (and a bit more). Immediately rewind to + * the start of the file. If the read() fails "len" is -1. */ +! len = read_eintr(fd, firstline, 80); + lseek(fd, (off_t)0L, SEEK_SET); + for (p = firstline; p < firstline + len; ++p) + if (*p >= 0x80) +*************** +*** 1373,1379 **** + /* + * Read bytes from the file. + */ +! size = vim_read(fd, ptr, size); + } + + if (size <= 0) +--- 1373,1379 ---- + /* + * Read bytes from the file. + */ +! size = read_eintr(fd, ptr, size); + } + + if (size <= 0) +*************** +*** 4000,4006 **** + #ifdef HAS_BW_FLAGS + write_info.bw_flags = FIO_NOCONVERT; + #endif +! while ((write_info.bw_len = vim_read(fd, copybuf, + BUFSIZE)) > 0) + { + if (buf_write_bytes(&write_info) == FAIL) +--- 4000,4006 ---- + #ifdef HAS_BW_FLAGS + write_info.bw_flags = FIO_NOCONVERT; + #endif +! while ((write_info.bw_len = read_eintr(fd, copybuf, + BUFSIZE)) > 0) + { + if (buf_write_bytes(&write_info) == FAIL) +*************** +*** 4813,4819 **** + #ifdef HAS_BW_FLAGS + write_info.bw_flags = FIO_NOCONVERT; + #endif +! while ((write_info.bw_len = vim_read(fd, smallbuf, + SMBUFSIZE)) > 0) + if (buf_write_bytes(&write_info) == FAIL) + break; +--- 4813,4819 ---- + #ifdef HAS_BW_FLAGS + write_info.bw_flags = FIO_NOCONVERT; + #endif +! while ((write_info.bw_len = read_eintr(fd, smallbuf, + SMBUFSIZE)) > 0) + if (buf_write_bytes(&write_info) == FAIL) + break; +*************** +*** 5330,5336 **** + + /* + * Call write() to write a number of bytes to the file. +! * Also handles encryption and 'encoding' conversion. + * + * Return FAIL for failure, OK otherwise. + */ +--- 5330,5336 ---- + + /* + * Call write() to write a number of bytes to the file. +! * Handles encryption and 'encoding' conversion. + * + * Return FAIL for failure, OK otherwise. + */ +*************** +*** 5702,5717 **** + crypt_encode(buf, len, buf); + #endif + +! /* Repeat the write(), it may be interrupted by a signal. */ +! while (len > 0) +! { +! wlen = vim_write(ip->bw_fd, buf, len); +! if (wlen <= 0) /* error! */ +! return FAIL; +! len -= wlen; +! buf += wlen; +! } +! return OK; + } + + #ifdef FEAT_MBYTE +--- 5702,5709 ---- + crypt_encode(buf, len, buf); + #endif + +! wlen = write_eintr(ip->bw_fd, buf, len); +! return (wlen < len) ? FAIL : OK; + } + + #ifdef FEAT_MBYTE +*************** +*** 6662,6669 **** + return -1; + } + +! while ((n = vim_read(fd_in, buffer, BUFSIZE)) > 0) +! if (vim_write(fd_out, buffer, n) != n) + { + errmsg = _("E208: Error writing to \"%s\""); + break; +--- 6654,6661 ---- + return -1; + } + +! while ((n = read_eintr(fd_in, buffer, BUFSIZE)) > 0) +! if (write_eintr(fd_out, buffer, n) != n) + { + errmsg = _("E208: Error writing to \"%s\""); + break; +*************** +*** 10304,10306 **** +--- 10296,10350 ---- + } + return reg_pat; + } ++ ++ #if defined(EINTR) || defined(PROTO) ++ /* ++ * Version of read() that retries when interrupted by EINTR (possibly ++ * by a SIGWINCH). ++ */ ++ long ++ read_eintr(fd, buf, bufsize) ++ int fd; ++ void *buf; ++ size_t bufsize; ++ { ++ long ret; ++ ++ for (;;) ++ { ++ ret = vim_read(fd, buf, bufsize); ++ if (ret >= 0 || errno != EINTR) ++ break; ++ } ++ return ret; ++ } ++ ++ /* ++ * Version of write() that retries when interrupted by EINTR (possibly ++ * by a SIGWINCH). ++ */ ++ long ++ write_eintr(fd, buf, bufsize) ++ int fd; ++ void *buf; ++ size_t bufsize; ++ { ++ long ret = 0; ++ long wlen; ++ ++ /* Repeat the write() so long it didn't fail, other than being interrupted ++ * by a signal. */ ++ while (ret < (long)bufsize) ++ { ++ wlen = vim_write(fd, buf + ret, bufsize - ret); ++ if (wlen < 0) ++ { ++ if (errno != EINTR) ++ break; ++ } ++ else ++ ret += wlen; ++ } ++ return ret; ++ } ++ #endif +*** ../vim-7.3.082/src/proto/fileio.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/fileio.pro 2010-12-17 15:01:26.000000000 +0100 +*************** +*** 54,57 **** +--- 54,59 ---- + int match_file_pat __ARGS((char_u *pattern, regprog_T *prog, char_u *fname, char_u *sfname, char_u *tail, int allow_dirs)); + int match_file_list __ARGS((char_u *list, char_u *sfname, char_u *ffname)); + char_u *file_pat_to_reg_pat __ARGS((char_u *pat, char_u *pat_end, char *allow_dirs, int no_bslash)); ++ long read_eintr __ARGS((int fd, void *buf, size_t bufsize)); ++ long write_eintr __ARGS((int fd, void *buf, size_t bufsize)); + /* vim: set ft=c : */ +*** ../vim-7.3.082/src/memfile.c 2010-08-15 21:57:25.000000000 +0200 +--- src/memfile.c 2010-12-17 16:02:54.000000000 +0100 +*************** +*** 1049,1055 **** + PERROR(_("E294: Seek error in swap file read")); + return FAIL; + } +! if ((unsigned)vim_read(mfp->mf_fd, hp->bh_data, size) != size) + { + PERROR(_("E295: Read error in swap file")); + return FAIL; +--- 1049,1055 ---- + PERROR(_("E294: Seek error in swap file read")); + return FAIL; + } +! if ((unsigned)read_eintr(mfp->mf_fd, hp->bh_data, size) != size) + { + PERROR(_("E295: Read error in swap file")); + return FAIL; +*************** +*** 1168,1174 **** + } + #endif + +! if ((unsigned)vim_write(mfp->mf_fd, data, size) != size) + result = FAIL; + + #ifdef FEAT_CRYPT +--- 1168,1174 ---- + } + #endif + +! if ((unsigned)write_eintr(mfp->mf_fd, data, size) != size) + result = FAIL; + + #ifdef FEAT_CRYPT +*** ../vim-7.3.082/src/memline.c 2010-12-08 13:16:58.000000000 +0100 +--- src/memline.c 2010-12-17 15:46:49.000000000 +0100 +*************** +*** 2062,2068 **** + fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0); + if (fd >= 0) + { +! if (read(fd, (char *)&b0, sizeof(b0)) == sizeof(b0)) + { + if (STRNCMP(b0.b0_version, "VIM 3.0", 7) == 0) + { +--- 2062,2068 ---- + fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0); + if (fd >= 0) + { +! if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0)) + { + if (STRNCMP(b0.b0_version, "VIM 3.0", 7) == 0) + { +*************** +*** 4392,4398 **** + fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0); + if (fd >= 0) + { +! if (read(fd, (char *)&b0, sizeof(b0)) == sizeof(b0)) + { + /* + * If the swapfile has the same directory as the +--- 4392,4398 ---- + fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0); + if (fd >= 0) + { +! if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0)) + { + /* + * If the swapfile has the same directory as the +*** ../vim-7.3.082/src/os_unix.c 2010-10-20 19:17:43.000000000 +0200 +--- src/os_unix.c 2010-12-17 16:17:43.000000000 +0100 +*************** +*** 4454,4460 **** + ++noread_cnt; + while (RealWaitForChar(fromshell_fd, 10L, NULL)) + { +! len = read(fromshell_fd, (char *)buffer + # ifdef FEAT_MBYTE + + buffer_off, (size_t)(BUFLEN - buffer_off) + # else +--- 4454,4460 ---- + ++noread_cnt; + while (RealWaitForChar(fromshell_fd, 10L, NULL)) + { +! len = read_eintr(fromshell_fd, buffer + # ifdef FEAT_MBYTE + + buffer_off, (size_t)(BUFLEN - buffer_off) + # else +*** ../vim-7.3.082/src/undo.c 2010-11-03 19:32:36.000000000 +0100 +--- src/undo.c 2010-12-17 15:39:24.000000000 +0100 +*************** +*** 1386,1392 **** + char_u mbuf[UF_START_MAGIC_LEN]; + int len; + +! len = vim_read(fd, mbuf, UF_START_MAGIC_LEN); + close(fd); + if (len < UF_START_MAGIC_LEN + || memcmp(mbuf, UF_START_MAGIC, UF_START_MAGIC_LEN) != 0) +--- 1386,1392 ---- + char_u mbuf[UF_START_MAGIC_LEN]; + int len; + +! len = read_eintr(fd, mbuf, UF_START_MAGIC_LEN); + close(fd); + if (len < UF_START_MAGIC_LEN + || memcmp(mbuf, UF_START_MAGIC, UF_START_MAGIC_LEN) != 0) +*** ../vim-7.3.082/src/vim.h 2010-12-02 16:01:23.000000000 +0100 +--- src/vim.h 2010-12-17 14:55:04.000000000 +0100 +*************** +*** 1642,1647 **** +--- 1642,1652 ---- + # define USE_INPUT_BUF + #endif + ++ #ifndef EINTR ++ # define read_eintr(fd, buf, count) vim_read((fd), (buf), (count)) ++ # define write_eintr(fd, buf, count) vim_write((fd), (buf), (count)) ++ #endif ++ + #ifdef MSWIN + /* On MS-Windows the third argument isn't size_t. This matters for Win64, + * where sizeof(size_t)==8, not 4 */ +*** ../vim-7.3.082/src/version.c 2010-12-17 12:19:14.000000000 +0100 +--- src/version.c 2010-12-17 16:10:58.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 83, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +9. As often as possible, skip rather than walk. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 60da636f0bd40a9e36699bca9a4a43bd6749f75f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 3 Jan 2011 17:46:35 +0100 Subject: [PATCH 0095/3803] - patchlevel 084 --- 7.3.084 | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 7.3.084 diff --git a/7.3.084 b/7.3.084 new file mode 100644 index 00000000..a46892e3 --- /dev/null +++ b/7.3.084 @@ -0,0 +1,123 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.084 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.084 +Problem: When splitting the window, the new one scrolls with the cursor at + the top. +Solution: Compute w_fraction before setting the new height. +Files: src/window.c + + +*** ../vim-7.3.083/src/window.c 2010-09-21 16:56:29.000000000 +0200 +--- src/window.c 2010-12-17 17:09:51.000000000 +0100 +*************** +*** 70,76 **** + #endif /* FEAT_WINDOWS */ + + static win_T *win_alloc __ARGS((win_T *after, int hidden)); +! static void win_new_height __ARGS((win_T *, int)); + + #define URL_SLASH 1 /* path_is_url() has found "://" */ + #define URL_BACKSLASH 2 /* path_is_url() has found ":\\" */ +--- 70,77 ---- + #endif /* FEAT_WINDOWS */ + + static win_T *win_alloc __ARGS((win_T *after, int hidden)); +! static void set_fraction __ARGS((win_T *wp)); +! static void win_new_height __ARGS((win_T *wp, int height)); + + #define URL_SLASH 1 /* path_is_url() has found "://" */ + #define URL_BACKSLASH 2 /* path_is_url() has found ":\\" */ +*************** +*** 983,992 **** +--- 984,999 ---- + else + frame_append(curfrp, frp); + ++ /* Set w_fraction now so that the cursor keeps the same relative ++ * vertical position. */ ++ set_fraction(oldwin); ++ wp->w_fraction = oldwin->w_fraction; ++ + #ifdef FEAT_VERTSPLIT + if (flags & WSP_VERT) + { + wp->w_p_scr = curwin->w_p_scr; ++ + if (need_status) + { + win_new_height(oldwin, oldwin->w_height - 1); +*************** +*** 5453,5458 **** +--- 5460,5478 ---- + + #endif /* FEAT_WINDOWS */ + ++ #define FRACTION_MULT 16384L ++ ++ /* ++ * Set wp->w_fraction for the current w_wrow and w_height. ++ */ ++ static void ++ set_fraction(wp) ++ win_T *wp; ++ { ++ wp->w_fraction = ((long)wp->w_wrow * FRACTION_MULT ++ + FRACTION_MULT / 2) / (long)wp->w_height; ++ } ++ + /* + * Set the height of a window. + * This takes care of the things inside the window, not what happens to the +*************** +*** 5465,5471 **** + { + linenr_T lnum; + int sline, line_size; +- #define FRACTION_MULT 16384L + + /* Don't want a negative height. Happens when splitting a tiny window. + * Will equalize heights soon to fix it. */ +--- 5485,5490 ---- +*************** +*** 5475,5482 **** + return; /* nothing to do */ + + if (wp->w_wrow != wp->w_prev_fraction_row && wp->w_height > 0) +! wp->w_fraction = ((long)wp->w_wrow * FRACTION_MULT +! + FRACTION_MULT / 2) / (long)wp->w_height; + + wp->w_height = height; + wp->w_skipcol = 0; +--- 5494,5500 ---- + return; /* nothing to do */ + + if (wp->w_wrow != wp->w_prev_fraction_row && wp->w_height > 0) +! set_fraction(wp); + + wp->w_height = height; + wp->w_skipcol = 0; +*** ../vim-7.3.083/src/version.c 2010-12-17 16:27:10.000000000 +0100 +--- src/version.c 2010-12-17 17:14:19.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 84, + /**/ + +-- +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/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 201b6ce9da3ce9a689ce2f748d3902a4471dff96 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 3 Jan 2011 17:46:35 +0100 Subject: [PATCH 0096/3803] - patchlevel 085 --- 7.3.085 | 313 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 313 insertions(+) create mode 100644 7.3.085 diff --git a/7.3.085 b/7.3.085 new file mode 100644 index 00000000..15fb87ff --- /dev/null +++ b/7.3.085 @@ -0,0 +1,313 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.085 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.085 (after 7.3.083) +Problem: Inconsistency with preproc symbols. void * computation. +Solution: Include vimio.h from vim.h. Add type cast. +Files: src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, src/fileio.c, + src/if_cscope.c, src/if_sniff.c, src/main.c, src/memfile.c, + src/memline.c, src/netbeans.c, src/os_msdos.c, src/os_mswin.c, + src/os_win16.c, src/os_win32.c, src/spell.c, src/tag.c, + src/undo.c, src/vim.h + + +*** ../vim-7.3.084/src/eval.c 2010-12-02 21:44:35.000000000 +0100 +--- src/eval.c 2010-12-17 17:45:37.000000000 +0100 +*************** +*** 10,18 **** + /* + * eval.c: Expression evaluation. + */ +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for mch_open(), must be before vim.h */ +- #endif + + #include "vim.h" + +--- 10,15 ---- +*** ../vim-7.3.084/src/ex_cmds.c 2010-11-24 17:59:27.000000000 +0100 +--- src/ex_cmds.c 2010-12-17 17:46:09.000000000 +0100 +*************** +*** 11,20 **** + * ex_cmds.c: some functions for command line commands + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for mch_open(), must be before vim.h */ +- #endif +- + #include "vim.h" + #include "version.h" + +--- 11,16 ---- +*** ../vim-7.3.084/src/ex_cmds2.c 2010-09-21 16:56:29.000000000 +0200 +--- src/ex_cmds2.c 2010-12-17 17:46:26.000000000 +0100 +*************** +*** 11,20 **** + * ex_cmds2.c: some more functions for command line commands + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for mch_open(), must be before vim.h */ +- #endif +- + #include "vim.h" + #include "version.h" + +--- 11,16 ---- +*** ../vim-7.3.084/src/fileio.c 2010-12-17 16:27:09.000000000 +0100 +--- src/fileio.c 2010-12-17 17:52:42.000000000 +0100 +*************** +*** 11,24 **** + * fileio.c: read from and write to a file + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for lseek(), must be before vim.h */ +- #endif +- +- #if defined __EMX__ +- # include "vimio.h" /* for mktemp(), CJW 1997-12-03 */ +- #endif +- + #include "vim.h" + + #if defined(__TANDEM) || defined(__MINT__) +--- 11,16 ---- +*************** +*** 10336,10342 **** + * by a signal. */ + while (ret < (long)bufsize) + { +! wlen = vim_write(fd, buf + ret, bufsize - ret); + if (wlen < 0) + { + if (errno != EINTR) +--- 10328,10334 ---- + * by a signal. */ + while (ret < (long)bufsize) + { +! wlen = vim_write(fd, (char *)buf + ret, bufsize - ret); + if (wlen < 0) + { + if (errno != EINTR) +*** ../vim-7.3.084/src/if_cscope.c 2010-09-21 16:56:29.000000000 +0200 +--- src/if_cscope.c 2010-12-17 17:47:02.000000000 +0100 +*************** +*** 20,28 **** + #include + #if defined(UNIX) + # include +- #else +- /* not UNIX, must be WIN32 */ +- # include "vimio.h" + #endif + #include "if_cscope.h" + +--- 20,25 ---- +*** ../vim-7.3.084/src/if_sniff.c 2010-08-15 21:57:25.000000000 +0200 +--- src/if_sniff.c 2010-12-17 17:47:20.000000000 +0100 +*************** +*** 9,15 **** + + #ifdef WIN32 + # include +- # include "vimio.h" + # include + # include + # include +--- 9,14 ---- +*** ../vim-7.3.084/src/main.c 2010-11-16 16:25:46.000000000 +0100 +--- src/main.c 2010-12-17 17:47:41.000000000 +0100 +*************** +*** 7,16 **** + * See README.txt for an overview of the Vim source code. + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for close() and dup() */ +- #endif +- + #define EXTERN + #include "vim.h" + +--- 7,12 ---- +*** ../vim-7.3.084/src/memfile.c 2010-12-17 16:27:10.000000000 +0100 +--- src/memfile.c 2010-12-17 17:47:54.000000000 +0100 +*************** +*** 32,41 **** + * file is opened. + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for lseek(), must be before vim.h */ +- #endif +- + #include "vim.h" + + /* +--- 32,37 ---- +*** ../vim-7.3.084/src/memline.c 2010-12-17 16:27:10.000000000 +0100 +--- src/memline.c 2010-12-17 17:48:06.000000000 +0100 +*************** +*** 42,51 **** + * mf_get(). + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for mch_open(), must be before vim.h */ +- #endif +- + #include "vim.h" + + #ifndef UNIX /* it's in os_unix.h for Unix */ +--- 42,47 ---- +*** ../vim-7.3.084/src/netbeans.c 2010-12-17 12:19:14.000000000 +0100 +--- src/netbeans.c 2010-12-17 17:48:19.000000000 +0100 +*************** +*** 16,25 **** + * See ":help netbeans-protocol" for explanation. + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for mch_open(), must be before vim.h */ +- #endif +- + #include "vim.h" + + #if defined(FEAT_NETBEANS_INTG) || defined(PROTO) +--- 16,21 ---- +*** ../vim-7.3.084/src/os_msdos.c 2010-08-15 21:57:25.000000000 +0200 +--- src/os_msdos.c 2010-12-17 17:48:40.000000000 +0100 +*************** +*** 21,27 **** + * Some functions are also used for Win16 (MS-Windows 3.1). + */ + +- #include "vimio.h" + #include "vim.h" + + #include +--- 21,26 ---- +*** ../vim-7.3.084/src/os_mswin.c 2010-10-23 14:02:48.000000000 +0200 +--- src/os_mswin.c 2010-12-17 17:48:51.000000000 +0100 +*************** +*** 22,28 **** + # endif + #endif + +- #include "vimio.h" + #include "vim.h" + + #ifdef WIN16 +--- 22,27 ---- +*** ../vim-7.3.084/src/os_win16.c 2010-08-15 21:57:32.000000000 +0200 +--- src/os_win16.c 2010-12-17 17:49:02.000000000 +0100 +*************** +*** 20,26 **** + # pragma warn -obs + #endif + +- #include "vimio.h" + #include "vim.h" + + #include +--- 20,25 ---- +*** ../vim-7.3.084/src/os_win32.c 2010-11-24 12:35:14.000000000 +0100 +--- src/os_win32.c 2010-12-17 17:49:11.000000000 +0100 +*************** +*** 20,26 **** + * Roger Knobbe did the initial port of Vim 3.0. + */ + +- #include "vimio.h" + #include "vim.h" + + #ifdef FEAT_MZSCHEME +--- 20,25 ---- +*** ../vim-7.3.084/src/spell.c 2010-12-08 17:09:27.000000000 +0100 +--- src/spell.c 2010-12-17 17:49:24.000000000 +0100 +*************** +*** 303,312 **** + * few bytes as possible, see offset2bytes()) + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for lseek(), must be before vim.h */ +- #endif +- + #include "vim.h" + + #if defined(FEAT_SPELL) || defined(PROTO) +--- 303,308 ---- +*** ../vim-7.3.084/src/tag.c 2010-09-21 16:56:29.000000000 +0200 +--- src/tag.c 2010-12-17 17:49:35.000000000 +0100 +*************** +*** 11,20 **** + * Code to handle tags and the tag stack + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for lseek(), must be before vim.h */ +- #endif +- + #include "vim.h" + + /* +--- 11,16 ---- +*** ../vim-7.3.084/src/undo.c 2010-12-17 16:27:10.000000000 +0100 +--- src/undo.c 2010-12-17 17:49:59.000000000 +0100 +*************** +*** 81,90 **** + #define UH_MAGIC 0x18dade /* value for uh_magic when in use */ + #define UE_MAGIC 0xabc123 /* value for ue_magic when in use */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for vim_read(), must be before vim.h */ +- #endif +- + #include "vim.h" + + static void u_unch_branch __ARGS((u_header_T *uhp)); +--- 81,86 ---- +*** ../vim-7.3.084/src/vim.h 2010-12-17 16:27:10.000000000 +0100 +--- src/vim.h 2010-12-17 17:51:43.000000000 +0100 +*************** +*** 27,32 **** +--- 27,37 ---- + # endif + #endif + ++ #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) \ ++ || defined(__EMX__) ++ # include "vimio.h" ++ #endif ++ + /* ============ the header file puzzle (ca. 50-100 pieces) ========= */ + + #ifdef HAVE_CONFIG_H /* GNU autoconf (or something else) was here */ +*** ../vim-7.3.084/src/version.c 2010-12-17 17:35:05.000000000 +0100 +--- src/version.c 2010-12-17 17:55:39.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 85, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +14. Put mosquito netting around your work area. Play a tape of jungle + sounds all day. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From bf88f0bf9e2d652f785a6365b8c4580afaf1df29 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 3 Jan 2011 17:46:35 +0100 Subject: [PATCH 0097/3803] - patchlevel 086 --- 7.3.086 | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 7.3.086 diff --git a/7.3.086 b/7.3.086 new file mode 100644 index 00000000..cf494e00 --- /dev/null +++ b/7.3.086 @@ -0,0 +1,138 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.086 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.086 +Problem: When using a mapping with an expression and there was no count, + v:count has the value of the previous command. (ZyX) +Solution: Also set v:count and v:count1 before getting the character that + could be a command or a count. +Files: src/normal.c + + +*** ../vim-7.3.085/src/normal.c 2010-10-13 18:06:42.000000000 +0200 +--- src/normal.c 2010-12-17 18:46:56.000000000 +0100 +*************** +*** 25,30 **** +--- 25,33 ---- + static int restart_VIsual_select = 0; + #endif + ++ #ifdef FEAT_EVAL ++ static void set_vcount_ca __ARGS((cmdarg_T *cap, int *set_prevcount)); ++ #endif + static int + # ifdef __BORLANDC__ + _RTLENTRYF +*************** +*** 648,653 **** +--- 651,664 ---- + dont_scroll = FALSE; /* allow scrolling here */ + #endif + ++ #ifdef FEAT_EVAL ++ /* Set v:count here, when called from main() and not a stuffed ++ * command, so that v:count can be used in an expression mapping ++ * when there is no count. */ ++ if (toplevel && stuff_empty()) ++ set_vcount_ca(&ca, &set_prevcount); ++ #endif ++ + /* + * Get the command character from the user. + */ +*************** +*** 725,739 **** + * command, so that v:count can be used in an expression mapping + * right after the count. */ + if (toplevel && stuff_empty()) +! { +! long count = ca.count0; +! +! /* multiply with ca.opcount the same way as below */ +! if (ca.opcount != 0) +! count = ca.opcount * (count == 0 ? 1 : count); +! set_vcount(count, count == 0 ? 1 : count, set_prevcount); +! set_prevcount = FALSE; /* only set v:prevcount once */ +! } + #endif + if (ctrl_w) + { +--- 736,742 ---- + * command, so that v:count can be used in an expression mapping + * right after the count. */ + if (toplevel && stuff_empty()) +! set_vcount_ca(&ca, &set_prevcount); + #endif + if (ctrl_w) + { +*************** +*** 1386,1391 **** +--- 1389,1414 ---- + opcount = ca.opcount; + } + ++ #ifdef FEAT_EVAL ++ /* ++ * Set v:count and v:count1 according to "cap". ++ * Set v:prevcount only when "set_prevcount" is TRUE. ++ */ ++ static void ++ set_vcount_ca(cap, set_prevcount) ++ cmdarg_T *cap; ++ int *set_prevcount; ++ { ++ long count = cap->count0; ++ ++ /* multiply with cap->opcount the same way as above */ ++ if (cap->opcount != 0) ++ count = cap->opcount * (count == 0 ? 1 : count); ++ set_vcount(count, count == 0 ? 1 : count, *set_prevcount); ++ *set_prevcount = FALSE; /* only set v:prevcount once */ ++ } ++ #endif ++ + /* + * Handle an operator after visual mode or when the movement is finished + */ +*************** +*** 8529,8535 **** + else + curwin->w_curswant = 0; + /* keep curswant at the column where we wanted to go, not where +! we ended; differs if line is too short */ + curwin->w_set_curswant = FALSE; + } + +--- 8552,8558 ---- + else + curwin->w_curswant = 0; + /* keep curswant at the column where we wanted to go, not where +! * we ended; differs if line is too short */ + curwin->w_set_curswant = FALSE; + } + +*** ../vim-7.3.085/src/version.c 2010-12-17 18:06:00.000000000 +0100 +--- src/version.c 2010-12-17 18:51:20.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 86, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +15. Five days in advance, tell your friends you can't attend their + party because you're not in the mood. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 47c3b2a362caaeafb52b462b331b0c4bd69b3d0f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 3 Jan 2011 17:46:36 +0100 Subject: [PATCH 0098/3803] - patchlevel 087 --- 7.3.087 | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 7.3.087 diff --git a/7.3.087 b/7.3.087 new file mode 100644 index 00000000..e0497dbd --- /dev/null +++ b/7.3.087 @@ -0,0 +1,152 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.087 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.087 +Problem: EINTR is not always defined. +Solution: Include errno.h in vim.h. +Files: src/if_cscope.c, src/if_tcl.c, src/integration.c, src/memline.c, + src/os_mswin.c, src/os_win16.c, src/os_win32.c, src/vim.h, + src/workshop.c + + +*** ../vim-7.3.086/src/if_cscope.c 2010-12-17 18:06:00.000000000 +0100 +--- src/if_cscope.c 2010-12-17 20:06:01.000000000 +0100 +*************** +*** 13,20 **** + + #if defined(FEAT_CSCOPE) || defined(PROTO) + +- #include +- #include + #include + #include + #include +--- 13,18 ---- +*** ../vim-7.3.086/src/if_tcl.c 2010-08-15 21:57:27.000000000 +0200 +--- src/if_tcl.c 2010-12-17 20:06:56.000000000 +0100 +*************** +*** 74,80 **** + #endif + + #include +- #include + #include + + typedef struct +--- 74,79 ---- +*** ../vim-7.3.086/src/integration.c 2010-08-15 21:57:29.000000000 +0200 +--- src/integration.c 2010-12-17 20:07:12.000000000 +0100 +*************** +*** 33,39 **** + #include + #endif + +- #include + #include + #include + #include +--- 33,38 ---- +*** ../vim-7.3.086/src/memline.c 2010-12-17 18:06:00.000000000 +0100 +--- src/memline.c 2010-12-17 20:07:31.000000000 +0100 +*************** +*** 52,61 **** + # include /* for Open() and Close() */ + #endif + +- #ifdef HAVE_ERRNO_H +- # include +- #endif +- + typedef struct block0 ZERO_BL; /* contents of the first block */ + typedef struct pointer_block PTR_BL; /* contents of a pointer block */ + typedef struct data_block DATA_BL; /* contents of a data block */ +--- 52,57 ---- +*** ../vim-7.3.086/src/os_mswin.c 2010-12-17 18:06:00.000000000 +0100 +--- src/os_mswin.c 2010-12-17 20:08:14.000000000 +0100 +*************** +*** 30,36 **** + # include + #endif + #include +- #include + #include + #include + #include +--- 30,35 ---- +*** ../vim-7.3.086/src/os_win16.c 2010-12-17 18:06:00.000000000 +0100 +--- src/os_win16.c 2010-12-17 20:08:53.000000000 +0100 +*************** +*** 25,31 **** + #include + #include + #include +- #include + #include + #include + #include +--- 25,30 ---- +*** ../vim-7.3.086/src/os_win32.c 2010-12-17 18:06:00.000000000 +0100 +--- src/os_win32.c 2010-12-17 20:09:18.000000000 +0100 +*************** +*** 27,33 **** + #endif + + #include +- #include + #include + #include + #include +--- 27,32 ---- +*** ../vim-7.3.086/src/vim.h 2010-12-17 18:06:00.000000000 +0100 +--- src/vim.h 2010-12-17 20:09:56.000000000 +0100 +*************** +*** 480,485 **** +--- 480,490 ---- + # include + #endif + ++ #if defined(HAVE_ERRNO_H) || defined(DJGPP) || defined(WIN16) \ ++ || defined(WIN32) || defined(_WIN64) || defined(__EMX__) ++ # include ++ #endif ++ + /* + * Allow other (non-unix) systems to configure themselves now + * These are also in os_unix.h, because osdef.sh needs them there. +*** ../vim-7.3.086/src/workshop.c 2010-08-15 21:57:26.000000000 +0200 +--- src/workshop.c 2010-12-17 20:09:31.000000000 +0100 +*************** +*** 16,22 **** + #include + #include + #include +- #include + #include + #ifdef HAVE_LIBGEN_H + # include +--- 16,21 ---- +*** ../vim-7.3.086/src/version.c 2010-12-17 18:52:56.000000000 +0100 +--- src/version.c 2010-12-17 20:14:49.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 87, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +17. When the money comes out the ATM, scream "I won!, I won! 3rd + time this week!!!!!" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 87658d0dd7ab9f0c6ca7ae6aa32017e29a27fd86 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 3 Jan 2011 17:46:36 +0100 Subject: [PATCH 0099/3803] - patchlevel 088 --- 7.3.088 | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 7.3.088 diff --git a/7.3.088 b/7.3.088 new file mode 100644 index 00000000..98acc7c1 --- /dev/null +++ b/7.3.088 @@ -0,0 +1,152 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.088 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.088 +Problem: Ruby can't load Gems sometimes, may cause a crash. +Solution: Undefine off_t. Use ruby_process_options(). (Yasuhiro Matsumoto) +Files: src/if_ruby.c + + +*** ../vim-7.3.087/src/if_ruby.c 2010-12-08 13:11:15.000000000 +0100 +--- src/if_ruby.c 2010-12-24 12:18:31.000000000 +0100 +*************** +*** 90,95 **** +--- 90,96 ---- + # include + #endif + ++ #undef off_t /* ruby defines off_t as _int64, Mingw uses long */ + #undef EXTERN + #undef _ + +*************** +*** 229,238 **** + # define rb_enc_find_index dll_rb_enc_find_index + # define rb_enc_find dll_rb_enc_find + # define rb_enc_str_new dll_rb_enc_str_new +- # define rb_intern2 dll_rb_intern2 +- # define rb_const_remove dll_rb_const_remove + # define rb_sprintf dll_rb_sprintf + # define ruby_init_stack dll_ruby_init_stack + #endif + + /* +--- 230,239 ---- + # define rb_enc_find_index dll_rb_enc_find_index + # define rb_enc_find dll_rb_enc_find + # define rb_enc_str_new dll_rb_enc_str_new + # define rb_sprintf dll_rb_sprintf ++ # define rb_require dll_rb_require + # define ruby_init_stack dll_ruby_init_stack ++ # define ruby_process_options dll_ruby_process_options + #endif + + /* +*************** +*** 319,329 **** + static int (*dll_rb_enc_find_index) (const char*); + static rb_encoding* (*dll_rb_enc_find) (const char*); + static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*); +- static ID (*dll_rb_intern2) (const char*, long); +- static void (*dll_Init_prelude) (void); +- static VALUE (*dll_rb_const_remove) (VALUE, ID); + static VALUE (*dll_rb_sprintf) (const char*, ...); + static void (*ruby_init_stack)(VALUE*); + #endif + + #ifdef RUBY19_OR_LATER +--- 320,329 ---- + static int (*dll_rb_enc_find_index) (const char*); + static rb_encoding* (*dll_rb_enc_find) (const char*); + static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*); + static VALUE (*dll_rb_sprintf) (const char*, ...); ++ static VALUE (*dll_rb_require) (const char*); + static void (*ruby_init_stack)(VALUE*); ++ static void* (*ruby_process_options)(int, char**); + #endif + + #ifdef RUBY19_OR_LATER +*************** +*** 430,439 **** + {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, + {"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find}, + {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new}, +- {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2}, +- {"rb_const_remove", (RUBY_PROC*)&dll_rb_const_remove}, + {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf}, + {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack}, + #endif + {"", NULL}, + }; +--- 430,439 ---- + {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, + {"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find}, + {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new}, + {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf}, ++ {"rb_require", (RUBY_PROC*)&dll_rb_require}, + {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack}, ++ {"ruby_process_options", (RUBY_PROC*)&dll_ruby_process_options}, + #endif + {"", NULL}, + }; +*************** +*** 663,680 **** + ruby_init(); + } + #ifdef RUBY19_OR_LATER + ruby_script("vim-ruby"); +! #endif + ruby_init_loadpath(); +- ruby_io_init(); +- #ifdef RUBY19_OR_LATER +- rb_enc_find_index("encdb"); +- +- /* This avoids the error "Encoding::ConverterNotFoundError: code +- * converter not found (UTF-16LE to ASCII-8BIT)". */ +- rb_define_module("Gem"); +- rb_const_remove(rb_cObject, rb_intern2("TMP_RUBY_PREFIX", 15)); + #endif + ruby_vim_init(); + ruby_initialized = 1; + #ifdef DYNAMIC_RUBY +--- 663,678 ---- + ruby_init(); + } + #ifdef RUBY19_OR_LATER ++ { ++ int dummy_argc = 2; ++ char *dummy_argv[] = {"vim-ruby", "-e0"}; ++ ruby_process_options(dummy_argc, dummy_argv); ++ } + ruby_script("vim-ruby"); +! #else + ruby_init_loadpath(); + #endif ++ ruby_io_init(); + ruby_vim_init(); + ruby_initialized = 1; + #ifdef DYNAMIC_RUBY +*** ../vim-7.3.087/src/version.c 2010-12-17 20:23:56.000000000 +0100 +--- src/version.c 2010-12-24 13:38:51.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 88, + /**/ + +-- +It is hard to understand how a cemetery raised its burial +cost and blamed it on the cost of living. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 23e727a12d6f161fbdb93dddf57a6fd9df8933cc Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 3 Jan 2011 17:46:37 +0100 Subject: [PATCH 0100/3803] - patchlevel 089 --- 7.3.089 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 7.3.089 diff --git a/7.3.089 b/7.3.089 new file mode 100644 index 00000000..47b894af --- /dev/null +++ b/7.3.089 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.089 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.089 +Problem: Compiler warning on 64 bit MS-Windows. +Solution: Add type cast. (Mike Williams) +Files: src/netbeans.c + + +*** ../vim-7.3.088/src/netbeans.c 2010-12-17 18:06:00.000000000 +0100 +--- src/netbeans.c 2010-12-17 20:21:05.000000000 +0100 +*************** +*** 800,806 **** + * -> gui event loop or select loop + * -> netbeans_read() + */ +! save((char_u *)DETACH_MSG, strlen(DETACH_MSG)); + nb_close_socket(); + + if (len < 0) +--- 800,806 ---- + * -> gui event loop or select loop + * -> netbeans_read() + */ +! save((char_u *)DETACH_MSG, (int)strlen(DETACH_MSG)); + nb_close_socket(); + + if (len < 0) +*** ../vim-7.3.088/src/version.c 2010-12-24 13:39:29.000000000 +0100 +--- src/version.c 2010-12-24 13:59:03.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 89, + /**/ + +-- +The 50-50-90 rule: Anytime you have a 50-50 chance of getting +something right, there's a 90% probability you'll get it wrong. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d98fa588a7aed704a6b61695e99f2e9647a80d2b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 3 Jan 2011 17:46:37 +0100 Subject: [PATCH 0101/3803] - patchlevel 090 --- 7.3.090 | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 7.3.090 diff --git a/7.3.090 b/7.3.090 new file mode 100644 index 00000000..cf68d620 --- /dev/null +++ b/7.3.090 @@ -0,0 +1,68 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.090 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.090 +Problem: Wrong help text for Cscope. +Solution: Adjust the help text for "t". (Dominique Pelle) +Files: src/if_cscope.c + + +*** ../vim-7.3.089/src/if_cscope.c 2010-12-17 20:23:56.000000000 +0100 +--- src/if_cscope.c 2010-12-30 11:35:37.000000000 +0100 +*************** +*** 1346,1352 **** + " g: Find this definition\n" + " i: Find files #including this file\n" + " s: Find this C symbol\n" +! " t: Find assignments to\n")); + + cmdp++; + } +--- 1346,1352 ---- + " g: Find this definition\n" + " i: Find files #including this file\n" + " s: Find this C symbol\n" +! " t: Find this text string\n")); + + cmdp++; + } +*************** +*** 1657,1663 **** + /* + * PRIVATE: cs_make_vim_style_matches + * +! * convert the cscope output into into a ctags style entry (as might be found + * in a ctags tags file). there's one catch though: cscope doesn't tell you + * the type of the tag you are looking for. for example, in Darren Hiebert's + * ctags (the one that comes with vim), #define's use a line number to find the +--- 1657,1663 ---- + /* + * PRIVATE: cs_make_vim_style_matches + * +! * convert the cscope output into a ctags style entry (as might be found + * in a ctags tags file). there's one catch though: cscope doesn't tell you + * the type of the tag you are looking for. for example, in Darren Hiebert's + * ctags (the one that comes with vim), #define's use a line number to find the +*** ../vim-7.3.089/src/version.c 2010-12-24 14:00:09.000000000 +0100 +--- src/version.c 2010-12-30 11:36:33.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 90, + /**/ + +-- +ERROR 047: Keyboard not found. Press RETURN to continue. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a7ea2bd1967289077c24ee458eb9a337edd1c453 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 3 Jan 2011 17:46:38 +0100 Subject: [PATCH 0102/3803] - patchlevel 091 --- 7.3.091 | 321 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 321 insertions(+) create mode 100644 7.3.091 diff --git a/7.3.091 b/7.3.091 new file mode 100644 index 00000000..f0aac0d9 --- /dev/null +++ b/7.3.091 @@ -0,0 +1,321 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.091 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.091 +Problem: "vim -w foo" writes special key codes for removed escape + sequences. (Josh Triplett) +Solution: Don't write K_IGNORE codes. +Files: src/getchar.c, src/misc1.c, src/term.c, src/vim.h + + +*** ../vim-7.3.090/src/getchar.c 2010-10-27 17:39:00.000000000 +0200 +--- src/getchar.c 2010-12-30 12:16:36.000000000 +0100 +*************** +*** 1506,1514 **** + } + } + +- #define KL_PART_KEY -1 /* keylen value for incomplete key-code */ +- #define KL_PART_MAP -2 /* keylen value for incomplete mapping */ +- + /* + * Get the next input character. + * Can return a special key or a multi-byte character. +--- 1506,1511 ---- +*************** +*** 2171,2177 **** + if (!timedout) + { + /* break at a partly match */ +! keylen = KL_PART_MAP; + break; + } + } +--- 2168,2174 ---- + if (!timedout) + { + /* break at a partly match */ +! keylen = KEYLEN_PART_MAP; + break; + } + } +*************** +*** 2192,2198 **** + + /* If no partly match found, use the longest full + * match. */ +! if (keylen != KL_PART_MAP) + { + mp = mp_match; + keylen = mp_match_len; +--- 2189,2195 ---- + + /* If no partly match found, use the longest full + * match. */ +! if (keylen != KEYLEN_PART_MAP) + { + mp = mp_match; + keylen = mp_match_len; +*************** +*** 2230,2236 **** + } + /* Need more chars for partly match. */ + if (mlen == typebuf.tb_len) +! keylen = KL_PART_KEY; + else if (max_mlen < mlen) + /* no match, may have to check for termcode at + * next character */ +--- 2227,2233 ---- + } + /* Need more chars for partly match. */ + if (mlen == typebuf.tb_len) +! keylen = KEYLEN_PART_KEY; + else if (max_mlen < mlen) + /* no match, may have to check for termcode at + * next character */ +*************** +*** 2238,2244 **** + } + + if ((mp == NULL || max_mlen >= mp_match_len) +! && keylen != KL_PART_MAP) + { + int save_keylen = keylen; + +--- 2235,2241 ---- + } + + if ((mp == NULL || max_mlen >= mp_match_len) +! && keylen != KEYLEN_PART_MAP) + { + int save_keylen = keylen; + +*************** +*** 2264,2271 **** + /* If no termcode matched but 'pastetoggle' + * matched partially it's like an incomplete key + * sequence. */ +! if (keylen == 0 && save_keylen == KL_PART_KEY) +! keylen = KL_PART_KEY; + + /* + * When getting a partial match, but the last +--- 2261,2268 ---- + /* If no termcode matched but 'pastetoggle' + * matched partially it's like an incomplete key + * sequence. */ +! if (keylen == 0 && save_keylen == KEYLEN_PART_KEY) +! keylen = KEYLEN_PART_KEY; + + /* + * When getting a partial match, but the last +*************** +*** 2302,2308 **** + continue; + } + if (*s == NUL) /* need more characters */ +! keylen = KL_PART_KEY; + } + if (keylen >= 0) + #endif +--- 2299,2305 ---- + continue; + } + if (*s == NUL) /* need more characters */ +! keylen = KEYLEN_PART_KEY; + } + if (keylen >= 0) + #endif +*************** +*** 2339,2345 **** + if (keylen > 0) /* full matching terminal code */ + { + #if defined(FEAT_GUI) && defined(FEAT_MENU) +! if (typebuf.tb_buf[typebuf.tb_off] == K_SPECIAL + && typebuf.tb_buf[typebuf.tb_off + 1] + == KS_MENU) + { +--- 2336,2343 ---- + if (keylen > 0) /* full matching terminal code */ + { + #if defined(FEAT_GUI) && defined(FEAT_MENU) +! if (typebuf.tb_len >= 2 +! && typebuf.tb_buf[typebuf.tb_off] == K_SPECIAL + && typebuf.tb_buf[typebuf.tb_off + 1] + == KS_MENU) + { +*************** +*** 2381,2387 **** + /* Partial match: get some more characters. When a + * matching mapping was found use that one. */ + if (mp == NULL || keylen < 0) +! keylen = KL_PART_KEY; + else + keylen = mp_match_len; + } +--- 2379,2385 ---- + /* Partial match: get some more characters. When a + * matching mapping was found use that one. */ + if (mp == NULL || keylen < 0) +! keylen = KEYLEN_PART_KEY; + else + keylen = mp_match_len; + } +*************** +*** 2553,2559 **** + #endif + && typebuf.tb_maplen == 0 + && (State & INSERT) +! && (p_timeout || (keylen == KL_PART_KEY && p_ttimeout)) + && (c = inchar(typebuf.tb_buf + typebuf.tb_off + + typebuf.tb_len, 3, 25L, + typebuf.tb_change_cnt)) == 0) +--- 2551,2558 ---- + #endif + && typebuf.tb_maplen == 0 + && (State & INSERT) +! && (p_timeout +! || (keylen == KEYLEN_PART_KEY && p_ttimeout)) + && (c = inchar(typebuf.tb_buf + typebuf.tb_off + + typebuf.tb_len, 3, 25L, + typebuf.tb_change_cnt)) == 0) +*************** +*** 2783,2791 **** + ? 0 + : ((typebuf.tb_len == 0 + || !(p_timeout || (p_ttimeout +! && keylen == KL_PART_KEY))) + ? -1L +! : ((keylen == KL_PART_KEY && p_ttm >= 0) + ? p_ttm + : p_tm)), typebuf.tb_change_cnt); + +--- 2782,2790 ---- + ? 0 + : ((typebuf.tb_len == 0 + || !(p_timeout || (p_ttimeout +! && keylen == KEYLEN_PART_KEY))) + ? -1L +! : ((keylen == KEYLEN_PART_KEY && p_ttm >= 0) + ? p_ttm + : p_tm)), typebuf.tb_change_cnt); + +*** ../vim-7.3.090/src/misc1.c 2010-12-02 16:01:23.000000000 +0100 +--- src/misc1.c 2010-12-30 12:28:59.000000000 +0100 +*************** +*** 3114,3123 **** + && (!p_ttimeout || waited * 100L < (p_ttm < 0 ? p_tm : p_ttm))) + continue; + +! /* found a termcode: adjust length */ +! if (n > 0) + len = n; +! if (len == 0) /* nothing typed yet */ + continue; + + /* Handle modifier and/or special key code. */ +--- 3114,3124 ---- + && (!p_ttimeout || waited * 100L < (p_ttm < 0 ? p_tm : p_ttm))) + continue; + +! if (n == KEYLEN_REMOVED) /* key code removed */ +! continue; +! if (n > 0) /* found a termcode: adjust length */ + len = n; +! if (len == 0) /* nothing typed yet */ + continue; + + /* Handle modifier and/or special key code. */ +*** ../vim-7.3.090/src/term.c 2010-08-15 21:57:32.000000000 +0200 +--- src/term.c 2010-12-30 12:14:48.000000000 +0100 +*************** +*** 3828,3833 **** +--- 3831,3837 ---- + * Check from typebuf.tb_buf[typebuf.tb_off] to typebuf.tb_buf[typebuf.tb_off + * + max_offset]. + * Return 0 for no match, -1 for partial match, > 0 for full match. ++ * Return KEYLEN_REMOVED when a key code was deleted. + * With a match, the match is removed, the replacement code is inserted in + * typebuf.tb_buf[] and the number of characters in typebuf.tb_buf[] is + * returned. +*************** +*** 3845,3850 **** +--- 3849,3855 ---- + int slen = 0; /* init for GCC */ + int modslen; + int len; ++ int retval = 0; + int offset; + char_u key_name[2]; + int modifiers; +*************** +*** 4940,4945 **** +--- 4945,4957 ---- + #endif + string[new_slen++] = key_name[1]; + } ++ else if (new_slen == 0 && key_name[0] == KS_EXTRA ++ && key_name[1] == KE_IGNORE) ++ { ++ /* Do not put K_IGNORE into the buffer, do return KEYLEN_REMOVED ++ * to indicate what happened. */ ++ retval = KEYLEN_REMOVED; ++ } + else + { + string[new_slen++] = K_SPECIAL; +*************** +*** 4976,4982 **** + (size_t)(buflen - offset)); + mch_memmove(buf + offset, string, (size_t)new_slen); + } +! return (len + extra + offset); + } + + return 0; /* no match found */ +--- 4988,4994 ---- + (size_t)(buflen - offset)); + mch_memmove(buf + offset, string, (size_t)new_slen); + } +! return retval == 0 ? (len + extra + offset) : retval; + } + + return 0; /* no match found */ +*** ../vim-7.3.090/src/vim.h 2010-12-17 20:23:56.000000000 +0100 +--- src/vim.h 2010-12-30 12:06:45.000000000 +0100 +*************** +*** 2211,2214 **** +--- 2211,2218 ---- + #define MSCR_LEFT -1 + #define MSCR_RIGHT -2 + ++ #define KEYLEN_PART_KEY -1 /* keylen value for incomplete key-code */ ++ #define KEYLEN_PART_MAP -2 /* keylen value for incomplete mapping */ ++ #define KEYLEN_REMOVED 9999 /* keylen value for removed sequence */ ++ + #endif /* VIM__H */ +*** ../vim-7.3.090/src/version.c 2010-12-30 11:41:05.000000000 +0100 +--- src/version.c 2010-12-30 12:24:56.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 91, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +56. You leave the modem speaker on after connecting because you think it + sounds like the ocean wind...the perfect soundtrack for "surfing the net". + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 1a3e00860827b19c86b7ba7c48dfbc4f409a5014 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 3 Jan 2011 17:46:38 +0100 Subject: [PATCH 0103/3803] - patchlevel 092 --- 7.3.092 | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 7.3.092 diff --git a/7.3.092 b/7.3.092 new file mode 100644 index 00000000..d100b00b --- /dev/null +++ b/7.3.092 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.092 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.092 +Problem: Resizing the window when exiting. +Solution: Don't resize when exiting. +Files: src/term.c + + +*** ../vim-7.3.091/src/term.c 2010-12-30 12:30:26.000000000 +0100 +--- src/term.c 2010-12-30 12:14:48.000000000 +0100 +*************** +*** 3053,3062 **** + int old_Rows = Rows; + int old_Columns = Columns; + +! (void)ui_get_shellsize(); +! check_shellsize(); +! if (old_Rows != Rows || old_Columns != Columns) +! shell_resized(); + } + + /* +--- 3053,3065 ---- + int old_Rows = Rows; + int old_Columns = Columns; + +! if (!exiting) +! { +! (void)ui_get_shellsize(); +! check_shellsize(); +! if (old_Rows != Rows || old_Columns != Columns) +! shell_resized(); +! } + } + + /* +*** ../vim-7.3.091/src/version.c 2010-12-30 12:30:26.000000000 +0100 +--- src/version.c 2010-12-30 14:47:04.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 92, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +57. You begin to wonder how on earth your service provider is allowed to call + 200 hours per month "unlimited." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 89bda313cf4a6545a5be8ecb5b75f8898c04dda1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 3 Jan 2011 17:46:38 +0100 Subject: [PATCH 0104/3803] - patchlevel 093 --- 7.3.093 | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 7.3.093 diff --git a/7.3.093 b/7.3.093 new file mode 100644 index 00000000..9bf0fe8a --- /dev/null +++ b/7.3.093 @@ -0,0 +1,201 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.093 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.093 +Problem: New DLL dependencies in MingW with gcc 4.5.0. +Solution: Add STATIC_STDCPLUS, LDFLAGS and split up WINDRES. (Guopeng Wen) +Files: src/GvimExt/Make_ming.mak, src/Make_ming.mak + + +*** ../vim-7.3.092/src/GvimExt/Make_ming.mak 2010-09-29 18:42:25.000000000 +0200 +--- src/GvimExt/Make_ming.mak 2010-12-30 14:42:51.000000000 +0100 +*************** +*** 17,22 **** +--- 17,33 ---- + # check also the executables + MINGWOLD = no + ++ # Link against the shared versions of libgcc/libstdc++ by default. Set ++ # STATIC_STDCPLUS to "yes" to link against static versions instead. ++ STATIC_STDCPLUS=no ++ #STATIC_STDCPLUS=yes ++ ++ # Note: -static-libstdc++ is not available until gcc 4.5.x. ++ LDFLAGS += -shared ++ ifeq (yes, $(STATIC_STDCPLUS)) ++ LDFLAGS += -static-libgcc -static-libstdc++ ++ endif ++ + ifeq ($(CROSS),yes) + DEL = rm + ifeq ($(MINGWOLD),yes) +*************** +*** 33,39 **** + endif + endif + CXX := $(CROSS_COMPILE)g++ +! WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CXX) -E -xc" -DRC_INVOKED + LIBS := -luuid + RES := gvimext.res + DEFFILE = gvimext_ming.def +--- 44,52 ---- + endif + endif + CXX := $(CROSS_COMPILE)g++ +! WINDRES := $(CROSS_COMPILE)windres +! WINDRES_CXX = $(CXX) +! WINDRES_FLAGS = --preprocessor="$(WINDRES_CXX) -E -xc" -DRC_INVOKED + LIBS := -luuid + RES := gvimext.res + DEFFILE = gvimext_ming.def +*************** +*** 46,52 **** + all: all-before $(DLL) all-after + + $(DLL): $(OBJ) $(RES) $(DEFFILE) +! $(CXX) -shared $(CXXFLAGS) -s -o $@ \ + -Wl,--enable-auto-image-base \ + -Wl,--enable-auto-import \ + -Wl,--whole-archive \ +--- 59,65 ---- + all: all-before $(DLL) all-after + + $(DLL): $(OBJ) $(RES) $(DEFFILE) +! $(CXX) $(LDFLAGS) $(CXXFLAGS) -s -o $@ \ + -Wl,--enable-auto-image-base \ + -Wl,--enable-auto-import \ + -Wl,--whole-archive \ +*************** +*** 58,64 **** + $(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@ + + $(RES): gvimext_ming.rc +! $(WINDRES) --input-format=rc --output-format=coff -DMING $? -o $@ + + clean: clean-custom + -$(DEL) $(OBJ) $(RES) $(DLL) +--- 71,77 ---- + $(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@ + + $(RES): gvimext_ming.rc +! $(WINDRES) $(WINDRES_FLAGS) --input-format=rc --output-format=coff -DMING $? -o $@ + + clean: clean-custom + -$(DEL) $(OBJ) $(RES) $(DLL) +*** ../vim-7.3.092/src/Make_ming.mak 2010-11-03 21:59:23.000000000 +0100 +--- src/Make_ming.mak 2010-12-30 14:42:51.000000000 +0100 +*************** +*** 56,61 **** +--- 56,67 ---- + NETBEANS=$(GUI) + + ++ # Link against the shared version of libstdc++ by default. Set ++ # STATIC_STDCPLUS to "yes" to link against static version instead. ++ ifndef STATIC_STDCPLUS ++ STATIC_STDCPLUS=no ++ endif ++ + # If the user doesn't want gettext, undefine it. + ifeq (no, $(GETTEXT)) + GETTEXT= +*************** +*** 309,320 **** + endif + endif + CC := $(CROSS_COMPILE)gcc +! WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CC) -E -xc" -DRC_INVOKED + + #>>>>> end of choices + ########################################################################### + + CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall + + ifdef GETTEXT + DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H +--- 315,328 ---- + endif + endif + CC := $(CROSS_COMPILE)gcc +! WINDRES := $(CROSS_COMPILE)windres +! WINDRES_CC = $(CC) + + #>>>>> end of choices + ########################################################################### + + CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall ++ WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED + + ifdef GETTEXT + DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H +*************** +*** 577,584 **** + endif + + ifeq (yes, $(OLE)) +! LIB += -loleaut32 -lstdc++ + OBJ += $(OUTDIR)/if_ole.o + endif + + ifeq (yes, $(MBYTE)) +--- 585,597 ---- + endif + + ifeq (yes, $(OLE)) +! LIB += -loleaut32 + OBJ += $(OUTDIR)/if_ole.o ++ ifeq (yes, $(STATIC_STDCPLUS)) ++ LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic ++ else ++ LIB += -lstdc++ ++ endif + endif + + ifeq (yes, $(MBYTE)) +*************** +*** 656,665 **** + $(CC) -c $(CFLAGS) $< -o $@ + + $(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h +! $(WINDRES) $(DEFINES) vim.rc $(OUTDIR)/vimres.res + + $(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res +! $(WINDRES) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o + + $(OUTDIR): + $(MKDIR) $(OUTDIR) +--- 669,678 ---- + $(CC) -c $(CFLAGS) $< -o $@ + + $(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h +! $(WINDRES) $(WINDRES_FLAGS) $(DEFINES) vim.rc $(OUTDIR)/vimres.res + + $(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res +! $(WINDRES) $(WINDRES_FLAGS) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o + + $(OUTDIR): + $(MKDIR) $(OUTDIR) +*** ../vim-7.3.092/src/version.c 2010-12-30 14:47:32.000000000 +0100 +--- src/version.c 2010-12-30 14:48:34.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 93, + /**/ + +-- +Creating the world with Emacs: M-x let-there-be-light +Creating the world with Vim: :make world + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From db0277b52a4afe5c5a812f029b84752af6b1ae62 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 3 Jan 2011 17:46:39 +0100 Subject: [PATCH 0105/3803] - patchlevel 094 --- 7.3.094 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 7.3.094 diff --git a/7.3.094 b/7.3.094 new file mode 100644 index 00000000..e95122bb --- /dev/null +++ b/7.3.094 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.094 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.094 +Problem: Using abs() requires type cast to int. +Solution: Use labs() so that the value remains long. (Hong Xu) +Files: src/screen.c + + +*** ../vim-7.3.093/src/screen.c 2010-12-08 19:56:52.000000000 +0100 +--- src/screen.c 2010-12-30 14:54:08.000000000 +0100 +*************** +*** 2317,2323 **** + num = (long)lnum; + else + /* 'relativenumber', don't use negative numbers */ +! num = (long)abs((int)get_cursor_rel_lnum(wp, lnum)); + + sprintf((char *)buf, "%*ld ", w, num); + #ifdef FEAT_RIGHTLEFT +--- 2317,2323 ---- + num = (long)lnum; + else + /* 'relativenumber', don't use negative numbers */ +! num = labs((long)get_cursor_rel_lnum(wp, lnum)); + + sprintf((char *)buf, "%*ld ", w, num); + #ifdef FEAT_RIGHTLEFT +*************** +*** 3475,3482 **** + num = (long)lnum; + else + /* 'relativenumber', don't use negative numbers */ +! num = (long)abs((int)get_cursor_rel_lnum(wp, +! lnum)); + + sprintf((char *)extra, "%*ld ", + number_width(wp), num); +--- 3475,3481 ---- + num = (long)lnum; + else + /* 'relativenumber', don't use negative numbers */ +! num = labs((long)get_cursor_rel_lnum(wp, lnum)); + + sprintf((char *)extra, "%*ld ", + number_width(wp), num); +*** ../vim-7.3.093/src/version.c 2010-12-30 14:50:46.000000000 +0100 +--- src/version.c 2010-12-30 14:56:32.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 94, + /**/ + +-- +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/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From c7242fe73ad4570fc6e1566f4d38e1d5bdef50fa Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 3 Jan 2011 17:46:40 +0100 Subject: [PATCH 0106/3803] - patchlevel 94 --- README.patches | 13 +++++++++++++ vim.spec | 31 ++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index faf57f48..9b4ec135 100644 --- a/README.patches +++ b/README.patches @@ -107,3 +107,16 @@ Individual patches for Vim 7.3: 1377 7.3.079 duplicate lines in MSVC makefile 6011 7.3.080 spelling doesn't work on VMS 2257 7.3.081 non-printable characters in 'statusline' cause trouble + 1634 7.3.082 leaking file descriptor when netbeans hostname doesn't exist + 9996 7.3.083 when a read() or write() is interrupted by a signal it fails + 3508 7.3.084 after window split the new one scrolls with cursor at top + 8843 7.3.085 (after 7.3.083) inconsistency with preproc symbols + 4005 7.3.086 v:count has value of previous command in expression mapping + 4349 7.3.087 (after 7.3.083) missing include for errno.h + 4868 7.3.088 Ruby can't load Gems sometimes, may cause a crash + 1550 7.3.089 compiler warning on 64 bit MS-Windows + 2377 7.3.090 wrong help text for Cscope + 9421 7.3.091 "vim -w foo" writes key codes for removed escape sequences + 1678 7.3.092 resizing the window when exiting + 5483 7.3.093 new DLL dependencies in MingW with gcc 4.5.0 + 2167 7.3.094 using abs() requires type cast to int diff --git a/vim.spec b/vim.spec index 2b48cc43..4e44acf8 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 081 +%define patchlevel 094 Summary: The VIM editor URL: http://www.vim.org/ @@ -145,6 +145,19 @@ Patch078: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.078 Patch079: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.079 Patch080: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.080 Patch081: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.081 +Patch082: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.082 +Patch083: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.083 +Patch084: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.084 +Patch085: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.085 +Patch086: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.086 +Patch087: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.087 +Patch088: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.088 +Patch089: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.089 +Patch090: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.090 +Patch091: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.091 +Patch092: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.092 +Patch093: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.093 +Patch094: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.094 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -370,6 +383,19 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch079 -p0 %patch080 -p0 %patch081 -p0 +%patch082 -p0 +%patch083 -p0 +%patch084 -p0 +%patch085 -p0 +%patch086 -p0 +%patch087 -p0 +%patch088 -p0 +%patch089 -p0 +%patch090 -p0 +%patch091 -p0 +%patch092 -p0 +%patch093 -p0 +%patch094 -p0 # install spell files @@ -837,6 +863,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Mon Jan 03 2011 Karsten Hopp 7.3.094-1 +- patchlevel 094 + * Thu Dec 09 2010 Karsten Hopp 7.3.081-1 - patchlevel 081 From 732303d9aaa79d83c64b29d87d75bcdbc2fdf68d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 10 Jan 2011 12:33:36 +0100 Subject: [PATCH 0107/3803] - patchlevel 095 --- 7.3.095 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 7.3.095 diff --git a/7.3.095 b/7.3.095 new file mode 100644 index 00000000..2ea34924 --- /dev/null +++ b/7.3.095 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.095 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.095 +Problem: Win32: In Chinese tear-off menu doesn't work. (Weasley) +Solution: Use menu_name_equal(). (Alex Jakushev) +Files: src/menu.c + + +*** ../vim-7.3.094/src/menu.c 2010-08-15 21:57:25.000000000 +0200 +--- src/menu.c 2011-01-04 17:41:38.000000000 +0100 +*************** +*** 1512,1519 **** + { + #ifdef FEAT_MULTI_LANG + if (menu->en_name != NULL +! && (menu_namecmp(name,menu->en_name) +! || menu_namecmp(name,menu->en_dname))) + return TRUE; + #endif + return menu_namecmp(name, menu->name) || menu_namecmp(name, menu->dname); +--- 1512,1519 ---- + { + #ifdef FEAT_MULTI_LANG + if (menu->en_name != NULL +! && (menu_namecmp(name, menu->en_name) +! || menu_namecmp(name, menu->en_dname))) + return TRUE; + #endif + return menu_namecmp(name, menu->name) || menu_namecmp(name, menu->dname); +*************** +*** 2342,2348 **** + + while (menu != NULL) + { +! if (STRCMP(name, menu->name) == 0 || STRCMP(name, menu->dname) == 0) + { + if (menu->children == NULL) + { +--- 2342,2348 ---- + + while (menu != NULL) + { +! if (menu_name_equal(name, menu)) + { + if (menu->children == NULL) + { +*** ../vim-7.3.094/src/version.c 2010-12-30 14:57:03.000000000 +0100 +--- src/version.c 2011-01-04 17:43:41.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 95, + /**/ + +-- +If your nose runs, and your feet smell, you might be upside down. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 86b7036d0822df944094c26bed088ab1f4b847be Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 10 Jan 2011 12:33:37 +0100 Subject: [PATCH 0108/3803] - patchlevel 096 --- 7.3.096 | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 7.3.096 diff --git a/7.3.096 b/7.3.096 new file mode 100644 index 00000000..b8b541b7 --- /dev/null +++ b/7.3.096 @@ -0,0 +1,97 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.096 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.096 +Problem: "gvim -nb" is not interruptable. Leaking file descriptor on + netbeans connection error. +Solution: Check for CTRL-C typed. Free file descriptor. (Xavier de Gaye) +Files: src/netbeans.c + + +*** ../vim-7.3.095/src/netbeans.c 2010-12-24 14:00:09.000000000 +0100 +--- src/netbeans.c 2011-01-04 18:00:35.000000000 +0100 +*************** +*** 321,326 **** +--- 321,327 ---- + { + nbdebug(("error in gethostbyname() in netbeans_connect()\n")); + PERROR("gethostbyname() in netbeans_connect()"); ++ sock_close(sd); + goto theend; + } + memcpy((char *)&server.sin_addr, host->h_addr, host->h_length); +*************** +*** 370,384 **** + || (errno == EINTR))) + { + nbdebug(("retrying...\n")); +! sleep(5); +! if (!doabort) + { +! ui_breakcheck(); +! if (got_int) +! { +! errno = EINTR; +! break; +! } + } + if (connect(sd, (struct sockaddr *)&server, + sizeof(server)) == 0) +--- 371,382 ---- + || (errno == EINTR))) + { + nbdebug(("retrying...\n")); +! mch_delay(3000L, TRUE); +! ui_breakcheck(); +! if (got_int) + { +! errno = EINTR; +! break; + } + if (connect(sd, (struct sockaddr *)&server, + sizeof(server)) == 0) +*************** +*** 393,398 **** +--- 391,397 ---- + /* Get here when the server can't be found. */ + nbdebug(("Cannot connect to Netbeans #2\n")); + PERROR(_("Cannot connect to Netbeans #2")); ++ sock_close(sd); + if (doabort) + getout(1); + goto theend; +*************** +*** 403,408 **** +--- 402,408 ---- + { + nbdebug(("Cannot connect to Netbeans\n")); + PERROR(_("Cannot connect to Netbeans")); ++ sock_close(sd); + if (doabort) + getout(1); + goto theend; +*** ../vim-7.3.095/src/version.c 2011-01-04 17:49:25.000000000 +0100 +--- src/version.c 2011-01-04 18:09:46.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 96, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +85. Choice between paying Compuserve bill and paying for kids education + is a no brainer -- although a bit painful for your kids. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ac469df9f3019c031de2a0e663ef962e9617c17c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 10 Jan 2011 12:33:37 +0100 Subject: [PATCH 0109/3803] - patchlevel 097 --- 7.3.097 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 7.3.097 diff --git a/7.3.097 b/7.3.097 new file mode 100644 index 00000000..2ee20a32 --- /dev/null +++ b/7.3.097 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.097 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.097 +Problem: Using ":call" inside "if 0" does not see that a function returns a + Dict and gives error for "." as string concatenation. +Solution: Use eval0() to skip over the expression. (Yasuhiro Matsumoto) +Files: src/eval.c + + +*** ../vim-7.3.096/src/eval.c 2010-12-17 18:06:00.000000000 +0100 +--- src/eval.c 2011-01-04 18:54:27.000000000 +0100 +*************** +*** 3335,3340 **** +--- 3335,3349 ---- + int failed = FALSE; + funcdict_T fudi; + ++ if (eap->skip) ++ { ++ /* trans_function_name() doesn't work well when skipping, use eval0() ++ * instead to skip to any following command, e.g. for: ++ * :if 0 | call dict.foo().bar() | endif */ ++ eval0(eap->arg, &rettv, &eap->nextcmd, FALSE); ++ return; ++ } ++ + tofree = trans_function_name(&arg, eap->skip, TFN_INT, &fudi); + if (fudi.fd_newkey != NULL) + { +*** ../vim-7.3.096/src/version.c 2011-01-04 18:11:39.000000000 +0100 +--- src/version.c 2011-01-04 19:00:21.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 97, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +86. E-mail Deficiency Depression (EDD) forces you to e-mail yourself. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d416a735f718b569d6549d48b95e5f48836dc486 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 10 Jan 2011 12:33:38 +0100 Subject: [PATCH 0110/3803] - patchlevel 098 --- 7.3.098 | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 7.3.098 diff --git a/7.3.098 b/7.3.098 new file mode 100644 index 00000000..9e6435eb --- /dev/null +++ b/7.3.098 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.098 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.098 +Problem: Function that ignores error still causes called_emsg to be set. + E.g. when expand() fails the status line is disabled. +Solution: Move check for emsg_not_now() up. (James Vega) +Files: src/message.c + + +*** ../vim-7.3.097/src/message.c 2010-10-20 21:22:17.000000000 +0200 +--- src/message.c 2011-01-04 19:19:04.000000000 +0100 +*************** +*** 569,574 **** +--- 569,578 ---- + int severe; + #endif + ++ /* Skip this if not giving error messages at the moment. */ ++ if (emsg_not_now()) ++ return TRUE; ++ + called_emsg = TRUE; + ex_exitval = 1; + +*************** +*** 581,590 **** + emsg_severe = FALSE; + #endif + +- /* Skip this if not giving error messages at the moment. */ +- if (emsg_not_now()) +- return TRUE; +- + if (!emsg_off || vim_strchr(p_debug, 't') != NULL) + { + #ifdef FEAT_EVAL +--- 585,590 ---- +*** ../vim-7.3.097/src/version.c 2011-01-04 19:03:22.000000000 +0100 +--- src/version.c 2011-01-04 19:24:30.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 98, + /**/ + +-- +Ed's Radiator Shop: The Best Place in Town to Take a Leak. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From afbf50cc49387bf35b8ae9fb3b10cc02c5018160 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 10 Jan 2011 12:33:38 +0100 Subject: [PATCH 0111/3803] - patchlevel 099 --- 7.3.099 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 7.3.099 diff --git a/7.3.099 b/7.3.099 new file mode 100644 index 00000000..84aa2a3f --- /dev/null +++ b/7.3.099 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.099 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.099 +Problem: Crash when splitting a window with zero height. (Yukihiro + Nakadaira) +Solution: Don't set the fraction in a window with zero height. +Files: src/window.c + + +*** ../vim-7.3.098/src/window.c 2010-12-17 17:35:05.000000000 +0100 +--- src/window.c 2011-01-08 14:41:32.000000000 +0100 +*************** +*** 986,992 **** + + /* Set w_fraction now so that the cursor keeps the same relative + * vertical position. */ +! set_fraction(oldwin); + wp->w_fraction = oldwin->w_fraction; + + #ifdef FEAT_VERTSPLIT +--- 986,993 ---- + + /* Set w_fraction now so that the cursor keeps the same relative + * vertical position. */ +! if (oldwin->w_height > 0) +! set_fraction(oldwin); + wp->w_fraction = oldwin->w_fraction; + + #ifdef FEAT_VERTSPLIT +*** ../vim-7.3.098/src/version.c 2011-01-04 19:25:46.000000000 +0100 +--- src/version.c 2011-01-08 14:44:02.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 99, + /**/ + +-- +From "know your smileys": + 8-O "Omigod!!" (done "rm -rf *" ?) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d72fe2c0fe7083b1d982d84d38a639f95f8b6b93 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 10 Jan 2011 12:33:39 +0100 Subject: [PATCH 0112/3803] - patchlevel 99 --- README.patches | 5 +++++ vim.spec | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index 9b4ec135..3f08da94 100644 --- a/README.patches +++ b/README.patches @@ -120,3 +120,8 @@ Individual patches for Vim 7.3: 1678 7.3.092 resizing the window when exiting 5483 7.3.093 new DLL dependencies in MingW with gcc 4.5.0 2167 7.3.094 using abs() requires type cast to int + 1999 7.3.095 Win32: In Chinese tear-off menu doesn't work + 2767 7.3.096 can't interrupt "gvim -nb", leak file descriptor on errro + 1760 7.3.097 ":call" inside "if 0" gives error for dict function + 1712 7.3.098 ignored error may still cause status line to be disabled + 1628 7.3.099 crash when splitting a window with zero height diff --git a/vim.spec b/vim.spec index 4e44acf8..a6c28ec4 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 094 +%define patchlevel 099 Summary: The VIM editor URL: http://www.vim.org/ @@ -158,6 +158,11 @@ Patch091: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.091 Patch092: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.092 Patch093: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.093 Patch094: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.094 +Patch095: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.095 +Patch096: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.096 +Patch097: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.097 +Patch098: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.098 +Patch099: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.099 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -396,6 +401,11 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch092 -p0 %patch093 -p0 %patch094 -p0 +%patch095 -p0 +%patch096 -p0 +%patch097 -p0 +%patch098 -p0 +%patch099 -p0 # install spell files @@ -863,6 +873,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Mon Jan 10 2011 Karsten Hopp 7.3.099-1 +- patchlevel 099 + * Mon Jan 03 2011 Karsten Hopp 7.3.094-1 - patchlevel 094 From d7b5ae920f3142281fa4dd589c9eb4a075b2169e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 24 Jan 2011 12:14:38 +0100 Subject: [PATCH 0113/3803] - patchlevel 100 --- 7.3.100 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 7.3.100 diff --git a/7.3.100 b/7.3.100 new file mode 100644 index 00000000..2b6e8b04 --- /dev/null +++ b/7.3.100 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.100 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.100 +Problem: When using :normal v:count isn't set. +Solution: Call normal_cmd() with toplevel set to TRUE. +Files: src/ex_docmd.c + + +*** ../vim-7.3.099/src/ex_docmd.c 2010-12-02 16:01:23.000000000 +0100 +--- src/ex_docmd.c 2011-01-06 17:23:43.000000000 +0100 +*************** +*** 9310,9316 **** + && !got_int) + { + update_topline_cursor(); +! normal_cmd(&oa, FALSE); /* execute a Normal mode cmd */ + } + } + #endif +--- 9310,9316 ---- + && !got_int) + { + update_topline_cursor(); +! normal_cmd(&oa, TRUE); /* execute a Normal mode cmd */ + } + } + #endif +*** ../vim-7.3.099/src/version.c 2011-01-08 14:45:57.000000000 +0100 +--- src/version.c 2011-01-17 19:49:07.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 100, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +109. You actually read -- and enjoy -- lists like this. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From aaf398864c7c8f591ce9d6c58d19b537d2636842 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 24 Jan 2011 12:14:39 +0100 Subject: [PATCH 0114/3803] - patchlevel 101 --- 7.3.101 | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 7.3.101 diff --git a/7.3.101 b/7.3.101 new file mode 100644 index 00000000..8869baf1 --- /dev/null +++ b/7.3.101 @@ -0,0 +1,92 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.1 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.101 +Problem: ino_t defined with wrong size. +Solution: Move including auto/config.h before other includes. (Marius + Geminas) +Files: src/if_ruby.c, src/if_lua.c + + +*** ../vim-7.3.100/src/if_ruby.c 2010-12-24 13:39:29.000000000 +0100 +--- src/if_ruby.c 2011-01-09 14:43:14.000000000 +0100 +*************** +*** 11,23 **** + * See README.txt for an overview of the Vim source code. + */ + +- #include +- #include +- + #ifdef HAVE_CONFIG_H + # include "auto/config.h" + #endif + + #ifdef _WIN32 + # if !defined(DYNAMIC_RUBY_VER) || (DYNAMIC_RUBY_VER < 18) + # define NT +--- 11,23 ---- + * See README.txt for an overview of the Vim source code. + */ + + #ifdef HAVE_CONFIG_H + # include "auto/config.h" + #endif + ++ #include ++ #include ++ + #ifdef _WIN32 + # if !defined(DYNAMIC_RUBY_VER) || (DYNAMIC_RUBY_VER < 18) + # define NT +*** ../vim-7.3.100/src/if_lua.c 2010-10-23 14:02:48.000000000 +0200 +--- src/if_lua.c 2011-01-09 14:46:46.000000000 +0100 +*************** +*** 9,20 **** + * See README.txt for an overview of the Vim source code. + */ + +! #include +! #include + #include + #include + #include +- #include "vim.h" + + /* Only do the following when the feature is enabled. Needed for "make + * depend". */ +--- 9,19 ---- + * See README.txt for an overview of the Vim source code. + */ + +! #include "vim.h" +! + #include + #include + #include + + /* Only do the following when the feature is enabled. Needed for "make + * depend". */ +*** ../vim-7.3.100/src/version.c 2011-01-17 19:50:01.000000000 +0100 +--- src/version.c 2011-01-17 19:51:40.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 101, + /**/ + +-- +In a world without walls and borders, who needs windows and gates? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 8a61f621f59cc0e33ae53399284e565280f7f2f1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 24 Jan 2011 12:14:39 +0100 Subject: [PATCH 0115/3803] - patchlevel 102 --- 7.3.102 | 615 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 615 insertions(+) create mode 100644 7.3.102 diff --git a/7.3.102 b/7.3.102 new file mode 100644 index 00000000..785e597b --- /dev/null +++ b/7.3.102 @@ -0,0 +1,615 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.102 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.102 +Problem: When using ":make", typing the next command and then getting the + "reload" prompt the next command is (partly) eaten by the reload + prompt. +Solution: Accept ':' as a special character at the reload prompt to accept + the default choice and execute the command. +Files: src/eval.c, src/fileio.c, src/gui.c, src/gui_xmdlg.c, + src/memline.c, src/message.c, src/proto/message.pro, + src/gui_athena.c, src/gui_gtk.c, src/gui_mac.c, src/gui_motif.c, + src/gui_photon.c, src/gui_w16.c, src/gui_w32.c, src/os_mswin.c + src/proto/gui_athena.pro, src/proto/gui_gtk.pro, + src/proto/gui_mac.pro, src/proto/gui_motif.pro, + src/proto/gui_photon.pro, src/proto/gui_w16.pro, + src/proto/gui_w32.pro + + +*** ../vim-7.3.101/src/eval.c 2011-01-04 19:03:22.000000000 +0100 +--- src/eval.c 2011-01-16 00:14:21.000000000 +0100 +*************** +*** 9323,9329 **** + + if (!error) + rettv->vval.v_number = do_dialog(type, NULL, message, buttons, +! def, NULL); + #endif + } + +--- 9323,9329 ---- + + if (!error) + rettv->vval.v_number = do_dialog(type, NULL, message, buttons, +! def, NULL, FALSE); + #endif + } + +*************** +*** 12744,12750 **** + IObuff[0] = NUL; + if (message != NULL && defstr != NULL + && do_dialog(VIM_QUESTION, NULL, message, +! (char_u *)_("&OK\n&Cancel"), 1, IObuff) == 1) + rettv->vval.v_string = vim_strsave(IObuff); + else + { +--- 12744,12750 ---- + IObuff[0] = NUL; + if (message != NULL && defstr != NULL + && do_dialog(VIM_QUESTION, NULL, message, +! (char_u *)_("&OK\n&Cancel"), 1, IObuff, FALSE) == 1) + rettv->vval.v_string = vim_strsave(IObuff); + else + { +*** ../vim-7.3.101/src/fileio.c 2010-12-17 18:06:00.000000000 +0100 +--- src/fileio.c 2011-01-16 00:14:37.000000000 +0100 +*************** +*** 7008,7014 **** + STRCAT(tbuf, mesg2); + } + if (do_dialog(VIM_WARNING, (char_u *)_("Warning"), tbuf, +! (char_u *)_("&OK\n&Load File"), 1, NULL) == 2) + reload = TRUE; + } + else +--- 7008,7014 ---- + STRCAT(tbuf, mesg2); + } + if (do_dialog(VIM_WARNING, (char_u *)_("Warning"), tbuf, +! (char_u *)_("&OK\n&Load File"), 1, NULL, TRUE) == 2) + reload = TRUE; + } + else +*** ../vim-7.3.101/src/gui.c 2010-10-20 19:17:43.000000000 +0200 +--- src/gui.c 2011-01-16 00:14:56.000000000 +0100 +*************** +*** 4903,4909 **** + if (STRLEN(p) > 2000) + STRCPY(p + 2000 - 14, "...(truncated)"); + (void)do_dialog(VIM_ERROR, (char_u *)_("Error"), +! p, (char_u *)_("&Ok"), 1, NULL); + break; + } + ga_clear(&error_ga); +--- 4903,4909 ---- + if (STRLEN(p) > 2000) + STRCPY(p + 2000 - 14, "...(truncated)"); + (void)do_dialog(VIM_ERROR, (char_u *)_("Error"), +! p, (char_u *)_("&Ok"), 1, NULL, FALSE); + break; + } + ga_clear(&error_ga); +*** ../vim-7.3.101/src/gui_xmdlg.c 2010-08-15 21:57:32.000000000 +0200 +--- src/gui_xmdlg.c 2011-01-16 00:15:33.000000000 +0100 +*************** +*** 688,694 **** + do_dialog(VIM_ERROR, + (char_u *)_("Error"), + (char_u *)_("Invalid font specification"), +! (char_u *)_("&Dismiss"), 1, NULL); + + return True; + } +--- 688,694 ---- + do_dialog(VIM_ERROR, + (char_u *)_("Error"), + (char_u *)_("Invalid font specification"), +! (char_u *)_("&Dismiss"), 1, NULL, FALSE); + + return True; + } +*************** +*** 807,813 **** + do_dialog(VIM_ERROR, + (char_u *)_("Error"), + (char_u *)_("Invalid font specification"), +! (char_u *)_("&Dismiss"), 1, NULL); + XFreeFontNames(name); + } + else +--- 807,813 ---- + do_dialog(VIM_ERROR, + (char_u *)_("Error"), + (char_u *)_("Invalid font specification"), +! (char_u *)_("&Dismiss"), 1, NULL, FALSE); + XFreeFontNames(name); + } + else +*** ../vim-7.3.101/src/memline.c 2010-12-17 20:23:56.000000000 +0100 +--- src/memline.c 2011-01-16 00:15:47.000000000 +0100 +*************** +*** 4516,4522 **** + process_still_running + ? (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Quit\n&Abort") : + # endif +! (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL); + + # if defined(UNIX) || defined(__EMX__) || defined(VMS) + if (process_still_running && choice >= 4) +--- 4516,4522 ---- + process_still_running + ? (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Quit\n&Abort") : + # endif +! (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL, FALSE); + + # if defined(UNIX) || defined(__EMX__) || defined(VMS) + if (process_still_running && choice >= 4) +*** ../vim-7.3.101/src/message.c 2011-01-04 19:25:46.000000000 +0100 +--- src/message.c 2011-01-17 19:57:30.000000000 +0100 +*************** +*** 3315,3321 **** + * different letter. + */ + int +! do_dialog(type, title, message, buttons, dfltbutton, textfield) + int type UNUSED; + char_u *title UNUSED; + char_u *message; +--- 3315,3321 ---- + * different letter. + */ + int +! do_dialog(type, title, message, buttons, dfltbutton, textfield, ex_cmd) + int type UNUSED; + char_u *title UNUSED; + char_u *message; +*************** +*** 3323,3328 **** +--- 3323,3330 ---- + int dfltbutton; + char_u *textfield UNUSED; /* IObuff for inputdialog(), NULL + otherwise */ ++ int ex_cmd; /* when TRUE pressing : accepts default and starts ++ Ex command */ + { + int oldState; + int retval = 0; +*************** +*** 3341,3347 **** + if (gui.in_use && vim_strchr(p_go, GO_CONDIALOG) == NULL) + { + c = gui_mch_dialog(type, title, message, buttons, dfltbutton, +! textfield); + /* avoid a hit-enter prompt without clearing the cmdline */ + need_wait_return = FALSE; + emsg_on_display = FALSE; +--- 3343,3349 ---- + if (gui.in_use && vim_strchr(p_go, GO_CONDIALOG) == NULL) + { + c = gui_mch_dialog(type, title, message, buttons, dfltbutton, +! textfield, ex_cmd); + /* avoid a hit-enter prompt without clearing the cmdline */ + need_wait_return = FALSE; + emsg_on_display = FALSE; +*************** +*** 3388,3393 **** +--- 3390,3402 ---- + default: /* Could be a hotkey? */ + if (c < 0) /* special keys are ignored here */ + continue; ++ if (c == ':' && ex_cmd) ++ { ++ retval = dfltbutton; ++ ins_char_typebuf(':'); ++ break; ++ } ++ + /* Make the character lowercase, as chars in "hotkeys" are. */ + c = MB_TOLOWER(c); + retval = 1; +*************** +*** 3661,3667 **** + if (do_dialog(type, + title == NULL ? (char_u *)_("Question") : title, + message, +! (char_u *)_("&Yes\n&No"), dflt, NULL) == 1) + return VIM_YES; + return VIM_NO; + } +--- 3670,3676 ---- + if (do_dialog(type, + title == NULL ? (char_u *)_("Question") : title, + message, +! (char_u *)_("&Yes\n&No"), dflt, NULL, FALSE) == 1) + return VIM_YES; + return VIM_NO; + } +*************** +*** 3676,3682 **** + switch (do_dialog(type, + title == NULL ? (char_u *)_("Question") : title, + message, +! (char_u *)_("&Yes\n&No\n&Cancel"), dflt, NULL)) + { + case 1: return VIM_YES; + case 2: return VIM_NO; +--- 3685,3691 ---- + switch (do_dialog(type, + title == NULL ? (char_u *)_("Question") : title, + message, +! (char_u *)_("&Yes\n&No\n&Cancel"), dflt, NULL, FALSE)) + { + case 1: return VIM_YES; + case 2: return VIM_NO; +*************** +*** 3695,3701 **** + title == NULL ? (char_u *)"Question" : title, + message, + (char_u *)_("&Yes\n&No\nSave &All\n&Discard All\n&Cancel"), +! dflt, NULL)) + { + case 1: return VIM_YES; + case 2: return VIM_NO; +--- 3704,3710 ---- + title == NULL ? (char_u *)"Question" : title, + message, + (char_u *)_("&Yes\n&No\nSave &All\n&Discard All\n&Cancel"), +! dflt, NULL, FALSE)) + { + case 1: return VIM_YES; + case 2: return VIM_NO; +*** ../vim-7.3.101/src/proto/message.pro 2010-10-20 21:22:17.000000000 +0200 +--- src/proto/message.pro 2011-01-16 00:22:36.000000000 +0100 +*************** +*** 64,70 **** + int verbose_open __ARGS((void)); + void give_warning __ARGS((char_u *message, int hl)); + void msg_advance __ARGS((int col)); +! int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); + void display_confirm_msg __ARGS((void)); + int vim_dialog_yesno __ARGS((int type, char_u *title, char_u *message, int dflt)); + int vim_dialog_yesnocancel __ARGS((int type, char_u *title, char_u *message, int dflt)); +--- 64,70 ---- + int verbose_open __ARGS((void)); + void give_warning __ARGS((char_u *message, int hl)); + void msg_advance __ARGS((int col)); +! int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); + void display_confirm_msg __ARGS((void)); + int vim_dialog_yesno __ARGS((int type, char_u *title, char_u *message, int dflt)); + int vim_dialog_yesnocancel __ARGS((int type, char_u *title, char_u *message, int dflt)); +*** ../vim-7.3.101/src/gui_athena.c 2010-08-15 21:57:25.000000000 +0200 +--- src/gui_athena.c 2011-01-16 00:18:47.000000000 +0100 +*************** +*** 2117,2129 **** + } + + int +! gui_mch_dialog(type, title, message, buttons, dfltbutton, textfield) + int type UNUSED; + char_u *title; + char_u *message; + char_u *buttons; + int dfltbutton UNUSED; + char_u *textfield; + { + char_u *buts; + char_u *p, *next; +--- 2117,2130 ---- + } + + int +! gui_mch_dialog(type, title, message, buttons, dfltbutton, textfield, ex_cmd) + int type UNUSED; + char_u *title; + char_u *message; + char_u *buttons; + int dfltbutton UNUSED; + char_u *textfield; ++ int ex_cmd UNUSED; + { + char_u *buts; + char_u *p, *next; +*** ../vim-7.3.101/src/gui_gtk.c 2010-12-08 13:11:15.000000000 +0100 +--- src/gui_gtk.c 2011-01-16 00:24:44.000000000 +0100 +*************** +*** 1268,1274 **** + char_u *message, /* message text */ + char_u *buttons, /* names of buttons */ + int def_but, /* default button */ +! char_u *textfield) /* text for textfield or NULL */ + { + GtkWidget *dialog; + GtkWidget *entry = NULL; +--- 1268,1275 ---- + char_u *message, /* message text */ + char_u *buttons, /* names of buttons */ + int def_but, /* default button */ +! char_u *textfield, /* text for textfield or NULL */ +! int ex_cmd UNUSED) + { + GtkWidget *dialog; + GtkWidget *entry = NULL; +*** ../vim-7.3.101/src/gui_mac.c 2010-09-21 17:34:26.000000000 +0200 +--- src/gui_mac.c 2011-01-16 00:19:52.000000000 +0100 +*************** +*** 5583,5589 **** + char_u *message, + char_u *buttons, + int dfltbutton, +! char_u *textfield) + { + Handle buttonDITL; + Handle iconDITL; +--- 5583,5590 ---- + char_u *message, + char_u *buttons, + int dfltbutton, +! char_u *textfield, +! int ex_cmd) + { + Handle buttonDITL; + Handle iconDITL; +*** ../vim-7.3.101/src/gui_motif.c 2010-08-15 21:57:28.000000000 +0200 +--- src/gui_motif.c 2011-01-16 00:20:14.000000000 +0100 +*************** +*** 2549,2561 **** + #endif + + int +! gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield) + int type UNUSED; + char_u *title; + char_u *message; + char_u *button_names; + int dfltbutton; + char_u *textfield; /* buffer of size IOSIZE */ + { + char_u *buts; + char_u *p, *next; +--- 2549,2562 ---- + #endif + + int +! gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield, ex_cmd) + int type UNUSED; + char_u *title; + char_u *message; + char_u *button_names; + int dfltbutton; + char_u *textfield; /* buffer of size IOSIZE */ ++ int ex_cmd UNUSED; + { + char_u *buts; + char_u *p, *next; +*** ../vim-7.3.101/src/gui_photon.c 2010-08-15 21:57:27.000000000 +0200 +--- src/gui_photon.c 2011-01-16 00:20:28.000000000 +0100 +*************** +*** 1502,1508 **** + char_u *message, + char_u *buttons, + int default_button, +! char_u *textfield) + { + char_u *str; + char_u **button_array; +--- 1502,1509 ---- + char_u *message, + char_u *buttons, + int default_button, +! char_u *textfield, +! int ex_cmd) + { + char_u *str; + char_u **button_array; +*** ../vim-7.3.101/src/gui_w16.c 2010-08-15 21:57:28.000000000 +0200 +--- src/gui_w16.c 2011-01-16 00:20:48.000000000 +0100 +*************** +*** 1098,1104 **** + char_u *message, + char_u *buttons, + int dfltbutton, +! char_u *textfield) + { + FARPROC dp; + LPWORD p, pnumitems; +--- 1098,1105 ---- + char_u *message, + char_u *buttons, + int dfltbutton, +! char_u *textfield, +! int ex_cmd) + { + FARPROC dp; + LPWORD p, pnumitems; +*** ../vim-7.3.101/src/gui_w32.c 2010-10-27 12:33:12.000000000 +0200 +--- src/gui_w32.c 2011-01-16 00:21:08.000000000 +0100 +*************** +*** 3005,3011 **** + char_u *message, + char_u *buttons, + int dfltbutton, +! char_u *textfield) + { + WORD *p, *pdlgtemplate, *pnumitems; + DWORD *dwp; +--- 3005,3012 ---- + char_u *message, + char_u *buttons, + int dfltbutton, +! char_u *textfield, +! int ex_cmd) + { + WORD *p, *pdlgtemplate, *pnumitems; + DWORD *dwp; +*** ../vim-7.3.101/src/os_mswin.c 2010-12-17 20:23:56.000000000 +0100 +--- src/os_mswin.c 2011-01-16 00:21:41.000000000 +0100 +*************** +*** 593,599 **** + gui.starting ? (char_u *)_("Message") : + #endif + (char_u *)_("Error"), +! p, (char_u *)_("&Ok"), 1, NULL); + break; + } + ga_clear(&error_ga); +--- 593,599 ---- + gui.starting ? (char_u *)_("Message") : + #endif + (char_u *)_("Error"), +! p, (char_u *)_("&Ok"), 1, NULL, FALSE); + break; + } + ga_clear(&error_ga); +*** ../vim-7.3.101/src/proto/gui_athena.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_athena.pro 2011-01-16 00:23:00.000000000 +0100 +*************** +*** 27,31 **** + void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb)); + Window gui_x11_get_wid __ARGS((void)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); + /* vim: set ft=c : */ +--- 27,31 ---- + void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb)); + Window gui_x11_get_wid __ARGS((void)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); + /* vim: set ft=c : */ +*** ../vim-7.3.101/src/proto/gui_gtk.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_gtk.pro 2011-01-16 00:22:57.000000000 +0100 +*************** +*** 13,19 **** + void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); + char_u *gui_mch_browsedir __ARGS((char_u *title, char_u *initdir)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int def_but, char_u *textfield)); + void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); + void gui_make_popup __ARGS((char_u *path_name, int mouse_pos)); + void gui_mch_find_dialog __ARGS((exarg_T *eap)); +--- 13,19 ---- + void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); + char_u *gui_mch_browsedir __ARGS((char_u *title, char_u *initdir)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int def_but, char_u *textfield, int ex_cmd)); + void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); + void gui_make_popup __ARGS((char_u *path_name, int mouse_pos)); + void gui_mch_find_dialog __ARGS((exarg_T *eap)); +*** ../vim-7.3.101/src/proto/gui_mac.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_mac.pro 2011-01-16 00:31:46.000000000 +0100 +*************** +*** 81,87 **** + int gui_mch_get_mouse_y __ARGS((void)); + void gui_mch_setmouse __ARGS((int x, int y)); + void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); + void gui_mch_set_foreground __ARGS((void)); + void gui_mch_show_tabline __ARGS((int showit)); +--- 81,87 ---- + int gui_mch_get_mouse_y __ARGS((void)); + void gui_mch_setmouse __ARGS((int x, int y)); + void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); + void gui_mch_set_foreground __ARGS((void)); + void gui_mch_show_tabline __ARGS((int showit)); +*** ../vim-7.3.101/src/proto/gui_motif.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_motif.pro 2011-01-16 00:22:58.000000000 +0100 +*************** +*** 29,35 **** + void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb)); + Window gui_x11_get_wid __ARGS((void)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *button_names, int dfltbutton, char_u *textfield)); + void gui_mch_enable_footer __ARGS((int showit)); + void gui_mch_set_footer __ARGS((char_u *s)); + void gui_mch_show_toolbar __ARGS((int showit)); +--- 29,35 ---- + void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb)); + Window gui_x11_get_wid __ARGS((void)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *button_names, int dfltbutton, char_u *textfield, int ex_cmd)); + void gui_mch_enable_footer __ARGS((int showit)); + void gui_mch_set_footer __ARGS((char_u *s)); + void gui_mch_show_toolbar __ARGS((int showit)); +*** ../vim-7.3.101/src/proto/gui_photon.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_photon.pro 2011-01-16 00:32:33.000000000 +0100 +*************** +*** 8,14 **** + void gui_mch_update __ARGS((void)); + int gui_mch_wait_for_chars __ARGS((int wtime)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *default_name, char_u *ext, char_u *initdir, char_u *filter)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int default_button, char_u *textfield)); + int gui_mch_get_winpos __ARGS((int *x, int *y)); + void gui_mch_set_winpos __ARGS((int x, int y)); + void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction)); +--- 8,14 ---- + void gui_mch_update __ARGS((void)); + int gui_mch_wait_for_chars __ARGS((int wtime)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *default_name, char_u *ext, char_u *initdir, char_u *filter)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int default_button, char_u *textfield, int ex_cmd)); + int gui_mch_get_winpos __ARGS((int *x, int *y)); + void gui_mch_set_winpos __ARGS((int x, int y)); + void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction)); +*** ../vim-7.3.101/src/proto/gui_w16.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_w16.pro 2011-01-16 00:34:36.000000000 +0100 +*************** +*** 74,79 **** + void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx)); + void gui_mch_destroy_menu __ARGS((vimmenu_T *menu)); + void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); + void gui_mch_set_foreground __ARGS((void)); + /* vim: set ft=c : */ +--- 74,79 ---- + void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx)); + void gui_mch_destroy_menu __ARGS((vimmenu_T *menu)); + void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); + void gui_mch_set_foreground __ARGS((void)); + /* vim: set ft=c : */ +*** ../vim-7.3.101/src/proto/gui_w32.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_w32.pro 2011-01-16 00:33:12.000000000 +0100 +*************** +*** 81,87 **** + void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx)); + void gui_mch_destroy_menu __ARGS((vimmenu_T *menu)); + void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); + void gui_mch_set_foreground __ARGS((void)); + void gui_mch_drawsign __ARGS((int row, int col, int typenr)); + void *gui_mch_register_sign __ARGS((char_u *signfile)); +--- 81,87 ---- + void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx)); + void gui_mch_destroy_menu __ARGS((vimmenu_T *menu)); + void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); + void gui_mch_set_foreground __ARGS((void)); + void gui_mch_drawsign __ARGS((int row, int col, int typenr)); + void *gui_mch_register_sign __ARGS((char_u *signfile)); +*** ../vim-7.3.101/src/version.c 2011-01-17 19:53:20.000000000 +0100 +--- src/version.c 2011-01-17 20:05:02.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 102, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +110. You actually volunteer to become your employer's webmaster. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 82f41a585b7b9328312efc1db73690351110b6a8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 24 Jan 2011 12:14:40 +0100 Subject: [PATCH 0116/3803] - patchlevel 103 --- 7.3.103 | 145 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 7.3.103 diff --git a/7.3.103 b/7.3.103 new file mode 100644 index 00000000..f9e086fa --- /dev/null +++ b/7.3.103 @@ -0,0 +1,145 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.103 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.103 +Problem: Changing 'fileformat' and then using ":w" in an empty file sets + the 'modified' option. +Solution: In unchanged() don't ignore 'ff' for an empty file. +Files: src/misc1.c, src/option.c, src/proto/option.pro, src/undo.c + + +*** ../vim-7.3.102/src/misc1.c 2010-12-30 12:30:26.000000000 +0100 +--- src/misc1.c 2011-01-22 00:00:24.000000000 +0100 +*************** +*** 2919,2925 **** + buf_T *buf; + int ff; /* also reset 'fileformat' */ + { +! if (buf->b_changed || (ff && file_ff_differs(buf))) + { + buf->b_changed = 0; + ml_setflags(buf); +--- 2919,2925 ---- + buf_T *buf; + int ff; /* also reset 'fileformat' */ + { +! if (buf->b_changed || (ff && file_ff_differs(buf, FALSE))) + { + buf->b_changed = 0; + ml_setflags(buf); +*** ../vim-7.3.102/src/option.c 2010-12-02 21:43:10.000000000 +0100 +--- src/option.c 2011-01-22 00:03:40.000000000 +0100 +*************** +*** 11296,11311 **** + * from when editing started (save_file_ff() called). + * Also when 'endofline' was changed and 'binary' is set, or when 'bomb' was + * changed and 'binary' is not set. +! * Don't consider a new, empty buffer to be changed. + */ + int +! file_ff_differs(buf) + buf_T *buf; + { + /* In a buffer that was never loaded the options are not valid. */ + if (buf->b_flags & BF_NEVERLOADED) + return FALSE; +! if ((buf->b_flags & BF_NEW) + && buf->b_ml.ml_line_count == 1 + && *ml_get_buf(buf, (linenr_T)1, FALSE) == NUL) + return FALSE; +--- 11296,11314 ---- + * from when editing started (save_file_ff() called). + * Also when 'endofline' was changed and 'binary' is set, or when 'bomb' was + * changed and 'binary' is not set. +! * When "ignore_empty" is true don't consider a new, empty buffer to be +! * changed. + */ + int +! file_ff_differs(buf, ignore_empty) + buf_T *buf; ++ int ignore_empty; + { + /* In a buffer that was never loaded the options are not valid. */ + if (buf->b_flags & BF_NEVERLOADED) + return FALSE; +! if (ignore_empty +! && (buf->b_flags & BF_NEW) + && buf->b_ml.ml_line_count == 1 + && *ml_get_buf(buf, (linenr_T)1, FALSE) == NUL) + return FALSE; +*** ../vim-7.3.102/src/proto/option.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/option.pro 2011-01-22 00:04:35.000000000 +0100 +*************** +*** 54,59 **** + int option_was_set __ARGS((char_u *name)); + int can_bs __ARGS((int what)); + void save_file_ff __ARGS((buf_T *buf)); +! int file_ff_differs __ARGS((buf_T *buf)); + int check_ff_value __ARGS((char_u *p)); + /* vim: set ft=c : */ +--- 54,59 ---- + int option_was_set __ARGS((char_u *name)); + int can_bs __ARGS((int what)); + void save_file_ff __ARGS((buf_T *buf)); +! int file_ff_differs __ARGS((buf_T *buf, int ignore_empty)); + int check_ff_value __ARGS((char_u *p)); + /* vim: set ft=c : */ +*** ../vim-7.3.102/src/undo.c 2010-12-17 18:06:00.000000000 +0100 +--- src/undo.c 2011-01-22 00:03:58.000000000 +0100 +*************** +*** 3304,3310 **** + #ifdef FEAT_QUICKFIX + !bt_dontwrite(buf) && + #endif +! (buf->b_changed || file_ff_differs(buf)); + } + + int +--- 3304,3310 ---- + #ifdef FEAT_QUICKFIX + !bt_dontwrite(buf) && + #endif +! (buf->b_changed || file_ff_differs(buf, TRUE)); + } + + int +*************** +*** 3314,3320 **** + #ifdef FEAT_QUICKFIX + !bt_dontwrite(curbuf) && + #endif +! (curbuf->b_changed || file_ff_differs(curbuf)); + } + + #if defined(FEAT_EVAL) || defined(PROTO) +--- 3314,3320 ---- + #ifdef FEAT_QUICKFIX + !bt_dontwrite(curbuf) && + #endif +! (curbuf->b_changed || file_ff_differs(curbuf, TRUE)); + } + + #if defined(FEAT_EVAL) || defined(PROTO) +*** ../vim-7.3.102/src/version.c 2011-01-17 20:08:03.000000000 +0100 +--- src/version.c 2011-01-22 00:07:56.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 103, + /**/ + +-- +In a world without fences, who needs Gates and Windows? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From c57805d002a7b5489d7054e6125e98ccf388dfc0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 24 Jan 2011 12:14:40 +0100 Subject: [PATCH 0117/3803] - patchlevel 104 --- 7.3.104 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 7.3.104 diff --git a/7.3.104 b/7.3.104 new file mode 100644 index 00000000..1e719bd7 --- /dev/null +++ b/7.3.104 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.104 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Problem: Conceal: using Tab for cchar causes problems. (ZyX) +Solution: Do not accept a control character for cchar. +Files: src/syntax.c + + +*** ../vim-7.3.103/src/syntax.c 2010-09-29 18:32:47.000000000 +0200 +--- src/syntax.c 2011-01-22 00:50:20.000000000 +0100 +*************** +*** 4537,4542 **** +--- 4537,4549 ---- + ; + #endif + } ++ #ifdef FEAT_CONCEAL ++ if (!vim_isprintc_strict(*conceal_char)) ++ { ++ EMSG(_("E844: invalid cchar value")); ++ return NULL; ++ } ++ #endif + arg = skipwhite(arg + 7); + } + else +*** ../vim-7.3.103/src/version.c 2011-01-22 00:11:42.000000000 +0100 +--- src/version.c 2011-01-22 00:54:56.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 104, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +132. You come back and check this list every half-hour. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 88878d0141d46290d8747e4f4320efbb4c320f9f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 24 Jan 2011 12:14:41 +0100 Subject: [PATCH 0118/3803] - patchlevel 105 --- 7.3.105 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 7.3.105 diff --git a/7.3.105 b/7.3.105 new file mode 100644 index 00000000..abf69ac5 --- /dev/null +++ b/7.3.105 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.105 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.105 +Problem: Can't get the value of "b:changedtick" with getbufvar(). +Solution: Make it work. (Christian Brabandt) +Files: src/eval.c + + +*** ../vim-7.3.104/src/eval.c 2011-01-17 20:08:03.000000000 +0100 +--- src/eval.c 2011-01-22 01:10:42.000000000 +0100 +*************** +*** 10866,10871 **** +--- 10866,10876 ---- + + if (*varname == '&') /* buffer-local-option */ + get_option_tv(&varname, rettv, TRUE); ++ else if (STRCMP(varname, "changedtick") == 0) ++ { ++ rettv->v_type = VAR_NUMBER; ++ rettv->vval.v_number = curbuf->b_changedtick; ++ } + else + { + if (*varname == NUL) +*** ../vim-7.3.104/src/version.c 2011-01-22 00:58:15.000000000 +0100 +--- src/version.c 2011-01-22 01:13:19.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 105, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +133. You communicate with people on other continents more than you + do with your own neighbors. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f5824df7aafbc39d1b8c1ef76bdf7022bf83adab Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 24 Jan 2011 12:14:41 +0100 Subject: [PATCH 0119/3803] - patchlevel 106 --- 7.3.106 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.106 diff --git a/7.3.106 b/7.3.106 new file mode 100644 index 00000000..f98df307 --- /dev/null +++ b/7.3.106 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.106 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.106 +Problem: When 'cursorbind' is set another window may scroll unexpectedly + when 'scrollbind' is also set. (Xavier Wang) +Solution: Don't call update_topline() if 'scrollbind' is set. +Files: src/move.c + + +*** ../vim-7.3.105/src/move.c 2010-08-15 21:57:29.000000000 +0200 +--- src/move.c 2011-01-22 20:58:50.000000000 +0100 +*************** +*** 2882,2890 **** + if (has_mbyte) + mb_adjust_cursor(); + # endif +- + redraw_later(VALID); +! update_topline(); + # ifdef FEAT_WINDOWS + curwin->w_redr_status = TRUE; + # endif +--- 2882,2892 ---- + if (has_mbyte) + mb_adjust_cursor(); + # endif + redraw_later(VALID); +! +! /* Only scroll when 'scrollbind' hasn't done this. */ +! if (!curwin->w_p_scb) +! update_topline(); + # ifdef FEAT_WINDOWS + curwin->w_redr_status = TRUE; + # endif +*** ../vim-7.3.105/src/version.c 2011-01-22 01:13:33.000000000 +0100 +--- src/version.c 2011-01-22 21:03:21.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 106, + /**/ + +-- +Never eat yellow snow. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 1f4116fbf7d4728040f46d12c6efc9cd4bdafcde Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 24 Jan 2011 12:15:06 +0100 Subject: [PATCH 0120/3803] - patchlevel 107 --- 7.3.107 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.107 diff --git a/7.3.107 b/7.3.107 new file mode 100644 index 00000000..1256b817 --- /dev/null +++ b/7.3.107 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.107 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.107 +Problem: Year number for :undolist can be confused with month or day. +Solution: Change "%y" to "%Y". +Files: src/undo.c + + +*** ../vim-7.3.106/src/undo.c 2011-01-22 00:11:42.000000000 +0100 +--- src/undo.c 2011-01-22 00:03:58.000000000 +0100 +*************** +*** 2884,2890 **** + (void)strftime((char *)buf, buflen, "%m/%d %H:%M:%S", curtime); + else + /* long ago */ +! (void)strftime((char *)buf, buflen, "%y/%m/%d %H:%M:%S", curtime); + } + else + #endif +--- 2884,2890 ---- + (void)strftime((char *)buf, buflen, "%m/%d %H:%M:%S", curtime); + else + /* long ago */ +! (void)strftime((char *)buf, buflen, "%Y/%m/%d %H:%M:%S", curtime); + } + else + #endif +*** ../vim-7.3.106/src/version.c 2011-01-22 21:05:02.000000000 +0100 +--- src/version.c 2011-01-22 21:24:07.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 107, + /**/ + +-- +"The sun oozed over the horizon, shoved aside darkness, crept along the +greensward, and, with sickly fingers, pushed through the castle window, +revealing the pillaged princess, hand at throat, crown asunder, gaping +in frenzied horror at the sated, sodden amphibian lying beside her, +disbelieving the magnitude of the frog's deception, screaming madly, +"You lied!" + - Winner of the Bulwer-Lytton contest (San Jose State University), + wherein one writes only the first line of a bad novel + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9f9d9e3e1182f613d649d426a078ab57fd9a537a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 24 Jan 2011 12:15:07 +0100 Subject: [PATCH 0121/3803] - patchlevel 107 --- README.patches | 8 +++++ vim.spec | 91 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 98 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index 3f08da94..57760ac6 100644 --- a/README.patches +++ b/README.patches @@ -125,3 +125,11 @@ Individual patches for Vim 7.3: 1760 7.3.097 ":call" inside "if 0" gives error for dict function 1712 7.3.098 ignored error may still cause status line to be disabled 1628 7.3.099 crash when splitting a window with zero height + 1497 7.3.100 when using ":normal" v:count isn't set + 2449 7.3.101 ino_t defined with wrong size in Ruby and Lua interfaces + 23045 7.3.102 Ex command typed at reload prompt is ignored + 4500 7.3.103 changing 'ff', then using ":w" in empty file sets 'mod' + 1428 7.3.104 conceal: using Tab for cchar causes problems + 1539 7.3.105 can't get the value of "b:changedtick" with getbufvar() + 1650 7.3.106 other window scrolls if both 'scrollbind' and 'cursorbind' set + 1986 7.3.107 year in :undolist can be confusing diff --git a/vim.spec b/vim.spec index a6c28ec4..500ef816 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 099 +%define patchlevel 107 Summary: The VIM editor URL: http://www.vim.org/ @@ -163,6 +163,49 @@ Patch096: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.096 Patch097: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.097 Patch098: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.098 Patch099: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.099 +Patch100: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.100 +Patch101: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.101 +Patch102: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.102 +Patch103: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.103 +Patch104: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.104 +Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 +Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 +Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 +Patch100: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.100 +Patch101: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.101 +Patch102: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.102 +Patch103: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.103 +Patch104: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.104 +Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 +Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 +Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 +Patch101: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.101 +Patch102: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.102 +Patch103: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.103 +Patch104: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.104 +Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 +Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 +Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 +Patch102: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.102 +Patch103: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.103 +Patch104: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.104 +Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 +Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 +Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 +Patch103: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.103 +Patch104: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.104 +Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 +Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 +Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 +Patch104: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.104 +Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 +Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 +Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 +Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 +Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 +Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 +Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 +Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -406,6 +449,49 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch097 -p0 %patch098 -p0 %patch099 -p0 +%patch100 -p0 +%patch101 -p0 +%patch102 -p0 +%patch103 -p0 +%patch104 -p0 +%patch105 -p0 +%patch106 -p0 +%patch107 -p0 +%patch100 -p0 +%patch101 -p0 +%patch102 -p0 +%patch103 -p0 +%patch104 -p0 +%patch105 -p0 +%patch106 -p0 +%patch107 -p0 +%patch101 -p0 +%patch102 -p0 +%patch103 -p0 +%patch104 -p0 +%patch105 -p0 +%patch106 -p0 +%patch107 -p0 +%patch102 -p0 +%patch103 -p0 +%patch104 -p0 +%patch105 -p0 +%patch106 -p0 +%patch107 -p0 +%patch103 -p0 +%patch104 -p0 +%patch105 -p0 +%patch106 -p0 +%patch107 -p0 +%patch104 -p0 +%patch105 -p0 +%patch106 -p0 +%patch107 -p0 +%patch105 -p0 +%patch106 -p0 +%patch107 -p0 +%patch106 -p0 +%patch107 -p0 # install spell files @@ -873,6 +959,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Mon Jan 24 2011 Karsten Hopp 7.3.107-1 +- patchlevel 107 + * Mon Jan 10 2011 Karsten Hopp 7.3.099-1 - patchlevel 099 From 3fd46d4d45249dd56c68752589aaf79bba6850d7 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 24 Jan 2011 12:16:51 +0100 Subject: [PATCH 0122/3803] remove duplicate patches --- vim.spec | 70 -------------------------------------------------------- 1 file changed, 70 deletions(-) diff --git a/vim.spec b/vim.spec index 500ef816..eceebb23 100644 --- a/vim.spec +++ b/vim.spec @@ -171,41 +171,6 @@ Patch104: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.104 Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 -Patch100: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.100 -Patch101: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.101 -Patch102: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.102 -Patch103: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.103 -Patch104: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.104 -Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 -Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 -Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 -Patch101: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.101 -Patch102: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.102 -Patch103: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.103 -Patch104: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.104 -Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 -Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 -Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 -Patch102: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.102 -Patch103: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.103 -Patch104: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.104 -Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 -Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 -Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 -Patch103: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.103 -Patch104: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.104 -Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 -Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 -Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 -Patch104: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.104 -Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 -Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 -Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 -Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 -Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 -Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 -Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 -Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -457,41 +422,6 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch105 -p0 %patch106 -p0 %patch107 -p0 -%patch100 -p0 -%patch101 -p0 -%patch102 -p0 -%patch103 -p0 -%patch104 -p0 -%patch105 -p0 -%patch106 -p0 -%patch107 -p0 -%patch101 -p0 -%patch102 -p0 -%patch103 -p0 -%patch104 -p0 -%patch105 -p0 -%patch106 -p0 -%patch107 -p0 -%patch102 -p0 -%patch103 -p0 -%patch104 -p0 -%patch105 -p0 -%patch106 -p0 -%patch107 -p0 -%patch103 -p0 -%patch104 -p0 -%patch105 -p0 -%patch106 -p0 -%patch107 -p0 -%patch104 -p0 -%patch105 -p0 -%patch106 -p0 -%patch107 -p0 -%patch105 -p0 -%patch106 -p0 -%patch107 -p0 -%patch106 -p0 -%patch107 -p0 # install spell files From 3aefb23b0467bea6b6d6204a0400b470ebc5af81 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 7 Feb 2011 19:32:22 -0600 Subject: [PATCH 0123/3803] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- vim.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vim.spec b/vim.spec index eceebb23..d8ea8136 100644 --- a/vim.spec +++ b/vim.spec @@ -24,7 +24,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{beta}%{patchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Vim Group: Applications/Editors Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}%{?beta}%{?CVSDATE}.tar.bz2 @@ -889,6 +889,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Mon Feb 07 2011 Fedora Release Engineering - 2:7.3.107-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Mon Jan 24 2011 Karsten Hopp 7.3.107-1 - patchlevel 107 From ebfbc4549dbab9be4a8e4041ce47604582af5ed9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:02 +0100 Subject: [PATCH 0124/3803] - patchlevel 108 --- 7.3.108 | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 7.3.108 diff --git a/7.3.108 b/7.3.108 new file mode 100644 index 00000000..91f3ceb9 --- /dev/null +++ b/7.3.108 @@ -0,0 +1,111 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.108 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.108 +Problem: Useless check for NULL when calling vim_free(). +Solution: Remove the check. (Dominique Pelle) +Files: src/eval.c, src/ex_cmds.c, src/os_win32.c + + +*** ../vim-7.3.107/src/eval.c 2011-01-22 01:13:33.000000000 +0100 +--- src/eval.c 2011-01-30 21:37:53.000000000 +0100 +*************** +*** 5106,5114 **** + else + ret = OK; + } +! +! if (alias != NULL) +! vim_free(alias); + } + + *arg = skipwhite(*arg); +--- 5106,5112 ---- + else + ret = OK; + } +! vim_free(alias); + } + + *arg = skipwhite(*arg); +*************** +*** 19807,19813 **** + EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name); + return; + } +! /* Don't allow hiding a function. When "v" is not NULL we migth be + * assigning another function to the same var, the type is checked + * below. */ + if (v == NULL && function_exists(name)) +--- 19805,19811 ---- + EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name); + return; + } +! /* Don't allow hiding a function. When "v" is not NULL we might be + * assigning another function to the same var, the type is checked + * below. */ + if (v == NULL && function_exists(name)) +*** ../vim-7.3.107/src/ex_cmds.c 2010-12-17 18:06:00.000000000 +0100 +--- src/ex_cmds.c 2011-01-30 21:37:53.000000000 +0100 +*************** +*** 5412,5418 **** + vir_T *virp; + int force; + { +! if (old_sub != NULL && force) + vim_free(old_sub); + if (force || old_sub == NULL) + old_sub = viminfo_readstring(virp, 1, TRUE); +--- 5412,5418 ---- + vir_T *virp; + int force; + { +! if (force) + vim_free(old_sub); + if (force || old_sub == NULL) + old_sub = viminfo_readstring(virp, 1, TRUE); +*** ../vim-7.3.107/src/os_win32.c 2010-12-17 20:23:56.000000000 +0100 +--- src/os_win32.c 2011-01-30 21:37:53.000000000 +0100 +*************** +*** 1886,1893 **** + cb->BufferSize.X = cb->Info.dwSize.X; + cb->BufferSize.Y = cb->Info.dwSize.Y; + NumCells = cb->BufferSize.X * cb->BufferSize.Y; +! if (cb->Buffer != NULL) +! vim_free(cb->Buffer); + cb->Buffer = (PCHAR_INFO)alloc(NumCells * sizeof(CHAR_INFO)); + if (cb->Buffer == NULL) + return FALSE; +--- 1886,1892 ---- + cb->BufferSize.X = cb->Info.dwSize.X; + cb->BufferSize.Y = cb->Info.dwSize.Y; + NumCells = cb->BufferSize.X * cb->BufferSize.Y; +! vim_free(cb->Buffer); + cb->Buffer = (PCHAR_INFO)alloc(NumCells * sizeof(CHAR_INFO)); + if (cb->Buffer == NULL) + return FALSE; +*** ../vim-7.3.107/src/version.c 2011-01-22 21:25:07.000000000 +0100 +--- src/version.c 2011-02-01 13:47:07.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 108, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +173. You keep tracking down the email addresses of all your friends + (even childhood friends). + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 1b117f15d1eb84bcd574f355bdceadda2538a597 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:03 +0100 Subject: [PATCH 0125/3803] - patchlevel 109 --- 7.3.109 | 266 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 7.3.109 diff --git a/7.3.109 b/7.3.109 new file mode 100644 index 00000000..ce35fb0a --- /dev/null +++ b/7.3.109 @@ -0,0 +1,266 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.109 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.109 +Problem: Processing new Esperanto spell file fails and crashes Vim. + (Dominique Pelle) +Solution: When running out of memory give an error. Handle '?' in + COMPOUNDRULE properly. +Files: src/spell.c + + +*** ../vim-7.3.108/src/spell.c 2010-12-17 18:06:00.000000000 +0100 +--- src/spell.c 2011-02-01 13:43:52.000000000 +0100 +*************** +*** 3634,3640 **** + } + + /* Add all flags to "sl_compallflags". */ +! if (vim_strchr((char_u *)"+*[]/", c) == NULL + && !byte_in_str(slang->sl_compallflags, c)) + { + *ap++ = c; +--- 3634,3640 ---- + } + + /* Add all flags to "sl_compallflags". */ +! if (vim_strchr((char_u *)"?*+[]/", c) == NULL + && !byte_in_str(slang->sl_compallflags, c)) + { + *ap++ = c; +*************** +*** 3664,3670 **** + /* Copy flag to "sl_comprules", unless we run into a wildcard. */ + if (crp != NULL) + { +! if (c == '+' || c == '*') + { + vim_free(slang->sl_comprules); + slang->sl_comprules = NULL; +--- 3664,3670 ---- + /* Copy flag to "sl_comprules", unless we run into a wildcard. */ + if (crp != NULL) + { +! if (c == '?' || c == '+' || c == '*') + { + vim_free(slang->sl_comprules); + slang->sl_comprules = NULL; +*************** +*** 3682,3689 **** + } + else /* normal char, "[abc]" and '*' are copied as-is */ + { +! if (c == '+' || c == '~') +! *pp++ = '\\'; /* "a+" becomes "a\+" */ + #ifdef FEAT_MBYTE + if (enc_utf8) + pp += mb_char2bytes(c, pp); +--- 3682,3689 ---- + } + else /* normal char, "[abc]" and '*' are copied as-is */ + { +! if (c == '?' || c == '+' || c == '~') +! *pp++ = '\\'; /* "a?" becomes "a\?", "a+" becomes "a\+" */ + #ifdef FEAT_MBYTE + if (enc_utf8) + pp += mb_char2bytes(c, pp); +*************** +*** 4951,4956 **** +--- 4951,4958 ---- + + sblock_T *si_blocks; /* memory blocks used */ + long si_blocks_cnt; /* memory blocks allocated */ ++ int si_did_emsg; /* TRUE when ran out of memory */ ++ + long si_compress_cnt; /* words to add before lowering + compression limit */ + wordnode_T *si_first_free; /* List of nodes that have been freed during +*************** +*** 5477,5497 **** + } + else if (is_aff_rule(items, itemcnt, "COMPOUNDRULE", 2)) + { +! /* Concatenate this string to previously defined ones, using a +! * slash to separate them. */ +! l = (int)STRLEN(items[1]) + 1; +! if (compflags != NULL) +! l += (int)STRLEN(compflags) + 1; +! p = getroom(spin, l, FALSE); +! if (p != NULL) + { + if (compflags != NULL) + { +! STRCPY(p, compflags); +! STRCAT(p, "/"); + } +- STRCAT(p, items[1]); +- compflags = p; + } + } + else if (is_aff_rule(items, itemcnt, "COMPOUNDWORDMAX", 2) +--- 5479,5503 ---- + } + else if (is_aff_rule(items, itemcnt, "COMPOUNDRULE", 2)) + { +! /* Don't use the first rule if it is a number. */ +! if (compflags != NULL || *skipdigits(items[1]) != NUL) + { ++ /* Concatenate this string to previously defined ones, ++ * using a slash to separate them. */ ++ l = (int)STRLEN(items[1]) + 1; + if (compflags != NULL) ++ l += (int)STRLEN(compflags) + 1; ++ p = getroom(spin, l, FALSE); ++ if (p != NULL) + { +! if (compflags != NULL) +! { +! STRCPY(p, compflags); +! STRCAT(p, "/"); +! } +! STRCAT(p, items[1]); +! compflags = p; + } + } + } + else if (is_aff_rule(items, itemcnt, "COMPOUNDWORDMAX", 2) +*************** +*** 6291,6297 **** + + for (p = compflags; *p != NUL; ) + { +! if (vim_strchr((char_u *)"/*+[]", *p) != NULL) + /* Copy non-flag characters directly. */ + *tp++ = *p++; + else +--- 6297,6303 ---- + + for (p = compflags; *p != NUL; ) + { +! if (vim_strchr((char_u *)"/?*+[]", *p) != NULL) + /* Copy non-flag characters directly. */ + *tp++ = *p++; + else +*************** +*** 6320,6326 **** + { + check_renumber(spin); + id = spin->si_newcompID--; +! } while (vim_strchr((char_u *)"/+*[]\\-^", id) != NULL); + ci->ci_newID = id; + hash_add(&aff->af_comp, ci->ci_key); + } +--- 6326,6332 ---- + { + check_renumber(spin); + id = spin->si_newcompID--; +! } while (vim_strchr((char_u *)"/?*+[]\\-^", id) != NULL); + ci->ci_newID = id; + hash_add(&aff->af_comp, ci->ci_key); + } +*************** +*** 7364,7373 **** + + if (bl == NULL || bl->sb_used + len > SBLOCKSIZE) + { +! /* Allocate a block of memory. This is not freed until much later. */ +! bl = (sblock_T *)alloc_clear((unsigned)(sizeof(sblock_T) + SBLOCKSIZE)); + if (bl == NULL) + return NULL; + bl->sb_next = spin->si_blocks; + spin->si_blocks = bl; + bl->sb_used = 0; +--- 7370,7390 ---- + + if (bl == NULL || bl->sb_used + len > SBLOCKSIZE) + { +! if (len >= SBLOCKSIZE) +! bl = NULL; +! else +! /* Allocate a block of memory. It is not freed until much later. */ +! bl = (sblock_T *)alloc_clear( +! (unsigned)(sizeof(sblock_T) + SBLOCKSIZE)); + if (bl == NULL) ++ { ++ if (!spin->si_did_emsg) ++ { ++ EMSG(_("E845: Insufficient memory, word list will be incomplete")); ++ spin->si_did_emsg = TRUE; ++ } + return NULL; ++ } + bl->sb_next = spin->si_blocks; + spin->si_blocks = bl; + bl->sb_used = 0; +*************** +*** 7382,7387 **** +--- 7399,7405 ---- + + /* + * Make a copy of a string into memory allocated with getroom(). ++ * Returns NULL when out of memory. + */ + static char_u * + getroom_save(spin, s) +*************** +*** 7416,7421 **** +--- 7434,7440 ---- + + /* + * Allocate the root of a word tree. ++ * Returns NULL when out of memory. + */ + static wordnode_T * + wordtree_alloc(spin) +*************** +*** 7700,7705 **** +--- 7719,7725 ---- + /* + * Get a wordnode_T, either from the list of previously freed nodes or + * allocate a new one. ++ * Returns NULL when out of memory. + */ + static wordnode_T * + get_wordnode(spin) +*************** +*** 7717,7723 **** + --spin->si_free_count; + } + #ifdef SPELL_PRINTTREE +! n->wn_nr = ++spin->si_wordnode_nr; + #endif + return n; + } +--- 7737,7744 ---- + --spin->si_free_count; + } + #ifdef SPELL_PRINTTREE +! if (n != NULL) +! n->wn_nr = ++spin->si_wordnode_nr; + #endif + return n; + } +*** ../vim-7.3.108/src/version.c 2011-02-01 13:48:47.000000000 +0100 +--- src/version.c 2011-02-01 13:56:38.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 109, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +174. You know what a listserv is. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 8ecbfad3c91d84cb7a584b4feb3d33f36076db5a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:03 +0100 Subject: [PATCH 0126/3803] - patchlevel 110 --- 7.3.110 | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 7.3.110 diff --git a/7.3.110 b/7.3.110 new file mode 100644 index 00000000..3ffc7f2c --- /dev/null +++ b/7.3.110 @@ -0,0 +1,76 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.110 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.110 +Problem: The "nbsp" item in 'listchars' isn't used for ":list". +Solution: Make it work. (Christian Brabandt) +Files: src/message.c + + +*** ../vim-7.3.109/src/message.c 2011-01-17 20:08:03.000000000 +0100 +--- src/message.c 2011-02-01 17:06:21.000000000 +0100 +*************** +*** 1637,1644 **** + else if (has_mbyte && (l = (*mb_ptr2len)(s)) > 1) + { + col += (*mb_ptr2cells)(s); +! mch_memmove(buf, s, (size_t)l); +! buf[l] = NUL; + msg_puts(buf); + s += l; + continue; +--- 1637,1652 ---- + else if (has_mbyte && (l = (*mb_ptr2len)(s)) > 1) + { + col += (*mb_ptr2cells)(s); +! if (lcs_nbsp != NUL && list && mb_ptr2char(s) == 160) +! { +! mb_char2bytes(lcs_nbsp, buf); +! buf[(*mb_ptr2len)(buf)] = NUL; +! } +! else +! { +! mch_memmove(buf, s, (size_t)l); +! buf[l] = NUL; +! } + msg_puts(buf); + s += l; + continue; +*************** +*** 1664,1669 **** +--- 1672,1682 ---- + attr = hl_attr(HLF_8); + } + } ++ else if (c == 160 && list && lcs_nbsp != NUL) ++ { ++ c = lcs_nbsp; ++ attr = hl_attr(HLF_8); ++ } + else if (c == NUL && list && lcs_eol != NUL) + { + p_extra = (char_u *)""; +*** ../vim-7.3.109/src/version.c 2011-02-01 13:59:44.000000000 +0100 +--- src/version.c 2011-02-01 17:08:31.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 110, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +176. You lie, even to user-friends, about how long you were online yesterday. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 3523c3acca06a51e57ea639d5ad5b00404116d29 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:04 +0100 Subject: [PATCH 0127/3803] - patchlevel 111 --- 7.3.111 | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 7.3.111 diff --git a/7.3.111 b/7.3.111 new file mode 100644 index 00000000..e3cf717c --- /dev/null +++ b/7.3.111 @@ -0,0 +1,121 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.111 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.111 (after 7.3.100) +Problem: Executing a :normal command in 'statusline' evaluation causes the + cursor to move. (Dominique Pelle) +Solution: When updating the cursor for 'cursorbind' allow the cursor beyond + the end of the line. When evaluating 'statusline' temporarily + reset 'cursorbind'. +Files: src/move.c, src/screen.c + + +*** ../vim-7.3.110/src/move.c 2011-01-22 21:05:02.000000000 +0100 +--- src/move.c 2011-02-01 17:36:10.000000000 +0100 +*************** +*** 2846,2851 **** +--- 2846,2852 ---- + colnr_T col = curwin->w_cursor.col; + win_T *old_curwin = curwin; + buf_T *old_curbuf = curbuf; ++ int restart_edit_save; + # ifdef FEAT_VISUAL + int old_VIsual_select = VIsual_select; + int old_VIsual_active = VIsual_active; +*************** +*** 2875,2882 **** + curwin->w_cursor.lnum = line; + curwin->w_cursor.col = col; + +! /* Make sure the cursor is in a valid position. */ + check_cursor(); + # ifdef FEAT_MBYTE + /* Correct cursor for multi-byte character. */ + if (has_mbyte) +--- 2876,2887 ---- + curwin->w_cursor.lnum = line; + curwin->w_cursor.col = col; + +! /* Make sure the cursor is in a valid position. Temporarily set +! * "restart_edit" to allow the cursor to be beyond the EOL. */ +! restart_edit_save = restart_edit; +! restart_edit = TRUE; + check_cursor(); ++ restart_edit = restart_edit_save; + # ifdef FEAT_MBYTE + /* Correct cursor for multi-byte character. */ + if (has_mbyte) +*** ../vim-7.3.110/src/screen.c 2010-12-30 14:57:03.000000000 +0100 +--- src/screen.c 2011-02-01 17:45:45.000000000 +0100 +*************** +*** 6435,6440 **** +--- 6435,6442 ---- + struct stl_hlrec hltab[STL_MAX_ITEM]; + struct stl_hlrec tabtab[STL_MAX_ITEM]; + int use_sandbox = FALSE; ++ win_T *ewp; ++ int p_crb_save; + + /* setup environment for the task at hand */ + if (wp == NULL) +*************** +*** 6513,6526 **** + if (maxwidth <= 0) + return; + + /* Make a copy, because the statusline may include a function call that + * might change the option value and free the memory. */ + stl = vim_strsave(stl); +! width = build_stl_str_hl(wp == NULL ? curwin : wp, +! buf, sizeof(buf), + stl, use_sandbox, + fillchar, maxwidth, hltab, tabtab); + vim_free(stl); + + /* Make all characters printable. */ + p = transstr(buf); +--- 6515,6534 ---- + if (maxwidth <= 0) + return; + ++ /* Temporarily reset 'cursorbind', we don't want a side effect from moving ++ * the cursor away and back. */ ++ ewp = wp == NULL ? curwin : wp; ++ p_crb_save = ewp->w_p_crb; ++ ewp->w_p_crb = FALSE; ++ + /* Make a copy, because the statusline may include a function call that + * might change the option value and free the memory. */ + stl = vim_strsave(stl); +! width = build_stl_str_hl(ewp, buf, sizeof(buf), + stl, use_sandbox, + fillchar, maxwidth, hltab, tabtab); + vim_free(stl); ++ ewp->w_p_crb = p_crb_save; + + /* Make all characters printable. */ + p = transstr(buf); +*** ../vim-7.3.110/src/version.c 2011-02-01 17:12:20.000000000 +0100 +--- src/version.c 2011-02-01 18:00:14.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 111, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +177. You log off of your system because it's time to go to work. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e99f3da30dc4cbe0770634412a4ae55123c8c6fc Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:04 +0100 Subject: [PATCH 0128/3803] - patchlevel 112 --- 7.3.112 | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 7.3.112 diff --git a/7.3.112 b/7.3.112 new file mode 100644 index 00000000..af9b8818 --- /dev/null +++ b/7.3.112 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.112 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.112 +Problem: Setting 'statusline' to "%!'asdf%' reads uninitialized memory. +Solution: Check for NUL after %. +Files: src/buffer.c + + +*** ../vim-7.3.111/src/buffer.c 2010-10-27 16:17:56.000000000 +0200 +--- src/buffer.c 2011-02-01 21:40:17.000000000 +0100 +*************** +*** 3364,3370 **** + * or truncated if too long, fillchar is used for all whitespace. + */ + int +! build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar, maxwidth, hltab, tabtab) + win_T *wp; + char_u *out; /* buffer to write into != NameBuff */ + size_t outlen; /* length of out[] */ +--- 3364,3371 ---- + * or truncated if too long, fillchar is used for all whitespace. + */ + int +! build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar, +! maxwidth, hltab, tabtab) + win_T *wp; + char_u *out; /* buffer to write into != NameBuff */ + size_t outlen; /* length of out[] */ +*************** +*** 3474,3479 **** +--- 3475,3482 ---- + * Handle one '%' item. + */ + s++; ++ if (*s == NUL) /* ignore trailing % */ ++ break; + if (*s == '%') + { + if (p + 1 >= out + outlen) +*** ../vim-7.3.111/src/version.c 2011-02-01 18:01:06.000000000 +0100 +--- src/version.c 2011-02-01 21:54:01.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 112, + /**/ + +-- +Rule #1: Don't give somebody a tool that he's going to hurt himself with. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 38b3668a7cb4630d4025b8b6f1885a03b8e904e9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:04 +0100 Subject: [PATCH 0129/3803] - patchlevel 113 --- 7.3.113 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 7.3.113 diff --git a/7.3.113 b/7.3.113 new file mode 100644 index 00000000..a4383ad9 --- /dev/null +++ b/7.3.113 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.113 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.113 +Problem: Windows: Fall back directory for creating temp file is wrong. +Solution: Use "." instead of empty string. (Hong Xu) +Files: src/fileio.c + + +*** ../vim-7.3.112/src/fileio.c 2011-01-17 20:08:03.000000000 +0100 +--- src/fileio.c 2011-02-06 13:14:25.000000000 +0100 +*************** +*** 7459,7465 **** + + STRCPY(itmp, ""); + if (GetTempPath(_MAX_PATH, szTempFile) == 0) +! szTempFile[0] = NUL; /* GetTempPath() failed, use current dir */ + strcpy(buf4, "VIM"); + buf4[2] = extra_char; /* make it "VIa", "VIb", etc. */ + if (GetTempFileName(szTempFile, buf4, 0, itmp) == 0) +--- 7459,7468 ---- + + STRCPY(itmp, ""); + if (GetTempPath(_MAX_PATH, szTempFile) == 0) +! { +! szTempFile[0] = '.'; /* GetTempPath() failed, use current dir */ +! szTempFile[1] = NUL; +! } + strcpy(buf4, "VIM"); + buf4[2] = extra_char; /* make it "VIa", "VIb", etc. */ + if (GetTempFileName(szTempFile, buf4, 0, itmp) == 0) +*** ../vim-7.3.112/src/version.c 2011-02-01 21:54:56.000000000 +0100 +--- src/version.c 2011-02-09 14:46:12.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 113, + /**/ + +-- +'Psychologist' -- Someone who looks at everyone else when +an attractive woman enters the room. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 6ea666c137278117a0b94e139f894050784bb188 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:05 +0100 Subject: [PATCH 0130/3803] - patchlevel 114 --- 7.3.114 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 7.3.114 diff --git a/7.3.114 b/7.3.114 new file mode 100644 index 00000000..34bdd364 --- /dev/null +++ b/7.3.114 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.114 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.114 +Problem: Potential problem in initialization when giving an error message + early. +Solution: Initialize 'verbosefile' empty. (Ben Schmidt) +Files: src/option.h + + +*** ../vim-7.3.113/src/option.h 2010-12-02 16:01:23.000000000 +0100 +--- src/option.h 2011-02-09 15:37:36.000000000 +0100 +*************** +*** 854,860 **** +--- 854,864 ---- + # define VE_ONEMORE 8 + #endif + EXTERN long p_verbose; /* 'verbose' */ ++ #ifdef IN_OPTION_C ++ char_u *p_vfile = (char_u *)""; /* used before options are initialized */ ++ #else + EXTERN char_u *p_vfile; /* 'verbosefile' */ ++ #endif + EXTERN int p_warn; /* 'warn' */ + #ifdef FEAT_CMDL_COMPL + EXTERN char_u *p_wop; /* 'wildoptions' */ +*** ../vim-7.3.113/src/version.c 2011-02-09 14:46:58.000000000 +0100 +--- src/version.c 2011-02-09 15:46:17.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 114, + /**/ + +-- +From the classified section of a city newspaper: +Dog for sale: eats anything and is fond of children. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5de7dbd85028f0d88eb031971af9d24d57de04b3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:05 +0100 Subject: [PATCH 0131/3803] - patchlevel 115 --- 7.3.115 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.115 diff --git a/7.3.115 b/7.3.115 new file mode 100644 index 00000000..dd36df30 --- /dev/null +++ b/7.3.115 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.115 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.115 +Problem: Vim can crash when tmpnam() returns NULL. +Solution: Check for NULL. (Hong Xu) +Files: src/fileio.c + + +*** ../vim-7.3.114/src/fileio.c 2011-02-09 14:46:58.000000000 +0100 +--- src/fileio.c 2011-02-09 16:14:35.000000000 +0100 +*************** +*** 7483,7490 **** + # else /* WIN3264 */ + + # ifdef USE_TMPNAM + /* tmpnam() will make its own name */ +! if (*tmpnam((char *)itmp) == NUL) + return NULL; + # else + char_u *p; +--- 7483,7493 ---- + # else /* WIN3264 */ + + # ifdef USE_TMPNAM ++ char_u *p; ++ + /* tmpnam() will make its own name */ +! p = tmpnam((char *)itmp); +! if (p == NULL || *p == NUL) + return NULL; + # else + char_u *p; +*** ../vim-7.3.114/src/version.c 2011-02-09 15:59:32.000000000 +0100 +--- src/version.c 2011-02-09 16:44:11.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 115, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +218. Your spouse hands you a gift wrapped magnet with your PC's name + on it and you accuse him or her of genocide. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b697ed9c3cdeab05a4c575d00dbb7fd273198d51 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:05 +0100 Subject: [PATCH 0132/3803] - patchlevel 116 --- 7.3.116 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.116 diff --git a/7.3.116 b/7.3.116 new file mode 100644 index 00000000..ee9543af --- /dev/null +++ b/7.3.116 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.116 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.116 +Problem: 'cursorline' is displayed too short when there are concealed + characters and 'list' is set. (Dennis Preiser) +Solution: Check for 'cursorline' when 'list' is set. (Christian Brabandt) +Files: src/screen.c + + +*** ../vim-7.3.115/src/screen.c 2011-02-01 18:01:06.000000000 +0100 +--- src/screen.c 2011-02-09 16:59:28.000000000 +0100 +*************** +*** 5099,5105 **** + #ifdef FEAT_DIFF + || filler_todo > 0 + #endif +! || (wp->w_p_list && lcs_eol != NUL && p_extra != at_end_str) + || (n_extra != 0 && (c_extra != NUL || *p_extra != NUL))) + ) + { +--- 5099,5109 ---- + #ifdef FEAT_DIFF + || filler_todo > 0 + #endif +! || (wp->w_p_list && lcs_eol != NUL && p_extra != at_end_str +! #ifdef FEAT_SYN_HL +! && !wp->w_p_cul +! #endif +! ) + || (n_extra != 0 && (c_extra != NUL || *p_extra != NUL))) + ) + { +*** ../vim-7.3.115/src/version.c 2011-02-09 16:44:45.000000000 +0100 +--- src/version.c 2011-02-09 17:08:58.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 116, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +219. Your spouse has his or her lawyer deliver the divorce papers... + via e-mail. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 85ff02c1fa431f923ead8d582c97b03e47c9a643 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:06 +0100 Subject: [PATCH 0133/3803] - patchlevel 117 --- 7.3.117 | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 7.3.117 diff --git a/7.3.117 b/7.3.117 new file mode 100644 index 00000000..19fcf739 --- /dev/null +++ b/7.3.117 @@ -0,0 +1,89 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.117 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.117 +Problem: On some systems --as-needed does not work, because the "tinfo" + library is included indirectly from "ncurses". (Charles Campbell) +Solution: In configure prefer using "tinfo" instead of "ncurses". +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.3.116/src/configure.in 2010-11-16 19:25:56.000000000 +0100 +--- src/configure.in 2011-02-09 17:28:16.000000000 +0100 +*************** +*** 2618,2630 **** + AC_MSG_RESULT([empty: automatic terminal library selection]) + dnl On HP-UX 10.10 termcap or termlib should be used instead of + dnl curses, because curses is much slower. +! dnl Newer versions of ncurses are preferred over anything. + dnl Older versions of ncurses have bugs, get a new one! + dnl Digital Unix (OSF1) should use curses (Ronald Schild). + dnl On SCO Openserver should prefer termlib (Roger Cornelius). + case "`uname -s 2>/dev/null`" in +! OSF1|SCO_SV) tlibs="ncurses curses termlib termcap";; +! *) tlibs="ncurses termlib termcap curses";; + esac + for libname in $tlibs; do + AC_CHECK_LIB(${libname}, tgetent,,) +--- 2618,2631 ---- + AC_MSG_RESULT([empty: automatic terminal library selection]) + dnl On HP-UX 10.10 termcap or termlib should be used instead of + dnl curses, because curses is much slower. +! dnl Newer versions of ncurses are preferred over anything, except +! dnl when tinfo has been split off, it conains all we need. + dnl Older versions of ncurses have bugs, get a new one! + dnl Digital Unix (OSF1) should use curses (Ronald Schild). + dnl On SCO Openserver should prefer termlib (Roger Cornelius). + case "`uname -s 2>/dev/null`" in +! OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";; +! *) tlibs="tinfo ncurses termlib termcap curses";; + esac + for libname in $tlibs; do + AC_CHECK_LIB(${libname}, tgetent,,) +*** ../vim-7.3.116/src/auto/configure 2010-11-16 19:25:56.000000000 +0100 +--- src/auto/configure 2011-02-09 17:29:13.000000000 +0100 +*************** +*** 9886,9894 **** + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5 + $as_echo "empty: automatic terminal library selection" >&6; } +! case "`uname -s 2>/dev/null`" in +! OSF1|SCO_SV) tlibs="ncurses curses termlib termcap";; +! *) tlibs="ncurses termlib termcap curses";; + esac + for libname in $tlibs; do + as_ac_Lib=`$as_echo "ac_cv_lib_${libname}''_tgetent" | $as_tr_sh` +--- 9886,9894 ---- + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5 + $as_echo "empty: automatic terminal library selection" >&6; } +! case "`uname -s 2>/dev/null`" in +! OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";; +! *) tlibs="tinfo ncurses termlib termcap curses";; + esac + for libname in $tlibs; do + as_ac_Lib=`$as_echo "ac_cv_lib_${libname}''_tgetent" | $as_tr_sh` +*** ../vim-7.3.116/src/version.c 2011-02-09 17:09:26.000000000 +0100 +--- src/version.c 2011-02-09 17:41:37.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 117, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +220. Your wife asks for sex and you tell her where to find you on IRC. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d9418b0006586e0cba0335f6cf324c1c3cabc192 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:06 +0100 Subject: [PATCH 0134/3803] - patchlevel 118 --- 7.3.118 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 7.3.118 diff --git a/7.3.118 b/7.3.118 new file mode 100644 index 00000000..fecb948b --- /dev/null +++ b/7.3.118 @@ -0,0 +1,69 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.118 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.118 +Problem: Ruby uses SIGVTALARM which makes Vim exit. (Alec Tica) +Solution: Ignore SIGVTALARM. (Dominique Pelle) +Files: src/os_unix.c + + +*** ../vim-7.3.117/src/os_unix.c 2010-12-17 16:27:10.000000000 +0100 +--- src/os_unix.c 2011-02-09 18:19:57.000000000 +0100 +*************** +*** 283,289 **** + #ifdef SIGTERM + {SIGTERM, "TERM", TRUE}, + #endif +! #ifdef SIGVTALRM + {SIGVTALRM, "VTALRM", TRUE}, + #endif + #if defined(SIGPROF) && !defined(FEAT_MZSCHEME) && !defined(WE_ARE_PROFILING) +--- 283,289 ---- + #ifdef SIGTERM + {SIGTERM, "TERM", TRUE}, + #endif +! #if defined(SIGVTALRM) && !defined(FEAT_RUBY) + {SIGVTALRM, "VTALRM", TRUE}, + #endif + #if defined(SIGPROF) && !defined(FEAT_MZSCHEME) && !defined(WE_ARE_PROFILING) +*************** +*** 1107,1113 **** + * On Linux, signal is not always handled immediately either. + * See https://bugs.launchpad.net/bugs/291373 + * +! * volatile because it is used in in signal handler sigcont_handler(). + */ + static volatile int sigcont_received; + static RETSIGTYPE sigcont_handler __ARGS(SIGPROTOARG); +--- 1107,1113 ---- + * On Linux, signal is not always handled immediately either. + * See https://bugs.launchpad.net/bugs/291373 + * +! * volatile because it is used in signal handler sigcont_handler(). + */ + static volatile int sigcont_received; + static RETSIGTYPE sigcont_handler __ARGS(SIGPROTOARG); +*** ../vim-7.3.117/src/version.c 2011-02-09 17:42:53.000000000 +0100 +--- src/version.c 2011-02-09 18:46:53.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 118, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +221. Your wife melts your keyboard in the oven. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 506db2358b6ae7195bde31e3c66e91dc2c13b52d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:06 +0100 Subject: [PATCH 0135/3803] - patchlevel 119 --- 7.3.119 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 7.3.119 diff --git a/7.3.119 b/7.3.119 new file mode 100644 index 00000000..1547625d --- /dev/null +++ b/7.3.119 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.1 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.119 +Problem: Build problem on Mac. (Nicholas Stallard) +Solution: Use "extern" instead of "EXTERN" for p_vfile. +Files: src/option.h + + +*** ../vim-7.3.118/src/option.h 2011-02-09 15:59:32.000000000 +0100 +--- src/option.h 2011-02-12 13:56:50.000000000 +0100 +*************** +*** 857,863 **** + #ifdef IN_OPTION_C + char_u *p_vfile = (char_u *)""; /* used before options are initialized */ + #else +! EXTERN char_u *p_vfile; /* 'verbosefile' */ + #endif + EXTERN int p_warn; /* 'warn' */ + #ifdef FEAT_CMDL_COMPL +--- 857,863 ---- + #ifdef IN_OPTION_C + char_u *p_vfile = (char_u *)""; /* used before options are initialized */ + #else +! extern char_u *p_vfile; /* 'verbosefile' */ + #endif + EXTERN int p_warn; /* 'warn' */ + #ifdef FEAT_CMDL_COMPL +*** ../vim-7.3.118/src/version.c 2011-02-09 18:47:36.000000000 +0100 +--- src/version.c 2011-02-12 13:59:41.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 119, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +237. You tattoo your email address on your forehead. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9467afc3a0bee1f77a5b1462d928131d780370a4 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:07 +0100 Subject: [PATCH 0136/3803] - patchlevel 120 --- 7.3.120 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 7.3.120 diff --git a/7.3.120 b/7.3.120 new file mode 100644 index 00000000..04e2f633 --- /dev/null +++ b/7.3.120 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.120 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.120 +Problem: The message for an existing swap file is too long to fit in a 25 + line terminal. +Solution: Make the message shorter. (Chad Miller) +Files: src/memline.c + + +*** ../vim-7.3.119/src/memline.c 2011-01-17 20:08:03.000000000 +0100 +--- src/memline.c 2011-02-13 14:18:08.000000000 +0100 +*************** +*** 4071,4079 **** + } + /* Some of these messages are long to allow translation to + * other languages. */ +! MSG_PUTS(_("\n(1) Another program may be editing the same file.\n If this is the case, be careful not to end up with two\n different instances of the same file when making changes.\n")); +! MSG_PUTS(_(" Quit, or continue with caution.\n")); +! MSG_PUTS(_("\n(2) An edit session for this file crashed.\n")); + MSG_PUTS(_(" If this is the case, use \":recover\" or \"vim -r ")); + msg_outtrans(buf->b_fname); + MSG_PUTS(_("\"\n to recover the changes (see \":help recovery\").\n")); +--- 4071,4079 ---- + } + /* Some of these messages are long to allow translation to + * other languages. */ +! MSG_PUTS(_("\n(1) Another program may be editing the same file. If this is the case,\n be careful not to end up with two different instances of the same\n file when making changes.")); +! MSG_PUTS(_(" Quit, or continue with caution.\n")); +! MSG_PUTS(_("(2) An edit session for this file crashed.\n")); + MSG_PUTS(_(" If this is the case, use \":recover\" or \"vim -r ")); + msg_outtrans(buf->b_fname); + MSG_PUTS(_("\"\n to recover the changes (see \":help recovery\").\n")); +*** ../vim-7.3.119/src/version.c 2011-02-12 13:59:55.000000000 +0100 +--- src/version.c 2011-02-15 11:56:14.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 120, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +257. Your "hundred-and-one" lists include well over 101 items, since you + automatically interpret all numbers in hexadecimal notation. + (hex 101 = decimal 257) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From c8f6cc641fb0241a4f5328cb6f5692c0910239a1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:07 +0100 Subject: [PATCH 0137/3803] - patchlevel 121 --- 7.3.121 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 7.3.121 diff --git a/7.3.121 b/7.3.121 new file mode 100644 index 00000000..f51a7747 --- /dev/null +++ b/7.3.121 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.121 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.121 +Problem: Complicated 'statusline' causes a crash. (Christian Brabandt) +Solution: Check that the number of items is not too big. +Files: src/buffer.c + + +*** ../vim-7.3.120/src/buffer.c 2011-02-01 21:54:56.000000000 +0100 +--- src/buffer.c 2011-02-15 14:00:51.000000000 +0100 +*************** +*** 3460,3465 **** +--- 3461,3478 ---- + prevchar_isitem = FALSE; + for (s = usefmt; *s; ) + { ++ if (curitem == STL_MAX_ITEM) ++ { ++ /* There are too many items. Add the error code to the statusline ++ * to give the user a hint about what went wrong. */ ++ if (p + 6 < out + outlen) ++ { ++ mch_memmove(p, " E541", (size_t)5); ++ p += 5; ++ } ++ break; ++ } ++ + if (*s != NUL && *s != '%') + prevchar_isflag = prevchar_isitem = FALSE; + +*** ../vim-7.3.120/src/version.c 2011-02-15 11:56:56.000000000 +0100 +--- src/version.c 2011-02-15 14:23:39.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 121, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +265. Your reason for not staying in touch with family is that + they do not have e-mail addresses. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f9ba96da5a71ee40838ba213e1699a57ce8205e4 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:08 +0100 Subject: [PATCH 0138/3803] - patchlevel 122 --- 7.3.122 | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 7.3.122 diff --git a/7.3.122 b/7.3.122 new file mode 100644 index 00000000..02e9759b --- /dev/null +++ b/7.3.122 @@ -0,0 +1,100 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.122 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.122 +Problem: Having auto/config.mk in the repository causes problems. +Solution: Remove auto/config.mk from the distribution. In the toplevel + Makefile copy it from the "dist" file. +Files: Makefile, src/Makefile, src/auto/config.mk + + +*** ../vim-7.3.121/Makefile 2010-08-15 21:57:20.000000000 +0200 +--- Makefile 2011-02-12 14:28:09.000000000 +0100 +*************** +*** 23,28 **** +--- 23,31 ---- + # has run can result in compiling with $(CC) empty. + + first: ++ @if test ! -f src/auto/config.mk; then \ ++ cp src/config.mk.dist src/auto/config.mk; \ ++ fi + @echo "Starting make in the src directory." + @echo "If there are problems, cd to the src directory and run make there" + cd src && $(MAKE) $@ +*************** +*** 30,35 **** +--- 33,41 ---- + # Some make programs use the last target for the $@ default; put the other + # targets separately to always let $@ expand to "first" by default. + all install uninstall tools config configure reconfig proto depend lint tags types test testclean clean distclean: ++ @if test ! -f src/auto/config.mk; then \ ++ cp src/config.mk.dist src/auto/config.mk; \ ++ fi + @echo "Starting make in the src directory." + @echo "If there are problems, cd to the src directory and run make there" + cd src && $(MAKE) $@ +*** ../vim-7.3.121/src/Makefile 2010-11-03 22:32:18.000000000 +0100 +--- src/Makefile 2011-02-15 15:21:37.000000000 +0100 +*************** +*** 283,294 **** + + ######################## auto/config.mk ######################## {{{1 + # At this position auto/config.mk is included. When starting from the +! # distribution it is almost empty. After running auto/configure it contains +! # settings that have been discovered for your system. Settings below this +! # include override settings in auto/config.mk! +! +! # Note: if auto/config.mk is lost somehow (e.g., because configure was +! # interrupted), create an empty auto/config.mk file and do "make config". + + # (X) How to include auto/config.mk depends on the version of "make" you have, + # if the current choice doesn't work, try the other one. +--- 283,295 ---- + + ######################## auto/config.mk ######################## {{{1 + # At this position auto/config.mk is included. When starting from the +! # toplevel Makefile it is almost empty. After running auto/configure it +! # contains settings that have been discovered for your system. Settings below +! # this include override settings in auto/config.mk! +! +! # Note: If make fails because auto/config.mk does not exist (it is not +! # included in the repository), do: +! # cp config.mk.dist auto/config.mk + + # (X) How to include auto/config.mk depends on the version of "make" you have, + # if the current choice doesn't work, try the other one. +*** ../vim-7.3.121/src/auto/config.mk 2010-08-16 21:59:00.000000000 +0200 +--- src/auto/config.mk 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,5 **** +- the first targets to make vim are: scratch config myself +- srcdir = . +- VIMNAME = vim +- EXNAME = ex +- VIEWNAME = view +--- 0 ---- +*** ../vim-7.3.121/src/version.c 2011-02-15 14:24:42.000000000 +0100 +--- src/version.c 2011-02-15 15:25:07.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 122, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +267. You get an extra phone line so you can get phone calls. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 59dfee40252aca7a8491c49992e57f93500897e3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:08 +0100 Subject: [PATCH 0139/3803] - patchlevel 123 --- 7.3.123 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 7.3.123 diff --git a/7.3.123 b/7.3.123 new file mode 100644 index 00000000..0bca41b8 --- /dev/null +++ b/7.3.123 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.123 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.123 +Problem: ml_get error when executing register being recorded into, deleting + lines and 'conceallevel' is set. (ZyX) +Solution: Don't redraw a line for concealing when it doesn't exist. +Files: src/main.c + + +*** ../vim-7.3.122/src/main.c 2010-12-17 18:06:00.000000000 +0100 +--- src/main.c 2011-02-15 16:09:41.000000000 +0100 +*************** +*** 1198,1204 **** + || conceal_cursor_line(curwin) + || need_cursor_line_redraw)) + { +! if (conceal_old_cursor_line != conceal_new_cursor_line) + update_single_line(curwin, conceal_old_cursor_line); + update_single_line(curwin, conceal_new_cursor_line); + curwin->w_valid &= ~VALID_CROW; +--- 1198,1206 ---- + || conceal_cursor_line(curwin) + || need_cursor_line_redraw)) + { +! if (conceal_old_cursor_line != conceal_new_cursor_line +! && conceal_old_cursor_line +! <= curbuf->b_ml.ml_line_count) + update_single_line(curwin, conceal_old_cursor_line); + update_single_line(curwin, conceal_new_cursor_line); + curwin->w_valid &= ~VALID_CROW; +*** ../vim-7.3.122/src/version.c 2011-02-15 15:27:00.000000000 +0100 +--- src/version.c 2011-02-15 16:15:28.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 123, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +268. You get up in the morning and go online before getting your coffee. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b96ca662e6a5e16466d9f7cced450317123912b2 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:08 +0100 Subject: [PATCH 0140/3803] - patchlevel 124 --- 7.3.124 | 229 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 7.3.124 diff --git a/7.3.124 b/7.3.124 new file mode 100644 index 00000000..738c2a16 --- /dev/null +++ b/7.3.124 @@ -0,0 +1,229 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.124 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.124 +Problem: When writing a file in binary mode it may be missing the final EOL + if a file previously read was missing the EOL. (Kevin Goodsell) +Solution: Move the write_no_eol_lnum into the buffer struct. +Files: src/structs.h, src/fileio.c, src/globals.h, src/os_unix.c + + +*** ../vim-7.3.123/src/structs.h 2010-10-20 21:22:17.000000000 +0200 +--- src/structs.h 2011-02-15 17:06:34.000000000 +0100 +*************** +*** 1564,1569 **** +--- 1564,1572 ---- + + /* end of buffer options */ + ++ linenr_T b_no_eol_lnum; /* non-zero lnum when last line of next binary ++ * write should not have an end-of-line */ ++ + int b_start_eol; /* last line had eol when it was read */ + int b_start_ffc; /* first char of 'ff' when edit started */ + #ifdef FEAT_MBYTE +*** ../vim-7.3.123/src/fileio.c 2011-02-09 16:44:45.000000000 +0100 +--- src/fileio.c 2011-02-15 17:30:54.000000000 +0100 +*************** +*** 317,323 **** + int using_b_fname; + #endif + +! write_no_eol_lnum = 0; /* in case it was set by the previous read */ + + /* + * If there is no file name yet, use the one for the read file. +--- 317,323 ---- + int using_b_fname; + #endif + +! curbuf->b_no_eol_lnum = 0; /* in case it was set by the previous read */ + + /* + * If there is no file name yet, use the one for the read file. +*************** +*** 2599,2608 **** + + /* + * Trick: We remember if the last line of the read didn't have +! * an eol for when writing it again. This is required for + * ":autocmd FileReadPost *.gz set bin|'[,']!gunzip" to work. + */ +! write_no_eol_lnum = read_no_eol_lnum; + + /* When reloading a buffer put the cursor at the first line that is + * different. */ +--- 2599,2609 ---- + + /* + * Trick: We remember if the last line of the read didn't have +! * an eol even when 'binary' is off, for when writing it again with +! * 'binary' on. This is required for + * ":autocmd FileReadPost *.gz set bin|'[,']!gunzip" to work. + */ +! curbuf->b_no_eol_lnum = read_no_eol_lnum; + + /* When reloading a buffer put the cursor at the first line that is + * different. */ +*************** +*** 2650,2662 **** + FALSE, NULL, eap); + if (msg_scrolled == n) + msg_scroll = m; +! #ifdef FEAT_EVAL + if (aborting()) /* autocmds may abort script processing */ + return FAIL; +! #endif + } + #endif + + if (recoverymode && error) + return FAIL; + return OK; +--- 2651,2667 ---- + FALSE, NULL, eap); + if (msg_scrolled == n) + msg_scroll = m; +! # ifdef FEAT_EVAL + if (aborting()) /* autocmds may abort script processing */ + return FAIL; +! # endif + } + #endif + ++ /* Reset now, following writes should not omit the EOL. Also, the line ++ * number will become invalid because of edits. */ ++ curbuf->b_no_eol_lnum = 0; ++ + if (recoverymode && error) + return FAIL; + return OK; +*************** +*** 4560,4566 **** + if (end == 0 + || (lnum == end + && write_bin +! && (lnum == write_no_eol_lnum + || (lnum == buf->b_ml.ml_line_count && !buf->b_p_eol)))) + { + ++lnum; /* written the line, count it */ +--- 4565,4571 ---- + if (end == 0 + || (lnum == end + && write_bin +! && (lnum == buf->b_no_eol_lnum + || (lnum == buf->b_ml.ml_line_count && !buf->b_p_eol)))) + { + ++lnum; /* written the line, count it */ +*************** +*** 5086,5093 **** + { + aco_save_T aco; + +- write_no_eol_lnum = 0; /* in case it was set by the previous read */ +- + /* + * Apply POST autocommands. + * Careful: The autocommands may call buf_write() recursively! +--- 5091,5096 ---- +*************** +*** 7256,7263 **** + write_lnum_adjust(offset) + linenr_T offset; + { +! if (write_no_eol_lnum != 0) /* only if there is a missing eol */ +! write_no_eol_lnum += offset; + } + + #if defined(TEMPDIRNAMES) || defined(PROTO) +--- 7259,7266 ---- + write_lnum_adjust(offset) + linenr_T offset; + { +! if (curbuf->b_no_eol_lnum != 0) /* only if there is a missing eol */ +! curbuf->b_no_eol_lnum += offset; + } + + #if defined(TEMPDIRNAMES) || defined(PROTO) +*** ../vim-7.3.123/src/globals.h 2010-12-02 21:43:10.000000000 +0100 +--- src/globals.h 2011-02-15 17:06:06.000000000 +0100 +*************** +*** 1057,1066 **** + ; + #endif + +- EXTERN linenr_T write_no_eol_lnum INIT(= 0); /* non-zero lnum when last line +- of next binary write should +- not have an end-of-line */ +- + #ifdef FEAT_WINDOWS + EXTERN int postponed_split INIT(= 0); /* for CTRL-W CTRL-] command */ + EXTERN int postponed_split_flags INIT(= 0); /* args for win_split() */ +--- 1057,1062 ---- +*** ../vim-7.3.123/src/os_unix.c 2011-02-09 18:47:36.000000000 +0100 +--- src/os_unix.c 2011-02-15 17:07:22.000000000 +0100 +*************** +*** 4245,4251 **** + * should not have one. */ + if (lnum != curbuf->b_op_end.lnum + || !curbuf->b_p_bin +! || (lnum != write_no_eol_lnum + && (lnum != + curbuf->b_ml.ml_line_count + || curbuf->b_p_eol))) +--- 4245,4251 ---- + * should not have one. */ + if (lnum != curbuf->b_op_end.lnum + || !curbuf->b_p_bin +! || (lnum != curbuf->b_no_eol_lnum + && (lnum != + curbuf->b_ml.ml_line_count + || curbuf->b_p_eol))) +*************** +*** 4588,4597 **** + { + append_ga_line(&ga); + /* remember that the NL was missing */ +! write_no_eol_lnum = curwin->w_cursor.lnum; + } + else +! write_no_eol_lnum = 0; + ga_clear(&ga); + } + +--- 4588,4597 ---- + { + append_ga_line(&ga); + /* remember that the NL was missing */ +! curbuf->b_no_eol_lnum = curwin->w_cursor.lnum; + } + else +! curbuf->b_no_eol_lnum = 0; + ga_clear(&ga); + } + +*** ../vim-7.3.123/src/version.c 2011-02-15 16:29:54.000000000 +0100 +--- src/version.c 2011-02-15 17:37:38.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 124, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +270. You are subscribed to a mailing list for every piece of software + you use. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From cec08a4dc44920a3fbb9013dc4a8e816af9d1dfc Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:09 +0100 Subject: [PATCH 0141/3803] - patchlevel 125 --- 7.3.125 | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 7.3.125 diff --git a/7.3.125 b/7.3.125 new file mode 100644 index 00000000..719fc95e --- /dev/null +++ b/7.3.125 @@ -0,0 +1,66 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.125 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.125 +Problem: MSVC: Problem with quotes in link argument. +Solution: Escape backslashes and quotes. (Weasley) +Files: src/Make_mvc.mak + + +*** ../vim-7.3.124/src/Make_mvc.mak 2010-12-08 14:54:58.000000000 +0100 +--- src/Make_mvc.mak 2011-02-15 17:55:24.000000000 +0100 +*************** +*** 1159,1164 **** +--- 1159,1168 ---- + E0_CFLAGS = $(CFLAGS:\=\\) + E_CFLAGS = $(E0_CFLAGS:"=\") + # ") stop the string ++ # $LINKARGS2 may contain backslashes and double quotes, escape them both. ++ E0_LINKARGS2 = $(LINKARGS2:\=\\) ++ E_LINKARGS2 = $(E0_LINKARGS2:"=\") ++ # ") stop the string + + $(PATHDEF_SRC): auto + @echo creating $(PATHDEF_SRC) +*************** +*** 1167,1173 **** + @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC) + @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC) + @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC) +! @echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> $(PATHDEF_SRC) + @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC) + @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC) + +--- 1171,1177 ---- + @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC) + @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC) + @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC) +! @echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(E_LINKARGS2)"; >> $(PATHDEF_SRC) + @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC) + @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC) + +*** ../vim-7.3.124/src/version.c 2011-02-15 17:39:14.000000000 +0100 +--- src/version.c 2011-02-15 17:55:49.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 125, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +271. You collect hilarious signatures from all 250 mailing lists you + are subscribed to. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From cdd43e16d7c329987563006da4974f08fa2c6298 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:09 +0100 Subject: [PATCH 0142/3803] - patchlevel 126 --- 7.3.126 | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 7.3.126 diff --git a/7.3.126 b/7.3.126 new file mode 100644 index 00000000..89d9684f --- /dev/null +++ b/7.3.126 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.126 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.126 +Problem: Compiler warning for signed pointer. +Solution: Use unsigned int argument for sscanf(). +Files: src/blowfish.c + + +*** ../vim-7.3.125/src/blowfish.c 2010-08-15 21:57:28.000000000 +0200 +--- src/blowfish.c 2010-12-17 19:58:18.000000000 +0100 +*************** +*** 413,418 **** +--- 413,419 ---- + int salt_len; + { + int i, j, keypos = 0; ++ unsigned u; + UINT32_T val, data_l, data_r; + char_u *key; + int keylen; +*************** +*** 432,439 **** + } + for (i = 0; i < keylen; i++) + { +! sscanf((char *)&key[i * 2], "%2x", &j); +! key[i] = j; + } + + mch_memmove(sbx, sbi, 4 * 4 * 256); +--- 433,440 ---- + } + for (i = 0; i < keylen; i++) + { +! sscanf((char *)&key[i * 2], "%2x", &u); +! key[i] = u; + } + + mch_memmove(sbx, sbi, 4 * 4 * 256); +*** ../vim-7.3.125/src/version.c 2011-02-15 18:06:11.000000000 +0100 +--- src/version.c 2011-02-25 14:40:22.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 126, + /**/ + +-- +Why doesn't Tarzan have a beard? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 8913bcf8b0605ac73a67c195ceba0a1368598eab Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:09 +0100 Subject: [PATCH 0143/3803] - patchlevel 127 --- 7.3.127 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 7.3.127 diff --git a/7.3.127 b/7.3.127 new file mode 100644 index 00000000..518d2f7c --- /dev/null +++ b/7.3.127 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.127 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.127 +Problem: Compiler complains about comma. +Solution: Remove comma after last enum element. +Files: src/ex_cmds2.c + + +*** ../vim-7.3.126/src/ex_cmds2.c 2010-12-17 18:06:00.000000000 +0100 +--- src/ex_cmds2.c 2010-12-17 19:58:37.000000000 +0100 +*************** +*** 1115,1121 **** + static enum + { + PEXP_SUBCMD, /* expand :profile sub-commands */ +! PEXP_FUNC, /* expand :profile func {funcname} */ + } pexpand_what; + + static char *pexpand_cmds[] = { +--- 1115,1121 ---- + static enum + { + PEXP_SUBCMD, /* expand :profile sub-commands */ +! PEXP_FUNC /* expand :profile func {funcname} */ + } pexpand_what; + + static char *pexpand_cmds[] = { +*** ../vim-7.3.126/src/version.c 2011-02-25 14:40:51.000000000 +0100 +--- src/version.c 2011-02-25 14:45:19.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 127, + /**/ + +-- + LAUNCELOT leaps into SHOT with a mighty cry and runs the GUARD through and + hacks him to the floor. Blood. Swashbuckling music (perhaps). + LAUNCELOT races through into the castle screaming. +SECOND SENTRY: Hey! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 0049360d409f156486610b38086a8b77a45942c4 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:10 +0100 Subject: [PATCH 0144/3803] - patchlevel 128 --- 7.3.128 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.128 diff --git a/7.3.128 b/7.3.128 new file mode 100644 index 00000000..d4438688 --- /dev/null +++ b/7.3.128 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.128 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.128 +Problem: Another compiler warning for signed pointer. +Solution: Use unsigned int argument for sscanf(). +Files: src/mark.c + + +*** ../vim-7.3.127/src/mark.c 2010-08-15 21:57:25.000000000 +0200 +--- src/mark.c 2010-12-17 20:00:05.000000000 +0100 +*************** +*** 1750,1756 **** + { + if (line[1] != NUL) + { +! sscanf((char *)line + 2, "%ld %u", &pos.lnum, &pos.col); + switch (line[1]) + { + case '"': curbuf->b_last_cursor = pos; break; +--- 1750,1759 ---- + { + if (line[1] != NUL) + { +! unsigned u; +! +! sscanf((char *)line + 2, "%ld %u", &pos.lnum, &u); +! pos.col = u; + switch (line[1]) + { + case '"': curbuf->b_last_cursor = pos; break; +*** ../vim-7.3.127/src/version.c 2011-02-25 14:46:06.000000000 +0100 +--- src/version.c 2011-02-25 15:10:34.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 128, + /**/ + +-- +FATHER: Who are you? +PRINCE: I'm ... your son ... +FATHER: Not you. +LAUNCELOT: I'm ... er ... Sir Launcelot, sir. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 310c90365bab700a7155e31d7df91d041cfdde81 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:10 +0100 Subject: [PATCH 0145/3803] - patchlevel 129 --- 7.3.129 | 241 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 241 insertions(+) create mode 100644 7.3.129 diff --git a/7.3.129 b/7.3.129 new file mode 100644 index 00000000..10f11d61 --- /dev/null +++ b/7.3.129 @@ -0,0 +1,241 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.129 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.129 +Problem: Using integer like a boolean. +Solution: Nicer check for integer being non-zero. +Files: src/tag.c + + +*** ../vim-7.3.128/src/tag.c 2010-12-17 18:06:00.000000000 +0100 +--- src/tag.c 2010-12-17 17:49:35.000000000 +0100 +*************** +*** 204,210 **** + else + { + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview) + use_tagstack = FALSE; + else + #endif +--- 204,210 ---- + else + { + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0) + use_tagstack = FALSE; + else + #endif +*************** +*** 222,228 **** + )) + { + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview) + { + if (ptag_entry.tagname != NULL + && STRCMP(ptag_entry.tagname, tag) == 0) +--- 222,228 ---- + )) + { + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0) + { + if (ptag_entry.tagname != NULL + && STRCMP(ptag_entry.tagname, tag) == 0) +*************** +*** 278,284 **** + { + if ( + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! g_do_tagpreview ? ptag_entry.tagname == NULL : + #endif + tagstacklen == 0) + { +--- 278,284 ---- + { + if ( + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! g_do_tagpreview != 0 ? ptag_entry.tagname == NULL : + #endif + tagstacklen == 0) + { +*************** +*** 361,367 **** + ) + { + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview) + { + cur_match = ptag_entry.cur_match; + cur_fnum = ptag_entry.cur_fnum; +--- 361,367 ---- + ) + { + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0) + { + cur_match = ptag_entry.cur_match; + cur_fnum = ptag_entry.cur_fnum; +*************** +*** 399,405 **** + prevtagstackidx = tagstackidx; + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview) + { + cur_match = ptag_entry.cur_match; + cur_fnum = ptag_entry.cur_fnum; +--- 399,405 ---- + prevtagstackidx = tagstackidx; + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0) + { + cur_match = ptag_entry.cur_match; + cur_fnum = ptag_entry.cur_fnum; +*************** +*** 437,443 **** + } + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview) + { + if (type != DT_SELECT && type != DT_JUMP) + { +--- 437,443 ---- + } + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0) + { + if (type != DT_SELECT && type != DT_JUMP) + { +*************** +*** 492,498 **** + if (use_tagstack) + name = tagstack[tagstackidx].tagname; + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! else if (g_do_tagpreview) + name = ptag_entry.tagname; + #endif + else +--- 492,498 ---- + if (use_tagstack) + name = tagstack[tagstackidx].tagname; + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! else if (g_do_tagpreview != 0) + name = ptag_entry.tagname; + #endif + else +*************** +*** 620,626 **** + parse_match(matches[i], &tagp); + if (!new_tag && ( + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! (g_do_tagpreview + && i == ptag_entry.cur_match) || + #endif + (use_tagstack +--- 620,626 ---- + parse_match(matches[i], &tagp); + if (!new_tag && ( + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! (g_do_tagpreview != 0 + && i == ptag_entry.cur_match) || + #endif + (use_tagstack +*************** +*** 962,968 **** + ++tagstackidx; + } + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! else if (g_do_tagpreview) + { + ptag_entry.cur_match = cur_match; + ptag_entry.cur_fnum = cur_fnum; +--- 962,968 ---- + ++tagstackidx; + } + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! else if (g_do_tagpreview != 0) + { + ptag_entry.cur_match = cur_match; + ptag_entry.cur_fnum = cur_fnum; +*************** +*** 3110,3116 **** + #endif + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview) + { + postponed_split = 0; /* don't split again below */ + curwin_save = curwin; /* Save current window */ +--- 3110,3116 ---- + #endif + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0) + { + postponed_split = 0; /* don't split again below */ + curwin_save = curwin; /* Save current window */ +*************** +*** 3148,3154 **** + /* A :ta from a help file will keep the b_help flag set. For ":ptag" + * we need to use the flag from the window where we came from. */ + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview) + keep_help_flag = curwin_save->w_buffer->b_help; + else + #endif +--- 3148,3154 ---- + /* A :ta from a help file will keep the b_help flag set. For ":ptag" + * we need to use the flag from the window where we came from. */ + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0) + keep_help_flag = curwin_save->w_buffer->b_help; + else + #endif +*************** +*** 3322,3328 **** + } + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview && curwin != curwin_save && win_valid(curwin_save)) + { + /* Return cursor to where we were */ + validate_cursor(); +--- 3322,3329 ---- + } + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0 +! && curwin != curwin_save && win_valid(curwin_save)) + { + /* Return cursor to where we were */ + validate_cursor(); +*** ../vim-7.3.128/src/version.c 2011-02-25 15:11:17.000000000 +0100 +--- src/version.c 2011-02-25 15:12:25.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 129, + /**/ + +-- +PRINCE: He's come to rescue me, father. +LAUNCELOT: (embarrassed) Well, let's not jump to conclusions ... + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 8ed9fe8c4dcc01615cc91035e5833633b92f0a03 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:10 +0100 Subject: [PATCH 0146/3803] - patchlevel 130 --- 7.3.130 | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 7.3.130 diff --git a/7.3.130 b/7.3.130 new file mode 100644 index 00000000..3f7db765 --- /dev/null +++ b/7.3.130 @@ -0,0 +1,74 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.130 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.130 +Problem: Variable misplaced in #ifdef. +Solution: Move clipboard_event_time outside of #ifdef. +Files: src/gui_gtk_x11.c + + +*** ../vim-7.3.129/src/gui_gtk_x11.c 2010-08-15 21:57:31.000000000 +0200 +--- src/gui_gtk_x11.c 2010-12-04 15:26:41.000000000 +0100 +*************** +*** 86,94 **** + + #ifdef HAVE_X11_SUNKEYSYM_H + # include +- static guint32 clipboard_event_time = CurrentTime; + #endif + + /* + * Easy-to-use macro for multihead support. + */ +--- 86,95 ---- + + #ifdef HAVE_X11_SUNKEYSYM_H + # include + #endif + ++ static guint32 clipboard_event_time = CurrentTime; ++ + /* + * Easy-to-use macro for multihead support. + */ +*************** +*** 5419,5425 **** + } + + #if defined(FEAT_NETBEANS_INTG) +! /* Process the queued netbeans messages. */ + netbeans_parse_messages(); + #endif + +--- 5420,5426 ---- + } + + #if defined(FEAT_NETBEANS_INTG) +! /* Process any queued netbeans messages. */ + netbeans_parse_messages(); + #endif + +*** ../vim-7.3.129/src/version.c 2011-02-25 15:13:43.000000000 +0100 +--- src/version.c 2011-02-25 15:15:02.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 130, + /**/ + +-- +A vacation is a period of travel during which you find that you +took twice as many clothes and half as much money as you needed. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ec396bc264186f5619e1b18fef5ce3b399d7a267 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:11 +0100 Subject: [PATCH 0147/3803] - patchlevel 131 --- 7.3.131 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 7.3.131 diff --git a/7.3.131 b/7.3.131 new file mode 100644 index 00000000..e142059f --- /dev/null +++ b/7.3.131 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.131 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.131 +Problem: Including errno.h too often. +Solution: Don't include errno.h in Unix header file. +Files: src/os_unix.h + + +*** ../vim-7.3.130/src/os_unix.h 2010-08-15 21:57:28.000000000 +0200 +--- src/os_unix.h 2010-12-17 20:05:34.000000000 +0100 +*************** +*** 184,193 **** + + #define BASENAMELEN (MAXNAMLEN - 5) + +- #ifdef HAVE_ERRNO_H +- # include +- #endif +- + #ifdef HAVE_PWD_H + # include + #endif +--- 184,189 ---- +*** ../vim-7.3.130/src/version.c 2011-02-25 15:15:43.000000000 +0100 +--- src/version.c 2011-02-25 15:16:49.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 131, + /**/ + +-- +Overflow on /dev/null, please empty the bit bucket. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ecca56156025bdebd561155120a9babf11997eef Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:11 +0100 Subject: [PATCH 0148/3803] - patchlevel 132 --- 7.3.132 | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 7.3.132 diff --git a/7.3.132 b/7.3.132 new file mode 100644 index 00000000..2f0753df --- /dev/null +++ b/7.3.132 @@ -0,0 +1,82 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.132 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.132 +Problem: C++ style comments. +Solution: Change to C comments. +Files: src/if_python3.c + + +*** ../vim-7.3.131/src/if_python3.c 2010-11-16 19:25:56.000000000 +0100 +--- src/if_python3.c 2011-01-16 01:28:35.000000000 +0100 +*************** +*** 22,29 **** + * Adaptations to support both python3.x and python2.x + */ + +! // uncomment this if used with the debug version of python +! // #define Py_DEBUG + + #include "vim.h" + +--- 22,29 ---- + * Adaptations to support both python3.x and python2.x + */ + +! /* uncomment this if used with the debug version of python */ +! /* #define Py_DEBUG */ + + #include "vim.h" + +*************** +*** 74,80 **** + #define PyString_Size(obj) PyUnicode_GET_SIZE(obj) + #define PyString_FromString(repr) PyUnicode_FromString(repr) + +! #if defined(DYNAMIC_PYTHON3) + + # ifndef WIN3264 + # include +--- 74,80 ---- + #define PyString_Size(obj) PyUnicode_GET_SIZE(obj) + #define PyString_FromString(repr) PyUnicode_FromString(repr) + +! #if defined(DYNAMIC_PYTHON3) || defined(PROTO) + + # ifndef WIN3264 + # include +*** ../vim-7.3.131/src/version.c 2011-02-25 15:17:14.000000000 +0100 +--- src/version.c 2011-02-25 15:18:18.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 132, + /**/ + +-- + ** Hello and Welcome to the Psychiatric Hotline ** +If you are obsessive-compulsive, please press 1 repeatedly. +If you are co-dependent, please ask someone to press 2. +If you have multiple personalities, please press 3, 4, 5 and 6. +If you are paranoid-delusional, we know who you are and what you want + - just stay on the line so we can trace the call. +If you are schizophrenic, listen carefully and a little voice will + tell you which number to press next. +If you are manic-depressive, it doesn't matter which number you press + - no one will answer. +If you suffer from panic attacks, push every button you can find. +If you are sane, please hold on - we have the rest of humanity on the + other line and they desparately want to ask you a few questions. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 1435dc7d864708038f3cb7d800835823563edd35 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:12 +0100 Subject: [PATCH 0149/3803] - patchlevel 133 --- 7.3.133 | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 7.3.133 diff --git a/7.3.133 b/7.3.133 new file mode 100644 index 00000000..d7d99518 --- /dev/null +++ b/7.3.133 @@ -0,0 +1,122 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.133 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.133 +Problem: When using encryption it's not clear what method was used. +Solution: In the file message show "blowfish" when using blowfish. +Files: src/fileio.c + + +*** ../vim-7.3.132/src/fileio.c 2011-02-15 17:39:14.000000000 +0100 +--- src/fileio.c 2011-02-25 16:30:19.000000000 +0100 +*************** +*** 250,255 **** +--- 250,256 ---- + #ifdef FEAT_CRYPT + char_u *cryptkey = NULL; + int did_ask_for_key = FALSE; ++ int crypt_method_used; + #endif + #ifdef FEAT_PERSISTENT_UNDO + context_sha256_T sha_ctx; +*************** +*** 2289,2294 **** +--- 2290,2296 ---- + save_file_ff(curbuf); /* remember the current file format */ + + #ifdef FEAT_CRYPT ++ crypt_method_used = use_crypt_method; + if (cryptkey != NULL) + { + crypt_pop_state(); +*************** +*** 2483,2489 **** + #ifdef FEAT_CRYPT + if (cryptkey != NULL) + { +! STRCAT(IObuff, _("[crypted]")); + c = TRUE; + } + #endif +--- 2485,2494 ---- + #ifdef FEAT_CRYPT + if (cryptkey != NULL) + { +! if (crypt_method_used == 1) +! STRCAT(IObuff, _("[blowfish]")); +! else +! STRCAT(IObuff, _("[crypted]")); + c = TRUE; + } + #endif +*************** +*** 3199,3204 **** +--- 3204,3212 ---- + int write_undo_file = FALSE; + context_sha256_T sha_ctx; + #endif ++ #ifdef FEAT_CRYPT ++ int crypt_method_used; ++ #endif + + if (fname == NULL || *fname == NUL) /* safety check */ + return FAIL; +*************** +*** 4728,4733 **** +--- 4736,4742 ---- + mch_set_acl(wfname, acl); + #endif + #ifdef FEAT_CRYPT ++ crypt_method_used = use_crypt_method; + if (wb_flags & FIO_ENCRYPTED) + crypt_pop_state(); + #endif +*************** +*** 4882,4888 **** + #ifdef FEAT_CRYPT + if (wb_flags & FIO_ENCRYPTED) + { +! STRCAT(IObuff, _("[crypted]")); + c = TRUE; + } + #endif +--- 4891,4900 ---- + #ifdef FEAT_CRYPT + if (wb_flags & FIO_ENCRYPTED) + { +! if (crypt_method_used == 1) +! STRCAT(IObuff, _("[blowfish]")); +! else +! STRCAT(IObuff, _("[crypted]")); + c = TRUE; + } + #endif +*** ../vim-7.3.132/src/version.c 2011-02-25 15:18:46.000000000 +0100 +--- src/version.c 2011-02-25 16:42:58.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 133, + /**/ + +-- + [clop clop] +GUARD #1: Halt! Who goes there? +ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of + Camelot. King of the Britons, defeator of the Saxons, sovereign of + all England! +GUARD #1: Pull the other one! + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 20905d0d710b881af972f2b6d82bd269d6940902 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:12 +0100 Subject: [PATCH 0150/3803] - patchlevel 134 --- 7.3.134 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 7.3.134 diff --git a/7.3.134 b/7.3.134 new file mode 100644 index 00000000..cb20ce43 --- /dev/null +++ b/7.3.134 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.134 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.134 +Problem: Drag-n-drop doesn't work in KDE Dolphin. +Solution: Add GDK_ACTION_MOVE flag. (Florian Degner) +Files: src/gui_gtk_x11.c + + +*** ../vim-7.3.133/src/gui_gtk_x11.c 2011-02-25 15:15:43.000000000 +0100 +--- src/gui_gtk_x11.c 2011-02-25 17:07:36.000000000 +0100 +*************** +*** 3094,3100 **** + gtk_drag_dest_set(gui.drawarea, + GTK_DEST_DEFAULT_ALL, + targets, n_targets, +! GDK_ACTION_COPY); + } + + /* +--- 3094,3100 ---- + gtk_drag_dest_set(gui.drawarea, + GTK_DEST_DEFAULT_ALL, + targets, n_targets, +! GDK_ACTION_COPY | GDK_ACTION_MOVE); + } + + /* +*** ../vim-7.3.133/src/version.c 2011-02-25 16:52:13.000000000 +0100 +--- src/version.c 2011-02-25 17:08:35.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 134, + /**/ + +-- +Proverb: A nightingale that forgets the lyrics is a hummingbird. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d223b01af9fc21cf33d5d86c34291cc466c680d5 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:13 +0100 Subject: [PATCH 0151/3803] - patchlevel 135 --- 7.3.135 | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 7.3.135 diff --git a/7.3.135 b/7.3.135 new file mode 100644 index 00000000..ca1ebd68 --- /dev/null +++ b/7.3.135 @@ -0,0 +1,90 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.135 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.135 +Problem: When there is no previous substitute pattern, the previous search + pattern is used. The other way around doesn't work. +Solution: When there is no previous search pattern, use the previous + substitute pattern if possible. (Christian Brabandt) +Files: src/search.c + + +*** ../vim-7.3.134/src/search.c 2010-09-21 16:56:29.000000000 +0200 +--- src/search.c 2011-02-25 18:36:56.000000000 +0100 +*************** +*** 1161,1172 **** + { + if (spats[RE_SEARCH].pat == NULL) /* no previous pattern */ + { +! EMSG(_(e_noprevre)); +! retval = 0; +! goto end_do_search; + } +- /* make search_regcomp() use spats[RE_SEARCH].pat */ +- searchstr = (char_u *)""; + } + + if (pat != NULL && *pat != NUL) /* look for (new) offset */ +--- 1161,1180 ---- + { + if (spats[RE_SEARCH].pat == NULL) /* no previous pattern */ + { +! pat = spats[RE_SUBST].pat; +! if (pat == NULL) +! { +! EMSG(_(e_noprevre)); +! retval = 0; +! goto end_do_search; +! } +! searchstr = pat; +! } +! else +! { +! /* make search_regcomp() use spats[RE_SEARCH].pat */ +! searchstr = (char_u *)""; + } + } + + if (pat != NULL && *pat != NUL) /* look for (new) offset */ +*************** +*** 4527,4533 **** + #if defined(FEAT_FIND_ID) || defined(PROTO) + /* + * Find identifiers or defines in included files. +! * if p_ic && (compl_cont_status & CONT_SOL) then ptr must be in lowercase. + */ + void + find_pattern_in_path(ptr, dir, len, whole, skip_comments, +--- 4535,4541 ---- + #if defined(FEAT_FIND_ID) || defined(PROTO) + /* + * Find identifiers or defines in included files. +! * If p_ic && (compl_cont_status & CONT_SOL) then ptr must be in lowercase. + */ + void + find_pattern_in_path(ptr, dir, len, whole, skip_comments, +*** ../vim-7.3.134/src/version.c 2011-02-25 17:10:22.000000000 +0100 +--- src/version.c 2011-02-25 18:35:30.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 135, + /**/ + +-- +A real patriot is the fellow who gets a parking ticket and rejoices +that the system works. + + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a37ceb4d661803e1a0e05638359f623c5b53261b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:13 +0100 Subject: [PATCH 0152/3803] - patchlevel 136 --- 7.3.136 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 7.3.136 diff --git a/7.3.136 b/7.3.136 new file mode 100644 index 00000000..87acecb6 --- /dev/null +++ b/7.3.136 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.136 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.136 +Problem: Duplicate include of assert.h. +Solution: Remove it. +Files: src/if_cscope.c + + +*** ../vim-7.3.135/src/if_cscope.c 2010-12-30 11:41:05.000000000 +0100 +--- src/if_cscope.c 2011-03-03 15:01:15.000000000 +0100 +*************** +*** 13,19 **** + + #if defined(FEAT_CSCOPE) || defined(PROTO) + +- #include + #include + #include + #if defined(UNIX) +--- 13,18 ---- +*** ../vim-7.3.135/src/version.c 2011-02-25 18:38:29.000000000 +0100 +--- src/version.c 2011-03-03 14:59:32.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 136, + /**/ + +-- +ARTHUR: You fight with the strength of many men, Sir knight. + I am Arthur, King of the Britons. [pause] + I seek the finest and the bravest knights in the land to join me + in my Court of Camelot. [pause] + You have proved yourself worthy; will you join me? [pause] + You make me sad. So be it. Come, Patsy. +BLACK KNIGHT: None shall pass. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ae44034e235ebca1c91678fa000d821713ef2651 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:13 +0100 Subject: [PATCH 0153/3803] - patchlevel 137 --- 7.3.137 | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 7.3.137 diff --git a/7.3.137 b/7.3.137 new file mode 100644 index 00000000..91f68ed3 --- /dev/null +++ b/7.3.137 @@ -0,0 +1,81 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.137 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.137 (after 7.3.091) +Problem: When 'lazyredraw' is set the screen may not be updated. (Ivan + Krasilnikov) +Solution: Call update_screen() before waiting for input. +Files: src/misc1.c, src/getchar.c + + +*** ../vim-7.3.136/src/misc1.c 2011-01-22 00:11:42.000000000 +0100 +--- src/misc1.c 2011-03-03 14:02:02.000000000 +0100 +*************** +*** 3115,3121 **** +--- 3115,3129 ---- + continue; + + if (n == KEYLEN_REMOVED) /* key code removed */ ++ { ++ if (must_redraw) ++ { ++ /* Redrawing was postponed, do it now. */ ++ update_screen(0); ++ setcursor(); /* put cursor back where it belongs */ ++ } + continue; ++ } + if (n > 0) /* found a termcode: adjust length */ + len = n; + if (len == 0) /* nothing typed yet */ +*** ../vim-7.3.136/src/getchar.c 2010-12-30 12:30:26.000000000 +0100 +--- src/getchar.c 2011-03-03 14:01:26.000000000 +0100 +*************** +*** 2710,2717 **** + * are still available. But when those available characters + * are part of a mapping, and we are going to do a blocking + * wait here. Need to update the screen to display the +! * changed text so far. */ +! if ((State & INSERT) && advance && must_redraw != 0) + { + update_screen(0); + setcursor(); /* put cursor back where it belongs */ +--- 2710,2719 ---- + * are still available. But when those available characters + * are part of a mapping, and we are going to do a blocking + * wait here. Need to update the screen to display the +! * changed text so far. Also for when 'lazyredraw' is set and +! * redrawing was postponed because there was something in the +! * input buffer (e.g., termresponse). */ +! if (((State & INSERT) || p_lz) && advance && must_redraw != 0) + { + update_screen(0); + setcursor(); /* put cursor back where it belongs */ +*** ../vim-7.3.136/src/version.c 2011-03-03 15:01:25.000000000 +0100 +--- src/version.c 2011-03-03 15:02:45.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 137, + /**/ + +-- +ARTHUR: What? +BLACK KNIGHT: None shall pass. +ARTHUR: I have no quarrel with you, good Sir knight, but I must cross + this bridge. +BLACK KNIGHT: Then you shall die. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5827cddbff36dfd016334d459ad6628c48b1b14c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:13 +0100 Subject: [PATCH 0154/3803] - patchlevel 138 --- 7.3.138 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 7.3.138 diff --git a/7.3.138 b/7.3.138 new file mode 100644 index 00000000..e045e790 --- /dev/null +++ b/7.3.138 @@ -0,0 +1,69 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.138 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.138 +Problem: ":com" changes the multi-byte text of :echo. (Dimitar Dimitrov) +Solution: Search for K_SPECIAL as a byte, not a character. (Ben Schmidt) +Files: src/ex_docmd.c + + +*** ../vim-7.3.137/src/ex_docmd.c 2011-01-17 19:50:01.000000000 +0100 +--- src/ex_docmd.c 2011-03-03 15:47:00.000000000 +0100 +*************** +*** 6054,6068 **** + end = vim_strchr(start + 1, '>'); + if (buf != NULL) + { +! ksp = vim_strchr(p, K_SPECIAL); +! if (ksp != NULL && (start == NULL || ksp < start || end == NULL) + && ((ksp[1] == KS_SPECIAL && ksp[2] == KE_FILLER) + # ifdef FEAT_GUI + || (ksp[1] == KS_EXTRA && ksp[2] == (int)KE_CSI) + # endif + )) + { +! /* K_SPECIAL han been put in the buffer as K_SPECIAL + * KS_SPECIAL KE_FILLER, like for mappings, but + * do_cmdline() doesn't handle that, so convert it back. + * Also change K_SPECIAL KS_EXTRA KE_CSI into CSI. */ +--- 6054,6070 ---- + end = vim_strchr(start + 1, '>'); + if (buf != NULL) + { +! for (ksp = p; *ksp != NUL && *ksp != K_SPECIAL; ++ksp) +! ; +! if (*ksp == K_SPECIAL +! && (start == NULL || ksp < start || end == NULL) + && ((ksp[1] == KS_SPECIAL && ksp[2] == KE_FILLER) + # ifdef FEAT_GUI + || (ksp[1] == KS_EXTRA && ksp[2] == (int)KE_CSI) + # endif + )) + { +! /* K_SPECIAL has been put in the buffer as K_SPECIAL + * KS_SPECIAL KE_FILLER, like for mappings, but + * do_cmdline() doesn't handle that, so convert it back. + * Also change K_SPECIAL KS_EXTRA KE_CSI into CSI. */ +*** ../vim-7.3.137/src/version.c 2011-03-03 15:04:01.000000000 +0100 +--- src/version.c 2011-03-03 15:53:41.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 138, + /**/ + +-- + f y cn rd ths thn y cn hv grt jb n cmptr prgrmmng + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 1cb31eda2bcba993cbd92880bface32fa6c2caf6 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Mar 2011 21:14:14 +0100 Subject: [PATCH 0155/3803] - patchlevel 138 --- README.patches | 31 +++++++++++++++++++++++ vim.spec | 69 ++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 98 insertions(+), 2 deletions(-) diff --git a/README.patches b/README.patches index 57760ac6..33227b9a 100644 --- a/README.patches +++ b/README.patches @@ -133,3 +133,34 @@ Individual patches for Vim 7.3: 1539 7.3.105 can't get the value of "b:changedtick" with getbufvar() 1650 7.3.106 other window scrolls if both 'scrollbind' and 'cursorbind' set 1986 7.3.107 year in :undolist can be confusing + 3425 7.3.108 useless check for NULL when calling vim_free() + 7203 7.3.109 processing new Esperanto spell file fails and crashes Vim + 2122 7.3.110 the "nbsp" item in 'listchars' isn't used for ":list" + 4010 7.3.111 :normal command in 'statusline' causes the cursor to move + 1978 7.3.112 setting 'statusline' to "%!'asdf%' reads uninitialized memory + 1838 7.3.113 Windows: Fall back directory for creating temp file is wrong + 1568 7.3.114 potential problem using 'verbosefile' uninitialized + 1645 7.3.115 Vim can crash when tmpnam() returns NULL + 1788 7.3.116 'cursorline' too short with concealed chars and 'list' set + 3835 7.3.117 build failed when --as-needed excludes ncurses + 2283 7.3.118 Ruby uses SIGVTALARM which makes Vim exit + 1637 7.3.119 (after 7.3.114) build problem on Mac + 2597 7.3.120 message for existing swap file does not fit in 25 lines + 1721 7.3.121 crash when using complicated 'statusline' + 3936 7.3.122 having src/auto/config.mk in the distribution causes problems + 1954 7.3.123 ml_get error when 'conceallevel' is set + 6777 7.3.124 EOL may be missing from written file + 2672 7.3.125 MSVC: quote in link argument causes trouble + 1652 7.3.126 compiler warning for signed pointer + 1747 7.3.127 compiler complains about comma after last enum item + 1706 7.3.128 another compiler warning for signed pointer + 6608 7.3.129 using integer like a boolean + 1908 7.3.130 clipboard_event_time misplaced in #ifdef + 1280 7.3.131 including errno.h too often + 2648 7.3.132 C++ style comments + 3169 7.3.133 when using encryption it's not clear what method was used + 1470 7.3.134 drag-n-drop doesn't work in KDE Dolphin + 2678 7.3.135 inconsistency: last substitute pattern isn't used for search + 1653 7.3.136 duplicate include of assert.h + 2881 7.3.137 when 'lazyredraw' is set the screen may not be updated + 2399 7.3.138 ":com" changes the multi-byte text of :echo diff --git a/vim.spec b/vim.spec index d8ea8136..195dbd6e 100644 --- a/vim.spec +++ b/vim.spec @@ -18,13 +18,13 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 107 +%define patchlevel 138 Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{beta}%{patchlevel} -Release: 2%{?dist} +Release: 1%{?dist} License: Vim Group: Applications/Editors Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}%{?beta}%{?CVSDATE}.tar.bz2 @@ -171,6 +171,37 @@ Patch104: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.104 Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 +Patch108: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.108 +Patch109: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.109 +Patch110: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.110 +Patch111: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.111 +Patch112: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.112 +Patch113: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.113 +Patch114: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.114 +Patch115: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.115 +Patch116: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.116 +Patch117: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.117 +Patch118: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.118 +Patch119: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.119 +Patch120: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.120 +Patch121: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.121 +Patch122: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.122 +Patch123: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.123 +Patch124: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.124 +Patch125: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.125 +Patch126: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.126 +Patch127: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.127 +Patch128: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.128 +Patch129: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.129 +Patch130: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.130 +Patch131: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.131 +Patch132: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.132 +Patch133: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.133 +Patch134: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.134 +Patch135: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.135 +Patch136: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.136 +Patch137: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.137 +Patch138: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.138 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -422,6 +453,37 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch105 -p0 %patch106 -p0 %patch107 -p0 +%patch108 -p0 +%patch109 -p0 +%patch110 -p0 +%patch111 -p0 +%patch112 -p0 +%patch113 -p0 +%patch114 -p0 +%patch115 -p0 +%patch116 -p0 +%patch117 -p0 +%patch118 -p0 +%patch119 -p0 +%patch120 -p0 +%patch121 -p0 +%patch122 -p0 +%patch123 -p0 +%patch124 -p0 +%patch125 -p0 +%patch126 -p0 +%patch127 -p0 +%patch128 -p0 +%patch129 -p0 +%patch130 -p0 +%patch131 -p0 +%patch132 -p0 +%patch133 -p0 +%patch134 -p0 +%patch135 -p0 +%patch136 -p0 +%patch137 -p0 +%patch138 -p0 # install spell files @@ -889,6 +951,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Wed Mar 16 2011 Karsten Hopp 7.3.138-1 +- patchlevel 138 + * Mon Feb 07 2011 Fedora Release Engineering - 2:7.3.107-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 20b7f4f2d1009c13ba70bd00d34c329f9b0ed19f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:38 +0200 Subject: [PATCH 0156/3803] - patchlevel 139 --- 7.3.139 | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 7.3.139 diff --git a/7.3.139 b/7.3.139 new file mode 100644 index 00000000..057bf655 --- /dev/null +++ b/7.3.139 @@ -0,0 +1,111 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.139 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.139 (after 7.3.137) +Problem: When 'lazyredraw' is set ":ver" output can't be read. +Solution: Don't redraw the screen when at a prompt or command line. +Files: src/getchar.c, src/message.c, src/misc1.c + + +*** ../vim-7.3.138/src/getchar.c 2011-03-03 15:04:01.000000000 +0100 +--- src/getchar.c 2011-03-22 12:16:23.000000000 +0100 +*************** +*** 2713,2719 **** + * changed text so far. Also for when 'lazyredraw' is set and + * redrawing was postponed because there was something in the + * input buffer (e.g., termresponse). */ +! if (((State & INSERT) || p_lz) && advance && must_redraw != 0) + { + update_screen(0); + setcursor(); /* put cursor back where it belongs */ +--- 2713,2720 ---- + * changed text so far. Also for when 'lazyredraw' is set and + * redrawing was postponed because there was something in the + * input buffer (e.g., termresponse). */ +! if (((State & INSERT) != 0 || p_lz) && (State & CMDLINE) == 0 +! && advance && must_redraw != 0 && !need_wait_return) + { + update_screen(0); + setcursor(); /* put cursor back where it belongs */ +*** ../vim-7.3.138/src/message.c 2011-02-01 17:12:20.000000000 +0100 +--- src/message.c 2011-03-22 13:06:24.000000000 +0100 +*************** +*** 879,894 **** + if (msg_silent != 0) + return; + +! /* +! * With the global command (and some others) we only need one return at the +! * end. Adjust cmdline_row to avoid the next message overwriting the last one. +! * When inside vgetc(), we can't wait for a typed character at all. +! */ + if (vgetc_busy > 0) + return; + if (no_wait_return) + { +- need_wait_return = TRUE; + if (!exmode_active) + cmdline_row = msg_row; + return; +--- 879,895 ---- + if (msg_silent != 0) + return; + +! /* +! * When inside vgetc(), we can't wait for a typed character at all. +! * With the global command (and some others) we only need one return at +! * the end. Adjust cmdline_row to avoid the next message overwriting the +! * last one. +! */ + if (vgetc_busy > 0) + return; ++ need_wait_return = TRUE; + if (no_wait_return) + { + if (!exmode_active) + cmdline_row = msg_row; + return; +*** ../vim-7.3.138/src/misc1.c 2011-03-03 15:04:01.000000000 +0100 +--- src/misc1.c 2011-03-22 12:15:26.000000000 +0100 +*************** +*** 3116,3122 **** + + if (n == KEYLEN_REMOVED) /* key code removed */ + { +! if (must_redraw) + { + /* Redrawing was postponed, do it now. */ + update_screen(0); +--- 3116,3122 ---- + + if (n == KEYLEN_REMOVED) /* key code removed */ + { +! if (must_redraw != 0 && !need_wait_return && (State & CMDLINE) == 0) + { + /* Redrawing was postponed, do it now. */ + update_screen(0); +*** ../vim-7.3.138/src/version.c 2011-03-03 15:54:45.000000000 +0100 +--- src/version.c 2011-03-22 13:06:33.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 139, + /**/ + +-- +"Software is like sex... it's better when it's free." + -- Linus Torvalds, initiator of the free Linux OS +Makes me wonder what FSF stands for...? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From abb11334b8fe1b6c9eb6e84266c15ef1e91ae516 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:39 +0200 Subject: [PATCH 0157/3803] - patchlevel 140 --- 7.3.140 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.140 diff --git a/7.3.140 b/7.3.140 new file mode 100644 index 00000000..53c3aafb --- /dev/null +++ b/7.3.140 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.140 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.140 +Problem: Crash when drawing the "$" at end-of-line for list mode just after + the window border and 'cursorline' is set. +Solution: Don't check for 'cursorline'. (Quentin Carbonneaux) +Files: src/screen.c + + +*** ../vim-7.3.139/src/screen.c 2011-02-09 17:09:26.000000000 +0100 +--- src/screen.c 2011-03-22 13:29:04.000000000 +0100 +*************** +*** 5099,5109 **** + #ifdef FEAT_DIFF + || filler_todo > 0 + #endif +! || (wp->w_p_list && lcs_eol != NUL && p_extra != at_end_str +! #ifdef FEAT_SYN_HL +! && !wp->w_p_cul +! #endif +! ) + || (n_extra != 0 && (c_extra != NUL || *p_extra != NUL))) + ) + { +--- 5099,5105 ---- + #ifdef FEAT_DIFF + || filler_todo > 0 + #endif +! || (wp->w_p_list && lcs_eol != NUL && p_extra != at_end_str) + || (n_extra != 0 && (c_extra != NUL || *p_extra != NUL))) + ) + { +*** ../vim-7.3.139/src/version.c 2011-03-22 13:07:19.000000000 +0100 +--- src/version.c 2011-03-22 13:27:26.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 140, + /**/ + +-- +Lawmakers made it obligatory for everybody to take at least one bath +each week -- on Saturday night. + [real standing law in Vermont, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 21c16b1213bb4c5b9d567e1d6ca9141b541b72e1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:40 +0200 Subject: [PATCH 0158/3803] - patchlevel 141 --- 7.3.141 | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 7.3.141 diff --git a/7.3.141 b/7.3.141 new file mode 100644 index 00000000..deb001b7 --- /dev/null +++ b/7.3.141 @@ -0,0 +1,94 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.141 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.141 +Problem: When a key code is not set get a confusing error message. +Solution: Change the error message to say the key code is not set. +Files: src/option.c, runtime/doc/options.txt + + +*** ../vim-7.3.140/src/option.c 2011-01-22 00:11:42.000000000 +0100 +--- src/option.c 2011-03-22 14:25:52.000000000 +0100 +*************** +*** 4352,4358 **** + p = find_termcode(key_name); + if (p == NULL) + { +! errmsg = (char_u *)N_("E518: Unknown option"); + goto skip; + } + else +--- 4352,4358 ---- + p = find_termcode(key_name); + if (p == NULL) + { +! errmsg = (char_u *)N_("E846: Key code not set"); + goto skip; + } + else +*************** +*** 4700,4707 **** + || s[i] == ',' + || s[i] == NUL)) + break; +! /* Count backspaces. Only a comma with an +! * even number of backspaces before it is + * recognized as a separator */ + if (s > origval && s[-1] == '\\') + ++bs; +--- 4700,4707 ---- + || s[i] == ',' + || s[i] == NUL)) + break; +! /* Count backslashes. Only a comma with an +! * even number of backslashes before it is + * recognized as a separator */ + if (s > origval && s[-1] == '\\') + ++bs; +*** ../vim-7.3.140/runtime/doc/options.txt 2010-12-02 21:43:10.000000000 +0100 +--- runtime/doc/options.txt 2011-03-22 14:32:14.000000000 +0100 +*************** +*** 150,155 **** +--- 150,167 ---- + (the ^[ is a real here, use CTRL-V to enter it) + The advantage over a mapping is that it works in all situations. + ++ You can define any key codes, e.g.: > ++ :set t_xy=^[foo; ++ There is no warning for using a name that isn't recognized. You can map these ++ codes as you like: > ++ :map something ++ < *E846* ++ When a key code is not set, it's like it does not exist. Trying to get its ++ value will result in an error: > ++ :set t_kb= ++ :set t_kb ++ E846: Key code not set: t_kb ++ + The t_xx options cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + +*** ../vim-7.3.140/src/version.c 2011-03-22 13:29:20.000000000 +0100 +--- src/version.c 2011-03-22 14:32:59.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 141, + /**/ + +-- +"I know that there are people who don't love their fellow man, +and I hate those people!" - Tom Lehrer + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5564970e125bf2c5eb905c058c69c7235ed59112 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:40 +0200 Subject: [PATCH 0159/3803] - patchlevel 142 --- 7.3.142 | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 7.3.142 diff --git a/7.3.142 b/7.3.142 new file mode 100644 index 00000000..6574f71f --- /dev/null +++ b/7.3.142 @@ -0,0 +1,85 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.142 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.142 +Problem: Python stdout doesn't have a flush() method, causing an import to + fail. +Solution: Add a dummy flush() method. (Tobias Columbus) +Files: src/if_py_both.h + + +*** ../vim-7.3.141/src/if_py_both.h 2010-10-27 12:17:54.000000000 +0200 +--- src/if_py_both.h 2011-03-22 15:37:43.000000000 +0100 +*************** +*** 33,38 **** +--- 33,39 ---- + + static PyObject *OutputWrite(PyObject *, PyObject *); + static PyObject *OutputWritelines(PyObject *, PyObject *); ++ static PyObject *OutputFlush(PyObject *, PyObject *); + + /* Function to write a line, points to either msg() or emsg(). */ + typedef void (*writefn)(char_u *); +*************** +*** 47,55 **** + + static struct PyMethodDef OutputMethods[] = { + /* name, function, calling, documentation */ +! {"write", OutputWrite, 1, "" }, +! {"writelines", OutputWritelines, 1, "" }, +! { NULL, NULL, 0, NULL } + }; + + #define PyErr_SetVim(str) PyErr_SetString(VimError, str) +--- 48,57 ---- + + static struct PyMethodDef OutputMethods[] = { + /* name, function, calling, documentation */ +! {"write", OutputWrite, 1, ""}, +! {"writelines", OutputWritelines, 1, ""}, +! {"flush", OutputFlush, 1, ""}, +! { NULL, NULL, 0, NULL} + }; + + #define PyErr_SetVim(str) PyErr_SetString(VimError, str) +*************** +*** 123,128 **** +--- 125,139 ---- + return Py_None; + } + ++ static PyObject * ++ OutputFlush(PyObject *self UNUSED, PyObject *args UNUSED) ++ { ++ /* do nothing */ ++ Py_INCREF(Py_None); ++ return Py_None; ++ } ++ ++ + /* Buffer IO, we write one whole line at a time. */ + static garray_T io_ga = {0, 0, 1, 80, NULL}; + static writefn old_fn = NULL; +*** ../vim-7.3.141/src/version.c 2011-03-22 14:35:01.000000000 +0100 +--- src/version.c 2011-03-22 15:45:38.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 142, + /**/ + +-- +Living on Earth includes an annual free trip around the Sun. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From be9a999800cdeefe33fadf53a1d2749993fac0ae Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:40 +0200 Subject: [PATCH 0160/3803] - patchlevel 143 --- 7.3.143 | 1520 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1520 insertions(+) create mode 100644 7.3.143 diff --git a/7.3.143 b/7.3.143 new file mode 100644 index 00000000..82585b0e --- /dev/null +++ b/7.3.143 @@ -0,0 +1,1520 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.143 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.143 +Problem: Memfile is not tested sufficiently. Looking up blocks in a + memfile is slow when there are many blocks. +Solution: Add high level test and unittest. Adjust the number of hash + buckets to the number of blocks. (Ivan Krasilnikov) +Files: Filelist, src/Makefile, src/main.c, src/memfile.c, + src/memfile_test.c src/structs.h src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mak, + src/testdir/Makefile, src/testdir/test77.in, src/testdir/test77.ok + + +*** ../vim-7.3.142/Filelist 2010-08-15 21:57:20.000000000 +0200 +--- Filelist 2011-03-22 17:39:22.000000000 +0100 +*************** +*** 39,44 **** +--- 39,45 ---- + src/mark.c \ + src/mbyte.c \ + src/memfile.c \ ++ src/memfile_test.c \ + src/memline.c \ + src/menu.c \ + src/message.c \ +*************** +*** 686,691 **** +--- 687,694 ---- + runtime/tutor/tutor.utf-8 \ + runtime/tutor/tutor.?? \ + runtime/tutor/tutor.??.* \ ++ runtime/tutor/tutor.bar \ ++ runtime/tutor/tutor.bar.* \ + runtime/spell/README.txt \ + runtime/spell/??/*.diff \ + runtime/spell/??/main.aap \ +*** ../vim-7.3.142/src/Makefile 2011-02-15 15:27:00.000000000 +0100 +--- src/Makefile 2011-03-22 18:07:25.000000000 +0100 +*************** +*** 561,567 **** + #CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce -Wall -Wmissing-prototypes + + # Use this with GCC to check for mistakes, unused arguments, etc. +! #CFLAGS = -g -Wall -Wextra -Wmissing-prototypes -Wunreachable-code -D_FORTIFY_SOURCE=1 -DU_DEBUG + #CFLAGS = -g -O2 -Wall -Wextra -Wmissing-prototypes -D_FORTIFY_SOURCE=1 -DU_DEBUG + #PYTHON_CFLAGS_EXTRA = -Wno-missing-field-initializers + #MZSCHEME_CFLAGS_EXTRA = -Wno-unreachable-code -Wno-unused-parameter +--- 561,567 ---- + #CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce -Wall -Wmissing-prototypes + + # Use this with GCC to check for mistakes, unused arguments, etc. +! #CFLAGS = -g -Wall -Wextra -Wmissing-prototypes -Wunreachable-code -D_FORTIFY_SOURCE=1 + #CFLAGS = -g -O2 -Wall -Wextra -Wmissing-prototypes -D_FORTIFY_SOURCE=1 -DU_DEBUG + #PYTHON_CFLAGS_EXTRA = -Wno-missing-field-initializers + #MZSCHEME_CFLAGS_EXTRA = -Wno-unreachable-code -Wno-unused-parameter +*************** +*** 594,601 **** + + # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof. + # Might not work with GUI or Perl. +! # For unknown reasons adding "-lc" fixes a linking problem with GCC. That's +! # probably a bug in the "-pg" implementation. + # Need to recompile everything after changing this: "make clean" "make". + #PROFILE_CFLAGS = -pg -g -DWE_ARE_PROFILING + #PROFILE_LIBS = -pg +--- 594,602 ---- + + # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof. + # Might not work with GUI or Perl. +! # For unknown reasons adding "-lc" fixes a linking problem with some versions +! # of GCC. That's probably a bug in the "-pg" implementation. +! # After running Vim see the profile result with: gmon vim gmon.out | vim - + # Need to recompile everything after changing this: "make clean" "make". + #PROFILE_CFLAGS = -pg -g -DWE_ARE_PROFILING + #PROFILE_LIBS = -pg +*************** +*** 606,613 **** + # Configuration is in the .ccmalloc or ~/.ccmalloc file. + # Doesn't work very well, since memory linked to from global variables + # (in libraries) is also marked as leaked memory. +! #PROFILE_CFLAGS = -DEXITFREE +! #PROFILE_LIBS = -lccmalloc + + ##################################################### + ### Specific systems, check if yours is listed! ### {{{ +--- 607,614 ---- + # Configuration is in the .ccmalloc or ~/.ccmalloc file. + # Doesn't work very well, since memory linked to from global variables + # (in libraries) is also marked as leaked memory. +! #LEAK_CFLAGS = -DEXITFREE +! #LEAK_LIBS = -lccmalloc + + ##################################################### + ### Specific systems, check if yours is listed! ### {{{ +*************** +*** 1329,1335 **** + PRE_DEFS = -Iproto $(DEFS) $(GUI_DEFS) $(GUI_IPATH) $(CPPFLAGS) $(EXTRA_IPATHS) + POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(TCL_CFLAGS) $(EXTRA_DEFS) + +! ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(POST_DEFS) + + # Exclude $CFLAGS for osdef.sh, for Mac 10.4 some flags don't work together + # with "-E". +--- 1330,1336 ---- + PRE_DEFS = -Iproto $(DEFS) $(GUI_DEFS) $(GUI_IPATH) $(CPPFLAGS) $(EXTRA_IPATHS) + POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(TCL_CFLAGS) $(EXTRA_DEFS) + +! ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(LEAK_CFLAGS) $(POST_DEFS) + + # Exclude $CFLAGS for osdef.sh, for Mac 10.4 some flags don't work together + # with "-E". +*************** +*** 1358,1364 **** + $(PYTHON3_LIBS) \ + $(TCL_LIBS) \ + $(RUBY_LIBS) \ +! $(PROFILE_LIBS) + + # abbreviations + DEST_BIN = $(DESTDIR)$(BINDIR) +--- 1359,1366 ---- + $(PYTHON3_LIBS) \ + $(TCL_LIBS) \ + $(RUBY_LIBS) \ +! $(PROFILE_LIBS) \ +! $(LEAK_LIBS) + + # abbreviations + DEST_BIN = $(DESTDIR)$(BINDIR) +*************** +*** 1480,1487 **** + if_python.c if_python3.c if_tcl.c if_ruby.c if_sniff.c \ + gui_beval.c workshop.c wsdebug.c integration.c netbeans.c + + # All sources, also the ones that are not configured +! ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(EXTRA_SRC) + + # Which files to check with lint. Select one of these three lines. ALL_SRC + # checks more, but may not work well for checking a GUI that wasn't configured. +--- 1482,1496 ---- + if_python.c if_python3.c if_tcl.c if_ruby.c if_sniff.c \ + gui_beval.c workshop.c wsdebug.c integration.c netbeans.c + ++ # Unittest files ++ MEMFILE_TEST_SRC = memfile_test.c ++ MEMFILE_TEST_TARGET = memfile_test$(EXEEXT) ++ ++ UNITTEST_SRC = $(MEMFILE_TEST_SRC) ++ UNITTEST_TARGETS = $(MEMFILE_TEST_TARGET) ++ + # All sources, also the ones that are not configured +! ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(UNITTEST_SRC) $(EXTRA_SRC) + + # Which files to check with lint. Select one of these three lines. ALL_SRC + # checks more, but may not work well for checking a GUI that wasn't configured. +*************** +*** 1492,1498 **** + #LINT_SRC = $(ALL_SRC) + #LINT_SRC = $(BASIC_SRC) + +! OBJ = \ + objects/buffer.o \ + objects/blowfish.o \ + objects/charset.o \ +--- 1501,1507 ---- + #LINT_SRC = $(ALL_SRC) + #LINT_SRC = $(BASIC_SRC) + +! OBJ_COMMON = \ + objects/buffer.o \ + objects/blowfish.o \ + objects/charset.o \ +*************** +*** 1513,1522 **** + $(HANGULIN_OBJ) \ + objects/if_cscope.o \ + objects/if_xcmdsrv.o \ +- objects/main.o \ + objects/mark.o \ +! objects/memfile.o \ +! objects/memline.o \ + objects/menu.o \ + objects/message.o \ + objects/misc1.o \ +--- 1522,1529 ---- + $(HANGULIN_OBJ) \ + objects/if_cscope.o \ + objects/if_xcmdsrv.o \ + objects/mark.o \ +! objects/memline.o \ + objects/menu.o \ + objects/message.o \ + objects/misc1.o \ +*************** +*** 1541,1546 **** +--- 1548,1554 ---- + objects/term.o \ + objects/ui.o \ + objects/undo.o \ ++ objects/version.o \ + objects/window.o \ + $(GUI_OBJ) \ + $(LUA_OBJ) \ +*************** +*** 1555,1560 **** +--- 1563,1575 ---- + $(NETBEANS_OBJ) \ + $(WSDEBUG_OBJ) + ++ OBJ = $(OBJ_COMMON) \ ++ objects/main.o \ ++ objects/memfile.o \ ++ ++ MEMFILE_TEST_OBJ = $(OBJ_COMMON) \ ++ objects/memfile_test.o ++ + PRO_AUTO = \ + blowfish.pro \ + buffer.pro \ +*************** +*** 1700,1706 **** + $(VIMTARGET): auto/config.mk objects $(OBJ) version.c version.h + $(CCC) version.c -o objects/version.o + @LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \ +! -o $(VIMTARGET) $(OBJ) objects/version.o $(ALL_LIBS)" \ + MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \ + sh $(srcdir)/link.sh + +--- 1715,1721 ---- + $(VIMTARGET): auto/config.mk objects $(OBJ) version.c version.h + $(CCC) version.c -o objects/version.o + @LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \ +! -o $(VIMTARGET) $(OBJ) $(ALL_LIBS)" \ + MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \ + sh $(srcdir)/link.sh + +*************** +*** 1825,1830 **** +--- 1840,1854 ---- + ln -s $(VIMTARGET) vim; \ + fi + cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) ++ $(MAKE) -f Makefile unittest ++ ++ unittesttargets: ++ $(MAKE) -f Makefile $(UNITTEST_TARGETS) ++ ++ unittest unittests: $(UNITTEST_TARGETS) ++ @for t in $(UNITTEST_TARGETS); do \ ++ ./$$t || exit 1; echo $$t passed; \ ++ done + + testclean: + cd testdir; $(MAKE) -f Makefile clean +*************** +*** 1832,1837 **** +--- 1856,1872 ---- + cd $(PODIR); $(MAKE) checkclean; \ + fi + ++ # Unittests ++ # It's build just like Vim to satisfy all dependencies. ++ $(MEMFILE_TEST_TARGET): auto/config.mk objects $(MEMFILE_TEST_OBJ) ++ $(CCC) version.c -o objects/version.o ++ @LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \ ++ -o $(MEMFILE_TEST_TARGET) $(MEMFILE_TEST_OBJ) $(ALL_LIBS)" \ ++ MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \ ++ sh $(srcdir)/link.sh ++ ++ # install targets ++ + install: $(GUI_INSTALL) + + install_normal: installvim installtools $(INSTALL_LANGS) install-icons +*************** +*** 2265,2270 **** +--- 2300,2306 ---- + -rm -f *.o objects/* core $(VIMTARGET).core $(VIMTARGET) vim xxd/*.o + -rm -f $(TOOLS) auto/osdef.h auto/pathdef.c auto/if_perl.c + -rm -f conftest* *~ auto/link.sed ++ -rm -f $(UNITTEST_TARGETS) + -rm -f runtime pixmaps + -rm -rf $(APPDIR) + -rm -rf mzscheme_base.c +*************** +*** 2559,2564 **** +--- 2595,2603 ---- + objects/memfile.o: memfile.c + $(CCC) -o $@ memfile.c + ++ objects/memfile_test.o: memfile_test.c ++ $(CCC) -o $@ memfile_test.c ++ + objects/memline.o: memline.c + $(CCC) -o $@ memline.c + +*************** +*** 2877,2883 **** + objects/os_unix.o: os_unix.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \ + ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ + gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ +! arabic.h if_mzsch.h os_unixx.h + objects/pathdef.o: auto/pathdef.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ +--- 2916,2922 ---- + objects/os_unix.o: os_unix.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \ + ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ + gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ +! arabic.h os_unixx.h + objects/pathdef.o: auto/pathdef.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ +*************** +*** 3016,3021 **** +--- 3055,3064 ---- + objects/pty.o: pty.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \ + keymap.h term.h macros.h option.h structs.h regexp.h gui.h gui_beval.h \ + proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h arabic.h ++ objects/memfile_test.o: memfile_test.c main.c vim.h auto/config.h feature.h \ ++ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h \ ++ structs.h regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h \ ++ proto.h globals.h farsi.h arabic.h farsi.c arabic.c memfile.c + objects/hangulin.o: hangulin.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ +*************** +*** 3027,3033 **** + objects/if_mzsch.o: if_mzsch.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ +! globals.h farsi.h arabic.h if_mzsch.h mzscheme_base.c + objects/if_perl.o: auto/if_perl.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ +--- 3070,3076 ---- + objects/if_mzsch.o: if_mzsch.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ +! globals.h farsi.h arabic.h if_mzsch.h + objects/if_perl.o: auto/if_perl.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ +*************** +*** 3048,3054 **** + ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ + gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ + arabic.h +! objects/if_ruby.o: if_ruby.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \ + ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ + gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ + arabic.h version.h +--- 3091,3097 ---- + ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ + gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ + arabic.h +! objects/if_ruby.o: if_ruby.c auto/config.h vim.h feature.h os_unix.h auto/osdef.h \ + ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ + gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ + arabic.h version.h +*** ../vim-7.3.142/src/main.c 2011-02-15 16:29:54.000000000 +0100 +--- src/main.c 2011-03-18 13:19:48.000000000 +0100 +*************** +*** 92,128 **** + #define EDIT_TAG 3 /* tag name argument given, use tagname */ + #define EDIT_QF 4 /* start in quickfix mode */ + +! #if defined(UNIX) || defined(VMS) + static int file_owned __ARGS((char *fname)); + #endif + static void mainerr __ARGS((int, char_u *)); + static void main_msg __ARGS((char *s)); + static void usage __ARGS((void)); + static int get_number_arg __ARGS((char_u *p, int *idx, int def)); +! #if defined(HAVE_LOCALE_H) || defined(X_LOCALE) + static void init_locale __ARGS((void)); +! #endif + static void parse_command_name __ARGS((mparm_T *parmp)); + static void early_arg_scan __ARGS((mparm_T *parmp)); + static void command_line_scan __ARGS((mparm_T *parmp)); + static void check_tty __ARGS((mparm_T *parmp)); + static void read_stdin __ARGS((void)); + static void create_windows __ARGS((mparm_T *parmp)); +! #ifdef FEAT_WINDOWS + static void edit_buffers __ARGS((mparm_T *parmp)); +! #endif + static void exe_pre_commands __ARGS((mparm_T *parmp)); + static void exe_commands __ARGS((mparm_T *parmp)); + static void source_startup_scripts __ARGS((mparm_T *parmp)); + static void main_start_gui __ARGS((void)); +! #if defined(HAS_SWAP_EXISTS_ACTION) + static void check_swap_exists_action __ARGS((void)); +! #endif +! #ifdef FEAT_CLIENTSERVER + static void exec_on_server __ARGS((mparm_T *parmp)); + static void prepare_server __ARGS((mparm_T *parmp)); + static void cmdsrv_main __ARGS((int *argc, char **argv, char_u *serverName_arg, char_u **serverStr)); + static char_u *serverMakeName __ARGS((char_u *arg, char *cmd)); + #endif + + +--- 92,130 ---- + #define EDIT_TAG 3 /* tag name argument given, use tagname */ + #define EDIT_QF 4 /* start in quickfix mode */ + +! #if (defined(UNIX) || defined(VMS)) && !defined(NO_VIM_MAIN) + static int file_owned __ARGS((char *fname)); + #endif + static void mainerr __ARGS((int, char_u *)); ++ #ifndef NO_VIM_MAIN + static void main_msg __ARGS((char *s)); + static void usage __ARGS((void)); + static int get_number_arg __ARGS((char_u *p, int *idx, int def)); +! # if defined(HAVE_LOCALE_H) || defined(X_LOCALE) + static void init_locale __ARGS((void)); +! # endif + static void parse_command_name __ARGS((mparm_T *parmp)); + static void early_arg_scan __ARGS((mparm_T *parmp)); + static void command_line_scan __ARGS((mparm_T *parmp)); + static void check_tty __ARGS((mparm_T *parmp)); + static void read_stdin __ARGS((void)); + static void create_windows __ARGS((mparm_T *parmp)); +! # ifdef FEAT_WINDOWS + static void edit_buffers __ARGS((mparm_T *parmp)); +! # endif + static void exe_pre_commands __ARGS((mparm_T *parmp)); + static void exe_commands __ARGS((mparm_T *parmp)); + static void source_startup_scripts __ARGS((mparm_T *parmp)); + static void main_start_gui __ARGS((void)); +! # if defined(HAS_SWAP_EXISTS_ACTION) + static void check_swap_exists_action __ARGS((void)); +! # endif +! # if defined(FEAT_CLIENTSERVER) || defined(PROTO) + static void exec_on_server __ARGS((mparm_T *parmp)); + static void prepare_server __ARGS((mparm_T *parmp)); + static void cmdsrv_main __ARGS((int *argc, char **argv, char_u *serverName_arg, char_u **serverStr)); + static char_u *serverMakeName __ARGS((char_u *arg, char *cmd)); ++ # endif + #endif + + +*************** +*** 145,151 **** + #define ME_INVALID_ARG 5 + }; + +! #ifndef PROTO /* don't want a prototype for main() */ + int + # ifdef VIMDLL + _export +--- 147,154 ---- + #define ME_INVALID_ARG 5 + }; + +! #ifndef NO_VIM_MAIN /* skip this for unittests */ +! #ifndef PROTO /* don't want a prototype for main() */ + int + # ifdef VIMDLL + _export +*************** +*** 966,971 **** +--- 969,975 ---- + return 0; + } + #endif /* PROTO */ ++ #endif /* NO_VIM_MAIN */ + + /* + * Main loop: Execute Normal mode commands until exiting Vim. +*************** +*** 1430,1435 **** +--- 1434,1440 ---- + mch_exit(exitval); + } + ++ #ifndef NO_VIM_MAIN + /* + * Get a (optional) count for a Vim argument. + */ +*************** +*** 2994,2999 **** +--- 2999,3006 ---- + #endif + } + ++ #endif /* NO_VIM_MAIN */ ++ + /* + * Get an environment variable, and execute it as Ex commands. + * Returns FAIL if the environment variable was not executed, OK otherwise. +*************** +*** 3033,3039 **** + return FAIL; + } + +! #if defined(UNIX) || defined(VMS) + /* + * Return TRUE if we are certain the user owns the file "fname". + * Used for ".vimrc" and ".exrc". +--- 3040,3046 ---- + return FAIL; + } + +! #if (defined(UNIX) || defined(VMS)) && !defined(NO_VIM_MAIN) + /* + * Return TRUE if we are certain the user owns the file "fname". + * Used for ".vimrc" and ".exrc". +*************** +*** 3091,3096 **** +--- 3098,3104 ---- + mainerr(ME_ARG_MISSING, str); + } + ++ #ifndef NO_VIM_MAIN + /* + * print a message with three spaces prepended and '\n' appended. + */ +*************** +*** 3311,3316 **** +--- 3319,3326 ---- + } + #endif + ++ #endif ++ + #if defined(STARTUPTIME) || defined(PROTO) + static void time_diff __ARGS((struct timeval *then, struct timeval *now)); + +*************** +*** 3420,3426 **** + + #endif + +! #if defined(FEAT_CLIENTSERVER) || defined(PROTO) + + /* + * Common code for the X command server and the Win32 command server. +--- 3430,3436 ---- + + #endif + +! #if (defined(FEAT_CLIENTSERVER) && !defined(NO_VIM_MAIN)) || defined(PROTO) + + /* + * Common code for the X command server and the Win32 command server. +*************** +*** 3888,3893 **** +--- 3898,3929 ---- + } + + /* ++ * Make our basic server name: use the specified "arg" if given, otherwise use ++ * the tail of the command "cmd" we were started with. ++ * Return the name in allocated memory. This doesn't include a serial number. ++ */ ++ static char_u * ++ serverMakeName(arg, cmd) ++ char_u *arg; ++ char *cmd; ++ { ++ char_u *p; ++ ++ if (arg != NULL && *arg != NUL) ++ p = vim_strsave_up(arg); ++ else ++ { ++ p = vim_strsave_up(gettail((char_u *)cmd)); ++ /* Remove .exe or .bat from the name. */ ++ if (p != NULL && vim_strchr(p, '.') != NULL) ++ *vim_strchr(p, '.') = NUL; ++ } ++ return p; ++ } ++ #endif /* FEAT_CLIENTSERVER */ ++ ++ #if defined(FEAT_CLIENTSERVER) || defined(PROTO) ++ /* + * Replace termcodes such as and insert as key presses if there is room. + */ + void +*************** +*** 3998,4029 **** + # endif + return res; + } +! +! +! /* +! * Make our basic server name: use the specified "arg" if given, otherwise use +! * the tail of the command "cmd" we were started with. +! * Return the name in allocated memory. This doesn't include a serial number. +! */ +! static char_u * +! serverMakeName(arg, cmd) +! char_u *arg; +! char *cmd; +! { +! char_u *p; +! +! if (arg != NULL && *arg != NUL) +! p = vim_strsave_up(arg); +! else +! { +! p = vim_strsave_up(gettail((char_u *)cmd)); +! /* Remove .exe or .bat from the name. */ +! if (p != NULL && vim_strchr(p, '.') != NULL) +! *vim_strchr(p, '.') = NUL; +! } +! return p; +! } +! #endif /* FEAT_CLIENTSERVER */ + + /* + * When FEAT_FKMAP is defined, also compile the Farsi source code. +--- 4034,4040 ---- + # endif + return res; + } +! #endif + + /* + * When FEAT_FKMAP is defined, also compile the Farsi source code. +*** ../vim-7.3.142/src/memfile.c 2010-12-17 18:06:00.000000000 +0100 +--- src/memfile.c 2011-03-03 18:47:39.000000000 +0100 +*************** +*** 84,89 **** +--- 84,96 ---- + static int mf_write_block __ARGS((memfile_T *mfp, bhdr_T *hp, off_t offset, unsigned size)); + static int mf_trans_add __ARGS((memfile_T *, bhdr_T *)); + static void mf_do_open __ARGS((memfile_T *, char_u *, int)); ++ static void mf_hash_init __ARGS((mf_hashtab_T *)); ++ static void mf_hash_free __ARGS((mf_hashtab_T *)); ++ static void mf_hash_free_all __ARGS((mf_hashtab_T *)); ++ static mf_hashitem_T *mf_hash_find __ARGS((mf_hashtab_T *, blocknr_T)); ++ static void mf_hash_add_item __ARGS((mf_hashtab_T *, mf_hashitem_T *)); ++ static void mf_hash_rem_item __ARGS((mf_hashtab_T *, mf_hashitem_T *)); ++ static int mf_hash_grow __ARGS((mf_hashtab_T *)); + + /* + * The functions for using a memfile: +*************** +*** 119,125 **** + int flags; + { + memfile_T *mfp; +- int i; + off_t size; + #if defined(STATFS) && defined(UNIX) && !defined(__QNX__) + # define USE_FSTATFS +--- 126,131 ---- +*************** +*** 152,162 **** + mfp->mf_used_last = NULL; + mfp->mf_dirty = FALSE; + mfp->mf_used_count = 0; +! for (i = 0; i < MEMHASHSIZE; ++i) +! { +! mfp->mf_hash[i] = NULL; /* hash lists are empty */ +! mfp->mf_trans[i] = NULL; /* trans lists are empty */ +! } + mfp->mf_page_size = MEMFILE_PAGE_SIZE; + #ifdef FEAT_CRYPT + mfp->mf_old_key = NULL; +--- 158,165 ---- + mfp->mf_used_last = NULL; + mfp->mf_dirty = FALSE; + mfp->mf_used_count = 0; +! mf_hash_init(&mfp->mf_hash); +! mf_hash_init(&mfp->mf_trans); + mfp->mf_page_size = MEMFILE_PAGE_SIZE; + #ifdef FEAT_CRYPT + mfp->mf_old_key = NULL; +*************** +*** 242,249 **** + int del_file; + { + bhdr_T *hp, *nextp; +- NR_TRANS *tp, *tpnext; +- int i; + + if (mfp == NULL) /* safety check */ + return; +--- 245,250 ---- +*************** +*** 263,274 **** + } + while (mfp->mf_free_first != NULL) /* free entries in free list */ + vim_free(mf_rem_free(mfp)); +! for (i = 0; i < MEMHASHSIZE; ++i) /* free entries in trans lists */ +! for (tp = mfp->mf_trans[i]; tp != NULL; tp = tpnext) +! { +! tpnext = tp->nt_next; +! vim_free(tp); +! } + vim_free(mfp->mf_fname); + vim_free(mfp->mf_ffname); + vim_free(mfp); +--- 264,271 ---- + } + while (mfp->mf_free_first != NULL) /* free entries in free list */ + vim_free(mf_rem_free(mfp)); +! mf_hash_free(&mfp->mf_hash); +! mf_hash_free_all(&mfp->mf_trans); /* free hashtable and its items */ + vim_free(mfp->mf_fname); + vim_free(mfp->mf_ffname); + vim_free(mfp); +*************** +*** 743,758 **** + memfile_T *mfp; + bhdr_T *hp; + { +! bhdr_T *hhp; +! int hash; +! +! hash = MEMHASH(hp->bh_bnum); +! hhp = mfp->mf_hash[hash]; +! hp->bh_hash_next = hhp; +! hp->bh_hash_prev = NULL; +! if (hhp != NULL) +! hhp->bh_hash_prev = hp; +! mfp->mf_hash[hash] = hp; + } + + /* +--- 740,746 ---- + memfile_T *mfp; + bhdr_T *hp; + { +! mf_hash_add_item(&mfp->mf_hash, (mf_hashitem_T *)hp); + } + + /* +*************** +*** 763,775 **** + memfile_T *mfp; + bhdr_T *hp; + { +! if (hp->bh_hash_prev == NULL) +! mfp->mf_hash[MEMHASH(hp->bh_bnum)] = hp->bh_hash_next; +! else +! hp->bh_hash_prev->bh_hash_next = hp->bh_hash_next; +! +! if (hp->bh_hash_next) +! hp->bh_hash_next->bh_hash_prev = hp->bh_hash_prev; + } + + /* +--- 751,757 ---- + memfile_T *mfp; + bhdr_T *hp; + { +! mf_hash_rem_item(&mfp->mf_hash, (mf_hashitem_T *)hp); + } + + /* +*************** +*** 780,791 **** + memfile_T *mfp; + blocknr_T nr; + { +! bhdr_T *hp; +! +! for (hp = mfp->mf_hash[MEMHASH(nr)]; hp != NULL; hp = hp->bh_hash_next) +! if (hp->bh_bnum == nr) +! break; +! return hp; + } + + /* +--- 762,768 ---- + memfile_T *mfp; + blocknr_T nr; + { +! return (bhdr_T *)mf_hash_find(&mfp->mf_hash, nr); + } + + /* +*************** +*** 1187,1193 **** + { + bhdr_T *freep; + blocknr_T new_bnum; +- int hash; + NR_TRANS *np; + int page_count; + +--- 1164,1169 ---- +*************** +*** 1235,1246 **** + hp->bh_bnum = new_bnum; + mf_ins_hash(mfp, hp); /* insert in new hash list */ + +! hash = MEMHASH(np->nt_old_bnum); /* insert in trans list */ +! np->nt_next = mfp->mf_trans[hash]; +! mfp->mf_trans[hash] = np; +! if (np->nt_next != NULL) +! np->nt_next->nt_prev = np; +! np->nt_prev = NULL; + + return OK; + } +--- 1211,1218 ---- + hp->bh_bnum = new_bnum; + mf_ins_hash(mfp, hp); /* insert in new hash list */ + +! /* Insert "np" into "mf_trans" hashtable with key "np->nt_old_bnum" */ +! mf_hash_add_item(&mfp->mf_trans, (mf_hashitem_T *)np); + + return OK; + } +*************** +*** 1255,1279 **** + memfile_T *mfp; + blocknr_T old_nr; + { +- int hash; + NR_TRANS *np; + blocknr_T new_bnum; + +! hash = MEMHASH(old_nr); +! for (np = mfp->mf_trans[hash]; np != NULL; np = np->nt_next) +! if (np->nt_old_bnum == old_nr) +! break; + if (np == NULL) /* not found */ + return old_nr; + + mfp->mf_neg_count--; + new_bnum = np->nt_new_bnum; +! if (np->nt_prev != NULL) /* remove entry from the trans list */ +! np->nt_prev->nt_next = np->nt_next; +! else +! mfp->mf_trans[hash] = np->nt_next; +! if (np->nt_next != NULL) +! np->nt_next->nt_prev = np->nt_prev; + vim_free(np); + + return new_bnum; +--- 1227,1246 ---- + memfile_T *mfp; + blocknr_T old_nr; + { + NR_TRANS *np; + blocknr_T new_bnum; + +! np = (NR_TRANS *)mf_hash_find(&mfp->mf_trans, old_nr); +! + if (np == NULL) /* not found */ + return old_nr; + + mfp->mf_neg_count--; + new_bnum = np->nt_new_bnum; +! +! /* remove entry from the trans list */ +! mf_hash_rem_item(&mfp->mf_trans, (mf_hashitem_T *)np); +! + vim_free(np); + + return new_bnum; +*************** +*** 1397,1399 **** +--- 1364,1570 ---- + mch_hide(mfp->mf_fname); /* try setting the 'hidden' flag */ + } + } ++ ++ /* ++ * Implementation of mf_hashtab_T follows. ++ */ ++ ++ /* ++ * The number of buckets in the hashtable is increased by a factor of ++ * MHT_GROWTH_FACTOR when the average number of items per bucket ++ * exceeds 2 ^ MHT_LOG_LOAD_FACTOR. ++ */ ++ #define MHT_LOG_LOAD_FACTOR 6 ++ #define MHT_GROWTH_FACTOR 2 /* must be a power of two */ ++ ++ /* ++ * Initialize an empty hash table. ++ */ ++ static void ++ mf_hash_init(mht) ++ mf_hashtab_T *mht; ++ { ++ vim_memset(mht, 0, sizeof(mf_hashtab_T)); ++ mht->mht_buckets = mht->mht_small_buckets; ++ mht->mht_mask = MHT_INIT_SIZE - 1; ++ } ++ ++ /* ++ * Free the array of a hash table. Does not free the items it contains! ++ * The hash table must not be used again without another mf_hash_init() call. ++ */ ++ static void ++ mf_hash_free(mht) ++ mf_hashtab_T *mht; ++ { ++ if (mht->mht_buckets != mht->mht_small_buckets) ++ vim_free(mht->mht_buckets); ++ } ++ ++ /* ++ * Free the array of a hash table and all the items it contains. ++ */ ++ static void ++ mf_hash_free_all(mht) ++ mf_hashtab_T *mht; ++ { ++ long_u idx; ++ mf_hashitem_T *mhi; ++ mf_hashitem_T *next; ++ ++ for (idx = 0; idx <= mht->mht_mask; idx++) ++ for (mhi = mht->mht_buckets[idx]; mhi != NULL; mhi = next) ++ { ++ next = mhi->mhi_next; ++ vim_free(mhi); ++ } ++ ++ mf_hash_free(mht); ++ } ++ ++ /* ++ * Find "key" in hashtable "mht". ++ * Returns a pointer to a mf_hashitem_T or NULL if the item was not found. ++ */ ++ static mf_hashitem_T * ++ mf_hash_find(mht, key) ++ mf_hashtab_T *mht; ++ blocknr_T key; ++ { ++ mf_hashitem_T *mhi; ++ ++ mhi = mht->mht_buckets[key & mht->mht_mask]; ++ while (mhi != NULL && mhi->mhi_key != key) ++ mhi = mhi->mhi_next; ++ ++ return mhi; ++ } ++ ++ /* ++ * Add item "mhi" to hashtable "mht". ++ * "mhi" must not be NULL. ++ */ ++ static void ++ mf_hash_add_item(mht, mhi) ++ mf_hashtab_T *mht; ++ mf_hashitem_T *mhi; ++ { ++ long_u idx; ++ ++ idx = mhi->mhi_key & mht->mht_mask; ++ mhi->mhi_next = mht->mht_buckets[idx]; ++ mhi->mhi_prev = NULL; ++ if (mhi->mhi_next != NULL) ++ mhi->mhi_next->mhi_prev = mhi; ++ mht->mht_buckets[idx] = mhi; ++ ++ mht->mht_count++; ++ ++ /* ++ * Grow hashtable when we have more thank 2^MHT_LOG_LOAD_FACTOR ++ * items per bucket on average ++ */ ++ if (mht->mht_fixed == 0 ++ && (mht->mht_count >> MHT_LOG_LOAD_FACTOR) > mht->mht_mask) ++ { ++ if (mf_hash_grow(mht) == FAIL) ++ { ++ /* stop trying to grow after first failure to allocate memory */ ++ mht->mht_fixed = 1; ++ } ++ } ++ } ++ ++ /* ++ * Remove item "mhi" from hashtable "mht". ++ * "mhi" must not be NULL and must have been inserted into "mht". ++ */ ++ static void ++ mf_hash_rem_item(mht, mhi) ++ mf_hashtab_T *mht; ++ mf_hashitem_T *mhi; ++ { ++ if (mhi->mhi_prev == NULL) ++ mht->mht_buckets[mhi->mhi_key & mht->mht_mask] = mhi->mhi_next; ++ else ++ mhi->mhi_prev->mhi_next = mhi->mhi_next; ++ ++ if (mhi->mhi_next != NULL) ++ mhi->mhi_next->mhi_prev = mhi->mhi_prev; ++ ++ mht->mht_count--; ++ ++ /* We could shrink the table here, but it typically takes little memory, ++ * so why bother? */ ++ } ++ ++ /* ++ * Increase number of buckets in the hashtable by MHT_GROWTH_FACTOR and ++ * rehash items. ++ * Returns FAIL when out of memory. ++ */ ++ static int ++ mf_hash_grow(mht) ++ mf_hashtab_T *mht; ++ { ++ long_u i, j; ++ int shift; ++ mf_hashitem_T *mhi; ++ mf_hashitem_T *tails[MHT_GROWTH_FACTOR]; ++ mf_hashitem_T **buckets; ++ size_t size; ++ ++ size = (mht->mht_mask + 1) * MHT_GROWTH_FACTOR * sizeof(void *); ++ buckets = (mf_hashitem_T **)lalloc_clear(size, FALSE); ++ if (buckets == NULL) ++ return FAIL; ++ ++ shift = 0; ++ while ((mht->mht_mask >> shift) != 0) ++ shift++; ++ ++ for (i = 0; i <= mht->mht_mask; i++) ++ { ++ /* ++ * Traverse the items in the i-th original bucket and move them into ++ * MHT_GROWTH_FACTOR new buckets, preserving their relative order ++ * within each new bucket. Preserving the order is important because ++ * mf_get() tries to keep most recently used items at the front of ++ * each bucket. ++ * ++ * Here we strongly rely on the fact the hashes are computed modulo ++ * a power of two. ++ */ ++ ++ vim_memset(tails, 0, sizeof(tails)); ++ ++ for (mhi = mht->mht_buckets[i]; mhi != NULL; mhi = mhi->mhi_next) ++ { ++ j = (mhi->mhi_key >> shift) & (MHT_GROWTH_FACTOR - 1); ++ if (tails[j] == NULL) ++ { ++ buckets[i + (j << shift)] = mhi; ++ tails[j] = mhi; ++ mhi->mhi_prev = NULL; ++ } ++ else ++ { ++ tails[j]->mhi_next = mhi; ++ mhi->mhi_prev = tails[j]; ++ tails[j] = mhi; ++ } ++ } ++ ++ for (j = 0; j < MHT_GROWTH_FACTOR; j++) ++ if (tails[j] != NULL) ++ tails[j]->mhi_next = NULL; ++ } ++ ++ if (mht->mht_buckets != mht->mht_small_buckets) ++ vim_free(mht->mht_buckets); ++ ++ mht->mht_buckets = buckets; ++ mht->mht_mask = (mht->mht_mask + 1) * MHT_GROWTH_FACTOR - 1; ++ ++ return OK; ++ } +*** ../vim-7.3.142/src/memfile_test.c 2011-03-03 21:58:14.000000000 +0100 +--- src/memfile_test.c 2011-03-03 20:40:29.000000000 +0100 +*************** +*** 0 **** +--- 1,145 ---- ++ /* vi:set ts=8 sts=4 sw=4: ++ * ++ * VIM - Vi IMproved by Bram Moolenaar ++ * ++ * Do ":help uganda" in Vim to read copying and usage conditions. ++ * Do ":help credits" in Vim to see a list of people who contributed. ++ * See README.txt for an overview of the Vim source code. ++ */ ++ ++ /* ++ * memfile_test.c: Unittests for memfile.c ++ * Mostly by Ivan Krasilnikov. ++ */ ++ ++ #undef NDEBUG ++ #include ++ ++ /* Must include main.c because it contains much more than just main() */ ++ #define NO_VIM_MAIN ++ #include "main.c" ++ ++ /* This file has to be included because the tested functions are static */ ++ #include "memfile.c" ++ ++ #define index_to_key(i) ((i) ^ 15167) ++ #define TEST_COUNT 50000 ++ ++ static void test_mf_hash __ARGS((void)); ++ ++ /* ++ * Test mf_hash_*() functions. ++ */ ++ static void ++ test_mf_hash() ++ { ++ mf_hashtab_T ht; ++ mf_hashitem_T *item; ++ blocknr_T key; ++ long_u i; ++ long_u num_buckets; ++ ++ mf_hash_init(&ht); ++ ++ /* insert some items and check invariants */ ++ for (i = 0; i < TEST_COUNT; i++) ++ { ++ assert(ht.mht_count == i); ++ ++ /* check that number of buckets is a power of 2 */ ++ num_buckets = ht.mht_mask + 1; ++ assert(num_buckets > 0 && (num_buckets & (num_buckets - 1)) == 0); ++ ++ /* check load factor */ ++ assert(ht.mht_count <= (num_buckets << MHT_LOG_LOAD_FACTOR)); ++ ++ if (i < (MHT_INIT_SIZE << MHT_LOG_LOAD_FACTOR)) ++ { ++ /* first expansion shouldn't have occurred yet */ ++ assert(num_buckets == MHT_INIT_SIZE); ++ assert(ht.mht_buckets == ht.mht_small_buckets); ++ } ++ else ++ { ++ assert(num_buckets > MHT_INIT_SIZE); ++ assert(ht.mht_buckets != ht.mht_small_buckets); ++ } ++ ++ key = index_to_key(i); ++ assert(mf_hash_find(&ht, key) == NULL); ++ ++ /* allocate and add new item */ ++ item = (mf_hashitem_T *)lalloc_clear(sizeof(mf_hashtab_T), FALSE); ++ assert(item != NULL); ++ item->mhi_key = key; ++ mf_hash_add_item(&ht, item); ++ ++ assert(mf_hash_find(&ht, key) == item); ++ ++ if (ht.mht_mask + 1 != num_buckets) ++ { ++ /* hash table was expanded */ ++ assert(ht.mht_mask + 1 == num_buckets * MHT_GROWTH_FACTOR); ++ assert(i + 1 == (num_buckets << MHT_LOG_LOAD_FACTOR)); ++ } ++ } ++ ++ /* check presence of inserted items */ ++ for (i = 0; i < TEST_COUNT; i++) ++ { ++ key = index_to_key(i); ++ item = mf_hash_find(&ht, key); ++ assert(item != NULL); ++ assert(item->mhi_key == key); ++ } ++ ++ /* delete some items */ ++ for (i = 0; i < TEST_COUNT; i++) ++ { ++ if (i % 100 < 70) ++ { ++ key = index_to_key(i); ++ item = mf_hash_find(&ht, key); ++ assert(item != NULL); ++ assert(item->mhi_key == key); ++ ++ mf_hash_rem_item(&ht, item); ++ assert(mf_hash_find(&ht, key) == NULL); ++ ++ mf_hash_add_item(&ht, item); ++ assert(mf_hash_find(&ht, key) == item); ++ ++ mf_hash_rem_item(&ht, item); ++ assert(mf_hash_find(&ht, key) == NULL); ++ ++ vim_free(item); ++ } ++ } ++ ++ /* check again */ ++ for (i = 0; i < TEST_COUNT; i++) ++ { ++ key = index_to_key(i); ++ item = mf_hash_find(&ht, key); ++ ++ if (i % 100 < 70) ++ { ++ assert(item == NULL); ++ } ++ else ++ { ++ assert(item != NULL); ++ assert(item->mhi_key == key); ++ } ++ } ++ ++ /* free hash table and all remaining items */ ++ mf_hash_free_all(&ht); ++ } ++ ++ int ++ main() ++ { ++ test_mf_hash(); ++ return 0; ++ } +*** ../vim-7.3.142/src/structs.h 2011-02-15 17:39:14.000000000 +0100 +--- src/structs.h 2011-03-03 18:49:01.000000000 +0100 +*************** +*** 378,383 **** +--- 378,412 ---- + typedef long blocknr_T; + + /* ++ * mf_hashtab_T is a chained hashtable with blocknr_T key and arbitrary ++ * structures as items. This is an intrusive data structure: we require ++ * that items begin with mf_hashitem_T which contains the key and linked ++ * list pointers. List of items in each bucket is doubly-linked. ++ */ ++ ++ typedef struct mf_hashitem_S mf_hashitem_T; ++ ++ struct mf_hashitem_S ++ { ++ mf_hashitem_T *mhi_next; ++ mf_hashitem_T *mhi_prev; ++ blocknr_T mhi_key; ++ }; ++ ++ #define MHT_INIT_SIZE 64 ++ ++ typedef struct mf_hashtab_S ++ { ++ long_u mht_mask; /* mask used for hash value (nr of items ++ * in array is "mht_mask" + 1) */ ++ long_u mht_count; /* nr of items inserted into hashtable */ ++ mf_hashitem_T **mht_buckets; /* points to mht_small_buckets or ++ *dynamically allocated array */ ++ mf_hashitem_T *mht_small_buckets[MHT_INIT_SIZE]; /* initial buckets */ ++ char mht_fixed; /* non-zero value forbids growth */ ++ } mf_hashtab_T; ++ ++ /* + * for each (previously) used block in the memfile there is one block header. + * + * The block may be linked in the used list OR in the free list. +*************** +*** 394,404 **** + + struct block_hdr + { + bhdr_T *bh_next; /* next block_hdr in free or used list */ + bhdr_T *bh_prev; /* previous block_hdr in used list */ +- bhdr_T *bh_hash_next; /* next block_hdr in hash list */ +- bhdr_T *bh_hash_prev; /* previous block_hdr in hash list */ +- blocknr_T bh_bnum; /* block number */ + char_u *bh_data; /* pointer to memory (for used block) */ + int bh_page_count; /* number of pages in this block */ + +--- 423,433 ---- + + struct block_hdr + { ++ mf_hashitem_T bh_hashitem; /* header for hash table and key */ ++ #define bh_bnum bh_hashitem.mhi_key /* block number, part of bh_hashitem */ ++ + bhdr_T *bh_next; /* next block_hdr in free or used list */ + bhdr_T *bh_prev; /* previous block_hdr in used list */ + char_u *bh_data; /* pointer to memory (for used block) */ + int bh_page_count; /* number of pages in this block */ + +*************** +*** 417,425 **** + + struct nr_trans + { +! NR_TRANS *nt_next; /* next nr_trans in hash list */ +! NR_TRANS *nt_prev; /* previous nr_trans in hash list */ +! blocknr_T nt_old_bnum; /* old, negative, number */ + blocknr_T nt_new_bnum; /* new, positive, number */ + }; + +--- 446,454 ---- + + struct nr_trans + { +! mf_hashitem_T nt_hashitem; /* header for hash table and key */ +! #define nt_old_bnum nt_hashitem.mhi_key /* old, negative, number */ +! + blocknr_T nt_new_bnum; /* new, positive, number */ + }; + +*************** +*** 499,510 **** + + typedef struct file_buffer buf_T; /* forward declaration */ + +- /* +- * Simplistic hashing scheme to quickly locate the blocks in the used list. +- * 64 blocks are found directly (64 * 4K = 256K, most files are smaller). +- */ +- #define MEMHASHSIZE 64 +- #define MEMHASH(nr) ((nr) & (MEMHASHSIZE - 1)) + #define MF_SEED_LEN 8 + + struct memfile +--- 528,533 ---- +*************** +*** 517,524 **** + bhdr_T *mf_used_last; /* lru block_hdr in used list */ + unsigned mf_used_count; /* number of pages in used list */ + unsigned mf_used_count_max; /* maximum number of pages in memory */ +! bhdr_T *mf_hash[MEMHASHSIZE]; /* array of hash lists */ +! NR_TRANS *mf_trans[MEMHASHSIZE]; /* array of trans lists */ + blocknr_T mf_blocknr_max; /* highest positive block number + 1*/ + blocknr_T mf_blocknr_min; /* lowest negative block number - 1 */ + blocknr_T mf_neg_count; /* number of negative blocks numbers */ +--- 540,547 ---- + bhdr_T *mf_used_last; /* lru block_hdr in used list */ + unsigned mf_used_count; /* number of pages in used list */ + unsigned mf_used_count_max; /* maximum number of pages in memory */ +! mf_hashtab_T mf_hash; /* hash lists */ +! mf_hashtab_T mf_trans; /* trans lists */ + blocknr_T mf_blocknr_max; /* highest positive block number + 1*/ + blocknr_T mf_blocknr_min; /* lowest negative block number - 1 */ + blocknr_T mf_neg_count; /* number of negative blocks numbers */ +*** ../vim-7.3.142/src/testdir/Make_amiga.mak 2010-11-10 16:54:16.000000000 +0100 +--- src/testdir/Make_amiga.mak 2011-03-03 17:04:14.000000000 +0100 +*************** +*** 28,34 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out + + .SUFFIXES: .in .out + +--- 28,34 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out + + .SUFFIXES: .in .out + +*************** +*** 124,126 **** +--- 124,127 ---- + test74.out: test74.in + test75.out: test75.in + test76.out: test76.in ++ test77.out: test77.in +*** ../vim-7.3.142/src/testdir/Make_dos.mak 2010-11-10 16:54:16.000000000 +0100 +--- src/testdir/Make_dos.mak 2011-03-03 17:04:20.000000000 +0100 +*************** +*** 28,34 **** + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out + + SCRIPTS32 = test50.out test70.out + +--- 28,34 ---- + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.142/src/testdir/Make_ming.mak 2010-11-10 16:54:16.000000000 +0100 +--- src/testdir/Make_ming.mak 2011-03-03 17:04:32.000000000 +0100 +*************** +*** 48,54 **** + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out + + SCRIPTS32 = test50.out test70.out + +--- 48,54 ---- + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.142/src/testdir/Make_os2.mak 2010-11-10 16:54:16.000000000 +0100 +--- src/testdir/Make_os2.mak 2011-03-03 17:04:48.000000000 +0100 +*************** +*** 28,34 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out + + .SUFFIXES: .in .out + +--- 28,34 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out + + .SUFFIXES: .in .out + +*** ../vim-7.3.142/src/testdir/Makefile 2010-11-10 16:54:16.000000000 +0100 +--- src/testdir/Makefile 2011-03-22 17:03:25.000000000 +0100 +*************** +*** 25,31 **** + test59.out test60.out test61.out test62.out test63.out \ + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out + + SCRIPTS_GUI = test16.out + +--- 25,31 ---- + test59.out test60.out test61.out test62.out test63.out \ + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out + + SCRIPTS_GUI = test16.out + +*************** +*** 71,77 **** + fi \ + else echo $* NO OUTPUT >>test.log; \ + fi" +! -rm -rf X* test.ok viminfo + + test49.out: test49.vim + +--- 71,77 ---- + fi \ + else echo $* NO OUTPUT >>test.log; \ + fi" +! # -rm -rf X* test.ok viminfo + + test49.out: test49.vim + +*** ../vim-7.3.142/src/testdir/test77.in 2011-03-03 21:59:10.000000000 +0100 +--- src/testdir/test77.in 2011-03-22 17:12:38.000000000 +0100 +*************** +*** 0 **** +--- 1,27 ---- ++ Inserts 2 million lines with consecutive integers starting from 1 ++ (essentially, the output of GNU's seq 1 2000000), writes them to Xtest ++ and writes its cksum to test.out. ++ ++ We need 2 million lines to trigger a call to mf_hash_grow(). If it would mess ++ up the lines the checksum would differ. ++ ++ cksum is part of POSIX and so should be available on most Unixes. ++ If it isn't available then the test will be skipped. ++ ++ STARTTEST ++ :so small.vim ++ :if !executable("cksum") ++ : e! test.ok ++ : w! test.out ++ : qa! ++ :endif ++ :set fileformat=unix undolevels=-1 ++ ggdG ++ :let i = 1 ++ :while i <= 2000000 | call append(i, range(i, i + 99)) | let i += 100 | endwhile ++ ggdd ++ :w! Xtest ++ :!cksum Xtest > test.out ++ :qa! ++ ENDTEST ++ +*** ../vim-7.3.142/src/testdir/test77.ok 2011-03-03 21:59:10.000000000 +0100 +--- src/testdir/test77.ok 2011-03-22 17:10:14.000000000 +0100 +*************** +*** 0 **** +--- 1 ---- ++ 3678979763 14888896 Xtest +*** ../vim-7.3.142/src/version.c 2011-03-22 15:47:18.000000000 +0100 +--- src/version.c 2011-03-22 18:01:48.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 143, + /**/ + +-- +SIGIRO -- irony detected (iron core dumped) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f991836289ae05796eed3c4e5039f70ad1babada Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:40 +0200 Subject: [PATCH 0161/3803] - patchlevel 144 --- 7.3.144 | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 7.3.144 diff --git a/7.3.144 b/7.3.144 new file mode 100644 index 00000000..3bdea8da --- /dev/null +++ b/7.3.144 @@ -0,0 +1,80 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.144 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.144 +Problem: Crash with ":python help(dir)". (Kearn Holliday) +Solution: Fix the way the type is set on objects. (Tobias Columbus) +Files: src/if_python.c + + +*** ../vim-7.3.143/src/if_python.c 2010-11-16 19:25:56.000000000 +0100 +--- src/if_python.c 2011-03-26 13:54:22.000000000 +0100 +*************** +*** 780,786 **** + PythonIO_Init(void) + { + /* Fixups... */ +! OutputType.ob_type = &PyType_Type; + + return PythonIO_Init_io(); + } +--- 780,786 ---- + PythonIO_Init(void) + { + /* Fixups... */ +! PyType_Ready(&OutputType); + + return PythonIO_Init_io(); + } +*************** +*** 1402,1413 **** + static char *(argv[2]) = {"/must>not&exist/foo", NULL}; + + /* Fixups... */ +! BufferType.ob_type = &PyType_Type; +! RangeType.ob_type = &PyType_Type; +! WindowType.ob_type = &PyType_Type; +! BufListType.ob_type = &PyType_Type; +! WinListType.ob_type = &PyType_Type; +! CurrentType.ob_type = &PyType_Type; + + /* Set sys.argv[] to avoid a crash in warn(). */ + PySys_SetArgv(1, argv); +--- 1402,1413 ---- + static char *(argv[2]) = {"/must>not&exist/foo", NULL}; + + /* Fixups... */ +! PyType_Ready(&BufferType); +! PyType_Ready(&RangeType); +! PyType_Ready(&WindowType); +! PyType_Ready(&BufListType); +! PyType_Ready(&WinListType); +! PyType_Ready(&CurrentType); + + /* Set sys.argv[] to avoid a crash in warn(). */ + PySys_SetArgv(1, argv); +*** ../vim-7.3.143/src/version.c 2011-03-22 18:10:34.000000000 +0100 +--- src/version.c 2011-03-26 13:56:15.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 144, + /**/ + +-- +The chat program is in public domain. This is not the GNU public license. +If it breaks then you get to keep both pieces. + -- Copyright notice for the chat program + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 080bab591145bc397bb09c383e542867743a856e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:41 +0200 Subject: [PATCH 0162/3803] - patchlevel 145 --- 7.3.145 | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 7.3.145 diff --git a/7.3.145 b/7.3.145 new file mode 100644 index 00000000..a435fc28 --- /dev/null +++ b/7.3.145 @@ -0,0 +1,64 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.145 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.145 (after 7.3.144) +Problem: Can't build with Python dynamically loading. +Solution: Add dll_PyType_Ready. +Files: src/if_python.c + + +*** ../vim-7.3.144/src/if_python.c 2011-03-26 13:56:41.000000000 +0100 +--- src/if_python.c 2011-03-26 18:10:00.000000000 +0100 +*************** +*** 165,170 **** +--- 165,171 ---- + # define PySys_SetObject dll_PySys_SetObject + # define PySys_SetArgv dll_PySys_SetArgv + # define PyType_Type (*dll_PyType_Type) ++ # define PyType_Ready (*dll_PyType_Ready) + # define Py_BuildValue dll_Py_BuildValue + # define Py_FindMethod dll_Py_FindMethod + # define Py_InitModule4 dll_Py_InitModule4 +*************** +*** 224,229 **** +--- 225,231 ---- + static int(*dll_PySys_SetObject)(char *, PyObject *); + static int(*dll_PySys_SetArgv)(int, char **); + static PyTypeObject* dll_PyType_Type; ++ static int (*dll_PyType_Ready)(PyTypeObject *type); + static PyObject*(*dll_Py_BuildValue)(char *, ...); + static PyObject*(*dll_Py_FindMethod)(struct PyMethodDef[], PyObject *, char *); + static PyObject*(*dll_Py_InitModule4)(char *, struct PyMethodDef *, char *, PyObject *, int); +*************** +*** 305,310 **** +--- 307,313 ---- + {"PySys_SetObject", (PYTHON_PROC*)&dll_PySys_SetObject}, + {"PySys_SetArgv", (PYTHON_PROC*)&dll_PySys_SetArgv}, + {"PyType_Type", (PYTHON_PROC*)&dll_PyType_Type}, ++ {"PyType_Ready", (PYTHON_PROC*)&dll_PyType_Ready}, + {"Py_BuildValue", (PYTHON_PROC*)&dll_Py_BuildValue}, + {"Py_FindMethod", (PYTHON_PROC*)&dll_Py_FindMethod}, + # if (PY_VERSION_HEX >= 0x02050000) && SIZEOF_SIZE_T != SIZEOF_INT +*** ../vim-7.3.144/src/version.c 2011-03-26 13:56:41.000000000 +0100 +--- src/version.c 2011-03-26 18:11:19.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 145, + /**/ + +-- +This message contains 78% recycled characters. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From c97417177155058b528830e2d183ccb8c5a5a375 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:41 +0200 Subject: [PATCH 0163/3803] - patchlevel 146 --- 7.3.146 | 224 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 7.3.146 diff --git a/7.3.146 b/7.3.146 new file mode 100644 index 00000000..0a7390ce --- /dev/null +++ b/7.3.146 @@ -0,0 +1,224 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.146 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.146 +Problem: It's possible to assign to a read-only member of a dict. + It's possible to create a global variable "0". (ZyX) + It's possible to add a v: variable with ":let v:.name = 1". +Solution: Add check for dict item being read-only. + Check the name of g: variables. + Disallow adding v: variables. +Files: src/eval.c + + +*** ../vim-7.3.145/src/eval.c 2011-02-01 13:48:47.000000000 +0100 +--- src/eval.c 2011-03-27 15:56:44.000000000 +0200 +*************** +*** 789,794 **** +--- 789,796 ---- + static void set_var __ARGS((char_u *name, typval_T *varp, int copy)); + static int var_check_ro __ARGS((int flags, char_u *name)); + static int var_check_fixed __ARGS((int flags, char_u *name)); ++ static int var_check_func_name __ARGS((char_u *name, int new_var)); ++ static int valid_varname __ARGS((char_u *varname)); + static int tv_check_lock __ARGS((int lock, char_u *name)); + static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int copyID)); + static char_u *find_option_end __ARGS((char_u **arg, int *opt_flags)); +*************** +*** 2716,2723 **** +--- 2718,2744 ---- + lp->ll_list = NULL; + lp->ll_dict = lp->ll_tv->vval.v_dict; + lp->ll_di = dict_find(lp->ll_dict, key, len); ++ ++ /* When assigning to g: check that a function and variable name is ++ * valid. */ ++ if (rettv != NULL && lp->ll_dict == &globvardict) ++ { ++ if (rettv->v_type == VAR_FUNC ++ && var_check_func_name(key, lp->ll_di == NULL)) ++ return NULL; ++ if (!valid_varname(key)) ++ return NULL; ++ } ++ + if (lp->ll_di == NULL) + { ++ /* Can't add "v:" variable. */ ++ if (lp->ll_dict == &vimvardict) ++ { ++ EMSG2(_(e_illvar), name); ++ return NULL; ++ } ++ + /* Key does not exist in dict: may need to add it. */ + if (*p == '[' || *p == '.' || unlet) + { +*************** +*** 2737,2742 **** +--- 2758,2767 ---- + p = NULL; + break; + } ++ /* existing variable, need to check if it can be changed */ ++ else if (var_check_ro(lp->ll_di->di_flags, name)) ++ return NULL; ++ + if (len == -1) + clear_tv(&var1); + lp->ll_tv = &lp->ll_di->di_tv; +*************** +*** 19786,19792 **** + dictitem_T *v; + char_u *varname; + hashtab_T *ht; +- char_u *p; + + ht = find_var_ht(name, &varname); + if (ht == NULL || *varname == NUL) +--- 19811,19816 ---- +*************** +*** 19796,19820 **** + } + v = find_var_in_ht(ht, varname, TRUE); + +! if (tv->v_type == VAR_FUNC) +! { +! if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':') +! && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') +! ? name[2] : name[0])) +! { +! EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name); +! return; +! } +! /* Don't allow hiding a function. When "v" is not NULL we might be +! * assigning another function to the same var, the type is checked +! * below. */ +! if (v == NULL && function_exists(name)) +! { +! EMSG2(_("E705: Variable name conflicts with existing function: %s"), +! name); +! return; +! } +! } + + if (v != NULL) + { +--- 19820,19827 ---- + } + v = find_var_in_ht(ht, varname, TRUE); + +! if (tv->v_type == VAR_FUNC && var_check_func_name(name, v == NULL)) +! return; + + if (v != NULL) + { +*************** +*** 19880,19892 **** + } + + /* Make sure the variable name is valid. */ +! for (p = varname; *p != NUL; ++p) +! if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p)) +! && *p != AUTOLOAD_CHAR) +! { +! EMSG2(_(e_illvar), varname); +! return; +! } + + v = (dictitem_T *)alloc((unsigned)(sizeof(dictitem_T) + + STRLEN(varname))); +--- 19887,19894 ---- + } + + /* Make sure the variable name is valid. */ +! if (!valid_varname(varname)) +! return; + + v = (dictitem_T *)alloc((unsigned)(sizeof(dictitem_T) + + STRLEN(varname))); +*************** +*** 19951,19956 **** +--- 19953,20007 ---- + } + + /* ++ * Check if a funcref is assigned to a valid variable name. ++ * Return TRUE and give an error if not. ++ */ ++ static int ++ var_check_func_name(name, new_var) ++ char_u *name; /* points to start of variable name */ ++ int new_var; /* TRUE when creating the variable */ ++ { ++ if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':') ++ && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') ++ ? name[2] : name[0])) ++ { ++ EMSG2(_("E704: Funcref variable name must start with a capital: %s"), ++ name); ++ return TRUE; ++ } ++ /* Don't allow hiding a function. When "v" is not NULL we might be ++ * assigning another function to the same var, the type is checked ++ * below. */ ++ if (new_var && function_exists(name)) ++ { ++ EMSG2(_("E705: Variable name conflicts with existing function: %s"), ++ name); ++ return TRUE; ++ } ++ return FALSE; ++ } ++ ++ /* ++ * Check if a variable name is valid. ++ * Return FALSE and give an error if not. ++ */ ++ static int ++ valid_varname(varname) ++ char_u *varname; ++ { ++ char_u *p; ++ ++ for (p = varname; *p != NUL; ++p) ++ if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p)) ++ && *p != AUTOLOAD_CHAR) ++ { ++ EMSG2(_(e_illvar), varname); ++ return FALSE; ++ } ++ return TRUE; ++ } ++ ++ /* + * Return TRUE if typeval "tv" is set to be locked (immutable). + * Also give an error message, using "name". + */ +*** ../vim-7.3.145/src/version.c 2011-03-26 18:32:00.000000000 +0100 +--- src/version.c 2011-03-27 16:01:03.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 146, + /**/ + +-- +ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of Camelot. + King of all Britons, defeator of the Saxons, sovereign of all England! + [Pause] +SOLDIER: Get away! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a29b3da0f015bb4c2f22c02b6134f0962574b958 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:41 +0200 Subject: [PATCH 0164/3803] - patchlevel 147 --- 7.3.147 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 7.3.147 diff --git a/7.3.147 b/7.3.147 new file mode 100644 index 00000000..b6fd756a --- /dev/null +++ b/7.3.147 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.147 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.147 (after 7.3.143) +Problem: Can't build on HP-UX. +Solution: Remove an unnecessary backslash. (John Marriott) +Files: src/Makefile + + +*** ../vim-7.3.146/src/Makefile 2011-03-22 18:10:34.000000000 +0100 +--- src/Makefile 2011-04-01 13:00:58.000000000 +0200 +*************** +*** 1565,1571 **** + + OBJ = $(OBJ_COMMON) \ + objects/main.o \ +! objects/memfile.o \ + + MEMFILE_TEST_OBJ = $(OBJ_COMMON) \ + objects/memfile_test.o +--- 1565,1571 ---- + + OBJ = $(OBJ_COMMON) \ + objects/main.o \ +! objects/memfile.o + + MEMFILE_TEST_OBJ = $(OBJ_COMMON) \ + objects/memfile_test.o +*** ../vim-7.3.146/src/version.c 2011-03-27 16:03:09.000000000 +0200 +--- src/version.c 2011-04-01 13:05:18.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 147, + /**/ + +-- +DENNIS: You can't expect to wield supreme executive power just 'cause some + watery tart threw a sword at you! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9bf194e8dc1f62850bef92862522390f986ca97b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:42 +0200 Subject: [PATCH 0165/3803] - patchlevel 148 --- 7.3.148 | 252 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 7.3.148 diff --git a/7.3.148 b/7.3.148 new file mode 100644 index 00000000..30492c0b --- /dev/null +++ b/7.3.148 @@ -0,0 +1,252 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.148 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.148 +Problem: A syntax file with a huge number of items or clusters causes weird + behavior, a hang or a crash. (Yukihiro Nakadaira) +Solution: Check running out of IDs. (partly by Ben Schmidt) +Files: src/syntax.c + + +*** ../vim-7.3.147/src/syntax.c 2011-01-22 00:58:15.000000000 +0100 +--- src/syntax.c 2011-04-01 14:25:39.000000000 +0200 +*************** +*** 219,234 **** + + /* + * Syntax group IDs have different types: +! * 0 - 9999 normal syntax groups +! * 10000 - 14999 ALLBUT indicator (current_syn_inc_tag added) +! * 15000 - 19999 TOP indicator (current_syn_inc_tag added) +! * 20000 - 24999 CONTAINED indicator (current_syn_inc_tag added) +! * >= 25000 cluster IDs (subtract SYNID_CLUSTER for the cluster ID) +! */ +! #define SYNID_ALLBUT 10000 /* syntax group ID for contains=ALLBUT */ +! #define SYNID_TOP 15000 /* syntax group ID for contains=TOP */ +! #define SYNID_CONTAINED 20000 /* syntax group ID for contains=CONTAINED */ +! #define SYNID_CLUSTER 25000 /* first syntax group ID for clusters */ + + /* + * Annoying Hack(TM): ":syn include" needs this pointer to pass to +--- 219,238 ---- + + /* + * Syntax group IDs have different types: +! * 0 - 19999 normal syntax groups +! * 20000 - 20999 ALLBUT indicator (current_syn_inc_tag added) +! * 21000 - 21999 TOP indicator (current_syn_inc_tag added) +! * 22000 - 22999 CONTAINED indicator (current_syn_inc_tag added) +! * 23000 - 32767 cluster IDs (subtract SYNID_CLUSTER for the cluster ID) +! */ +! #define SYNID_ALLBUT 20000 /* syntax group ID for contains=ALLBUT */ +! #define SYNID_TOP 21000 /* syntax group ID for contains=TOP */ +! #define SYNID_CONTAINED 22000 /* syntax group ID for contains=CONTAINED */ +! #define SYNID_CLUSTER 23000 /* first syntax group ID for clusters */ +! +! #define MAX_SYNID SYNID_ALLBUT +! #define MAX_SYN_INC_TAG 999 /* maximum before the above overflow */ +! #define MAX_CLUSTER_ID (32767 - SYNID_CLUSTER) + + /* + * Annoying Hack(TM): ":syn include" needs this pointer to pass to +*************** +*** 3442,3447 **** +--- 3446,3454 ---- + /* free the stored states */ + syn_stack_free_all(block); + invalidate_current_state(); ++ ++ /* Reset the counter for ":syn include" */ ++ running_syn_inc_tag = 0; + } + + /* +*************** +*** 4661,4666 **** +--- 4668,4675 ---- + return; + } + sgl_id = syn_check_cluster(arg, (int)(group_name_end - arg)); ++ if (sgl_id == 0) ++ return; + /* separate_nextcmd() and expand_filename() depend on this */ + eap->arg = rest; + } +*************** +*** 4689,4694 **** +--- 4698,4708 ---- + * Save and restore the existing top-level grouplist id and ":syn + * include" tag around the actual inclusion. + */ ++ if (running_syn_inc_tag >= MAX_SYN_INC_TAG) ++ { ++ EMSG((char_u *)_("E847: Too many syntax includes")); ++ return; ++ } + prev_syn_inc_tag = current_syn_inc_tag; + current_syn_inc_tag = ++running_syn_inc_tag; + prev_toplvl_grp = curwin->w_s->b_syn_topgrp; +*************** +*** 4712,4718 **** + char_u *group_name_end; + int syn_id; + char_u *rest; +! char_u *keyword_copy; + char_u *p; + char_u *kw; + syn_opt_arg_T syn_opt_arg; +--- 4726,4732 ---- + char_u *group_name_end; + int syn_id; + char_u *rest; +! char_u *keyword_copy = NULL; + char_u *p; + char_u *kw; + syn_opt_arg_T syn_opt_arg; +*************** +*** 4724,4732 **** + if (rest != NULL) + { + syn_id = syn_check_group(arg, (int)(group_name_end - arg)); +! +! /* allocate a buffer, for removing the backslashes in the keyword */ +! keyword_copy = alloc((unsigned)STRLEN(rest) + 1); + if (keyword_copy != NULL) + { + syn_opt_arg.flags = 0; +--- 4738,4746 ---- + if (rest != NULL) + { + syn_id = syn_check_group(arg, (int)(group_name_end - arg)); +! if (syn_id != 0) +! /* allocate a buffer, for removing backslashes in the keyword */ +! keyword_copy = alloc((unsigned)STRLEN(rest) + 1); + if (keyword_copy != NULL) + { + syn_opt_arg.flags = 0; +*************** +*** 5133,5139 **** + (item == ITEM_SKIP) ? SPTYPE_SKIP : SPTYPE_END; + SYN_ITEMS(curwin->w_s)[idx].sp_flags |= syn_opt_arg.flags; + SYN_ITEMS(curwin->w_s)[idx].sp_syn.id = syn_id; +! SYN_ITEMS(curwin->w_s)[idx].sp_syn.inc_tag = current_syn_inc_tag; + SYN_ITEMS(curwin->w_s)[idx].sp_syn_match_id = + ppp->pp_matchgroup_id; + #ifdef FEAT_CONCEAL +--- 5147,5154 ---- + (item == ITEM_SKIP) ? SPTYPE_SKIP : SPTYPE_END; + SYN_ITEMS(curwin->w_s)[idx].sp_flags |= syn_opt_arg.flags; + SYN_ITEMS(curwin->w_s)[idx].sp_syn.id = syn_id; +! SYN_ITEMS(curwin->w_s)[idx].sp_syn.inc_tag = +! current_syn_inc_tag; + SYN_ITEMS(curwin->w_s)[idx].sp_syn_match_id = + ppp->pp_matchgroup_id; + #ifdef FEAT_CONCEAL +*************** +*** 5426,5431 **** +--- 5441,5454 ---- + curwin->w_s->b_syn_clusters.ga_growsize = 10; + } + ++ len = curwin->w_s->b_syn_clusters.ga_len; ++ if (len >= MAX_CLUSTER_ID) ++ { ++ EMSG((char_u *)_("E848: Too many syntax clusters")); ++ vim_free(name); ++ return 0; ++ } ++ + /* + * Make room for at least one other cluster entry. + */ +*************** +*** 5434,5440 **** + vim_free(name); + return 0; + } +- len = curwin->w_s->b_syn_clusters.ga_len; + + vim_memset(&(SYN_CLSTR(curwin->w_s)[len]), 0, sizeof(syn_cluster_T)); + SYN_CLSTR(curwin->w_s)[len].scl_name = name; +--- 5457,5462 ---- +*************** +*** 5476,5483 **** + + if (rest != NULL) + { +! scl_id = syn_check_cluster(arg, (int)(group_name_end - arg)) +! - SYNID_CLUSTER; + + for (;;) + { +--- 5498,5507 ---- + + if (rest != NULL) + { +! scl_id = syn_check_cluster(arg, (int)(group_name_end - arg)); +! if (scl_id == 0) +! return; +! scl_id -= SYNID_CLUSTER; + + for (;;) + { +*************** +*** 5516,5522 **** + if (got_clstr) + { + redraw_curbuf_later(SOME_VALID); +! syn_stack_free_all(curwin->w_s); /* Need to recompute all syntax. */ + } + } + +--- 5540,5546 ---- + if (got_clstr) + { + redraw_curbuf_later(SOME_VALID); +! syn_stack_free_all(curwin->w_s); /* Need to recompute all. */ + } + } + +*************** +*** 8972,8977 **** +--- 8996,9008 ---- + highlight_ga.ga_growsize = 10; + } + ++ if (highlight_ga.ga_len >= MAX_SYNID) ++ { ++ EMSG(_("E849: Too many syntax groups")); ++ vim_free(name); ++ return 0; ++ } ++ + /* + * Make room for at least one other syntax_highlight entry. + */ +*** ../vim-7.3.147/src/version.c 2011-04-01 13:05:37.000000000 +0200 +--- src/version.c 2011-04-01 14:26:44.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 148, + /**/ + +-- +BLACK KNIGHT: None shall pass. +ARTHUR: I have no quarrel with you, brave Sir knight, but I must cross + this bridge. +BLACK KNIGHT: Then you shall die. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e1e71b627774a485d885a90dd31a6d62f23ecb5c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:42 +0200 Subject: [PATCH 0166/3803] - patchlevel 149 --- 7.3.149 | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 7.3.149 diff --git a/7.3.149 b/7.3.149 new file mode 100644 index 00000000..1901a74f --- /dev/null +++ b/7.3.149 @@ -0,0 +1,78 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.149 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.149 +Problem: The cursor disappears after the processing of the 'setDot' + netbeans command when vim runs in a terminal. +Solution: Show the cursor after a screen update. (Xavier de Gaye, 2011 +Files: src/netbeans.c + + +*** ../vim-7.3.148/src/netbeans.c 2011-01-04 18:11:39.000000000 +0100 +--- src/netbeans.c 2011-04-01 15:33:49.000000000 +0200 +*************** +*** 191,196 **** +--- 191,197 ---- + changed_window_setting(); + update_screen(CLEAR); + setcursor(); ++ cursor_on(); + out_flush(); + #ifdef FEAT_GUI + if (gui.in_use) +*************** +*** 2248,2253 **** +--- 2249,2255 ---- + update_topline(); /* scroll to show the line */ + update_screen(VALID); + setcursor(); ++ cursor_on(); + out_flush(); + #ifdef FEAT_GUI + if (gui.in_use) +*************** +*** 2642,2647 **** +--- 2644,2650 ---- + { + update_screen(NOT_VALID); + setcursor(); ++ cursor_on(); + out_flush(); + #ifdef FEAT_GUI + if (gui.in_use) +*************** +*** 3008,3013 **** +--- 3011,3017 ---- + changed_window_setting(); + update_screen(CLEAR); + setcursor(); ++ cursor_on(); + out_flush(); + #ifdef FEAT_GUI + if (gui.in_use) +*** ../vim-7.3.148/src/version.c 2011-04-01 14:44:54.000000000 +0200 +--- src/version.c 2011-04-01 15:33:21.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 149, + /**/ + +-- +ARTHUR: You are indeed brave Sir knight, but the fight is mine. +BLACK KNIGHT: Had enough? +ARTHUR: You stupid bastard. You havn't got any arms left. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 990a0eea675684bd594dbc5758a382783850c575 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:43 +0200 Subject: [PATCH 0167/3803] - patchlevel 150 --- 7.3.150 | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 7.3.150 diff --git a/7.3.150 b/7.3.150 new file mode 100644 index 00000000..83a8bf28 --- /dev/null +++ b/7.3.150 @@ -0,0 +1,113 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.150 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.150 +Problem: readline() does not return the last line when the NL is missing. + (Hong Xu) +Solution: When at the end of the file Also check for a previous line. +Files: src/eval.c + + +*** ../vim-7.3.149/src/eval.c 2011-03-27 16:03:09.000000000 +0200 +--- src/eval.c 2011-04-01 16:06:04.000000000 +0200 +*************** +*** 14305,14313 **** + { + if (buf[filtd] == '\n' || readlen <= 0) + { +! /* Only when in binary mode add an empty list item when the +! * last line ends in a '\n'. */ +! if (!binary && readlen == 0 && filtd == 0) + break; + + /* Found end-of-line or end-of-file: add a text line to the +--- 14305,14313 ---- + { + if (buf[filtd] == '\n' || readlen <= 0) + { +! /* In binary mode add an empty list item when the last +! * non-empty line ends in a '\n'. */ +! if (!binary && readlen == 0 && filtd == 0 && prev == NULL) + break; + + /* Found end-of-line or end-of-file: add a text line to the +*************** +*** 14372,14396 **** + + if (tolist == 0) + { +! /* "buf" is full, need to move text to an allocated buffer */ +! if (prev == NULL) + { +! prev = vim_strnsave(buf, buflen); +! prevlen = buflen; +! } +! else +! { +! s = alloc((unsigned)(prevlen + buflen)); +! if (s != NULL) + { +! mch_memmove(s, prev, prevlen); +! mch_memmove(s + prevlen, buf, buflen); +! vim_free(prev); +! prev = s; +! prevlen += buflen; + } + } +- filtd = 0; + } + else + { +--- 14372,14399 ---- + + if (tolist == 0) + { +! if (buflen >= FREAD_SIZE / 2) + { +! /* "buf" is full, need to move text to an allocated buffer */ +! if (prev == NULL) +! { +! prev = vim_strnsave(buf, buflen); +! prevlen = buflen; +! } +! else + { +! s = alloc((unsigned)(prevlen + buflen)); +! if (s != NULL) +! { +! mch_memmove(s, prev, prevlen); +! mch_memmove(s + prevlen, buf, buflen); +! vim_free(prev); +! prev = s; +! prevlen += buflen; +! } + } ++ filtd = 0; + } + } + else + { +*** ../vim-7.3.149/src/version.c 2011-04-01 15:33:54.000000000 +0200 +--- src/version.c 2011-04-01 16:04:42.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 150, + /**/ + +-- +ARTHUR: What are you going to do. bleed on me? + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5d4354b6e009e1280dc69068644b84f9805c33af Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:43 +0200 Subject: [PATCH 0168/3803] - patchlevel 151 --- 7.3.151 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 7.3.151 diff --git a/7.3.151 b/7.3.151 new file mode 100644 index 00000000..20f51051 --- /dev/null +++ b/7.3.151 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.151 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.151 (after 7.3.074) +Problem: When "unnamedplus" is in 'clipboard' the selection is sometimes + also copied to the star register. +Solution: Avoid copy to the star register when undesired. (James Vega) +Files: src/ops.c + + +*** ../vim-7.3.150/src/ops.c 2010-12-08 14:23:08.000000000 +0100 +--- src/ops.c 2011-04-01 16:23:10.000000000 +0200 +*************** +*** 3148,3157 **** + /* Copy the text from register 0 to the clipboard register. */ + copy_yank_reg(&(y_regs[PLUS_REGISTER])); + +- /* No need to copy to * register upon 'unnamed' now - see below */ + clip_own_selection(&clip_plus); + clip_gen_set_selection(&clip_plus); +! if (!clip_isautosel() && !did_star) + { + copy_yank_reg(&(y_regs[STAR_REGISTER])); + clip_own_selection(&clip_star); +--- 3148,3156 ---- + /* Copy the text from register 0 to the clipboard register. */ + copy_yank_reg(&(y_regs[PLUS_REGISTER])); + + clip_own_selection(&clip_plus); + clip_gen_set_selection(&clip_plus); +! if (!clip_isautosel() && !did_star && curr == &(y_regs[PLUS_REGISTER])) + { + copy_yank_reg(&(y_regs[STAR_REGISTER])); + clip_own_selection(&clip_star); +*** ../vim-7.3.150/src/version.c 2011-04-01 16:07:41.000000000 +0200 +--- src/version.c 2011-04-01 16:25:40.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 151, + /**/ + +-- +BLACK KNIGHT: I'm invincible! +ARTHUR: You're a looney. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From fb3e18b5afd1598c4d3e668f05e90d889b39e5e5 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:43 +0200 Subject: [PATCH 0169/3803] - patchlevel 152 --- 7.3.152 | 643 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 643 insertions(+) create mode 100644 7.3.152 diff --git a/7.3.152 b/7.3.152 new file mode 100644 index 00000000..fdc58a08 --- /dev/null +++ b/7.3.152 @@ -0,0 +1,643 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.152 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.152 +Problem: Xxd does not check for errors from library functions. +Solution: Add error checks. (Florian Zumbiehl) +Files: src/xxd/xxd.c + + +*** ../vim-7.3.151/src/xxd/xxd.c 2010-08-15 21:57:25.000000000 +0200 +--- src/xxd/xxd.c 2011-04-01 18:56:11.000000000 +0200 +*************** +*** 49,54 **** +--- 49,56 ---- + * option -b added: 01000101 binary output in normal format. + * 16.05.00 Added VAXC changes by Stephen P. Wall + * 16.05.00 Improved MMS file and merge for VMS by Zoltan Arpadffy ++ * 2011 March Better error handling by Florian Zumbiehl. ++ * 2011 April Formatting by Bram Moolenaar + * + * (c) 1990-1998 by Juergen Weigert (jnweiger@informatik.uni-erlangen.de) + * +*************** +*** 207,214 **** + + /* Let's collect some prototypes */ + /* CodeWarrior is really picky about missing prototypes */ +! static void exit_with_usage __P((char *)); +! static int huntype __P((FILE *, FILE *, FILE *, char *, int, int, long)); + static void xxdline __P((FILE *, char *, int)); + + #define TRY_SEEK /* attempt to use lseek, or skip forward by reading */ +--- 209,216 ---- + + /* Let's collect some prototypes */ + /* CodeWarrior is really picky about missing prototypes */ +! static void exit_with_usage __P((void)); +! static int huntype __P((FILE *, FILE *, FILE *, int, int, long)); + static void xxdline __P((FILE *, char *, int)); + + #define TRY_SEEK /* attempt to use lseek, or skip forward by reading */ +*************** +*** 223,231 **** + #define HEX_CINCLUDE 2 + #define HEX_BITS 3 /* not hex a dump, but bits: 01111001 */ + +! static void +! exit_with_usage(pname) +! char *pname; + { + fprintf(stderr, "Usage:\n %s [options] [infile [outfile]]\n", pname); + fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname); +--- 225,234 ---- + #define HEX_CINCLUDE 2 + #define HEX_BITS 3 /* not hex a dump, but bits: 01111001 */ + +! static char *pname; +! +! static void +! exit_with_usage() + { + fprintf(stderr, "Usage:\n %s [options] [infile [outfile]]\n", pname); + fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname); +*************** +*** 252,257 **** +--- 255,269 ---- + exit(1); + } + ++ static void ++ die(ret) ++ int ret; ++ { ++ fprintf(stderr, "%s: ", pname); ++ perror(NULL); ++ exit(ret); ++ } ++ + /* + * Max. cols binary characters are decoded from the input stream per line. + * Two adjacent garbage characters after evaluated data delimit valid data. +*************** +*** 259,270 **** + * + * The name is historic and came from 'undo type opt h'. + */ +! static int +! huntype(fpi, fpo, fperr, pname, cols, hextype, base_off) +! FILE *fpi, *fpo, *fperr; +! char *pname; +! int cols, hextype; +! long base_off; + { + int c, ign_garb = 1, n1 = -1, n2 = 0, n3, p = cols; + long have_off = 0, want_off = 0; +--- 271,281 ---- + * + * The name is historic and came from 'undo type opt h'. + */ +! static int +! huntype(fpi, fpo, fperr, cols, hextype, base_off) +! FILE *fpi, *fpo, *fperr; +! int cols, hextype; +! long base_off; + { + int c, ign_garb = 1, n1 = -1, n2 = 0, n3, p = cols; + long have_off = 0, want_off = 0; +*************** +*** 318,324 **** + + if (base_off + want_off != have_off) + { +! fflush(fpo); + #ifdef TRY_SEEK + c = fseek(fpo, base_off + want_off - have_off, 1); + if (c >= 0) +--- 329,336 ---- + + if (base_off + want_off != have_off) + { +! if (fflush(fpo) != 0) +! die(3); + #ifdef TRY_SEEK + c = fseek(fpo, base_off + want_off - have_off, 1); + if (c >= 0) +*************** +*** 330,341 **** + return 5; + } + for (; have_off < base_off + want_off; have_off++) +! putc(0, fpo); + } + + if (n2 >= 0 && n1 >= 0) + { +! putc((n2 << 4) | n1, fpo); + have_off++; + want_off++; + n1 = -1; +--- 342,355 ---- + return 5; + } + for (; have_off < base_off + want_off; have_off++) +! if (putc(0, fpo) == EOF) +! die(3); + } + + if (n2 >= 0 && n1 >= 0) + { +! if (putc((n2 << 4) | n1, fpo) == EOF) +! die(3); + have_off++; + want_off++; + n1 = -1; +*************** +*** 345,350 **** +--- 359,366 ---- + want_off = 0; + while ((c = getc(fpi)) != '\n' && c != EOF) + ; ++ if (c == EOF && ferror(fpi)) ++ die(2); + ign_garb = 1; + } + } +*************** +*** 355,369 **** + want_off = 0; + while ((c = getc(fpi)) != '\n' && c != EOF) + ; + ign_garb = 1; + } + } +! fflush(fpo); + #ifdef TRY_SEEK + fseek(fpo, 0L, 2); + #endif +! fclose(fpo); +! fclose(fpi); + return 0; + } + +--- 371,390 ---- + want_off = 0; + while ((c = getc(fpi)) != '\n' && c != EOF) + ; ++ if (c == EOF && ferror(fpi)) ++ die(2); + ign_garb = 1; + } + } +! if (fflush(fpo) != 0) +! die(3); + #ifdef TRY_SEEK + fseek(fpo, 0L, 2); + #endif +! if (fclose(fpo) != 0) +! die(3); +! if (fclose(fpi) != 0) +! die(2); + return 0; + } + +*************** +*** 379,389 **** + * + * If nz is always positive, lines are never suppressed. + */ +! static void + xxdline(fp, l, nz) +! FILE *fp; +! char *l; +! int nz; + { + static char z[LLEN+1]; + static int zero_seen = 0; +--- 400,410 ---- + * + * If nz is always positive, lines are never suppressed. + */ +! static void + xxdline(fp, l, nz) +! FILE *fp; +! char *l; +! int nz; + { + static char z[LLEN+1]; + static int zero_seen = 0; +*************** +*** 398,409 **** + if (nz < 0) + zero_seen--; + if (zero_seen == 2) +! fputs(z, fp); + if (zero_seen > 2) +! fputs("*\n", fp); + } + if (nz >= 0 || zero_seen > 0) +! fputs(l, fp); + if (nz) + zero_seen = 0; + } +--- 419,433 ---- + if (nz < 0) + zero_seen--; + if (zero_seen == 2) +! if (fputs(z, fp) == EOF) +! die(3); + if (zero_seen > 2) +! if (fputs("*\n", fp) == EOF) +! die(3); + } + if (nz >= 0 || zero_seen > 0) +! if (fputs(l, fp) == EOF) +! die(3); + if (nz) + zero_seen = 0; + } +*************** +*** 439,448 **** + 0070,0071,0372,0373,0374,0375,0376,0377 + }; + +! int + main(argc, argv) +! int argc; +! char *argv[]; + { + FILE *fp, *fpo; + int c, e, p = 0, relseek = 1, negseek = 0, revert = 0; +--- 463,472 ---- + 0070,0071,0372,0373,0374,0375,0376,0377 + }; + +! int + main(argc, argv) +! int argc; +! char *argv[]; + { + FILE *fp, *fpo; + int c, e, p = 0, relseek = 1, negseek = 0, revert = 0; +*************** +*** 452,458 **** + int grplen; /* total chars per octet group */ + long length = -1, n = 0, seekoff = 0; + char l[LLEN+1]; +! char *pname, *pp; + + #ifdef AMIGA + /* This program doesn't work when started from the Workbench */ +--- 476,482 ---- + int grplen; /* total chars per octet group */ + long length = -1, n = 0, seekoff = 0; + char l[LLEN+1]; +! char *pp; + + #ifdef AMIGA + /* This program doesn't work when started from the Workbench */ +*************** +*** 495,501 **** + else + { + if (!argv[2]) +! exit_with_usage(pname); + cols = (int)strtol(argv[2], NULL, 0); + argv++; + argc--; +--- 519,525 ---- + else + { + if (!argv[2]) +! exit_with_usage(); + cols = (int)strtol(argv[2], NULL, 0); + argv++; + argc--; +*************** +*** 508,514 **** + else + { + if (!argv[2]) +! exit_with_usage(pname); + octspergrp = (int)strtol(argv[2], NULL, 0); + argv++; + argc--; +--- 532,538 ---- + else + { + if (!argv[2]) +! exit_with_usage(); + octspergrp = (int)strtol(argv[2], NULL, 0); + argv++; + argc--; +*************** +*** 531,537 **** + else + { + if (!argv[2]) +! exit_with_usage(pname); + #ifdef TRY_SEEK + if (argv[2][0] == '+') + relseek++; +--- 555,561 ---- + else + { + if (!argv[2]) +! exit_with_usage(); + #ifdef TRY_SEEK + if (argv[2][0] == '+') + relseek++; +*************** +*** 550,556 **** + else + { + if (!argv[2]) +! exit_with_usage(pname); + length = strtol(argv[2], (char **)NULL, 0); + argv++; + argc--; +--- 574,580 ---- + else + { + if (!argv[2]) +! exit_with_usage(); + length = strtol(argv[2], (char **)NULL, 0); + argv++; + argc--; +*************** +*** 563,569 **** + break; + } + else if (pp[0] == '-' && pp[1]) /* unknown option */ +! exit_with_usage(pname); + else + break; /* not an option */ + +--- 587,593 ---- + break; + } + else if (pp[0] == '-' && pp[1]) /* unknown option */ +! exit_with_usage(); + else + break; /* not an option */ + +*************** +*** 602,608 **** + octspergrp = cols; + + if (argc > 3) +! exit_with_usage(pname); + + if (argc == 1 || (argv[1][0] == '-' && !argv[1][1])) + BIN_ASSIGN(fp = stdin, !revert); +--- 626,632 ---- + octspergrp = cols; + + if (argc > 3) +! exit_with_usage(); + + if (argc == 1 || (argv[1][0] == '-' && !argv[1][1])) + BIN_ASSIGN(fp = stdin, !revert); +*************** +*** 640,646 **** + fprintf(stderr, "%s: sorry, cannot revert this type of hexdump\n", pname); + return -1; + } +! return huntype(fp, fpo, stderr, pname, cols, hextype, + negseek ? -seekoff : seekoff); + } + +--- 664,670 ---- + fprintf(stderr, "%s: sorry, cannot revert this type of hexdump\n", pname); + return -1; + } +! return huntype(fp, fpo, stderr, cols, hextype, + negseek ? -seekoff : seekoff); + } + +*************** +*** 664,670 **** + long s = seekoff; + + while (s--) +! (void)getc(fp); + } + } + +--- 688,703 ---- + long s = seekoff; + + while (s--) +! if (getc(fp) == EOF) +! if (ferror(fp)) +! { +! die(2); +! } +! else +! { +! fprintf(stderr, "%s: sorry cannot seek.\n", pname); +! return 4; +! } + } + } + +*************** +*** 672,725 **** + { + if (fp != stdin) + { +! fprintf(fpo, "unsigned char %s", isdigit((int)argv[1][0]) ? "__" : ""); + for (e = 0; (c = argv[1][e]) != 0; e++) +! putc(isalnum(c) ? c : '_', fpo); +! fputs("[] = {\n", fpo); + } + + p = 0; + while ((length < 0 || p < length) && (c = getc(fp)) != EOF) + { +! fprintf(fpo, (hexx == hexxa) ? "%s0x%02x" : "%s0X%02X", +! (p % cols) ? ", " : ",\n "+2*!p, c); + p++; + } + + if (p) +! fputs("\n};\n"+3*(fp == stdin), fpo); + + if (fp != stdin) + { +! fprintf(fpo, "unsigned int %s", isdigit((int)argv[1][0]) ? "__" : ""); + for (e = 0; (c = argv[1][e]) != 0; e++) +! putc(isalnum(c) ? c : '_', fpo); +! fprintf(fpo, "_len = %d;\n", p); + } + +! fclose(fp); +! fclose(fpo); + return 0; + } + + if (hextype == HEX_POSTSCRIPT) + { + p = cols; + while ((length < 0 || n < length) && (e = getc(fp)) != EOF) + { +! putchar(hexx[(e >> 4) & 0xf]); +! putchar(hexx[(e ) & 0xf]); + n++; + if (!--p) + { +! putchar('\n'); + p = cols; + } + } + if (p < cols) +! putchar('\n'); +! fclose(fp); +! fclose(fpo); + return 0; + } + +--- 705,779 ---- + { + if (fp != stdin) + { +! if (fprintf(fpo, "unsigned char %s", isdigit((int)argv[1][0]) ? "__" : "") < 0) +! die(3); + for (e = 0; (c = argv[1][e]) != 0; e++) +! if (putc(isalnum(c) ? c : '_', fpo) == EOF) +! die(3); +! if (fputs("[] = {\n", fpo) == EOF) +! die(3); + } + + p = 0; ++ c = 0; + while ((length < 0 || p < length) && (c = getc(fp)) != EOF) + { +! if (fprintf(fpo, (hexx == hexxa) ? "%s0x%02x" : "%s0X%02X", +! (p % cols) ? ", " : ",\n "+2*!p, c) < 0) +! die(3); + p++; + } ++ if (c == EOF && ferror(fp)) ++ die(2); + + if (p) +! if (fputs("\n};\n" + 3 * (fp == stdin), fpo) == EOF) +! die(3); + + if (fp != stdin) + { +! if (fprintf(fpo, "unsigned int %s", isdigit((int)argv[1][0]) ? "__" : "") < 0) +! die(3); + for (e = 0; (c = argv[1][e]) != 0; e++) +! if (putc(isalnum(c) ? c : '_', fpo) == EOF) +! die(3); +! if (fprintf(fpo, "_len = %d;\n", p) < 0) +! die(3); + } + +! if (fclose(fp)) +! die(2); +! if (fclose(fpo)) +! die(3); + return 0; + } + + if (hextype == HEX_POSTSCRIPT) + { + p = cols; ++ e = 0; + while ((length < 0 || n < length) && (e = getc(fp)) != EOF) + { +! if (putc(hexx[(e >> 4) & 0xf], fpo) == EOF +! || putc(hexx[e & 0xf], fpo) == EOF) +! die(3); + n++; + if (!--p) + { +! if (putc('\n', fpo) == EOF) +! die(3); + p = cols; + } + } ++ if (e == EOF && ferror(fp)) ++ die(2); + if (p < cols) +! if (putc('\n', fpo) == EOF) +! die(3); +! if (fclose(fp)) +! die(2); +! if (fclose(fpo)) +! die(3); + return 0; + } + +*************** +*** 730,735 **** +--- 784,790 ---- + else /* hextype == HEX_BITS */ + grplen = 8 * octspergrp + 1; + ++ e = 0; + while ((length < 0 || n < length) && (e = getc(fp)) != EOF) + { + if (p == 0) +*************** +*** 771,776 **** +--- 826,833 ---- + p = 0; + } + } ++ if (e == EOF && ferror(fp)) ++ die(2); + if (p) + { + l[c = (11 + (grplen * cols - 1)/octspergrp + p)] = '\n'; l[++c] = '\0'; +*************** +*** 779,785 **** + else if (autoskip) + xxdline(fpo, l, -1); /* last chance to flush out suppressed lines */ + +! fclose(fp); +! fclose(fpo); + return 0; + } +--- 836,846 ---- + else if (autoskip) + xxdline(fpo, l, -1); /* last chance to flush out suppressed lines */ + +! if (fclose(fp)) +! die(2); +! if (fclose(fpo)) +! die(3); + return 0; + } ++ ++ /* vi:set ts=8 sw=4 sts=2 cino+={2 cino+=n-2 : */ +*** ../vim-7.3.151/src/version.c 2011-04-01 16:28:33.000000000 +0200 +--- src/version.c 2011-04-01 19:00:26.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 152, + /**/ + +-- +Eye have a spelling checker, it came with my PC; +It plainly marks four my revue mistakes I cannot sea. +I've run this poem threw it, I'm sure your please to no, +It's letter perfect in it's weigh, my checker tolled me sew! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 95699ec26bd98204d82c611876b144857b874fdb Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:43 +0200 Subject: [PATCH 0170/3803] - patchlevel 153 --- 7.3.153 | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 7.3.153 diff --git a/7.3.153 b/7.3.153 new file mode 100644 index 00000000..9f76b518 --- /dev/null +++ b/7.3.153 @@ -0,0 +1,66 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.153 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.153 (after 7.3.152) +Problem: Compiler warning for ambiguous else, missing prototype. +Solution: Add braces. (Dominique Pelle) Add prototype for die(). +Files: src/xxd/xxd.c + + +*** ../vim-7.3.152/src/xxd/xxd.c 2011-04-01 19:14:35.000000000 +0200 +--- src/xxd/xxd.c 2011-04-02 14:42:54.000000000 +0200 +*************** +*** 210,215 **** +--- 210,216 ---- + /* Let's collect some prototypes */ + /* CodeWarrior is really picky about missing prototypes */ + static void exit_with_usage __P((void)); ++ static void die __P((int)); + static int huntype __P((FILE *, FILE *, FILE *, int, int, long)); + static void xxdline __P((FILE *, char *, int)); + +*************** +*** 689,694 **** +--- 690,696 ---- + + while (s--) + if (getc(fp) == EOF) ++ { + if (ferror(fp)) + { + die(2); +*************** +*** 698,703 **** +--- 700,706 ---- + fprintf(stderr, "%s: sorry cannot seek.\n", pname); + return 4; + } ++ } + } + } + +*** ../vim-7.3.152/src/version.c 2011-04-01 19:14:35.000000000 +0200 +--- src/version.c 2011-04-02 14:41:12.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 153, + /**/ + +-- + | + +Ceci n'est pas une pipe. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 2d7f97c2028d80a95dcc3785db6ed4b266a228f9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:44 +0200 Subject: [PATCH 0171/3803] - patchlevel 154 --- 7.3.154 | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 7.3.154 diff --git a/7.3.154 b/7.3.154 new file mode 100644 index 00000000..e7c88620 --- /dev/null +++ b/7.3.154 @@ -0,0 +1,106 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.154 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.154 (after 7.3.148) +Problem: Can't compile with tiny features. (Tony Mechelynck) +Solution: Move #define outside of #ifdef. +Files: src/syntax.c + + +*** ../vim-7.3.153/src/syntax.c 2011-04-01 14:44:54.000000000 +0200 +--- src/syntax.c 2011-04-02 15:11:47.000000000 +0200 +*************** +*** 68,73 **** +--- 68,75 ---- + + #define HL_TABLE() ((struct hl_group *)((highlight_ga.ga_data))) + ++ #define MAX_HL_ID 20000 /* maximum value for a highlight ID. */ ++ + #ifdef FEAT_CMDL_COMPL + /* Flags to indicate an additional string for highlight name completion. */ + static int include_none = 0; /* when 1 include "None" */ +*************** +*** 225,236 **** + * 22000 - 22999 CONTAINED indicator (current_syn_inc_tag added) + * 23000 - 32767 cluster IDs (subtract SYNID_CLUSTER for the cluster ID) + */ +! #define SYNID_ALLBUT 20000 /* syntax group ID for contains=ALLBUT */ + #define SYNID_TOP 21000 /* syntax group ID for contains=TOP */ + #define SYNID_CONTAINED 22000 /* syntax group ID for contains=CONTAINED */ + #define SYNID_CLUSTER 23000 /* first syntax group ID for clusters */ + +- #define MAX_SYNID SYNID_ALLBUT + #define MAX_SYN_INC_TAG 999 /* maximum before the above overflow */ + #define MAX_CLUSTER_ID (32767 - SYNID_CLUSTER) + +--- 227,237 ---- + * 22000 - 22999 CONTAINED indicator (current_syn_inc_tag added) + * 23000 - 32767 cluster IDs (subtract SYNID_CLUSTER for the cluster ID) + */ +! #define SYNID_ALLBUT MAX_HL_ID /* syntax group ID for contains=ALLBUT */ + #define SYNID_TOP 21000 /* syntax group ID for contains=TOP */ + #define SYNID_CONTAINED 22000 /* syntax group ID for contains=CONTAINED */ + #define SYNID_CLUSTER 23000 /* first syntax group ID for clusters */ + + #define MAX_SYN_INC_TAG 999 /* maximum before the above overflow */ + #define MAX_CLUSTER_ID (32767 - SYNID_CLUSTER) + +*************** +*** 6462,6468 **** + + #endif /* FEAT_SYN_HL */ + +- + /************************************** + * Highlighting stuff * + **************************************/ +--- 6463,6468 ---- +*************** +*** 8996,9004 **** + highlight_ga.ga_growsize = 10; + } + +! if (highlight_ga.ga_len >= MAX_SYNID) + { +! EMSG(_("E849: Too many syntax groups")); + vim_free(name); + return 0; + } +--- 8996,9004 ---- + highlight_ga.ga_growsize = 10; + } + +! if (highlight_ga.ga_len >= MAX_HL_ID) + { +! EMSG(_("E849: Too many highlight and syntax groups")); + vim_free(name); + return 0; + } +*** ../vim-7.3.153/src/version.c 2011-04-02 14:44:50.000000000 +0200 +--- src/version.c 2011-04-02 14:52:33.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 154, + /**/ + +-- +BEDEVERE: Why do you think she is a witch? +SECOND VILLAGER: She turned me into a newt. +BEDEVERE: A newt? +SECOND VILLAGER: (After looking at himself for some time) I got better. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 59db684643bb0fdbdb651ffb91fafbf4bf39ea2d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:44 +0200 Subject: [PATCH 0172/3803] - patchlevel 155 --- 7.3.155 | 286 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 286 insertions(+) create mode 100644 7.3.155 diff --git a/7.3.155 b/7.3.155 new file mode 100644 index 00000000..806efca2 --- /dev/null +++ b/7.3.155 @@ -0,0 +1,286 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.155 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.155 +Problem: Crash when using map(), filter() and remove() on v:. (ZyX) + Also for extend(). (Yukihiro Nakadaira) +Solution: Mark v: as locked. Also correct locking error messages. +Files: src/eval.c + + +*** ../vim-7.3.154/src/eval.c 2011-04-01 16:07:41.000000000 +0200 +--- src/eval.c 2011-04-11 13:28:34.000000000 +0200 +*************** +*** 853,858 **** +--- 853,859 ---- + + init_var_dict(&globvardict, &globvars_var); + init_var_dict(&vimvardict, &vimvars_var); ++ vimvardict.dv_lock = VAR_FIXED; + hash_init(&compat_hashtab); + hash_init(&func_hashtab); + +*************** +*** 8545,8551 **** + if (argvars[0].v_type == VAR_LIST) + { + if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)"add()") + && list_append_tv(l, &argvars[1]) == OK) + copy_tv(&argvars[0], rettv); + } +--- 8546,8552 ---- + if (argvars[0].v_type == VAR_LIST) + { + if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)_("add() argument")) + && list_append_tv(l, &argvars[1]) == OK) + copy_tv(&argvars[0], rettv); + } +*************** +*** 9946,9951 **** +--- 9947,9954 ---- + typval_T *argvars; + typval_T *rettv; + { ++ char *arg_errmsg = N_("extend() argument"); ++ + if (argvars[0].v_type == VAR_LIST && argvars[1].v_type == VAR_LIST) + { + list_T *l1, *l2; +*************** +*** 9955,9961 **** + + l1 = argvars[0].vval.v_list; + l2 = argvars[1].vval.v_list; +! if (l1 != NULL && !tv_check_lock(l1->lv_lock, (char_u *)"extend()") + && l2 != NULL) + { + if (argvars[2].v_type != VAR_UNKNOWN) +--- 9958,9964 ---- + + l1 = argvars[0].vval.v_list; + l2 = argvars[1].vval.v_list; +! if (l1 != NULL && !tv_check_lock(l1->lv_lock, (char_u *)_(arg_errmsg)) + && l2 != NULL) + { + if (argvars[2].v_type != VAR_UNKNOWN) +*************** +*** 9994,10000 **** + + d1 = argvars[0].vval.v_dict; + d2 = argvars[1].vval.v_dict; +! if (d1 != NULL && !tv_check_lock(d1->dv_lock, (char_u *)"extend()") + && d2 != NULL) + { + /* Check the third argument. */ +--- 9997,10003 ---- + + d1 = argvars[0].vval.v_dict; + d2 = argvars[1].vval.v_dict; +! if (d1 != NULL && !tv_check_lock(d1->dv_lock, (char_u *)_(arg_errmsg)) + && d2 != NULL) + { + /* Check the third argument. */ +*************** +*** 10236,10255 **** + typval_T save_key; + int rem; + int todo; +! char_u *ermsg = map ? (char_u *)"map()" : (char_u *)"filter()"; + int save_did_emsg; + int idx = 0; + + if (argvars[0].v_type == VAR_LIST) + { + if ((l = argvars[0].vval.v_list) == NULL +! || (map && tv_check_lock(l->lv_lock, ermsg))) + return; + } + else if (argvars[0].v_type == VAR_DICT) + { + if ((d = argvars[0].vval.v_dict) == NULL +! || (map && tv_check_lock(d->dv_lock, ermsg))) + return; + } + else +--- 10239,10260 ---- + typval_T save_key; + int rem; + int todo; +! char_u *ermsg = (char_u *)(map ? "map()" : "filter()"); +! char *arg_errmsg = (map ? N_("map() argument") +! : N_("filter() argument")); + int save_did_emsg; + int idx = 0; + + if (argvars[0].v_type == VAR_LIST) + { + if ((l = argvars[0].vval.v_list) == NULL +! || tv_check_lock(l->lv_lock, (char_u *)_(arg_errmsg))) + return; + } + else if (argvars[0].v_type == VAR_DICT) + { + if ((d = argvars[0].vval.v_dict) == NULL +! || tv_check_lock(d->dv_lock, (char_u *)_(arg_errmsg))) + return; + } + else +*************** +*** 10286,10292 **** + { + --todo; + di = HI2DI(hi); +! if (tv_check_lock(di->di_tv.v_lock, ermsg)) + break; + vimvars[VV_KEY].vv_str = vim_strsave(di->di_key); + if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL +--- 10291,10298 ---- + { + --todo; + di = HI2DI(hi); +! if (tv_check_lock(di->di_tv.v_lock, +! (char_u *)_(arg_errmsg))) + break; + vimvars[VV_KEY].vv_str = vim_strsave(di->di_key); + if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL +*************** +*** 10305,10311 **** + + for (li = l->lv_first; li != NULL; li = nli) + { +! if (tv_check_lock(li->li_tv.v_lock, ermsg)) + break; + nli = li->li_next; + vimvars[VV_KEY].vv_nr = idx; +--- 10311,10317 ---- + + for (li = l->lv_first; li != NULL; li = nli) + { +! if (tv_check_lock(li->li_tv.v_lock, (char_u *)_(arg_errmsg))) + break; + nli = li->li_next; + vimvars[VV_KEY].vv_nr = idx; +*************** +*** 12910,12916 **** + if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listarg), "insert()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)"insert()")) + { + if (argvars[2].v_type != VAR_UNKNOWN) + before = get_tv_number_chk(&argvars[2], &error); +--- 12916,12922 ---- + if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listarg), "insert()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)_("insert() argument"))) + { + if (argvars[2].v_type != VAR_UNKNOWN) + before = get_tv_number_chk(&argvars[2], &error); +*************** +*** 14775,14787 **** + char_u *key; + dict_T *d; + dictitem_T *di; + + if (argvars[0].v_type == VAR_DICT) + { + if (argvars[2].v_type != VAR_UNKNOWN) + EMSG2(_(e_toomanyarg), "remove()"); + else if ((d = argvars[0].vval.v_dict) != NULL +! && !tv_check_lock(d->dv_lock, (char_u *)"remove() argument")) + { + key = get_tv_string_chk(&argvars[1]); + if (key != NULL) +--- 14781,14794 ---- + char_u *key; + dict_T *d; + dictitem_T *di; ++ char *arg_errmsg = N_("remove() argument"); + + if (argvars[0].v_type == VAR_DICT) + { + if (argvars[2].v_type != VAR_UNKNOWN) + EMSG2(_(e_toomanyarg), "remove()"); + else if ((d = argvars[0].vval.v_dict) != NULL +! && !tv_check_lock(d->dv_lock, (char_u *)_(arg_errmsg))) + { + key = get_tv_string_chk(&argvars[1]); + if (key != NULL) +*************** +*** 14801,14807 **** + else if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listdictarg), "remove()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)"remove() argument")) + { + int error = FALSE; + +--- 14808,14814 ---- + else if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listdictarg), "remove()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)_(arg_errmsg))) + { + int error = FALSE; + +*************** +*** 15135,15141 **** + if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listarg), "reverse()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)"reverse()")) + { + li = l->lv_last; + l->lv_first = l->lv_last = NULL; +--- 15142,15148 ---- + if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listarg), "reverse()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)_("reverse() argument"))) + { + li = l->lv_last; + l->lv_first = l->lv_last = NULL; +*************** +*** 16432,16438 **** + else + { + l = argvars[0].vval.v_list; +! if (l == NULL || tv_check_lock(l->lv_lock, (char_u *)"sort()")) + return; + rettv->vval.v_list = l; + rettv->v_type = VAR_LIST; +--- 16439,16446 ---- + else + { + l = argvars[0].vval.v_list; +! if (l == NULL || tv_check_lock(l->lv_lock, +! (char_u *)_("sort() argument"))) + return; + rettv->vval.v_list = l; + rettv->v_type = VAR_LIST; +*** ../vim-7.3.154/src/version.c 2011-04-02 15:12:45.000000000 +0200 +--- src/version.c 2011-04-11 13:13:38.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 155, + /**/ + +-- +I used to be indecisive, now I'm not sure. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 33aa0d4e9685fa2cb0859d0b61fd996d6ef3baea Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:44 +0200 Subject: [PATCH 0173/3803] - patchlevel 156 --- 7.3.156 | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 7.3.156 diff --git a/7.3.156 b/7.3.156 new file mode 100644 index 00000000..ec873242 --- /dev/null +++ b/7.3.156 @@ -0,0 +1,89 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.156 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.156 +Problem: Tty names possibly left unterminated. +Solution: Use vim_strncpy() instead of strncpy(). +Files: src/pty.c + + +*** ../vim-7.3.155/src/pty.c 2010-08-15 21:57:28.000000000 +0200 +--- src/pty.c 2011-04-11 14:02:49.000000000 +0200 +*************** +*** 209,216 **** + #ifdef _SEQUENT_ + fvhangup(s); + #endif +! strncpy(PtyName, m, sizeof(PtyName)); +! strncpy(TtyName, s, sizeof(TtyName)); + initmaster(f); + *ttyn = TtyName; + return f; +--- 209,216 ---- + #ifdef _SEQUENT_ + fvhangup(s); + #endif +! vim_strncpy((char_u *)PtyName, (char_u *)m, sizeof(PtyName) - 1); +! vim_strncpy((char_u *)TtyName, (char_u *)s, sizeof(TtyName) - 1); + initmaster(f); + *ttyn = TtyName; + return f; +*************** +*** 301,307 **** + return -1; + } + signal(SIGCHLD, sigcld); +! strncpy(TtyName, m, sizeof(TtyName)); + initmaster(f); + *ttyn = TtyName; + return f; +--- 301,307 ---- + return -1; + } + signal(SIGCHLD, sigcld); +! vim_strncpy((char_u *)TtyName, (char_u *)m, sizeof(TtyName) - 1); + initmaster(f); + *ttyn = TtyName; + return f; +*************** +*** 326,332 **** + /* a dumb looking loop replaced by mycrofts code: */ + if ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_EXTRA)) < 0) + return -1; +! strncpy(TtyName, ttyname(f), sizeof(TtyName)); + if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK)) + { + close(f); +--- 326,332 ---- + /* a dumb looking loop replaced by mycrofts code: */ + if ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_EXTRA)) < 0) + return -1; +! vim_strncpy((char_u *)TtyName, (char_u *)ttyname(f), sizeof(TtyName) - 1); + if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK)) + { + close(f); +*** ../vim-7.3.155/src/version.c 2011-04-11 13:46:07.000000000 +0200 +--- src/version.c 2011-04-11 14:23:38.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 156, + /**/ + +-- +I think that you'll agree that engineers are very effective in their social +interactions. It's the "normal" people who are nuts. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 8d7c66e79f2fd09cef2342a3ec1df572b0308d20 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:45 +0200 Subject: [PATCH 0174/3803] - patchlevel 157 --- 7.3.157 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 7.3.157 diff --git a/7.3.157 b/7.3.157 new file mode 100644 index 00000000..403c9486 --- /dev/null +++ b/7.3.157 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.157 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.157 +Problem: Superfluous assignment. +Solution: Remove assignment. +Files: src/misc1.c + + +*** ../vim-7.3.156/src/misc1.c 2011-03-22 13:07:19.000000000 +0100 +--- src/misc1.c 2011-04-11 14:11:17.000000000 +0200 +*************** +*** 6773,6780 **** + { + curwin->w_cursor.lnum = our_paren_pos.lnum; + curwin->w_cursor.col = col; +! if ((trypos = find_match_paren(ind_maxparen, +! ind_maxcomment)) != NULL) + amount += ind_unclosed2; + else + amount += ind_unclosed; +--- 6775,6781 ---- + { + curwin->w_cursor.lnum = our_paren_pos.lnum; + curwin->w_cursor.col = col; +! if (find_match_paren(ind_maxparen, ind_maxcomment) != NULL) + amount += ind_unclosed2; + else + amount += ind_unclosed; +*** ../vim-7.3.156/src/version.c 2011-04-11 14:24:33.000000000 +0200 +--- src/version.c 2011-04-11 14:25:36.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 157, + /**/ + +-- +A radioactive cat has eighteen half-lives. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From db2e3640606baff31db37271f453ae36172cc110 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:45 +0200 Subject: [PATCH 0175/3803] - patchlevel 158 --- 7.3.158 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 7.3.158 diff --git a/7.3.158 b/7.3.158 new file mode 100644 index 00000000..8fba3508 --- /dev/null +++ b/7.3.158 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.158 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.158 +Problem: Might use uninitialized memory in C indenting. +Solution: Init arrays to empty. +Files: src/misc1.c + + +*** ../vim-7.3.157/src/misc1.c 2011-04-11 14:26:15.000000000 +0200 +--- src/misc1.c 2011-04-11 14:11:17.000000000 +0200 +*************** +*** 6433,6438 **** +--- 6433,6440 ---- + /* find how indented the line beginning the comment is */ + getvcol(curwin, trypos, &col, NULL, NULL); + amount = col; ++ *lead_start = NUL; ++ *lead_middle = NUL; + + p = curbuf->b_p_com; + while (*p != NUL) +*** ../vim-7.3.157/src/version.c 2011-04-11 14:26:15.000000000 +0200 +--- src/version.c 2011-04-11 14:27:05.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 158, + /**/ + +-- +It's totally unfair to suggest - as many have - that engineers are socially +inept. Engineers simply have different objectives when it comes to social +interaction. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 44f92d3da46a20431dfd605fc37f6bdc46e3a02c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:45 +0200 Subject: [PATCH 0176/3803] - patchlevel 159 --- 7.3.159 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 7.3.159 diff --git a/7.3.159 b/7.3.159 new file mode 100644 index 00000000..7029ac86 --- /dev/null +++ b/7.3.159 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.159 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.159 +Problem: Using uninitialized pointer when out of memory. +Solution: Check for NULL return value. +Files: src/mbyte.c + + +*** ../vim-7.3.158/src/mbyte.c 2010-10-27 13:37:39.000000000 +0200 +--- src/mbyte.c 2011-04-11 14:17:39.000000000 +0200 +*************** +*** 4129,4135 **** + done = to - (char *)result; + } + +! if (resultlenp != NULL) + *resultlenp = (int)(to - (char *)result); + return result; + } +--- 4129,4135 ---- + done = to - (char *)result; + } + +! if (resultlenp != NULL && result != NULL) + *resultlenp = (int)(to - (char *)result); + return result; + } +*** ../vim-7.3.158/src/version.c 2011-04-11 14:27:34.000000000 +0200 +--- src/version.c 2011-04-11 14:28:08.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 159, + /**/ + +-- +I learned the customs and mannerisms of engineers by observing them, much the +way Jane Goodall learned about the great apes, but without the hassle of +grooming. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 3efd1974981d1f84ad10b512e2dd7b4ad01cff83 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:46 +0200 Subject: [PATCH 0177/3803] - patchlevel 160 --- 7.3.160 | 482 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 482 insertions(+) create mode 100644 7.3.160 diff --git a/7.3.160 b/7.3.160 new file mode 100644 index 00000000..bf3a069f --- /dev/null +++ b/7.3.160 @@ -0,0 +1,482 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.160 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.160 +Problem: Unsafe string copying. +Solution: Use vim_strncpy() instead of strcpy(). Use vim_strcat() instead + of strcat(). +Files: src/buffer.c, src/ex_docmd.c, src/hardcopy.c, src/menu.c, + src/misc1.c, src/misc2.c, src/proto/misc2.pro, src/netbeans.c, + src/os_unix.c, src/spell.c, src/syntax.c, src/tag.c + +*** ../vim-7.3.159/src/buffer.c 2011-02-15 14:24:42.000000000 +0100 +--- src/buffer.c 2011-04-11 16:08:38.000000000 +0200 +*************** +*** 3176,3182 **** + /* format: "fname + (path) (1 of 2) - VIM" */ + + if (curbuf->b_fname == NULL) +! STRCPY(buf, _("[No Name]")); + else + { + p = transstr(gettail(curbuf->b_fname)); +--- 3176,3182 ---- + /* format: "fname + (path) (1 of 2) - VIM" */ + + if (curbuf->b_fname == NULL) +! vim_strncpy(buf, (char_u *)_("[No Name]"), IOSIZE - 100); + else + { + p = transstr(gettail(curbuf->b_fname)); +*************** +*** 3232,3238 **** + if (serverName != NULL) + { + STRCAT(buf, " - "); +! STRCAT(buf, serverName); + } + else + #endif +--- 3232,3238 ---- + if (serverName != NULL) + { + STRCAT(buf, " - "); +! vim_strcat(buf, serverName, IOSIZE); + } + else + #endif +*** ../vim-7.3.159/src/ex_docmd.c 2011-03-03 15:54:45.000000000 +0100 +--- src/ex_docmd.c 2011-04-11 15:43:48.000000000 +0200 +*************** +*** 5096,5102 **** + char_u buff[IOSIZE]; + + if (n == 1) +! STRCPY(buff, _("1 more file to edit. Quit anyway?")); + else + vim_snprintf((char *)buff, IOSIZE, + _("%d more files to edit. Quit anyway?"), n); +--- 5096,5104 ---- + char_u buff[IOSIZE]; + + if (n == 1) +! vim_strncpy(buff, +! (char_u *)_("1 more file to edit. Quit anyway?"), +! IOSIZE - 1); + else + vim_snprintf((char *)buff, IOSIZE, + _("%d more files to edit. Quit anyway?"), n); +*** ../vim-7.3.159/src/hardcopy.c 2010-08-15 21:57:25.000000000 +0200 +--- src/hardcopy.c 2011-04-11 15:30:09.000000000 +0200 +*************** +*** 1761,1772 **** + { + char_u buffer[MAXPATHL + 1]; + +! STRCPY(resource->name, name); + /* Look for named resource file in runtimepath */ + STRCPY(buffer, "print"); + add_pathsep(buffer); +! STRCAT(buffer, name); +! STRCAT(buffer, ".ps"); + resource->filename[0] = NUL; + return (do_in_runtimepath(buffer, FALSE, prt_resource_name, + resource->filename) +--- 1761,1772 ---- + { + char_u buffer[MAXPATHL + 1]; + +! vim_strncpy(resource->name, (char_u *)name, 63); + /* Look for named resource file in runtimepath */ + STRCPY(buffer, "print"); + add_pathsep(buffer); +! vim_strcat(buffer, (char_u *)name, MAXPATHL); +! vim_strcat(buffer, (char_u *)".ps", MAXPATHL); + resource->filename[0] = NUL; + return (do_in_runtimepath(buffer, FALSE, prt_resource_name, + resource->filename) +*** ../vim-7.3.159/src/menu.c 2011-01-04 17:49:25.000000000 +0100 +--- src/menu.c 2011-04-11 15:17:21.000000000 +0200 +*************** +*** 1394,1400 **** + int idx; + { + static vimmenu_T *menu = NULL; +! static char_u tbuffer[256]; /*hack*/ + char_u *str; + #ifdef FEAT_MULTI_LANG + static int should_advance = FALSE; +--- 1394,1401 ---- + int idx; + { + static vimmenu_T *menu = NULL; +! #define TBUFFER_LEN 256 +! static char_u tbuffer[TBUFFER_LEN]; /*hack*/ + char_u *str; + #ifdef FEAT_MULTI_LANG + static int should_advance = FALSE; +*************** +*** 1428,1438 **** + { + #ifdef FEAT_MULTI_LANG + if (should_advance) +! STRCPY(tbuffer, menu->en_dname); + else + { + #endif +! STRCPY(tbuffer, menu->dname); + #ifdef FEAT_MULTI_LANG + if (menu->en_dname == NULL) + should_advance = TRUE; +--- 1429,1439 ---- + { + #ifdef FEAT_MULTI_LANG + if (should_advance) +! vim_strncpy(tbuffer, menu->en_dname, TBUFFER_LEN - 2); + else + { + #endif +! vim_strncpy(tbuffer, menu->dname, TBUFFER_LEN - 2); + #ifdef FEAT_MULTI_LANG + if (menu->en_dname == NULL) + should_advance = TRUE; +*** ../vim-7.3.159/src/misc1.c 2011-04-11 14:27:34.000000000 +0200 +--- src/misc1.c 2011-04-11 16:03:22.000000000 +0200 +*************** +*** 3332,3350 **** + if (pn == 1) + { + if (n > 0) +! STRCPY(msg_buf, _("1 more line")); + else +! STRCPY(msg_buf, _("1 line less")); + } + else + { + if (n > 0) +! sprintf((char *)msg_buf, _("%ld more lines"), pn); + else +! sprintf((char *)msg_buf, _("%ld fewer lines"), pn); + } + if (got_int) +! STRCAT(msg_buf, _(" (Interrupted)")); + if (msg(msg_buf)) + { + set_keep_msg(msg_buf, 0); +--- 3332,3354 ---- + if (pn == 1) + { + if (n > 0) +! vim_strncpy(msg_buf, (char_u *)_("1 more line"), +! MSG_BUF_LEN - 1); + else +! vim_strncpy(msg_buf, (char_u *)_("1 line less"), +! MSG_BUF_LEN - 1); + } + else + { + if (n > 0) +! vim_snprintf((char *)msg_buf, MSG_BUF_LEN, +! _("%ld more lines"), pn); + else +! vim_snprintf((char *)msg_buf, MSG_BUF_LEN, +! _("%ld fewer lines"), pn); + } + if (got_int) +! vim_strcat(msg_buf, (char_u *)_(" (Interrupted)"), MSG_BUF_LEN); + if (msg(msg_buf)) + { + set_keep_msg(msg_buf, 0); +*** ../vim-7.3.159/src/misc2.c 2010-12-08 13:11:15.000000000 +0100 +--- src/misc2.c 2011-04-11 15:30:20.000000000 +0200 +*************** +*** 1647,1652 **** +--- 1647,1674 ---- + } + + /* ++ * Like strcat(), but make sure the result fits in "tosize" bytes and is ++ * always NUL terminated. ++ */ ++ void ++ vim_strcat(to, from, tosize) ++ char_u *to; ++ char_u *from; ++ size_t tosize; ++ { ++ size_t tolen = STRLEN(to); ++ size_t fromlen = STRLEN(from); ++ ++ if (tolen + fromlen + 1 > tosize) ++ { ++ mch_memmove(to + tolen, from, tosize - tolen - 1); ++ to[tosize - 1] = NUL; ++ } ++ else ++ STRCPY(to + tolen, from); ++ } ++ ++ /* + * Isolate one part of a string option where parts are separated with + * "sep_chars". + * The part is copied into "buf[maxlen]". +*** ../vim-7.3.159/src/proto/misc2.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/misc2.pro 2011-04-11 15:29:55.000000000 +0200 +*************** +*** 40,45 **** +--- 40,46 ---- + void copy_chars __ARGS((char_u *ptr, size_t count, int c)); + void del_trailing_spaces __ARGS((char_u *ptr)); + void vim_strncpy __ARGS((char_u *to, char_u *from, size_t len)); ++ void vim_strcat __ARGS((char_u *to, char_u *from, size_t tosize)); + int copy_option_part __ARGS((char_u **option, char_u *buf, int maxlen, char *sep_chars)); + void vim_free __ARGS((void *x)); + int vim_stricmp __ARGS((char *s1, char *s2)); +*** ../vim-7.3.159/src/netbeans.c 2011-04-01 15:33:54.000000000 +0200 +--- src/netbeans.c 2011-04-11 16:02:51.000000000 +0200 +*************** +*** 3914,3927 **** + } + else + { +! char_u ebuf[BUFSIZ]; + +! STRCPY(ebuf, (char_u *)_("E505: ")); +! STRCAT(ebuf, IObuff); +! STRCAT(ebuf, (char_u *)_("is read-only (add ! to override)")); +! STRCPY(IObuff, ebuf); +! nbdebug((" %s\n", ebuf )); +! emsg(IObuff); + } + } + +--- 3914,3925 ---- + } + else + { +! char_u msgbuf[IOSIZE]; + +! vim_snprintf((char *)msgbuf, IOSIZE, +! _("E505: %s is read-only (add ! to override)"), IObuff); +! nbdebug((" %s\n", msgbuf)); +! emsg(msgbuf); + } + } + +*** ../vim-7.3.159/src/os_unix.c 2011-02-15 17:39:14.000000000 +0100 +--- src/os_unix.c 2011-04-11 16:39:11.000000000 +0200 +*************** +*** 5725,5730 **** +--- 5725,5731 ---- + if (shell_style == STYLE_PRINT && !did_find_nul) + { + /* If there is a NUL, set did_find_nul, else set check_spaces */ ++ buffer[len] = NUL; + if (len && (int)STRLEN(buffer) < (int)len - 1) + did_find_nul = TRUE; + else +*************** +*** 6594,6600 **** + xterm_hints.x = 2; + return TRUE; + } +! if (mouse_code == NULL) + { + xterm_trace = 0; + return FALSE; +--- 6595,6601 ---- + xterm_hints.x = 2; + return TRUE; + } +! if (mouse_code == NULL || STRLEN(mouse_code) > 45) + { + xterm_trace = 0; + return FALSE; +*** ../vim-7.3.159/src/spell.c 2011-02-01 13:59:44.000000000 +0100 +--- src/spell.c 2011-04-11 15:50:40.000000000 +0200 +*************** +*** 6957,6963 **** + if (ae->ae_add == NULL) + *newword = NUL; + else +! STRCPY(newword, ae->ae_add); + p = word; + if (ae->ae_chop != NULL) + { +--- 6957,6963 ---- + if (ae->ae_add == NULL) + *newword = NUL; + else +! vim_strncpy(newword, ae->ae_add, MAXWLEN - 1); + p = word; + if (ae->ae_chop != NULL) + { +*************** +*** 6978,6984 **** + else + { + /* suffix: chop/add at the end of the word */ +! STRCPY(newword, word); + if (ae->ae_chop != NULL) + { + /* Remove chop string. */ +--- 6978,6984 ---- + else + { + /* suffix: chop/add at the end of the word */ +! vim_strncpy(newword, word, MAXWLEN - 1); + if (ae->ae_chop != NULL) + { + /* Remove chop string. */ +*************** +*** 8654,8660 **** + * Write the .sug file. + * Make the file name by changing ".spl" to ".sug". + */ +! STRCPY(fname, wfname); + len = (int)STRLEN(fname); + fname[len - 2] = 'u'; + fname[len - 1] = 'g'; +--- 8654,8660 ---- + * Write the .sug file. + * Make the file name by changing ".spl" to ".sug". + */ +! vim_strncpy(fname, wfname, MAXPATHL - 1); + len = (int)STRLEN(fname); + fname[len - 2] = 'u'; + fname[len - 1] = 'g'; +*************** +*** 10261,10267 **** + + /* The suggested word may replace only part of the bad word, add + * the not replaced part. */ +! STRCPY(wcopy, stp->st_word); + if (sug.su_badlen > stp->st_orglen) + vim_strncpy(wcopy + stp->st_wordlen, + sug.su_badptr + stp->st_orglen, +--- 10261,10267 ---- + + /* The suggested word may replace only part of the bad word, add + * the not replaced part. */ +! vim_strncpy(wcopy, stp->st_word, MAXWLEN); + if (sug.su_badlen > stp->st_orglen) + vim_strncpy(wcopy + stp->st_wordlen, + sug.su_badptr + stp->st_orglen, +*************** +*** 13162,13168 **** + pbad = badsound2; + } + +! if (lendiff > 0) + { + /* Add part of the bad word to the good word, so that we soundfold + * what replaces the bad word. */ +--- 13162,13168 ---- + pbad = badsound2; + } + +! if (lendiff > 0 && stp->st_wordlen + lendiff < MAXWLEN) + { + /* Add part of the bad word to the good word, so that we soundfold + * what replaces the bad word. */ +*************** +*** 13875,13881 **** + for (i = gap->ga_len - 1; i >= 0; --i) + { + /* Need to append what follows to check for "the the". */ +! STRCPY(longword, stp[i].st_word); + len = stp[i].st_wordlen; + vim_strncpy(longword + len, su->su_badptr + stp[i].st_orglen, + MAXWLEN - len); +--- 13875,13881 ---- + for (i = gap->ga_len - 1; i >= 0; --i) + { + /* Need to append what follows to check for "the the". */ +! vim_strncpy(longword, stp[i].st_word, MAXWLEN); + len = stp[i].st_wordlen; + vim_strncpy(longword + len, su->su_badptr + stp[i].st_orglen, + MAXWLEN - len); +*************** +*** 14221,14227 **** + *t = NUL; + } + else +! STRCPY(word, s); + + smp = (salitem_T *)slang->sl_sal.ga_data; + +--- 14221,14227 ---- + *t = NUL; + } + else +! vim_strncpy(word, s, MAXWLEN - 1); + + smp = (salitem_T *)slang->sl_sal.ga_data; + +*** ../vim-7.3.159/src/syntax.c 2011-04-02 15:12:45.000000000 +0200 +--- src/syntax.c 2011-04-11 15:44:30.000000000 +0200 +*************** +*** 8576,8583 **** + if (iarg & hl_attr_table[i]) + { + if (buf[0] != NUL) +! STRCAT(buf, ","); +! STRCAT(buf, hl_name_table[i]); + iarg &= ~hl_attr_table[i]; /* don't want "inverse" */ + } + } +--- 8576,8583 ---- + if (iarg & hl_attr_table[i]) + { + if (buf[0] != NUL) +! vim_strcat(buf, (char_u *)",", 100); +! vim_strcat(buf, (char_u *)hl_name_table[i], 100); + iarg &= ~hl_attr_table[i]; /* don't want "inverse" */ + } + } +*** ../vim-7.3.159/src/tag.c 2011-02-25 15:13:43.000000000 +0100 +--- src/tag.c 2011-04-11 15:34:59.000000000 +0200 +*************** +*** 806,812 **** + p = tag_full_fname(&tagp); + if (p == NULL) + continue; +! STRCPY(fname, p); + vim_free(p); + + /* +--- 806,812 ---- + p = tag_full_fname(&tagp); + if (p == NULL) + continue; +! vim_strncpy(fname, p, MAXPATHL); + vim_free(p); + + /* +*** ../vim-7.3.159/src/version.c 2011-04-11 14:29:13.000000000 +0200 +--- src/version.c 2011-04-11 16:50:53.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 160, + /**/ + +-- +If someone questions your market projections, simply point out that your +target market is "People who are nuts" and "People who will buy any damn +thing". Nobody is going to tell you there aren't enough of those people +to go around. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f9375129dc02c93051b6396cb140473b0975b373 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:46 +0200 Subject: [PATCH 0178/3803] - patchlevel 161 --- 7.3.161 | 1645 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1645 insertions(+) create mode 100644 7.3.161 diff --git a/7.3.161 b/7.3.161 new file mode 100644 index 00000000..61223ec2 --- /dev/null +++ b/7.3.161 @@ -0,0 +1,1645 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.161 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.161 +Problem: Items on the stack may be too big. +Solution: Make items static or allocate them. +Files: src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, + src/fileio.c, src/hardcopy.c, src/quickfix.c, src/main.c, + src/netbeans.c, src/spell.c, src/tag.c, src/vim.h, src/xxd/xxd.c + + +*** ../vim-7.3.160/src/eval.c 2011-04-11 13:46:07.000000000 +0200 +--- src/eval.c 2011-04-11 21:05:50.000000000 +0200 +*************** +*** 11100,11117 **** + typval_T *argvars UNUSED; + typval_T *rettv; + { +! char_u cwd[MAXPATHL]; + + rettv->v_type = VAR_STRING; +! if (mch_dirname(cwd, MAXPATHL) == FAIL) +! rettv->vval.v_string = NULL; +! else + { +! rettv->vval.v_string = vim_strsave(cwd); + #ifdef BACKSLASH_IN_FILENAME +! if (rettv->vval.v_string != NULL) +! slash_adjust(rettv->vval.v_string); + #endif + } + } + +--- 11100,11121 ---- + typval_T *argvars UNUSED; + typval_T *rettv; + { +! char_u *cwd; + + rettv->v_type = VAR_STRING; +! rettv->vval.v_string = NULL; +! cwd = alloc(MAXPATHL); +! if (cwd != NULL) + { +! if (mch_dirname(cwd, MAXPATHL) != FAIL) +! { +! rettv->vval.v_string = vim_strsave(cwd); + #ifdef BACKSLASH_IN_FILENAME +! if (rettv->vval.v_string != NULL) +! slash_adjust(rettv->vval.v_string); + #endif ++ } ++ vim_free(cwd); + } + } + +*************** +*** 14938,14943 **** +--- 14942,14950 ---- + typval_T *rettv; + { + char_u *p; ++ #ifdef HAVE_READLINK ++ char_u *buf = NULL; ++ #endif + + p = get_tv_string(&argvars[0]); + #ifdef FEAT_SHORTCUT +*************** +*** 14953,14959 **** + #else + # ifdef HAVE_READLINK + { +- char_u buf[MAXPATHL + 1]; + char_u *cpy; + int len; + char_u *remain = NULL; +--- 14960,14965 ---- +*************** +*** 14981,14986 **** +--- 14987,14996 ---- + q[-1] = NUL; + } + ++ buf = alloc(MAXPATHL + 1); ++ if (buf == NULL) ++ goto fail; ++ + for (;;) + { + for (;;) +*************** +*** 15124,15129 **** +--- 15134,15140 ---- + + #ifdef HAVE_READLINK + fail: ++ vim_free(buf); + #endif + rettv->v_type = VAR_STRING; + } +*************** +*** 17604,17621 **** + typval_T *argvars UNUSED; + typval_T *rettv; + { +! char_u fname[MAXPATHL + 1]; + tagname_T tn; + int first; + + if (rettv_list_alloc(rettv) == FAIL) + return; + + for (first = TRUE; ; first = FALSE) + if (get_tagfname(&tn, first, fname) == FAIL + || list_append_string(rettv->vval.v_list, fname, -1) == FAIL) + break; + tagname_free(&tn); + } + + /* +--- 17615,17636 ---- + typval_T *argvars UNUSED; + typval_T *rettv; + { +! char_u *fname; + tagname_T tn; + int first; + + if (rettv_list_alloc(rettv) == FAIL) + return; ++ fname = alloc(MAXPATHL); ++ if (fname == NULL) ++ return; + + for (first = TRUE; ; first = FALSE) + if (get_tagfname(&tn, first, fname) == FAIL + || list_append_string(rettv->vval.v_list, fname, -1) == FAIL) + break; + tagname_free(&tn); ++ vim_free(fname); + } + + /* +*** ../vim-7.3.160/src/ex_cmds.c 2011-02-01 13:48:47.000000000 +0100 +--- src/ex_cmds.c 2011-04-11 20:51:34.000000000 +0200 +*************** +*** 2777,2783 **** + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if (p_confirm || cmdmod.confirm) + { +! char_u buff[IOSIZE]; + + dialog_msg(buff, _("Overwrite existing file \"%s\"?"), fname); + if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 2) != VIM_YES) +--- 2777,2783 ---- + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if (p_confirm || cmdmod.confirm) + { +! char_u buff[DIALOG_MSG_SIZE]; + + dialog_msg(buff, _("Overwrite existing file \"%s\"?"), fname); + if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 2) != VIM_YES) +*************** +*** 2795,2801 **** + /* For ":w! filename" check that no swap file exists for "filename". */ + if (other && !emsg_silent) + { +! char_u dir[MAXPATHL]; + char_u *p; + int r; + char_u *swapname; +--- 2795,2801 ---- + /* For ":w! filename" check that no swap file exists for "filename". */ + if (other && !emsg_silent) + { +! char_u *dir; + char_u *p; + int r; + char_u *swapname; +*************** +*** 2806,2825 **** + * Use 'shortname' of the current buffer, since there is no buffer + * for the written file. */ + if (*p_dir == NUL) + STRCPY(dir, "."); + else + { + p = p_dir; + copy_option_part(&p, dir, MAXPATHL, ","); + } + swapname = makeswapname(fname, ffname, curbuf, dir); + r = vim_fexists(swapname); + if (r) + { + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if (p_confirm || cmdmod.confirm) + { +! char_u buff[IOSIZE]; + + dialog_msg(buff, + _("Swap file \"%s\" exists, overwrite anyway?"), +--- 2806,2834 ---- + * Use 'shortname' of the current buffer, since there is no buffer + * for the written file. */ + if (*p_dir == NUL) ++ { ++ dir = alloc(5); ++ if (dir == NULL) ++ return FAIL; + STRCPY(dir, "."); ++ } + else + { ++ dir = alloc(MAXPATHL); ++ if (dir == NULL) ++ return FAIL; + p = p_dir; + copy_option_part(&p, dir, MAXPATHL, ","); + } + swapname = makeswapname(fname, ffname, curbuf, dir); ++ vim_free(dir); + r = vim_fexists(swapname); + if (r) + { + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if (p_confirm || cmdmod.confirm) + { +! char_u buff[DIALOG_MSG_SIZE]; + + dialog_msg(buff, + _("Swap file \"%s\" exists, overwrite anyway?"), +*************** +*** 2969,2975 **** + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if ((p_confirm || cmdmod.confirm) && buf->b_fname != NULL) + { +! char_u buff[IOSIZE]; + + if (buf->b_p_ro) + dialog_msg(buff, _("'readonly' option is set for \"%s\".\nDo you wish to write anyway?"), +--- 2978,2984 ---- + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if ((p_confirm || cmdmod.confirm) && buf->b_fname != NULL) + { +! char_u buff[DIALOG_MSG_SIZE]; + + if (buf->b_p_ro) + dialog_msg(buff, _("'readonly' option is set for \"%s\".\nDo you wish to write anyway?"), +*** ../vim-7.3.160/src/ex_cmds2.c 2011-02-25 14:46:06.000000000 +0100 +--- src/ex_cmds2.c 2011-04-11 20:51:40.000000000 +0200 +*************** +*** 1492,1498 **** + buf_T *buf; + int checkall; /* may abandon all changed buffers */ + { +! char_u buff[IOSIZE]; + int ret; + buf_T *buf2; + +--- 1492,1498 ---- + buf_T *buf; + int checkall; /* may abandon all changed buffers */ + { +! char_u buff[DIALOG_MSG_SIZE]; + int ret; + buf_T *buf2; + +*** ../vim-7.3.160/src/ex_docmd.c 2011-04-11 16:56:29.000000000 +0200 +--- src/ex_docmd.c 2011-04-11 21:20:35.000000000 +0200 +*************** +*** 5093,5106 **** + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if ((p_confirm || cmdmod.confirm) && curbuf->b_fname != NULL) + { +! char_u buff[IOSIZE]; + + if (n == 1) + vim_strncpy(buff, + (char_u *)_("1 more file to edit. Quit anyway?"), +! IOSIZE - 1); + else +! vim_snprintf((char *)buff, IOSIZE, + _("%d more files to edit. Quit anyway?"), n); + if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 1) == VIM_YES) + return OK; +--- 5093,5106 ---- + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if ((p_confirm || cmdmod.confirm) && curbuf->b_fname != NULL) + { +! char_u buff[DIALOG_MSG_SIZE]; + + if (n == 1) + vim_strncpy(buff, + (char_u *)_("1 more file to edit. Quit anyway?"), +! DIALOG_MSG_SIZE - 1); + else +! vim_snprintf((char *)buff, DIALOG_MSG_SIZE, + _("%d more files to edit. Quit anyway?"), n); + if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 1) == VIM_YES) + return OK; +*************** +*** 8926,8960 **** + failed = TRUE; + if (eap->cmdidx == CMD_mksession) + { +! char_u dirnow[MAXPATHL]; /* current directory */ + +! /* +! * Change to session file's dir. +! */ +! if (mch_dirname(dirnow, MAXPATHL) == FAIL +! || mch_chdir((char *)dirnow) != 0) +! *dirnow = NUL; +! if (*dirnow != NUL && (ssop_flags & SSOP_SESDIR)) +! { +! if (vim_chdirfile(fname) == OK) +! shorten_fnames(TRUE); +! } +! else if (*dirnow != NUL +! && (ssop_flags & SSOP_CURDIR) && globaldir != NULL) + { +! if (mch_chdir((char *)globaldir) == 0) +! shorten_fnames(TRUE); +! } + +! failed |= (makeopens(fd, dirnow) == FAIL); + +! /* restore original dir */ +! if (*dirnow != NUL && ((ssop_flags & SSOP_SESDIR) + || ((ssop_flags & SSOP_CURDIR) && globaldir != NULL))) +! { +! if (mch_chdir((char *)dirnow) != 0) +! EMSG(_(e_prev_dir)); +! shorten_fnames(TRUE); + } + } + else +--- 8926,8967 ---- + failed = TRUE; + if (eap->cmdidx == CMD_mksession) + { +! char_u *dirnow; /* current directory */ + +! dirnow = alloc(MAXPATHL); +! if (dirnow == NULL) +! failed = TRUE; +! else + { +! /* +! * Change to session file's dir. +! */ +! if (mch_dirname(dirnow, MAXPATHL) == FAIL +! || mch_chdir((char *)dirnow) != 0) +! *dirnow = NUL; +! if (*dirnow != NUL && (ssop_flags & SSOP_SESDIR)) +! { +! if (vim_chdirfile(fname) == OK) +! shorten_fnames(TRUE); +! } +! else if (*dirnow != NUL +! && (ssop_flags & SSOP_CURDIR) && globaldir != NULL) +! { +! if (mch_chdir((char *)globaldir) == 0) +! shorten_fnames(TRUE); +! } + +! failed |= (makeopens(fd, dirnow) == FAIL); + +! /* restore original dir */ +! if (*dirnow != NUL && ((ssop_flags & SSOP_SESDIR) + || ((ssop_flags & SSOP_CURDIR) && globaldir != NULL))) +! { +! if (mch_chdir((char *)dirnow) != 0) +! EMSG(_(e_prev_dir)); +! shorten_fnames(TRUE); +! } +! vim_free(dirnow); + } + } + else +*************** +*** 8985,8994 **** + else if (eap->cmdidx == CMD_mksession) + { + /* successful session write - set this_session var */ +! char_u tbuf[MAXPATHL]; + +! if (vim_FullName(fname, tbuf, MAXPATHL, FALSE) == OK) +! set_vim_var_string(VV_THIS_SESSION, tbuf, -1); + } + #endif + #ifdef MKSESSION_NL +--- 8992,9006 ---- + else if (eap->cmdidx == CMD_mksession) + { + /* successful session write - set this_session var */ +! char_u *tbuf; + +! tbuf = alloc(MAXPATHL); +! if (tbuf != NULL) +! { +! if (vim_FullName(fname, tbuf, MAXPATHL, FALSE) == OK) +! set_vim_var_string(VV_THIS_SESSION, tbuf, -1); +! vim_free(tbuf); +! } + } + #endif + #ifdef MKSESSION_NL +*************** +*** 10677,10683 **** + unsigned *flagp; + { + int i; +! char_u buf[MAXPATHL]; + char_u *s; + + if (gap->ga_len == 0) +--- 10689,10695 ---- + unsigned *flagp; + { + int i; +! char_u *buf = NULL; + char_u *s; + + if (gap->ga_len == 0) +*************** +*** 10692,10702 **** + { + if (fullname) + { +! (void)vim_FullName(s, buf, MAXPATHL, FALSE); +! s = buf; + } + if (fputs(" ", fd) < 0 || ses_put_fname(fd, s, flagp) == FAIL) + return FAIL; + } + } + return put_eol(fd); +--- 10704,10722 ---- + { + if (fullname) + { +! buf = alloc(MAXPATHL); +! if (buf != NULL) +! { +! (void)vim_FullName(s, buf, MAXPATHL, FALSE); +! s = buf; +! } + } + if (fputs(" ", fd) < 0 || ses_put_fname(fd, s, flagp) == FAIL) ++ { ++ vim_free(buf); + return FAIL; ++ } ++ vim_free(buf); + } + } + return put_eol(fd); +*************** +*** 10925,10931 **** + + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) || defined(PROTO) + /* +! * Make a dialog message in "buff[IOSIZE]". + * "format" must contain "%s". + */ + void +--- 10945,10951 ---- + + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) || defined(PROTO) + /* +! * Make a dialog message in "buff[DIALOG_MSG_SIZE]". + * "format" must contain "%s". + */ + void +*************** +*** 10936,10942 **** + { + if (fname == NULL) + fname = (char_u *)_("Untitled"); +! vim_snprintf((char *)buff, IOSIZE, format, fname); + } + #endif + +--- 10956,10962 ---- + { + if (fname == NULL) + fname = (char_u *)_("Untitled"); +! vim_snprintf((char *)buff, DIALOG_MSG_SIZE, format, fname); + } + #endif + +*** ../vim-7.3.160/src/fileio.c 2011-02-25 16:52:13.000000000 +0100 +--- src/fileio.c 2011-04-11 18:35:10.000000000 +0200 +*************** +*** 6023,6037 **** + shorten_fname1(full_path) + char_u *full_path; + { +! char_u dirname[MAXPATHL]; + char_u *p = full_path; + + if (mch_dirname(dirname, MAXPATHL) == OK) + { + p = shorten_fname(full_path, dirname); + if (p == NULL || *p == NUL) + p = full_path; + } + return p; + } + #endif +--- 6023,6041 ---- + shorten_fname1(full_path) + char_u *full_path; + { +! char_u *dirname; + char_u *p = full_path; + ++ dirname = alloc(MAXPATHL); ++ if (dirname == NULL) ++ return full_path; + if (mch_dirname(dirname, MAXPATHL) == OK) + { + p = shorten_fname(full_path, dirname); + if (p == NULL || *p == NUL) + p = full_path; + } ++ vim_free(dirname); + return p; + } + #endif +*** ../vim-7.3.160/src/hardcopy.c 2011-04-11 16:56:29.000000000 +0200 +--- src/hardcopy.c 2011-04-11 18:23:38.000000000 +0200 +*************** +*** 1759,1765 **** + char *name; + struct prt_ps_resource_S *resource; + { +! char_u buffer[MAXPATHL + 1]; + + vim_strncpy(resource->name, (char_u *)name, 63); + /* Look for named resource file in runtimepath */ +--- 1759,1770 ---- + char *name; + struct prt_ps_resource_S *resource; + { +! char_u *buffer; +! int retval; +! +! buffer = alloc(MAXPATHL + 1); +! if (buffer == NULL) +! return FALSE; + + vim_strncpy(resource->name, (char_u *)name, 63); + /* Look for named resource file in runtimepath */ +*************** +*** 1768,1776 **** + vim_strcat(buffer, (char_u *)name, MAXPATHL); + vim_strcat(buffer, (char_u *)".ps", MAXPATHL); + resource->filename[0] = NUL; +! return (do_in_runtimepath(buffer, FALSE, prt_resource_name, + resource->filename) + && resource->filename[0] != NUL); + } + + /* PS CR and LF characters have platform independent values */ +--- 1773,1783 ---- + vim_strcat(buffer, (char_u *)name, MAXPATHL); + vim_strcat(buffer, (char_u *)".ps", MAXPATHL); + resource->filename[0] = NUL; +! retval = (do_in_runtimepath(buffer, FALSE, prt_resource_name, + resource->filename) + && resource->filename[0] != NUL); ++ vim_free(buffer); ++ return retval; + } + + /* PS CR and LF characters have platform independent values */ +*************** +*** 2848,2862 **** + double right; + double top; + double bottom; +! struct prt_ps_resource_S res_prolog; +! struct prt_ps_resource_S res_encoding; + char buffer[256]; + char_u *p_encoding; + char_u *p; + #ifdef FEAT_MBYTE +! struct prt_ps_resource_S res_cidfont; +! struct prt_ps_resource_S res_cmap; + #endif + + /* + * PS DSC Header comments - no PS code! +--- 2855,2887 ---- + double right; + double top; + double bottom; +! struct prt_ps_resource_S *res_prolog; +! struct prt_ps_resource_S *res_encoding; + char buffer[256]; + char_u *p_encoding; + char_u *p; + #ifdef FEAT_MBYTE +! struct prt_ps_resource_S *res_cidfont; +! struct prt_ps_resource_S *res_cmap; + #endif ++ int retval = FALSE; ++ ++ res_prolog = (struct prt_ps_resource_S *) ++ alloc(sizeof(struct prt_ps_resource_S)); ++ res_encoding = (struct prt_ps_resource_S *) ++ alloc(sizeof(struct prt_ps_resource_S)); ++ #ifdef FEAT_MBYTE ++ res_cidfont = (struct prt_ps_resource_S *) ++ alloc(sizeof(struct prt_ps_resource_S)); ++ res_cmap = (struct prt_ps_resource_S *) ++ alloc(sizeof(struct prt_ps_resource_S)); ++ #endif ++ if (res_prolog == NULL || res_encoding == NULL ++ #ifdef FEAT_MBYTE ++ || res_cidfont == NULL || res_cmap == NULL ++ #endif ++ ) ++ goto theend; + + /* + * PS DSC Header comments - no PS code! +*************** +*** 2932,2958 **** + #endif + + /* Search for external resources VIM supplies */ +! if (!prt_find_resource("prolog", &res_prolog)) + { + EMSG(_("E456: Can't find PostScript resource file \"prolog.ps\"")); + return FALSE; + } +! if (!prt_open_resource(&res_prolog)) + return FALSE; +! if (!prt_check_resource(&res_prolog, PRT_PROLOG_VERSION)) + return FALSE; + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { + /* Look for required version of multi-byte printing procset */ +! if (!prt_find_resource("cidfont", &res_cidfont)) + { + EMSG(_("E456: Can't find PostScript resource file \"cidfont.ps\"")); + return FALSE; + } +! if (!prt_open_resource(&res_cidfont)) + return FALSE; +! if (!prt_check_resource(&res_cidfont, PRT_CID_PROLOG_VERSION)) + return FALSE; + } + #endif +--- 2957,2983 ---- + #endif + + /* Search for external resources VIM supplies */ +! if (!prt_find_resource("prolog", res_prolog)) + { + EMSG(_("E456: Can't find PostScript resource file \"prolog.ps\"")); + return FALSE; + } +! if (!prt_open_resource(res_prolog)) + return FALSE; +! if (!prt_check_resource(res_prolog, PRT_PROLOG_VERSION)) + return FALSE; + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { + /* Look for required version of multi-byte printing procset */ +! if (!prt_find_resource("cidfont", res_cidfont)) + { + EMSG(_("E456: Can't find PostScript resource file \"cidfont.ps\"")); + return FALSE; + } +! if (!prt_open_resource(res_cidfont)) + return FALSE; +! if (!prt_check_resource(res_cidfont, PRT_CID_PROLOG_VERSION)) + return FALSE; + } + #endif +*************** +*** 2968,2974 **** + #endif + p_encoding = enc_skip(p_penc); + if (*p_encoding == NUL +! || !prt_find_resource((char *)p_encoding, &res_encoding)) + { + /* 'printencoding' not set or not supported - find alternate */ + #ifdef FEAT_MBYTE +--- 2993,2999 ---- + #endif + p_encoding = enc_skip(p_penc); + if (*p_encoding == NUL +! || !prt_find_resource((char *)p_encoding, res_encoding)) + { + /* 'printencoding' not set or not supported - find alternate */ + #ifdef FEAT_MBYTE +*************** +*** 2977,2989 **** + p_encoding = enc_skip(p_enc); + props = enc_canon_props(p_encoding); + if (!(props & ENC_8BIT) +! || !prt_find_resource((char *)p_encoding, &res_encoding)) + /* 8-bit 'encoding' is not supported */ + #endif + { + /* Use latin1 as default printing encoding */ + p_encoding = (char_u *)"latin1"; +! if (!prt_find_resource((char *)p_encoding, &res_encoding)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + p_encoding); +--- 3002,3014 ---- + p_encoding = enc_skip(p_enc); + props = enc_canon_props(p_encoding); + if (!(props & ENC_8BIT) +! || !prt_find_resource((char *)p_encoding, res_encoding)) + /* 8-bit 'encoding' is not supported */ + #endif + { + /* Use latin1 as default printing encoding */ + p_encoding = (char_u *)"latin1"; +! if (!prt_find_resource((char *)p_encoding, res_encoding)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + p_encoding); +*************** +*** 2991,2997 **** + } + } + } +! if (!prt_open_resource(&res_encoding)) + return FALSE; + /* For the moment there are no checks on encoding resource files to + * perform */ +--- 3016,3022 ---- + } + } + } +! if (!prt_open_resource(res_encoding)) + return FALSE; + /* For the moment there are no checks on encoding resource files to + * perform */ +*************** +*** 3005,3017 **** + if (prt_use_courier) + { + /* Include ASCII range encoding vector */ +! if (!prt_find_resource(prt_ascii_encoding, &res_encoding)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + prt_ascii_encoding); + return FALSE; + } +! if (!prt_open_resource(&res_encoding)) + return FALSE; + /* For the moment there are no checks on encoding resource files to + * perform */ +--- 3030,3042 ---- + if (prt_use_courier) + { + /* Include ASCII range encoding vector */ +! if (!prt_find_resource(prt_ascii_encoding, res_encoding)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + prt_ascii_encoding); + return FALSE; + } +! if (!prt_open_resource(res_encoding)) + return FALSE; + /* For the moment there are no checks on encoding resource files to + * perform */ +*************** +*** 3034,3077 **** + if (prt_out_mbyte && prt_custom_cmap) + { + /* Find user supplied CMap */ +! if (!prt_find_resource(prt_cmap, &res_cmap)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + prt_cmap); + return FALSE; + } +! if (!prt_open_resource(&res_cmap)) + return FALSE; + } + #endif + + /* List resources supplied */ +! STRCPY(buffer, res_prolog.title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_prolog.version); + prt_dsc_resources("DocumentSuppliedResources", "procset", buffer); + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { +! STRCPY(buffer, res_cidfont.title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_cidfont.version); + prt_dsc_resources(NULL, "procset", buffer); + + if (prt_custom_cmap) + { +! STRCPY(buffer, res_cmap.title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_cmap.version); + prt_dsc_resources(NULL, "cmap", buffer); + } + } + if (!prt_out_mbyte || prt_use_courier) + #endif + { +! STRCPY(buffer, res_encoding.title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_encoding.version); + prt_dsc_resources(NULL, "encoding", buffer); + } + prt_dsc_requirements(prt_duplex, prt_tumble, prt_collate, +--- 3059,3102 ---- + if (prt_out_mbyte && prt_custom_cmap) + { + /* Find user supplied CMap */ +! if (!prt_find_resource(prt_cmap, res_cmap)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + prt_cmap); + return FALSE; + } +! if (!prt_open_resource(res_cmap)) + return FALSE; + } + #endif + + /* List resources supplied */ +! STRCPY(buffer, res_prolog->title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_prolog->version); + prt_dsc_resources("DocumentSuppliedResources", "procset", buffer); + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { +! STRCPY(buffer, res_cidfont->title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_cidfont->version); + prt_dsc_resources(NULL, "procset", buffer); + + if (prt_custom_cmap) + { +! STRCPY(buffer, res_cmap->title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_cmap->version); + prt_dsc_resources(NULL, "cmap", buffer); + } + } + if (!prt_out_mbyte || prt_use_courier) + #endif + { +! STRCPY(buffer, res_encoding->title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_encoding->version); + prt_dsc_resources(NULL, "encoding", buffer); + } + prt_dsc_requirements(prt_duplex, prt_tumble, prt_collate, +*************** +*** 3114,3128 **** + prt_dsc_noarg("BeginProlog"); + + /* Add required procsets - NOTE: order is important! */ +! if (!prt_add_resource(&res_prolog)) + return FALSE; + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { + /* Add CID font procset, and any user supplied CMap */ +! if (!prt_add_resource(&res_cidfont)) + return FALSE; +! if (prt_custom_cmap && !prt_add_resource(&res_cmap)) + return FALSE; + } + #endif +--- 3139,3153 ---- + prt_dsc_noarg("BeginProlog"); + + /* Add required procsets - NOTE: order is important! */ +! if (!prt_add_resource(res_prolog)) + return FALSE; + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { + /* Add CID font procset, and any user supplied CMap */ +! if (!prt_add_resource(res_cidfont)) + return FALSE; +! if (prt_custom_cmap && !prt_add_resource(res_cmap)) + return FALSE; + } + #endif +*************** +*** 3132,3138 **** + #endif + /* There will be only one Roman font encoding to be included in the PS + * file. */ +! if (!prt_add_resource(&res_encoding)) + return FALSE; + + prt_dsc_noarg("EndProlog"); +--- 3157,3163 ---- + #endif + /* There will be only one Roman font encoding to be included in the PS + * file. */ +! if (!prt_add_resource(res_encoding)) + return FALSE; + + prt_dsc_noarg("EndProlog"); +*************** +*** 3248,3254 **** + prt_dsc_noarg("EndSetup"); + + /* Fail if any problems writing out to the PS file */ +! return !prt_file_error; + } + + void +--- 3273,3289 ---- + prt_dsc_noarg("EndSetup"); + + /* Fail if any problems writing out to the PS file */ +! retval = !prt_file_error; +! +! theend: +! vim_free(res_prolog); +! vim_free(res_encoding); +! #ifdef FEAT_MBYTE +! vim_free(res_cidfont); +! vim_free(res_cmap); +! #endif +! +! return retval; + } + + void +*** ../vim-7.3.160/src/quickfix.c 2010-12-02 15:33:10.000000000 +0100 +--- src/quickfix.c 2011-04-11 17:54:07.000000000 +0200 +*************** +*** 3049,3056 **** + int flags = 0; + colnr_T col; + long tomatch; +! char_u dirname_start[MAXPATHL]; +! char_u dirname_now[MAXPATHL]; + char_u *target_dir = NULL; + #ifdef FEAT_AUTOCMD + char_u *au_name = NULL; +--- 3049,3056 ---- + int flags = 0; + colnr_T col; + long tomatch; +! char_u *dirname_start = NULL; +! char_u *dirname_now = NULL; + char_u *target_dir = NULL; + #ifdef FEAT_AUTOCMD + char_u *au_name = NULL; +*************** +*** 3128,3133 **** +--- 3128,3138 ---- + goto theend; + } + ++ dirname_start = alloc(MAXPATHL); ++ dirname_now = alloc(MAXPATHL); ++ if (dirname_start == NULL || dirname_now == NULL) ++ goto theend; ++ + /* Remember the current directory, because a BufRead autocommand that does + * ":lcd %:p:h" changes the meaning of short path names. */ + mch_dirname(dirname_start, MAXPATHL); +*************** +*** 3364,3369 **** +--- 3369,3376 ---- + } + + theend: ++ vim_free(dirname_now); ++ vim_free(dirname_start); + vim_free(target_dir); + vim_free(regmatch.regprog); + } +*** ../vim-7.3.160/src/main.c 2011-03-22 18:10:34.000000000 +0100 +--- src/main.c 2011-04-11 18:06:06.000000000 +0200 +*************** +*** 3814,3820 **** + int i; + char_u *inicmd = NULL; + char_u *p; +! char_u cwd[MAXPATHL]; + + if (filec > 0 && filev[0][0] == '+') + { +--- 3814,3820 ---- + int i; + char_u *inicmd = NULL; + char_u *p; +! char_u *cwd; + + if (filec > 0 && filev[0][0] == '+') + { +*************** +*** 3827,3841 **** + mainerr_arg_missing((char_u *)filev[-1]); + + /* Temporarily cd to the current directory to handle relative file names. */ + if (mch_dirname(cwd, MAXPATHL) != OK) + return NULL; +! if ((p = vim_strsave_escaped_ext(cwd, + #ifdef BACKSLASH_IN_FILENAME + "", /* rem_backslash() will tell what chars to escape */ + #else + PATH_ESC_CHARS, + #endif +! '\\', TRUE)) == NULL) + return NULL; + ga_init2(&ga, 1, 100); + ga_concat(&ga, (char_u *)":cd "); +--- 3827,3849 ---- + mainerr_arg_missing((char_u *)filev[-1]); + + /* Temporarily cd to the current directory to handle relative file names. */ ++ cwd = alloc(MAXPATHL); ++ if (cwd == NULL) ++ return NULL; + if (mch_dirname(cwd, MAXPATHL) != OK) ++ { ++ vim_free(cwd); + return NULL; +! } +! p = vim_strsave_escaped_ext(cwd, + #ifdef BACKSLASH_IN_FILENAME + "", /* rem_backslash() will tell what chars to escape */ + #else + PATH_ESC_CHARS, + #endif +! '\\', TRUE); +! vim_free(cwd); +! if (p == NULL) + return NULL; + ga_init2(&ga, 1, 100); + ga_concat(&ga, (char_u *)":cd "); +*** ../vim-7.3.160/src/netbeans.c 2011-04-11 16:56:29.000000000 +0200 +--- src/netbeans.c 2011-04-11 18:27:08.000000000 +0200 +*************** +*** 2891,2897 **** + char_u *text; + linenr_T lnum; + int col; +! char buf[MAXPATHL * 2 + 25]; + char_u *p; + + /* Don't do anything when 'ballooneval' is off, messages scrolled the +--- 2891,2897 ---- + char_u *text; + linenr_T lnum; + int col; +! char *buf; + char_u *p; + + /* Don't do anything when 'ballooneval' is off, messages scrolled the +*************** +*** 2905,2919 **** + * length. */ + if (text != NULL && text[0] != NUL && STRLEN(text) < MAXPATHL) + { +! p = nb_quote(text); +! if (p != NULL) + { +! vim_snprintf(buf, sizeof(buf), +! "0:balloonText=%d \"%s\"\n", r_cmdno, p); +! vim_free(p); + } +- nbdebug(("EVT: %s", buf)); +- nb_send(buf, "netbeans_beval_cb"); + } + vim_free(text); + } +--- 2905,2924 ---- + * length. */ + if (text != NULL && text[0] != NUL && STRLEN(text) < MAXPATHL) + { +! buf = (char *)alloc(MAXPATHL * 2 + 25); +! if (buf != NULL) + { +! p = nb_quote(text); +! if (p != NULL) +! { +! vim_snprintf(buf, MAXPATHL * 2 + 25, +! "0:balloonText=%d \"%s\"\n", r_cmdno, p); +! vim_free(p); +! } +! nbdebug(("EVT: %s", buf)); +! nb_send(buf, "netbeans_beval_cb"); +! vim_free(buf); + } + } + vim_free(text); + } +*** ../vim-7.3.160/src/spell.c 2011-04-11 16:56:29.000000000 +0200 +--- src/spell.c 2011-04-11 18:00:49.000000000 +0200 +*************** +*** 8590,8596 **** + spellinfo_T *spin; + char_u *wfname; + { +! char_u fname[MAXPATHL]; + int len; + slang_T *slang; + int free_slang = FALSE; +--- 8590,8596 ---- + spellinfo_T *spin; + char_u *wfname; + { +! char_u *fname = NULL; + int len; + slang_T *slang; + int free_slang = FALSE; +*************** +*** 8654,8659 **** +--- 8654,8662 ---- + * Write the .sug file. + * Make the file name by changing ".spl" to ".sug". + */ ++ fname = alloc(MAXPATHL); ++ if (fname == NULL) ++ goto theend; + vim_strncpy(fname, wfname, MAXPATHL - 1); + len = (int)STRLEN(fname); + fname[len - 2] = 'u'; +*************** +*** 8661,8666 **** +--- 8664,8670 ---- + sug_write(spin, fname); + + theend: ++ vim_free(fname); + if (free_slang) + slang_free(slang); + free_blocks(spin->si_blocks); +*************** +*** 9106,9113 **** + int overwrite; /* overwrite existing output file */ + int added_word; /* invoked through "zg" */ + { +! char_u fname[MAXPATHL]; +! char_u wfname[MAXPATHL]; + char_u **innames; + int incount; + afffile_T *(afile[8]); +--- 9110,9117 ---- + int overwrite; /* overwrite existing output file */ + int added_word; /* invoked through "zg" */ + { +! char_u *fname = NULL; +! char_u *wfname; + char_u **innames; + int incount; + afffile_T *(afile[8]); +*************** +*** 9135,9140 **** +--- 9139,9148 ---- + innames = &fnames[1]; + incount = fcount - 1; + ++ wfname = alloc(MAXPATHL); ++ if (wfname == NULL) ++ return; ++ + if (fcount >= 1) + { + len = (int)STRLEN(fnames[0]); +*************** +*** 9144,9167 **** + * "path/en.latin1.add.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, sizeof(wfname), "%s.spl", fnames[0]); + } + else if (fcount == 1) + { + /* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL, + fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + } + else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0) + { + /* Name ends in ".spl", use as the file name. */ +! vim_strncpy(wfname, fnames[0], sizeof(wfname) - 1); + } + else + /* Name should be language, make the file name from it. */ +! vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL, + fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + + /* Check for .ascii.spl. */ +--- 9152,9175 ---- + * "path/en.latin1.add.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, MAXPATHL, "%s.spl", fnames[0]); + } + else if (fcount == 1) + { + /* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, MAXPATHL, SPL_FNAME_TMPL, + fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + } + else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0) + { + /* Name ends in ".spl", use as the file name. */ +! vim_strncpy(wfname, fnames[0], MAXPATHL - 1); + } + else + /* Name should be language, make the file name from it. */ +! vim_snprintf((char *)wfname, MAXPATHL, SPL_FNAME_TMPL, + fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + + /* Check for .ascii.spl. */ +*************** +*** 9186,9199 **** + if (!overwrite && mch_stat((char *)wfname, &st) >= 0) + { + EMSG(_(e_exists)); +! return; + } + if (mch_isdir(wfname)) + { + EMSG2(_(e_isadir2), wfname); +! return; + } + + /* + * Init the aff and dic pointers. + * Get the region names if there are more than 2 arguments. +--- 9194,9211 ---- + if (!overwrite && mch_stat((char *)wfname, &st) >= 0) + { + EMSG(_(e_exists)); +! goto theend; + } + if (mch_isdir(wfname)) + { + EMSG2(_(e_isadir2), wfname); +! goto theend; + } + ++ fname = alloc(MAXPATHL); ++ if (fname == NULL) ++ goto theend; ++ + /* + * Init the aff and dic pointers. + * Get the region names if there are more than 2 arguments. +*************** +*** 9209,9215 **** + || innames[i][len - 3] != '_') + { + EMSG2(_("E755: Invalid region in %s"), innames[i]); +! return; + } + spin.si_region_name[i * 2] = TOLOWER_ASC(innames[i][len - 2]); + spin.si_region_name[i * 2 + 1] = +--- 9221,9227 ---- + || innames[i][len - 3] != '_') + { + EMSG2(_("E755: Invalid region in %s"), innames[i]); +! goto theend; + } + spin.si_region_name[i * 2] = TOLOWER_ASC(innames[i][len - 2]); + spin.si_region_name[i * 2 + 1] = +*************** +*** 9226,9232 **** + || spin.si_prefroot == NULL) + { + free_blocks(spin.si_blocks); +! return; + } + + /* When not producing a .add.spl file clear the character table when +--- 9238,9244 ---- + || spin.si_prefroot == NULL) + { + free_blocks(spin.si_blocks); +! goto theend; + } + + /* When not producing a .add.spl file clear the character table when +*************** +*** 9247,9253 **** + spin.si_conv.vc_type = CONV_NONE; + spin.si_region = 1 << i; + +! vim_snprintf((char *)fname, sizeof(fname), "%s.aff", innames[i]); + if (mch_stat((char *)fname, &st) >= 0) + { + /* Read the .aff file. Will init "spin->si_conv" based on the +--- 9259,9265 ---- + spin.si_conv.vc_type = CONV_NONE; + spin.si_region = 1 << i; + +! vim_snprintf((char *)fname, MAXPATHL, "%s.aff", innames[i]); + if (mch_stat((char *)fname, &st) >= 0) + { + /* Read the .aff file. Will init "spin->si_conv" based on the +*************** +*** 9258,9264 **** + else + { + /* Read the .dic file and store the words in the trees. */ +! vim_snprintf((char *)fname, sizeof(fname), "%s.dic", + innames[i]); + if (spell_read_dic(&spin, fname, afile[i]) == FAIL) + error = TRUE; +--- 9270,9276 ---- + else + { + /* Read the .dic file and store the words in the trees. */ +! vim_snprintf((char *)fname, MAXPATHL, "%s.dic", + innames[i]); + if (spell_read_dic(&spin, fname, afile[i]) == FAIL) + error = TRUE; +*************** +*** 9340,9345 **** +--- 9352,9361 ---- + spell_make_sugfile(&spin, wfname); + + } ++ ++ theend: ++ vim_free(fname); ++ vim_free(wfname); + } + + /* +*************** +*** 9392,9398 **** + buf_T *buf = NULL; + int new_spf = FALSE; + char_u *fname; +! char_u fnamebuf[MAXPATHL]; + char_u line[MAXWLEN * 2]; + long fpos, fpos_next = 0; + int i; +--- 9408,9414 ---- + buf_T *buf = NULL; + int new_spf = FALSE; + char_u *fname; +! char_u *fnamebuf = NULL; + char_u line[MAXWLEN * 2]; + long fpos, fpos_next = 0; + int i; +*************** +*** 9422,9427 **** +--- 9438,9446 ---- + EMSG2(_(e_notset), "spellfile"); + return; + } ++ fnamebuf = alloc(MAXPATHL); ++ if (fnamebuf == NULL) ++ return; + + for (spf = curwin->w_s->b_p_spf, i = 1; *spf != NUL; ++i) + { +*************** +*** 9431,9436 **** +--- 9450,9456 ---- + if (*spf == NUL) + { + EMSGN(_("E765: 'spellfile' does not have %ld entries"), idx); ++ vim_free(fnamebuf); + return; + } + } +*************** +*** 9442,9447 **** +--- 9462,9468 ---- + if (buf != NULL && bufIsChanged(buf)) + { + EMSG(_(e_bufloaded)); ++ vim_free(fnamebuf); + return; + } + +*************** +*** 9536,9541 **** +--- 9557,9563 ---- + + redraw_all_later(SOME_VALID); + } ++ vim_free(fnamebuf); + } + + /* +*************** +*** 9544,9550 **** + static void + init_spellfile() + { +! char_u buf[MAXPATHL]; + int l; + char_u *fname; + char_u *rtp; +--- 9566,9572 ---- + static void + init_spellfile() + { +! char_u *buf; + int l; + char_u *fname; + char_u *rtp; +*************** +*** 9554,9559 **** +--- 9576,9585 ---- + + if (*curwin->w_s->b_p_spl != NUL && curwin->w_s->b_langp.ga_len > 0) + { ++ buf = alloc(MAXPATHL); ++ if (buf == NULL) ++ return; ++ + /* Find the end of the language name. Exclude the region. If there + * is a path separator remember the start of the tail. */ + for (lend = curwin->w_s->b_p_spl; *lend != NUL +*************** +*** 9597,9603 **** + "/%.*s", (int)(lend - lstart), lstart); + } + l = (int)STRLEN(buf); +! fname = LANGP_ENTRY(curwin->w_s->b_langp, 0)->lp_slang->sl_fname; + vim_snprintf((char *)buf + l, MAXPATHL - l, ".%s.add", + fname != NULL + && strstr((char *)gettail(fname), ".ascii.") != NULL +--- 9623,9630 ---- + "/%.*s", (int)(lend - lstart), lstart); + } + l = (int)STRLEN(buf); +! fname = LANGP_ENTRY(curwin->w_s->b_langp, 0) +! ->lp_slang->sl_fname; + vim_snprintf((char *)buf + l, MAXPATHL - l, ".%s.add", + fname != NULL + && strstr((char *)gettail(fname), ".ascii.") != NULL +*************** +*** 9607,9612 **** +--- 9634,9641 ---- + } + aspath = FALSE; + } ++ ++ vim_free(buf); + } + } + +*** ../vim-7.3.160/src/tag.c 2011-04-11 16:56:29.000000000 +0200 +--- src/tag.c 2011-04-11 20:54:36.000000000 +0200 +*************** +*** 775,791 **** + { + list_T *list; + char_u tag_name[128 + 1]; +! char_u fname[MAXPATHL + 1]; +! char_u cmd[CMDBUFFSIZE + 1]; + + /* + * Add the matching tags to the location list for the current + * window. + */ + + list = list_alloc(); +! if (list == NULL) + goto end_do_tag; + + for (i = 0; i < num_matches; ++i) + { +--- 775,799 ---- + { + list_T *list; + char_u tag_name[128 + 1]; +! char_u *fname; +! char_u *cmd; + + /* + * Add the matching tags to the location list for the current + * window. + */ + ++ fname = alloc(MAXPATHL + 1); ++ cmd = alloc(CMDBUFFSIZE + 1); + list = list_alloc(); +! if (list == NULL || fname == NULL || cmd == NULL) +! { +! vim_free(cmd); +! vim_free(fname); +! if (list != NULL) +! list_free(list, TRUE); + goto end_do_tag; ++ } + + for (i = 0; i < num_matches; ++i) + { +*************** +*** 911,916 **** +--- 919,926 ---- + set_errorlist(curwin, list, ' ', IObuff); + + list_free(list, TRUE); ++ vim_free(fname); ++ vim_free(cmd); + + cur_match = 0; /* Jump to the first tag */ + } +*************** +*** 3777,3784 **** + char_u *start; /* start of the value */ + char_u *end; /* after the value; can be NULL */ + { +! char_u buf[MAXPATHL]; + int len = 0; + + /* check that the field name doesn't exist yet */ + if (dict_find(dict, (char_u *)field_name, -1) != NULL) +--- 3787,3795 ---- + char_u *start; /* start of the value */ + char_u *end; /* after the value; can be NULL */ + { +! char_u *buf; + int len = 0; ++ int retval; + + /* check that the field name doesn't exist yet */ + if (dict_find(dict, (char_u *)field_name, -1) != NULL) +*************** +*** 3791,3796 **** +--- 3802,3810 ---- + } + return FAIL; + } ++ buf = alloc(MAXPATHL); ++ if (buf == NULL) ++ return FAIL; + if (start != NULL) + { + if (end == NULL) +*************** +*** 3800,3811 **** + --end; + } + len = (int)(end - start); +! if (len > (int)sizeof(buf) - 1) +! len = sizeof(buf) - 1; + vim_strncpy(buf, start, len); + } + buf[len] = NUL; +! return dict_add_nr_str(dict, field_name, 0L, buf); + } + + /* +--- 3814,3827 ---- + --end; + } + len = (int)(end - start); +! if (len > MAXPATHL - 1) +! len = MAXPATHL - 1; + vim_strncpy(buf, start, len); + } + buf[len] = NUL; +! retval = dict_add_nr_str(dict, field_name, 0L, buf); +! vim_free(buf); +! return retval; + } + + /* +*** ../vim-7.3.160/src/vim.h 2010-12-30 12:30:26.000000000 +0100 +--- src/vim.h 2011-04-11 20:50:54.000000000 +0200 +*************** +*** 1435,1440 **** +--- 1435,1442 ---- + + #define IOSIZE (1024+1) /* file i/o and sprintf buffer size */ + ++ #define DIALOG_MSG_SIZE 1000 /* buffer size for dialog_msg() */ ++ + #ifdef FEAT_MBYTE + # define MSG_BUF_LEN 480 /* length of buffer for small messages */ + # define MSG_BUF_CLEN (MSG_BUF_LEN / 6) /* cell length (worst case: utf-8 +*** ../vim-7.3.160/src/xxd/xxd.c 2011-04-02 14:44:50.000000000 +0200 +--- src/xxd/xxd.c 2011-04-11 16:40:48.000000000 +0200 +*************** +*** 476,482 **** + int octspergrp = -1; /* number of octets grouped in output */ + int grplen; /* total chars per octet group */ + long length = -1, n = 0, seekoff = 0; +! char l[LLEN+1]; + char *pp; + + #ifdef AMIGA +--- 476,482 ---- + int octspergrp = -1; /* number of octets grouped in output */ + int grplen; /* total chars per octet group */ + long length = -1, n = 0, seekoff = 0; +! static char l[LLEN+1]; /* static because it may be too big for stack */ + char *pp; + + #ifdef AMIGA +*** ../vim-7.3.160/src/version.c 2011-04-11 16:56:29.000000000 +0200 +--- src/version.c 2011-04-11 21:15:33.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 161, + /**/ + +-- +The process for understanding customers primarily involves sitting around with +other marketing people and talking about what you would to if you were dumb +enough to be a customer. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f36da15b1222790eb26cb716871c54edd42f5c73 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:46 +0200 Subject: [PATCH 0179/3803] - patchlevel 162 --- 7.3.162 | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 7.3.162 diff --git a/7.3.162 b/7.3.162 new file mode 100644 index 00000000..3f0173af --- /dev/null +++ b/7.3.162 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.162 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.162 +Problem: No error message when assigning to a list with an index out of + range. (Yukihiro Nakadaira) +Solution: Add the error message. +Files: src/eval.c + + +*** ../vim-7.3.161/src/eval.c 2011-04-11 21:35:03.000000000 +0200 +--- src/eval.c 2011-04-21 13:40:38.000000000 +0200 +*************** +*** 2794,2799 **** +--- 2794,2801 ---- + { + if (lp->ll_range && !lp->ll_empty2) + clear_tv(&var2); ++ if (!quiet) ++ EMSGN(_(e_listidx), lp->ll_n1); + return NULL; + } + +*************** +*** 2811,2817 **** +--- 2813,2823 ---- + { + ni = list_find(lp->ll_list, lp->ll_n2); + if (ni == NULL) ++ { ++ if (!quiet) ++ EMSGN(_(e_listidx), lp->ll_n2); + return NULL; ++ } + lp->ll_n2 = list_idx_of_item(lp->ll_list, ni); + } + +*************** +*** 2819,2825 **** +--- 2825,2835 ---- + if (lp->ll_n1 < 0) + lp->ll_n1 = list_idx_of_item(lp->ll_list, lp->ll_li); + if (lp->ll_n2 < lp->ll_n1) ++ { ++ if (!quiet) ++ EMSGN(_(e_listidx), lp->ll_n2); + return NULL; ++ } + } + + lp->ll_tv = &lp->ll_li->li_tv; +*** ../vim-7.3.161/src/version.c 2011-04-11 21:35:03.000000000 +0200 +--- src/version.c 2011-04-21 13:44:46.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 162, + /**/ + +-- +Far back in the mists of ancient time, in the great and glorious days of the +former Galactic Empire, life was wild, rich and largely tax free. +Mighty starships plied their way between exotic suns, seeking adventure and +reward among the furthest reaches of Galactic space. In those days, spirits +were brave, the stakes were high, men were real men, women were real women +and small furry creatures from Alpha Centauri were real small furry creatures +from Alpha Centauri. And all dared to brave unknown terrors, to do mighty +deeds, to boldly split infinitives that no man had split before -- and thus +was the Empire forged. + -- 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/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d730bfe1630715da054c9325b0f3852882a3bdbc Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:47 +0200 Subject: [PATCH 0180/3803] - patchlevel 163 --- 7.3.163 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 7.3.163 diff --git a/7.3.163 b/7.3.163 new file mode 100644 index 00000000..b5f1cb4a --- /dev/null +++ b/7.3.163 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.163 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.163 +Problem: For the default of 'shellpipe' "mksh" and "pdksh" are not + recognized. +Solution: Recognize these shell names. +Files: src/option.c + + +*** ../vim-7.3.162/src/option.c 2011-03-22 14:35:01.000000000 +0100 +--- src/option.c 2011-04-15 20:49:54.000000000 +0200 +*************** +*** 3846,3851 **** +--- 3846,3853 ---- + # ifndef OS2 /* Always use bourne shell style redirection if we reach this */ + if ( fnamecmp(p, "sh") == 0 + || fnamecmp(p, "ksh") == 0 ++ || fnamecmp(p, "mksh") == 0 ++ || fnamecmp(p, "pdksh") == 0 + || fnamecmp(p, "zsh") == 0 + || fnamecmp(p, "zsh-beta") == 0 + || fnamecmp(p, "bash") == 0 +*************** +*** 3853,3858 **** +--- 3855,3862 ---- + || fnamecmp(p, "cmd") == 0 + || fnamecmp(p, "sh.exe") == 0 + || fnamecmp(p, "ksh.exe") == 0 ++ || fnamecmp(p, "mksh.exe") == 0 ++ || fnamecmp(p, "pdksh.exe") == 0 + || fnamecmp(p, "zsh.exe") == 0 + || fnamecmp(p, "zsh-beta.exe") == 0 + || fnamecmp(p, "bash.exe") == 0 +*** ../vim-7.3.162/src/version.c 2011-04-21 14:27:21.000000000 +0200 +--- src/version.c 2011-04-28 12:56:03.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 163, + /**/ + +-- +If you put 7 of the most talented OSS developers in a room for a week +and asked them to fix a bug in a spreadsheet program, in 1 week +you'd have 2 new mail readers and a text-based web browser. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9a8ec17caffb7ce0a1c9a958c50f1d11ec9c5791 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:47 +0200 Subject: [PATCH 0181/3803] - patchlevel 164 --- 7.3.164 | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 7.3.164 diff --git a/7.3.164 b/7.3.164 new file mode 100644 index 00000000..9049f1b5 --- /dev/null +++ b/7.3.164 @@ -0,0 +1,181 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.164 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.164 +Problem: C-indenting: a preprocessor statement confuses detection of a + function delcaration. +Solution: Ignore preprocessor lines. (Lech Lorens) Also recognize the style + to put a comma before the argument name. +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.163/src/misc1.c 2011-04-11 16:56:29.000000000 +0200 +--- src/misc1.c 2011-04-28 12:49:55.000000000 +0200 +*************** +*** 5396,5403 **** + cin_ispreproc(s) + char_u *s; + { +! s = skipwhite(s); +! if (*s == '#') + return TRUE; + return FALSE; + } +--- 5396,5402 ---- + cin_ispreproc(s) + char_u *s; + { +! if (*skipwhite(s) == '#') + return TRUE; + return FALSE; + } +*************** +*** 5513,5518 **** +--- 5512,5521 ---- + else + s = *sp; + ++ /* Ignore line starting with #. */ ++ if (cin_ispreproc(s)) ++ return FALSE; ++ + while (*s && *s != '(' && *s != ';' && *s != '\'' && *s != '"') + { + if (cin_iscomment(s)) /* ignore comments */ +*************** +*** 5538,5550 **** + 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); +--- 5541,5569 ---- + retval = TRUE; + goto done; + } +! if ((*s == ',' && cin_nocode(s + 1)) || s[1] == NUL || cin_nocode(s)) + { +! int comma = (*s == ','); +! +! /* ',' at the end: continue looking in the next line. +! * At the end: check for ',' in the next line, for this style: +! * func(arg1 +! * , arg2) */ +! for (;;) +! { +! if (lnum >= curbuf->b_ml.ml_line_count) +! break; +! s = ml_get(++lnum); +! if (!cin_ispreproc(s)) +! break; +! } + if (lnum >= curbuf->b_ml.ml_line_count) + break; +! /* Require a comma at end of the line or a comma or ')' at the +! * start of next line. */ +! s = skipwhite(s); +! if (!comma && *s != ',' && *s != ')') +! break; + } + else if (cin_iscomment(s)) /* ignore comments */ + s = cin_skipcomment(s); +*** ../vim-7.3.163/src/testdir/test3.in 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test3.in 2011-04-28 12:15:12.000000000 +0200 +*************** +*** 1315,1320 **** +--- 1315,1349 ---- + } + + STARTTEST ++ :set cino=(0,ts ++ 2kdd=][ ++ ENDTEST ++ ++ void func(int a ++ #if defined(FOO) ++ , int b ++ , int c ++ #endif ++ ) ++ { ++ } ++ ++ STARTTEST ++ :set cino=(0 ++ 2kdd=][ ++ ENDTEST ++ ++ void ++ func(int a ++ #if defined(FOO) ++ , int b ++ , int c ++ #endif ++ ) ++ { ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../vim-7.3.163/src/testdir/test3.ok 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test3.ok 2011-04-28 12:54:04.000000000 +0200 +*************** +*** 1183,1185 **** +--- 1183,1206 ---- + foo; + } + ++ ++ void func(int a ++ #if defined(FOO) ++ , int b ++ , int c ++ #endif ++ ) ++ { ++ } ++ ++ ++ void ++ func(int a ++ #if defined(FOO) ++ , int b ++ , int c ++ #endif ++ ) ++ { ++ } ++ +*** ../vim-7.3.163/src/version.c 2011-04-28 12:56:57.000000000 +0200 +--- src/version.c 2011-04-28 12:59:55.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 164, + /**/ + +-- +Due knot trussed yore spell chequer two fined awl miss steaks. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 7d29d9db4528c19eddbdb27f8f4f0593c36caa76 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:47 +0200 Subject: [PATCH 0182/3803] - patchlevel 165 --- 7.3.165 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 7.3.165 diff --git a/7.3.165 b/7.3.165 new file mode 100644 index 00000000..2725259e --- /dev/null +++ b/7.3.165 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.165 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.165 +Problem: ":find" completion does not escape spaces in a directory name. + (Isz) +Solution: Add backslashes for EXPAND_FILES_IN_PATH. (Carlo Teubner) +Files: src/ex_getln.c + + +*** ../vim-7.3.164/src/ex_getln.c 2010-12-02 16:01:23.000000000 +0100 +--- src/ex_getln.c 2011-04-28 12:52:12.000000000 +0200 +*************** +*** 3702,3707 **** +--- 3702,3708 ---- + if (options & WILD_ESCAPE) + { + if (xp->xp_context == EXPAND_FILES ++ || xp->xp_context == EXPAND_FILES_IN_PATH + || xp->xp_context == EXPAND_SHELLCMD + || xp->xp_context == EXPAND_BUFFERS + || xp->xp_context == EXPAND_DIRECTORIES) +*** ../vim-7.3.164/src/version.c 2011-04-28 13:01:59.000000000 +0200 +--- src/version.c 2011-04-28 17:17:53.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 165, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +38. You wake up at 3 a.m. to go to the bathroom and stop and check your e-mail + on the way back to bed. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a41551638f3bba187fc5e7e7b94961f7eb005828 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:48 +0200 Subject: [PATCH 0183/3803] - patchlevel 166 --- 7.3.166 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 7.3.166 diff --git a/7.3.166 b/7.3.166 new file mode 100644 index 00000000..93c6ed35 --- /dev/null +++ b/7.3.166 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.166 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.166 +Problem: Buffer on the stack may be too big +Solution: Allocate the space. +Files: src/option.c + + +*** ../vim-7.3.165/src/option.c 2011-04-28 12:56:57.000000000 +0200 +--- src/option.c 2011-04-15 20:49:54.000000000 +0200 +*************** +*** 9185,9191 **** + int expand; + { + char_u *s; +! char_u buf[MAXPATHL]; + + if (fprintf(fd, "%s %s=", cmd, name) < 0) + return FAIL; +--- 9185,9191 ---- + int expand; + { + char_u *s; +! char_u *buf; + + if (fprintf(fd, "%s %s=", cmd, name) < 0) + return FAIL; +*************** +*** 9203,9211 **** +--- 9203,9218 ---- + } + else if (expand) + { ++ buf = alloc(MAXPATHL); ++ if (buf == NULL) ++ return FAIL; + home_replace(NULL, *valuep, buf, MAXPATHL, FALSE); + if (put_escstr(fd, buf, 2) == FAIL) ++ { ++ vim_free(buf); + return FAIL; ++ } ++ vim_free(buf); + } + else if (put_escstr(fd, *valuep, 2) == FAIL) + return FAIL; +*** ../vim-7.3.165/src/version.c 2011-04-28 17:21:49.000000000 +0200 +--- src/version.c 2011-04-28 17:23:24.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 166, + /**/ + +-- +He who laughs last, thinks slowest. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 63b462f7bba211d155ed8bce4c54b3857072333d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:48 +0200 Subject: [PATCH 0184/3803] - patchlevel 167 --- 7.3.167 | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 7.3.167 diff --git a/7.3.167 b/7.3.167 new file mode 100644 index 00000000..4a6de89f --- /dev/null +++ b/7.3.167 @@ -0,0 +1,96 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.167 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.167 +Problem: When using the internal grep QuickFixCmdPost is not triggered. + (Yukihiro Nakadaira) +Solution: Change the place where autocommands are triggered. +Files: src/quickfix.c + + +*** ../vim-7.3.166/src/quickfix.c 2011-04-11 21:35:03.000000000 +0200 +--- src/quickfix.c 2011-04-28 13:28:03.000000000 +0200 +*************** +*** 2742,2747 **** +--- 2742,2754 ---- + #ifdef FEAT_AUTOCMD + char_u *au_name = NULL; + ++ /* Redirect ":grep" to ":vimgrep" if 'grepprg' is "internal". */ ++ if (grep_internal(eap->cmdidx)) ++ { ++ ex_vimgrep(eap); ++ return; ++ } ++ + switch (eap->cmdidx) + { + case CMD_make: au_name = (char_u *)"make"; break; +*************** +*** 2763,2775 **** + } + #endif + +- /* Redirect ":grep" to ":vimgrep" if 'grepprg' is "internal". */ +- if (grep_internal(eap->cmdidx)) +- { +- ex_vimgrep(eap); +- return; +- } +- + if (eap->cmdidx == CMD_lmake || eap->cmdidx == CMD_lgrep + || eap->cmdidx == CMD_lgrepadd) + wp = curwin; +--- 2770,2775 ---- +*************** +*** 3057,3066 **** + + switch (eap->cmdidx) + { +! case CMD_vimgrep: au_name = (char_u *)"vimgrep"; break; +! case CMD_lvimgrep: au_name = (char_u *)"lvimgrep"; break; +! case CMD_vimgrepadd: au_name = (char_u *)"vimgrepadd"; break; + case CMD_lvimgrepadd: au_name = (char_u *)"lvimgrepadd"; break; + default: break; + } + if (au_name != NULL) +--- 3057,3070 ---- + + switch (eap->cmdidx) + { +! case CMD_vimgrep: au_name = (char_u *)"vimgrep"; break; +! case CMD_lvimgrep: au_name = (char_u *)"lvimgrep"; break; +! case CMD_vimgrepadd: au_name = (char_u *)"vimgrepadd"; break; + case CMD_lvimgrepadd: au_name = (char_u *)"lvimgrepadd"; break; ++ case CMD_grep: au_name = (char_u *)"grep"; break; ++ case CMD_lgrep: au_name = (char_u *)"lgrep"; break; ++ case CMD_grepadd: au_name = (char_u *)"grepadd"; break; ++ case CMD_lgrepadd: au_name = (char_u *)"lgrepadd"; break; + default: break; + } + if (au_name != NULL) +*** ../vim-7.3.166/src/version.c 2011-04-28 17:24:54.000000000 +0200 +--- src/version.c 2011-04-28 17:26:17.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 167, + /**/ + +-- +Micro$oft: where do you want to go today? + Linux: where do you want to go tomorrow? + FreeBSD: are you guys coming, or what? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 21a5942f9979bde5f1eac5e8815c05574148505a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:48 +0200 Subject: [PATCH 0185/3803] - patchlevel 168 --- 7.3.168 | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 7.3.168 diff --git a/7.3.168 b/7.3.168 new file mode 100644 index 00000000..3d6fe947 --- /dev/null +++ b/7.3.168 @@ -0,0 +1,82 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.168 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.168 +Problem: When the second argument of input() contains a CR the text up to + that is used without asking the user. (Yasuhiro Matsumoto) +Solution: Change CR, NL and ESC in the text to a space. +Files: src/getchar.c + + +*** ../vim-7.3.167/src/getchar.c 2011-03-22 13:07:19.000000000 +0100 +--- src/getchar.c 2011-04-28 14:50:26.000000000 +0200 +*************** +*** 635,645 **** +--- 635,648 ---- + /* + * Stuff "s" into the stuff buffer, leaving special key codes unmodified and + * escaping other K_SPECIAL and CSI bytes. ++ * Change CR, LF and ESC into a space. + */ + void + stuffReadbuffSpec(s) + char_u *s; + { ++ int c; ++ + while (*s != NUL) + { + if (*s == K_SPECIAL && s[1] != NUL && s[2] != NUL) +*************** +*** 649,659 **** + s += 3; + } + else + #ifdef FEAT_MBYTE +! stuffcharReadbuff(mb_ptr2char_adv(&s)); + #else +! stuffcharReadbuff(*s++); + #endif + } + } + #endif +--- 652,667 ---- + s += 3; + } + else ++ { + #ifdef FEAT_MBYTE +! c = mb_ptr2char_adv(&s); + #else +! c = *s++; + #endif ++ if (c == CAR || c == NL || c == ESC) ++ c = ' '; ++ stuffcharReadbuff(c); ++ } + } + } + #endif +*** ../vim-7.3.167/src/version.c 2011-04-28 17:27:05.000000000 +0200 +--- src/version.c 2011-04-28 17:28:36.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 168, + /**/ + +-- +Everyone has a photographic memory. Some don't have film. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a5d42a182e23242e488374ded003384c872114f0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:49 +0200 Subject: [PATCH 0186/3803] - patchlevel 169 --- 7.3.169 | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 7.3.169 diff --git a/7.3.169 b/7.3.169 new file mode 100644 index 00000000..056ca99f --- /dev/null +++ b/7.3.169 @@ -0,0 +1,130 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.169 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.169 +Problem: Freeing memory already freed, warning from static code analyzer. +Solution: Initialize pointers to NULL, correct use of "mustfree". (partly by + Dominique Pelle) +Files: src/mis1.c + + +*** ../vim-7.3.168/src/misc1.c 2011-04-28 13:01:59.000000000 +0200 +--- src/misc1.c 2011-04-28 17:42:00.000000000 +0200 +*************** +*** 3505,3511 **** + if (enc_utf8 && var != NULL) + { + int len; +! char_u *pp; + + /* Convert from active codepage to UTF-8. Other conversions are + * not done, because they would fail for non-ASCII characters. */ +--- 3505,3511 ---- + if (enc_utf8 && var != NULL) + { + int len; +! char_u *pp = NULL; + + /* Convert from active codepage to UTF-8. Other conversions are + * not done, because they would fail for non-ASCII characters. */ +*************** +*** 3872,3882 **** + * Vim's version of getenv(). + * Special handling of $HOME, $VIM and $VIMRUNTIME. + * Also does ACP to 'enc' conversion for Win32. + */ + char_u * + vim_getenv(name, mustfree) + char_u *name; +! int *mustfree; /* set to TRUE when returned is allocated */ + { + char_u *p; + char_u *pend; +--- 3872,3884 ---- + * Vim's version of getenv(). + * Special handling of $HOME, $VIM and $VIMRUNTIME. + * Also does ACP to 'enc' conversion for Win32. ++ * "mustfree" is set to TRUE when returned is allocated, it must be ++ * initialized to FALSE by the caller. + */ + char_u * + vim_getenv(name, mustfree) + char_u *name; +! int *mustfree; + { + char_u *p; + char_u *pend; +*************** +*** 3898,3904 **** + if (enc_utf8) + { + int len; +! char_u *pp; + + /* Convert from active codepage to UTF-8. Other conversions are + * not done, because they would fail for non-ASCII characters. */ +--- 3900,3906 ---- + if (enc_utf8) + { + int len; +! char_u *pp = NULL; + + /* Convert from active codepage to UTF-8. Other conversions are + * not done, because they would fail for non-ASCII characters. */ +*************** +*** 3942,3948 **** + if (enc_utf8) + { + int len; +! char_u *pp; + + /* Convert from active codepage to UTF-8. Other conversions + * are not done, because they would fail for non-ASCII +--- 3944,3950 ---- + if (enc_utf8) + { + int len; +! char_u *pp = NULL; + + /* Convert from active codepage to UTF-8. Other conversions + * are not done, because they would fail for non-ASCII +*************** +*** 3950,3956 **** + acp_to_enc(p, (int)STRLEN(p), &pp, &len); + if (pp != NULL) + { +! if (mustfree) + vim_free(p); + p = pp; + *mustfree = TRUE; +--- 3952,3958 ---- + acp_to_enc(p, (int)STRLEN(p), &pp, &len); + if (pp != NULL) + { +! if (*mustfree) + vim_free(p); + p = pp; + *mustfree = TRUE; +*** ../vim-7.3.168/src/version.c 2011-04-28 17:30:05.000000000 +0200 +--- src/version.c 2011-04-28 17:48:04.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 169, + /**/ + +-- +A day without sunshine is like, well, night. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 3979397d468dd753f31e3b2af90f7623c1101739 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:49 +0200 Subject: [PATCH 0187/3803] - patchlevel 170 --- 7.3.170 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 7.3.170 diff --git a/7.3.170 b/7.3.170 new file mode 100644 index 00000000..933173ea --- /dev/null +++ b/7.3.170 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.170 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.170 +Problem: VMS Makefile for testing was not updated for test77. +Solution: Add test77 to the Makefile. +Files: src/testdir/Make_vms.mms + + +*** ../vim-7.3.169/src/testdir/Make_vms.mms 2010-11-10 16:54:16.000000000 +0100 +--- src/testdir/Make_vms.mms 2011-03-03 17:04:56.000000000 +0100 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2010 Nov 10 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Mar 03 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +*************** +*** 74,80 **** + test56.out test57.out test60.out \ + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ +! test71.out test72.out test74.out test75.out test76.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 74,81 ---- + test56.out test57.out test60.out \ + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ +! test71.out test72.out test74.out test75.out test76.out \ +! test77.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.3.169/src/version.c 2011-04-28 17:48:39.000000000 +0200 +--- src/version.c 2011-04-28 19:04:33.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 170, + /**/ + +-- +The users that I support would double-click on a landmine to find out +what happens. -- A system administrator + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5a9487af5f3d2ae6effe4ab5945461b39bdfdcfe Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:49 +0200 Subject: [PATCH 0188/3803] - patchlevel 171 --- 7.3.171 | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 7.3.171 diff --git a/7.3.171 b/7.3.171 new file mode 100644 index 00000000..f965e0a2 --- /dev/null +++ b/7.3.171 @@ -0,0 +1,142 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.171 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.171 +Problem: When the clipboard isn't supported: ":yank*" gives a confusing + error message. +Solution: Specifically mention that the register name is invalid. + (Jean-Rene David) +Files: runtime/doc/change.txt, src/ex_docmd.c, src/globals.h + + +*** ../vim-7.3.170/runtime/doc/change.txt 2010-08-15 21:57:18.000000000 +0200 +--- runtime/doc/change.txt 2011-05-05 13:48:00.000000000 +0200 +*************** +*** 916,923 **** + {Visual}["x]Y Yank the highlighted lines [into register x] (for + {Visual} see |Visual-mode|). {not in Vi} + +! *:y* *:yank* +! :[range]y[ank] [x] Yank [range] lines [into register x]. + + :[range]y[ank] [x] {count} + Yank {count} lines, starting with last line number +--- 917,926 ---- + {Visual}["x]Y Yank the highlighted lines [into register x] (for + {Visual} see |Visual-mode|). {not in Vi} + +! *:y* *:yank* *E850* +! :[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the +! "* or "+ registers is possible only in GUI versions or +! when the |+xterm_clipboard| feature is included. + + :[range]y[ank] [x] {count} + Yank {count} lines, starting with last line number +*** ../vim-7.3.170/src/ex_docmd.c 2011-04-11 21:35:03.000000000 +0200 +--- src/ex_docmd.c 2011-05-05 13:48:57.000000000 +0200 +*************** +*** 2424,2448 **** + if ( (ea.argt & REGSTR) + && *ea.arg != NUL + #ifdef FEAT_USR_CMDS +- && valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put +- && USER_CMDIDX(ea.cmdidx))) + /* Do not allow register = for user commands */ + && (!USER_CMDIDX(ea.cmdidx) || *ea.arg != '=') +- #else +- && valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put) + #endif + && !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg))) + { +! ea.regname = *ea.arg++; +! #ifdef FEAT_EVAL +! /* for '=' register: accept the rest of the line as an expression */ +! if (ea.arg[-1] == '=' && ea.arg[0] != NUL) + { +! set_expr_line(vim_strsave(ea.arg)); +! ea.arg += STRLEN(ea.arg); + } + #endif +! ea.arg = skipwhite(ea.arg); + } + + /* +--- 2424,2462 ---- + if ( (ea.argt & REGSTR) + && *ea.arg != NUL + #ifdef FEAT_USR_CMDS + /* Do not allow register = for user commands */ + && (!USER_CMDIDX(ea.cmdidx) || *ea.arg != '=') + #endif + && !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg))) + { +! #ifndef FEAT_CLIPBOARD +! /* check these explicitly for a more specific error message */ +! if (*ea.arg == '*' || *ea.arg == '+') + { +! errormsg = (char_u *)_(e_invalidreg); +! goto doend; + } + #endif +! if ( +! #ifdef FEAT_USR_CMDS +! valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put +! && USER_CMDIDX(ea.cmdidx))) +! #else +! valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put) +! #endif +! ) +! { +! ea.regname = *ea.arg++; +! #ifdef FEAT_EVAL +! /* for '=' register: accept the rest of the line as an expression */ +! if (ea.arg[-1] == '=' && ea.arg[0] != NUL) +! { +! set_expr_line(vim_strsave(ea.arg)); +! ea.arg += STRLEN(ea.arg); +! } +! #endif +! ea.arg = skipwhite(ea.arg); +! } + } + + /* +*** ../vim-7.3.170/src/globals.h 2011-02-15 17:39:14.000000000 +0100 +--- src/globals.h 2011-05-05 13:47:44.000000000 +0200 +*************** +*** 1561,1566 **** +--- 1561,1569 ---- + (defined(FEAT_INS_EXPAND) && defined(FEAT_COMPL_FUNC)) + EXTERN char_u e_notset[] INIT(= N_("E764: Option '%s' is not set")); + #endif ++ #ifndef FEAT_CLIPBOARD ++ EXTERN char_u e_invalidreg[] INIT(= N_("E850: Invalid register name")); ++ #endif + + #ifdef MACOS_X_UNIX + EXTERN short disallow_gui INIT(= FALSE); +*** ../vim-7.3.170/src/version.c 2011-04-28 19:05:01.000000000 +0200 +--- src/version.c 2011-05-05 14:24:39.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 171, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +53. To find out what time it is, you send yourself an e-mail and check the + "Date:" field. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 527e92be82ed8e3c7c0a41ff6e229201420cc0ff Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:49 +0200 Subject: [PATCH 0189/3803] - patchlevel 172 --- 7.3.172 | 268 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 268 insertions(+) create mode 100644 7.3.172 diff --git a/7.3.172 b/7.3.172 new file mode 100644 index 00000000..66a78521 --- /dev/null +++ b/7.3.172 @@ -0,0 +1,268 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.172 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.172 +Problem: MS-Windows: rename() might delete the file if the name differs but + it's actually the same file. +Solution: Use the file handle to check if it's the same file. (Yukihiro + Nakadaira) +Files: src/if_cscope.c, src/fileio.c, src/os_win32.c, + src/proto/os_win32.pro, src/vim.h + + +*** ../vim-7.3.171/src/if_cscope.c 2011-03-03 15:01:25.000000000 +0100 +--- src/if_cscope.c 2011-05-05 16:16:38.000000000 +0200 +*************** +*** 1412,1428 **** + { + short i, j; + #ifndef UNIX +- HANDLE hFile; + BY_HANDLE_FILE_INFORMATION bhfi; + +- vim_memset(&bhfi, 0, sizeof(bhfi)); + /* On windows 9x GetFileInformationByHandle doesn't work, so skip it */ + if (!mch_windows95()) + { +! hFile = CreateFile(fname, FILE_READ_ATTRIBUTES, 0, NULL, OPEN_EXISTING, +! FILE_ATTRIBUTE_NORMAL, NULL); +! if (hFile == INVALID_HANDLE_VALUE) + { + if (p_csverbose) + { + char *cant_msg = _("E625: cannot open cscope database: %s"); +--- 1412,1426 ---- + { + short i, j; + #ifndef UNIX + BY_HANDLE_FILE_INFORMATION bhfi; + + /* On windows 9x GetFileInformationByHandle doesn't work, so skip it */ + if (!mch_windows95()) + { +! switch (win32_fileinfo(fname, &bhfi)) + { ++ case FILEINFO_ENC_FAIL: /* enc_to_utf16() failed */ ++ case FILEINFO_READ_FAIL: /* CreateFile() failed */ + if (p_csverbose) + { + char *cant_msg = _("E625: cannot open cscope database: %s"); +*************** +*** 1438,1452 **** + (void)EMSG2(cant_msg, fname); + } + return -1; +! } +! if (!GetFileInformationByHandle(hFile, &bhfi)) +! { +! CloseHandle(hFile); + if (p_csverbose) + (void)EMSG(_("E626: cannot get cscope database information")); + return -1; + } +- CloseHandle(hFile); + } + #endif + +--- 1436,1447 ---- + (void)EMSG2(cant_msg, fname); + } + return -1; +! +! case FILEINFO_INFO_FAIL: /* GetFileInformationByHandle() failed */ + if (p_csverbose) + (void)EMSG(_("E626: cannot get cscope database information")); + return -1; + } + } + #endif + +*** ../vim-7.3.171/src/fileio.c 2011-04-11 21:35:03.000000000 +0200 +--- src/fileio.c 2011-05-05 16:22:22.000000000 +0200 +*************** +*** 6555,6560 **** +--- 6555,6575 ---- + use_tmp_file = TRUE; + } + #endif ++ #ifdef WIN3264 ++ { ++ BY_HANDLE_FILE_INFORMATION info1, info2; ++ ++ /* It's possible for the source and destination to be the same file. ++ * In that case go through a temp file name. This makes rename("foo", ++ * "./foo") a no-op (in a complicated way). */ ++ if (win32_fileinfo(from, &info1) == FILEINFO_OK ++ && win32_fileinfo(to, &info2) == FILEINFO_OK ++ && info1.dwVolumeSerialNumber == info2.dwVolumeSerialNumber ++ && info1.nFileIndexHigh == info2.nFileIndexHigh ++ && info1.nFileIndexLow == info2.nFileIndexLow) ++ use_tmp_file = TRUE; ++ } ++ #endif + + #if defined(UNIX) || defined(CASE_INSENSITIVE_FILENAME) + if (use_tmp_file) +*** ../vim-7.3.171/src/os_win32.c 2011-02-01 13:48:47.000000000 +0100 +--- src/os_win32.c 2011-05-05 16:24:17.000000000 +0200 +*************** +*** 2645,2669 **** + int + mch_is_linked(char_u *fname) + { + HANDLE hFile; +! int res = 0; +! BY_HANDLE_FILE_INFORMATION inf; + #ifdef FEAT_MBYTE + WCHAR *wn = NULL; + + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) + wn = enc_to_utf16(fname, NULL); + if (wn != NULL) + { + hFile = CreateFileW(wn, /* file name */ + GENERIC_READ, /* access mode */ +! 0, /* share mode */ + NULL, /* security descriptor */ + OPEN_EXISTING, /* creation disposition */ +! 0, /* file attributes */ + NULL); /* handle to template file */ + if (hFile == INVALID_HANDLE_VALUE +! && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + /* Retry with non-wide function (for Windows 98). */ + vim_free(wn); +--- 2645,2688 ---- + int + mch_is_linked(char_u *fname) + { ++ BY_HANDLE_FILE_INFORMATION info; ++ ++ return win32_fileinfo(fname, &info) == FILEINFO_OK ++ && info.nNumberOfLinks > 1; ++ } ++ ++ /* ++ * Get the by-handle-file-information for "fname". ++ * Returns FILEINFO_OK when OK. ++ * returns FILEINFO_ENC_FAIL when enc_to_utf16() failed. ++ * Returns FILEINFO_READ_FAIL when CreateFile() failed. ++ * Returns FILEINFO_INFO_FAIL when GetFileInformationByHandle() failed. ++ */ ++ int ++ win32_fileinfo(char_u *fname, BY_HANDLE_FILE_INFORMATION *info) ++ { + HANDLE hFile; +! int res = FILEINFO_READ_FAIL; + #ifdef FEAT_MBYTE + WCHAR *wn = NULL; + + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) ++ { + wn = enc_to_utf16(fname, NULL); ++ if (wn == NULL) ++ res = FILEINFO_ENC_FAIL; ++ } + if (wn != NULL) + { + hFile = CreateFileW(wn, /* file name */ + GENERIC_READ, /* access mode */ +! FILE_SHARE_READ | FILE_SHARE_WRITE, /* share mode */ + NULL, /* security descriptor */ + OPEN_EXISTING, /* creation disposition */ +! FILE_FLAG_BACKUP_SEMANTICS, /* file attributes */ + NULL); /* handle to template file */ + if (hFile == INVALID_HANDLE_VALUE +! && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + /* Retry with non-wide function (for Windows 98). */ + vim_free(wn); +*************** +*** 2674,2690 **** + #endif + hFile = CreateFile(fname, /* file name */ + GENERIC_READ, /* access mode */ +! 0, /* share mode */ + NULL, /* security descriptor */ + OPEN_EXISTING, /* creation disposition */ +! 0, /* file attributes */ + NULL); /* handle to template file */ + + if (hFile != INVALID_HANDLE_VALUE) + { +! if (GetFileInformationByHandle(hFile, &inf) != 0 +! && inf.nNumberOfLinks > 1) +! res = 1; + CloseHandle(hFile); + } + +--- 2693,2710 ---- + #endif + hFile = CreateFile(fname, /* file name */ + GENERIC_READ, /* access mode */ +! FILE_SHARE_READ | FILE_SHARE_WRITE, /* share mode */ + NULL, /* security descriptor */ + OPEN_EXISTING, /* creation disposition */ +! FILE_FLAG_BACKUP_SEMANTICS, /* file attributes */ + NULL); /* handle to template file */ + + if (hFile != INVALID_HANDLE_VALUE) + { +! if (GetFileInformationByHandle(hFile, info) != 0) +! res = FILEINFO_OK; +! else +! res = FILEINFO_INFO_FAIL; + CloseHandle(hFile); + } + +*** ../vim-7.3.171/src/proto/os_win32.pro 2010-10-23 14:02:48.000000000 +0200 +--- src/proto/os_win32.pro 2011-05-05 16:17:42.000000000 +0200 +*************** +*** 21,26 **** +--- 21,27 ---- + void mch_hide __ARGS((char_u *name)); + int mch_isdir __ARGS((char_u *name)); + int mch_is_linked __ARGS((char_u *fname)); ++ int win32_fileinfo __ARGS((char_u *name, BY_HANDLE_FILE_INFORMATION *lpFileInfo)); + int mch_writable __ARGS((char_u *name)); + int mch_can_exe __ARGS((char_u *name)); + int mch_nodetype __ARGS((char_u *name)); +*** ../vim-7.3.171/src/vim.h 2011-04-11 21:35:03.000000000 +0200 +--- src/vim.h 2011-05-05 16:16:57.000000000 +0200 +*************** +*** 2217,2220 **** +--- 2217,2226 ---- + #define KEYLEN_PART_MAP -2 /* keylen value for incomplete mapping */ + #define KEYLEN_REMOVED 9999 /* keylen value for removed sequence */ + ++ /* Return values from win32_fileinfo(). */ ++ #define FILEINFO_OK 0 ++ #define FILEINFO_ENC_FAIL 1 /* enc_to_utf16() failed */ ++ #define FILEINFO_READ_FAIL 2 /* CreateFile() failed */ ++ #define FILEINFO_INFO_FAIL 3 /* GetFileInformationByHandle() failed */ ++ + #endif /* VIM__H */ +*** ../vim-7.3.171/src/version.c 2011-05-05 14:26:37.000000000 +0200 +--- src/version.c 2011-05-05 16:39:35.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 172, + /**/ + +-- +Q: What is a patch 22? +A: A patch you need to include to make it possible to include patches. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 15d6bc0ad121ef771c2c719a2feb88aa9088bfdd Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:50 +0200 Subject: [PATCH 0190/3803] - patchlevel 173 --- 7.3.173 | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 7.3.173 diff --git a/7.3.173 b/7.3.173 new file mode 100644 index 00000000..ac8cffb9 --- /dev/null +++ b/7.3.173 @@ -0,0 +1,79 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.173 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.173 +Problem: After using setqflist() to make the quickfix list empty ":cwindow" + may open the window anyway. Also after ":vimgrep". +Solution: Correctly check whether the list is empty. (Ingo Karkat) +Files: src/quickfix.c + + +*** ../vim-7.3.172/src/quickfix.c 2011-04-28 17:27:05.000000000 +0200 +--- src/quickfix.c 2011-05-05 16:55:47.000000000 +0200 +*************** +*** 1164,1170 **** + + /* When no valid entries are present in the list, qf_ptr points to + * the first item in the list */ +! if (to_qfl->qf_nonevalid == TRUE) + to_qfl->qf_ptr = to_qfl->qf_start; + } + +--- 1164,1170 ---- + + /* When no valid entries are present in the list, qf_ptr points to + * the first item in the list */ +! if (to_qfl->qf_nonevalid) + to_qfl->qf_ptr = to_qfl->qf_start; + } + +*************** +*** 2243,2248 **** +--- 2243,2249 ---- + * it if we have errors; otherwise, leave it closed. + */ + if (qi->qf_lists[qi->qf_curlist].qf_nonevalid ++ || qi->qf_lists[qi->qf_curlist].qf_count == 0 + || qi->qf_curlist >= qi->qf_listcount) + { + if (win != NULL) +*************** +*** 3711,3717 **** + } + + if (qi->qf_lists[qi->qf_curlist].qf_index == 0) +! /* empty list or no valid entry */ + qi->qf_lists[qi->qf_curlist].qf_nonevalid = TRUE; + else + qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE; +--- 3712,3718 ---- + } + + if (qi->qf_lists[qi->qf_curlist].qf_index == 0) +! /* no valid entry */ + qi->qf_lists[qi->qf_curlist].qf_nonevalid = TRUE; + else + qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE; +*** ../vim-7.3.172/src/version.c 2011-05-05 16:41:19.000000000 +0200 +--- src/version.c 2011-05-05 17:11:57.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 173, + /**/ + +-- +"I can't complain, but sometimes I still do." (Joe Walsh) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From c38c11a0f579ca88c1ee0f3ce86c29f370624fb3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:50 +0200 Subject: [PATCH 0191/3803] - patchlevel 174 --- 7.3.174 | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 7.3.174 diff --git a/7.3.174 b/7.3.174 new file mode 100644 index 00000000..33d60035 --- /dev/null +++ b/7.3.174 @@ -0,0 +1,109 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.174 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.174 +Problem: When Exuberant ctags binary is exctags it's not found. +Solution: Add configure check for exctags. (Hong Xu) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.3.173/src/configure.in 2011-02-09 17:42:53.000000000 +0100 +--- src/configure.in 2011-05-05 17:18:21.000000000 +0200 +*************** +*** 2619,2625 **** + dnl On HP-UX 10.10 termcap or termlib should be used instead of + dnl curses, because curses is much slower. + dnl Newer versions of ncurses are preferred over anything, except +! dnl when tinfo has been split off, it conains all we need. + dnl Older versions of ncurses have bugs, get a new one! + dnl Digital Unix (OSF1) should use curses (Ronald Schild). + dnl On SCO Openserver should prefer termlib (Roger Cornelius). +--- 2619,2625 ---- + dnl On HP-UX 10.10 termcap or termlib should be used instead of + dnl curses, because curses is much slower. + dnl Newer versions of ncurses are preferred over anything, except +! dnl when tinfo has been split off, it contains all we need. + dnl Older versions of ncurses have bugs, get a new one! + dnl Digital Unix (OSF1) should use curses (Ronald Schild). + dnl On SCO Openserver should prefer termlib (Roger Cornelius). +*************** +*** 3370,3376 **** + AC_CHECK_LIB(xpg4, _xpg4_setrunelocale, [LIBS="$LIBS -lxpg4"],,) + + dnl Check how we can run ctags. Default to "ctags" when nothing works. +! dnl --version for Exuberant ctags (preferred) + dnl Add --fields=+S to get function signatures for omni completion. + dnl -t for typedefs (many ctags have this) + dnl -s for static functions (Elvis ctags only?) +--- 3370,3376 ---- + AC_CHECK_LIB(xpg4, _xpg4_setrunelocale, [LIBS="$LIBS -lxpg4"],,) + + dnl Check how we can run ctags. Default to "ctags" when nothing works. +! dnl Use --version to detect Exuberant ctags (preferred) + dnl Add --fields=+S to get function signatures for omni completion. + dnl -t for typedefs (many ctags have this) + dnl -s for static functions (Elvis ctags only?) +*************** +*** 3378,3384 **** + dnl -i+m to test for older Exuberant ctags + AC_MSG_CHECKING(how to create tags) + test -f tags && mv tags tags.save +! if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" +--- 3378,3386 ---- + dnl -i+m to test for older Exuberant ctags + AC_MSG_CHECKING(how to create tags) + test -f tags && mv tags tags.save +! if (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then +! TAGPRG="exctags -I INIT+ --fields=+S" +! elif (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" +*** ../vim-7.3.173/src/auto/configure 2011-02-09 17:42:53.000000000 +0100 +--- src/auto/configure 2011-05-05 17:19:26.000000000 +0200 +*************** +*** 12031,12037 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5 + $as_echo_n "checking how to create tags... " >&6; } + test -f tags && mv tags tags.save +! if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" +--- 12031,12039 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5 + $as_echo_n "checking how to create tags... " >&6; } + test -f tags && mv tags tags.save +! if (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then +! TAGPRG="exctags -I INIT+ --fields=+S" +! elif (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" +*** ../vim-7.3.173/src/version.c 2011-05-05 17:14:07.000000000 +0200 +--- src/version.c 2011-05-05 17:19:37.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 174, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +54. You start tilting your head sideways to smile. :-) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 95feb41e6cebb8fcae29f418a06dde0266120092 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:50 +0200 Subject: [PATCH 0192/3803] - patchlevel 175 --- 7.3.175 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 7.3.175 diff --git a/7.3.175 b/7.3.175 new file mode 100644 index 00000000..57fbc4a7 --- /dev/null +++ b/7.3.175 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.175 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.175 +Problem: When 'colorcolumn' is set locally to a window, ":new" opens a + window with the same highlighting but 'colorcolumn' is empty. + (Tyru) +Solution: Call check_colorcolumn() after clearing and copying options. + (Christian Brabandt) +Files: src/buffer.c + + +*** ../vim-7.3.174/src/buffer.c 2011-04-11 16:56:29.000000000 +0200 +--- src/buffer.c 2011-05-05 17:28:24.000000000 +0200 +*************** +*** 2527,2532 **** +--- 2527,2535 ---- + if (p_fdls >= 0) + curwin->w_p_fdl = p_fdls; + #endif ++ #ifdef FEAT_SYN_HL ++ check_colorcolumn(curwin); ++ #endif + } + + /* +*** ../vim-7.3.174/src/version.c 2011-05-05 17:23:58.000000000 +0200 +--- src/version.c 2011-05-05 17:30:32.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 175, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +55. You ask your doctor to implant a gig in your brain. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 64dcfe66128248423ca6905590c26ce4136f671b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:51 +0200 Subject: [PATCH 0193/3803] - patchlevel 176 --- 7.3.176 | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 7.3.176 diff --git a/7.3.176 b/7.3.176 new file mode 100644 index 00000000..fcf4880d --- /dev/null +++ b/7.3.176 @@ -0,0 +1,165 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.176 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.176 +Problem: Ruby linking doesn't work properly on Mac OS X. +Solution: Fix the configure check for Ruby. (Bjorn Winckler) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.3.175/src/configure.in 2011-05-05 17:23:58.000000000 +0200 +--- src/configure.in 2011-05-05 18:03:38.000000000 +0200 +*************** +*** 1387,1396 **** + AC_MSG_RESULT($enable_rubyinterp) + if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then + AC_MSG_CHECKING(--with-ruby-command argument) + AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)], +! RUBY_CMD="$withval"; AC_MSG_RESULT($RUBY_CMD), + RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD)) +- AC_SUBST(vi_cv_path_ruby) + AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD) + if test "X$vi_cv_path_ruby" != "X"; then + AC_MSG_CHECKING(Ruby version) +--- 1387,1396 ---- + AC_MSG_RESULT($enable_rubyinterp) + if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then + AC_MSG_CHECKING(--with-ruby-command argument) ++ AC_SUBST(vi_cv_path_ruby) + AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)], +! RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; AC_MSG_RESULT($RUBY_CMD), + RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD)) + AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD) + if test "X$vi_cv_path_ruby" != "X"; then + AC_MSG_CHECKING(Ruby version) +*************** +*** 1412,1429 **** + RUBY_LIBS="$rubylibs" + fi + librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'` +! if test -f "$rubyhdrdir/$librubyarg"; then +! librubyarg="$rubyhdrdir/$librubyarg" +! else +! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'` +! if test -f "$rubylibdir/$librubyarg"; then +! librubyarg="$rubylibdir/$librubyarg" +! elif test "$librubyarg" = "libruby.a"; then +! dnl required on Mac OS 10.3 where libruby.a doesn't exist +! librubyarg="-lruby" +! else +! librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"` +! fi + fi + + if test "X$librubyarg" != "X"; then +--- 1412,1426 ---- + RUBY_LIBS="$rubylibs" + fi + librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'` +! librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBY_A"]])'` +! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'` +! if test -f "$rubylibdir/$librubya"; then +! librubyarg="$librubyarg" +! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" +! elif test "$librubyarg" = "libruby.a"; then +! dnl required on Mac OS 10.3 where libruby.a doesn't exist +! librubyarg="-lruby" +! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" + fi + + if test "X$librubyarg" != "X"; then +*** ../vim-7.3.175/src/auto/configure 2011-05-05 17:23:58.000000000 +0200 +--- src/auto/configure 2011-05-05 18:06:47.000000000 +0200 +*************** +*** 6218,6233 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5 + $as_echo_n "checking --with-ruby-command argument... " >&6; } + + # Check whether --with-ruby-command was given. + if test "${with_ruby_command+set}" = set; then : +! withval=$with_ruby_command; RUBY_CMD="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5 + $as_echo "$RUBY_CMD" >&6; } + else + RUBY_CMD="ruby"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5 + $as_echo "defaulting to $RUBY_CMD" >&6; } + fi + +- + # Extract the first word of "$RUBY_CMD", so it can be a program name with args. + set dummy $RUBY_CMD; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +--- 6218,6233 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5 + $as_echo_n "checking --with-ruby-command argument... " >&6; } + ++ + # Check whether --with-ruby-command was given. + if test "${with_ruby_command+set}" = set; then : +! withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5 + $as_echo "$RUBY_CMD" >&6; } + else + RUBY_CMD="ruby"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5 + $as_echo "defaulting to $RUBY_CMD" >&6; } + fi + + # Extract the first word of "$RUBY_CMD", so it can be a program name with args. + set dummy $RUBY_CMD; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +*************** +*** 6292,6308 **** + RUBY_LIBS="$rubylibs" + fi + librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'` +! if test -f "$rubyhdrdir/$librubyarg"; then +! librubyarg="$rubyhdrdir/$librubyarg" +! else +! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'` +! if test -f "$rubylibdir/$librubyarg"; then +! librubyarg="$rubylibdir/$librubyarg" +! elif test "$librubyarg" = "libruby.a"; then +! librubyarg="-lruby" +! else +! librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"` +! fi + fi + + if test "X$librubyarg" != "X"; then +--- 6292,6305 ---- + RUBY_LIBS="$rubylibs" + fi + librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'` +! librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBY_A"])'` +! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'` +! if test -f "$rubylibdir/$librubya"; then +! librubyarg="$librubyarg" +! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" +! elif test "$librubyarg" = "libruby.a"; then +! librubyarg="-lruby" +! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" + fi + + if test "X$librubyarg" != "X"; then +*** ../vim-7.3.175/src/version.c 2011-05-05 17:32:40.000000000 +0200 +--- src/version.c 2011-05-05 18:08:52.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 176, + /**/ + +-- +"I simultaneously try to keep my head in the clouds and my feet on the +ground. Sometimes it's a stretch, though." -- Larry Wall + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e45c1e17b604eec3513324b5460d4dd4dc322c5a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:51 +0200 Subject: [PATCH 0194/3803] - patchlevel 177 --- 7.3.177 | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 7.3.177 diff --git a/7.3.177 b/7.3.177 new file mode 100644 index 00000000..895b3b13 --- /dev/null +++ b/7.3.177 @@ -0,0 +1,97 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.177 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.177 +Problem: MS-Windows: mkdir() doesn't work properly when 'encoding' is + "utf-8". +Solution: Convert to utf-16. (Yukihiro Nakadaira) +Files: src/os_win32.c, src/os_win32.h, src/proto/os_win32.pro + + +*** ../vim-7.3.176/src/os_win32.c 2011-05-05 16:41:19.000000000 +0200 +--- src/os_win32.c 2011-05-05 18:24:36.000000000 +0200 +*************** +*** 2640,2645 **** +--- 2640,2669 ---- + } + + /* ++ * Create directory "name". ++ * Return 0 on success, -1 on error. ++ */ ++ int ++ mch_mkdir(char_u *name) ++ { ++ #ifdef FEAT_MBYTE ++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) ++ { ++ WCHAR *p; ++ int retval; ++ ++ p = enc_to_utf16(name, NULL); ++ if (p == NULL) ++ return -1; ++ retval = _wmkdir(p); ++ vim_free(p); ++ return retval; ++ } ++ #endif ++ return _mkdir(name); ++ } ++ ++ /* + * Return TRUE if file "fname" has more than one link. + */ + int +*** ../vim-7.3.176/src/os_win32.h 2010-08-15 21:57:30.000000000 +0200 +--- src/os_win32.h 2011-05-05 18:25:44.000000000 +0200 +*************** +*** 191,195 **** + #ifdef __BORLANDC__ + # define vim_mkdir(x, y) mkdir(x) + #else +! # define vim_mkdir(x, y) _mkdir(x) + #endif +--- 191,195 ---- + #ifdef __BORLANDC__ + # define vim_mkdir(x, y) mkdir(x) + #else +! # define vim_mkdir(x, y) mch_mkdir(x) + #endif +*** ../vim-7.3.176/src/proto/os_win32.pro 2011-05-05 16:41:19.000000000 +0200 +--- src/proto/os_win32.pro 2011-05-05 18:26:20.000000000 +0200 +*************** +*** 20,25 **** +--- 20,26 ---- + int mch_setperm __ARGS((char_u *name, long perm)); + void mch_hide __ARGS((char_u *name)); + int mch_isdir __ARGS((char_u *name)); ++ int mch_mkdir __ARGS((char_u *name)); + int mch_is_linked __ARGS((char_u *fname)); + int win32_fileinfo __ARGS((char_u *name, BY_HANDLE_FILE_INFORMATION *lpFileInfo)); + int mch_writable __ARGS((char_u *name)); +*** ../vim-7.3.176/src/version.c 2011-05-05 18:10:11.000000000 +0200 +--- src/version.c 2011-05-05 18:27:56.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 177, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +56. You leave the modem speaker on after connecting because you think it + sounds like the ocean wind...the perfect soundtrack for "surfing the net". + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b7944fe02c1ee886918ef277fb1608490d1c17d0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:51 +0200 Subject: [PATCH 0195/3803] - patchlevel 178 --- 7.3.178 | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 7.3.178 diff --git a/7.3.178 b/7.3.178 new file mode 100644 index 00000000..9b6ca7c3 --- /dev/null +++ b/7.3.178 @@ -0,0 +1,163 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.178 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.178 +Problem: C-indent doesn't handle code right after { correctly. +Solution: Fix detecting unterminated line. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.177/src/misc1.c 2011-04-28 17:48:39.000000000 +0200 +--- src/misc1.c 2011-05-10 11:35:09.000000000 +0200 +*************** +*** 4983,4989 **** + } + + /* +! * Return TRUE if there there is no code at *s. White space and comments are + * not considered code. + */ + static int +--- 4983,4989 ---- + } + + /* +! * Return TRUE if there is no code at *s. White space and comments are + * not considered code. + */ + static int +*************** +*** 5458,5465 **** + } + + /* +! * 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). + */ +--- 5458,5468 ---- + } + + /* +! * Recognize a line that starts with '{' or '}', or ends with ';', ',', '{' or +! * '}'. + * Don't consider "} else" a terminated line. ++ * Don't consider a line where there are unmatched opening braces before '}', ++ * ';' or ',' a terminated line. + * Return the character terminating the line (ending char's have precedence if + * both apply in order to determine initializations). + */ +*************** +*** 5470,5475 **** +--- 5473,5479 ---- + int incl_comma; /* recognize a trailing comma */ + { + char_u found_start = 0; ++ unsigned n_open = 0; + + s = cin_skipcomment(s); + +*************** +*** 5480,5489 **** + { + /* 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++; +--- 5484,5502 ---- + { + /* skip over comments, "" strings and 'c'haracters */ + s = skip_string(cin_skipcomment(s)); +! if (*s == '}' && n_open > 0) +! --n_open; +! if (n_open == 0 +! && (*s == ';' || *s == '}' || (incl_comma && *s == ',')) + && cin_nocode(s + 1)) + return *s; ++ else if (*s == '{') ++ { ++ if (incl_open && cin_nocode(s + 1)) ++ return *s; ++ else ++ ++n_open; ++ } + + if (*s) + s++; +*** ../vim-7.3.177/src/testdir/test3.in 2011-04-28 13:01:59.000000000 +0200 +--- src/testdir/test3.in 2011-05-10 11:34:13.000000000 +0200 +*************** +*** 1344,1349 **** +--- 1344,1365 ---- + } + + STARTTEST ++ :set cino& ++ 2kdd=][ ++ ENDTEST ++ ++ void func(void) ++ { ++ if(x==y) ++ if(y==z) ++ foo=1; ++ else { bar=1; ++ baz=2; ++ } ++ printf("Foo!\n"); ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../vim-7.3.177/src/testdir/test3.ok 2011-04-28 13:01:59.000000000 +0200 +--- src/testdir/test3.ok 2011-05-10 11:34:13.000000000 +0200 +*************** +*** 1204,1206 **** +--- 1204,1218 ---- + { + } + ++ ++ void func(void) ++ { ++ if(x==y) ++ if(y==z) ++ foo=1; ++ else { bar=1; ++ baz=2; ++ } ++ printf("Foo!\n"); ++ } ++ +*** ../vim-7.3.177/src/version.c 2011-05-05 18:31:54.000000000 +0200 +--- src/version.c 2011-05-10 11:37:43.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 178, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +69. Yahoo welcomes you with your own start page + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 195918c26a87ba4ce17bf6a6338ae42defca0a6b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:51 +0200 Subject: [PATCH 0196/3803] - patchlevel 179 --- 7.3.179 | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 7.3.179 diff --git a/7.3.179 b/7.3.179 new file mode 100644 index 00000000..f175b264 --- /dev/null +++ b/7.3.179 @@ -0,0 +1,95 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.179 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.179 +Problem: C-indent doesn't handle colon in string correctly. +Solution: Skip the string. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.178/src/misc1.c 2011-05-10 11:39:13.000000000 +0200 +--- src/misc1.c 2011-05-10 11:50:14.000000000 +0200 +*************** +*** 5801,5807 **** + continue; + } + +! if (s[0] == ':') + { + if (s[1] == ':') + { +--- 5801,5809 ---- + continue; + } + +! if (s[0] == '"') +! s = skip_string(s) + 1; +! else if (s[0] == ':') + { + if (s[1] == ':') + { +*** ../vim-7.3.178/src/testdir/test3.in 2011-05-10 11:39:13.000000000 +0200 +--- src/testdir/test3.in 2011-05-10 11:53:02.000000000 +0200 +*************** +*** 1360,1365 **** +--- 1360,1378 ---- + } + + STARTTEST ++ :set cino& ++ 2kdd=][ ++ ENDTEST ++ ++ void func(void) ++ { ++ cout << "a" ++ << "b" ++ << ") :" ++ << "c"; ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../vim-7.3.178/src/testdir/test3.ok 2011-05-10 11:39:13.000000000 +0200 +--- src/testdir/test3.ok 2011-05-10 11:50:14.000000000 +0200 +*************** +*** 1216,1218 **** +--- 1216,1227 ---- + printf("Foo!\n"); + } + ++ ++ void func(void) ++ { ++ cout << "a" ++ << "b" ++ << ") :" ++ << "c"; ++ } ++ +*** ../vim-7.3.178/src/version.c 2011-05-10 11:39:13.000000000 +0200 +--- src/version.c 2011-05-10 11:53:36.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 179, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +71. You wonder how people walk + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From aab0cf0f522860eed842094e340b6ae5789313af Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:52 +0200 Subject: [PATCH 0197/3803] - patchlevel 180 --- 7.3.180 | 295 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 295 insertions(+) create mode 100644 7.3.180 diff --git a/7.3.180 b/7.3.180 new file mode 100644 index 00000000..5997bfbe --- /dev/null +++ b/7.3.180 @@ -0,0 +1,295 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.180 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.180 +Problem: When both a middle part of 'comments' matches and an end part, the + middle part was used errornously. +Solution: After finding the middle part match continue looking for a better + end part match. (partly by Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.179/src/misc1.c 2011-05-10 11:56:26.000000000 +0200 +--- src/misc1.c 2011-05-10 13:24:38.000000000 +0200 +*************** +*** 1561,1566 **** +--- 1561,1569 ---- + char_u part_buf[COM_MAX_LEN]; /* buffer for one option part */ + char_u *string; /* pointer to comment string */ + char_u *list; ++ int middle_match_len = 0; ++ char_u *prev_list; ++ char_u *saved_flags; + + i = 0; + while (vim_iswhite(line[i])) /* leading white space is ignored */ +*************** +*** 1569,1575 **** + /* + * Repeat to match several nested comment strings. + */ +! while (line[i]) + { + /* + * scan through the 'comments' option for a match +--- 1572,1578 ---- + /* + * Repeat to match several nested comment strings. + */ +! while (line[i] != NUL) + { + /* + * scan through the 'comments' option for a match +*************** +*** 1577,1658 **** + found_one = FALSE; + for (list = curbuf->b_p_com; *list; ) + { +! /* +! * Get one option part into part_buf[]. Advance list to next one. +! * put string at start of string. +! */ +! if (!got_com && flags != NULL) /* remember where flags started */ +! *flags = list; + (void)copy_option_part(&list, part_buf, COM_MAX_LEN, ","); + string = vim_strchr(part_buf, ':'); + if (string == NULL) /* missing ':', ignore this part */ + continue; + *string++ = NUL; /* isolate flags from string */ + +! /* +! * When already found a nested comment, only accept further +! * nested comments. +! */ + if (got_com && vim_strchr(part_buf, COM_NEST) == NULL) + continue; + +! /* When 'O' flag used don't use for "O" command */ + if (backward && vim_strchr(part_buf, COM_NOBACK) != NULL) + continue; + +! /* +! * Line contents and string must match. + * When string starts with white space, must have some white space + * (but the amount does not need to match, there might be a mix of +! * TABs and spaces). +! */ + if (vim_iswhite(string[0])) + { + if (i == 0 || !vim_iswhite(line[i - 1])) +! continue; + while (vim_iswhite(string[0])) + ++string; + } + for (j = 0; string[j] != NUL && string[j] == line[i + j]; ++j) + ; + if (string[j] != NUL) +! continue; + +! /* +! * When 'b' flag used, there must be white space or an +! * end-of-line after the string in the line. +! */ + if (vim_strchr(part_buf, COM_BLANK) != NULL + && !vim_iswhite(line[i + j]) && line[i + j] != NUL) + continue; + +! /* +! * We have found a match, stop searching. +! */ +! i += j; +! got_com = TRUE; + found_one = TRUE; + break; + } + +! /* +! * No match found, stop scanning. +! */ + if (!found_one) + break; + +! /* +! * Include any trailing white space. +! */ + while (vim_iswhite(line[i])) + ++i; + +! /* +! * If this comment doesn't nest, stop here. +! */ + if (vim_strchr(part_buf, COM_NEST) == NULL) + break; + } + return (got_com ? i : 0); + } + #endif +--- 1580,1683 ---- + found_one = FALSE; + for (list = curbuf->b_p_com; *list; ) + { +! /* Get one option part into part_buf[]. Advance "list" to next +! * one. Put "string" at start of string. */ +! if (!got_com && flags != NULL) +! *flags = list; /* remember where flags started */ +! prev_list = list; + (void)copy_option_part(&list, part_buf, COM_MAX_LEN, ","); + string = vim_strchr(part_buf, ':'); + if (string == NULL) /* missing ':', ignore this part */ + continue; + *string++ = NUL; /* isolate flags from string */ + +! /* If we found a middle match previously, use that match when this +! * is not a middle or end. */ +! if (middle_match_len != 0 +! && vim_strchr(part_buf, COM_MIDDLE) == NULL +! && vim_strchr(part_buf, COM_END) == NULL) +! break; +! +! /* When we already found a nested comment, only accept further +! * nested comments. */ + if (got_com && vim_strchr(part_buf, COM_NEST) == NULL) + continue; + +! /* When 'O' flag present and using "O" command skip this one. */ + if (backward && vim_strchr(part_buf, COM_NOBACK) != NULL) + continue; + +! /* Line contents and string must match. + * When string starts with white space, must have some white space + * (but the amount does not need to match, there might be a mix of +! * TABs and spaces). */ + if (vim_iswhite(string[0])) + { + if (i == 0 || !vim_iswhite(line[i - 1])) +! continue; /* missing shite space */ + while (vim_iswhite(string[0])) + ++string; + } + for (j = 0; string[j] != NUL && string[j] == line[i + j]; ++j) + ; + if (string[j] != NUL) +! continue; /* string doesn't match */ + +! /* When 'b' flag used, there must be white space or an +! * end-of-line after the string in the line. */ + if (vim_strchr(part_buf, COM_BLANK) != NULL + && !vim_iswhite(line[i + j]) && line[i + j] != NUL) + continue; + +! /* We have found a match, stop searching unless this is a middle +! * comment. The middle comment can be a substring of the end +! * comment in which case it's better to return the length of the +! * end comment and its flags. Thus we keep searching with middle +! * and end matches and use an end match if it matches better. */ +! if (vim_strchr(part_buf, COM_MIDDLE) != NULL) +! { +! if (middle_match_len == 0) +! { +! middle_match_len = j; +! saved_flags = prev_list; +! } +! continue; +! } +! if (middle_match_len != 0 && j > middle_match_len) +! /* Use this match instead of the middle match, since it's a +! * longer thus better match. */ +! middle_match_len = 0; +! +! if (middle_match_len == 0) +! i += j; + found_one = TRUE; + break; + } + +! if (middle_match_len != 0) +! { +! /* Use the previously found middle match after failing to find a +! * match with an end. */ +! if (!got_com && flags != NULL) +! *flags = saved_flags; +! i += middle_match_len; +! found_one = TRUE; +! } +! +! /* No match found, stop scanning. */ + if (!found_one) + break; + +! /* Include any trailing white space. */ + while (vim_iswhite(line[i])) + ++i; + +! /* If this comment doesn't nest, stop here. */ +! got_com = TRUE; + if (vim_strchr(part_buf, COM_NEST) == NULL) + break; + } ++ + return (got_com ? i : 0); + } + #endif +*** ../vim-7.3.179/src/testdir/test3.in 2011-05-10 11:56:26.000000000 +0200 +--- src/testdir/test3.in 2011-05-10 12:05:50.000000000 +0200 +*************** +*** 1373,1378 **** +--- 1373,1390 ---- + } + + STARTTEST ++ :set com=s1:/*,m:*,ex:*/ ++ ]]3jofoo(); ++ ENDTEST ++ ++ void func(void) ++ { ++ /* ++ * This is a comment. ++ */ ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../vim-7.3.179/src/testdir/test3.ok 2011-05-10 11:56:26.000000000 +0200 +--- src/testdir/test3.ok 2011-05-10 12:05:50.000000000 +0200 +*************** +*** 1225,1227 **** +--- 1225,1236 ---- + << "c"; + } + ++ ++ void func(void) ++ { ++ /* ++ * This is a comment. ++ */ ++ foo(); ++ } ++ +*** ../vim-7.3.179/src/version.c 2011-05-10 11:56:26.000000000 +0200 +--- src/version.c 2011-05-10 13:37:28.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 180, + /**/ + +-- +"Thou shalt not follow the Null Pointer, for at its end Chaos and +Madness lie." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b28ccf5e72ef831fc8b6ecc1a5e04165c7620fe3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:52 +0200 Subject: [PATCH 0198/3803] - patchlevel 181 --- 7.3.181 | 171 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 7.3.181 diff --git a/7.3.181 b/7.3.181 new file mode 100644 index 00000000..3151d445 --- /dev/null +++ b/7.3.181 @@ -0,0 +1,171 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.181 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.181 +Problem: When repeating the insert of CTRL-V or a digraph the display may + not be updated correctly. +Solution: Only call edit_unputchar() after edit_putchar(). (Lech Lorens) +Files: src/edit.c + + +*** ../vim-7.3.180/src/edit.c 2010-11-10 17:11:29.000000000 +0100 +--- src/edit.c 2011-05-10 14:16:41.000000000 +0200 +*************** +*** 1553,1564 **** +--- 1553,1568 ---- + ins_ctrl_v() + { + int c; ++ int did_putchar = FALSE; + + /* may need to redraw when no more chars available now */ + ins_redraw(FALSE); + + if (redrawing() && !char_avail()) ++ { + edit_putchar('^', TRUE); ++ did_putchar = TRUE; ++ } + AppendToRedobuff((char_u *)CTRL_V_STR); /* CTRL-V */ + + #ifdef FEAT_CMDL_INFO +*************** +*** 1566,1573 **** + #endif + + c = get_literal(); +! edit_unputchar(); /* when line fits in 'columns' the '^' is at the start +! of the next line and will not be redrawn */ + #ifdef FEAT_CMDL_INFO + clear_showcmd(); + #endif +--- 1570,1579 ---- + #endif + + c = get_literal(); +! if (did_putchar) +! /* when the line fits in 'columns' the '^' is at the start of the next +! * line and will not removed by the redraw */ +! edit_unputchar(); + #ifdef FEAT_CMDL_INFO + clear_showcmd(); + #endif +*************** +*** 9637,9642 **** +--- 9643,9649 ---- + { + int c; + int cc; ++ int did_putchar = FALSE; + + pc_status = PC_STATUS_UNSET; + if (redrawing() && !char_avail()) +*************** +*** 9645,9650 **** +--- 9652,9658 ---- + ins_redraw(FALSE); + + edit_putchar('?', TRUE); ++ did_putchar = TRUE; + #ifdef FEAT_CMDL_INFO + add_to_showcmd_c(Ctrl_K); + #endif +*************** +*** 9661,9668 **** + c = plain_vgetc(); + --no_mapping; + --allow_keys; +! edit_unputchar(); /* when line fits in 'columns' the '?' is at the start +! of the next line and will not be redrawn */ + + if (IS_SPECIAL(c) || mod_mask) /* special key */ + { +--- 9669,9678 ---- + c = plain_vgetc(); + --no_mapping; + --allow_keys; +! if (did_putchar) +! /* when the line fits in 'columns' the '?' is at the start of the next +! * line and will not be removed by the redraw */ +! edit_unputchar(); + + if (IS_SPECIAL(c) || mod_mask) /* special key */ + { +*************** +*** 9674,9679 **** +--- 9684,9690 ---- + } + if (c != ESC) + { ++ did_putchar = FALSE; + if (redrawing() && !char_avail()) + { + /* may need to redraw when no more chars available now */ +*************** +*** 9681,9691 **** + + if (char2cells(c) == 1) + { +- /* first remove the '?', otherwise it's restored when typing +- * an ESC next */ +- edit_unputchar(); + ins_redraw(FALSE); + edit_putchar(c, TRUE); + } + #ifdef FEAT_CMDL_INFO + add_to_showcmd_c(c); +--- 9692,9700 ---- + + if (char2cells(c) == 1) + { + ins_redraw(FALSE); + edit_putchar(c, TRUE); ++ did_putchar = TRUE; + } + #ifdef FEAT_CMDL_INFO + add_to_showcmd_c(c); +*************** +*** 9696,9703 **** + cc = plain_vgetc(); + --no_mapping; + --allow_keys; +! edit_unputchar(); /* when line fits in 'columns' the '?' is at the +! start of the next line and will not be redrawn */ + if (cc != ESC) + { + AppendToRedobuff((char_u *)CTRL_V_STR); +--- 9705,9714 ---- + cc = plain_vgetc(); + --no_mapping; + --allow_keys; +! if (did_putchar) +! /* when the line fits in 'columns' the '?' is at the start of the +! * next line and will not be removed by a redraw */ +! edit_unputchar(); + if (cc != ESC) + { + AppendToRedobuff((char_u *)CTRL_V_STR); +*** ../vim-7.3.180/src/version.c 2011-05-10 13:38:23.000000000 +0200 +--- src/version.c 2011-05-10 14:20:40.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 181, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +74. Your most erotic dreams are about cybersex + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9be9ba1a929037c03d2368919bed9be15d9c091c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:53 +0200 Subject: [PATCH 0199/3803] - patchlevel 182 --- 7.3.182 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 7.3.182 diff --git a/7.3.182 b/7.3.182 new file mode 100644 index 00000000..509b68b5 --- /dev/null +++ b/7.3.182 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.182 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.182 (after 7.3.180) +Problem: Compiler warning for uninitialized variable. +Solution: Add dummy initializer. +Files: src/misc1.c + + +*** ../vim-7.3.181/src/misc1.c 2011-05-10 13:38:23.000000000 +0200 +--- src/misc1.c 2011-05-10 14:37:39.000000000 +0200 +*************** +*** 1563,1569 **** + char_u *list; + int middle_match_len = 0; + char_u *prev_list; +! char_u *saved_flags; + + i = 0; + while (vim_iswhite(line[i])) /* leading white space is ignored */ +--- 1563,1569 ---- + char_u *list; + int middle_match_len = 0; + char_u *prev_list; +! char_u *saved_flags = NULL; + + i = 0; + while (vim_iswhite(line[i])) /* leading white space is ignored */ +*** ../vim-7.3.181/src/version.c 2011-05-10 14:22:10.000000000 +0200 +--- src/version.c 2011-05-10 14:38:39.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 182, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +75. You start wondering whether you could actually upgrade your brain + with a Pentium Pro microprocessor 80. The upgrade works just fine. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f414f0731d9a5356ac9dcc66709cf787ecd40a6d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:53 +0200 Subject: [PATCH 0200/3803] - patchlevel 183 --- 7.3.183 | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 7.3.183 diff --git a/7.3.183 b/7.3.183 new file mode 100644 index 00000000..23178c0b --- /dev/null +++ b/7.3.183 @@ -0,0 +1,87 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.183 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.183 (after 7.3.174) +Problem: When Exuberant ctags binary is exuberant-ctags it's not found. +Solution: Add configure check for exuberant-ctags. +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.3.182/src/configure.in 2011-05-05 18:10:11.000000000 +0200 +--- src/configure.in 2011-05-10 15:39:38.000000000 +0200 +*************** +*** 3375,3384 **** + dnl -i+m to test for older Exuberant ctags + AC_MSG_CHECKING(how to create tags) + test -f tags && mv tags tags.save +! if (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then +! TAGPRG="exctags -I INIT+ --fields=+S" +! elif (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" + (eval etags /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags" +--- 3375,3386 ---- + dnl -i+m to test for older Exuberant ctags + AC_MSG_CHECKING(how to create tags) + test -f tags && mv tags tags.save +! if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" ++ elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then ++ TAGPRG="exctags -I INIT+ --fields=+S" ++ elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then ++ TAGPRG="exuberant-ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" + (eval etags /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags" +*** ../vim-7.3.182/src/auto/configure 2011-05-05 18:10:11.000000000 +0200 +--- src/auto/configure 2011-05-10 15:39:41.000000000 +0200 +*************** +*** 12028,12037 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5 + $as_echo_n "checking how to create tags... " >&6; } + test -f tags && mv tags tags.save +! if (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then +! TAGPRG="exctags -I INIT+ --fields=+S" +! elif (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" + (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags" +--- 12028,12039 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5 + $as_echo_n "checking how to create tags... " >&6; } + test -f tags && mv tags tags.save +! if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" ++ elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then ++ TAGPRG="exctags -I INIT+ --fields=+S" ++ elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then ++ TAGPRG="exuberant-ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" + (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags" +*** ../vim-7.3.182/src/version.c 2011-05-10 14:44:07.000000000 +0200 +--- src/version.c 2011-05-10 15:40:48.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 183, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +78. You find yourself dialing IP numbers on the phone. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 467f8eb1b7980b6326f7c941bbf9894fb7213494 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:53 +0200 Subject: [PATCH 0201/3803] - patchlevel 184 --- 7.3.184 | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 7.3.184 diff --git a/7.3.184 b/7.3.184 new file mode 100644 index 00000000..3b0cfc69 --- /dev/null +++ b/7.3.184 @@ -0,0 +1,86 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.184 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.184 +Problem: Static code analysis errors in riscOS. +Solution: Make buffer size bigger. (Dominique Pelle) +Files: src/gui_riscos.c + + +*** ../vim-7.3.183/src/gui_riscos.c 2010-08-15 21:57:28.000000000 +0200 +--- src/gui_riscos.c 2011-05-10 15:49:56.000000000 +0200 +*************** +*** 1756,1762 **** + + if (button & 0x444) + { +! int front_block[10]; + /* Dragging with Select - bring window to front first */ + front_block[0] = gui.window_handle; + swi(Wimp_GetWindowState, 0, front_block); +--- 1756,1762 ---- + + if (button & 0x444) + { +! int front_block[64]; + /* Dragging with Select - bring window to front first */ + front_block[0] = gui.window_handle; + swi(Wimp_GetWindowState, 0, front_block); +*************** +*** 1874,1880 **** + + if (ro_dragging == DRAG_RESIZE_WINDOW) + { +! /* Resizeing the main window. */ + block[2] = y; + block[3] = x; + ro_open_main(block); +--- 1874,1880 ---- + + if (ro_dragging == DRAG_RESIZE_WINDOW) + { +! /* Resizing the main window. */ + block[2] = y; + block[3] = x; + ro_open_main(block); +*************** +*** 2651,2657 **** + long_u length; + + block[0] = 48; /* Size of block. */ +! block[3] = 0; /* Orinial message. */ + block[4] = 0x10; /* Data request. */ + block[5] = gui.window_handle; + block[6] = RO_LOAD_CLIPBOARD; /* Internal handle. */ +--- 2651,2657 ---- + long_u length; + + block[0] = 48; /* Size of block. */ +! block[3] = 0; /* Original message. */ + block[4] = 0x10; /* Data request. */ + block[5] = gui.window_handle; + block[6] = RO_LOAD_CLIPBOARD; /* Internal handle. */ +*** ../vim-7.3.183/src/version.c 2011-05-10 15:41:59.000000000 +0200 +--- src/version.c 2011-05-10 15:51:29.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 184, + /**/ + +-- +If bankers can count, how come they have eight windows and +only four tellers? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 725ca25e12a6f15274d447c1869bf1ef16f7e210 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:53 +0200 Subject: [PATCH 0202/3803] - patchlevel 185 --- 7.3.185 | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 7.3.185 diff --git a/7.3.185 b/7.3.185 new file mode 100644 index 00000000..7b3ed189 --- /dev/null +++ b/7.3.185 @@ -0,0 +1,77 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.185 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.185 +Problem: ":windo g/pattern/q" closes windows and reports "N more lines". + (Tim Chase) +Solution: Remember what buffer ":global" started in. (Jean-Rene David) +Files: src/ex_cmds.c + + +*** ../vim-7.3.184/src/ex_cmds.c 2011-04-11 21:35:03.000000000 +0200 +--- src/ex_cmds.c 2011-05-10 15:58:48.000000000 +0200 +*************** +*** 5365,5372 **** + global_exe(cmd) + char_u *cmd; + { +! linenr_T old_lcount; /* b_ml.ml_line_count before the command */ +! linenr_T lnum; /* line number according to old situation */ + + /* + * Set current position only once for a global command. +--- 5365,5373 ---- + global_exe(cmd) + char_u *cmd; + { +! linenr_T old_lcount; /* b_ml.ml_line_count before the command */ +! buf_T *old_buf = curbuf; /* remember what buffer we started in */ +! linenr_T lnum; /* line number according to old situation */ + + /* + * Set current position only once for a global command. +*************** +*** 5410,5417 **** + msg_didout = FALSE; + + /* If substitutes done, report number of substitutes, otherwise report +! * number of extra or deleted lines. */ +! if (!do_sub_msg(FALSE)) + msgmore(curbuf->b_ml.ml_line_count - old_lcount); + } + +--- 5411,5420 ---- + msg_didout = FALSE; + + /* If substitutes done, report number of substitutes, otherwise report +! * number of extra or deleted lines. +! * Don't report extra or deleted lines in the edge case where the buffer +! * we are in after execution is different from the buffer we started in. */ +! if (!do_sub_msg(FALSE) && curbuf == old_buf) + msgmore(curbuf->b_ml.ml_line_count - old_lcount); + } + +*** ../vim-7.3.184/src/version.c 2011-05-10 15:52:10.000000000 +0200 +--- src/version.c 2011-05-10 15:57:40.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 185, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +79. All of your most erotic dreams have a scrollbar at the right side. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 7c441504a377c1a1e83e846d8e078b652e82fbfe Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:54 +0200 Subject: [PATCH 0203/3803] - patchlevel 186 --- 7.3.186 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 7.3.186 diff --git a/7.3.186 b/7.3.186 new file mode 100644 index 00000000..d834c370 --- /dev/null +++ b/7.3.186 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.186 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.186 +Problem: When 'clipboard' contains "unnamed" or "unnamedplus" the value of + v:register is wrong for operators without a specific register. +Solution: Adjust the register according to 'clipboard'. (Ingo Karkat) +Files: src/normal.c + + +*** ../vim-7.3.185/src/normal.c 2010-12-17 18:52:56.000000000 +0100 +--- src/normal.c 2011-05-10 16:07:49.000000000 +0200 +*************** +*** 1202,1208 **** + { + clearop(oap); + #ifdef FEAT_EVAL +! set_reg_var('"'); + #endif + } + +--- 1202,1214 ---- + { + clearop(oap); + #ifdef FEAT_EVAL +! { +! int regname = 0; +! /* Adjust the register according to 'clipboard', so that when +! * "unnamed" is present it becomes '*' or '+' instead of '"'. */ +! adjust_clip_reg(®name); +! set_reg_var(regname); +! } + #endif + } + +*** ../vim-7.3.185/src/version.c 2011-05-10 16:00:43.000000000 +0200 +--- src/version.c 2011-05-10 16:10:10.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 186, + /**/ + +-- +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/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 671a2ed8e968e606a70038c2245c5008d2402efa Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:54 +0200 Subject: [PATCH 0204/3803] - patchlevel 187 --- 7.3.187 | 6621 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 6621 insertions(+) create mode 100644 7.3.187 diff --git a/7.3.187 b/7.3.187 new file mode 100644 index 00000000..7bf82ce4 --- /dev/null +++ b/7.3.187 @@ -0,0 +1,6621 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.187 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.187 +Problem: The RISC OS port has obvious errors and is not being maintained. +Solution: Remove the RISC OS files and code. +Files: src/ascii.h, src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, + src/ex_docmd.c, src/fileio.c, src/globals.h, src/gui.c, src/gui.h, + src/main.c, src/memfile.c, src/memline.c, src/misc1.c, + src/proto.h, src/quickfix.c, src/search.c, src/structs.h, + src/term.c, src/termlib.c, src/version.c, src/vim.h, + src/gui_riscos.h, src/os_riscos.h, src/gui_riscos.c, + src/os_riscos.c, runtime/doc/os_risc.txt + + +*** ../vim-7.3.186/src/ascii.h 2010-08-15 21:57:25.000000000 +0200 +--- src/ascii.h 2011-05-10 16:22:08.000000000 +0200 +*************** +*** 183,193 **** + # define PATHSEP psepc + # define PATHSEPSTR pseps + #else +! # ifdef RISCOS +! # define PATHSEP '.' +! # define PATHSEPSTR "." +! # else +! # define PATHSEP '/' +! # define PATHSEPSTR "/" +! # endif + #endif +--- 183,188 ---- + # define PATHSEP psepc + # define PATHSEPSTR pseps + #else +! # define PATHSEP '/' +! # define PATHSEPSTR "/" + #endif +*** ../vim-7.3.186/src/eval.c 2011-04-21 14:27:21.000000000 +0200 +--- src/eval.c 2011-05-10 16:22:21.000000000 +0200 +*************** +*** 11818,11826 **** + #ifdef __QNX__ + "qnx", + #endif +- #ifdef RISCOS +- "riscos", +- #endif + #ifdef UNIX + "unix", + #endif +--- 11818,11823 ---- +*** ../vim-7.3.186/src/ex_cmds.c 2011-05-10 16:00:43.000000000 +0200 +--- src/ex_cmds.c 2011-05-10 16:23:22.000000000 +0200 +*************** +*** 899,907 **** + * Handle the ":!cmd" command. Also for ":r !cmd" and ":w !cmd" + * Bangs in the argument are replaced with the previously entered command. + * Remember the argument. +- * +- * RISCOS: Bangs only replaced when followed by a space, since many +- * pathnames contain one. + */ + void + do_bang(addr_count, eap, forceit, do_in, do_out) +--- 899,904 ---- +*************** +*** 980,990 **** + trailarg = NULL; + while (*p) + { +! if (*p == '!' +! #ifdef RISCOS +! && (p[1] == ' ' || p[1] == NUL) +! #endif +! ) + { + if (p > newcmd && p[-1] == '\\') + STRMOVE(p - 1, p); +--- 977,983 ---- + trailarg = NULL; + while (*p) + { +! if (*p == '!') + { + if (p > newcmd && p[-1] == '\\') + STRMOVE(p - 1, p); +*************** +*** 1578,1591 **** + if (p != NULL) + *p = NUL; + } +- # ifdef RISCOS +- STRCAT(buf, " { < "); /* Use RISC OS notation for input. */ +- STRCAT(buf, itmp); +- STRCAT(buf, " } "); +- # else + STRCAT(buf, " <"); /* " < " causes problems on Amiga */ + STRCAT(buf, itmp); +- # endif + if (*p_shq == NUL) + { + p = vim_strchr(cmd, '|'); +--- 1571,1578 ---- +*************** +*** 1634,1649 **** + else + vim_snprintf((char *)end, (size_t)(buflen - (end - buf)), + #ifdef FEAT_QUICKFIX +- # ifndef RISCOS +- opt != p_sp ? " %s%s" : +- # endif + " %s %s", + #else +- # ifndef RISCOS + " %s%s", /* " > %s" causes problems on Amiga */ +- # else +- " %s %s", /* But is needed for 'shellpipe' and RISC OS */ +- # endif + #endif + (char *)opt, (char *)fname); + } +--- 1621,1629 ---- +*************** +*** 1844,1854 **** + #ifdef VMS + (char_u *)"-tmp", + #else +- # ifdef RISCOS +- (char_u *)"/tmp", +- # else + (char_u *)".tmp", +- # endif + #endif + FALSE); + if (tempname == NULL) /* out of memory */ +--- 1824,1830 ---- +*** ../vim-7.3.186/src/ex_cmds2.c 2011-04-11 21:35:03.000000000 +0200 +--- src/ex_cmds2.c 2011-05-10 16:23:47.000000000 +0200 +*************** +*** 500,517 **** + /* Expand the file name in the same way as do_source(). This means + * doing it twice, so that $DIR/file gets expanded when $DIR is + * "~/dir". */ +- #ifdef RISCOS +- q = mch_munge_fname(p); +- #else + q = expand_env_save(p); +- #endif + if (q == NULL) + return FAIL; +- #ifdef RISCOS +- p = mch_munge_fname(q); +- #else + p = expand_env_save(q); +- #endif + vim_free(q); + if (p == NULL) + return FAIL; +--- 500,509 ---- +*************** +*** 2940,2950 **** + proftime_T wait_start; + #endif + +- #ifdef RISCOS +- p = mch_munge_fname(fname); +- #else + p = expand_env_save(fname); +- #endif + if (p == NULL) + return retval; + fname_exp = fix_fname(p); +--- 2932,2938 ---- +*** ../vim-7.3.186/src/ex_docmd.c 2011-05-05 14:26:37.000000000 +0200 +--- src/ex_docmd.c 2011-05-10 16:24:18.000000000 +0200 +*************** +*** 9702,9715 **** + valid = 0; /* Must have ":p:h" to be valid */ + } + else +- #ifdef RISCOS +- /* Always use the full path for RISC OS if possible. */ +- result = curbuf->b_ffname; +- if (result == NULL) +- result = curbuf->b_fname; +- #else + result = curbuf->b_fname; +- #endif + break; + + case SPEC_HASH: /* '#' or "#99": alternate file */ +--- 9702,9708 ---- +*************** +*** 9854,9864 **** + if (src[*usedlen] == '<') /* remove the file name extension */ + { + ++*usedlen; +- #ifdef RISCOS +- if ((s = vim_strrchr(result, '/')) != NULL && s >= gettail(result)) +- #else + if ((s = vim_strrchr(result, '.')) != NULL && s >= gettail(result)) +- #endif + resultlen = (int)(s - result); + } + #ifdef FEAT_MODIFY_FNAME +--- 9847,9853 ---- +*************** +*** 10875,10882 **** + else if (vim_ispathsep(*p)) + { + *s++ = '='; +! #if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA) || defined(RISCOS) \ +! || defined(VMS) + if (*p == ':') + *s++ = '-'; + else +--- 10864,10870 ---- + else if (vim_ispathsep(*p)) + { + *s++ = '='; +! #if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA) || defined(VMS) + if (*p == ':') + *s++ = '-'; + else +*** ../vim-7.3.186/src/fileio.c 2011-05-05 16:41:19.000000000 +0200 +--- src/fileio.c 2011-05-10 16:26:06.000000000 +0200 +*************** +*** 504,521 **** + + if (newfile && !read_stdin && !read_buffer) + { +! /* Remember time of file. +! * For RISCOS, also remember the filetype. +! */ + if (mch_stat((char *)fname, &st) >= 0) + { + buf_store_time(curbuf, &st, fname); + curbuf->b_mtime_read = curbuf->b_mtime; +- +- #if defined(RISCOS) && defined(FEAT_OSFILETYPE) +- /* Read the filetype into the buffer local filetype option. */ +- mch_read_filetype(fname); +- #endif + #ifdef UNIX + /* + * Use the protection bits of the original file for the swap file. +--- 504,514 ---- + + if (newfile && !read_stdin && !read_buffer) + { +! /* Remember time of file. */ + if (mch_stat((char *)fname, &st) >= 0) + { + buf_store_time(curbuf, &st, fname); + curbuf->b_mtime_read = curbuf->b_mtime; + #ifdef UNIX + /* + * Use the protection bits of the original file for the swap file. +*************** +*** 557,563 **** + + /* + * for UNIX: check readonly with perm and mch_access() +- * for RISCOS: same as Unix, otherwise file gets re-datestamped! + * for MSDOS and Amiga: check readonly by trying to open the file for writing + */ + file_readonly = FALSE; +--- 550,555 ---- +*************** +*** 3804,3816 **** + + /* make sure we have a valid backup extension to use */ + if (*p_bex == NUL) +- { +- #ifdef RISCOS +- backup_ext = (char_u *)"/bak"; +- #else + backup_ext = (char_u *)".bak"; +- #endif +- } + else + backup_ext = p_bex; + +--- 3796,3802 ---- +*************** +*** 4724,4734 **** + #endif + if (perm >= 0) /* set perm. of new file same as old file */ + (void)mch_setperm(wfname, perm); +- #ifdef RISCOS +- if (!append && !filtering) +- /* Set the filetype after writing the file. */ +- mch_set_filetype(wfname, buf->b_p_oft); +- #endif + #ifdef HAVE_ACL + /* Probably need to set the ACL before changing the user (can't set the + * ACL on a file the user doesn't own). */ +--- 4710,4715 ---- +*************** +*** 6262,6280 **** + */ + for (ptr = retval + fnamelen; ptr > retval; mb_ptr_back(retval, ptr)) + { +- #ifndef RISCOS + if (*ext == '.' +! # ifdef USE_LONG_FNAME + && (!USE_LONG_FNAME || shortname) +! # else +! # ifndef SHORT_FNAME + && shortname +- # endif + # endif + ) + if (*ptr == '.') /* replace '.' by '_' */ + *ptr = '_'; +- #endif + if (vim_ispathsep(*ptr)) + { + ++ptr; +--- 6243,6259 ---- + */ + for (ptr = retval + fnamelen; ptr > retval; mb_ptr_back(retval, ptr)) + { + if (*ext == '.' +! #ifdef USE_LONG_FNAME + && (!USE_LONG_FNAME || shortname) +! #else +! # ifndef SHORT_FNAME + && shortname + # endif ++ #endif + ) + if (*ptr == '.') /* replace '.' by '_' */ + *ptr = '_'; + if (vim_ispathsep(*ptr)) + { + ++ptr; +*************** +*** 6309,6331 **** + if (fname == NULL || *fname == NUL + || vim_ispathsep(fname[STRLEN(fname) - 1])) + { +- #ifdef RISCOS +- if (*ext == '/') +- #else + if (*ext == '.') +- #endif + *s++ = '_'; + } + /* + * If the extension starts with '.', truncate the base name at 8 + * characters + */ +- #ifdef RISCOS +- /* We normally use '/', but swap files are '_' */ +- else if (*ext == '/' || *ext == '_') +- #else + else if (*ext == '.') +- #endif + { + if ((size_t)(s - ptr) > (size_t)8) + { +--- 6288,6301 ---- +*************** +*** 6337,6349 **** + * If the extension doesn't start with '.', and the file name + * doesn't have an extension yet, append a '.' + */ +- #ifdef RISCOS +- else if ((e = vim_strchr(ptr, '/')) == NULL) +- *s++ = '/'; +- #else + else if ((e = vim_strchr(ptr, '.')) == NULL) + *s++ = '.'; +- #endif + /* + * If the extension doesn't start with '.', and there already is an + * extension, it may need to be truncated +--- 6307,6314 ---- +*************** +*** 6371,6393 **** + /* + * Prepend the dot. + */ +! if (prepend_dot && !shortname && *(e = gettail(retval)) != +! #ifdef RISCOS +! '/' +! #else +! '.' +! #endif + #ifdef USE_LONG_FNAME + && USE_LONG_FNAME + #endif + ) + { + STRMOVE(e + 1, e); +- #ifdef RISCOS +- *e = '/'; +- #else + *e = '.'; +- #endif + } + #endif + +--- 6336,6349 ---- + /* + * Prepend the dot. + */ +! if (prepend_dot && !shortname && *(e = gettail(retval)) != '.' + #ifdef USE_LONG_FNAME + && USE_LONG_FNAME + #endif + ) + { + STRMOVE(e + 1, e); + *e = '.'; + } + #endif + +*************** +*** 10205,10223 **** + ++p; + break; + case '.': +- #ifdef RISCOS +- if (allow_dirs != NULL) +- *allow_dirs = TRUE; +- /* FALLTHROUGH */ +- #endif + case '~': + reg_pat[i++] = '\\'; + reg_pat[i++] = *p; + break; + case '?': +- #ifdef RISCOS +- case '#': +- #endif + reg_pat[i++] = '.'; + break; + case '\\': +--- 10161,10171 ---- +*** ../vim-7.3.186/src/globals.h 2011-05-05 14:26:37.000000000 +0200 +--- src/globals.h 2011-05-10 16:26:13.000000000 +0200 +*************** +*** 1513,1519 **** + EXTERN char_u e_sandbox[] INIT(= N_("E48: Not allowed in sandbox")); + #endif + EXTERN char_u e_secure[] INIT(= N_("E523: Not allowed here")); +! #if defined(AMIGA) || defined(MACOS) || defined(MSWIN) || defined(RISCOS) \ + || defined(UNIX) || defined(VMS) || defined(OS2) + EXTERN char_u e_screenmode[] INIT(= N_("E359: Screen mode setting not supported")); + #endif +--- 1513,1519 ---- + EXTERN char_u e_sandbox[] INIT(= N_("E48: Not allowed in sandbox")); + #endif + EXTERN char_u e_secure[] INIT(= N_("E523: Not allowed here")); +! #if defined(AMIGA) || defined(MACOS) || defined(MSWIN) \ + || defined(UNIX) || defined(VMS) || defined(OS2) + EXTERN char_u e_screenmode[] INIT(= N_("E359: Screen mode setting not supported")); + #endif +*** ../vim-7.3.186/src/gui.c 2011-01-17 20:08:03.000000000 +0100 +--- src/gui.c 2011-05-10 16:26:53.000000000 +0200 +*************** +*** 2156,2162 **** + + if (highlight_mask & (HL_INVERSE | HL_STANDOUT)) + { +! #if defined(AMIGA) || defined(RISCOS) + gui_mch_set_colors(bg_color, fg_color); + #else + gui_mch_set_fg_color(bg_color); +--- 2156,2162 ---- + + if (highlight_mask & (HL_INVERSE | HL_STANDOUT)) + { +! #if defined(AMIGA) + gui_mch_set_colors(bg_color, fg_color); + #else + gui_mch_set_fg_color(bg_color); +*************** +*** 2165,2171 **** + } + else + { +! #if defined(AMIGA) || defined(RISCOS) + gui_mch_set_colors(fg_color, bg_color); + #else + gui_mch_set_fg_color(fg_color); +--- 2165,2171 ---- + } + else + { +! #if defined(AMIGA) + gui_mch_set_colors(fg_color, bg_color); + #else + gui_mch_set_fg_color(fg_color); +*************** +*** 2193,2199 **** + if (back != 0 && ((draw_flags & DRAW_BOLD) || (highlight_mask & HL_ITALIC))) + return FAIL; + +! #if defined(RISCOS) || defined(FEAT_GUI_GTK) + /* If there's no italic font, then fake it. + * For GTK2, we don't need a different font for italic style. */ + if (hl_mask_todo & HL_ITALIC) +--- 2193,2199 ---- + if (back != 0 && ((draw_flags & DRAW_BOLD) || (highlight_mask & HL_ITALIC))) + return FAIL; + +! #if defined(FEAT_GUI_GTK) + /* If there's no italic font, then fake it. + * For GTK2, we don't need a different font for italic style. */ + if (hl_mask_todo & HL_ITALIC) +*************** +*** 2985,3010 **** + did_clip = TRUE; + } + /* Allow the left button to start the selection */ +- else if (button == +- # ifdef RISCOS +- /* Only start a drag on a drag event. Otherwise +- * we don't get a release event. */ +- MOUSE_DRAG +- # else +- MOUSE_LEFT +- # endif +- ) +- { +- clip_start_selection(X_2_COL(x), Y_2_ROW(y), repeated_click); +- did_clip = TRUE; +- } +- # ifdef RISCOS + else if (button == MOUSE_LEFT) + { +! clip_clear_selection(); + did_clip = TRUE; + } +- # endif + + /* Always allow pasting */ + if (button != MOUSE_MIDDLE) +--- 2985,2995 ---- + did_clip = TRUE; + } + /* Allow the left button to start the selection */ + else if (button == MOUSE_LEFT) + { +! clip_start_selection(X_2_COL(x), Y_2_ROW(y), repeated_click); + did_clip = TRUE; + } + + /* Always allow pasting */ + if (button != MOUSE_MIDDLE) +*** ../vim-7.3.186/src/gui.h 2010-08-15 21:57:25.000000000 +0200 +--- src/gui.h 2011-05-10 16:27:19.000000000 +0200 +*************** +*** 52,61 **** + # include */ + #endif + +- #ifdef RISCOS +- # include "gui_riscos.h" +- #endif +- + #ifdef FEAT_GUI_PHOTON + # include + # include +--- 52,57 ---- +*************** +*** 151,157 **** + #define DRAW_BOLD 0x02 /* draw bold text */ + #define DRAW_UNDERL 0x04 /* draw underline text */ + #define DRAW_UNDERC 0x08 /* draw undercurl text */ +! #if defined(RISCOS) || defined(FEAT_GUI_GTK) + # define DRAW_ITALIC 0x10 /* draw italic text */ + #endif + #define DRAW_CURSOR 0x20 /* drawing block cursor (win32) */ +--- 147,153 ---- + #define DRAW_BOLD 0x02 /* draw bold text */ + #define DRAW_UNDERL 0x04 /* draw underline text */ + #define DRAW_UNDERC 0x08 /* draw undercurl text */ +! #if defined(FEAT_GUI_GTK) + # define DRAW_ITALIC 0x10 /* draw italic text */ + #endif + #define DRAW_CURSOR 0x20 /* drawing block cursor (win32) */ +*************** +*** 219,227 **** + #ifdef FEAT_GUI_MAC + ControlHandle id; /* A handle to the scrollbar */ + #endif +- #ifdef RISCOS +- int id; /* Window handle of scrollbar window */ +- #endif + #ifdef FEAT_GUI_PHOTON + PtWidget_t *id; + #endif +--- 215,220 ---- +*************** +*** 450,463 **** + int visibility; /* Is window partially/fully obscured? */ + #endif + +- #ifdef RISCOS +- int window_handle; +- char_u *window_title; +- int window_title_size; +- int fg_colour; /* in 0xBBGGRR format */ +- int bg_colour; +- #endif +- + #ifdef FEAT_GUI_PHOTON + PtWidget_t *vimWindow; /* PtWindow */ + PtWidget_t *vimTextArea; /* PtRaw */ +--- 443,448 ---- +*** ../vim-7.3.186/src/main.c 2011-04-11 21:35:03.000000000 +0200 +--- src/main.c 2011-05-10 16:27:33.000000000 +0200 +*************** +*** 3276,3286 **** + main_msg(_("+reverse\t\tDon't use reverse video (also: +rv)")); + main_msg(_("-xrm \tSet the specified resource")); + #endif /* FEAT_GUI_X11 */ +- #if defined(FEAT_GUI) && defined(RISCOS) +- mch_msg(_("\nArguments recognised by gvim (RISC OS version):\n")); +- main_msg(_("--columns \tInitial width of window in columns")); +- main_msg(_("--rows \tInitial height of window in rows")); +- #endif + #ifdef FEAT_GUI_GTK + mch_msg(_("\nArguments recognised by gvim (GTK+ version):\n")); + main_msg(_("-font \t\tUse for normal text (also: -fn)")); +--- 3276,3281 ---- +*** ../vim-7.3.186/src/memfile.c 2011-03-22 18:10:34.000000000 +0100 +--- src/memfile.c 2011-05-10 16:27:38.000000000 +0200 +*************** +*** 1307,1313 **** + * fname cannot be NameBuff, because it must have been allocated. + */ + mf_set_ffname(mfp); +! #if defined(MSDOS) || defined(MSWIN) || defined(RISCOS) + /* + * A ":!cd e:xxx" may change the directory without us knowning, use the + * full pathname always. Careful: This frees fname! +--- 1307,1313 ---- + * fname cannot be NameBuff, because it must have been allocated. + */ + mf_set_ffname(mfp); +! #if defined(MSDOS) || defined(MSWIN) + /* + * A ":!cd e:xxx" may change the directory without us knowning, use the + * full pathname always. Careful: This frees fname! +*** ../vim-7.3.186/src/memline.c 2011-02-15 11:56:56.000000000 +0100 +--- src/memline.c 2011-05-10 16:28:40.000000000 +0200 +*************** +*** 748,754 **** + continue; + if (mf_open_file(mfp, fname) == OK) /* consumes fname! */ + { +! #if defined(MSDOS) || defined(MSWIN) || defined(RISCOS) + /* + * set full pathname for swap file now, because a ":!cd dir" may + * change directory without us knowing it. +--- 748,754 ---- + continue; + if (mf_open_file(mfp, fname) == OK) /* consumes fname! */ + { +! #if defined(MSDOS) || defined(MSWIN) + /* + * set full pathname for swap file now, because a ":!cd dir" may + * change directory without us knowing it. +*************** +*** 933,939 **** + b0p->b0_fname[0] = NUL; + else + { +! #if defined(MSDOS) || defined(MSWIN) || defined(AMIGA) || defined(RISCOS) + /* Systems that cannot translate "~user" back into a path: copy the + * file name unmodified. Do use slashes instead of backslashes for + * portability. */ +--- 933,939 ---- + b0p->b0_fname[0] = NUL; + else + { +! #if defined(MSDOS) || defined(MSWIN) || defined(AMIGA) + /* Systems that cannot translate "~user" back into a path: copy the + * file name unmodified. Do use slashes instead of backslashes for + * portability. */ +*************** +*** 1103,1109 **** + fname = (char_u *)""; + len = (int)STRLEN(fname); + if (len >= 4 && +! #if defined(VMS) || defined(RISCOS) + STRNICMP(fname + len - 4, "_s" , 2) + #else + STRNICMP(fname + len - 4, ".s" , 2) +--- 1103,1109 ---- + fname = (char_u *)""; + len = (int)STRLEN(fname); + if (len >= 4 && +! #if defined(VMS) + STRNICMP(fname + len - 4, "_s" , 2) + #else + STRNICMP(fname + len - 4, ".s" , 2) +*************** +*** 1773,1783 **** + #ifdef VMS + names[0] = vim_strsave((char_u *)"*_sw%"); + #else +- # ifdef RISCOS +- names[0] = vim_strsave((char_u *)"*_sw#"); +- # else + names[0] = vim_strsave((char_u *)"*.sw?"); +- # endif + #endif + #if defined(UNIX) || defined(WIN3264) + /* For Unix names starting with a dot are special. MS-Windows +--- 1773,1779 ---- +*************** +*** 1804,1814 **** + #ifdef VMS + names[0] = concat_fnames(dir_name, (char_u *)"*_sw%", TRUE); + #else +- # ifdef RISCOS +- names[0] = concat_fnames(dir_name, (char_u *)"*_sw#", TRUE); +- # else + names[0] = concat_fnames(dir_name, (char_u *)"*.sw?", TRUE); +- # endif + #endif + #if defined(UNIX) || defined(WIN3264) + /* For Unix names starting with a dot are special. MS-Windows +--- 1800,1806 ---- +*************** +*** 1877,1883 **** + char_u *swapname; + + swapname = modname(fname_res, +! #if defined(VMS) || defined(RISCOS) + (char_u *)"_swp", FALSE + #else + (char_u *)".swp", TRUE +--- 1869,1875 ---- + char_u *swapname; + + swapname = modname(fname_res, +! #if defined(VMS) + (char_u *)"_swp", FALSE + #else + (char_u *)".swp", TRUE +*************** +*** 2176,2186 **** + #ifdef VMS + names[num_names] = concat_fnames(path, (char_u *)"_sw%", FALSE); + #else +- # ifdef RISCOS +- names[num_names] = concat_fnames(path, (char_u *)"_sw#", FALSE); +- # else + names[num_names] = concat_fnames(path, (char_u *)".sw?", FALSE); +- # endif + #endif + if (names[num_names] == NULL) + goto end; +--- 2168,2174 ---- +*************** +*** 2207,2217 **** + #ifdef VMS + names[num_names] = modname(path, (char_u *)"_sw%", FALSE); + #else +- # ifdef RISCOS +- names[num_names] = modname(path, (char_u *)"_sw#", FALSE); +- # else + names[num_names] = modname(path, (char_u *)".sw?", FALSE); +- # endif + #endif + if (names[num_names] == NULL) + goto end; +--- 2195,2201 ---- +*************** +*** 3205,3211 **** + mf_free(mfp, hp); /* free the data block */ + buf->b_ml.ml_locked = NULL; + +! for (stack_idx = buf->b_ml.ml_stack_top - 1; stack_idx >= 0; --stack_idx) + { + buf->b_ml.ml_stack_top = 0; /* stack is invalid when failing */ + ip = &(buf->b_ml.ml_stack[stack_idx]); +--- 3189,3196 ---- + mf_free(mfp, hp); /* free the data block */ + buf->b_ml.ml_locked = NULL; + +! for (stack_idx = buf->b_ml.ml_stack_top - 1; stack_idx >= 0; +! --stack_idx) + { + buf->b_ml.ml_stack_top = 0; /* stack is invalid when failing */ + ip = &(buf->b_ml.ml_stack[stack_idx]); +*************** +*** 3956,3969 **** + #else + (buf->b_p_sn || buf->b_shortname), + #endif +- #ifdef RISCOS +- /* Avoid problems if fname has special chars, eg */ +- ffname, +- #else + fname_res, +- #endif + (char_u *) +! #if defined(VMS) || defined(RISCOS) + "_swp", + #else + ".swp", +--- 3941,3949 ---- + #else + (buf->b_p_sn || buf->b_shortname), + #endif + fname_res, + (char_u *) +! #if defined(VMS) + "_swp", + #else + ".swp", +*************** +*** 4427,4440 **** + } + close(fd); + } +- #ifdef RISCOS +- else +- /* Can't open swap file, though it does exist. +- * Assume that the user is editing two files with +- * the same name in different directories. No error. +- */ +- differ = TRUE; +- #endif + + /* give the ATTENTION message when there is an old swap file + * for the current file, and the buffer was not recovered. */ +--- 4407,4412 ---- +*** ../vim-7.3.186/src/misc1.c 2011-05-10 14:44:07.000000000 +0200 +--- src/misc1.c 2011-05-10 16:29:29.000000000 +0200 +*************** +*** 4589,4613 **** + vim_ispathsep(c) + int c; + { +! #ifdef RISCOS +! return (c == '.' || c == ':'); +! #else +! # ifdef UNIX + return (c == '/'); /* UNIX has ':' inside file names */ +! # else +! # ifdef BACKSLASH_IN_FILENAME + return (c == ':' || c == '/' || c == '\\'); +! # else +! # ifdef VMS + /* server"user passwd"::device:[full.path.name]fname.extension;version" */ + return (c == ':' || c == '[' || c == ']' || c == '/' + || c == '<' || c == '>' || c == '"' ); +! # else /* Amiga */ + return (c == ':' || c == '/'); +! # endif /* VMS */ +! # endif + # endif +! #endif /* RISC OS */ + } + + #if defined(FEAT_SEARCHPATH) || defined(PROTO) +--- 4589,4609 ---- + vim_ispathsep(c) + int c; + { +! #ifdef UNIX + return (c == '/'); /* UNIX has ':' inside file names */ +! #else +! # ifdef BACKSLASH_IN_FILENAME + return (c == ':' || c == '/' || c == '\\'); +! # else +! # ifdef VMS + /* server"user passwd"::device:[full.path.name]fname.extension;version" */ + return (c == ':' || c == '[' || c == ']' || c == '/' + || c == '<' || c == '>' || c == '"' ); +! # else + return (c == ':' || c == '/'); +! # endif /* VMS */ + # endif +! #endif + } + + #if defined(FEAT_SEARCHPATH) || defined(PROTO) +*** ../vim-7.3.186/src/proto.h 2010-08-15 21:57:29.000000000 +0200 +--- src/proto.h 2011-05-10 16:29:45.000000000 +0200 +*************** +*** 62,70 **** + # ifdef __BEOS__ + # include "os_beos.pro" + # endif +- # ifdef RISCOS +- # include "os_riscos.pro" +- # endif + # ifdef __QNX__ + # include "os_qnx.pro" + # endif +--- 62,67 ---- +*************** +*** 245,253 **** + # ifdef FEAT_GUI_X11 + # include "gui_x11.pro" + # endif +- # ifdef RISCOS +- # include "gui_riscos.pro" +- # endif + # ifdef FEAT_GUI_PHOTON + # include "gui_photon.pro" + # endif +--- 242,247 ---- +*** ../vim-7.3.186/src/quickfix.c 2011-05-05 17:14:07.000000000 +0200 +--- src/quickfix.c 2011-05-10 16:30:18.000000000 +0200 +*************** +*** 1182,1202 **** + if (fname == NULL || *fname == NUL) /* no file name */ + return 0; + { +- #ifdef RISCOS +- /* Name is reported as `main.c', but file is `c.main' */ +- return ro_buflist_add(fname); +- #else + char_u *ptr; + int fnum; + +! # ifdef VMS + vms_remove_version(fname); +! # endif +! # ifdef BACKSLASH_IN_FILENAME + if (directory != NULL) + slash_adjust(directory); + slash_adjust(fname); +! # endif + if (directory != NULL && !vim_isAbsName(fname) + && (ptr = concat_fnames(directory, fname, TRUE)) != NULL) + { +--- 1182,1198 ---- + if (fname == NULL || *fname == NUL) /* no file name */ + return 0; + { + char_u *ptr; + int fnum; + +! #ifdef VMS + vms_remove_version(fname); +! #endif +! #ifdef BACKSLASH_IN_FILENAME + if (directory != NULL) + slash_adjust(directory); + slash_adjust(fname); +! #endif + if (directory != NULL && !vim_isAbsName(fname) + && (ptr = concat_fnames(directory, fname, TRUE)) != NULL) + { +*************** +*** 1221,1227 **** + return fnum; + } + return buflist_add(fname, 0); +- #endif + } + } + +--- 1217,1222 ---- +*** ../vim-7.3.186/src/search.c 2011-02-25 18:38:29.000000000 +0100 +--- src/search.c 2011-05-10 16:30:38.000000000 +0200 +*************** +*** 4581,4589 **** + char_u *already = NULL; + char_u *startp = NULL; + char_u *inc_opt = NULL; +- #ifdef RISCOS +- int previous_munging = __riscosify_control; +- #endif + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) + win_T *curwin_save = NULL; + #endif +--- 4581,4586 ---- +*************** +*** 4596,4606 **** + if (file_line == NULL) + return; + +- #ifdef RISCOS +- /* UnixLib knows best how to munge c file names - turn munging back on. */ +- int __riscosify_control = 0; +- #endif +- + if (type != CHECK_PATH && type != FIND_DEFINE + #ifdef FEAT_INS_EXPAND + /* when CONT_SOL is set compare "ptr" with the beginning of the line +--- 4593,4598 ---- +*************** +*** 5228,5238 **** + vim_free(regmatch.regprog); + vim_free(incl_regmatch.regprog); + vim_free(def_regmatch.regprog); +- +- #ifdef RISCOS +- /* Restore previous file munging state. */ +- __riscosify_control = previous_munging; +- #endif + } + + static void +--- 5220,5225 ---- +*** ../vim-7.3.186/src/structs.h 2011-03-22 18:10:34.000000000 +0100 +--- src/structs.h 2011-05-10 16:30:49.000000000 +0200 +*************** +*** 2366,2376 **** + MenuHandle menu_handle; + MenuHandle submenu_handle; + #endif +- #ifdef RISCOS +- int *id; /* Not used, but gui.c needs it */ +- int greyed_out; /* Flag */ +- int hidden; +- #endif + #ifdef FEAT_GUI_PHOTON + PtWidget_t *id; + PtWidget_t *submenu_id; +--- 2366,2371 ---- +*** ../vim-7.3.186/src/term.c 2010-12-30 14:47:32.000000000 +0100 +--- src/term.c 2011-05-10 16:31:41.000000000 +0200 +*************** +*** 52,58 **** + + /* + * Here are the builtin termcap entries. They are not stored as complete +! * Tcarr structures, as such a structure is too big. + * + * The entries are compact, therefore they normally are included even when + * HAVE_TGETENT is defined. When HAVE_TGETENT is defined, the builtin entries +--- 52,58 ---- + + /* + * Here are the builtin termcap entries. They are not stored as complete +! * structures with all entries, as such a structure is too big. + * + * The entries are compact, therefore they normally are included even when + * HAVE_TGETENT is defined. When HAVE_TGETENT is defined, the builtin entries +*************** +*** 199,269 **** + #endif + + #ifndef NO_BUILTIN_TCAPS +- # if defined(RISCOS) || defined(ALL_BUILTIN_TCAPS) +- /* +- * Default for the Acorn. +- */ +- {(int)KS_NAME, "riscos"}, +- {(int)KS_CL, "\014"}, /* Cls and Home Cursor */ +- {(int)KS_CM, "\001%d\001%d\002"}, /* Position cursor */ +- +- {(int)KS_CCO, "16"}, /* Allow 16 colors */ +- +- {(int)KS_CAF, "\001%d\021"}, /* Set foreground colour */ +- {(int)KS_CAB, "\001%d\022"}, /* Set background colour */ +- +- +- {(int)KS_ME, "\004"}, /* Normal mode */ +- {(int)KS_MR, "\005"}, /* Reverse */ +- +- {(int)KS_VI, "\016"}, /* Cursor invisible */ +- {(int)KS_VE, "\017"}, /* Cursor visible */ +- {(int)KS_VS, "\020"}, /* Cursor very visible */ +- +- {(int)KS_CS, "\001%d\001%d\003"}, /* Set scroll region */ +- {(int)KS_SR, "\023"}, /* Scroll text down */ +- {K_UP, "\217"}, +- {K_DOWN, "\216"}, +- {K_LEFT, "\214"}, +- {K_RIGHT, "\215"}, +- {K_S_UP, "\237"}, +- {K_S_DOWN, "\236"}, +- {K_S_LEFT, "\234"}, +- {K_S_RIGHT, "\235"}, +- +- {K_F1, "\201"}, +- {K_F2, "\202"}, +- {K_F3, "\203"}, +- {K_F4, "\204"}, +- {K_F5, "\205"}, +- {K_F6, "\206"}, +- {K_F7, "\207"}, +- {K_F8, "\210"}, +- {K_F9, "\211"}, +- {K_F10, "\312"}, +- {K_F11, "\313"}, +- {K_F12, "\314"}, +- {K_S_F1, "\221"}, +- {K_S_F2, "\222"}, +- {K_S_F3, "\223"}, +- {K_S_F4, "\224"}, +- {K_S_F5, "\225"}, +- {K_S_F6, "\226"}, +- {K_S_F7, "\227"}, +- {K_S_F8, "\230"}, +- {K_S_F9, "\231"}, +- {K_S_F10, "\332"}, +- {K_S_F11, "\333"}, +- {K_S_F12, "\334"}, +- {K_BS, "\010"}, +- {K_INS, "\315"}, +- {K_DEL, "\177"}, +- {K_HOME, "\036"}, +- {K_END, "\213"}, +- {K_PAGEUP, "\237"}, +- {K_PAGEDOWN, "\236"}, +- # endif /* Acorn terminal */ +- + + # if defined(AMIGA) || defined(ALL_BUILTIN_TCAPS) + /* +--- 199,204 ---- +*************** +*** 1399,1408 **** + /* + * DEFAULT_TERM is used, when no terminal is specified with -T option or $TERM. + */ +- #ifdef RISCOS +- # define DEFAULT_TERM (char_u *)"riscos" +- #endif +- + #ifdef AMIGA + # define DEFAULT_TERM (char_u *)"amiga" + #endif +--- 1334,1339 ---- +*** ../vim-7.3.186/src/termlib.c 2010-08-15 21:57:30.000000000 +0200 +--- src/termlib.c 2011-05-10 16:31:58.000000000 +0200 +*************** +*** 13,19 **** + #include "vim.h" + #include "termlib.pro" + +! #if !defined(AMIGA) && !defined(VMS) && !defined(MACOS) && !defined(RISCOS) + # include + #endif + +--- 13,19 ---- + #include "vim.h" + #include "termlib.pro" + +! #if !defined(AMIGA) && !defined(VMS) && !defined(MACOS) + # include + #endif + +*** ../vim-7.3.186/src/version.c 2011-05-10 16:12:40.000000000 +0200 +--- src/version.c 2011-05-10 16:37:20.000000000 +0200 +*************** +*** 1205,1213 **** + # endif + #endif + +- #ifdef RISCOS +- MSG_PUTS(_("\nRISC OS version")); +- #endif + #ifdef VMS + MSG_PUTS(_("\nOpenVMS version")); + # ifdef HAVE_PATHDEF +--- 1207,1212 ---- +*** ../vim-7.3.186/src/vim.h 2011-05-05 16:41:19.000000000 +0200 +--- src/vim.h 2011-05-10 16:32:40.000000000 +0200 +*************** +*** 184,192 **** + # define SIZEOF_INT 2 + # endif + #endif +- #ifdef RISCOS +- # define SIZEOF_INT 4 +- #endif + + + #include "feature.h" /* #defines for optionals and features */ +--- 184,189 ---- +*************** +*** 340,349 **** + # include "os_mac.h" + #endif + +- #ifdef RISCOS +- # include "os_riscos.h" +- #endif +- + #ifdef __QNX__ + # include "os_qnx.h" + #endif +--- 337,342 ---- +*** ../vim-7.3.186/src/gui_riscos.h 2010-08-15 21:57:28.000000000 +0200 +--- src/gui_riscos.h 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,32 **** +- /* vi:set ts=8 sts=4 sw=4: +- * +- * VIM - Vi IMproved by Bram Moolenaar +- * +- * Do ":help uganda" in Vim to read copying and usage conditions. +- * Do ":help credits" in Vim to see a list of people who contributed. +- */ +- +- #define FEAT_BROWSE +- +- #define TASK 0x4b534154 +- +- /* Nested wimp flags: */ +- #define CHILD_FIX_TO_WORKAREA 0 +- #define CHILD_FIX_TO_LEFT 1 +- #define CHILD_FIX_TO_BOTTOM 1 +- #define CHILD_FIX_TO_RIGHT 2 +- #define CHILD_FIX_TO_TOP 2 +- +- #define CHILD_SELF_SCROLL 0 +- #define CHILD_PARENT_SCROLL 1 +- +- #define CHILD_LEFT 16 +- #define CHILD_BOTTOM 18 +- #define CHILD_RIGHT 20 +- #define CHILD_TOP 22 +- #define CHILD_SCROLL_X 24 +- #define CHILD_SCROLL_Y 26 +- +- int wimp_poll(int mask, int *block); +- int wimp_poll_idle(int mask, int *block, int end_time); +- void ro_open_main(int *block); +--- 0 ---- +*** ../vim-7.3.186/src/os_riscos.h 2010-08-15 21:57:30.000000000 +0200 +--- src/os_riscos.h 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,166 **** +- /* vi:set ts=8 sts=4 sw=4: +- * +- * VIM - Vi IMproved by Bram Moolenaar +- * +- * Do ":help uganda" in Vim to read copying and usage conditions. +- * Do ":help credits" in Vim to see a list of people who contributed. +- */ +- +- #include +- #include +- #include +- #include +- #include +- #include +- #include +- #include +- +- #define CASE_INSENSITIVE_FILENAME +- #define FEAT_MODIFY_FNAME +- #define FEAT_OSFILETYPE +- #define DFLT_OFT "Text" +- #define USE_TERM_CONSOLE +- #define HAVE_AVAIL_MEM +- +- /* Longer filenames now accessible to all */ +- #ifndef BASENAMELEN +- # define BASENAMELEN 64 /* Same length as unzip */ +- #endif +- +- #ifndef TEMNAME +- # define TEMPNAME ".v?XXXXXX" +- # define TEMPNAMELEN 25 +- #endif +- +- #ifndef DFLT_HELPFILE +- # define DFLT_HELPFILE "Vim:doc.help" +- #endif +- +- #ifndef DFLT_BDIR +- # define DFLT_BDIR ".,." /* default for 'backupdir' */ +- #endif +- +- /* Paths to try putting swap file in. */ +- #ifndef DFLT_DIR +- # define DFLT_DIR ".,." /* default for 'directory' */ +- #endif +- +- #ifndef DFLT_VDIR +- # define DFLT_VDIR "Choices:Vim.view" /* default for 'viewdir' */ +- #endif +- +- #ifndef TERMCAPFILE +- # define TERMCAPFILE "Vim:TermCap" +- #endif +- #define HAVE_TGETENT +- +- #ifndef SYNTAX_FNAME +- # define SYNTAX_FNAME "Vim:Syntax.%s" +- #endif +- +- #ifndef EVIM_FILE +- # define EVIM_FILE "Vim:Evim" +- #endif +- +- #define FEAT_VIMINFO +- +- #ifndef VIMINFO_FILE +- # define VIMINFO_FILE ".Vim.VimInfo" +- #endif +- #ifndef VIMINFO_FILE2 +- # define VIMINFO_FILE2 "Choices:Vim.VimInfo" +- #endif +- +- #ifndef VIMRC_FILE +- # define VIMRC_FILE "/vimrc" +- #endif +- #ifndef EXRC_FILE +- # define EXRC_FILE "/exrc" +- #endif +- #ifndef GVIMRC_FILE +- # define GVIMRC_FILE "/gvimrc" +- #endif +- #ifndef USR_VIMRC_FILE +- # define USR_VIMRC_FILE "Vim:Evim" +- #endif +- #ifndef SESSION_FILE +- # define SESSION_FILE "/Session.vim" +- #endif +- #ifndef USR_VIMRC_FILE +- # define USR_VIMRC_FILE "Choices:Vim.VimRC" +- #endif +- #ifndef USR_GVIMRC_FILE +- # define USR_GVIMRC_FILE "Choices:Vim.GVimRC" +- #endif +- #ifndef USR_EXRC_FILE +- # define USR_EXRC_FILE "Choices:Vim.ExRC" +- #endif +- #ifndef SYS_VIMRC_FILE +- # define SYS_VIMRC_FILE "Vim:VimRC" +- #endif +- #ifndef SYS_GVIMRC_FILE +- # define SYS_GVIMRC_FILE "Vim:GVimRC" +- #endif +- #ifndef SYS_MENU_FILE +- # define SYS_MENU_FILE "Vim:Menu" +- #endif +- #ifndef SYS_OPTWIN_FILE +- # define SYS_OPTWIN_FILE "Vim:Optwin" +- #endif +- #ifndef FILETYPE_FILE +- # define FILETYPE_FILE "Vim:Filetype" +- #endif +- #ifndef FTPLUGIN_FILE +- # define FTPLUGIN_FILE "Vim:Ftplugin/vim" +- #endif +- #ifndef INDENT_FILE +- # define INDENT_FILE "Vim:Indent/vim" +- #endif +- #ifndef FTOFF_FILE +- # define FTOFF_FILE "Vim:Ftoff" +- #endif +- #ifndef FTPLUGOF_FILE +- # define FTPLUGOF_FILE "Vim:Ftplugof" +- #endif +- #ifndef INDOFF_FILE +- # define INDOFF_FILE "Vim:Indoff" +- #endif +- +- #define DFLT_ERRORFILE "errors/vim" +- #define DFLT_RUNTIMEPATH "Choices:Vim,Vim:,Choices:Vim.after" +- +- /* +- * RISC PCs have plenty of memory, use large buffers +- */ +- #define CMDBUFFSIZE 1024 /* size of the command processing buffer */ +- #define MAXPATHL 256 /* paths are always quite short though */ +- +- #ifndef DFLT_MAXMEM +- # define DFLT_MAXMEM (5*1024) /* use up to 5 Mbyte for a buffer */ +- #endif +- +- #ifndef DFLT_MAXMEMTOT +- # define DFLT_MAXMEMTOT (10*1024) /* use up to 10 Mbyte for Vim */ +- #endif +- +- #ifdef HAVE_SIGSET +- # define signal sigset +- #endif +- +- #define n_flag (1<<31) +- #define z_flag (1<<30) +- #define c_flag (1<<29) +- #define v_flag (1<<28) +- +- /* These take r0-r7 as inputs, returns r0-r7 in global variables. */ +- void swi(int swinum, ...); /* Handles errors itself */ +- int xswi(int swinum, ...); /* Returns errors using v flag */ +- extern int r0, r1, r2, r3, r4, r5, r6, r7; /* For return values */ +- +- #include +- #include +- +- #define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len) +- #define mch_rename(src, dst) rename(src, dst) +- #define mch_getenv(x) (char_u *)getenv((char *)x) +- #define mch_setenv(name, val, x) setenv(name, val, x) +--- 0 ---- +*** ../vim-7.3.186/src/gui_riscos.c 2011-05-10 15:52:10.000000000 +0200 +--- src/gui_riscos.c 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,3558 **** +- /* vi:set ts=8 sts=4 sw=4: +- * +- * VIM - Vi IMproved by Bram Moolenaar +- * +- * Do ":help uganda" in Vim to read copying and usage conditions. +- * Do ":help credits" in Vim to see a list of people who contributed. +- * See README.txt for an overview of the Vim source code. +- */ +- +- #include "vim.h" +- #include +- +- /* +- * gui_riscos.c +- * +- * Thomas Leonard +- * Updated by Andy Wingate +- */ +- +- extern int time_of_last_poll; +- +- int task_handle = 0; /* Zero means we are not yet a Wimp task */ +- int child_handle = 0; /* Task handle of our child process (zero if none). */ +- int *wimp_menu = (int *) -1; /* Pointer to a Wimp menu structure (or -1) */ +- int save_window = -1; /* Save As window handle */ +- +- int *redraw_block = NULL; /* NULL means not in a redraw loop. */ +- int ro_return_early = FALSE; /* Break out of gui_mch_wait_for_chars() */ +- +- int leaf_ref = 0; /* Wimp message number - send via Wimp$Scrap */ +- char_u *leaf_name = NULL; /* Leaf name from DataSave */ +- +- int default_columns = 120; /* These values are used if the --rows and --columns */ +- int default_rows = 32; /* options aren't used on startup. */ +- +- #define DRAG_FALSE 0 +- #define DRAG_SELECTION 1 +- #define DRAG_RESIZE_WINDOW 2 +- int ro_dragging = DRAG_FALSE; +- int drag_button; +- int drag_modifiers; +- int drag_x_offset; +- int drag_y_offset; +- +- int nested_wimp = FALSE; /* Bool - can we use the new wimp? */ +- +- int changed_mode = FALSE; +- int x_eigen_factor; +- int y_eigen_factor; +- +- /* If ro_current_font is non-zero then use the outline font with that handle, +- * otherwise, if zap_redraw is TRUE then use ZapRedraw, otherwise use the +- * system font. +- * +- * If zap_redraw is TRUE then zap_file[] contains valid Zap font file +- * pointers (or NULLs). +- */ +- int ro_current_font = 0; /* 0 is system font, or ZapRedraw */ +- int font_x_offset = 0; /* Where to position each char in its box */ +- int font_y_offset = 0; +- +- int zap_redraw = FALSE; +- int double_height = FALSE; /* Plot each line twice? */ +- +- #define grgb(r,g,b) ((b<<16) + (g<<8) + (r)) +- #define UNUSED_COLOUR (gui.back_pixel) +- +- #define RO_LOAD_CLIPBOARD -2 /* Internal handle for DataSave message. */ +- +- /* Changes by John Kortink, 22-23 July 1998 +- * +- * Stuff to make redraw a lot faster. Almost all of it is right here below, +- * elsewhere changes are marked with 'JK230798'. Apart from a small change in +- * 'gui.c' all changes are limited to this file, 'gui_riscos.c'. The change in +- * 'gui.c' is to make Vim stop being 'smart' not redrawing characters that are +- * 'already there' (i.e. from the previous line, by coincidence). This caused a +- * lot more calls to the redraw code, which we want to avoid because a few nice +- * big strings at a time is a lot faster than a truckload of small ones. ('Dear +- * Bram ...'). +- */ +- +- /* The ZapRedraw structure */ +- +- static struct +- { +- int r_flags; +- int r_minx; +- int r_miny; +- int r_maxx; +- int r_maxy; +- int r_screen; +- int r_bpl; +- int r_bpp; +- int r_charw; +- int r_charh; +- char *r_caddr; +- int r_cbpl; +- int r_cbpc; +- int r_linesp; +- int r_data; +- int r_scrollx; +- int r_scrolly; +- int *r_palette; +- int r_for; +- int r_bac; +- char *r_workarea; +- int r_magx; +- int r_magy; +- int r_xsize; +- int r_ysize; +- int r_mode; +- } +- zap_redraw_block; +- +- /* Other globals */ +- +- static int zap_redraw_initialised = FALSE; +- static int zap_redraw_update_colours; +- static int zap_redraw_colours[2]; +- static int zap_redraw_palette[16]; +- +- /* Holds the current Zap font file(s). +- * The font is recreated from this block on a mode change. +- * When using zap, element ZAP_NORMAL is always valid, but +- * the others can be NULL. +- */ +- +- #define ZAP_NORMAL 0 +- #define ZAP_BOLD 1 +- #define ZAP_ITALIC 2 +- #define ZAP_BITALIC 3 +- #define ZAP_STYLES 4 +- +- /* Zap font file format data */ +- static char *zap_file[ZAP_STYLES] = {NULL, NULL, NULL, NULL}; +- +- /* r_caddr format for current mode */ +- static char *zap_caddr[ZAP_STYLES] = {NULL, NULL, NULL, NULL}; +- +- static void ro_remove_menu(int *menu); +- +- /* +- * Initialise all the ZapRedraw stuff. +- * Call this when changing font and after each mode change. +- * zap_redraw_bitmap must contain a valid Zap font file (possibly +- * created from the system font). +- * +- * Return FAIL to revert to system font (if we can't use ZapRedraw). +- */ +- int +- ro_zap_redraw_initialise() +- { +- int bytes_per_bitmap_char; +- int first, last; +- int i; +- +- /* Can't have initialisers for struct members :-(, ok, this way then ... */ +- if (!zap_redraw_initialised) +- { +- zap_redraw_block.r_workarea = NULL; +- zap_redraw_initialised = TRUE; +- } +- +- /* We redraw in DSA mode */ +- zap_redraw_block.r_flags = 0x0; +- +- /* Let ZapRedraw get the screen address for us */ +- zap_redraw_block.r_screen = 0; +- +- /* Read the font width and height from the font file header. +- * Assume that all styles are the same size. +- * ZAP_NORMAL is always present. +- */ +- zap_redraw_block.r_charw = ((int *) zap_file[ZAP_NORMAL])[2]; +- zap_redraw_block.r_charh = ((int *) zap_file[ZAP_NORMAL])[3]; +- +- /* We have no linespacing */ +- zap_redraw_block.r_linesp = 0; +- +- /* Fix foreground = colour 1 */ +- zap_redraw_block.r_for = 1; +- +- /* Fix background = colour 0 */ +- zap_redraw_block.r_bac = 0; +- +- /* Colour mask buffer */ +- zap_redraw_block.r_palette = zap_redraw_palette; +- +- /* Allocate local workspace (for the few calls following here) */ +- if (zap_redraw_block.r_workarea != NULL) +- free(zap_redraw_block.r_workarea); +- zap_redraw_block.r_workarea = (char*) malloc(128); +- if (!zap_redraw_block.r_workarea) +- return FAIL; /* Out of memory */ +- +- /* Fill in VDU variables */ +- if (xswi(ZapRedraw_ReadVduVars, 0, &zap_redraw_block) & v_flag) +- return FAIL; /* Can't find ZapRedraw module - use VDU instead */ +- +- /* Determine cbpl and cbpc */ +- swi(ZapRedraw_CachedCharSize, zap_redraw_block.r_bpp, 0, +- zap_redraw_block.r_charw, zap_redraw_block.r_charh); +- zap_redraw_block.r_cbpl = r2; +- zap_redraw_block.r_cbpc = r3; +- +- /* Allocate general workspace (for the calls outside) */ +- if (zap_redraw_block.r_workarea != NULL) +- free(zap_redraw_block.r_workarea); +- zap_redraw_block.r_workarea = (char*) malloc(128 + zap_redraw_block.r_cbpl); +- if (!zap_redraw_block.r_workarea) +- return FAIL; /* Out of memory */ +- +- /* Now convert the 1 bpp character data ready for the current mode */ +- +- bytes_per_bitmap_char = (zap_redraw_block.r_charw * zap_redraw_block.r_charh + 7) / 8; +- +- /* Convert the fonts from 1bpp to a format suitable for the +- * current mode. +- */ +- for (i = 0; i < ZAP_STYLES; i++) +- { +- first = ((int *) zap_file[i])[4]; +- last = ((int *) zap_file[i])[5]; +- +- if (last > 255) +- last = 255; /* Don't convert cursors (overwrites memory!) */ +- +- /* Allocate the font cache */ +- vim_free(zap_caddr[i]); +- if (zap_file[i]) +- zap_caddr[i] = (char*) malloc(zap_redraw_block.r_cbpc * 256); +- else +- zap_caddr[i] = NULL; /* No file for this style */ +- +- if (zap_caddr[i]) +- { +- zap_redraw_block.r_caddr = zap_caddr[i]; +- +- swi(ZapRedraw_ConvertBitmap, 0, &zap_redraw_block, +- first, last, /* Range of characters to convert */ +- zap_file[i] + 0x20 /* Addr of first char provided by font */ +- - first * bytes_per_bitmap_char); +- } +- } +- +- if (!zap_caddr[ZAP_NORMAL]) +- { +- zap_redraw = FALSE; /* Out of memory */ +- return FAIL; +- } +- +- /* Next time we need them, we have to update the colour masks */ +- zap_redraw_update_colours = TRUE; +- +- return OK; +- } +- +- /* +- * Redraw a string at OS coordinates (top-left, x inclusive, y exclusive). +- * Graphics clip window is window[0..3] as in R1+28..40 of Wimp_RedrawWindow. +- * Returns (possibly modified) flags. +- */ +- int +- ro_zap_redraw_draw_string(x, y, string, length, flags, clip) +- int x; +- int y; +- char *string; +- int length; +- int flags; /* DRAW_TRANSP, DRAW_BOLD, DRAW_UNDERL, DRAW_ITALIC */ +- int *clip; +- { +- char redraw_data[1024]; +- int clip_minx; +- int clip_miny; +- int clip_maxx; +- int clip_maxy; +- int os_xshift = zap_redraw_block.r_magx; +- int os_yshift = zap_redraw_block.r_magy; +- +- if (flags & DRAW_TRANSP) +- return flags; /* We don't do transparent plotting yet. */ +- +- if (flags & DRAW_BOLD) +- { +- if (flags & DRAW_ITALIC && zap_caddr[ZAP_BITALIC]) +- zap_redraw_block.r_caddr = zap_caddr[ZAP_BITALIC]; +- else +- zap_redraw_block.r_caddr = zap_caddr[ZAP_BOLD]; +- } +- else +- { +- if (flags & DRAW_ITALIC) +- zap_redraw_block.r_caddr = zap_caddr[ZAP_ITALIC]; +- else +- zap_redraw_block.r_caddr = zap_caddr[ZAP_NORMAL]; +- } +- if (!zap_redraw_block.r_caddr) +- { +- zap_redraw_block.r_caddr = zap_caddr[ZAP_NORMAL]; +- flags |= DRAW_UNDERL; /* Style missing - we can always underline */ +- } +- +- /* Set the vertical scaling flag */ +- if (double_height) +- zap_redraw_block.r_flags = 1 << 1; +- else +- zap_redraw_block.r_flags = 0; +- +- /* Update the colour masks (if needed) */ +- if (zap_redraw_update_colours) +- { +- swi(ZapRedraw_CreatePalette, 2, +- &zap_redraw_block, +- zap_redraw_colours, +- zap_redraw_block.r_palette, 2); +- zap_redraw_update_colours = FALSE; +- } +- +- /* Target rectangle in ZapRedraw rectangle coordinates (pixels, Y-min/max reversed !!!) */ +- zap_redraw_block.r_minx = x >> os_xshift; /* inclusive */ +- zap_redraw_block.r_miny = zap_redraw_block.r_ysize - (y >> os_yshift); /* inclusive */ +- zap_redraw_block.r_maxx = (x + length * gui.char_width) >> os_xshift; /* exclusive */ +- zap_redraw_block.r_maxy = zap_redraw_block.r_ysize - ((y - gui.char_height) >> os_yshift); +- /* exclusive */ +- +- /* Clip rectangle in ZapRedraw rectangle coordinates (pixels, Y-min/max reversed !!!) */ +- clip_minx = clip[0] >> os_xshift; /* inclusive */ +- clip_miny = zap_redraw_block.r_ysize - (clip[3] >> os_yshift); /* inclusive */ +- clip_maxx = clip[2] >> os_xshift; /* exclusive */ +- clip_maxy = zap_redraw_block.r_ysize - (clip[1] >> os_yshift); /* exclusive */ +- +- /* Clip target rectangle against the current graphics window */ +- if (zap_redraw_block.r_minx < clip_minx) +- { +- zap_redraw_block.r_scrollx = clip_minx - zap_redraw_block.r_minx; +- zap_redraw_block.r_minx = clip_minx; +- } +- else +- zap_redraw_block.r_scrollx = 0; +- if (zap_redraw_block.r_miny < clip_miny) +- { +- zap_redraw_block.r_scrolly = clip_miny - zap_redraw_block.r_miny; +- zap_redraw_block.r_miny = clip_miny; +- } +- else +- zap_redraw_block.r_scrolly = 0; +- if (zap_redraw_block.r_maxx > clip_maxx) +- zap_redraw_block.r_maxx = clip_maxx; +- if (zap_redraw_block.r_maxy > clip_maxy) +- zap_redraw_block.r_maxy = clip_maxy; +- +- /* Fill in the character data structure */ +- if (length > (sizeof(redraw_data) - 2 * 4 - 2)) +- length = sizeof(redraw_data) - 2 * 4 - 2; +- ((int*) redraw_data)[0] = 2 * 4; +- ((int*) redraw_data)[1] = 0; +- strncpy(redraw_data + 2 * 4, string, length); +- redraw_data[2 * 4 + length + 0] = '\0'; +- redraw_data[2 * 4 + length + 1] = '\x2'; +- zap_redraw_block.r_data = (int) redraw_data; +- +- /* Perform the draw */ +- swi(ZapRedraw_RedrawArea, 0, &zap_redraw_block); +- +- return flags; +- } +- +- /* +- * Okay that was it from me, back to Thomas ... +- */ +- +- /* +- * Parse the GUI related command-line arguments. Any arguments used are +- * deleted from argv, and *argc is decremented accordingly. This is called +- * when vim is started, whether or not the GUI has been started. +- */ +- void +- gui_mch_prepare(int *argc, char **argv) +- { +- int arg = 1; +- +- while (arg < *argc - 1) +- { +- if (strcmp(argv[arg], "--rows") == 0 || strcmp(argv[arg], "--columns") == 0) +- { +- int value; +- +- value = atoi(argv[arg + 1]); +- +- if (argv[arg][2] == 'r') +- default_rows = value; +- else +- default_columns = value; +- +- /* Delete argument from argv[]. (hope this is read/write!) */ +- +- *argc -= 2; +- if (*argc > arg) +- mch_memmove(&argv[arg], &argv[arg + 2], (*argc - arg) +- * sizeof(char *)); +- } +- else +- arg++; +- } +- } +- +- /* Fatal error on initialisation - report it and die. */ +- void +- ro_die(error) +- char_u *error; /* RISC OS error block */ +- { +- swi(Wimp_ReportError, error, 5, "GVim"); +- exit(EXIT_FAILURE); +- } +- +- /* Find the sizes of the window tools: +- * +- * Create a test window. +- * Find inner and outer sizes. +- * Find the difference. +- * Delete window. +- * +- * While we're here, find the eigen values too. +- */ +- void +- ro_measure_tools() +- { +- int block[10]; +- int vdu[] = { 4, 5, -1}; +- int test_window[] = +- { +- -100, -100, /* Visible area : min X,Y */ +- -50, -50, /* max X,Y */ +- 0, 0, /* Scroll offsets */ +- -1, /* Window in front */ +- 0xd0800150, /* Window flags */ +- 0xff070207, /* Colours */ +- 0x000c0103, /* More colours */ +- 0, -0x4000, /* Workarea extent */ +- 0x4000, 0, /* max X,Y */ +- 0x00000000, /* No title */ +- 0 << 12, /* No workarea button type */ +- 1, /* Wimp sprite area */ +- 0x00010001, /* Minimum width, height */ +- 0, 0, 0, /* Title data (none) */ +- 0 /* No icons */ +- }; +- int inner_max_x, inner_min_y; +- +- swi(Wimp_CreateWindow, 0, test_window); +- +- block[0] = r0; +- /* Open the window (and read state). +- * GetWindowOutline needs it too if the wimp isn't nested. +- */ +- swi(Wimp_OpenWindow, 0, block); +- inner_max_x = block[3]; +- inner_min_y = block[2]; +- +- swi(Wimp_GetWindowOutline, 0, block); +- +- gui.scrollbar_width = block[3] - inner_max_x; +- gui.scrollbar_height = inner_min_y - block[2]; +- +- swi(Wimp_DeleteWindow, 0, block); +- +- /* Read the size of one pixel. */ +- swi(OS_ReadVduVariables, vdu, vdu); +- x_eigen_factor = vdu[0]; +- y_eigen_factor = vdu[1]; +- } +- +- /* Load a template from the current templates file. +- * Create the window and return its handle. +- */ +- int +- ro_load_template(str_name, title, title_size) +- char_u *str_name; /* Identifier of window in file (max 12 chars) */ +- char_u **title; /* If not NULL then return pointer to title here */ +- int *title_size; /* If not NULL then return the title length here */ +- { +- int *window; +- char *data; +- int name[4]; +- +- strcpy( (char *) name, str_name); +- +- /* Find how big we must make the buffers */ +- +- if (xswi(Wimp_LoadTemplate, 0, 0, 0, 0, -1, name, 0) & v_flag) +- ro_die( (char *) r0); +- +- window = malloc(r1); /* Don't print text messages from alloc() */ +- data = malloc(r2); +- if (window == NULL || data == NULL) +- ro_die("\0\0\0\0Out of memory - Can't load templates"); +- +- /* Load the template into the buffers */ +- +- swi(Wimp_LoadTemplate, 0, +- window, /* Temp block */ +- data, /* Icon data */ +- data + r2 + 1, /* End of icon data */ +- -1, /* No fonts */ +- name, 0); /* First match */ +- if (r6 == 0) +- ro_die("\0\0\0\0Can't find window in Templates file"); +- +- /* Create the window */ +- +- if (xswi(Wimp_CreateWindow, 0, window) & v_flag) +- ro_die( (char *) r0); +- +- if (title) +- *title = (char_u *) window[18]; +- if (title_size) +- *title_size = window[20]; +- +- free(window); /* Free temp block */ +- return r0; /* Return the window handle */ +- } +- +- /* +- * Check if the GUI can be started. Called before gvimrc is sourced. +- * Return OK or FAIL. +- */ +- int +- gui_mch_init_check() +- { +- return OK; /* TODO: GUI can always be started? */ +- } +- +- /* +- * Initialise the RISC OS GUI. +- * Create all the windows. +- * Returns OK for success, FAIL when the GUI can't be started. +- */ +- int +- gui_mch_init() +- { +- int messages[] = { +- 1, 2, 3, 4, /* DataSave, DataSaveAck, DataLoad, DataLoadAck */ +- 8, /* PreQuit */ +- 0xf, /* ClaimEntity (for clipboard) */ +- 0x10, /* DataRequest (for clipboard) */ +- 0x400c1, /* Mode change */ +- 0x400c3, /* TaskCloseDown */ +- 0x400c9, /* MenusDeleted */ +- 0x808c1, /* TW_Output */ +- 0x808c2, /* TW_Ego */ +- 0x808c3, /* TW_Morio */ +- 0x808c4, /* TW_Morite */ +- 0}; /* End-of-list. */ +- +- +- /* There may have been some errors reported in the +- * command window before we get here. Wait if so. +- */ +- swi(Wimp_ReadSysInfo, 3); +- if (r0 == 0) +- swi(Wimp_CommandWindow, 0); /* Window opened - close with prompt */ +- +- if (xswi(Wimp_Initialise, 310, 0x4b534154, "GVim", messages) & v_flag) +- return FAIL; +- nested_wimp = r0 >= 397; +- task_handle = r1; +- +- /* Load the templates. */ +- +- if (xswi(Wimp_OpenTemplate, 0, "Vim:Templates") & v_flag) +- ro_die( (char *) r0); +- +- gui.window_handle = ro_load_template("editor", +- &gui.window_title, +- &gui.window_title_size); +- +- save_window = ro_load_template("save", NULL, NULL); +- +- swi(Wimp_CloseTemplate); +- +- /* Set default foreground and background colours. */ +- +- gui.norm_pixel = gui.def_norm_pixel; +- gui.back_pixel = gui.def_back_pixel; +- +- /* Get the colours from the "Normal" and "Menu" group (set in syntax.c or +- * in a vimrc file) */ +- +- set_normal_colors(); +- +- /* +- * Check that none of the colors are the same as the background color +- */ +- +- gui_check_colors(); +- +- /* Get the colours for the highlight groups (gui_check_colors() might have +- * changed them) */ +- +- highlight_gui_started(); /* re-init colours and fonts */ +- +- /* Set geometry based on values read on initialisation. */ +- +- gui.num_cols = Columns = default_columns; +- gui.num_rows = Rows = default_rows; +- +- /* Get some information about our environment. */ +- +- ro_measure_tools(); +- +- return OK; +- } +- +- /* +- * Called when the foreground or background colour has been changed. +- */ +- void +- gui_mch_new_colors() +- { +- } +- +- /* +- * Open the GUI window which was created by a call to gui_mch_init(). +- */ +- int +- gui_mch_open(void) +- { +- int block[10]; +- +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- block[7] = -1; /* Open at the top of the stack */ +- swi(Wimp_OpenWindow, 0, block); +- +- /* Give the new window the input focus */ +- swi(Wimp_SetCaretPosition, gui.window_handle, -1, 0, 0, -1, -1); +- +- if (gui_win_x != -1 && gui_win_y != -1) +- gui_mch_set_winpos(gui_win_x, gui_win_y); +- +- return OK; +- } +- +- void +- gui_mch_exit(int rc) +- { +- int block[64]; +- +- /* Close window. Stops us from getting troublesome events +- * if we take a while to die. +- */ +- block[0] = gui.window_handle; +- swi(Wimp_CloseWindow, 0, block); +- +- if (child_handle) +- { +- /* We still have a sub-task running - kill it */ +- block[0] = 20; +- block[3] = 0; +- block[4] = 0; /* Quit */ +- if ((xswi(Wimp_SendMessage, 17, block, child_handle) & v_flag) == 0) +- { +- /* Idle until child dies. */ +- while (child_handle) +- { +- process_event(wimp_poll(1, block), block); +- } +- } +- } +- +- exit(rc); +- } +- +- /* +- * Get the position of the top left corner of the window. +- */ +- int +- gui_mch_get_winpos(int *x, int *y) +- { +- /* TODO */ +- return FAIL; +- } +- +- /* +- * Set the position of the top left corner of the window to the given +- * coordinates. +- */ +- void +- gui_mch_set_winpos(int x, int y) +- { +- /* TODO */ +- } +- +- void +- gui_mch_set_shellsize(width, height, min_width, min_height, base_width, base_height, direction) +- int width; /* In OS units */ +- int height; +- int min_width; /* Smallest permissible window size (ignored) */ +- int min_height; +- int base_width; /* Space for scroll bars, etc */ +- int base_height; +- int direction; +- { +- int s_width, s_height; +- int block[] = { +- gui.window_handle, +- 0, +- -height + 1, +- width, +- 1}; +- +- gui_mch_get_screen_dimensions(&s_width, &s_height); +- s_width -= base_width; +- s_height -= base_height; /* Underestimate - ignores titlebar */ +- +- swi(Wimp_GetWindowState, 0, block); +- block[3] = block[1] + width; +- block[2] = block[4] - height; +- if (block[3] > s_width) +- { +- block[3] = s_width; +- block[1] = block[3] - width; +- } +- if (block[2] < gui.scrollbar_height) +- { +- block[2] = gui.scrollbar_height; +- block[4] = block[2] + height; +- } +- swi(Wimp_OpenWindow, 0, block); +- swi(Wimp_ForceRedraw, gui.window_handle, 0, -height, width, 0); +- } +- +- void +- gui_mch_get_screen_dimensions(int *screen_w, int *screen_h) +- { +- int block[] = {4, 5, 11, 12, -1}; +- +- swi(OS_ReadVduVariables, block, block); +- *screen_w = (block[2] + 1) << block[0]; +- *screen_h = (block[3] + 1) << block[1]; +- } +- +- /* Take a font name with options and return a font handle, or +- * zero for failure. +- * Replace extension with 'Bold' or 'Italic' depending on modifiers. +- */ +- int +- ro_get_font(fullname, weight) +- char_u *fullname; +- int weight; /* Initial weights: +- * BIT MEANING +- * 0 bold +- * 1 italic +- */ +- { +- char_u *arg; +- char_u font[41]; +- int width = -1; +- int height = -1; +- int name_len; +- int i; +- char_u c; +- +- for (i = 0; i < 39;) +- { +- c = fullname[i]; +- if (c == ':' || c == NUL || c == '.') +- break; +- font[i++] = c; +- } +- +- /* find the first modifier, NULL if none */ +- arg = strchr(fullname + i, ':'); +- +- while (arg) +- { +- switch (*++arg) +- { +- case 'h': +- height = strtol(arg + 1, (char **) &arg, 10); +- break; +- case 'w': +- width = strtol(arg + 1, (char **) &arg, 10); +- break; +- case 'b': +- weight |= 1; +- break; +- case 'i': +- weight |= 2; +- break; +- default: +- return 0; +- } +- arg = strchr(arg, ':'); +- } +- +- if ((weight & 1) && i < 35) +- { +- /* Bold goes instead of given suffix */ +- strncpy(font + i, ".Bold", 5); +- i += 5; +- } +- else +- { +- /* Copy rest of name unless we are using Bold */ +- while (i < 39) +- { +- c = fullname[i]; +- if (c == ':' || c == NUL) +- break; +- font[i++] = c; +- } +- } +- if ((weight & 2) && i < 32) +- { +- strncpy(font + i, ".Oblique", 8); +- i += 8; +- } +- +- font[i] = 0; +- +- if (height < 1 && width < 1) +- height = width = 10; /* Default to 10pt */ +- else if (height < 1) +- height = width; +- else if (width < 1) +- width = height; +- +- if (xswi(Font_FindFont, 0, font, width << 4, height << 4, 0, 0) & v_flag) +- return NOFONT; /* Can't find font */ +- +- return r0; +- } +- +- /* Load a file into allocated memory and check it is valid. +- * Return a pointer to the allocated block on success. +- */ +- char * +- zap_load_file(name, style) +- char_u *name; /* Name of directory containing styles */ +- char_u *style; /* Name of style within directory */ +- { +- char_u fname[256]; +- char_u *file; +- +- if (strlen(name) + strlen(style) > 254) +- return NULL; /* Names too long */ +- +- sprintf(fname, "%s.%s", name, style); +- +- /* Load the named font in 1bpp format. */ +- if (xswi(OS_File, 13, fname, 0, 0, "VimFonts:") & v_flag || r0 != 1) +- return NULL; /* Error reading file info, or not a file */ +- +- /* Allocate enough memory to load the whole file */ +- file = (char *) alloc(r4); +- if (!file) +- return NULL; /* Out of memory */ +- +- if (xswi(OS_File, 12, fname, file, 0, "VimFonts:") & v_flag) +- return NULL; /* Unable to load file */ +- +- if (strncmp(file, "ZapFont\015", 8) == 0) +- return file; /* Loaded OK! */ +- +- vim_free(file); +- return NULL; /* Not a valid font file */ +- } +- +- /* Load and convert the named font. +- * If name is NULL or a null string then convert the system font. +- * Return OK on success; FAIL and we revert to using the VDU drivers. +- * +- * 'name' is the name of a directory. +- * Tries to load 'name.0', 'name.B', 'name.I' and 'name.IB'. +- */ +- int +- zap_load_font(name) +- char_u *name; +- { +- int i; +- +- /* Free the existing font files, if any */ +- for (i = 0; i < ZAP_STYLES; i++) +- { +- vim_free(zap_file[i]); +- zap_file[i] = NULL; +- } +- +- if (name && *name == '!') +- { +- name++; +- double_height = TRUE; +- } +- else +- double_height = FALSE; +- +- if (name && *name) +- { +- zap_file[ZAP_NORMAL] = zap_load_file(name, "0"); +- if (!zap_file[ZAP_NORMAL]) +- return FAIL; /* Can't load the 'normal' style - error */ +- +- zap_file[ZAP_BOLD] = zap_load_file(name, "B"); +- zap_file[ZAP_ITALIC] = zap_load_file(name, "I"); +- zap_file[ZAP_BITALIC] = zap_load_file(name, "IB"); +- } +- else +- { +- int *header; +- char workarea[16]; +- char *old_wa; +- +- /* Allocate memory for system font (8 x 8 x 256 bits, plus header) */ +- header = (int *) alloc(0x20 + 8 * 256); +- if (header == NULL) +- return FAIL; +- zap_file[ZAP_NORMAL] = (char *) header; +- +- /* Store details about the system font */ +- header[2] = 8; /* Width */ +- header[3] = 8; /* Height */ +- header[4] = 0; /* First char */ +- header[5] = 255; /* Last char */ +- header[6] = header[7] = 0; /* Reserved */ +- +- /* Get system font bitmap */ +- old_wa = zap_redraw_block.r_workarea; +- zap_redraw_block.r_workarea = workarea; +- swi(ZapRedraw_ReadSystemChars, zap_file[ZAP_NORMAL] + 0x20, &zap_redraw_block); +- zap_redraw_block.r_workarea = old_wa; +- } +- +- return ro_zap_redraw_initialise(); +- } +- +- /* +- * Initialise vim to use the font with the given name. +- * Return FAIL if the font could not be loaded, OK otherwise. +- */ +- int +- gui_mch_init_font(char_u *font_name, int fontset) +- { +- int new_handle = 0; /* Use the system font by default */ +- +- if (font_name[0] == '!') +- { +- /* Select a ZapRedraw font */ +- if (zap_load_font(font_name + 1)) +- zap_redraw = TRUE; +- else +- { +- EMSG2(_("E610: Can't load Zap font '%s'"), font_name); +- font_name = "System"; /* Error - use system font */ +- zap_redraw = FALSE; +- } +- } +- else +- { +- zap_redraw = FALSE; +- +- if (font_name) +- { +- /* Extract any extra details about the font */ +- new_handle = ro_get_font(font_name, 0); +- if (!new_handle) +- return FAIL; +- } +- else +- font_name = "System"; +- } +- +- /* Free the previous font, if any */ +- gui_mch_free_font(gui.norm_font); +- gui.norm_font = new_handle; +- gui.char_ascent = 0; +- +- if (new_handle) +- { +- /* Read details about the chosen font */ +- swi(Font_ReadInfo, new_handle); +- +- gui.char_width = r3 - r1; +- gui.char_height = r4 - r2; +- +- font_x_offset = -r1; /* Where to position each char in its box */ +- font_y_offset = -r4; +- +- /* Try to load other fonts for bold, italic, and bold-italic */ +- gui_mch_free_font(gui.bold_font); +- gui.bold_font = ro_get_font(font_name, 1); +- gui_mch_free_font(gui.ital_font); +- gui.ital_font = ro_get_font(font_name, 2); +- gui_mch_free_font(gui.boldital_font); +- gui.boldital_font = ro_get_font(font_name, 3); +- } +- else +- { +- /* Use the system font or ZapRedraw. */ +- if (zap_redraw) +- { +- gui.char_width = zap_redraw_block.r_charw << zap_redraw_block.r_magx; +- gui.char_height = zap_redraw_block.r_charh << zap_redraw_block.r_magy; +- if (double_height) +- gui.char_height <<= 1; +- } +- else +- { +- gui.char_width = 16; +- gui.char_height = 32; +- } +- +- gui_mch_free_font(gui.bold_font); +- gui.bold_font = 0; +- gui_mch_free_font(gui.ital_font); +- gui.ital_font = 0; +- gui_mch_free_font(gui.boldital_font); +- gui.boldital_font = 0; +- } +- hl_set_font_name(font_name); +- +- must_redraw = CLEAR; +- return OK; +- } +- +- /* +- * Adjust gui.char_height (after 'linespace' was changed). +- */ +- int +- gui_mch_adjust_charheight() +- { +- return FAIL; +- } +- +- /* +- * Get a font structure for highlighting. +- */ +- GuiFont +- gui_mch_get_font(name, giveErrorIfMissing) +- char_u *name; +- int giveErrorIfMissing; +- { +- int handle; +- +- if (!name) +- return NOFONT; /* System font if no name */ +- +- handle = ro_get_font(name, 0); +- if (!handle) +- { +- if (giveErrorIfMissing) +- EMSG2(_("E611: Can't use font %s"), name); +- return NOFONT; +- } +- +- return handle; +- } +- +- #if defined(FEAT_EVAL) || defined(PROTO) +- /* +- * Return the name of font "font" in allocated memory. +- * Don't know how to get the actual name, thus use the provided name. +- */ +- char_u * +- gui_mch_get_fontname(font, name) +- GuiFont font; +- char_u *name; +- { +- if (name == NULL) +- return NULL; +- return vim_strsave(name); +- } +- #endif +- +- /* +- * Set the current text font. +- */ +- void +- gui_mch_set_font(GuiFont font) +- { +- ro_current_font = font; +- +- if (font) +- { +- /* Not the system font or ZapRedraw font - select it */ +- swi(Font_SetFont, font); +- } +- } +- +- /* +- * If a font is not going to be used, free its structure. +- */ +- void +- gui_mch_free_font(GuiFont font) +- { +- if (font) +- swi(Font_LoseFont, font); +- } +- +- /* +- * Return the Pixel value (colour) for the given colour name. +- * Return INVALCOLOR for error. +- * NB: I've changed Green for now, since it looked really sick +- */ +- guicolor_T +- gui_mch_get_color(char_u *name) +- { +- int i; +- struct colour +- { +- char_u *name; +- guicolor_T value; +- } colours[] = +- { +- { "Red", grgb(255, 0, 0) }, +- { "LightRed", grgb(255, 0, 0) }, +- { "DarkRed", grgb(139, 0, 0) }, +- +- { "Green", grgb(50, 200, 50) }, +- { "LightGreen", grgb(144, 238, 144) }, +- { "DarkGreen", grgb(0, 100, 0) }, +- { "SeaGreen", grgb(46, 139, 87) }, +- +- { "Blue", grgb(0, 0, 255) }, +- { "LightBlue", grgb(173, 216, 230) }, +- { "DarkBlue", grgb(0, 0, 139) }, +- { "SlateBlue", grgb(160, 90, 205) }, +- +- { "Cyan", grgb(0, 255, 255) }, +- { "LightCyan", grgb(224, 255, 255) }, +- { "DarkCyan", grgb(0, 139, 139) }, +- +- { "Magenta", grgb(255, 0, 255) }, +- { "LightMagenta", grgb(255, 224, 255) }, +- { "DarkMagenta", grgb(139, 0, 139) }, +- +- { "Yellow", grgb(255, 255, 0) }, +- { "LightYellow", grgb(255, 255, 224) }, +- { "DarkYellow", grgb(139, 139, 0) }, +- { "Brown", grgb(165, 42, 42) }, +- +- { "Gray", grgb(190, 190, 190) }, +- { "Grey", grgb(190, 190, 190) }, +- { "LightGray", grgb(211, 211, 211) }, +- { "LightGrey", grgb(211, 211, 211) }, +- { "DarkGray", grgb(169, 169, 169) }, +- { "DarkGrey", grgb(169, 169, 169) }, +- { "Gray10", grgb(26, 26, 26) }, +- { "Grey10", grgb(26, 26, 26) }, +- { "Gray20", grgb(51, 51, 51) }, +- { "Grey20", grgb(51, 51, 51) }, +- { "Gray30", grgb(77, 77, 77) }, +- { "Grey30", grgb(77, 77, 77) }, +- { "Gray40", grgb(102, 102, 102) }, +- { "Grey40", grgb(102, 102, 102) }, +- { "Gray50", grgb(127, 127, 127) }, +- { "Grey50", grgb(127, 127, 127) }, +- { "Gray60", grgb(153, 153, 153) }, +- { "Grey60", grgb(153, 153, 153) }, +- { "Gray70", grgb(179, 179, 179) }, +- { "Grey70", grgb(179, 179, 179) }, +- { "Gray80", grgb(204, 204, 204) }, +- { "Grey80", grgb(204, 204, 204) }, +- { "Gray90", grgb(229, 229, 229) }, +- { "Grey90", grgb(229, 229, 229) }, +- +- { "Black", grgb(0, 0, 0) }, +- { "White", grgb(255, 255, 255) }, +- +- { "Orange", grgb(255, 165, 0) }, +- { "Purple", grgb(160, 32, 240) }, +- { "Violet", grgb(238, 130, 238) }, +- {NULL, 0} +- }; +- +- if (name[0] == '#') +- { +- char *end; +- int c; +- +- c = strtol(name + 1, &end, 16); +- return (guicolor_T) ((c >> 16) & 0xff) | (c & 0xff00) | ((c & 0xff) << 16); +- } +- +- for (i = 0; colours[i].name != NULL; i++) +- { +- if (STRICMP(name, colours[i].name) == 0) +- return colours[i].value; +- } +- if (strnicmp(name, "grey", 4) == 0 || strnicmp(name, "gray", 4) == 0) +- { +- int level = (255 * atoi(name + 4)) / 100; +- return (guicolor_T) grgb(level, level, level); +- } +- return INVALCOLOR; +- } +- +- /* +- * Set the current text colours. +- * If we are using fonts then set the antialiasing colours too. +- */ +- void +- gui_mch_set_colors(guicolor_T fg, guicolor_T bg) +- { +- zap_redraw_colours[0] = bg << 8; /* JK230798, register new background colour */ +- zap_redraw_colours[1] = fg << 8; /* JK230798, register new foreground colour */ +- zap_redraw_update_colours = TRUE; /* JK230798, need update of colour masks */ +- +- swi(ColourTrans_ReturnGCOL, fg << 8); +- gui.fg_colour = r0; +- swi(ColourTrans_ReturnGCOL, bg << 8); +- gui.bg_colour = r0; +- +- if (ro_current_font) +- swi(ColourTrans_SetFontColours, 0, bg << 8, fg << 8, 14); +- } +- +- void +- ro_draw_string(x, y, s, len, flags, clip) +- int x; /* Top-left coord to plot at (x incl, y excl) */ +- int y; /* (screen coords) */ +- char_u *s; /* String to plot */ +- int len; /* Length of string */ +- int flags; /* DRAW_TRANSP, DRAW_BOLD, DRAW_UNDERL */ +- int* clip; /* JK230798, added clip window */ +- { +- if (ro_current_font) +- { +- int fx; +- int flen = len; /* Preserve for underline */ +- +- /* Use the Font manager to paint the string. +- * Must do one char at a time to get monospacing. +- */ +- +- if (flags & DRAW_ITALIC && !gui.ital_font) +- flags |= DRAW_UNDERL; /* No italic - underline instead */ +- +- if ((flags & DRAW_TRANSP) == 0) +- { +- swi(ColourTrans_SetColour, gui.bg_colour, 0, 0, 0, 0); +- swi(OS_Plot, 4, x, y - gui.char_height); +- swi(OS_Plot, 96 + 5, x + len * gui.char_width - 1, y - 1); +- } +- +- fx = x + font_x_offset; +- while (flen--) +- { +- swi(Font_Paint, 0, s++, 0x90, fx, y + font_y_offset, 0, 0, 1); +- fx += gui.char_width; +- } +- } +- else +- { +- if (zap_redraw) +- { +- /* Using fast Zap redraw. */ +- flags = ro_zap_redraw_draw_string(x, y, s, len, flags, clip); +- } +- else +- { +- /* Using the system font */ +- if (flags & DRAW_ITALIC) +- flags |= DRAW_UNDERL; +- +- if ((flags & DRAW_TRANSP) == 0) +- { +- swi(ColourTrans_SetColour, gui.bg_colour, 0, 0, 0, 0); +- swi(OS_Plot, 4, x, y - gui.char_height); +- swi(OS_Plot, 96 + 5, x + len * gui.char_width - 1, y - 1); +- } +- swi(OS_Plot, 4, /* Move the drawing cursor */ +- x, +- y - 1); +- swi(ColourTrans_SetColour, gui.fg_colour, 0, 0, 0, 0); +- swi(OS_WriteN, s, len); +- +- if (flags & DRAW_BOLD) +- { +- swi(OS_Plot, 4, x + (1 << x_eigen_factor), y - 1); +- swi(OS_WriteN, s, len); +- } +- } +- } +- +- if (flags & DRAW_UNDERL) +- { +- if (ro_current_font || zap_redraw) +- swi(ColourTrans_SetColour, gui.fg_colour, 0, 0, 0, 0); +- /* Underlined is the same with all plotting methods */ +- swi(OS_Plot, 4, x, y - gui.char_height); +- swi(OS_Plot, 1, gui.char_width * len, 0); +- } +- } +- +- void +- gui_mch_draw_string(int row, int col, char_u *s, int len, int flags) +- { +- int x, y; /* Workarea x,y */ +- x = col * gui.char_width; +- y = -row * gui.char_height; +- +- if (redraw_block) +- { +- ro_draw_string(x + redraw_block[1], y + redraw_block[4], +- s, len, flags, &redraw_block[7]); /* JK230798, added clip window */ +- } +- else +- { +- int block[44]; +- block[0] = gui.window_handle; +- block[1] = x; +- block[2] = y - gui.char_height; +- block[3] = (col + len) * gui.char_width; +- block[4] = y; +- swi(Wimp_UpdateWindow, 0, block); +- while (r0) +- { +- ro_draw_string(x + block[1], y + block[4], +- s, len, flags, &block[7]); /* JK230798, added clip window */ +- swi(Wimp_GetRectangle, 0, block); +- } +- } +- } +- +- /* +- * Return OK if the key with the termcap name "name" is supported. +- */ +- int +- gui_mch_haskey(char_u *name) +- { +- return FAIL; +- } +- +- void +- gui_mch_beep(void) +- { +- swi(OS_WriteI + 7); +- } +- +- /* +- * Visual bell. +- */ +- void +- gui_mch_flash(int msec) +- { +- /* TODO */ +- } +- +- +- /* +- * Plot a solid rectangle using the given plot action and colour. +- * Coordinates are inclusive and window-relative. +- */ +- void +- plot_rectangle(plot, colour, minx, miny, maxx, maxy) +- int plot; /* OS_Plot action */ +- int colour; +- int minx; +- int miny; +- int maxx; +- int maxy; +- { +- if (redraw_block) +- { +- swi(ColourTrans_SetColour, colour, 0, 0, 0, 0); +- swi(OS_Plot, 4, minx + redraw_block[1], miny + redraw_block[4]); +- swi(OS_Plot, plot, maxx + redraw_block[1], maxy + redraw_block[4]); +- } +- else +- { +- int block[44]; +- block[0] = gui.window_handle; +- block[1] = minx; +- block[2] = miny; +- block[3] = maxx + 1; +- block[4] = maxy + 1; +- swi(Wimp_UpdateWindow, 0, block); +- while (r0) +- { +- swi(ColourTrans_SetColour, colour, 0, 0, 0, 0); +- swi(OS_Plot, 4, minx + block[1], miny + block[4]); +- swi(OS_Plot, plot, maxx + block[1], maxy + block[4]); +- swi(Wimp_GetRectangle, 0, block); +- } +- } +- } +- +- /* +- * Invert a rectangle from row r, column c, for nr rows and nc columns. +- */ +- void +- gui_mch_invert_rectangle(int r, int c, int nr, int nc) +- { +- plot_rectangle(96 + 6, 0, FILL_X(c), -FILL_Y(r + nr), FILL_X(c + nc), -FILL_Y(r)); +- } +- +- /* +- * Iconify the GUI window. +- */ +- void +- gui_mch_iconify(void) +- { +- } +- +- #if defined(FEAT_EVAL) || defined(PROTO) +- /* +- * Bring the Vim window to the foreground. +- */ +- void +- gui_mch_set_foreground() +- { +- /* TODO */ +- } +- #endif +- +- /* Draw a hollow rectangle relative to the current +- * graphics cursor position, with the given width +- * and height. Start position is top-left. +- */ +- void +- draw_hollow(w, h) +- int w; +- int h; +- { +- swi(OS_Plot, 1, w - 1, 0); +- swi(OS_Plot, 1, 0, 1 - h); +- swi(OS_Plot, 1, 1 - w, 0); +- swi(OS_Plot, 1, 0, h - 1); +- } +- +- /* +- * Draw a cursor without focus. +- */ +- void +- gui_mch_draw_hollow_cursor(guicolor_T colour) +- { +- int x = FILL_X(gui.cursor_col); /* Window relative, top-left */ +- int y = -FILL_Y(gui.cursor_row); +- if (redraw_block == NULL) +- { +- int block[11]; +- +- block[0] = gui.window_handle; +- block[1] = x; +- block[2] = y - gui.char_height; +- block[3] = x + gui.char_width; +- block[4] = y; +- swi(Wimp_UpdateWindow, 0, block); +- while (r0) +- { +- swi(ColourTrans_SetGCOL, colour << 8, 0, 0, 0, 0); +- +- swi(OS_Plot, 4, x + block[1], y + block[4] - 1); +- draw_hollow(gui.char_width, gui.char_height); +- +- swi(Wimp_GetRectangle, 0, block); +- } +- } +- else +- { +- swi(ColourTrans_SetGCOL, colour << 8, 0, 0, 0, 0); +- +- swi(OS_Plot, 4, x + redraw_block[1], y + redraw_block[4] - 1); +- draw_hollow(gui.char_width, gui.char_height); +- } +- } +- +- /* +- * Draw part of a cursor, "w" pixels wide, and "h" pixels high, using +- * color "color". +- */ +- void +- gui_mch_draw_part_cursor(w, h, colour) +- int w; +- int h; +- guicolor_T colour; +- { +- int x = FILL_X(gui.cursor_col); +- int y = -FILL_Y(gui.cursor_row); +- swi(ColourTrans_ReturnGCOL, colour << 8); +- plot_rectangle(96 + 5, r0, x, y - h, x + w - 1, y - 1); +- } +- +- /* +- * Catch up with any queued events. This may put keyboard input into the +- * input buffer, call resize call-backs, trigger timers etc. +- * If there is nothing in the event queue(& no timers pending), then we return +- * immediately (well, after a Wimp_Poll). +- */ +- void +- gui_mch_update(void) +- { +- int block[64]; +- int reason; +- +- swi(OS_ReadMonotonicTime); +- if ((r0 - time_of_last_poll) < 50) +- return; /* Don't return too often */ +- +- reason = wimp_poll(0, block); +- if (reason) +- process_event(reason, block); +- ro_return_early = FALSE; /* We're returning anyway. */ +- } +- +- void +- redraw_window(block) +- int *block; +- { +- int x, y; /* Vim workarea coords */ +- int width, height; +- int blank_col; +- +- swi(ColourTrans_ReturnGCOL, UNUSED_COLOUR << 8, 0, 0, 1<<7, 0); +- blank_col = r0; +- +- swi(Wimp_RedrawWindow, 0, block); +- redraw_block = block; +- while (r0) +- { +- x = block[7] - block[1]; +- y = block[4] - block[10]; +- width = block[9] - block[7]; +- height = block[10] - block[8]; +- +- if (height + y > Rows * gui.char_height) +- { +- /* Blank everything off the bottom. */ +- plot_rectangle(96 + 5, blank_col, +- 0, block[8] - block[4], +- block[9] - block[1], -FILL_Y(Rows) - 1); +- height = Rows * gui.char_height; +- } +- if (width + x> Columns * gui.char_width) +- { +- /* Blank everything off to the right. */ +- plot_rectangle(96 + 5, blank_col, +- FILL_X(Columns), block[8] - block[4], +- block[9] - block[1], 0); +- width = Columns * gui.char_width; +- } +- gui_redraw(x , y, width, height); +- swi(Wimp_GetRectangle, 0, block); +- } +- redraw_block = NULL; +- } +- +- /* Check if we have modified data. +- * If we do then ack the message to stop the shutdown. +- * Otherwise, ignore the message. +- */ +- void +- ro_prequit(block) +- int *block; +- { +- if (!ro_ok_to_quit()) +- { +- /* Not OK to quit - stop shutdown */ +- block[3] = block[2]; +- swi(Wimp_SendMessage, 19, block, block[1]); +- } +- /* Do nothing. We may get a Message_Quit later. */ +- } +- +- /* If there is unsaved data then ask the user if they mind losing it. +- * Return TRUE if we can quit without saving, FALSE to halt the +- * shutdown. +- */ +- int +- ro_ok_to_quit() +- { +- int old_confirm = cmdmod.confirm; +- +- cmdmod.confirm = FALSE; /* Use our own, single tasking, box */ +- +- if (check_changed_any(FALSE)) +- { +- swi(Wimp_ReportError, +- "\0\0\0\0Vim contains unsaved data - quit anyway?", +- 0x17, +- "Vim"); +- cmdmod.confirm = old_confirm; +- if (r1 != 1) +- return FALSE; +- } +- cmdmod.confirm = old_confirm; +- return TRUE; +- } +- +- /* Quit without checking for unsaved data. */ +- void +- ro_quit() +- { +- exiting = TRUE; +- getout(0); +- +- exiting = FALSE; /* probably can't get here */ +- setcursor(); /* position cursor */ +- out_flush(); +- } +- +- /* Insent the given vim special code into the input buffer */ +- void +- ro_press(a, b, modifier) +- char a; +- char b; +- int modifier; /* % 0000 0000 */ +- { +- char_u buf[6]; +- int vim_mod; +- int key; +- +- +- /* Convert RISC OS modifier to Vim modifier. */ +- vim_mod = ((modifier & 0x10) ? MOD_MASK_SHIFT : 0) +- | ((modifier & 0x20) ? MOD_MASK_CTRL : 0); +- key = simplify_key(TERMCAP2KEY(a, b), &vim_mod); +- +- buf[3] = CSI; +- buf[4] = KEY2TERMCAP0(key); +- buf[5] = KEY2TERMCAP1(key); +- if (vim_mod) +- { +- buf[0] = CSI; +- buf[1] = KS_MODIFIER; +- buf[2] = vim_mod; +- add_to_input_buf(buf, 6); +- } +- else +- add_to_input_buf(buf + 3, 3); +- } +- +- /* Take a wimp key code and insert the vim equivalent +- * into vim's input buffer. +- * CTRL-C also sets got_int. +- */ +- void +- ro_insert_key(code) +- char_u *code; /* Wimp_ProcessKey code (4 bytes) */ +- { +- char a = code[0]; +- char b = code[1]; +- int base, modifier; +- +- if (a == 3 && ctrl_c_interrupts) +- got_int = TRUE; +- +- /* Is it a normal key? */ +- if (a > 31 && a < 127) +- { +- add_to_input_buf(code, 1); +- return; +- } +- +- /* We should pass any unrecognised keys on, but +- * for now just pass on F12 combinations. +- */ +- switch (b) +- { +- case 0: +- /* Home and Delete are the only special cases */ +- switch (a) +- { +- case 0x1e: +- ro_press('k','h', 0); /* Home */ +- return; +- case 0x7f: +- ro_press('k','D', 0); /* Delete */ +- return; +- case CSI: +- { +- /* Turn CSI into K_CSI. Untested! */ +- char_u string[3] = {CSI, KS_EXTRA, KE_CSI}; +- +- add_to_input_buf(string, 3); +- return; +- } +- default: +- add_to_input_buf(code, 1); +- return; +- } +- case 1: +- if ((a & 0xcf) == 0xcc) +- { +- /* F12 pressed - pass it on (quick hack) */ +- swi(Wimp_ProcessKey, a | 0x100); +- return; +- } +- base = a & 0xcf; +- modifier = a & 0x30; +- switch (base) +- { +- case 0x8a: /* Tab */ +- add_to_input_buf("\011", 1); +- return; +- case 0x8b: /* Copy (End) */ +- return ro_press('@', '7', modifier); +- case 0x8c: /* Left */ +- return ro_press('k', 'l', modifier); +- case 0x8d: /* Right */ +- return ro_press('k', 'r', modifier); +- case 0x8e: /* Down */ +- if (modifier & 0x10) +- return ro_press('k', 'N', modifier ^ 0x10); +- else +- return ro_press('k', 'd', modifier); +- case 0x8f: /* Up */ +- if (modifier & 0x10) +- return ro_press('k', 'P', modifier ^ 0x10); +- else +- return ro_press('k', 'u', modifier); +- case 0xca: /* F10 */ +- return ro_press('k', ';', modifier); +- case 0xcb: /* F11 */ +- return ro_press('F', '1', modifier); +- case 0xcd: /* Insert */ +- return ro_press('k', 'I', modifier); +- default: +- if (base > 0x80 && base < 0x18a) +- { +- /* One of the other function keys */ +- return ro_press('k', '0' + (base & 15), modifier); +- } +- } +- } +- } +- +- /* Process a mouse event. */ +- void +- ro_mouse(block) +- int *block; +- { +- int x, y, button, vim_button; +- int modifiers = 0; +- int min_x, min_y; /* Visible area of editor window */ +- int max_x, max_y; +- +- if (block[3] != gui.window_handle || ro_dragging) +- return; /* Not our window or ignoring clicks*/ +- +- x = block[0]; /* Click position - screen coords */ +- y = block[1]; +- button = block[2]; +- +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- min_x = block[1]; +- min_y = block[2]; +- max_x = block[3]; +- max_y = block[4]; +- +- if (block[3] - x < gui.scrollbar_width) +- { +- /* Click in that blank area under the scrollbars */ +- +- if (button & 0x444) +- { +- int front_block[64]; +- /* Dragging with Select - bring window to front first */ +- front_block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, front_block); +- front_block[7] = -1; +- ro_open_main(front_block); +- } +- +- block[0] = gui.window_handle; +- block[1] = 7; /* Drag point */ +- block[2] = block[4] = 0; /* Coords of point. */ +- block[3] = block[5] = 0; +- drag_x_offset = max_x - x; +- drag_y_offset = min_y - y; +- +- /* Parent box. */ +- block[6] = min_x + +- gui.scrollbar_width * 2 + +- MIN_COLUMNS * gui.char_width; +- block[7] = 0; +- gui_mch_get_screen_dimensions(&block[8], &block[9]); +- block[9] = max_y - +- 4 * gui.char_height - +- gui.scrollbar_height; +- +- swi(Wimp_DragBox, 0, block); +- ro_dragging = DRAG_RESIZE_WINDOW; +- drag_button = vim_button; +- drag_modifiers = modifiers; +- return; +- } +- +- if (button & 0x111) +- vim_button = MOUSE_RIGHT; +- else if (button & 0x222) +- vim_button = MOUSE_MIDDLE; +- else +- vim_button = MOUSE_LEFT; +- +- swi(OS_Byte, 121, 0x80); +- if (r1 == 0xff) +- modifiers |= MOUSE_SHIFT; +- swi(OS_Byte, 121, 0x81); +- if (r1 == 0xff) +- modifiers |= MOUSE_CTRL; +- swi(OS_Byte, 121, 0x82); +- if (r1 == 0xff) +- modifiers |= MOUSE_ALT; +- +- if (button == 2) +- { +- /* Menu click: +- * If shift was pressed then do the paste action. +- * If not, then open the pop-up menu. +- */ +- modifiers ^= MOUSE_SHIFT; +- if (modifiers && MOUSE_SHIFT) +- { +- vimmenu_T main; +- /* Shift was NOT pressed - show menu */ +- main.dname = (char_u *) "Vim"; +- main.children = root_menu; +- gui_mch_show_popupmenu(&main); +- return; +- } +- } +- +- /* Gain the input focus */ +- swi(Wimp_SetCaretPosition, gui.window_handle, -1, 0, 0, -1, -1); +- +- if (button & 0xf0) +- { +- /* Drag operation: +- * +- * Tell the Wimp to start a drag. +- * Monitor null events. +- */ +- block[1] = 7; /* Drag a point. */ +- block[2] = block[4] = x; /* Coords of point. */ +- block[3] = block[5] = y; +- block[6] = 0; /* Coords of bounding box. */ +- block[7] = 0; +- gui_mch_get_screen_dimensions(&block[8], &block[9]); +- +- drag_x_offset = drag_y_offset = 0; +- +- swi(Wimp_DragBox, 0, block); +- ro_dragging = DRAG_SELECTION; +- drag_button = vim_button; +- drag_modifiers = modifiers; +- +- vim_button |= MOUSE_DRAG; +- } +- +- gui_send_mouse_event( +- vim_button, +- x - min_x, +- max_y - y, +- button & 0xf ? TRUE : FALSE, /* dclick */ +- modifiers); +- } +- +- void +- ro_continue_drag(block) +- int *block; /* Just used as scrap. */ +- { +- int x, y; +- +- /* Get screen coords of pointer. */ +- swi(Wimp_GetPointerInfo, 0, block); +- x = block[0] + drag_x_offset; +- y = block[1] + drag_y_offset; +- +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- +- if (ro_dragging == DRAG_RESIZE_WINDOW) +- { +- /* Resizing the main window. */ +- block[2] = y; +- block[3] = x; +- ro_open_main(block); +- } +- else +- { +- /* Selecting some text. */ +- gui_send_mouse_event( +- drag_button | MOUSE_DRAG, /* Always report the same button */ +- x - block[1], +- block[4] - y, +- FALSE, /* Not a double click. */ +- drag_modifiers); +- } +- } +- +- /* User has released all mouse buttons, marking the end of a drag. */ +- void +- ro_drag_finished(block) +- int *block; +- { +- int x; +- int y; +- int width, height; +- +- /* I don't trust the box returned by Wimp_Poll; look at the pointer +- * ourselves. +- */ +- swi(Wimp_GetPointerInfo, 0, block); +- x = block[0] + drag_x_offset; +- y = block[1] + drag_y_offset; +- +- if (ro_dragging == DRAG_RESIZE_WINDOW) +- { +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- block[2] = y; +- block[3] = x; +- ro_open_main(block); +- +- width = (block[3] - block[1]); +- height = (block[4] - block[2]); +- +- swi(Wimp_ForceRedraw, gui.window_handle, 0, -height, width, 0); +- gui_resize_shell(width, height); +- } +- else +- { +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- gui_send_mouse_event( +- MOUSE_RELEASE, +- x - block[1], +- block[4] - y, +- FALSE, /* not a double click */ +- drag_modifiers); +- } +- ro_dragging = DRAG_FALSE; +- } +- +- /* Load the file/pathname given in block into a [new] buffer. +- * +- * Modifier Action +- * +- * None :confirm e +- * Ctrl :sp +- * Shift +- * +- * Insert into typebuf, at the start. +- * If loading from !Scrap then use saved leafname instead, and +- * delete the scrap file. Also, ignore shift key. +- * +- * NB: Doesn't send DataLoadAck (other app might delete temp file?). +- */ +- void +- ro_dataload(block) +- int *block; +- { +- char_u new_path[MAXPATHL]; +- char_u *path = ((char_u *) block) + 44; +- int scrap = FALSE; +- +- if (block[3] == leaf_ref && leaf_name) +- scrap = TRUE; +- +- switch (get_real_state() & 0xff) +- { +- case INSERT: +- case CMDLINE: +- case CMDLINE+LANGMAP: +- /* For insert mode we can only insert the pathname (currently) +- * Make sure Shift is pressed. +- */ +- swi(OS_Byte, 121, 0x80); /* Is Shift pressed? */ +- if (r1 == 0xff) +- { +- ins_typebuf(" ", REMAP_NONE, 0, TRUE, FALSE); +- ins_typebuf(path, REMAP_NONE, 0, TRUE, FALSE); +- ro_return_early = TRUE; /* Return even though nothing was typed. */ +- } +- else +- swi(Wimp_ReportError, +- "\0\0\0\0Sorry, you can only load text in normal mode", 5, "Vim"); +- break; +- +- case NORMAL: +- ro_return_early = TRUE; /* Return even though nothing was typed. */ +- +- if (scrap) /* Remove . Later. */ +- ins_typebuf(":!~remove \r", REMAP_NONE, 0, TRUE, FALSE); +- +- /* Insert {:sp ,:confirm e }[+f\ ] */ +- ins_typebuf("\r", REMAP_NONE, 0, TRUE, FALSE); +- ins_typebuf(path, REMAP_NONE, 0, TRUE, FALSE); +- ins_typebuf(" ", REMAP_NONE, 0, TRUE, FALSE); +- +- if (scrap) +- { +- /* Loading via !Scrap - change pathname to stored leafname */ +- ins_typebuf(leaf_name, REMAP_NONE, 0, TRUE, FALSE); +- ins_typebuf(" +f\\ ", REMAP_NONE, 0, TRUE, FALSE); +- leaf_ref = 0; +- vim_free(leaf_name); +- leaf_name = NULL; +- } +- +- swi(OS_Byte, 121, 0x81); /* Is Ctrl pressed? */ +- if (r1 == 0xff) +- /* Yes, split window */ +- ins_typebuf(":sp", REMAP_NONE, 0, TRUE, FALSE); +- else +- ins_typebuf(":confirm e", REMAP_NONE, 0, TRUE, FALSE); +- break; +- +- default: +- swi(Wimp_ReportError, "\0\0\0\0You can only load text in normal mode.", 5, "Vim"); +- } +- /* Send DataSaveAck so other program doesn't think we died +- * and delete . +- */ +- block[3] = block[2]; +- block[4] = 4; +- swi(Wimp_SendMessage, 17, block, block[1]); +- } +- +- void +- ro_datasave(block) +- int *block; +- { +- char_u *path = ((char_u *) block) + 44; +- +- /* Preserve the name given so we can use it, not */ +- if (leaf_name) +- vim_free(leaf_name); +- leaf_name = vim_strsave(path); +- +- block[9] = -1; /* File is unsafe. */ +- strcpy(path, ""); +- block[0] = 60; +- block[3] = block[2]; +- block[4] = 2; +- swi(Wimp_SendMessage, 17, block, block[1]); +- +- leaf_ref = block[2]; +- } +- +- void +- ro_message(block) +- int *block; +- { +- char_u *buffer; +- long_u len; +- +- if (block[1] == task_handle) +- return; /* Don't talk to ourself! */ +- switch (block[4]) +- { +- case 0: /* Quit. */ +- if (block[4] == 0) +- ro_quit(); +- break; +- case 1: /* DataSave */ +- ro_datasave(block); +- break; +- case 2: /* DataSaveAck. */ +- if (clip_convert_selection(&buffer, &len, &clip_star) == -1) +- return; +- +- /* Save the clipboard contents to a file. */ +- swi(OS_File, 10, ((char_u *) block) + 44, 0xfff, 0, buffer, buffer + len); +- +- /* Ack with DataLoad message. */ +- block[3] = block[2]; +- block[4] = 3; +- block[9] = len; +- swi(Wimp_SendMessage, 17, block, block[1]); +- +- vim_free(buffer); +- break; +- case 3: /* DataLoad */ +- ro_dataload(block); +- break; +- case 8: /* PreQuit */ +- ro_prequit(block); +- break; +- case 0xf: /* Lose clipboard. */ +- if (block[5] & 4) +- { +- clip_free_selection(&clip_star); +- clip_star.owned = FALSE; +- } +- break; +- case 0x10: /* DataRequest (clip_star) */ +- if (clip_star.owned) +- { +- int rows; +- +- /* Tell other program that we have the clipboard. */ +- block[0] = 52; +- block[3] = block[2]; /* Copy myref to yourref. */ +- block[4] = 1; /* DataSave message. */ +- /* Create an estimate for the size (larger or same as true +- * value) */ +- rows = clip_star.end.lnum - clip_star.start.lnum; +- if (rows < 0) +- rows = -rows; +- block[9] = (rows + 1) * Columns + 1; /* Add one for possible +- final newline. */ +- block[10] = 0xfff; /* Clipboard is text. */ +- strcpy( ((char_u *) block) + 44, "VimClip"); +- swi(Wimp_SendMessage, 17, block, block[1]); +- } +- break; +- case 0x400c1: /* Mode change */ +- changed_mode = TRUE; /* Flag - update on next OpenWindow */ +- if (zap_redraw) +- { +- /* JK230798, re-initialise ZapRedraw stuff */ +- if (ro_zap_redraw_initialise() == FAIL) +- zap_redraw = FALSE; +- } +- break; +- case 0x400c3: /* TaskCloseDown */ +- if (block[1] == child_handle) +- child_handle = 0; +- break; +- } +- } +- +- /* +- * Converts a scrollbar's window handle into a scrollbar pointer. +- * NULL on failure. +- */ +- scrollbar_T * +- ro_find_sbar(id) +- int id; +- { +- win_T *wp; +- +- if (gui.bottom_sbar.id == id) +- return &gui.bottom_sbar; +- FOR_ALL_WINDOWS(wp) +- { +- if (wp->w_scrollbars[SBAR_LEFT].id == id) +- return &wp->w_scrollbars[SBAR_LEFT]; +- if (wp->w_scrollbars[SBAR_RIGHT].id == id) +- return &wp->w_scrollbars[SBAR_RIGHT]; +- } +- return NULL; +- } +- +- void +- scroll_to(line, sb) +- int sb; /* Scrollbar number */ +- int line; +- { +- char_u code[8]; +- +- /* Don't put events in the input queue now. */ +- if (hold_gui_events) +- return; +- +- /* Send a scroll event: +- * +- * A scrollbar event is CSI (NOT K_SPECIAL), KS_VER_SCROLLBAR, +- * KE_FILLER followed by: +- * one byte representing the scrollbar number, and then four bytes +- * representing a long_u which is the new value of the scrollbar. +- */ +- code[0] = CSI; +- code[1] = KS_VER_SCROLLBAR; +- code[2] = KE_FILLER; +- code[3] = sb; +- code[4] = line >> 24; +- code[5] = line >> 16; +- code[6] = line >> 8; +- code[7] = line; +- add_to_input_buf(code, 8); +- } +- +- void +- h_scroll_to(col) +- int col; +- { +- char_u code[8]; +- +- /* Don't put events in the input queue now. */ +- if (hold_gui_events) +- return; +- +- /* Send a scroll event: +- * +- * A scrollbar event is CSI (NOT K_SPECIAL) +- * +- * A horizontal scrollbar event is K_SPECIAL, KS_HOR_SCROLLBAR, +- * KE_FILLER followed by four bytes representing a long_u which is the +- * new value of the scrollbar. +- */ +- code[0] = CSI; +- code[1] = KS_HOR_SCROLLBAR; +- code[2] = KE_FILLER; +- code[4] = col >> 24; +- code[5] = col >> 16; +- code[6] = col >> 8; +- code[7] = col; +- add_to_input_buf(code, 8); +- } +- +- void +- ro_scroll(block) +- int *block; +- { +- scrollbar_T *sb; +- int offset; +- win_T *wp; +- +- /* Block is ready for Wimp_OpenWindow, and also contains: +- * +- * +32 = scroll X direction (-2 .. +2) +- * +36 = scroll Y direction (-2 .. +2) +- */ +- +- sb = ro_find_sbar(block[0]); +- if (!sb) +- return; /* Window not found (error). */ +- +- wp = sb-> wp; +- +- if (wp == NULL) +- { +- /* Horizontal bar. */ +- offset = block[8]; +- if (offset == -2) +- offset = (block[1] - block[3]) / gui.char_width; +- else if (offset == 2) +- offset = (block[3] - block[1]) / gui.char_width; +- +- block[5] += offset * gui.char_width; +- +- gui_drag_scrollbar(sb, block[5] / gui.char_width, FALSE); +- +- swi(Wimp_OpenWindow, 0, block); +- } +- else +- { +- offset = -block[9]; +- if (offset == -2) +- offset = -(wp -> w_height - 1); +- else if (offset == 2) +- offset = wp -> w_height - 1; +- +- /* Possibly we should reposition the scrollbar? +- * Vim seems to update the bar anyway... +- */ +- gui_drag_scrollbar(sb, offset - (block[6] / gui.char_height), FALSE); +- } +- } +- +- /* Move a window by a given offset. Used to simulate the function of the +- * nested wimp. +- */ +- void +- ro_move_child(window, x, y, pos_wanted, pos_got) +- int window; +- int x,y; /* offset to move by */ +- int pos_wanted, pos_got; +- { +- int block[10]; +- +- block[0] = window; +- swi(Wimp_GetWindowState, 0, block); +- block[1] += x; +- block[2] += y; +- block[3] += x; +- block[4] += y; +- if (pos_wanted == -1) +- block[7] = -1; +- else if (pos_wanted == -2) +- block[7] = pos_got; +- swi(Wimp_OpenWindow, 0, block); +- } +- +- /* Open the main window. Also updates scrollbars if we are not +- * using the nested Wimp. +- * If we have just changed mode then re-read all values. +- */ +- void +- ro_open_main(block) +- int *block; +- { +- int toggle_size; +- +- /* Find out if the user clicked on the toggle size icon. */ +- block[20] = block[0]; +- swi(Wimp_GetWindowState, 0, block + 20); +- toggle_size = block[28] & (1 << 19); +- +- if (nested_wimp) +- { +- swi(Wimp_OpenWindow, 0, block); +- } +- else +- { +- int old[10]; +- int x_offset, y_offset; /* Move children same as parent. */ +- int pos_wanted, pos_got; +- int left_bar = gui.which_scrollbars[SBAR_LEFT]; +- int right_bar = gui.which_scrollbars[SBAR_RIGHT]; +- win_T *wp; +- +- /* Three cases to think about: +- * 1) Move to top. Open each window at the top. +- * 2) Same stack position. Open each with same position. +- * 3) Open at bottom. Open children with parent's new position. +- */ +- +- old[0] = block[0]; +- swi(Wimp_GetWindowState, 0, old); +- pos_wanted = block[7]; +- swi(Wimp_OpenWindow, 0, block); +- /* Block updated by OpenWindow? I don't think so! */ +- swi(Wimp_GetWindowState, 0, block); +- pos_got = block[7]; +- +- x_offset = block[1] - old[1]; +- y_offset = block[4] - old[4]; +- if (x_offset || y_offset || pos_wanted == -1 || pos_wanted == -2) +- { +- /* If parent has moved, re-open all the child windows. */ +- FOR_ALL_WINDOWS(wp) +- { +- /* Reopen scrollbars for this window. */ +- if (left_bar) +- ro_move_child(wp -> w_scrollbars[SBAR_LEFT].id, +- x_offset, y_offset, +- pos_wanted, pos_got); +- if (right_bar) +- ro_move_child(wp -> w_scrollbars[SBAR_RIGHT].id, +- x_offset, y_offset, +- pos_wanted, pos_got); +- } +- } +- } +- if (changed_mode || toggle_size) +- { +- int width, height; +- +- if (changed_mode) +- ro_measure_tools(); +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- +- width = block[3] - block[1]; +- height = block[4] - block[2]; +- swi(Wimp_ForceRedraw, gui.window_handle, 0, -height, width, 0); +- gui_resize_shell(width, height); +- changed_mode = FALSE; +- } +- } +- +- void +- ro_open_window(block) +- int *block; +- { +- int pos; +- scrollbar_T *sb; +- +- if (block[0] == gui.window_handle) +- ro_open_main(block); +- else +- { +- swi(Wimp_OpenWindow, 0, block); +- if (block[0] != gui.window_handle) +- { +- sb = ro_find_sbar(block[0]); +- if (sb) +- { +- if (sb-> wp != NULL) +- gui_drag_scrollbar(sb, -block[6] / gui.char_height, FALSE); +- else +- gui_drag_scrollbar(sb, block[5] / gui.char_width, FALSE); +- } +- } +- } +- } +- +- void +- ro_menu_selection(block) +- int *block; +- { +- int *item = wimp_menu + 7; +- vimmenu_T *menu; +- /* wimp_menu points to a wimp menu structure */ +- +- for (;;) +- { +- while (block[0]--) +- item += 6; +- if (block[1] == -1) +- break; +- item = ((int *) item[1]) + 7; +- block++; +- } +- /* item points to the wimp menu item structure chosen */ +- menu = (vimmenu_T *) item[5]; +- +- swi(Wimp_GetPointerInfo, 0, block); +- if (block[2] == 1) +- /* Adjust used - keep menu open */ +- swi(Wimp_CreateMenu, 0, wimp_menu); +- +- if (menu-> cb) +- menu-> cb(menu); +- } +- +- void +- ro_open_parent() +- { +- int head; +- char_u *i = curbuf-> b_ffname; +- char_u buffer[256]; +- +- head = 0; +- for (; *i; i++) +- { +- if (*i == '.') +- head = i - curbuf-> b_ffname; +- } +- +- /* Append head chars to buffer */ +- if (head < 240 && curbuf-> b_ffname && head) +- { +- strcpy(buffer, "%filer_opendir "); +- strncpy(buffer + 15, curbuf-> b_ffname, head); +- buffer[15 + head] = '\0'; +- swi(OS_CLI, buffer); +- } +- } +- +- void +- process_event(event, block) +- int event; +- int *block; +- { +- switch (event) +- { +- case 0: /* Nothing - update drag state. */ +- if (ro_dragging) +- ro_continue_drag(block); +- break; +- case 1: /* Redraw window. */ +- redraw_window(block); +- break; +- case 2: /* Open window. */ +- ro_open_window(block); +- break; +- case 3: /* Close window. */ +- swi(Wimp_GetPointerInfo, 0, block + 1); +- if (block[3] == 1) +- ro_open_parent(); +- else +- if (ro_ok_to_quit()) +- ro_quit(); +- break; +- case 6: /* Mouse click. */ +- ro_mouse(block); +- break; +- case 7: /* Finished drag. */ +- ro_drag_finished(block); +- break; +- case 8: /* Key pressed. */ +- ro_insert_key((char_u *) &block[6]); +- break; +- case 9: +- ro_menu_selection(block); +- break; +- case 10: /* Scroll request. */ +- ro_scroll(block); +- break; +- case 11: /* Lose caret. */ +- if (block[0] == gui.window_handle) +- gui_focus_change(FALSE); +- break; +- case 12: /* Gain caret. */ +- if (block[0] == gui.window_handle) +- gui_focus_change(TRUE); +- break; +- case 17: /* User message. */ +- case 18: /* User message recorded. */ +- ro_message(block); +- break; +- } +- } +- +- /* +- * GUI input routine called by gui_wait_for_chars(). Waits for a character +- * from the keyboard. +- * wtime == -1 Wait forever. +- * wtime == 0 This should never happen. +- * wtime > 0 Wait wtime milliseconds for a character. +- * Returns OK if a character was found to be available within the given time, +- * or FAIL otherwise. +- */ +- int +- gui_mch_wait_for_chars(long wtime) +- { +- int block[64]; +- int reason; +- int start_time = -1; +- int ctime = wtime / 10; /* delay in cs */ +- +- if (wtime != -1) +- { +- swi(OS_ReadMonotonicTime); +- start_time = r0; +- } +- +- for (;;) +- { +- if (ro_dragging) +- reason = wimp_poll(0, block); /* Always return immediately */ +- else if (wtime == -1) +- reason = wimp_poll(1, block); +- else +- reason = wimp_pollidle(0, block, start_time + ctime); +- +- process_event(reason, block); +- +- if (input_available() || ro_return_early) +- { +- ro_return_early = FALSE; +- return OK; /* There is something to process (key / menu event) */ +- } +- +- if (wtime != -1) +- { +- swi(OS_ReadMonotonicTime); +- if (r0 - start_time > ctime) +- return FAIL; /* We've been waiting too long - return failure */ +- } +- } +- } +- +- /* Flush any output to the screen */ +- void +- gui_mch_flush(void) +- { +- } +- +- /* +- * Clear a rectangular region of the screen from text pos(row1, col1) to +- * (row2, col2) inclusive. +- */ +- void +- gui_mch_clear_block(int row1, int col1, int row2, int col2) +- { +- swi(ColourTrans_ReturnGCOL, gui.back_pixel << 8, 0, 0, 1<<7, 0); +- plot_rectangle(96 + 5, r0, +- FILL_X(col1), -FILL_Y(row2 + 1), +- FILL_X(col2 + 1), -FILL_Y(row1)); +- } +- +- void +- gui_mch_clear_all(void) +- { +- if (redraw_block) +- { +- swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 1<<7, 0); +- swi(OS_WriteI + 16); +- } +- else +- { +- int block[44]; +- block[0] = gui.window_handle; +- block[1] = 0; +- block[2] = -gui.num_rows * gui.char_height; +- block[3] = gui.num_cols * gui.char_width; +- block[4] = 0; +- swi(Wimp_UpdateWindow, 0, block); +- while (r0) +- { +- swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 1<<7, 0); +- swi(OS_WriteI + 16); +- swi(Wimp_GetRectangle, 0, block); +- } +- } +- } +- +- /* +- * Delete the given number of lines from the given row, scrolling up any +- * text further down within the scroll region. +- */ +- void +- gui_mch_delete_lines(int row, int num_lines) +- { +- int top_from = -row - num_lines; +- int bot_from = -gui.scroll_region_bot - 1; +- int bot_to = bot_from + num_lines; +- +- swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 0x80, 0); +- +- /* Changed without checking! */ +- swi(Wimp_BlockCopy, gui.window_handle, +- gui.scroll_region_left * gui.char_width, +- bot_from * gui.char_height, +- (gui.scroll_region_right - gui.scroll_region_left +- + 1) * gui.char_width, +- top_from * gui.char_height, +- +- gui.scroll_region_left * gui.char_width, +- bot_to * gui.char_height); +- +- gui_clear_block(gui.scroll_region_bot - num_lines + 1, +- gui.scroll_region_left, +- gui.scroll_region_bot, gui.scroll_region_right); +- } +- +- /* +- * Insert the given number of lines before the given row, scrolling down any +- * following text within the scroll region. +- */ +- void +- gui_mch_insert_lines(int row, int num_lines) +- { +- int top_from = -row; +- int bot_to = -gui.scroll_region_bot - 1; +- int bot_from = bot_to + num_lines; +- +- swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 0x80, 0); +- +- swi(Wimp_BlockCopy, gui.window_handle, +- gui.scroll_region_left * gui.char_width, +- bot_from * gui.char_height, +- (gui.scroll_region_right - gui.scroll_region_left +- + 1) * gui.char_width, +- top_from * gui.char_height, +- +- gui.scroll_region_left * gui.char_width, +- bot_to * gui.char_height); +- +- gui_clear_block(row, gui.scroll_region_left, +- row + num_lines - 1, gui.scroll_region_right); +- } +- +- /* Put selection in clipboard buffer. +- * Should we become the new owner? +- */ +- void +- clip_mch_request_selection(VimClipboard *cbd) +- { +- int block[64]; /* Will be used in Wimp_Poll. */ +- int reason; +- char_u *buffer; +- long_u length; +- +- block[0] = 48; /* Size of block. */ +- block[3] = 0; /* Original message. */ +- block[4] = 0x10; /* Data request. */ +- block[5] = gui.window_handle; +- block[6] = RO_LOAD_CLIPBOARD; /* Internal handle. */ +- block[7] = block[8] = 0; /* (x,y) not used. */ +- block[9] = 4; +- block[10] = 0xfff; /* We want text files if possible, I think. */ +- block[11] = -1; /* End of list. */ +- swi(Wimp_SendMessage, 17, block, 0); /* Broadcast request. */ +- +- /* OK, we've sent the request. Poll until we get a null poll (failure) or +- * we load the clipboard. +- * If we receive a DataSave event with icon handle = -2 then put it on the +- * clipboard. RISC OS should ensure that key events will not be delivered +- * until the clipboard operation completes (unless the owner starts idling +- * - we can't wait forever!). +- */ +- for (;;) +- { +- reason = wimp_poll(0, block); +- if (reason == 0) +- return; /* Failed to get clipboard. */ +- if ((reason == 17 || reason == 18) && +- block[4] == 1 && block[6] == RO_LOAD_CLIPBOARD) +- break; /* Got it - stop waiting. */ +- process_event(reason, block); +- if (ro_return_early) +- return; +- } +- /* Tell owner to save data in . */ +- block[0] = 60; +- block[3] = block[2]; /* Copy myref -> yourref */ +- block[4] = 2; /* DataSaveAck. */ +- block[9] = -1; /* Data is unsafe. */ +- strcpy( ((char_u *) block) + 44, ""); +- swi(Wimp_SendMessage, 17, block, block[1]); +- +- /* Wait again for reply. */ +- for (;;) +- { +- reason = wimp_poll(0, block); +- if (reason == 0) +- return; /* Other program has given up! */ +- if ((reason == 17 || reason == 18) && block[4] == 3 && block[6] == RO_LOAD_CLIPBOARD) +- break; /* Clipboard data saved to */ +- process_event(reason, block); +- if (ro_return_early) +- return; +- } +- +- /* contains clipboard - load it. */ +- if (xswi(OS_File, 17, "") & v_flag) +- return; /* Error! */ +- if (r0 != 1 && r0 != 3) +- return; +- length = r4; +- +- buffer = lalloc(length, TRUE); /* Claim memory (and report errors). */ +- if (buffer == NULL) +- return; +- +- if (xswi(OS_File, 16, "", buffer, 0) & v_flag) +- return; +- +- clip_yank_selection(MCHAR, buffer, length, cbd); +- +- vim_free(buffer); +- +- swi(OS_FSControl, 27, "", 0, 0); /* Delete temp file. */ +- +- block[4] = 4; /* Send DataLoadAck. */ +- block[3] = block[2]; /* Copy myref -> yourref. */ +- swi(Wimp_SendMessage, 17, block, block[1]); +- } +- +- /* Not sure what this means under RISC OS. */ +- void +- clip_mch_lose_selection(VimClipboard *cbd) +- { +- } +- +- /* Tell everyone that we now own the clipboard. +- * Return OK if our claim is accepted (always, under RISC OS) +- */ +- int +- clip_mch_own_selection(VimClipboard *cbd) +- { +- int block[6]; +- block[0] = 24; /* Length of block. */ +- block[3] = 0; /* Original message. */ +- block[4] = 0xf; /* ClaimEntity. */ +- block[5] = 0x4; /* Claim clipboard only. */ +- swi(Wimp_SendMessage, 17, block, 0); +- return OK; +- } +- +- /* +- * Send the current selection to the clipboard. Do nothing for X because we +- * will fill in the selection only when requested by another app. Sounds good +- * for RISC OS too. +- */ +- void +- clip_mch_set_selection(VimClipboard *cbd) +- { +- clip_get_selection(cbd); +- } +- +- /* +- * Make a menu either grey or not grey. +- */ +- void +- gui_mch_menu_grey(vimmenu_T *menu, int grey) +- { +- menu-> greyed_out = grey; +- } +- +- /* +- * Make menu item hidden or not hidden +- */ +- void +- gui_mch_menu_hidden(vimmenu_T *menu, int hidden) +- { +- menu-> hidden = hidden; +- } +- +- /* +- * This is called after setting all the menus to grey/hidden or not. +- */ +- void +- gui_mch_draw_menubar(void) +- { +- swi(Wimp_CreateMenu, 0, -1); +- if (wimp_menu != (int *) -1) +- { +- ro_remove_menu(wimp_menu); +- wimp_menu = (int *) -1; +- } +- } +- +- /* Add or remove a scrollbar. Note that this is only called when +- * the scrollbar state is changing. +- * The scroll bar window has already been created. +- * We can't do anything except remove the scroll bar +- * until we know what size to use. +- */ +- void +- gui_mch_enable_scrollbar(sb, flag) +- scrollbar_T *sb; +- int flag; +- { +- if (!flag) +- swi(Wimp_CloseWindow, 0, & (sb->id) ); +- return; +- } +- +- void +- gui_mch_set_blinking(long waittime, long on, long off) +- { +- } +- +- /* +- * Stop the cursor blinking. Show the cursor if it wasn't shown. +- */ +- void +- gui_mch_stop_blink(void) +- { +- } +- +- /* +- * Start the cursor blinking. If it was already blinking, this restarts the +- * waiting time and shows the cursor. +- */ +- void +- gui_mch_start_blink(void) +- { +- } +- +- /* +- * Return the RGB value of a pixel as a long. +- */ +- long_u +- gui_mch_get_rgb(guicolor_T pixel) +- { +- return (long_u)pixel; +- } +- +- void +- gui_mch_set_text_area_pos(int x, int y, int w, int h) +- { +- } +- +- void +- gui_mch_enable_menu(int flag) +- { +- } +- +- void +- gui_mch_set_menu_pos(int x, int y, int w, int h) +- { +- } +- +- void +- gui_mch_add_menu(vimmenu_T *menu, int idx) +- { +- } +- +- void +- gui_mch_add_menu_item(vimmenu_T *menu, int idx) +- { +- } +- +- void +- gui_mch_new_menu_colors(void) +- { +- } +- +- void +- gui_mch_destroy_menu(vimmenu_T *menu) +- { +- } +- +- /* Size of buffer has changed. +- * Add one to max since gui.c subtracts one more than it should! +- */ +- void +- gui_mch_set_scrollbar_thumb(sb, val, size, max) +- scrollbar_T *sb; +- long val; +- long size; +- long max; +- { +- int block[10], width, height; +- +- width = (max + 1) * gui.char_width; +- height = (max + 1 + W_STATUS_HEIGHT(sb->wp)) * gui.char_height; +- +- block[0] = block[3] = 0; +- block[1] = -height + (1 << y_eigen_factor); +- block[2] = width; +- +- swi(Wimp_SetExtent, sb -> id, block); +- +- block[0] = sb -> id; +- swi(Wimp_GetWindowState, 0, block); +- block[5] = val * gui.char_width; +- block[6] = -val * gui.char_height; +- swi(Wimp_OpenWindow, 0, block, 0x4b534154, +- gui.window_handle, /* Parent window handle. */ +- (CHILD_FIX_TO_RIGHT << CHILD_LEFT ) | +- (CHILD_FIX_TO_RIGHT << CHILD_RIGHT ) | +- (CHILD_FIX_TO_BOTTOM << CHILD_TOP ) | +- (CHILD_FIX_TO_BOTTOM << CHILD_BOTTOM) | +- (CHILD_SELF_SCROLL << CHILD_SCROLL_X) | +- (CHILD_SELF_SCROLL << CHILD_SCROLL_Y) +- ); +- } +- +- /* Set the position of the scrollbar within the editor +- * window. Note that, for vertical scrollbars, x and w +- * are ignored. For horizontal bars y and h are ignored. +- */ +- void +- gui_mch_set_scrollbar_pos(sb, x, y, w, h) +- scrollbar_T *sb; +- int x; /* Horizontal sb position */ +- int y; /* Top of scroll bar */ +- int w; /* Width */ +- int h; /* Height */ +- { +- int block[24]; +- int px1, py1; /* Parent window min coords */ +- int px2, py2; /* Parent window max coords */ +- +- /* Find where the parent window is. */ +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- px1 = block[1]; +- py1 = block[2]; +- px2 = block[3]; +- py2 = block[4]; +- +- block[0] = sb -> id; +- +- /* Find out how big the scroll window is at the moment. */ +- swi(Wimp_GetWindowInfo, 0, ((char_u *)block) + 1); +- +- if (block[13] < w || block[12] > -h) +- { +- /* Current window is too small! */ +- if (block[12] > -h) +- block[12] = -h; +- if (block[13] < w) +- block[13] = w; +- swi(Wimp_SetExtent, block[0], block + 11); +- } +- +- /* This works better on the nested_wimp. */ +- if (sb-> wp) +- { +- /* This is a vertical scrollbar. */ +- block[1] = block[3] = px2 - gui.scrollbar_width + (1 << x_eigen_factor); +- block[2] = 1 + py2 - (y + h) + (1 << y_eigen_factor); +- block[4] = 1 + py2 - y; +- } +- else +- { +- /* This is a horizontal scrollbar. */ +- block[2] = block[4] = py1 + gui.scrollbar_height; +- block[1] = px1; +- block[3] = px2 - gui.scrollbar_width; +- } +- +- block[5] = 0; +- block[6] = 0; +- block[7] = -1; +- +- swi(Wimp_OpenWindow, 0, block, 0x4b534154, +- gui.window_handle, /* Parent window handle. */ +- (CHILD_FIX_TO_RIGHT << CHILD_LEFT ) | +- (CHILD_FIX_TO_RIGHT << CHILD_RIGHT ) | +- (CHILD_FIX_TO_BOTTOM << CHILD_TOP ) | +- (CHILD_FIX_TO_BOTTOM << CHILD_BOTTOM) | +- (CHILD_SELF_SCROLL << CHILD_SCROLL_X) | +- (CHILD_SELF_SCROLL << CHILD_SCROLL_Y) +- ); +- } +- +- /* Create a window with no workarea to place inside editor window. +- * (what happens without the nested wimp?) +- * Data for scrollbar is invalid. +- */ +- void +- gui_mch_create_scrollbar(sb, orient) +- scrollbar_T *sb; +- int orient; /* orient is SBAR_HORIZ or SBAR_VERT */ +- { +- int bar[] = +- { +- 0, 0, /* Visible area : min X,Y */ +- 100, 100, /* max X,Y */ +- 0, 0, /* Scroll offsets */ +- -1, /* Window in front */ +- 0x80800150 | (orient == SBAR_HORIZ ? (1 << 30) : (1 << 28)), +- 0xff070207, /* Colours */ +- 0x000c0103, /* More colours */ +- 0, -0x4000, /* Workarea extent */ +- 0x4000, 0, /* max X,Y */ +- 0x00000000, /* No title */ +- 0 << 12, /* No workarea button type */ +- 1, /* Wimp sprite area */ +- 0x00010001, /* Minimum width, height */ +- 0, 0, 0, /* Title data (none) */ +- 0 /* No icons */ +- }; +- swi(Wimp_CreateWindow, 0, bar); +- sb -> id = r0; +- } +- +- #if defined(FEAT_WINDOWS) || defined(PROTO) +- void +- gui_mch_destroy_scrollbar(scrollbar_T *sb) +- { +- swi(Wimp_DeleteWindow, 0, & (sb->id)); +- sb -> id = -1; +- } +- #endif +- +- void +- gui_mch_set_scrollbar_colors(scrollbar_T *sb) +- { +- /* Always use default RO colour scheme. */ +- } +- +- /* +- * Get current mouse coordinates in text window. +- * Note: (0,0) is the bottom left corner, positive y is UP. +- */ +- void +- gui_mch_getmouse(x, y) +- int *x; +- int *y; +- { +- int left; +- int top; +- int block[10]; +- +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- left = block[1]; +- top = block[4]; +- +- swi(Wimp_GetPointerInfo, 0, block); +- *x = block[0] - left; +- *y = top - block[1]; +- } +- +- /* MouseTo(x, y) */ +- void +- gui_mch_setmouse(x, y) +- int x; +- int y; +- { +- } +- +- void +- gui_mch_toggle_tearoffs(enable) +- int enable; +- { +- /* no tearoff menus */ +- } +- +- /* Redraw a window's title. +- * For the nested wimp we use the new 'redraw-title-bar' reason code. +- * For older wimps we mark the area of the screen where the title bar +- * is as invalid. +- */ +- void +- ro_redraw_title(window) +- int window; +- { +- if (nested_wimp) +- { +- swi(Wimp_ForceRedraw, window, 0x4b534154, 3); +- } +- else +- { +- int block[10]; +- int miny; +- +- block[0] = window; +- swi(Wimp_GetWindowState, 0, block); +- miny = block[4]; +- swi(Wimp_GetWindowOutline, 0, block); +- swi(Wimp_ForceRedraw, -1, +- block[1], miny, +- block[3], block[4]); +- } +- } +- +- /* Turn a vimmenu_T structure into a wimp menu structure. +- * -1 if resulting menu is empty. +- * Only the children and dname items in the root menu are used. +- */ +- int * +- ro_build_menu(menu) +- vimmenu_T *menu; +- { +- int *wimp_menu; +- int width = 4; +- int w; +- int size = 28; +- vimmenu_T *item; +- int *wimp_item; +- +- /* Find out how big the menu is so we can allocate memory for it */ +- for (item = menu-> children; item; item = item-> next) +- { +- if (item-> hidden == FALSE && !menu_is_separator(item->name)) +- size += 24; +- } +- +- if (size <= 28) +- return (int *) -1; /* No children - shouldn't happen */ +- +- wimp_menu = (int *) alloc(size); +- +- wimp_menu[0] = (int) menu-> dname; +- wimp_menu[1] = -1; +- wimp_menu[2] = 0; +- wimp_menu[3] = 0x00070207; +- wimp_menu[5] = 44; +- wimp_menu[6] = 0; +- +- wimp_item = wimp_menu + 7; +- +- for (item = menu-> children; item; item = item-> next) +- { +- if (menu_is_separator(item-> name)) +- { +- /* This menu entry is actually a separator. If it is not the first +- * menu entry then mark the previous menu item as needing a dotted +- * line after it. +- */ +- if (wimp_item > wimp_menu + 7) +- wimp_item[-6] |= 0x2; +- } +- else if (item-> hidden == FALSE) +- { +- wimp_item[0] = 0; +- wimp_item[1] = item-> children ? (int) ro_build_menu(item) : -1; +- wimp_item[2] = 0x07009131 | (item-> greyed_out << 22); +- wimp_item[3] = (int) item-> dname; +- wimp_item[4] = -1; +- wimp_item[5] = (int) item; /* Stuff the menu address in this unused space */ +- +- w = strlen(item-> dname) + 1; +- if (w > width) +- width = w; +- wimp_item += 6; +- } +- } +- +- wimp_menu[4] = (width + 2) * 16; +- wimp_menu[7] |= 0x100; /* Menu title is indirected */ +- wimp_item[-6] |= 0x080; /* Last entry in menu */ +- return wimp_menu; +- } +- +- static void +- ro_remove_menu(menu) +- int *menu; +- { +- int *item = menu + 7; +- +- if (menu == NULL || menu == (int *) -1) +- return; +- +- for (;;) +- { +- if (item[1] != -1) +- ro_remove_menu((int *) item[1]); /* Remove sub-menu */ +- if (item[0] & 0x80) +- break; /* This was the last entry */ +- item += 6; +- } +- vim_free(menu); +- } +- +- void +- gui_mch_show_popupmenu(menu) +- vimmenu_T *menu; +- { +- int block[10]; +- +- /* Remove the existing menu, if any */ +- if (wimp_menu != (int *) -1) +- { +- swi(Wimp_CreateMenu, 0, -1); +- ro_remove_menu(wimp_menu); +- wimp_menu = (int *) -1; +- } +- +- wimp_menu = ro_build_menu(menu); +- if (wimp_menu != (int *) -1) +- { +- swi(Wimp_GetPointerInfo, 0, block); +- swi(Wimp_CreateMenu, 0, wimp_menu, block[0] - 64, block[1] + 64); +- } +- } +- +- /* Run a command using the TaskWindow module. +- * If SHELL_FILTER is set then output is not echoed to the screen, +- * If it is not set, then \r is not sent to the output file. +- */ +- int +- gui_mch_call_shell(cmd, options) +- char_u *cmd; +- int options; /* SHELL_FILTER if called by do_filter() */ +- /* SHELL_COOKED if term needs cooked mode */ +- { +- char_u task_cmd[256]; /* Contains *TaskWindow command. */ +- int block[64]; +- int reason; +- char_u *out; +- char_u c; +- int old_msg_col; +- char_u *out_redir; +- int length; +- FILE *out_file = NULL; +- +- out_redir = strstr(cmd, " > "); +- if (out_redir == NULL) +- length = strlen(cmd); /* No redirection. */ +- else +- { +- length = out_redir - cmd; +- out_file = fopen(out_redir + 3, "wb"); +- if (out_file == NULL) +- smsg("WARNING : Can't open file %s for writing\n", out_redir + 3); +- } +- +- if (length > 180) +- { +- if (out_file) +- fclose(out_file); +- return FAIL; /* Command too long. */ +- } +- +- strcpy(task_cmd, "TaskWindow \""); +- strncpy(task_cmd + 12, cmd, length); +- sprintf(task_cmd + 12 + length, +- "\" -task &%08x -ctrl -quit -name \"Vim command\"", +- task_handle); +- +- if (options & SHELL_COOKED) +- settmode(TMODE_COOK); +- +- if (xswi(Wimp_StartTask, task_cmd) & v_flag) +- { +- /* Failed to even start a new task (out of memory?) */ +- settmode(TMODE_RAW); +- if (out_file) +- fclose(out_file); +- return FAIL; +- } +- +- /* Wait for the child process to initialise. */ +- child_handle = 0; +- while (!child_handle) +- { +- reason = wimp_poll(0, block); +- if ((reason == 17 || reason == 18) && block[4] == 0x808c2) +- child_handle = block[1]; +- else +- process_event(reason, block); +- } +- +- /* Block until finished */ +- while (child_handle) +- { +- reason = wimp_poll(1, block); +- if (reason == 3 || (reason == 8 && block[6] == 3)) +- { +- /* Close window request or CTRL-C - kill child task. */ +- block[0] = 20; +- block[3] = 0; +- block[4] = 0x808c4; /* Morite */ +- swi(Wimp_SendMessage, 17, block, child_handle); +- MSG_PUTS(_("\nSending message to terminate child process.\n")); +- continue; +- } +- else if (reason == 8) +- { +- block[0] = 28; +- block[3] = 0; +- block[4] = 0x808c0; /* Input */ +- block[5] = 1; +- /* Block[6] is OK as it is! */ +- swi(Wimp_SendMessage, 17, block, child_handle); +- continue; +- } +- else if (reason == 17 || reason == 18) +- { +- if (block[4] == 0x808c1) +- { +- /* Ack message. */ +- block[3] = block[2]; +- swi(Wimp_SendMessage, 19, block, block[1]); +- out = (char_u *)block + 24; +- old_msg_col = msg_col; +- while (block[5]--) +- { +- c = *out++; +- if (out_file && (c != '\r' || (options & SHELL_FILTER))) +- fputc(c, out_file); +- if ((options & SHELL_FILTER) == 0) +- { +- if (c == 127) +- msg_puts("\b \b"); +- else if (c > 31) +- msg_putchar(c); +- else if (c == 10) +- { +- lines_left = 8; /* Don't do More prompt! */ +- msg_putchar(10); +- } +- } +- } +- /* Flush output to the screen. */ +- windgoto(msg_row, msg_col); +- out_flush(); +- continue; +- } +- } +- process_event(reason, block); +- } +- msg_putchar('\n'); +- settmode(TMODE_RAW); +- if (out_file) +- fclose(out_file); +- return OK; +- } +- +- /* Like strsave(), but stops at any control char */ +- char_u * +- wimp_strsave(str) +- char *str; +- { +- int strlen = 0; +- char_u *retval; +- while (str[strlen] > 31) +- strlen++; +- retval = alloc(strlen + 1); +- if (retval) +- { +- memcpy(retval, str, strlen); +- retval[strlen] = '\0'; +- } +- return retval; +- } +- +- /* If we are saving then pop up a standard RISC OS save box. +- * Otherwise, open a directory viewer on the given directory (and return NULL) +- * The string we return will be freed later. +- */ +- char_u * +- gui_mch_browse(saving, title, dflt, ext, initdir, filter) +- int saving; /* write action */ +- char_u *title; /* title for the window */ +- char_u *dflt; /* default file name */ +- char_u *ext; /* extension added */ +- char_u *initdir; /* initial directory, NULL for current dir */ +- char_u *filter; /* file name filter */ +- { +- char command[256]; +- int length; +- +- if (saving) +- { +- int block[64]; +- int reason; +- int done_save = FALSE; +- char_u *retval = NULL; +- char_u *sprname; +- char_u *fname; +- int dragging_icon = FALSE; +- int filetype; +- +- if (!dflt) +- dflt = "TextFile"; +- +- block[0] = save_window; +- block[1] = 0; +- swi(Wimp_GetIconState, 0, block); +- sprname = ((char_u *) block[7]); +- block[1] = 1; +- swi(Wimp_GetIconState, 0, block); +- fname = ((char *) block[7]); +- strncpy(fname, dflt, 255); +- +- if (xswi(OS_FSControl, 31, curbuf->b_p_oft) & v_flag) +- { +- filetype = 0xfff; +- strcpy(sprname + 5, "xxx"); +- } +- else +- { +- filetype = r2; +- sprintf(sprname + 5, "%03x", filetype); +- } +- +- /* Open the save box */ +- +- swi(Wimp_GetPointerInfo, 0, block); +- swi(Wimp_CreateMenu, 0, save_window, block[0] - 64, block[1] + 64); +- swi(Wimp_SetCaretPosition, save_window, 1, 0, 0, -1, -1); +- +- while (!done_save) +- { +- reason = wimp_poll(1, block); +- switch (reason) +- { +- case 1: +- redraw_window(block); +- break; +- case 2: +- if (block[0] == save_window) +- swi(Wimp_OpenWindow, 0, block); +- else +- ro_open_window(block); +- break; +- case 3: +- done_save = TRUE; +- break; +- case 6: +- if (block[3] != save_window) +- done_save = TRUE; +- else +- { +- int drag_box[4]; +- int min_x, max_y; +- +- switch (block[4]) +- { +- case 0: /* Start drag */ +- block[0] = save_window; +- swi(Wimp_GetWindowState, 0, block); +- min_x = block[1]; +- max_y = block[4]; +- block[1] = 0; +- swi(Wimp_GetIconState, 0, block); +- drag_box[0] = block[2] + min_x; +- drag_box[1] = block[3] + max_y; +- drag_box[2] = block[4] + min_x; +- drag_box[3] = block[5] + max_y; +- +- swi(DragASprite_Start, +- 0x45, +- 1, +- sprname, +- drag_box); +- dragging_icon = TRUE; +- break; +- case 2: /* OK */ +- retval = wimp_strsave(fname); +- done_save = TRUE; +- break; +- case 3: /* Cancel */ +- done_save = TRUE; +- break; +- } +- } +- break; +- case 7: +- if (dragging_icon) +- { +- int len = 0; +- +- dragging_icon = FALSE; +- swi(Wimp_GetPointerInfo, 0, block); +- block[5] = block[3]; +- block[6] = block[4]; +- block[7] = block[0]; +- block[8] = block[1]; +- block[9] = 0; /* Don't know the size */ +- block[10] = filetype; +- +- while (fname[len] > 31) +- { +- if (fname[len] == '.') +- { +- fname += len + 1; +- len = 0; +- } +- else +- len++; +- } +- if (len > 211) +- len = 211; +- +- memcpy(((char_u *) block) + 44, fname, len); +- ((char_u *)block)[44 + len] = '\0'; +- +- block[0] = (len + 48) & 0xfc; +- block[3] = 0; +- block[4] = 1; /* DataSave */ +- +- swi(Wimp_SendMessage, 17, block, block[5], block[6]); +- } +- else +- ro_drag_finished(block); +- break; +- case 8: +- if (block[6] == 13) +- { +- retval = wimp_strsave(fname); +- done_save = TRUE; +- } +- else if (block[6] == 0x1b) +- done_save = TRUE; +- else +- swi(Wimp_ProcessKey, block[6]); +- break; +- case 17: +- case 18: +- if (block[4] == 2 && block[9] != -1) +- { +- /* DataSaveAck from dragging icon. */ +- retval = wimp_strsave(((char_u *) block) + 44); +- done_save = TRUE; +- } +- else if (block[4] == 0x400c9) +- { +- /* MenusDeleted */ +- done_save = TRUE; +- } +- else +- ro_message(block); +- break; +- } +- } +- block[0] = save_window; +- swi(Wimp_CloseWindow, 0, block); +- swi(Wimp_GetCaretPosition, 0, block); +- if (block[0] == -1) +- swi(Wimp_SetCaretPosition, gui.window_handle, -1, 0, 0, -1, -1); +- +- return retval; +- } +- else if (initdir) +- { +- /* Open a directory viewer */ +- length = strlen(initdir); +- +- if (length > 240) +- return NULL; /* Path too long! */ +- +- length = sprintf(command, "Filer_OpenDir %s", initdir); +- while (command[length - 1] == '.') +- length--; +- command[length] = '\0'; +- swi(OS_CLI, command); +- } +- return NULL; +- } +--- 0 ---- +*** ../vim-7.3.186/src/os_riscos.c 2010-08-15 21:57:27.000000000 +0200 +--- src/os_riscos.c 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,1292 **** +- /* vi:set ts=8 sts=4 sw=4: +- * +- * VIM - Vi IMproved by Bram Moolenaar +- * +- * Do ":help uganda" in Vim to read copying and usage conditions. +- * Do ":help credits" in Vim to see a list of people who contributed. +- * See README.txt for an overview of the Vim source code. +- */ +- +- #include "vim.h" +- +- /* +- * os_riscos.c +- * +- * Thomas Leonard +- */ +- +- const char *__dynamic_da_name = "Vim heap"; /* Enable and name our dynamic area */ +- int ro_line_mode = TRUE; /* For Ex mode we much echo chars to the screen ourselves */ +- int windowed; /* Flag - are we running inside a text window? */ +- int WinLeft, WinTop; /* We might be started inside a text window */ +- int ScrollTop; /* Make cursor movements relative to ScrollTop. */ +- +- int old_escape_state = -1; +- int old_cursor_state = -1; +- +- #define rgb(r,g,b) ((b<<24) + (g<<16) + (r<<8)) +- #define NORMAL_FG 0x00000000 +- #define NORMAL_BG 0xffffffff +- +- /* Convert a DOS colour number to an RGB palette entry. +- * Mappings from X11 rgb/txt file. +- */ +- static int +- map_colour(dos) +- int dos; /* Standard DOS colour number. */ +- { +- switch (dos) +- { +- case 0: return 0; /* Black */ +- case 1: return rgb(0,0,139); /* DarkBlue */ +- case 2: return rgb(0,100,0); /* DarkGreen */ +- case 3: return rgb(0,139,139); /* DarkCyan */ +- case 4: return rgb(139,0,0); /* DarkRed */ +- case 5: return rgb(139,0,139); /* DarkMagenta */ +- case 6: return rgb(165,42,42); /* Brown, DarkYellow */ +- case 7: return rgb(211,211,211); /* LightGray, LightGrey, Gray, Grey */ +- case 8: return rgb(169,169,169); /* DarkGray, DarkGrey */ +- case 9: return rgb(173,216,230); /* Blue, LightBlue */ +- case 10: return rgb(144,238,144); /* Green, LightGreen */ +- case 11: return rgb(224,255,255); /* Cyan, LightCyan */ +- case 12: return rgb(255,0,0); /* Red, LightRed */ +- case 13: return rgb(255,0,255); /* Magenta, LightMagenta */ +- case 14: return rgb(255,255,0); /* Yellow, LightYellow */ +- case 15: return rgb(255,255,255); /* White */ +- } +- return rgb(100,100,100); +- } +- +- static void +- text_fg(fg) +- int fg; /* Foregound colour in the form &BBGGRR00 */ +- { +- xswi(ColourTrans_SetTextColour, fg, 0, 0, 0); +- } +- +- static void +- text_bg(bg) +- int bg; /* Backgound colour in the form &BBGGRR00 */ +- { +- xswi(ColourTrans_SetTextColour, bg, 0, 0, 1 << 7); +- } +- +- #define OUT_NORMAL 0 +- #define OUT_NUMBER 1 /* Reading in a number */ +- +- void +- mch_write(s, len) +- char_u *s; +- int len; +- { +- static int mode = OUT_NORMAL; +- static int x, y; /* For reading numbers in. */ +- +- if (!term_console) +- { +- /* Maybe we are running Vim remotely - don't interpret chars */ +- while (len--) +- { +- char_u c = *s++; +- swi(OS_WriteC, c); +- /* We might need to send a CR too. This shouldn't +- * hurt if we don't need it, should it? +- */ +- if (c == 10) +- swi(OS_WriteI + 13); +- } +- return; +- } +- +- while (len--) +- { +- char_u c = *s++; +- switch (mode) +- { +- case OUT_NUMBER: +- if (c < '0' || c > '9') +- { +- mode = OUT_NORMAL; +- } +- else +- { +- x = (x * 10) + c - '0'; +- continue; +- } +- /* note: no break here! */ +- +- case OUT_NORMAL: +- switch (c) +- { +- case 1: +- /* Number (in decimal) follows. */ +- mode = OUT_NUMBER; +- y = x; +- x = 0; +- break; +- case 2: +- /* Position cursor. */ +- swi(OS_WriteI + 31); +- swi(OS_WriteC, x); +- swi(OS_WriteC, y - ScrollTop); +- break; +- case 3: +- /* Set scroll region. */ +- if (x == Rows -1 && y == 0 && !windowed) +- { +- /* Whole screen - remove text window. +- * This is MUCH faster. +- */ +- swi(OS_WriteI + 26); +- } +- else +- { +- /* Create a text window. */ +- swi(OS_WriteI + 28); +- swi(OS_WriteC, WinLeft); +- swi(OS_WriteC, WinTop + x); +- swi(OS_WriteC, WinLeft + Columns - 1); +- swi(OS_WriteC, WinTop + y); +- } +- ScrollTop = y; +- break; +- case 4: +- /* Normal mode. */ +- text_fg(NORMAL_FG); +- text_bg(NORMAL_BG); +- break; +- case 5: +- /* Reverse mode. */ +- text_fg(NORMAL_BG); +- text_bg(NORMAL_FG); +- break; +- case 10: +- swi(OS_NewLine); +- break; +- case 14: +- /* Cursor invisible. */ +- swi(OS_WriteN, +- "\027\001\000\000\000\000\000\000\000\000", +- 10); +- break; +- case 15: +- /* Cursor visible. */ +- swi(OS_WriteN, +- "\027\001\002\000\000\000\000\000\000\000", +- 10); +- break; +- case 16: +- /* Cursor very visible (flash) */ +- swi(OS_WriteN, +- "\027\001\003\000\000\000\000\000\000\000", +- 10); +- case 17: +- /* Set foreground colour. */ +- text_fg(map_colour(x)); +- break; +- case 18: +- /* Set background colour. */ +- text_bg(map_colour(x)); +- break; +- case 19: +- /* Scroll text down. */ +- swi(OS_WriteN, +- "\027\007\000\002\000\000\000\000\000\000", +- 10); +- break; +- default: +- swi(OS_WriteC, c); +- } +- continue; +- +- default: +- printf("[output error]"); +- mode = OUT_NORMAL; +- } +- } +- } +- +- /* +- * mch_inchar(): low level input funcion. +- * Get a characters from the keyboard. +- * Return the number of characters that are available. +- * If wtime == 0 do not wait for characters. +- * If wtime == n wait n msecs for characters. +- * If wtime == -1 wait forever for characters. +- * +- * TODO: call convert_input() for 'fileencoding' to 'encoding' conversion. +- */ +- int +- mch_inchar(buf, maxlen, wtime, tb_change_cnt) +- char_u *buf; +- int maxlen; +- long wtime; +- int tb_change_cnt; +- { +- int got=0; +- unsigned int start_time = clock(); +- +- if (ro_line_mode) +- { +- /* We're probably in Ex mode - get whole lines at a time. */ +- +- static char_u line_buffer[256]; +- static int remaining_chars = 0; +- static int buf_pos = 0; +- +- /* Do we need to fetch another line? */ +- if (remaining_chars == 0) +- { +- int old_esc_state; +- swi(OS_Byte, 200, 1, 0xfe); +- old_esc_state = r1; +- +- buf_pos = 0; +- if (xswi(OS_ReadLine, line_buffer, 255, 0, 255) & (c_flag | v_flag)) +- { +- got_int = TRUE; /* ESC pressed */ +- r1 = 0; +- } +- line_buffer[r1] = 13; +- remaining_chars = r1 + 1; /* Count CR as part of input */ +- +- swi(OS_Byte, 200, old_esc_state, 0); +- } +- +- /* Can we send the rest of the buffer back in one go? */ +- if (remaining_chars <= maxlen) +- { +- int got = remaining_chars; +- +- memcpy(buf, line_buffer + buf_pos, got); +- remaining_chars = 0; +- return got; +- } +- +- /* Send as much as we can */ +- memcpy(buf, line_buffer + buf_pos, maxlen); +- buf_pos += maxlen; +- remaining_chars -= maxlen; +- +- return maxlen; +- } +- +- if (!term_console) +- { +- /* Use OS_ReadC for all input. +- * Avoids problems with remote access getting interference from +- * the keyboard. +- */ +- if (wtime == 0) +- return 0; /* Ignore quick key checks */ +- +- if (xswi(OS_ReadC) & c_flag) +- { +- got_int = TRUE; /* ESC pressed - can this happen? */ +- swi(OS_Byte, 124); /* Clear Escape state */ +- r0 = 0x1b; /* It *might* not have been Escape! */ +- } +- buf[0] = r0; +- return 1; +- } +- +- /* +- * OK, here's the plan: +- * +- * 1) Wait until wtime expires or we get a key +- * 2) Get keys until the keyboard buffer is empty or buf is full +- */ +- +- while (xswi(OS_Byte,145,0) & c_flag) +- { +- /* Nothing at all in the keyboard buffer. +- * Has our time expired yet? +- */ +- if ( (wtime != -1) && (clock() - start_time) >= wtime ) +- return 0; /* Nothing read - giving up */ +- } +- +- /* We've got one char (in r2) - are there any more? */ +- +- while (got < maxlen) +- { +- buf[got++] = r2; +- +- if (xswi(OS_Byte,145,0) & c_flag) +- return got; /* Keyboard buffer empty */ +- } +- return got; /* buf is full */ +- } +- +- /* +- * return non-zero if a character is available +- */ +- int +- mch_char_avail() +- { +- if (!term_console) +- return 0; /* Can't tell */ +- if (xswi(OS_Byte, 152, 0) & c_flag) +- return 0; +- return 1; +- } +- +- /* Find out how much free memory we have. +- * I don't know how to work this out exactly but, since we can claim +- * more memory from the OS, let's just report the free pool size. +- * Dynamic area 6 doesn't exist pre 3.6 according to StrongHelp, so +- * we'll use Wimp_SlotSize. If that fails (outside the desktop?) +- * then just return a big number and hope. +- */ +- long_u +- mch_avail_mem(special) +- int special; +- { +- if (xswi(Wimp_SlotSize, -1, -1) & v_flag) +- return 0x7fffffff; +- return r2; +- } +- +- void +- mch_delay(msec, ignoreinput) +- long msec; +- int ignoreinput; +- { +- int start_time, time_now; +- int csec = msec / 10; +- +- swi(OS_ReadMonotonicTime); +- start_time = r0; +- +- for (;;) +- { +- swi(OS_ReadMonotonicTime); +- time_now = r0; +- if (time_now - start_time > csec) +- return; +- #ifdef FEAT_GUI +- /* In the GUI, allow other programs to run while waiting. */ +- if (gui.in_use) +- gui_mch_wait_for_chars(start_time + csec); +- #endif +- } +- } +- +- /* +- * If the machine has job control, use it to suspend the program, +- * otherwise fake it by starting a new shell. +- */ +- void +- mch_suspend() +- { +- suspend_shell(); +- } +- +- void +- mch_init() +- { +- /* +- * Read window size first. Calls to mch_get_shellsize() will +- * simply return these values in future so that setting the +- * text window (used for scrolling) won't give strange results. +- */ +- +- int buf[7] = {132, 135, 256, 257, 1, 2, -1}; +- +- /* Command windows are no longer forced open, since if we are +- * in the desktop then we'll use the GUI version. +- * Opening a command window here messes up the GUI version startup +- */ +- #ifndef FEAT_GUI +- swi(OS_WriteI); +- #endif +- swi(OS_ReadVduVariables, buf, buf); +- WinLeft = buf[0]; +- WinTop = buf[1]; +- Columns = buf[2]; +- Rows = buf[3] + 1; /* Seems to be one off (VduVars wrong?) */ +- ScrollTop = 0; +- +- /* Are we running in a textwindow? */ +- if (Rows == buf[5] + 1 && Columns == buf[4] + 1) +- windowed = 0; +- else +- windowed = 1; +- +- /* Choose a nice colour scheme. */ +- text_fg(NORMAL_FG); +- text_bg(NORMAL_BG); +- } +- +- /* +- * Check_win checks whether we have an interactive stdout. +- */ +- /* ARGSUSED */ +- int +- mch_check_win(argc, argv) +- int argc; +- char **argv; +- { +- return OK; +- } +- +- /* +- * Return TRUE if the input comes from a terminal, FALSE otherwise. +- */ +- int +- mch_input_isatty() +- { +- if (xswi(OS_ChangeRedirection, -1, -1) & v_flag) +- return TRUE; /* Error - TRUE is probably correct though */ +- if (r0 == 0) +- return TRUE; +- return FALSE; +- } +- +- #ifdef FEAT_TITLE +- int +- mch_can_restore_title() +- { +- return FALSE; +- } +- +- int +- mch_can_restore_icon() +- { +- return FALSE; +- } +- +- +- /* +- * Set the window title and icon. +- */ +- void +- mch_settitle(title, icon) +- char_u *title; +- char_u *icon; +- { +- if (title == NULL) +- title = (char_u *) ""; +- #ifdef FEAT_GUI +- if (gui.in_use && strcmp(title, gui.window_title)) +- { +- int length; +- length = strlen(title); +- if (length >= gui.window_title_size) +- length = gui.window_title_size - 1; +- strncpy(gui.window_title, title, length); +- gui.window_title[length] = 0; +- ro_redraw_title(gui.window_handle); +- } +- #endif +- return; +- } +- +- /* +- * Restore the window/icon title. +- * "which" is one of: +- * 1 only restore title +- * 2 only restore icon +- * 3 restore title and icon +- */ +- void +- mch_restore_title(which) +- int which; +- { +- return; +- } +- #endif +- +- /* +- * Insert user name in s[len]. +- * Return OK if a name found. +- */ +- int +- mch_get_user_name(s, len) +- char_u *s; +- int len; +- { +- /* RISC OS doesn't support user names. */ +- *s = NUL; +- return FAIL; +- } +- +- /* +- * Insert host name in s[len]. +- */ +- +- void +- mch_get_host_name(s, len) +- char_u *s; +- int len; +- { +- if (xswi(OS_ReadVarVal, "Machine$Name", s, len, 0, 3) & v_flag) +- { +- /* Variable does not exist (normal operation) */ +- vim_strncpy(s, "(unknown)", len - 1); +- } +- } +- +- /* +- * return process ID +- */ +- long +- mch_get_pid() +- { +- if (xswi(Wimp_ReadSysInfo, 5) & v_flag) +- return 0; +- return r0; +- } +- +- /* +- * Get name of current directory into buffer 'buf' of length 'len' bytes. +- * Return OK for success, FAIL for failure. +- */ +- int +- mch_dirname(buf, len) +- char_u *buf; +- int len; +- { +- if (xswi(OS_FSControl, 37, "@", buf, 0, 0, len) & v_flag) +- return FAIL; +- return OK; +- } +- +- /* +- * Get absolute file name into buffer 'buf' of length 'len' bytes. +- * +- * return FAIL for failure, OK for success +- */ +- int +- mch_FullName(fname, buf, len, force) +- char_u *fname, *buf; +- int len; +- int force; /* Also expand when already absolute path name. +- * Not used under RISC OS. +- */ +- { +- if (xswi(OS_FSControl, 37, fname, buf, 0, 0, len) & v_flag) +- return FAIL; +- return OK; +- } +- +- /* +- * Return TRUE if "fname" does not depend on the current directory. +- */ +- int +- mch_isFullName(fname) +- char_u *fname; +- { +- if (strstr(fname, "::") && strstr(fname,".$.")) +- return TRUE; +- return FALSE; +- } +- +- /* +- * Get file permissions for 'name'. +- * Returns -1 when it doesn't exist. +- */ +- long +- mch_getperm(name) +- char_u *name; +- { +- struct stat statb; +- +- if (stat((char *)name, &statb)) +- return -1; +- return statb.st_mode; +- } +- +- /* +- * set file permission for 'name' to 'perm' +- * +- * return FAIL for failure, OK otherwise +- */ +- int +- mch_setperm(name, perm) +- char_u *name; +- long perm; +- { +- return (chmod((char *)name, (mode_t)perm) == 0 ? OK : FAIL); +- } +- +- /* +- * Set hidden flag for "name". +- */ +- /* ARGSUSED */ +- void +- mch_hide(name) +- char_u *name; +- { +- /* can't hide a file */ +- } +- +- /* +- * return TRUE if "name" is a directory +- * return FALSE if "name" is not a directory +- * return FALSE for error +- */ +- int +- mch_isdir(name) +- char_u *name; +- { +- if (xswi(OS_File, 17, name) & v_flag) +- return FALSE; +- if (r0 == 2 || r0 == 3) +- return TRUE; /* Count image files as directories. */ +- return FALSE; +- } +- +- /* +- * Return 1 if "name" can be executed, 0 if not. +- * Return -1 if unknown. Requires which to work. +- */ +- int +- mch_can_exe(name) +- char_u *name; +- { +- char_u *buf; +- char_u *p; +- int retval; +- +- buf = alloc((unsigned)STRLEN(name) + 7); +- if (buf == NULL) +- return -1; +- sprintf((char *)buf, "which %s", name); +- p = get_cmd_output(buf, NULL, SHELL_SILENT); +- vim_free(buf); +- if (p == NULL) +- return -1; +- /* result can be: "name: Command not found" */ +- retval = (*p != NUL && strstr((char *)p, "not found") == NULL); +- vim_free(p); +- return retval; +- } +- +- /* +- * Check what "name" is: +- * NODE_NORMAL: file or directory (or doesn't exist) +- * NODE_WRITABLE: writable device, socket, fifo, etc. +- * NODE_OTHER: non-writable things +- */ +- int +- mch_nodetype(name) +- char_u *name; +- { +- /* TODO */ +- return NODE_NORMAL; +- } +- +- void +- mch_early_init() +- { +- /* Turn off all the horrible filename munging in UnixLib. */ +- int __riscosify_control = __RISCOSIFY_NO_PROCESS; +- } +- +- void +- mch_exit(r) +- int r; +- { +- settmode(TMODE_COOK); +- exiting = TRUE; +- out_flush(); +- ml_close_all(TRUE); /* remove all memfiles */ +- +- #ifdef FEAT_GUI +- if (gui.in_use) +- gui_exit(r); +- #endif +- swi(OS_NewLine); +- if (old_escape_state != -1) +- swi(OS_Byte, 229, old_escape_state, 0); +- if (old_cursor_state != -1) +- swi(OS_Byte, 4, old_cursor_state); +- exit(r); +- } +- +- void +- mch_settmode(tmode) +- int tmode; /* TMODE_RAW or TMODE_COOK */ +- { +- if (tmode == TMODE_COOK) +- { +- ro_line_mode = TRUE; +- return; +- } +- +- ro_line_mode = FALSE; +- +- if (term_console) +- { +- /* Block cursor. */ +- swi(OS_WriteN, +- "\027\000\012\000\000\000\000\000\000\000", +- 10); +- +- /* Disable the standard cursor key actions. */ +- swi(OS_Byte, 4, 1); +- if (old_cursor_state == -1) +- old_cursor_state = r1; +- } +- +- /* Stop Escape from quitting Vim! */ +- swi(OS_Byte, 229, 1, 0); +- if (old_escape_state == -1) +- old_escape_state = r1; +- } +- +- /* +- * set mouse clicks on or off (only works for xterms) +- */ +- void +- mch_setmouse(on) +- int on; +- { +- } +- +- /* +- * set screen mode, always fails. +- */ +- /* ARGSUSED */ +- int +- mch_screenmode(arg) +- char_u *arg; +- { +- EMSG(_(e_screenmode)); +- return FAIL; +- } +- +- /* +- * Try to get the current window size. +- * Return OK when size could be determined, FAIL otherwise. +- * Simply return results stored by mch_init() if we are the +- * machine's console. If not, we don't know how big the screen is. +- */ +- int +- mch_get_shellsize() +- { +- /* if size changed: screenalloc will allocate new screen buffers */ +- return term_console ? OK : FAIL; +- } +- +- /* +- * Can't change the size. +- * Assume the user knows what he's doing and use the new values. +- */ +- void +- mch_set_shellsize() +- { +- /* Assume the user knows what he's doing and use the new values. */ +- } +- +- /* +- * Rows and/or Columns has changed. +- */ +- void +- mch_new_shellsize() +- { +- /* Nothing to do. */ +- } +- +- int +- mch_call_shell(cmd, options) +- char_u *cmd; +- int options; /* SHELL_*, see vim.h */ +- { +- int retval; +- int tmode = cur_tmode; +- +- if (cmd == NULL) +- cmd = (char_u *) "GOS"; +- +- #ifdef FEAT_GUI +- if (gui.in_use) +- return gui_mch_call_shell(cmd, options); +- #endif +- if (options & SHELL_COOKED) +- settmode(TMODE_COOK); /* set to normal mode */ +- MSG_PUTS("\n"); +- +- /* I don't even want to think about what UnixLib must +- * be doing to allow this to work... +- */ +- retval = system(cmd); +- if (retval && !(options & SHELL_SILENT)) +- EMSG(strerror(EOPSYS)); /* Doesn't seem to set errno? */ +- +- swi(OS_Byte, 229, 1, 0); /* Re-disable escape */ +- if (tmode == TMODE_RAW) +- settmode(TMODE_RAW); /* set to raw mode */ +- return retval ? FAIL : OK; +- } +- +- /* +- * Check for Escape being pressed right now. +- * [ different if !term_console? ] +- */ +- void +- mch_breakcheck() +- { +- if (xswi(OS_Byte, 121, 0xf0) & v_flag) +- return; +- if (r1 == 0xff) +- { +- got_int = TRUE; +- swi(OS_Byte, 15, 1); /* Flush input buffer */ +- } +- } +- +- /* +- * Recursively expand one path component into all matching files and/or +- * directories. +- * "path" has backslashes before chars that are not to be expanded. +- * Return the number of matches found. +- */ +- int +- mch_expandpath(gap, path, flags) +- garray_T *gap; /* Grow array for results. */ +- char_u *path; +- int flags; /* EW_* flags */ +- { +- int got; /* Number of matches. */ +- char_u *pattern; +- +- /* Plan: +- * +- * 1) Get first part of path - no wildcards +- * 2) Get next path element (wildcarded) +- * 3) Get rest of path +- * +- * If (3) is nothing then only the leaf is wildcarded - add to gap +- * Otherwise call recursively for each path in (2), passing (3) +- * +- * This is just the header function. +- */ +- +- /* We must be able to modifiy path, so make a copy */ +- pattern = vim_strsave(path); +- if (pattern == NULL) +- return 0; +- got = expand_section(gap, (char_u *)"", pattern, flags); +- vim_free(pattern); +- return got; +- } +- +- /* +- * expand_section(gap, "$.Dir1.Dir2", "ABBA*.myleaf##") +- * +- * calls expand_section(gap, "$.Dir1.Dir2.ABBA_Gold", "myleaf##") +- * and expand_section(gap, "$.Dir1.Dir2.ABBA_Live", "myleaf##") +- * +- * If rest is just a leaf then all matches are added to gap. +- * +- * Returns number of items added to gap. +- */ +- int +- expand_section(gap, root, rest, flags) +- garray_T *gap; +- char_u *root; /* Non-wildcarded path to search */ +- char_u *rest; /* Wildcarded remainder of path */ +- int flags; /* Add dirs/files/missing objects. */ +- { +- static char_u buf[MAXPATHL]; /* Temporary buffer. */ +- char_u dir[MAXPATHL]; +- int start_element = -1; /* Start of wildcarded element */ +- char_u c; +- int i; +- int got, dir_pos; +- int buflen; /* Chars used in buf[] */ +- int colon = 0; /* Dir ends in ':' */ +- +- buflen = strlen(root); +- STRNCPY(buf, root, buflen); /* Copy root into buffer. */ +- +- /* +- * Find end of nonwildcarded section. +- * Count ':' as a path sep since Vim:Bug* is a valid pathname. +- */ +- +- for (i = 0; c = rest[i]; i++) +- { +- if (c == PATHSEP) +- { +- start_element = i; +- colon = 0; +- } +- if (c == ':') +- { +- start_element = i + 1; +- colon = 1; +- } +- if (c == '#' || c == '*') +- break; +- } +- if (c == 0) +- start_element = i; +- +- /* +- * start_element +> terminator for non-wildcarded section. +- * Transfer this bit into buf. +- */ +- if (buflen + start_element + 4 >= MAXPATHL) +- return 0; /* Buffer full */ +- if (start_element >= 0) +- { +- if (*root && !colon) +- buf[buflen++] = PATHSEP; +- strncpy(buf + buflen, rest, start_element); +- buflen += start_element; +- } +- buf[buflen] = 0; +- +- /* +- * Did we reach the end of the string without hitting any wildcards? +- */ +- if (c == 0) +- { +- /* Yes - add combined path to grow array and return. */ +- addfile(gap, buf, flags); +- return 1; +- } +- +- if (start_element < 0 || !colon) +- start_element++; +- rest += start_element; +- +- /* +- * rest does contain wildcards if we get here. +- * +- * Now : have we reached the leaf names part yet? +- * If so, add all matches (files and dirs) to gap. +- * If not, get next path element and scan all matching directories. +- */ +- +- start_element = -1; +- for (i = 0; rest[i]; i++) +- { +- if (rest[i] == '.') +- { +- start_element = i; +- rest[i] = 0; /* Break string here. */ +- break; +- } +- } +- +- /* If start_element is -1 then we are matching leaf names */ +- +- r3 = 0; /* Number of objs read. */ +- dir_pos = 0; /* Position through directory. */ +- got = 0; /* Files added so far. */ +- while (dir_pos != -1) +- { +- buf[buflen] = 0; +- if (xswi(OS_GBPB, 9, +- buf, /* Directory to scan. */ +- buf + buflen + (1 - colon), /* Buffer for result. */ +- 1, /* Number of objects to read. */ +- dir_pos, /* Search position. */ +- MAXPATHL - 2 - buflen, /* Size of result buffer. */ +- rest) /* Wildcarded leafname. */ +- & v_flag) +- { +- EMSG(r0 + 4); +- r4 = -1; +- } +- dir_pos = r4; /* r4 corrupted by addfile() */ +- if (r3 > 0) +- { +- char_u *path = buf; +- if (buflen == 0) +- path++; /* Don't do '.File' */ +- else if (!colon) +- buf[buflen] = '.'; /* Join path and leaf */ +- +- /* Path -> full path of object found */ +- if (start_element == -1) +- { +- addfile(gap, path, flags); +- got++; +- } +- else +- { +- /* Scan into subdirectories and images; ignore files */ +- swi(OS_File, 17, path); +- if (r0 == 2 || r0 == 3) +- got += expand_section(gap, +- path, +- rest + start_element + 1, +- flags); +- } +- } +- } +- +- /* Restore the dot if we removed it. */ +- if (start_element >= 0) +- rest[start_element] = '.'; +- return got; +- } +- +- /* +- * mch_expand_wildcards() - this code does wild-card pattern matching using +- * the shell. It isn't used under RISC OS. +- * +- * return OK for success, FAIL for error (you may lose some memory) and put +- * an error message in *file. +- * +- * num_pat is number of input patterns +- * pat is array of pointers to input patterns +- * num_file is pointer to number of matched file names +- * file is pointer to array of pointers to matched file names +- */ +- int +- mch_expand_wildcards(num_pat, pat, num_file, file, flags) +- int num_pat; +- char_u **pat; +- int *num_file; +- char_u ***file; +- int flags; /* EW_* flags */ +- { +- /* This doesn't get called unless SPECIAL_WILDCHAR is defined. */ +- return FAIL; +- } +- +- /* +- * Return TRUE if "p" contains wildcards which can be expanded by +- * mch_expandpath(). +- */ +- int +- mch_has_exp_wildcard(p) +- char_u *p; +- { +- if (vim_strpbrk((char_u *)"*#", p)) +- return TRUE; +- return FALSE; +- } +- +- /* Return TRUE if "p" contains wildcards. */ +- int +- mch_has_wildcard(p) +- char_u *p; +- { +- if (vim_strpbrk((char_u *)"*#`", p)) +- return TRUE; +- return FALSE; +- } +- +- int /* see Unix unlink(2) */ +- mch_remove(file) +- char_u *file; /* Name of file to delete. */ +- { +- if (xswi(OS_FSControl, 27, file, 0, 0) & v_flag) +- return EXIT_FAILURE; +- return EXIT_SUCCESS; +- } +- +- /* Try to make existing scripts work without modification. +- * Return a pointer to the new string (freed by caller), or NULL +- * +- * Two main cases: +- * - Absolute : $VIM/syntax/help.vim +- * - Relative : Adfs::4.$.!Vim.Resources.Syntax/help.vim +- */ +- char_u * +- mch_munge_fname(fname) +- char_u *fname; +- { +- char_u c; +- int len; +- char_u *retval; +- +- retval = fname = vim_strsave(fname); +- if (fname == NULL) +- return NULL; +- +- if (strncmp(fname, "$VIM/", 5) == 0) +- { +- strncpy(fname, "Vim:", 4); +- for (fname += 5; c = *fname; fname++) +- { +- if (c == '.') +- break; +- if (c == '/') +- fname[-1] = '.'; +- else +- fname[-1] = c; +- } +- fname[-1] = '\0'; +- } +- else +- { +- /* Check to see if the file exists without modification. */ +- if (xswi(OS_File, 17, fname) & v_flag) +- r0 == 0; /* Invalid filename? */ +- if (r0) +- return retval; +- +- len = strlen(fname); +- if (strcmp(fname + len - 4, ".vim") == 0) +- { +- fname[len - 4] = '\0'; +- for (; c = *fname; fname++) +- { +- if (c == '/') +- *fname = '.'; +- } +- } +- } +- return retval; +- } +- +- /* QuickFix reads munged names from the error file. +- * Correct them. +- */ +- int +- ro_buflist_add(old_name) +- char_u *old_name; /* Name of file found by quickfix */ +- { +- char_u *fname; +- char_u *leaf; /* Pointer to start of leaf in old_name */ +- char_u *ptr; +- char_u c; +- int retval; +- +- if (old_name == NULL) +- return buflist_add(NULL, 0); +- +- /* Copy the name so we can mess around with it. */ +- fname = vim_strsave(old_name); +- if (fname == NULL) +- /* Out of memory - can't modify name */ +- return buflist_add(old_name, 0); +- +- /* Change `dir/main.c' into `dir.c.main' */ +- leaf = fname; +- for (ptr = fname; c = *ptr; ptr++) +- { +- if (c == '/') +- { +- leaf = ptr + 1; +- *ptr = '.'; +- } +- else if (c == '.') +- break; +- } +- if (c == '.') +- { +- /* Change `main.c' into `c.main' +- * | | +- * leaf ptr +- */ +- ptr += old_name - fname; +- *ptr = '\0'; +- sprintf(leaf, +- "%s.%s", +- ptr + 1, +- leaf - fname + old_name); +- } +- +- retval = buflist_add(fname, 0); +- free(fname); +- return retval; +- } +- +- /* Change the current directory. +- * Strip trailing dots to make it easier to use with filename completion. +- * Return 0 for success, -1 for failure. +- */ +- int +- mch_chdir(dir) +- char_u *dir; +- { +- int length; +- int retval; +- char_u *new_dir; +- +- if (p_verbose >= 5) +- { +- verbose_enter(); +- smsg((char_u *)"chdir(%s)", dir); +- verbose_leave(); +- } +- length = strlen(dir); +- if (dir[length - 1] != '.') +- return chdir(dir); /* No trailing dots - nothing to do. */ +- new_dir = vim_strsave(dir); +- if (new_dir == NULL) +- return chdir(dir); /* Can't allocate memory. */ +- +- while (new_dir[--length] == '.') +- new_dir[length] = '\0'; +- +- retval = chdir(new_dir); +- vim_free(new_dir); +- return retval; +- } +- +- /* Examine the named file, and set the 'osfiletype' option +- * (in curbuf) to the file's type. +- */ +- void +- mch_read_filetype(file) +- char_u *file; +- { +- int type; +- char_u type_string[9]; +- int i; +- +- if (xswi(OS_File, 23, file) & v_flag) +- type = 0xfff; /* Default to Text */ +- else +- type = r6; +- +- /* Type is the numerical value - see if we have a textual equivalent */ +- swi(OS_FSControl, 18, 0, type); +- ((int *) type_string)[0] = r2; +- ((int *) type_string)[1] = r3; +- type_string[8] = 0; +- for (i = 0; type_string[i] > ' '; i++) +- ; +- type_string[i] = 0; +- +- set_string_option_direct("osfiletype", -1, type_string, OPT_FREE, 0); +- return; +- } +- +- void +- mch_set_filetype(file, type) +- char_u *file; +- char_u *type; +- { +- if (xswi(OS_FSControl, 31, type) & v_flag) +- { +- EMSG(_("E366: Invalid 'osfiletype' option - using Text")); +- r2 = 0xfff; +- } +- +- swi(OS_File, 18, file, r2); +- } +- +- /* Return TRUE if the file's type matches 'type' +- * RISC OS types always start with '&' +- */ +- int +- mch_check_filetype(fname, type) +- char_u *fname; +- char_u *type; +- { +- int value; +- char *end; +- +- if (*type != '&') +- return FALSE; +- +- value = strtol(type + 1, &end, 16); +- if (*end) +- return FALSE; /* Invalid type (report error?) */ +- +- if (xswi(OS_File, 23, fname) & v_flag) +- return FALSE; /* Invalid filename? */ +- +- return (r0 && r6 == value); +- } +--- 0 ---- +*** ../vim-7.3.186/runtime/doc/os_risc.txt 2010-08-15 21:57:16.000000000 +0200 +--- runtime/doc/os_risc.txt 2011-05-10 16:19:25.000000000 +0200 +*************** +*** 1,322 **** +! *os_risc.txt* For Vim version 7.3. Last change: 2010 Aug 07 + + + VIM REFERENCE MANUAL by Thomas Leonard + + + *riscos* *RISCOS* *RISC-OS* +! This file contains the particularities for the RISC OS version of Vim. + +- The RISC OS port is a completely new port and is not based on the old "archi" +- port. + +- 1. File locations |riscos-locations| +- 2. Filename munging |riscos-munging| +- 3. Command-line use |riscos-commandline| +- 4. Desktop (GUI) use |riscos-gui| +- 5. Remote use (telnet) |riscos-remote| +- 6. Temporary files |riscos-temp-files| +- 7. Interrupting |riscos-interrupt| +- 8. Memory usage |riscos-memory| +- 9. Filetypes |riscos-filetypes| +- 10. The shell |riscos-shell| +- 11. Porting new releases |riscos-porting| +- +- If I've missed anything, email me and I'll try to fix it. In fact, even if I +- haven't missed anything then email me anyway to give me some confidence that it +- actually works! +- +- Thomas Leonard +- +- [these URLs no longer work...] +- Port homepage: http://www.ecs.soton.ac.uk/~tal197/ +- or try: http://www.soton.ac.uk/~tal197/ +- +- ============================================================================== +- *riscos-locations* +- 1. File locations +- +- The Vim executable and shared resource files are all stored inside the !Vim +- application directory. +- +- When !Vim is first seen by the filer, it aliases the *vi and *ex commands to +- run the command-line versions of Vim (see |riscos-commandline|). +- +- !Vim.Resources and !Vim.Resources2 contain the files from the standard Vim +- distribution, but modified slightly to work within the limits of ADFS, plus +- some extra files such as the window templates. +- +- User choices are read from "Choices:*" and are saved to ".*". +- If you have the new !Boot structure then these should be set up already. If +- not, set Choices$Path to a list of directories to search when looking for +- user configuration files. Set Choices$Write to the directory you want files +- to be saved into (so your search patterns and marks can be remembered between +- sessions). +- +- ============================================================================== +- *riscos-munging* +- 2. Filename munging +- +- All pathname munging is disabled by default, so Vim should behave like a +- normal RISC OS application now. So, if you want to edit "doc/html" then you +- actually type "*vi doc/html". +- +- The only times munging is done is when: +- +- - Searching included files from C programs, since these are always munged. +- See |[I|. +- Note: make sure you are in the right directory when you use this +- command (i.e. the one with subdirectories "c" and "h"). +- +- - Sourcing files using |:so|. +- Paths starting "$VIM/" are munged like this: +- +- $VIM/syntax/help.vim -> Vim:syntax.help +- +- Also, files ending in ".vim" have their extensions removed, and slashes +- replaced with dots. +- +- Some tag files and script files may have to be edited to work under this port. +- +- ============================================================================== +- *riscos-commandline* +- 3. Command-line use +- +- To use Vim from the command-line use the "*vi" command (or "*ex" for +- |Ex-mode|). +- +- Type "*vi -h" for a list of options. +- +- Running the command-line version of Vim in a large high-color mode may cause +- the scrolling to be very slow. Either change to a mode with fewer colors or +- use the GUI version. +- +- Also, holding down Ctrl will slow it down even more, and Ctrl-Shift will +- freeze it, as usual for text programs. +- +- ============================================================================== +- *riscos-gui* +- 4. Desktop use +- +- Limitations: +- +- - Left scrollbars don't work properly (right and bottom are fine). +- - Doesn't increase scroll speed if it gets behind. +- +- You can resize the window by dragging the lower-right corner, even though +- there is no icon shown there. +- +- You can use the --rows and --columns arguments to specify the initial size of +- the Vim window, like this: > +- +- *Vi -g --rows 20 --columns 80 +- +- The global clipboard is supported, so you can select some text and then +- paste it directly into another application (provided it supports the +- clipboard too). +- +- Clicking Menu now opens a menu like a normal RISC OS program. Hold down Shift +- when clicking Menu to paste (from the global clipboard). +- +- Dragging a file to the window replaces the CURRENT buffer (the one with the +- cursor, NOT the one you dragged to) with the file. +- +- Dragging with Ctrl held down causes a new Vim window to be opened for the +- file (see |:sp|). +- +- Dragging a file in with Shift held down in insert mode inserts the pathname of +- the file. +- +- :browse :w opens a standard RISC OS save box. +- :browse :e opens a directory viewer. +- +- For fonts, you have the choice of the system font, an outline font, the system +- font via ZapRedraw and any of the Zap fonts via ZapRedraw: > +- +- :set guifont= +- < To use the system font via the VDU drivers. Supports +- bold and underline. +- > +- :set guifont=Corpus.Medium +- < Use the named outline font. You can use any font, but +- only monospaced ones like Corpus look right. +- > +- :set guifont=Corpus.Medium:w8:h12:b:i +- < As before, but with size of 8 point by 12 point, and +- in bold italic. +- If only one of width and height is given then that +- value is used for both. If neither is given then 10 +- point is used. +- +- Thanks to John Kortink, Vim can use the ZapRedraw module. Start the font name +- with "!" (or "!!" for double height), like this: > +- +- :set guifont=!! +- < Use the system font, but via ZapRedraw. This gives a +- faster redraw on StrongARM processors, but you can't +- get bold or italic text. Double height. +- > +- :set guifont=!script +- < Uses the named Zap font (a directory in VimFont$Path). +- The redraw is the same speed as for "!!", but you get +- a nicer looking font. +- Only the "man+" and "script" fonts are supplied +- currently, but you can use any of the Zap fonts if +- they are in VimFont$Path. +- Vim will try to load font files "0", "B", "I" and "IB" +- from the named directory. Only "0" (normal style) MUST +- be present. Link files are not currently supported. +- +- Note that when using ZapRedraw the edit bar is drawn in front of the character +- you are on rather than behind it. Also redraw is incorrect for screen modes +- with eigen values of 0. If the font includes control characters then you can +- get Vim to display them by changing the 'isprint' option. +- +- If you find the scrolling is too slow on your machine, try experimenting +- with the 'scrolljump' and 'ttyscroll' options. +- +- In particular, StrongARM users may find that: > +- +- :set ttyscroll=0 +- +- makes scrolling faster in high-color modes. +- +- ============================================================================= +- *riscos-remote* +- 5. Remote use (telnet) +- +- I have included a built-in termcap entry, but you can edit the termcap file to +- allow other codes to be used if you want to use Vim from a remote terminal. +- +- Although I do not have an internet connection to my Acorn, I have managed to +- run Vim in a FreeTerm window using the loopback connection. +- +- It seems to work pretty well now, using "*vi -T ansi". +- +- ============================================================================== +- *riscos-temp-files* +- 6. Temporary files +- +- If Vim crashes then the swap and backup files (if any) will be in the +- directories set with the 'directory' and 'bdir' options. By default the swap +- files are in (i.e. inside !Scrap) and backups are in the +- directory you were saving to. Vim will allow you to try and recover the file +- when you next try to edit it. +- +- To see a list of swap files, press and type "*vi -r". +- +- Vim no longer brings up ATTENTION warnings if you try to edit two files with +- the same name in different directories. +- +- However, it also no longer warns if you try to edit the same file twice (with +- two copies of Vim), though you will still be warned when you save that the +- datestamp has changed. +- +- ============================================================================== +- *riscos-interrupt* +- 7. Interrupting +- +- To break out of a looping macro, or similar, hold down Escape in the +- command-line version, or press CTRL-C in the GUI version. +- +- ============================================================================== +- *riscos-memory* +- 8. Memory usage +- +- Vim will use dynamic areas on RISC OS 3.5 or later. If you can use them on +- older machines then edit the !RunTxt and GVim files. I don't know what UnixLib +- does by default on these machines so I'm playing safe. +- +- It doesn't work at all well without dynamic areas, since it can't change its +- memory allocation once running. Hence you should edit "!Vim.GVim" and +- "!Vim.!RunTxt" to choose the best size for you. You probably need at least +- about 1400K. +- +- ============================================================================== +- *riscos-filetypes* +- 9. Filetypes +- +- You can now specify that autocommands are only executed for files of certain +- types. The filetype is given in the form &xxx, when xxx is the filetype. +- +- Filetypes must be specified by number (e.g. &fff for Text). +- +- The system has changed from version 5.3. The new sequence of events is: +- +- - A file is loaded. |'osfiletype'| is set to the RISC OS filetype. +- - Based on the filetype and pathname, Vim will try to set |'filetype'| to the +- Vim-type of the file. +- - Setting this option may load syntax files and perform other actions. +- - Saving the file will give it a filetype of |'osfiletype'|. +- +- Some examples may make this clearer: +- +- Kind of file loaded osfiletype filetype ~ +- C code "c.hellow" Text (&fff) C +- LaTeX document LaTeX (&2a8) TeX +- Draw document DrawFile (&aff) (not changed) +- +- ============================================================================== +- *riscos-shell* +- 10. The shell +- +- - Bangs (!s) are only replaced if they are followed by a space or end-of-line, +- since many pathnames contain them. +- +- - You can prefix the command with "~", which stops any output from being +- displayed. This also means that you don't have to press afterwards, +- and stops the screen from being redrawn. {only in the GUI version} +- +- ============================================================================== +- *riscos-porting* +- 11. Porting new releases to RISC OS +- +- Downloading everything you need: +- +- - Get the latest source distribution (see www.vim.org) +- - Get the runtime environment files (e.g. these help files) +- - Get the RISC OS binary distribution (if possible) +- +- +- Unarchiving: +- +- - Create a raFS disk and put the archives on it +- - Un-gzip them +- - Un-tar them (*tar xELf 50 archive/tar) +- +- +- Recompiling the sources: +- +- - Create c, s, and h directories. +- - Put all the header files in "h". \ +- - Put all the C files in "c". | And lose the extensions +- - Put the assembler file ("swis/s") in "s". / +- - Rename all the files in "proto" to "h", like this: +- raFS::VimSrc.source.proto.file/pro +- becomes +- raFS::VimSrc.source.h.file_pro +- - In the files "h.proto" and "c.termlib", search and replace +- .pro" +- with +- _pro.h" +- - Create a simple Makefile if desired and do "*make -k". +- Use "CC = gcc -DRISCOS -DUSE_GUI -O2 -x c" in the Makefile. +- - Save the binary as !Vim.Vim in the binary distribution. +- +- +- Updating the run-time environment: +- +- - Replace old or missing files inside !Vim.Resources with the +- new files. +- - Remove files in "doc" not ending in "/txt", except for "tags". +- - Lose the extensions from the files in "doc". +- - Edit the "doc.tags" file. Remove extensions from the second column: > +- :%s/^\(.[^\t]*\t.*\)\.txt\t/\1\t/ +- - Remove extensions from the syntax files. Split them into two directories +- to avoid the 77 entry limit on old ADFS filesystems. +- - Edit "Vim:FileType" to match "*.c.*" as well as "*/c" and so on. +- Add filetype checking too. +- - Edit "Vim:Menu" and remove all the keys from the menus: > +- :%s/[^ \t]*// +- < + vim:tw=78:ts=8:ft=help:norl: +--- 1,12 ---- +! *os_risc.txt* For Vim version 7.3. Last change: 2011 May 10 + + + VIM REFERENCE MANUAL by Thomas Leonard + + + *riscos* *RISCOS* *RISC-OS* +! The RISC OS support has been removed from Vim with patch 7.3.187. +! If you would like to use Vim on RISC OS get the files from before that patch. + + + vim:tw=78:ts=8:ft=help:norl: +*** ../vim-7.3.186/src/version.c 2011-05-10 16:12:40.000000000 +0200 +--- src/version.c 2011-05-10 16:37:20.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 187, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +81. At social functions you introduce your husband as "my domain server." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 7b37e91537a8a8a1ec05c40ea8475b864d6aebc1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:54 +0200 Subject: [PATCH 0205/3803] - patchlevel 188 --- 7.3.188 | 184 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 7.3.188 diff --git a/7.3.188 b/7.3.188 new file mode 100644 index 00000000..f5845430 --- /dev/null +++ b/7.3.188 @@ -0,0 +1,184 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.188 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.188 +Problem: More RISC OS files to remove. +Solution: Remove them. Update the file list. +Files: src/proto/gui_riscos.pro, src/proto/os_riscos.pro, Filelist + + +*** ../vim-7.3.187/src/proto/gui_riscos.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_riscos.pro 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,66 **** +- /* Prototypes for gui_riscos.c +- * Based on gui_x11_pro.h (10 March 2002 version) +- */ +- void gui_mch_prepare __ARGS((int *argc, char **argv)); +- int gui_mch_init_check __ARGS((void)); +- int gui_mch_init __ARGS((void)); +- void gui_mch_uninit __ARGS((void)); +- void gui_mch_new_colors __ARGS((void)); +- int gui_mch_open __ARGS((void)); +- void gui_init_tooltip_font __ARGS((void)); +- void gui_init_menu_font __ARGS((void));void gui_mch_exit __ARGS((int rc)); +- int gui_mch_get_winpos __ARGS((int *x, int *y)); +- void gui_mch_set_winpos __ARGS((int x, int y)); +- void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height)); +- void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h)); +- int gui_mch_init_font __ARGS((char_u *font_name, int do_fontset)); +- GuiFont gui_mch_get_font __ARGS((char_u *name, int giveErrorIfMissing)); +- int gui_mch_adjust_charheight __ARGS((void)); +- void gui_mch_set_font __ARGS((GuiFont font)); +- void gui_mch_set_fontset __ARGS((GuiFontset fontset)); +- void gui_mch_free_font __ARGS((GuiFont font)); +- void gui_mch_free_fontset __ARGS((GuiFontset fontset)); +- GuiFontset gui_mch_get_fontset __ARGS((char_u *name, int giveErrorIfMissing, int fixed_width)); +- guicolor_T gui_mch_get_color __ARGS((char_u *reqname)); +- void gui_mch_set_fg_color __ARGS((guicolor_T color)); +- void gui_mch_set_bg_color __ARGS((guicolor_T color)); +- void gui_mch_draw_string __ARGS((int row, int col, char_u *s, int len, int flags)); +- int gui_mch_haskey __ARGS((char_u *name)); +- void gui_mch_beep __ARGS((void)); +- void gui_mch_flash __ARGS((int msec)); +- void gui_mch_invert_rectangle __ARGS((int r, int c, int nr, int nc)); +- void gui_mch_iconify __ARGS((void)); +- void gui_mch_set_foreground __ARGS((void)); +- void gui_mch_draw_hollow_cursor __ARGS((guicolor_T color)); +- void gui_mch_draw_part_cursor __ARGS((int w, int h, guicolor_T color)); +- void gui_mch_update __ARGS((void)); +- int gui_mch_wait_for_chars __ARGS((long wtime)); +- void gui_mch_flush __ARGS((void)); +- void gui_mch_clear_block __ARGS((int row1, int col1, int row2, int col2)); +- void gui_mch_clear_all __ARGS((void)); +- void gui_mch_delete_lines __ARGS((int row, int num_lines)); +- void gui_mch_insert_lines __ARGS((int row, int num_lines)); +- void clip_mch_lose_selection __ARGS((VimClipboard *cbd)); +- int clip_mch_own_selection __ARGS((VimClipboard *cbd)); +- void clip_mch_request_selection __ARGS((VimClipboard *cbd)); +- void clip_mch_set_selection __ARGS((VimClipboard *cbd)); +- void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); +- void gui_mch_menu_hidden __ARGS((vimmenu_T *menu, int hidden)); +- void gui_mch_draw_menubar __ARGS((void)); +- void gui_mch_set_blinking __ARGS((long waittime, long on, long off)); +- void gui_mch_stop_blink __ARGS((void)); +- void gui_mch_start_blink __ARGS((void)); +- void process_event __ARGS((int event, int *block)); +- void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); +- long_u gui_mch_get_rgb __ARGS((guicolor_T pixel)); +- void gui_mch_getmouse __ARGS((int *x, int *y)); +- void gui_mch_setmouse __ARGS((int x, int y)); +- void gui_mch_drawsign __ARGS((int row, int col, int typenr)); +- void gui_mch_destroy_sign __ARGS((XImage *sign)); +- void gui_mch_mousehide __ARGS((int hide)); +- void mch_set_mouse_shape __ARGS((int shape)); +- void gui_mch_menu_set_tip __ARGS((vimmenu_T *menu)); +- +- void ro_redraw_title __ARGS((int window)); +- int ro_ok_to_quit __ARGS((void)); +- /* vim: set ft=c : */ +--- 0 ---- +*** ../vim-7.3.187/src/proto/os_riscos.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/os_riscos.pro 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,49 **** +- /* os_riscos.c */ +- void mch_write __ARGS((char_u *s, int len)); +- int mch_inchar __ARGS((char_u *buf, int maxlen, long wtime, int tb_change_cnt)); +- int mch_char_avail __ARGS((void)); +- long_u mch_avail_mem __ARGS((int special)); +- void mch_delay __ARGS((long msec, int ignoreinput)); +- void mch_suspend __ARGS((void)); +- void mch_init __ARGS((void)); +- int mch_check_win __ARGS((int argc, char **argv)); +- int mch_input_isatty __ARGS((void)); +- int mch_can_restore_title __ARGS((void)); +- int mch_can_restore_icon __ARGS((void)); +- void mch_settitle __ARGS((char_u *title, char_u *icon)); +- void mch_restore_title __ARGS((int which)); +- int mch_get_user_name __ARGS((char_u *s, int len)); +- void mch_get_host_name __ARGS((char_u *s, int len)); +- long mch_get_pid __ARGS((void)); +- int mch_dirname __ARGS((char_u *buf, int len)); +- int mch_FullName __ARGS((char_u *fname, char_u *buf, int len, int force)); +- int mch_isFullName __ARGS((char_u *fname)); +- long mch_getperm __ARGS((char_u *name)); +- int mch_setperm __ARGS((char_u *name, long perm)); +- void mch_hide __ARGS((char_u *name)); +- int mch_isdir __ARGS((char_u *name)); +- int mch_can_exe __ARGS((char_u *name)); +- int mch_nodetype __ARGS((char_u *name)); +- void mch_early_init __ARGS((void)); +- void mch_exit __ARGS((int r)); +- void mch_settmode __ARGS((int tmode)); +- void mch_setmouse __ARGS((int on)); +- int mch_screenmode __ARGS((char_u *arg)); +- int mch_get_shellsize __ARGS((void)); +- void mch_set_shellsize __ARGS((void)); +- void mch_new_shellsize __ARGS((void)); +- int mch_call_shell __ARGS((char_u *cmd, int options)); +- void mch_breakcheck __ARGS((void)); +- int mch_expandpath __ARGS((garray_T *gap, char_u *path, int flags)); +- int expand_section __ARGS((garray_T *gap, char_u *root, char_u *rest, int flags)); +- int mch_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags)); +- int mch_has_exp_wildcard __ARGS((char_u *p)); +- int mch_has_wildcard __ARGS((char_u *p)); +- int mch_remove __ARGS((char_u *file)); +- char_u *mch_munge_fname __ARGS((char_u *fname)); +- int ro_buflist_add __ARGS((char_u *old_name)); +- int mch_chdir __ARGS((char_u *dir)); +- void mch_read_filetype __ARGS((char_u *file)); +- void mch_set_filetype __ARGS((char_u *file, char_u *type)); +- int mch_check_filetype __ARGS((char_u *fname, char_u *type)); +- /* vim: set ft=c : */ +--- 0 ---- +*** ../vim-7.3.187/Filelist 2011-03-22 18:10:34.000000000 +0100 +--- Filelist 2011-05-10 17:19:21.000000000 +0200 +*************** +*** 428,435 **** + README_os390.txt \ + src/Make_mint.mak \ + src/Make_ro.mak \ +- src/gui_riscos.c \ +- src/gui_riscos.h \ + src/if_sniff.c \ + src/infplist.xml \ + src/link.390 \ +--- 428,433 ---- +*************** +*** 437,446 **** + src/os_beos.h \ + src/os_beos.rsrc \ + src/os_mint.h \ +- src/os_riscos.c \ +- src/os_riscos.h \ +- src/proto/gui_riscos.pro \ +- src/proto/os_riscos.pro \ + src/os_vms_fix.com \ + src/toolbar.phi \ + +--- 435,440 ---- +*** ../vim-7.3.187/src/version.c 2011-05-10 16:41:13.000000000 +0200 +--- src/version.c 2011-05-10 17:20:50.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 188, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +83. Batteries in the TV remote now last for months. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a45a93725d2560e9851249efabca36bf3c6ff99e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:55 +0200 Subject: [PATCH 0206/3803] - patchlevel 189 --- 7.3.189 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 7.3.189 diff --git a/7.3.189 b/7.3.189 new file mode 100644 index 00000000..f7a9667c --- /dev/null +++ b/7.3.189 @@ -0,0 +1,49 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.189 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.189 (after 7.3.186) +Problem: Can't build without +clipboard feature. (Christian Ebert) +Solution: Add the missing #ifdef. +Files: src/normal.c + + +*** ../vim-7.3.188/src/normal.c 2011-05-10 16:12:40.000000000 +0200 +--- src/normal.c 2011-05-10 17:25:26.000000000 +0200 +*************** +*** 1204,1212 **** +--- 1204,1215 ---- + #ifdef FEAT_EVAL + { + int regname = 0; ++ + /* Adjust the register according to 'clipboard', so that when + * "unnamed" is present it becomes '*' or '+' instead of '"'. */ ++ # ifdef FEAT_CLIPBOARD + adjust_clip_reg(®name); ++ # endif + set_reg_var(regname); + } + #endif +*** ../vim-7.3.188/src/version.c 2011-05-10 17:21:34.000000000 +0200 +--- src/version.c 2011-05-10 17:29:21.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 189, + /**/ + +-- +If your nose runs, and your feet smell, you might be upside down. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 75de58f6cbba8150a8c3d75ff61b12dce2abab97 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 11 May 2011 17:23:55 +0200 Subject: [PATCH 0207/3803] - patchlevel 189 --- README.patches | 51 +++++++++++++++++++++++ vim.spec | 107 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 157 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index 33227b9a..4ea2ced0 100644 --- a/README.patches +++ b/README.patches @@ -164,3 +164,54 @@ Individual patches for Vim 7.3: 1653 7.3.136 duplicate include of assert.h 2881 7.3.137 when 'lazyredraw' is set the screen may not be updated 2399 7.3.138 ":com" changes the multi-byte text of :echo + 3685 7.3.139 (after 7.3.137) can't read ":ver" output when 'lazyredraw' set + 1797 7.3.140 crash when 'cursorline' and 'list' both set + 2968 7.3.141 when a key code is not set get a confusing error message + 2593 7.3.142 Python stdout doesn't have flush(), causing an import to fail + 45956 7.3.143 memfile insufficiently tested; inefficient with many blocks + 2387 7.3.144 crash with ":python help(dir)" + 2400 7.3.145 (after 7.3.144) can't build with Python dynamically loading + 6571 7.3.146 can assign to dict member with invalid name + 1575 7.3.147 (after 7.3.143) can't build on HP-UX + 7615 7.3.148 huge number of syntax items or clusters causes hang or crash + 2205 7.3.149 the cursor disappears after the 'setDot' netbeans command + 2960 7.3.150 readline() does not return the last line when NL is missing + 2077 7.3.151 with "unnamedplus" in 'clipboard' selection also copied to "* + 14784 7.3.152 xxd does not check for errors of library functions + 1775 7.3.153 compiler warning for ambiguous else, missing prototype in xxd + 3570 7.3.154 (after 7.3.148) can't compile with tiny features + 8459 7.3.155 crash when using map(), filter(), remove(), extend() on v: + 2727 7.3.156 Tty names possibly left unterminated + 1583 7.3.157 superfluous assignment + 1497 7.3.158 might use uninitialized memory in C indenting + 1587 7.3.159 using uninitialized pointer when out of memory + 13647 7.3.160 unsafe string copying + 43528 7.3.161 items on the stack may be too big + 2564 7.3.162 no error message assigning to a list with index out of range + 2016 7.3.163 the default 'shellpipe' doesn't recognize "mksh" and "pdksh" + 4014 7.3.164 C-indenting doesn't recognize some function declarations + 1558 7.3.165 ":find" completion does not escape spaces in directory name + 1765 7.3.166 buffer on the stack may be too big + 2932 7.3.167 when using internal grep QuickFixCmdPost is not triggered + 2019 7.3.168 CR in second argument of input() causes problems + 3659 7.3.169 freeing memory already freed, warning from code analyzer + 2429 7.3.170 VMS: test77 missing from Makefile + 4511 7.3.171 confusing message from ":yank" when no clipboard support + 8382 7.3.172 MS-Windows: rename() might delete a file + 2429 7.3.173 ":cwindow" may open a window when the quickfix list is empty + 4618 7.3.174 when Exuberant ctags binary is exctags it's not found + 1482 7.3.175 ":new" may result in wrong 'colorcolumn' highlighting + 6968 7.3.176 Ruby linking doesn't work properly on Mac OS X + 2814 7.3.177 MS-Windows: mkdir() works wrong when 'encoding' is "utf-8" + 4019 7.3.178 C-indent doesn't handle code right after { correctly + 2144 7.3.179 C-indent doesn't handle colon in string correctly + 8439 7.3.180 better matching end part of 'comments' not used after middle + 4509 7.3.181 display update error when repeating insert of CTRL-V / digraph + 1684 7.3.182 (after 7.3.180) unused variable compiler warning + 3761 7.3.183 when Exuberant ctags binary is exuberant-ctags it's not found + 2532 7.3.184 static code analysis errors in riscOS + 2570 7.3.185 ":windo g/pattern/q" reports wrong number of lines + 1713 7.3.186 v:register wrong when 'clipboard' contains "unnamed" +173872 7.3.187 the RISC OS port is not being maintained, remove it + 7901 7.3.188 some more RISC OS files to be removed + 1476 7.3.189 (after 7.3.186) build fails without +clipboard diff --git a/vim.spec b/vim.spec index 195dbd6e..3597be5f 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 138 +%define patchlevel 189 Summary: The VIM editor URL: http://www.vim.org/ @@ -202,6 +202,57 @@ Patch135: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.135 Patch136: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.136 Patch137: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.137 Patch138: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.138 +Patch139: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.139 +Patch140: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.140 +Patch141: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.141 +Patch142: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.142 +Patch143: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.143 +Patch144: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.144 +Patch145: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.145 +Patch146: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.146 +Patch147: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.147 +Patch148: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.148 +Patch149: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.149 +Patch150: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.150 +Patch151: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.151 +Patch152: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.152 +Patch153: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.153 +Patch154: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.154 +Patch155: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.155 +Patch156: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.156 +Patch157: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.157 +Patch158: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.158 +Patch159: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.159 +Patch160: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.160 +Patch161: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.161 +Patch162: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.162 +Patch163: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.163 +Patch164: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.164 +Patch165: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.165 +Patch166: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.166 +Patch167: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.167 +Patch168: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.168 +Patch169: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.169 +Patch170: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.170 +Patch171: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.171 +Patch172: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.172 +Patch173: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.173 +Patch174: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.174 +Patch175: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.175 +Patch176: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.176 +Patch177: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.177 +Patch178: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.178 +Patch179: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.179 +Patch180: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.180 +Patch181: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.181 +Patch182: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.182 +Patch183: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.183 +Patch184: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.184 +Patch185: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.185 +Patch186: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.186 +Patch187: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.187 +Patch188: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.188 +Patch189: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.189 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -484,6 +535,57 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch136 -p0 %patch137 -p0 %patch138 -p0 +%patch139 -p0 +%patch140 -p0 +%patch141 -p0 +%patch142 -p0 +%patch143 -p0 +%patch144 -p0 +%patch145 -p0 +%patch146 -p0 +%patch147 -p0 +%patch148 -p0 +%patch149 -p0 +%patch150 -p0 +%patch151 -p0 +%patch152 -p0 +%patch153 -p0 +%patch154 -p0 +%patch155 -p0 +%patch156 -p0 +%patch157 -p0 +%patch158 -p0 +%patch159 -p0 +%patch160 -p0 +%patch161 -p0 +%patch162 -p0 +%patch163 -p0 +%patch164 -p0 +%patch165 -p0 +%patch166 -p0 +%patch167 -p0 +%patch168 -p0 +%patch169 -p0 +%patch170 -p0 +%patch171 -p0 +%patch172 -p0 +%patch173 -p0 +%patch174 -p0 +%patch175 -p0 +%patch176 -p0 +%patch177 -p0 +%patch178 -p0 +%patch179 -p0 +%patch180 -p0 +%patch181 -p0 +%patch182 -p0 +%patch183 -p0 +%patch184 -p0 +%patch185 -p0 +%patch186 -p0 +%patch187 -p0 +%patch188 -p0 +%patch189 -p0 # install spell files @@ -951,6 +1053,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Wed May 11 2011 Karsten Hopp 7.3.189-1 +- patchlevel 189 + * Wed Mar 16 2011 Karsten Hopp 7.3.138-1 - patchlevel 138 From 3923029eb30e03f10787f1a4a228cbd119bb157c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:41 +0200 Subject: [PATCH 0208/3803] - patchlevel 190 --- 7.3.190 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 7.3.190 diff --git a/7.3.190 b/7.3.190 new file mode 100644 index 00000000..4adef8ab --- /dev/null +++ b/7.3.190 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.190 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.190 +Problem: When there is a "containedin" syntax argument highlighting may be + wrong. (Radek) +Solution: Reset current_next_list. (Ben Schmidt) +Files: src/syntax.c + + +*** ../vim-7.3.189/src/syntax.c 2011-04-11 16:56:29.000000000 +0200 +--- src/syntax.c 2011-05-19 12:02:43.000000000 +0200 +*************** +*** 2566,2571 **** +--- 2566,2574 ---- + #endif + update_si_attr(current_state.ga_len - 1); + ++ /* nextgroup= should not match in the end pattern */ ++ current_next_list = NULL; ++ + /* what matches next may be different now, clear it */ + next_match_idx = 0; + next_match_col = MAXCOL; +*** ../vim-7.3.189/src/version.c 2011-05-10 17:29:28.000000000 +0200 +--- src/version.c 2011-05-19 12:13:28.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 190, + /**/ + +-- +From "know your smileys": + :'-D Laughing so much that they're crying + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e8d3b2f48b8a55c71333bd183b3b579f8d4b838d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:43 +0200 Subject: [PATCH 0209/3803] - patchlevel 191 --- 7.3.191 | 526 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 526 insertions(+) create mode 100644 7.3.191 diff --git a/7.3.191 b/7.3.191 new file mode 100644 index 00000000..14b63cea --- /dev/null +++ b/7.3.191 @@ -0,0 +1,526 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.191 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.191 +Problem: Still some RISC OS stuff to remove. +Solution: Remove files and lines. (Hong Xu) + Remove the 'osfiletype' option code. +Files: README_extra.txt, src/Make_ro.mak, src/INSTALL, src/Makefile, + src/buffer.c, src/eval.c, src/feature.h, src/option.c, + src/option.h, src/structs.h, src/version.c, src/pty.c, Filelist + + +*** ../vim-7.3.190/README_extra.txt 2010-08-15 21:57:32.000000000 +0200 +--- README_extra.txt 2011-05-19 12:35:16.000000000 +0200 +*************** +*** 13,21 **** + + src/os_amiga.* Files for the Amiga port. + +- src/gui_riscos.* +- src/os_riscos.* Files for the RISC OS port. +- + src/gui_beos.* + src/os_beos.* Files for the BeOS port. + +--- 13,18 ---- +*** ../vim-7.3.190/src/Make_ro.mak 2010-08-15 21:57:27.000000000 +0200 +--- src/Make_ro.mak 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,135 **** +- # +- # Makefile for Vim on RISC OS - Andy Wingate +- # +- +- GCC = gcc -mthrowback +- CFLAGS = -DRISCOS -DFEAT_GUI +- CC = $(GCC) $(CFLAGS) -O2 +- # -DUP_BC_PC_EXTERN for term.c needed as BC defined in termlib.c and term.c +- +- TERMFLAG = -DUP_BC_PC_EXTERN +- +- ASMFLAGS = -throwback -objasm -gcc +- +- OBJS = o.buffer o.charset o.diff o.digraph o.edit o.eval o.ex_cmds o.ex_cmds2 \ +- o.ex_docmd o.ex_eval o.ex_getln o.fileio o.fold o.getchar \ +- o.hardcopy o.hashtab o.main o.mark o.mbyte \ +- o.memfile o.memline o.menu o.message o.misc1 o.misc2 o.move \ +- o.normal o.ops o.option o.popupmnu o.quickfix o.regexp o.screen \ +- o.search \ +- o.spell o.syntax o.tag o.term o.termlib o.ui o.undo o.version \ +- o.window o.os_riscos o.swis o.gui o.gui_riscos +- +- Vim: $(OBJS) +- $(GCC) -o Vim $(OBJS) +- +- install: Vim +- squeeze -v Vim @.!Vim.Vim +- +- clean: +- create o.!fake! 0 +- wipe o.* ~cf +- remove Vim +- +- o.swis: s.swis +- as $(ASMFLAGS) -o o.swis s.swis +- +- # Rules for object files +- +- o.%: c.% +- $(CC) -c $< -o $@ +- +- o.buffer: c.buffer +- +- o.charset: c.charset +- +- o.digraph: c.digraph +- +- o.diff: c.diff +- +- o.edit: c.edit +- +- o.eval: c.eval +- +- o.ex_cmds: c.ex_cmds +- +- o.ex_cmds2: c.ex_cmds2 +- +- o.ex_docmd: c.ex_docmd +- +- o.ex_eval: c.ex_eval +- +- o.ex_getln: c.ex_getln +- +- o.fileio: c.fileio +- +- o.fold: c.fold +- +- o.getchar: c.getchar +- +- o.hardcopy: c.hardcopy +- +- o.hashtab: c.hashtab +- +- o.gui: c.gui +- +- o.gui_riscos: c.gui_riscos +- +- o.main: c.main +- +- o.mark: c.mark +- +- o.mbyte: c.mbyte +- +- o.memfile: c.memfile +- +- o.memline: c.memline +- +- o.menu: c.menu +- +- o.message: c.message +- +- o.misc1: c.misc1 +- +- o.misc2: c.misc2 +- +- o.move: c.move +- +- o.normal: c.normal +- +- o.ops: c.ops +- +- o.option: c.option +- +- o.os_riscos: c.os_riscos +- +- o.pty: c.pty +- +- o.popupmnu: c.popupmnu +- +- o.quickfix: c.quickfix +- +- o.regexp: c.regexp +- +- o.screen: c.screen +- +- o.search: c.search +- +- o.spell: c.spell +- +- o.syntax: c.syntax +- +- o.tag: c.tag +- +- o.term: c.term +- $(CC) $(TERMFLAG) -c c.term -o o.term +- +- o.termlib: c.termlib +- +- o.ui: c.ui +- +- o.undo: c.undo +- +- o.version: c.version +- +- o.window: c.window +--- 0 ---- +*** ../vim-7.3.190/src/INSTALL 2010-08-15 21:57:28.000000000 +0200 +--- src/INSTALL 2011-05-19 12:36:17.000000000 +0200 +*************** +*** 6,14 **** + Contents: + 1. Generic + 2. Unix +! 3. RISC OS +! 4. OS/2 (with EMX 0.9b) +! 5. Atari MiNT + + See INSTALLami.txt for Amiga + See INSTALLmac.txt for Macintosh +--- 6,13 ---- + Contents: + 1. Generic + 2. Unix +! 3. OS/2 (with EMX 0.9b) +! 4. Atari MiNT + + See INSTALLami.txt for Amiga + See INSTALLmac.txt for Macintosh +*************** +*** 174,198 **** + ./configure --without-local-dir + + +! 3. RISC OS +! ============= +! +! Much file renaming is needed before you can compile anything. +! You'll need UnixLib to link against, GCC and GNU make. +! +! I suggest you get the RISC OS binary distribution, which includes the +! Templates file and the loader. +! +! Try here: http://www.ecs.soton.ac.uk/~tal197 +! +! Do +! :help riscos +! +! within the editor for more information, or read the +! ../runtime/doc/os_risc.txt help file. +! +! +! 4. OS/2 + ======= + + Summary: +--- 173,179 ---- + ./configure --without-local-dir + + +! 3. OS/2 + ======= + + Summary: +*************** +*** 237,243 **** + Check ../runtime/doc/os_os2.txt for additional info on running Vim. + + +! 5. Atari MiNT + ============= + + [NOTE: this is quite old, it might not work anymore] +--- 218,224 ---- + Check ../runtime/doc/os_os2.txt for additional info on running Vim. + + +! 4. Atari MiNT + ============= + + [NOTE: this is quite old, it might not work anymore] +*** ../vim-7.3.190/src/Makefile 2011-04-01 13:05:37.000000000 +0200 +--- src/Makefile 2011-05-19 12:37:52.000000000 +0200 +*************** +*** 29,35 **** + # - Uncomment the line "CONF_OPT_X = --without-x" if you have X11 but + # want to disable using X11 libraries. This speeds up starting Vim, + # but the window title will not be set and the X11 selection can not +! # used. + # - Uncomment the line "CONF_OPT_XSMP = --disable-xsmp" if you have the + # X11 Session Management Protocol (XSMP) library (libSM) but do not + # want to use it. +--- 29,35 ---- + # - Uncomment the line "CONF_OPT_X = --without-x" if you have X11 but + # want to disable using X11 libraries. This speeds up starting Vim, + # but the window title will not be set and the X11 selection can not +! # be used. + # - Uncomment the line "CONF_OPT_XSMP = --disable-xsmp" if you have the + # X11 Session Management Protocol (XSMP) library (libSM) but do not + # want to use it. +*************** +*** 730,741 **** + ### USL for Unix Systems Laboratories (SYSV 4.2) + #EXTRA_DEFS = -DUSL + +- ### RISCos on MIPS without X11 +- #EXTRA_DEFS = -DMIPS +- +- ### RISCos on MIPS with X11 +- #EXTRA_LIBS = -lsun +- + ### (6) A/UX 3.1.1 with gcc (Jim Jagielski) + #CC= gcc -D_POSIX_SOURCE + #CFLAGS= -O2 +--- 730,735 ---- +*************** +*** 1633,1639 **** + RSRC_DIR = os_mac_rsrc + + PRO_MANUAL = os_amiga.pro os_msdos.pro os_win16.pro os_win32.pro \ +! os_mswin.pro os_beos.pro os_vms.pro os_riscos.pro $(PERL_PRO) + + # Default target is making the executable and tools + all: $(VIMTARGET) $(TOOLS) languages $(GUI_BUNDLE) +--- 1627,1633 ---- + RSRC_DIR = os_mac_rsrc + + PRO_MANUAL = os_amiga.pro os_msdos.pro os_win16.pro os_win32.pro \ +! os_mswin.pro os_beos.pro os_vms.pro $(PERL_PRO) + + # Default target is making the executable and tools + all: $(VIMTARGET) $(TOOLS) languages $(GUI_BUNDLE) +*** ../vim-7.3.190/src/buffer.c 2011-05-05 17:32:40.000000000 +0200 +--- src/buffer.c 2011-05-19 13:09:25.000000000 +0200 +*************** +*** 1808,1816 **** + #ifdef FEAT_AUTOCMD + clear_string_option(&buf->b_p_ft); + #endif +- #ifdef FEAT_OSFILETYPE +- clear_string_option(&buf->b_p_oft); +- #endif + #ifdef FEAT_CINDENT + clear_string_option(&buf->b_p_cink); + clear_string_option(&buf->b_p_cino); +--- 1808,1813 ---- +*** ../vim-7.3.190/src/eval.c 2011-05-10 16:41:13.000000000 +0200 +--- src/eval.c 2011-05-19 13:09:43.000000000 +0200 +*************** +*** 12076,12084 **** + #ifdef FEAT_OLE + "ole", + #endif +- #ifdef FEAT_OSFILETYPE +- "osfiletype", +- #endif + #ifdef FEAT_PATH_EXTRA + "path_extra", + #endif +--- 12076,12081 ---- +*** ../vim-7.3.190/src/feature.h 2010-08-15 21:57:31.000000000 +0200 +--- src/feature.h 2011-05-19 13:09:56.000000000 +0200 +*************** +*** 506,520 **** + #endif + + /* +- * +osfiletype filetype checking in autocommand patterns. +- * Only on systems that support filetypes (RISC OS). +- */ +- #if 0 +- # define FEAT_OSFILETYPE +- # define DFLT_OFT "Text" +- #endif +- +- /* + * +viminfo reading/writing the viminfo file. Takes about 8Kbyte + * of code. + * VIMINFO_FILE Location of user .viminfo file (should start with $). +--- 506,511 ---- +*** ../vim-7.3.190/src/option.c 2011-04-28 17:24:54.000000000 +0200 +--- src/option.c 2011-05-19 13:11:42.000000000 +0200 +*************** +*** 140,148 **** + #define PV_MOD OPT_BUF(BV_MOD) + #define PV_MPS OPT_BUF(BV_MPS) + #define PV_NF OPT_BUF(BV_NF) +- #ifdef FEAT_OSFILETYPE +- # define PV_OFT OPT_BUF(BV_OFT) +- #endif + #ifdef FEAT_COMPL_FUNC + # define PV_OFU OPT_BUF(BV_OFU) + #endif +--- 140,145 ---- +*************** +*** 337,345 **** + static int p_mod; + static char_u *p_mps; + static char_u *p_nf; +- #ifdef FEAT_OSFILETYPE +- static char_u *p_oft; +- #endif + static int p_pi; + #ifdef FEAT_TEXTOBJ + static char_u *p_qe; +--- 334,339 ---- +*************** +*** 1901,1914 **** + (char_u *)NULL, PV_NONE, + {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"osfiletype", "oft", P_STRING|P_ALLOCED|P_VI_DEF, +- #ifdef FEAT_OSFILETYPE +- (char_u *)&p_oft, PV_OFT, +- {(char_u *)DFLT_OFT, (char_u *)0L} +- #else + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} +! #endif +! SCRIPTID_INIT}, + {"paragraphs", "para", P_STRING|P_VI_DEF, + (char_u *)&p_para, PV_NONE, + {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp", +--- 1895,1902 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"osfiletype", "oft", P_STRING|P_ALLOCED|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"paragraphs", "para", P_STRING|P_VI_DEF, + (char_u *)&p_para, PV_NONE, + {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp", +*************** +*** 5282,5290 **** + #ifdef FEAT_AUTOCMD + check_string_option(&buf->b_p_ft); + #endif +- #ifdef FEAT_OSFILETYPE +- check_string_option(&buf->b_p_oft); +- #endif + #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT) + check_string_option(&buf->b_p_cinw); + #endif +--- 5270,5275 ---- +*************** +*** 9665,9673 **** + case PV_MA: return (char_u *)&(curbuf->b_p_ma); + case PV_MOD: return (char_u *)&(curbuf->b_changed); + case PV_NF: return (char_u *)&(curbuf->b_p_nf); +- #ifdef FEAT_OSFILETYPE +- case PV_OFT: return (char_u *)&(curbuf->b_p_oft); +- #endif + case PV_PI: return (char_u *)&(curbuf->b_p_pi); + #ifdef FEAT_TEXTOBJ + case PV_QE: return (char_u *)&(curbuf->b_p_qe); +--- 9650,9655 ---- +*************** +*** 10018,10026 **** + /* Don't copy 'filetype', it must be detected */ + buf->b_p_ft = empty_option; + #endif +- #ifdef FEAT_OSFILETYPE +- buf->b_p_oft = vim_strsave(p_oft); +- #endif + buf->b_p_pi = p_pi; + #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT) + buf->b_p_cinw = vim_strsave(p_cinw); +--- 10000,10005 ---- +*** ../vim-7.3.190/src/option.h 2011-02-12 13:59:55.000000000 +0100 +--- src/option.h 2011-05-19 13:11:46.000000000 +0200 +*************** +*** 984,992 **** + , BV_MOD + , BV_MPS + , BV_NF +- #ifdef FEAT_OSFILETYPE +- , BV_OFT +- #endif + #ifdef FEAT_COMPL_FUNC + , BV_OFU + #endif +--- 984,989 ---- +*** ../vim-7.3.190/src/structs.h 2011-05-10 16:41:13.000000000 +0200 +--- src/structs.h 2011-05-19 13:11:58.000000000 +0200 +*************** +*** 1530,1538 **** + int b_p_ml_nobin; /* b_p_ml saved for binary mode */ + int b_p_ma; /* 'modifiable' */ + char_u *b_p_nf; /* 'nrformats' */ +- #ifdef FEAT_OSFILETYPE +- char_u *b_p_oft; /* 'osfiletype' */ +- #endif + int b_p_pi; /* 'preserveindent' */ + #ifdef FEAT_TEXTOBJ + char_u *b_p_qe; /* 'quoteescape' */ +--- 1530,1535 ---- +*** ../vim-7.3.190/src/version.c 2011-05-19 12:14:03.000000000 +0200 +--- src/version.c 2011-05-19 13:26:42.000000000 +0200 +*************** +*** 426,436 **** + "-ole", + # endif + #endif +- #ifdef FEAT_OSFILETYPE +- "+osfiletype", +- #else +- "-osfiletype", +- #endif + #ifdef FEAT_PATH_EXTRA + "+path_extra", + #else +--- 426,431 ---- +*** ../vim-7.3.190/src/pty.c 2011-04-11 14:24:33.000000000 +0200 +--- src/pty.c 2011-05-19 12:43:26.000000000 +0200 +*************** +*** 123,130 **** + static void initmaster __ARGS((int)); + + /* +! * Open all ptys with O_NOCTTY, just to be on the safe side +! * (RISCos mips breaks otherwise) + */ + #ifndef O_NOCTTY + # define O_NOCTTY 0 +--- 123,129 ---- + static void initmaster __ARGS((int)); + + /* +! * Open all ptys with O_NOCTTY, just to be on the safe side. + */ + #ifndef O_NOCTTY + # define O_NOCTTY 0 +*** ../vim-7.3.190/Filelist 2011-05-10 17:21:34.000000000 +0200 +--- Filelist 2011-05-19 13:37:25.000000000 +0200 +*************** +*** 427,433 **** + $(SRC_VMS) \ + README_os390.txt \ + src/Make_mint.mak \ +- src/Make_ro.mak \ + src/if_sniff.c \ + src/infplist.xml \ + src/link.390 \ +--- 427,432 ---- +*** ../vim-7.3.190/src/version.c 2011-05-19 12:14:03.000000000 +0200 +--- src/version.c 2011-05-19 13:26:42.000000000 +0200 +*************** +*** 716,717 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 191, + /**/ + +-- +From "know your smileys": + :-& Eating spaghetti + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 64ab23aac7d17b59f59b34fb1b04ea0165e3306d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:44 +0200 Subject: [PATCH 0210/3803] - patchlevel 192 --- 7.3.192 | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 7.3.192 diff --git a/7.3.192 b/7.3.192 new file mode 100644 index 00000000..5dab19b4 --- /dev/null +++ b/7.3.192 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.192 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.192 +Problem: Ex command ":s/ \?/ /g" splits multi-byte characters into bytes. + (Dominique Pelle) +Solution: Advance over whole character instead of one byte. +Files: src/ex_cmds.c + + +*** ../vim-7.3.191/src/ex_cmds.c 2011-05-10 16:41:13.000000000 +0200 +--- src/ex_cmds.c 2011-05-19 14:23:33.000000000 +0200 +*************** +*** 4625,4631 **** + * for a match in this line again. */ + skip_match = TRUE; + else +! ++matchcol; /* search for a match at next column */ + goto skip; + } + +--- 4625,4639 ---- + * for a match in this line again. */ + skip_match = TRUE; + else +! { +! /* search for a match at next column */ +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! matchcol += mb_ptr2len(sub_firstline + matchcol); +! else +! #endif +! ++matchcol; +! } + goto skip; + } + +*** ../vim-7.3.191/src/version.c 2011-05-19 13:40:47.000000000 +0200 +--- src/version.c 2011-05-19 14:28:44.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 192, + /**/ + +-- +From "know your smileys": + :-F Bucktoothed vampire with one tooth missing + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e9cbc861abc446aa670f36255d04c1aa2927b3b5 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:44 +0200 Subject: [PATCH 0211/3803] - patchlevel 193 --- 7.3.193 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 7.3.193 diff --git a/7.3.193 b/7.3.193 new file mode 100644 index 00000000..acee9ec0 --- /dev/null +++ b/7.3.193 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.193 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.193 +Problem: In the command line window ":close" doesn't work properly. (Tony + Mechelynck) +Solution: Use Ctrl_C instead of K_IGNORE for cmdwin_result. (Jean-Rene + David) +Files: src/ex_docmd.c, src/ex_getln.c + + +*** ../vim-7.3.192/src/ex_docmd.c 2011-05-10 16:41:13.000000000 +0200 +--- src/ex_docmd.c 2011-05-19 14:42:56.000000000 +0200 +*************** +*** 6472,6478 **** + { + # ifdef FEAT_CMDWIN + if (cmdwin_type != 0) +! cmdwin_result = K_IGNORE; + else + # endif + if (!text_locked() +--- 6472,6478 ---- + { + # ifdef FEAT_CMDWIN + if (cmdwin_type != 0) +! cmdwin_result = Ctrl_C; + else + # endif + if (!text_locked() +*** ../vim-7.3.192/src/ex_getln.c 2011-04-28 17:21:49.000000000 +0200 +--- src/ex_getln.c 2011-05-19 14:42:56.000000000 +0200 +*************** +*** 6324,6329 **** +--- 6324,6335 ---- + ccline.cmdbuff = vim_strsave((char_u *)"qa"); + cmdwin_result = CAR; + } ++ else if (cmdwin_result == Ctrl_C) ++ { ++ /* :q or :close, don't execute any command ++ * and don't modify the cmd window. */ ++ ccline.cmdbuff = NULL; ++ } + else + ccline.cmdbuff = vim_strsave(ml_get_curline()); + if (ccline.cmdbuff == NULL) +*** ../vim-7.3.192/src/version.c 2011-05-19 14:30:07.000000000 +0200 +--- src/version.c 2011-05-19 14:48:12.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 193, + /**/ + +-- +There's no place like $(HOME)! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 290fee4edd904ebfed80511f22c489cf13a5a70d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:44 +0200 Subject: [PATCH 0212/3803] - patchlevel 194 --- 7.3.194 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 7.3.194 diff --git a/7.3.194 b/7.3.194 new file mode 100644 index 00000000..5a73c009 --- /dev/null +++ b/7.3.194 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.194 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.194 +Problem: When "b" is a symlink to directory "a", resolve("b/") doesn't + result in "a/". (ZyX) +Solution: Remove the trailing slash. (Jean-Rene David) +Files: src/eval.c + + +*** ../vim-7.3.193/src/eval.c 2011-05-19 13:40:47.000000000 +0200 +--- src/eval.c 2011-05-19 14:55:27.000000000 +0200 +*************** +*** 14980,14986 **** +--- 14980,14989 ---- + + len = STRLEN(p); + if (len > 0 && after_pathsep(p, p + len)) ++ { + has_trailing_pathsep = TRUE; ++ p[len - 1] = NUL; /* the trailing slash breaks readlink() */ ++ } + + q = getnextcomp(p); + if (*q != NUL) +*** ../vim-7.3.193/src/version.c 2011-05-19 14:50:49.000000000 +0200 +--- src/version.c 2011-05-19 14:54:40.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 194, + /**/ + +-- +Momento mori, ergo carpe diem + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 82bd06d9a600564460043b1ed16fb14a6c4f8a60 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:45 +0200 Subject: [PATCH 0213/3803] - patchlevel 195 --- 7.3.195 | 199 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 7.3.195 diff --git a/7.3.195 b/7.3.195 new file mode 100644 index 00000000..ba1fc219 --- /dev/null +++ b/7.3.195 @@ -0,0 +1,199 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.195 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.195 +Problem: "} else" causes following lines to be indented too much. (Rouben + Rostamian) +Solution: Better detection for the "else". (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.194/src/misc1.c 2011-05-10 16:41:13.000000000 +0200 +--- src/misc1.c 2011-05-19 16:30:28.000000000 +0200 +*************** +*** 5482,5489 **** + * Recognize a line that starts with '{' or '}', or ends with ';', ',', '{' or + * '}'. + * Don't consider "} else" a terminated line. +! * Don't consider a line where there are unmatched opening braces before '}', +! * ';' or ',' a terminated line. + * Return the character terminating the line (ending char's have precedence if + * both apply in order to determine initializations). + */ +--- 5482,5489 ---- + * Recognize a line that starts with '{' or '}', or ends with ';', ',', '{' or + * '}'. + * Don't consider "} else" a terminated line. +! * If a line begins with an "else", only consider it terminated if no unmatched +! * opening braces follow (handle "else { foo();" correctly). + * Return the character terminating the line (ending char's have precedence if + * both apply in order to determine initializations). + */ +*************** +*** 5493,5513 **** + int incl_open; /* include '{' at the end as terminator */ + int incl_comma; /* recognize a trailing comma */ + { +! char_u found_start = 0; +! unsigned n_open = 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 == '}' && n_open > 0) + --n_open; +! if (n_open == 0 + && (*s == ';' || *s == '}' || (incl_comma && *s == ',')) + && cin_nocode(s + 1)) + return *s; +--- 5493,5517 ---- + int incl_open; /* include '{' at the end as terminator */ + int incl_comma; /* recognize a trailing comma */ + { +! char_u found_start = 0; +! unsigned n_open = 0; +! int is_else = FALSE; + + s = cin_skipcomment(s); + + if (*s == '{' || (*s == '}' && !cin_iselse(s))) + found_start = *s; + ++ if (!found_start) ++ is_else = cin_iselse(s); ++ + while (*s) + { + /* skip over comments, "" strings and 'c'haracters */ + s = skip_string(cin_skipcomment(s)); + if (*s == '}' && n_open > 0) + --n_open; +! if ((!is_else || n_open == 0) + && (*s == ';' || *s == '}' || (incl_comma && *s == ',')) + && cin_nocode(s + 1)) + return *s; +*** ../vim-7.3.194/src/testdir/test3.in 2011-05-10 13:38:23.000000000 +0200 +--- src/testdir/test3.in 2011-05-19 16:29:01.000000000 +0200 +*************** +*** 1345,1351 **** + + STARTTEST + :set cino& +! 2kdd=][ + ENDTEST + + void func(void) +--- 1345,1351 ---- + + STARTTEST + :set cino& +! 2kdd=4][ + ENDTEST + + void func(void) +*************** +*** 1359,1364 **** +--- 1359,1392 ---- + printf("Foo!\n"); + } + ++ void func1(void) ++ { ++ char* tab[] = {"foo", "bar", ++ "baz", "quux", ++ "this line used", "to be indented incorrectly"}; ++ foo(); ++ } ++ ++ void func2(void) ++ { ++ int tab[] = ++ {1, 2, ++ 3, 4, ++ 5, 6}; ++ ++ printf("This line used to be indented incorrectly.\n"); ++ } ++ ++ void func3(void) ++ { ++ int tab[] = { ++ 1, 2, ++ 3, 4, ++ 5, 6}; ++ ++ printf("Don't you dare indent this line incorrectly!\n); ++ } ++ + STARTTEST + :set cino& + 2kdd=][ +*** ../vim-7.3.194/src/testdir/test3.ok 2011-05-10 13:38:23.000000000 +0200 +--- src/testdir/test3.ok 2011-05-19 16:29:01.000000000 +0200 +*************** +*** 1216,1221 **** +--- 1216,1249 ---- + printf("Foo!\n"); + } + ++ void func1(void) ++ { ++ char* tab[] = {"foo", "bar", ++ "baz", "quux", ++ "this line used", "to be indented incorrectly"}; ++ foo(); ++ } ++ ++ void func2(void) ++ { ++ int tab[] = ++ {1, 2, ++ 3, 4, ++ 5, 6}; ++ ++ printf("This line used to be indented incorrectly.\n"); ++ } ++ ++ void func3(void) ++ { ++ int tab[] = { ++ 1, 2, ++ 3, 4, ++ 5, 6}; ++ ++ printf("Don't you dare indent this line incorrectly!\n); ++ } ++ + + void func(void) + { +*** ../vim-7.3.194/src/version.c 2011-05-19 14:59:07.000000000 +0200 +--- src/version.c 2011-05-19 16:34:16.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 195, + /**/ + +-- +I AM THANKFUL... +...for the taxes that I pay because it means that I am employed. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 81a387a7b2e1e57591f5e2c7c283d2b26c529b8a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:45 +0200 Subject: [PATCH 0214/3803] - patchlevel 196 --- 7.3.196 | 224 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 7.3.196 diff --git a/7.3.196 b/7.3.196 new file mode 100644 index 00000000..0d6be8c9 --- /dev/null +++ b/7.3.196 @@ -0,0 +1,224 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.196 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.196 +Problem: Can't intercept a character that is going to be inserted. +Solution: Add the InsertCharPre autocommand event. (Jakson A. Aquino) +Files: runtime/doc/autocmd.txt, runtime/doc/eval.txt, + runtime/doc/map.txt, src/edit.c, src/eval.c, src/fileio.c, + src/vim.h + + +*** ../mercurial/vim73/runtime/doc/autocmd.txt 2011-04-28 19:01:26.000000000 +0200 +--- runtime/doc/autocmd.txt 2011-05-19 17:12:17.000000000 +0200 +*************** +*** 299,304 **** +--- 299,306 ---- + |InsertEnter| starting Insert mode + |InsertChange| when typing while in Insert or Replace mode + |InsertLeave| when leaving Insert mode ++ |InsertCharPre| when a character was typed in Insert mode, before ++ inserting it + + |ColorScheme| after loading a color scheme + +*************** +*** 657,662 **** +--- 659,675 ---- + indicates the new mode. + Be careful not to move the cursor or do + anything else that the user does not expect. ++ *InsertCharPre* ++ InsertCharPre When a character is typed in Insert mode, ++ before inserting the char. ++ The |v:char| variable indicates the char typed ++ and can be changed during the event to insert ++ a different character. When |v:char| is set ++ to more than one character this text is ++ inserted literally. ++ It is not allowed to change the text |textlock|. ++ The event is not triggered when 'paste' is ++ set. + *InsertEnter* + InsertEnter Just before starting Insert mode. Also for + Replace mode and Virtual Replace mode. The +*** ../mercurial/vim73/runtime/doc/eval.txt 2011-05-19 12:22:41.000000000 +0200 +--- runtime/doc/eval.txt 2011-05-19 16:55:58.000000000 +0200 +*************** +*** 1293,1298 **** +--- 1293,1299 ---- + *v:char* *char-variable* + v:char Argument for evaluating 'formatexpr' and used for the typed + character when using in an abbreviation |:map-|. ++ It is also used by the |InsertPreChar| event. + + *v:charconvert_from* *charconvert_from-variable* + v:charconvert_from +*** ../mercurial/vim73/runtime/doc/map.txt 2011-05-10 17:17:38.000000000 +0200 +--- runtime/doc/map.txt 2011-05-19 16:40:34.000000000 +0200 +*************** +*** 226,232 **** + + For abbreviations |v:char| is set to the character that was typed to trigger + the abbreviation. You can use this to decide how to expand the {lhs}. You +! can't change v:char and you should not insert it. + + Be very careful about side effects! The expression is evaluated while + obtaining characters, you may very well make the command dysfunctional. +--- 226,232 ---- + + For abbreviations |v:char| is set to the character that was typed to trigger + the abbreviation. You can use this to decide how to expand the {lhs}. You +! you should not either insert or change the v:char. + + Be very careful about side effects! The expression is evaluated while + obtaining characters, you may very well make the command dysfunctional. +*** ../mercurial/vim73/src/edit.c 2011-05-10 14:22:10.000000000 +0200 +--- src/edit.c 2011-05-19 17:20:53.000000000 +0200 +*************** +*** 1381,1390 **** + goto do_intr; + #endif + + /* + * Insert a nomal character. + */ +! normalchar: + #ifdef FEAT_SMARTINDENT + /* Try to perform smart-indenting. */ + ins_try_si(c); +--- 1381,1425 ---- + goto do_intr; + #endif + ++ normalchar: + /* + * Insert a nomal character. + */ +! #ifdef FEAT_AUTOCMD +! if (!p_paste) +! { +! /* Trigger the InsertCharPre event. Lock the text to avoid +! * weird things from happening. */ +! set_vim_var_char(c); +! ++textlock; +! if (apply_autocmds(EVENT_INSERTCHARPRE, NULL, NULL, +! FALSE, curbuf)) +! { +! /* Get the new value of v:char. If it is more than one +! * character insert it literally. */ +! char_u *s = get_vim_var_str(VV_CHAR); +! if (MB_CHARLEN(s) > 1) +! { +! if (stop_arrow() != FAIL) +! { +! ins_str(s); +! AppendToRedobuffLit(s, -1); +! } +! c = NUL; +! } +! else +! c = PTR2CHAR(s); +! } +! +! set_vim_var_string(VV_CHAR, NULL, -1); +! --textlock; +! +! /* If the new value is an empty string then don't insert a +! * char. */ +! if (c == NUL) +! break; +! } +! #endif + #ifdef FEAT_SMARTINDENT + /* Try to perform smart-indenting. */ + ins_try_si(c); +*************** +*** 3491,3501 **** + return; + } + p += len; +! #ifdef FEAT_MBYTE +! c = mb_ptr2char(p); +! #else +! c = *p; +! #endif + ins_compl_addleader(c); + } + +--- 3526,3532 ---- + return; + } + p += len; +! c = PTR2CHAR(p); + ins_compl_addleader(c); + } + +*** ../mercurial/vim73/src/eval.c 2011-05-19 14:59:07.000000000 +0200 +--- src/eval.c 2011-05-19 16:40:39.000000000 +0200 +*************** +*** 352,358 **** + {VV_NAME("swapname", VAR_STRING), VV_RO}, + {VV_NAME("swapchoice", VAR_STRING), 0}, + {VV_NAME("swapcommand", VAR_STRING), VV_RO}, +! {VV_NAME("char", VAR_STRING), VV_RO}, + {VV_NAME("mouse_win", VAR_NUMBER), 0}, + {VV_NAME("mouse_lnum", VAR_NUMBER), 0}, + {VV_NAME("mouse_col", VAR_NUMBER), 0}, +--- 352,358 ---- + {VV_NAME("swapname", VAR_STRING), VV_RO}, + {VV_NAME("swapchoice", VAR_STRING), 0}, + {VV_NAME("swapcommand", VAR_STRING), VV_RO}, +! {VV_NAME("char", VAR_STRING), 0}, + {VV_NAME("mouse_win", VAR_NUMBER), 0}, + {VV_NAME("mouse_lnum", VAR_NUMBER), 0}, + {VV_NAME("mouse_col", VAR_NUMBER), 0}, +*** ../mercurial/vim73/src/fileio.c 2011-05-10 16:41:13.000000000 +0200 +--- src/fileio.c 2011-05-19 16:40:39.000000000 +0200 +*************** +*** 7662,7667 **** +--- 7662,7668 ---- + {"InsertChange", EVENT_INSERTCHANGE}, + {"InsertEnter", EVENT_INSERTENTER}, + {"InsertLeave", EVENT_INSERTLEAVE}, ++ {"InsertCharPre", EVENT_INSERTCHARPRE}, + {"MenuPopup", EVENT_MENUPOPUP}, + {"QuickFixCmdPost", EVENT_QUICKFIXCMDPOST}, + {"QuickFixCmdPre", EVENT_QUICKFIXCMDPRE}, +*** ../mercurial/vim73/src/vim.h 2011-05-10 16:41:13.000000000 +0200 +--- src/vim.h 2011-05-19 16:40:39.000000000 +0200 +*************** +*** 1274,1279 **** +--- 1274,1280 ---- + EVENT_WINENTER, /* after entering a window */ + EVENT_WINLEAVE, /* before leaving a window */ + EVENT_ENCODINGCHANGED, /* after changing the 'encoding' option */ ++ EVENT_INSERTCHARPRE, /* before inserting a char */ + EVENT_CURSORHOLD, /* cursor in same position for a while */ + EVENT_CURSORHOLDI, /* idem, in Insert mode */ + EVENT_FUNCUNDEFINED, /* if calling a function which doesn't exist */ +*** ../vim-7.3.195/src/version.c 2011-05-19 16:35:05.000000000 +0200 +--- src/version.c 2011-05-19 17:15:41.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 196, + /**/ + +-- +I AM THANKFUL... +...for the mess to clean after a party because it means I have +been surrounded by friends. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d171946beff6a87872af65ecc020f992857e2adf Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:45 +0200 Subject: [PATCH 0215/3803] - patchlevel 197 --- 7.3.197 | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 7.3.197 diff --git a/7.3.197 b/7.3.197 new file mode 100644 index 00000000..c33a2cb2 --- /dev/null +++ b/7.3.197 @@ -0,0 +1,78 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.197 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.197 +Problem: When a QuickfixCmdPost event removes all errors, Vim still tries + to jump to the first error, resulting in E42. +Solution: Get the number of error after the autocmd event. (Mike Lundy) +Files: src/quickfix.c + + +*** ../mercurial/vim73/src/quickfix.c 2011-05-10 16:41:13.000000000 +0200 +--- src/quickfix.c 2011-05-19 17:34:11.000000000 +0200 +*************** +*** 2813,2829 **** + (eap->cmdidx != CMD_grepadd + && eap->cmdidx != CMD_lgrepadd), + *eap->cmdlinep); + #ifdef FEAT_AUTOCMD + if (au_name != NULL) + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, + curbuf->b_fname, TRUE, curbuf); + #endif + if (res > 0 && !eap->forceit) +- { +- if (wp != NULL) +- qi = GET_LOC_LIST(wp); + qf_jump(qi, 0, 0, FALSE); /* display first error */ +- } + + mch_remove(fname); + vim_free(fname); +--- 2813,2833 ---- + (eap->cmdidx != CMD_grepadd + && eap->cmdidx != CMD_lgrepadd), + *eap->cmdlinep); ++ if (wp != NULL) ++ qi = GET_LOC_LIST(wp); + #ifdef FEAT_AUTOCMD + if (au_name != NULL) ++ { + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, + curbuf->b_fname, TRUE, curbuf); ++ if (qi->qf_curlist < qi->qf_listcount) ++ res = qi->qf_lists[qi->qf_curlist].qf_count; ++ else ++ res = 0; ++ } + #endif + if (res > 0 && !eap->forceit) + qf_jump(qi, 0, 0, FALSE); /* display first error */ + + mch_remove(fname); + vim_free(fname); +*** ../vim-7.3.196/src/version.c 2011-05-19 17:25:36.000000000 +0200 +--- src/version.c 2011-05-19 17:41:50.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 197, + /**/ + +-- +I AM THANKFUL... +...for the clothes that fit a little too snug because it +means I have more than enough to eat. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 271384242f512cea6bbf877e3aedc57eb46eabbe Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:46 +0200 Subject: [PATCH 0216/3803] - patchlevel 198 --- 7.3.198 | 403 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 403 insertions(+) create mode 100644 7.3.198 diff --git a/7.3.198 b/7.3.198 new file mode 100644 index 00000000..5ef4a8aa --- /dev/null +++ b/7.3.198 @@ -0,0 +1,403 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.198 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.198 +Problem: No completion for ":lang". +Solution: Get locales to complete from. (Dominique Pelle) +Files: src/eval.c, src/ex_cmds2.c, src/ex_getln.c, + src/proto/ex_cmds2.pro, src/proto/ex_getln.pro, src/vim.h + + +*** ../mercurial/vim73/src/eval.c 2011-05-19 17:25:36.000000000 +0200 +--- src/eval.c 2011-05-19 17:52:02.000000000 +0200 +*************** +*** 911,916 **** +--- 911,917 ---- + hash_clear(&compat_hashtab); + + free_scriptnames(); ++ free_locales(); + + /* global variables */ + vars_clear(&globvarht); +*** ../mercurial/vim73/src/ex_cmds2.c 2011-05-10 16:41:13.000000000 +0200 +--- src/ex_cmds2.c 2011-05-19 18:16:54.000000000 +0200 +*************** +*** 1476,1482 **** + #endif + + /* +! * Ask the user what to do when abondoning a changed buffer. + * Must check 'write' option first! + */ + void +--- 1476,1482 ---- + #endif + + /* +! * Ask the user what to do when abandoning a changed buffer. + * Must check 'write' option first! + */ + void +*************** +*** 4153,4158 **** +--- 4153,4234 ---- + } + + # if defined(FEAT_CMDL_COMPL) || defined(PROTO) ++ ++ static char_u **locales = NULL; /* Array of all available locales */ ++ static int did_init_locales = FALSE; ++ ++ static void init_locales __ARGS((void)); ++ static char_u **find_locales __ARGS((void)); ++ ++ /* ++ * Lazy initialization of all available locales. ++ */ ++ static void ++ init_locales() ++ { ++ if (!did_init_locales) ++ { ++ did_init_locales = TRUE; ++ locales = find_locales(); ++ } ++ } ++ ++ /* Return an array of strings for all available locales + NULL for the ++ * last element. Return NULL in case of error. */ ++ static char_u ** ++ find_locales() ++ { ++ garray_T locales_ga; ++ char_u *loc; ++ ++ /* Find all available locales by running command "locale -a". If this ++ * doesn't work we won't have completion. */ ++ char_u *locale_a = get_cmd_output((char_u *)"locale -a", ++ NULL, SHELL_SILENT); ++ if (locale_a == NULL) ++ return NULL; ++ ga_init2(&locales_ga, sizeof(char_u *), 20); ++ ++ /* Transform locale_a string where each locale is separated by "\n" ++ * into an array of locale strings. */ ++ loc = (char_u *)strtok((char *)locale_a, "\n"); ++ ++ while (loc != NULL) ++ { ++ if (ga_grow(&locales_ga, 1) == FAIL) ++ break; ++ loc = vim_strsave(loc); ++ if (loc == NULL) ++ break; ++ ++ ((char_u **)locales_ga.ga_data)[locales_ga.ga_len++] = loc; ++ loc = (char_u *)strtok(NULL, "\n"); ++ } ++ vim_free(locale_a); ++ if (ga_grow(&locales_ga, 1) == FAIL) ++ { ++ ga_clear(&locales_ga); ++ return NULL; ++ } ++ ((char_u **)locales_ga.ga_data)[locales_ga.ga_len] = NULL; ++ return (char_u **)locales_ga.ga_data; ++ } ++ ++ # if defined(EXITFREE) || defined(PROTO) ++ void ++ free_locales() ++ { ++ int i; ++ if (locales != NULL) ++ { ++ for (i = 0; locales[i] != NULL; i++) ++ vim_free(locales[i]); ++ vim_free(locales); ++ locales = NULL; ++ } ++ } ++ # endif ++ + /* + * Function given to ExpandGeneric() to obtain the possible arguments of the + * ":language" command. +*************** +*** 4168,4174 **** + return (char_u *)"ctype"; + if (idx == 2) + return (char_u *)"time"; +! return NULL; + } + # endif + +--- 4244,4268 ---- + return (char_u *)"ctype"; + if (idx == 2) + return (char_u *)"time"; +! +! init_locales(); +! if (locales == NULL) +! return NULL; +! return locales[idx - 3]; +! } +! +! /* +! * Function given to ExpandGeneric() to obtain the available locales. +! */ +! char_u * +! get_locales(xp, idx) +! expand_T *xp UNUSED; +! int idx; +! { +! init_locales(); +! if (locales == NULL) +! return NULL; +! return locales[idx]; + } + # endif + +*** ../mercurial/vim73/src/ex_getln.c 2011-05-19 14:50:49.000000000 +0200 +--- src/ex_getln.c 2011-05-19 18:18:49.000000000 +0200 +*************** +*** 4571,4618 **** + int context; + char_u *((*func)__ARGS((expand_T *, int))); + int ic; + } tab[] = + { +! {EXPAND_COMMANDS, get_command_name, FALSE}, +! {EXPAND_BEHAVE, get_behave_arg, TRUE}, + #ifdef FEAT_USR_CMDS +! {EXPAND_USER_COMMANDS, get_user_commands, FALSE}, +! {EXPAND_USER_CMD_FLAGS, get_user_cmd_flags, FALSE}, +! {EXPAND_USER_NARGS, get_user_cmd_nargs, FALSE}, +! {EXPAND_USER_COMPLETE, get_user_cmd_complete, FALSE}, + #endif + #ifdef FEAT_EVAL +! {EXPAND_USER_VARS, get_user_var_name, FALSE}, +! {EXPAND_FUNCTIONS, get_function_name, FALSE}, +! {EXPAND_USER_FUNC, get_user_func_name, FALSE}, +! {EXPAND_EXPRESSION, get_expr_name, FALSE}, + #endif + #ifdef FEAT_MENU +! {EXPAND_MENUS, get_menu_name, FALSE}, +! {EXPAND_MENUNAMES, get_menu_names, FALSE}, + #endif + #ifdef FEAT_SYN_HL +! {EXPAND_SYNTAX, get_syntax_name, TRUE}, + #endif +! {EXPAND_HIGHLIGHT, get_highlight_name, TRUE}, + #ifdef FEAT_AUTOCMD +! {EXPAND_EVENTS, get_event_name, TRUE}, +! {EXPAND_AUGROUP, get_augroup_name, TRUE}, + #endif + #ifdef FEAT_CSCOPE +! {EXPAND_CSCOPE, get_cscope_name, TRUE}, + #endif + #ifdef FEAT_SIGNS +! {EXPAND_SIGN, get_sign_name, TRUE}, + #endif + #ifdef FEAT_PROFILE +! {EXPAND_PROFILE, get_profile_name, TRUE}, + #endif + #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ + && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) +! {EXPAND_LANGUAGE, get_lang_arg, TRUE}, + #endif +! {EXPAND_ENV_VARS, get_env_name, TRUE}, + }; + int i; + +--- 4571,4620 ---- + int context; + char_u *((*func)__ARGS((expand_T *, int))); + int ic; ++ int escaped; + } tab[] = + { +! {EXPAND_COMMANDS, get_command_name, FALSE, TRUE}, +! {EXPAND_BEHAVE, get_behave_arg, TRUE, TRUE}, + #ifdef FEAT_USR_CMDS +! {EXPAND_USER_COMMANDS, get_user_commands, FALSE, TRUE}, +! {EXPAND_USER_CMD_FLAGS, get_user_cmd_flags, FALSE, TRUE}, +! {EXPAND_USER_NARGS, get_user_cmd_nargs, FALSE, TRUE}, +! {EXPAND_USER_COMPLETE, get_user_cmd_complete, FALSE, TRUE}, + #endif + #ifdef FEAT_EVAL +! {EXPAND_USER_VARS, get_user_var_name, FALSE, TRUE}, +! {EXPAND_FUNCTIONS, get_function_name, FALSE, TRUE}, +! {EXPAND_USER_FUNC, get_user_func_name, FALSE, TRUE}, +! {EXPAND_EXPRESSION, get_expr_name, FALSE, TRUE}, + #endif + #ifdef FEAT_MENU +! {EXPAND_MENUS, get_menu_name, FALSE, TRUE}, +! {EXPAND_MENUNAMES, get_menu_names, FALSE, TRUE}, + #endif + #ifdef FEAT_SYN_HL +! {EXPAND_SYNTAX, get_syntax_name, TRUE, TRUE}, + #endif +! {EXPAND_HIGHLIGHT, get_highlight_name, TRUE, TRUE}, + #ifdef FEAT_AUTOCMD +! {EXPAND_EVENTS, get_event_name, TRUE, TRUE}, +! {EXPAND_AUGROUP, get_augroup_name, TRUE, TRUE}, + #endif + #ifdef FEAT_CSCOPE +! {EXPAND_CSCOPE, get_cscope_name, TRUE, TRUE}, + #endif + #ifdef FEAT_SIGNS +! {EXPAND_SIGN, get_sign_name, TRUE, TRUE}, + #endif + #ifdef FEAT_PROFILE +! {EXPAND_PROFILE, get_profile_name, TRUE, TRUE}, + #endif + #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ + && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) +! {EXPAND_LANGUAGE, get_lang_arg, TRUE, FALSE}, +! {EXPAND_LOCALES, get_locales, TRUE, FALSE}, + #endif +! {EXPAND_ENV_VARS, get_env_name, TRUE, TRUE}, + }; + int i; + +*************** +*** 4626,4632 **** + { + if (tab[i].ic) + regmatch.rm_ic = TRUE; +! ret = ExpandGeneric(xp, ®match, num_file, file, tab[i].func); + break; + } + } +--- 4628,4635 ---- + { + if (tab[i].ic) + regmatch.rm_ic = TRUE; +! ret = ExpandGeneric(xp, ®match, num_file, file, +! tab[i].func, tab[i].escaped); + break; + } + } +*************** +*** 4648,4660 **** + * Returns OK when no problems encountered, FAIL for error (out of memory). + */ + int +! ExpandGeneric(xp, regmatch, num_file, file, func) + expand_T *xp; + regmatch_T *regmatch; + int *num_file; + char_u ***file; + char_u *((*func)__ARGS((expand_T *, int))); + /* returns a string from the list */ + { + int i; + int count = 0; +--- 4651,4664 ---- + * Returns OK when no problems encountered, FAIL for error (out of memory). + */ + int +! ExpandGeneric(xp, regmatch, num_file, file, func, escaped) + expand_T *xp; + regmatch_T *regmatch; + int *num_file; + char_u ***file; + char_u *((*func)__ARGS((expand_T *, int))); + /* returns a string from the list */ ++ int escaped; + { + int i; + int count = 0; +*************** +*** 4679,4685 **** + { + if (round) + { +! str = vim_strsave_escaped(str, (char_u *)" \t\\."); + (*file)[count] = str; + #ifdef FEAT_MENU + if (func == get_menu_names && str != NULL) +--- 4683,4692 ---- + { + if (round) + { +! if (escaped) +! str = vim_strsave_escaped(str, (char_u *)" \t\\."); +! else +! str = vim_strsave(str); + (*file)[count] = str; + #ifdef FEAT_MENU + if (func == get_menu_names && str != NULL) +*** ../mercurial/vim73/src/proto/ex_cmds2.pro 2010-05-15 21:22:11.000000000 +0200 +--- src/proto/ex_cmds2.pro 2011-05-19 17:53:52.000000000 +0200 +*************** +*** 83,87 **** +--- 83,89 ---- + char_u *get_mess_lang __ARGS((void)); + void set_lang_var __ARGS((void)); + void ex_language __ARGS((exarg_T *eap)); ++ void free_locales __ARGS((void)); + char_u *get_lang_arg __ARGS((expand_T *xp, int idx)); ++ char_u *get_locales __ARGS((expand_T *xp, int idx)); + /* vim: set ft=c : */ +*** ../mercurial/vim73/src/proto/ex_getln.pro 2010-08-16 21:23:30.000000000 +0200 +--- src/proto/ex_getln.pro 2011-05-19 17:54:00.000000000 +0200 +*************** +*** 31,37 **** + char_u *addstar __ARGS((char_u *fname, int len, int context)); + void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); + int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches)); +! int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)))); + char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options)); + void init_history __ARGS((void)); + int get_histtype __ARGS((char_u *name)); +--- 31,37 ---- + char_u *addstar __ARGS((char_u *fname, int len, int context)); + void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); + int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches)); +! int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)), int escaped)); + char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options)); + void init_history __ARGS((void)); + int get_histtype __ARGS((char_u *name)); +*** ../mercurial/vim73/src/vim.h 2011-05-19 17:25:36.000000000 +0200 +--- src/vim.h 2011-05-19 17:52:02.000000000 +0200 +*************** +*** 779,784 **** +--- 779,785 ---- + #define EXPAND_FILETYPE 37 + #define EXPAND_FILES_IN_PATH 38 + #define EXPAND_OWNSYNTAX 39 ++ #define EXPAND_LOCALES 40 + + /* Values for exmode_active (0 is no exmode) */ + #define EXMODE_NORMAL 1 +*** ../vim-7.3.197/src/version.c 2011-05-19 17:42:54.000000000 +0200 +--- src/version.c 2011-05-19 18:24:58.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 198, + /**/ + +-- +The primary purpose of the DATA statement is to give names to constants; +instead of referring to pi as 3.141592653589793 at every appearance, the +variable PI can be given that value with a DATA statement and used instead +of the longer form of the constant. This also simplifies modifying the +program, should the value of pi change. + -- FORTRAN manual for Xerox Computers + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 15c28529d74e136e5eb512cf289c2241e27abe94 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:46 +0200 Subject: [PATCH 0217/3803] - patchlevel 199 --- 7.3.199 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 7.3.199 diff --git a/7.3.199 b/7.3.199 new file mode 100644 index 00000000..8bdd97ab --- /dev/null +++ b/7.3.199 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.199 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.199 +Problem: MS-Windows: Compilation problem of OLE with MingW compiler. +Solution: Put #ifdef around declarations. (Guopeng Wen) +Files: src/if_ole.h + + +*** ../mercurial/vim73/src/if_ole.h 2010-05-15 21:22:11.000000000 +0200 +--- src/if_ole.h 2011-05-25 12:05:50.000000000 +0200 +*************** +*** 46,53 **** + /* header files for imported files */ + #include "oaidl.h" + +! void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +! void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + + #ifndef __IVim_INTERFACE_DEFINED__ + #define __IVim_INTERFACE_DEFINED__ +--- 46,56 ---- + /* header files for imported files */ + #include "oaidl.h" + +! #ifndef __MIDL_user_allocate_free_DEFINED__ +! #define __MIDL_user_allocate_free_DEFINED__ +! void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +! void __RPC_USER MIDL_user_free( void __RPC_FAR * ); +! #endif + + #ifndef __IVim_INTERFACE_DEFINED__ + #define __IVim_INTERFACE_DEFINED__ +*** ../vim-7.3.198/src/version.c 2011-05-19 18:26:34.000000000 +0200 +--- src/version.c 2011-05-25 12:08:54.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 199, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +104. When people ask about the Presidential Election you ask "Which country?" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 320e200aa26cc8ec813e18eb52ecf7ba758b2fc6 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:47 +0200 Subject: [PATCH 0218/3803] - patchlevel 200 --- 7.3.200 | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 7.3.200 diff --git a/7.3.200 b/7.3.200 new file mode 100644 index 00000000..60194711 --- /dev/null +++ b/7.3.200 @@ -0,0 +1,75 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.200 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.200 (after 7.3.198) +Problem: CTRL-D doesn't complete :lang. +Solution: Add the missing part of the change. (Dominique Pelle) +Files: src/ex_docmd.c + + +*** ../mercurial/vim73/src/ex_docmd.c 2011-05-19 14:50:49.000000000 +0200 +--- src/ex_docmd.c 2011-05-25 12:45:02.000000000 +0200 +*************** +*** 3861,3873 **** + #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ + && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) + case CMD_language: +! if (*skiptowhite(arg) == NUL) + { + xp->xp_context = EXPAND_LANGUAGE; + xp->xp_pattern = arg; + } + else +! xp->xp_context = EXPAND_NOTHING; + break; + #endif + #if defined(FEAT_PROFILE) +--- 3861,3884 ---- + #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ + && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) + case CMD_language: +! p = skiptowhite(arg); +! if (*p == NUL) + { + xp->xp_context = EXPAND_LANGUAGE; + xp->xp_pattern = arg; + } + else +! { +! if ( STRNCMP(arg, "messages", p - arg) == 0 +! || STRNCMP(arg, "ctype", p - arg) == 0 +! || STRNCMP(arg, "time", p - arg) == 0) +! { +! xp->xp_context = EXPAND_LOCALES; +! xp->xp_pattern = skipwhite(p); +! } +! else +! xp->xp_context = EXPAND_NOTHING; +! } + break; + #endif + #if defined(FEAT_PROFILE) +*** ../vim-7.3.199/src/version.c 2011-05-25 12:09:46.000000000 +0200 +--- src/version.c 2011-05-25 12:49:49.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 200, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +105. When someone asks you for your address, you tell them your URL. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 6a5e4bf477e6294b9f7826963b812ce5a759a558 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:47 +0200 Subject: [PATCH 0219/3803] - patchlevel 201 --- 7.3.201 | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 7.3.201 diff --git a/7.3.201 b/7.3.201 new file mode 100644 index 00000000..0481afd8 --- /dev/null +++ b/7.3.201 @@ -0,0 +1,124 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.201 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.201 (after 7.3.195) +Problem: "} else" still causes following lines to be indented too much. +Solution: Better detection for the "else" block. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../mercurial/vim73/src/misc1.c 2011-05-19 16:35:05.000000000 +0200 +--- src/misc1.c 2011-05-25 13:29:45.000000000 +0200 +*************** +*** 7541,7557 **** + + /* + * When searching for a terminated line, don't use the +! * one between the "if" and the "else". + * Need to use the scope of this "else". XXX + * If whilelevel != 0 continue looking for a "do {". + */ +! if (cin_iselse(l) +! && whilelevel == 0 +! && ((trypos = find_start_brace(ind_maxcomment)) +! == NULL + || find_match(LOOKFOR_IF, trypos->lnum, +! ind_maxparen, ind_maxcomment) == FAIL)) +! break; + } + + /* +--- 7541,7565 ---- + + /* + * When searching for a terminated line, don't use the +! * one between the "if" and the matching "else". + * Need to use the scope of this "else". XXX + * If whilelevel != 0 continue looking for a "do {". + */ +! if (cin_iselse(l) && whilelevel == 0) +! { +! /* If we're looking at "} else", let's make sure we +! * find the opening brace of the enclosing scope, +! * not the one from "if () {". */ +! if (*l == '}') +! curwin->w_cursor.col = +! (l - ml_get_curline()) + 1; +! +! if ((trypos = find_start_brace(ind_maxcomment)) +! == NULL + || find_match(LOOKFOR_IF, trypos->lnum, +! ind_maxparen, ind_maxcomment) == FAIL) +! break; +! } + } + + /* +*** ../mercurial/vim73/src/testdir/test3.in 2011-05-19 16:35:05.000000000 +0200 +--- src/testdir/test3.in 2011-05-25 13:23:51.000000000 +0200 +*************** +*** 1413,1418 **** +--- 1413,1433 ---- + } + + STARTTEST ++ :set cino& ++ 2kdd=][ ++ ENDTEST ++ ++ void func(void) ++ { ++ for (int i = 0; i < 10; ++i) ++ if (i & 1) { ++ foo(1); ++ } else ++ foo(0); ++ baz(); ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../mercurial/vim73/src/testdir/test3.ok 2011-05-19 16:35:05.000000000 +0200 +--- src/testdir/test3.ok 2011-05-25 13:23:51.000000000 +0200 +*************** +*** 1262,1264 **** +--- 1262,1275 ---- + foo(); + } + ++ ++ void func(void) ++ { ++ for (int i = 0; i < 10; ++i) ++ if (i & 1) { ++ foo(1); ++ } else ++ foo(0); ++ baz(); ++ } ++ +*** ../vim-7.3.200/src/version.c 2011-05-25 12:51:17.000000000 +0200 +--- src/version.c 2011-05-25 13:33:16.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 201, + /**/ + +-- +Laughing helps. It's like jogging on the inside. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 8143bfab13b9030f96022d1836bba269f9fd21c0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:47 +0200 Subject: [PATCH 0220/3803] - patchlevel 202 --- 7.3.202 | 900 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 900 insertions(+) create mode 100644 7.3.202 diff --git a/7.3.202 b/7.3.202 new file mode 100644 index 00000000..be22ea6a --- /dev/null +++ b/7.3.202 @@ -0,0 +1,900 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.202 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.202 +Problem: Cannot influence the indent inside a namespace. +Solution: Add the "N" 'cino' parameter. (Konstantin Lepa) +Files: runtime/doc/indent.txt, src/misc1.c, src/testdir/test3.in, + src/testdir/test3.ok + + +*** ../mercurial/vim73/runtime/doc/indent.txt 2011-04-28 19:01:26.000000000 +0200 +--- runtime/doc/indent.txt 2011-05-25 14:35:37.000000000 +0200 +*************** +*** 128,140 **** + used CTRL-T or CTRL-D. + + *cinoptions-values* +! The 'cinoptions' option sets how Vim performs indentation. In the list below, + "N" represents a number of your choice (the number can be negative). When + there is an 's' after the number, Vim multiplies the number by 'shiftwidth': + "1s" is 'shiftwidth', "2s" is two times 'shiftwidth', etc. You can use a +! decimal point, too: "-0.5s" is minus half a 'shiftwidth'. The examples below +! assume a 'shiftwidth' of 4. +! + >N Amount added for "normal" indent. Used after a line that should + increase the indent (lines starting with "if", an opening brace, + etc.). (default 'shiftwidth'). +--- 128,147 ---- + used CTRL-T or CTRL-D. + + *cinoptions-values* +! The 'cinoptions' option sets how Vim performs indentation. The value after +! the option character can be one of these (N is any number): +! N indent N spaces +! -N indent N spaces to the left +! Ns N times 'shiftwidth spaces +! -Ns N times 'shiftwidth spaces to the left +! +! In the list below, + "N" represents a number of your choice (the number can be negative). When + there is an 's' after the number, Vim multiplies the number by 'shiftwidth': + "1s" is 'shiftwidth', "2s" is two times 'shiftwidth', etc. You can use a +! decimal point, too: "-0.5s" is minus half a 'shiftwidth'. +! The examples below assume a 'shiftwidth' of 4. +! *cino->* + >N Amount added for "normal" indent. Used after a line that should + increase the indent (lines starting with "if", an opening brace, + etc.). (default 'shiftwidth'). +*************** +*** 145,150 **** +--- 152,158 ---- + foo; foo; foo; + } } } + < ++ *cino-e* + eN Add N to the prevailing indent inside a set of braces if the + opening brace at the End of the line (more precise: is not the + first character in a line). This is useful if you want a +*************** +*** 160,165 **** +--- 168,174 ---- + bar; bar; bar; + } } } + < ++ *cino-n* + nN Add N to the prevailing indent for a statement after an "if", + "while", etc., if it is NOT inside a set of braces. This is + useful if you want a different indent when there is no '{' +*************** +*** 174,179 **** +--- 183,189 ---- + bar; bar; bar; + } } } + < ++ *cino-f* + fN Place the first opening brace of a function or other block in + column N. This applies only for an opening brace that is not + inside other braces and is at the start of the line. What comes +*************** +*** 184,189 **** +--- 194,200 ---- + { { { + int foo; int foo; int foo; + < ++ *cino-{* + {N Place opening braces N characters from the prevailing indent. + This applies only for opening braces that are inside other + braces. (default 0). +*************** +*** 193,198 **** +--- 204,210 ---- + { { { + foo; foo; foo; + < ++ *cino-}* + }N Place closing braces N characters from the matching opening + brace. (default 0). + +*************** +*** 202,207 **** +--- 214,220 ---- + foo; foo; foo; + } } } + < ++ *cino-^* + ^N Add N to the prevailing indent inside a set of braces if the + opening brace is in column 0. This can specify a different + indent for whole of a function (some may like to set it to a +*************** +*** 216,221 **** +--- 229,235 ---- + } } } + } } } + < ++ *cino-L* + LN Controls placement of jump labels. If N is negative, the label + will be placed at column 1. If N is non-negative, the indent of + the label will be the prevailing indent minus N. (default -1). +*************** +*** 229,234 **** +--- 243,249 ---- + } } } + } } } + < ++ *cino-:* + :N Place case labels N characters from the indent of the switch(). + (default 'shiftwidth'). + +*************** +*** 240,245 **** +--- 255,261 ---- + default: default: + } } + < ++ *cino-=* + =N Place statements occurring after a case label N characters from + the indent of the label. (default 'shiftwidth'). + +*************** +*** 247,252 **** +--- 263,269 ---- + case 11: case 11: a = a + 1; + a = a + 1; b = b + 1; + < ++ *cino-l* + lN If N != 0 Vim will align with a case label instead of the + statement after it in the same line. + +*************** +*** 256,261 **** +--- 273,279 ---- + break; break; + } } + < ++ *cino-b* + 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). + When using 1, consider adding "0=break" to 'cinkeys'. +*************** +*** 272,277 **** +--- 290,296 ---- + break; break; + } } + < ++ *cino-g* + 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:". +*************** +*** 283,288 **** +--- 302,308 ---- + private: private: + } } + < ++ *cino-h* + hN Place statements occurring after a C++ scope declaration N + characters from the indent of the label. (default + 'shiftwidth'). +*************** +*** 291,296 **** +--- 311,331 ---- + public: public: a = a + 1; + a = a + 1; b = b + 1; + < ++ *cino-N* ++ NN Indent inside C++ namespace N characters extra compared to a ++ normal block. (default 0). ++ ++ cino= cino=N-s > ++ namespace { namespace { ++ void function(); void function(); ++ } } ++ ++ namespace my namespace my ++ { { ++ void function(); void function(); ++ } } ++ < ++ *cino-p* + pN Parameter declarations for K&R-style function declarations will + be indented N characters from the margin. (default + 'shiftwidth'). +*************** +*** 300,305 **** +--- 335,341 ---- + int a; int a; int a; + char b; char b; char b; + < ++ *cino-t* + tN Indent a function return type declaration N characters from the + margin. (default 'shiftwidth'). + +*************** +*** 307,312 **** +--- 343,349 ---- + int int int + func() func() func() + < ++ *cino-i* + iN Indent C++ base class declarations and constructor + initializations, if they start in a new line (otherwise they + are aligned at the right side of the ':'). +*************** +*** 320,325 **** +--- 357,363 ---- + BaseClass(3) BaseClass(3) + {} {} + < ++ *cino-+* + +N Indent a continuation line (a line that spills onto the next) + inside a function N additional characters. (default + 'shiftwidth'). +*************** +*** 330,335 **** +--- 368,374 ---- + a = b + 9 * a = b + 9 * + c; c; + < ++ *cino-c* + cN Indent comment lines after the comment opener, when there is no + other text with which to align, N characters from the comment + opener. (default 3). See also |format-comments|. +*************** +*** 339,344 **** +--- 378,384 ---- + text. text. + */ */ + < ++ *cino-C* + CN When N is non-zero, indent comment lines by the amount specified + with the c flag above even if there is other text behind the + comment opener. (default 0). +*************** +*** 349,360 **** +--- 389,402 ---- + ********/ ********/ + < (Example uses ":set comments& comments-=s1:/* comments^=s0:/*") + ++ *cino-/* + /N Indent comment lines N characters extra. (default 0). + cino= cino=/4 > + a = b; a = b; + /* comment */ /* comment */ + c = d; c = d; + < ++ *cino-(* + (N When in unclosed parentheses, indent N characters from the line + with the unclosed parentheses. Add a 'shiftwidth' for every + unclosed parentheses. When N is 0 or the unclosed parentheses +*************** +*** 370,375 **** +--- 412,418 ---- + (c2 || c3)) (c2 || c3)) + { { + < ++ *cino-u* + uN Same as (N, but for one level deeper. (default 'shiftwidth'). + + cino= cino=u2 > +*************** +*** 377,382 **** +--- 420,426 ---- + && (c22345 && (c22345 + || c3)) || c3)) + < ++ *cino-U* + UN When N is non-zero, do not ignore the indenting specified by + ( or u in case that the unclosed parentheses is the first + non-white character in its line. (default 0). +*************** +*** 388,393 **** +--- 432,438 ---- + c3 c3 + ) && c4; ) && c4; + < ++ *cino-2* + wN When in unclosed parentheses and N is non-zero and either + using "(0" or "u0", respectively, or using "U0" and the unclosed + parentheses is the first non-white character in its line, line +*************** +*** 400,405 **** +--- 445,451 ---- + || c3)) || c3)) + foo; foo; + < ++ *cino-W* + 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 +*************** +*** 414,419 **** +--- 460,466 ---- + a_short_line(argument, a_short_line(argument, + argument); argument); + < ++ *cino-m* + mN When N is non-zero, line up a line starting with a closing + parentheses with the first character of the line with the + matching opening parentheses. (default 0). +*************** +*** 428,433 **** +--- 475,481 ---- + ) ) + foo; foo; + < ++ *cino-M* + MN When N is non-zero, line up a line starting with a closing + parentheses with the first character of the previous line. + (default 0). +*************** +*** 437,443 **** + cond2 cond2 + ) ) + < +! *java-cinoptions* *java-indenting* + jN Indent java anonymous classes correctly. The value 'N' is + currently unused but must be non-zero (e.g. 'j1'). 'j1' will + indent for example the following code snippet correctly: > +--- 485,491 ---- + cond2 cond2 + ) ) + < +! *java-cinoptions* *java-indenting* *cino-j* + jN Indent java anonymous classes correctly. The value 'N' is + currently unused but must be non-zero (e.g. 'j1'). 'j1' will + indent for example the following code snippet correctly: > +*************** +*** 448,454 **** + } + }); + < +! *javascript-cinoptions* *javascript-indenting* + JN Indent JavaScript object declarations correctly by not confusing + them with labels. The value 'N' is currently unused but must be + non-zero (e.g. 'J1'). > +--- 496,502 ---- + } + }); + < +! *javascript-cinoptions* *javascript-indenting* *cino-J* + JN Indent JavaScript object declarations correctly by not confusing + them with labels. The value 'N' is currently unused but must be + non-zero (e.g. 'J1'). > +*************** +*** 466,481 **** +--- 514,532 ---- + } + } + < ++ *cino-)* + )N Vim searches for unclosed parentheses at most N lines away. + This limits the time needed to search for parentheses. (default + 20 lines). + ++ *cino-star* + *N Vim searches for unclosed comments at most N lines away. This + limits the time needed to search for the start of a comment. + If your /* */ comments stop indenting afer N lines this is the + value you will want to change. + (default 70 lines). + ++ *cino-#* + #N When N is non-zero recognize shell/Perl comments, starting with + '#'. Default N is zero: don't recognizes '#' comments. Note + that lines starting with # will still be seen as preprocessor +*************** +*** 483,489 **** + + + The defaults, spelled out in full, are: +! cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,ps,ts,is,+s, + c3,C0,/0,(2s,us,U0,w0,W0,m0,j0,J0,)20,*70,#0 + + Vim puts a line in column 1 if: +--- 534,540 ---- + + + The defaults, spelled out in full, are: +! cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,ps,ts,is,+s, + c3,C0,/0,(2s,us,U0,w0,W0,m0,j0,J0,)20,*70,#0 + + Vim puts a line in column 1 if: +*** ../mercurial/vim73/src/misc1.c 2011-05-25 13:33:59.000000000 +0200 +--- src/misc1.c 2011-05-25 14:57:31.000000000 +0200 +*************** +*** 4959,4964 **** +--- 4959,4965 ---- + 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)); ++ static int cin_is_cpp_namespace __ARGS((char_u *)); + + static int ind_hash_comment = 0; /* # starts a comment */ + +*************** +*** 5221,5226 **** +--- 5222,5271 ---- + return (*(s = cin_skipcomment(s + i)) == ':' && s[1] != ':'); + } + ++ /* Maximum number of lines to search back for a "namespace" line. */ ++ #define FIND_NAMESPACE_LIM 20 ++ ++ /* ++ * Recognize a "namespace" scope declaration. ++ */ ++ static int ++ cin_is_cpp_namespace(s) ++ char_u *s; ++ { ++ char_u *p; ++ int has_name = FALSE; ++ ++ s = cin_skipcomment(s); ++ if (STRNCMP(s, "namespace", 9) == 0 && (s[9] == NUL || !vim_iswordc(s[9]))) ++ { ++ p = cin_skipcomment(skipwhite(s + 9)); ++ while (*p != NUL) ++ { ++ if (vim_iswhite(*p)) ++ { ++ has_name = TRUE; /* found end of a name */ ++ p = cin_skipcomment(skipwhite(p)); ++ } ++ else if (*p == '{') ++ { ++ break; ++ } ++ else if (vim_iswordc(*p)) ++ { ++ if (has_name) ++ return FALSE; /* word character after skipping past name */ ++ ++p; ++ } ++ else ++ { ++ return FALSE; ++ } ++ } ++ return TRUE; ++ } ++ return FALSE; ++ } ++ + /* + * Return a pointer to the first non-empty non-comment character after a ':'. + * Return NULL if not found. +*************** +*** 6296,6301 **** +--- 6341,6351 ---- + */ + int ind_keep_case_label = 0; + ++ /* ++ * handle C++ namespace ++ */ ++ int ind_cpp_namespace = 0; ++ + pos_T cur_curpos; + int amount; + int scope_amount; +*************** +*** 6336,6341 **** +--- 6386,6392 ---- + int n; + int iscase; + int lookfor_break; ++ int lookfor_cpp_namespace = FALSE; + int cont_amount = 0; /* amount for continuation line */ + int original_line_islabel; + +*************** +*** 6409,6414 **** +--- 6460,6466 ---- + case 'J': ind_js = n; break; + case 'l': ind_keep_case_label = n; break; + case '#': ind_hash_comment = n; break; ++ case 'N': ind_cpp_namespace = n; break; + } + if (*options == ',') + ++options; +*************** +*** 6976,6986 **** +--- 7028,7051 ---- + if (start_brace == BRACE_IN_COL0) /* '{' is in column 0 */ + { + amount = ind_open_left_imag; ++ lookfor_cpp_namespace = TRUE; ++ } ++ else if (start_brace == BRACE_AT_START && ++ lookfor_cpp_namespace) /* '{' is at start */ ++ { ++ ++ lookfor_cpp_namespace = TRUE; + } + else + { + if (start_brace == BRACE_AT_END) /* '{' is at end of line */ ++ { + amount += ind_open_imag; ++ ++ l = skipwhite(ml_get_curline()); ++ if (cin_is_cpp_namespace(l)) ++ amount += ind_cpp_namespace; ++ } + else + { + /* Compensate for adding ind_open_extra later. */ +*************** +*** 7151,7156 **** +--- 7216,7261 ---- + else + amount += ind_continuation; + } ++ else if (lookfor_cpp_namespace) ++ { ++ if (curwin->w_cursor.lnum == ourscope) ++ continue; ++ ++ if (curwin->w_cursor.lnum == 0 ++ || curwin->w_cursor.lnum ++ < ourscope - FIND_NAMESPACE_LIM) ++ 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; ++ curwin->w_cursor.col = 0; ++ continue; ++ } ++ ++ /* ++ * Skip preprocessor directives and blank lines. ++ */ ++ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum)) ++ continue; ++ ++ if (cin_is_cpp_namespace(l)) ++ { ++ amount += ind_cpp_namespace; ++ break; ++ } ++ ++ if (cin_nocode(l)) ++ continue; ++ ++ } + else if (lookfor != LOOKFOR_TERM + && lookfor != LOOKFOR_CPP_BASECLASS) + { +*** ../mercurial/vim73/src/testdir/test3.in 2011-05-25 13:33:59.000000000 +0200 +--- src/testdir/test3.in 2011-05-25 14:47:31.000000000 +0200 +*************** +*** 799,804 **** +--- 799,867 ---- + df */ + hello + } ++ ++ /* valid namespaces with normal indent */ ++ namespace ++ { ++ { ++ 111111111111; ++ } ++ } ++ namespace /* test */ ++ { ++ 11111111111111111; ++ } ++ namespace // test ++ { ++ 111111111111111111; ++ } ++ namespace ++ { ++ 111111111111111111; ++ } ++ namespace test ++ { ++ 111111111111111111; ++ } ++ namespace{ ++ 111111111111111111; ++ } ++ namespace test{ ++ 111111111111111111; ++ } ++ namespace { ++ 111111111111111111; ++ } ++ namespace test { ++ 111111111111111111; ++ namespace test2 { ++ 22222222222222222; ++ } ++ } ++ ++ /* invalid namespaces use block indent */ ++ namespace test test2 { ++ 111111111111111111111; ++ } ++ namespace11111111111 { ++ 111111111111; ++ } ++ namespace() { ++ 1111111111111; ++ } ++ namespace() ++ { ++ 111111111111111111; ++ } ++ namespace test test2 ++ { ++ 1111111111111111111; ++ } ++ namespace111111111 ++ { ++ 111111111111111111; ++ } ++ + /* end of AUTO */ + + STARTTEST +*************** +*** 1428,1433 **** +--- 1491,1566 ---- + } + + STARTTEST ++ :set cino=N-s ++ /namespaces ++ =/^NAMESPACEEND ++ ENDTEST ++ ++ /* valid namespaces with normal indent */ ++ namespace ++ { ++ { ++ 111111111111; ++ } ++ } ++ namespace /* test */ ++ { ++ 11111111111111111; ++ } ++ namespace // test ++ { ++ 111111111111111111; ++ } ++ namespace ++ { ++ 111111111111111111; ++ } ++ namespace test ++ { ++ 111111111111111111; ++ } ++ namespace{ ++ 111111111111111111; ++ } ++ namespace test{ ++ 111111111111111111; ++ } ++ namespace { ++ 111111111111111111; ++ } ++ namespace test { ++ 111111111111111111; ++ namespace test2 { ++ 22222222222222222; ++ } ++ } ++ ++ /* invalid namespaces use block indent */ ++ namespace test test2 { ++ 111111111111111111111; ++ } ++ namespace11111111111 { ++ 111111111111; ++ } ++ namespace() { ++ 1111111111111; ++ } ++ namespace() ++ { ++ 111111111111111111; ++ } ++ namespace test test2 ++ { ++ 1111111111111111111; ++ } ++ namespace111111111 ++ { ++ 111111111111111111; ++ } ++ NAMESPACEEND ++ ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../mercurial/vim73/src/testdir/test3.ok 2011-05-25 13:33:59.000000000 +0200 +--- src/testdir/test3.ok 2011-05-25 14:48:02.000000000 +0200 +*************** +*** 787,792 **** +--- 787,855 ---- + df */ + hello + } ++ ++ /* valid namespaces with normal indent */ ++ namespace ++ { ++ { ++ 111111111111; ++ } ++ } ++ namespace /* test */ ++ { ++ 11111111111111111; ++ } ++ namespace // test ++ { ++ 111111111111111111; ++ } ++ namespace ++ { ++ 111111111111111111; ++ } ++ namespace test ++ { ++ 111111111111111111; ++ } ++ namespace{ ++ 111111111111111111; ++ } ++ namespace test{ ++ 111111111111111111; ++ } ++ namespace { ++ 111111111111111111; ++ } ++ namespace test { ++ 111111111111111111; ++ namespace test2 { ++ 22222222222222222; ++ } ++ } ++ ++ /* invalid namespaces use block indent */ ++ namespace test test2 { ++ 111111111111111111111; ++ } ++ namespace11111111111 { ++ 111111111111; ++ } ++ namespace() { ++ 1111111111111; ++ } ++ namespace() ++ { ++ 111111111111111111; ++ } ++ namespace test test2 ++ { ++ 1111111111111111111; ++ } ++ namespace111111111 ++ { ++ 111111111111111111; ++ } ++ + /* end of AUTO */ + + +*************** +*** 1273,1275 **** +--- 1336,1403 ---- + baz(); + } + ++ ++ /* valid namespaces with normal indent */ ++ namespace ++ { ++ { ++ 111111111111; ++ } ++ } ++ namespace /* test */ ++ { ++ 11111111111111111; ++ } ++ namespace // test ++ { ++ 111111111111111111; ++ } ++ namespace ++ { ++ 111111111111111111; ++ } ++ namespace test ++ { ++ 111111111111111111; ++ } ++ namespace{ ++ 111111111111111111; ++ } ++ namespace test{ ++ 111111111111111111; ++ } ++ namespace { ++ 111111111111111111; ++ } ++ namespace test { ++ 111111111111111111; ++ namespace test2 { ++ 22222222222222222; ++ } ++ } ++ ++ /* invalid namespaces use block indent */ ++ namespace test test2 { ++ 111111111111111111111; ++ } ++ namespace11111111111 { ++ 111111111111; ++ } ++ namespace() { ++ 1111111111111; ++ } ++ namespace() ++ { ++ 111111111111111111; ++ } ++ namespace test test2 ++ { ++ 1111111111111111111; ++ } ++ namespace111111111 ++ { ++ 111111111111111111; ++ } ++ NAMESPACEEND ++ ++ +*** ../vim-7.3.201/src/version.c 2011-05-25 13:33:59.000000000 +0200 +--- src/version.c 2011-05-25 15:14:20.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 202, + /**/ + +-- +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/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From cb9530519115d85cc4cc098a8a7f136bb23d2b03 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:48 +0200 Subject: [PATCH 0221/3803] - patchlevel 203 --- 7.3.203 | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 7.3.203 diff --git a/7.3.203 b/7.3.203 new file mode 100644 index 00000000..4cbb4752 --- /dev/null +++ b/7.3.203 @@ -0,0 +1,150 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.203 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.203 +Problem: MS-Windows: Can't run an external command without a console window. +Solution: Support ":!start /b cmd". (Xaizek) +Files: runtime/doc/os_win32.txt, src/os_win32.c + + +*** ../mercurial/vim73/runtime/doc/os_win32.txt 2011-01-08 16:05:50.000000000 +0100 +--- runtime/doc/os_win32.txt 2011-05-25 17:04:58.000000000 +0200 +*************** +*** 313,319 **** + with :!start do not get passed Vim's open file handles, which means they do + not have to be closed before Vim. + To avoid this special treatment, use ":! start". +! The optional "/min" argument causes the window to be minimized. + + Q. I'm using Win32s, and when I try to run an external command like "make", + Vim doesn't wait for it to finish! Help! +--- 313,348 ---- + with :!start do not get passed Vim's open file handles, which means they do + not have to be closed before Vim. + To avoid this special treatment, use ":! start". +! There are two optional arguments (see the next Q): +! /min the window will be minimized. +! /b" no console window will be opened +! You can only one of these flags at a time. A second second one will be +! treated as the start of the command. +! +! Q. How do I avoid getting a window for programs that I run asynchronously? +! A. You have two possible solutions depending on what exactly do you want: +! 1) You may use the /min flag that would run program in minimized state with +! no other changes. It will work equally for console and GUI applications. +! 2) You can use /b flag to run console applications without creating a +! console window for them (GUI applications are not affected). But you +! should use this flag only if application you run doesn't require any +! input. Otherwise it will get an EOF error because it's input stream +! (stdin) would be redirected to \\.\NUL (stdour and stderr too). +! +! Example for a console application, run Exuberant ctags: > +! :!start /min ctags -R . +! < When it has finished you should see file named "tags" in your current +! directory. You should notice the window title blinking on your taskbar. +! This is more noticable for commands that take longer. +! Now delete the "tags" file and run this command: > +! :!start /b ctags -R . +! < You should have the same "tags" file, but this time there will be no +! blinking on the taskbar. +! Example for a GUI application: > +! :!start /min notepad +! :!start /b notepad +! < The first command runs notepad minimized and the second one runs it +! normally. + + Q. I'm using Win32s, and when I try to run an external command like "make", + Vim doesn't wait for it to finish! Help! +*** ../mercurial/vim73/src/os_win32.c 2011-05-05 18:31:54.000000000 +0200 +--- src/os_win32.c 2011-05-25 16:45:31.000000000 +0200 +*************** +*** 3401,3406 **** +--- 3401,3407 ---- + { + STARTUPINFO si; + PROCESS_INFORMATION pi; ++ DWORD flags = CREATE_NEW_CONSOLE; + + si.cb = sizeof(si); + si.lpReserved = NULL; +*************** +*** 3418,3423 **** +--- 3419,3440 ---- + si.dwFlags = STARTF_USESHOWWINDOW; + si.wShowWindow = SW_SHOWMINNOACTIVE; + } ++ else if ((STRNICMP(cmdbase, "/b", 2) == 0) ++ && vim_iswhite(cmdbase[2])) ++ { ++ cmdbase = skipwhite(cmdbase + 2); ++ flags = CREATE_NO_WINDOW; ++ si.dwFlags = STARTF_USESTDHANDLES; ++ si.hStdInput = CreateFile("\\\\.\\NUL", // File name ++ GENERIC_READ, // Access flags ++ 0, // Share flags ++ NULL, // Security att. ++ OPEN_EXISTING, // Open flags ++ FILE_ATTRIBUTE_NORMAL, // File att. ++ NULL); // Temp file ++ si.hStdOutput = si.hStdInput; ++ si.hStdError = si.hStdInput; ++ } + + /* When the command is in double quotes, but 'shellxquote' is + * empty, keep the double quotes around the command. +*************** +*** 3445,3451 **** + NULL, // Process security attributes + NULL, // Thread security attributes + FALSE, // Inherit handles +! CREATE_NEW_CONSOLE, // Creation flags + NULL, // Environment + NULL, // Current directory + &si, // Startup information +--- 3462,3468 ---- + NULL, // Process security attributes + NULL, // Thread security attributes + FALSE, // Inherit handles +! flags, // Creation flags + NULL, // Environment + NULL, // Current directory + &si, // Startup information +*************** +*** 3458,3463 **** +--- 3475,3485 ---- + EMSG(_("E371: Command not found")); + #endif + } ++ if (si.hStdInput != NULL) ++ { ++ /* Close the handle to \\.\NUL */ ++ CloseHandle(si.hStdInput); ++ } + /* Close the handles to the subprocess, so that it goes away */ + CloseHandle(pi.hThread); + CloseHandle(pi.hProcess); +*** ../vim-7.3.202/src/version.c 2011-05-25 15:16:06.000000000 +0200 +--- src/version.c 2011-05-25 17:05:59.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 203, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +108. While reading a magazine, you look for the Zoom icon for a better + look at a photograph. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From c247656b917ea7efc487c1c8e6d732f62eb06039 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:48 +0200 Subject: [PATCH 0222/3803] - patchlevel 204 --- 7.3.204 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 7.3.204 diff --git a/7.3.204 b/7.3.204 new file mode 100644 index 00000000..b2b63602 --- /dev/null +++ b/7.3.204 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.204 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.204 (after 7.3.201) +Problem: Compiler warning. +Solution: Add type cast. (Mike Williams) +Files: src/misc1.c + + +*** ../mercurial/vim73/src/misc1.c 2011-05-25 15:16:06.000000000 +0200 +--- src/misc1.c 2011-05-25 17:25:10.000000000 +0200 +*************** +*** 7657,7663 **** + * not the one from "if () {". */ + if (*l == '}') + curwin->w_cursor.col = +! (l - ml_get_curline()) + 1; + + if ((trypos = find_start_brace(ind_maxcomment)) + == NULL +--- 7657,7663 ---- + * not the one from "if () {". */ + if (*l == '}') + curwin->w_cursor.col = +! (colnr_T)(l - ml_get_curline()) + 1; + + if ((trypos = find_start_brace(ind_maxcomment)) + == NULL +*** ../vim-7.3.203/src/version.c 2011-05-25 17:06:16.000000000 +0200 +--- src/version.c 2011-05-25 17:29:32.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 204, + /**/ + +-- +In a world without walls and borders, who needs windows and gates? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 51175f229107c85efd6418de2f02bd74e3080802 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:48 +0200 Subject: [PATCH 0223/3803] - patchlevel 205 --- 7.3.205 | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 7.3.205 diff --git a/7.3.205 b/7.3.205 new file mode 100644 index 00000000..b49a040e --- /dev/null +++ b/7.3.205 @@ -0,0 +1,93 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.205 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.205 +Problem: Syntax "extend" doesn't work correctly. +Solution: Avoid calling check_state_ends() recursively (Ben Schmidt) +Files: src/syntax.c + + +*** ../mercurial/vim73/src/syntax.c 2011-05-19 12:14:03.000000000 +0200 +--- src/syntax.c 2011-05-25 17:47:46.000000000 +0200 +*************** +*** 990,996 **** +--- 990,999 ---- + * previous line and regions that have "keepend". + */ + if (current_state.ga_len > 0) ++ { + syn_update_ends(TRUE); ++ check_state_ends(); ++ } + + next_match_idx = -1; + ++current_line_id; +*************** +*** 1064,1070 **** + } + } + check_keepend(); +- check_state_ends(); + } + + /**************************************** +--- 1067,1072 ---- +*************** +*** 2533,2539 **** + check_state_ends() + { + stateitem_T *cur_si; +! int had_extend = FALSE; + + cur_si = &CUR_STATE(current_state.ga_len - 1); + for (;;) +--- 2535,2541 ---- + check_state_ends() + { + stateitem_T *cur_si; +! int had_extend; + + cur_si = &CUR_STATE(current_state.ga_len - 1); + for (;;) +*************** +*** 2586,2593 **** + + /* When the ended item has "extend", another item with + * "keepend" now needs to check for its end. */ +! if (cur_si->si_flags & HL_EXTEND) +! had_extend = TRUE; + + pop_current_state(); + +--- 2588,2594 ---- + + /* When the ended item has "extend", another item with + * "keepend" now needs to check for its end. */ +! had_extend = (cur_si->si_flags & HL_EXTEND); + + pop_current_state(); + +*** ../vim-7.3.204/src/version.c 2011-05-25 17:29:40.000000000 +0200 +--- src/version.c 2011-05-25 17:52:57.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 205, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +110. You actually volunteer to become your employer's webmaster. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 66f56d01f573bfa9e4c2420e2b3c2f9106719476 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:49 +0200 Subject: [PATCH 0224/3803] - patchlevel 206 --- 7.3.206 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 7.3.206 diff --git a/7.3.206 b/7.3.206 new file mode 100644 index 00000000..8a91f0ae --- /dev/null +++ b/7.3.206 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.206 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.206 +Problem: 64bit MS-Windows compiler warning. +Solution: Use HandleToLong() instead of type cast. (Mike Williams) +Files: src/gui_w32.c + + +*** ../mercurial/vim73/src/gui_w32.c 2011-01-17 20:08:04.000000000 +0100 +--- src/gui_w32.c 2011-05-25 21:14:10.000000000 +0200 +*************** +*** 1575,1581 **** + + #ifdef FEAT_EVAL + /* set the v:windowid variable */ +! set_vim_var_nr(VV_WINDOWID, (long)s_hwnd); + #endif + + theend: +--- 1575,1581 ---- + + #ifdef FEAT_EVAL + /* set the v:windowid variable */ +! set_vim_var_nr(VV_WINDOWID, HandleToLong(s_hwnd)); + #endif + + theend: +*** ../vim-7.3.205/src/version.c 2011-05-25 17:56:23.000000000 +0200 +--- src/version.c 2011-05-25 21:16:17.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 206, + /**/ + +-- +FIXME and XXX are two common keywords used to mark broken or incomplete code +not only since XXX as a sex reference would grab everybody's attention but +simply due to the fact that Vim would highlight these words. + -- Hendrik Scholz + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ae9e7bacc921ad47eac03f0f7dc3286f96a721c3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 13:07:49 +0200 Subject: [PATCH 0225/3803] - patchlevel 206 --- README.patches | 17 +++++++++++++++++ vim.spec | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index 4ea2ced0..678dad30 100644 --- a/README.patches +++ b/README.patches @@ -215,3 +215,20 @@ Individual patches for Vim 7.3: 173872 7.3.187 the RISC OS port is not being maintained, remove it 7901 7.3.188 some more RISC OS files to be removed 1476 7.3.189 (after 7.3.186) build fails without +clipboard + 1462 7.3.190 "containedin" syntax argument may make highlighting be wrong + 13294 7.3.191 still some RISC OS stuff to remove + 1701 7.3.192 command ":s/ \?/ /g" splits multi-byte characters into bytes + 1998 7.3.193 in the command line window ":close" doesn't work properly + 1397 7.3.194 "!mkdir a | ln -s a b", resolve("b/") doesn't result in "a/" + 4951 7.3.195 "} else" causes following lines to be indented too much + 7478 7.3.196 can't intercept a character that is going to be inserted + 2367 7.3.197 get E42 error when a QuickfixCmdPost event removes all errors + 12240 7.3.198 there is no completion for ":lang" + 1857 7.3.199 MS-Windows: Compilation problem of OLE with MingW compiler + 2213 7.3.200 (after 7.3.198) CTRL-D doesn't complete :lang + 3303 7.3.201 (after 7.3.195) still bad indenting after "} else" + 22565 7.3.202 cannot influence the indent inside a namespace + 5725 7.3.203 MS-Windows: Can't run external command without console window + 1588 7.3.204 (after 7.3.201) compiler warning + 2430 7.3.205 syntax "extend" doesn't work correctly + 1617 7.3.206 64bit MS-Windows compiler warning diff --git a/vim.spec b/vim.spec index 3597be5f..cf69db34 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 189 +%define patchlevel 206 Summary: The VIM editor URL: http://www.vim.org/ @@ -253,6 +253,23 @@ Patch186: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.186 Patch187: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.187 Patch188: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.188 Patch189: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.189 +Patch190: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.190 +Patch191: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.191 +Patch192: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.192 +Patch193: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.193 +Patch194: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.194 +Patch195: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.195 +Patch196: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.196 +Patch197: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.197 +Patch198: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.198 +Patch199: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.199 +Patch200: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.200 +Patch201: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.201 +Patch202: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.202 +Patch203: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.203 +Patch204: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.204 +Patch205: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.205 +Patch206: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.206 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -586,6 +603,23 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch187 -p0 %patch188 -p0 %patch189 -p0 +%patch190 -p0 +%patch191 -p0 +%patch192 -p0 +%patch193 -p0 +%patch194 -p0 +%patch195 -p0 +%patch196 -p0 +%patch197 -p0 +%patch198 -p0 +%patch199 -p0 +%patch200 -p0 +%patch201 -p0 +%patch202 -p0 +%patch203 -p0 +%patch204 -p0 +%patch205 -p0 +%patch206 -p0 # install spell files @@ -1053,6 +1087,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Mon May 30 2011 Karsten Hopp 7.3.206-1 +- patchlevel 206 + * Wed May 11 2011 Karsten Hopp 7.3.189-1 - patchlevel 189 From 03f22da79aeccae6a3e87948969393704c9d9e3f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 14:00:30 +0200 Subject: [PATCH 0226/3803] drop xxd-locale patch update to patchlevel 206 --- 7.3.202 | 42 ------------------------------------------ 7.3.203 | 50 +------------------------------------------------- vim.spec | 7 ++++--- 3 files changed, 5 insertions(+), 94 deletions(-) diff --git a/7.3.202 b/7.3.202 index be22ea6a..087cb4b6 100644 --- a/7.3.202 +++ b/7.3.202 @@ -153,16 +153,6 @@ Files: runtime/doc/indent.txt, src/misc1.c, src/testdir/test3.in, statement after it in the same line. *************** -*** 256,261 **** ---- 273,279 ---- - break; break; - } } - < -+ *cino-b* - 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). - When using 1, consider adding "0=break" to 'cinkeys'. -*************** *** 272,277 **** --- 290,296 ---- break; break; @@ -227,16 +217,6 @@ Files: runtime/doc/indent.txt, src/misc1.c, src/testdir/test3.in, initializations, if they start in a new line (otherwise they are aligned at the right side of the ':'). *************** -*** 320,325 **** ---- 357,363 ---- - BaseClass(3) BaseClass(3) - {} {} - < -+ *cino-+* - +N Indent a continuation line (a line that spills onto the next) - inside a function N additional characters. (default - 'shiftwidth'). -*************** *** 330,335 **** --- 368,374 ---- a = b + 9 * a = b + 9 * @@ -368,28 +348,6 @@ Files: runtime/doc/indent.txt, src/misc1.c, src/testdir/test3.in, them with labels. The value 'N' is currently unused but must be non-zero (e.g. 'J1'). > *************** -*** 466,481 **** ---- 514,532 ---- - } - } - < -+ *cino-)* - )N Vim searches for unclosed parentheses at most N lines away. - This limits the time needed to search for parentheses. (default - 20 lines). - -+ *cino-star* - *N Vim searches for unclosed comments at most N lines away. This - limits the time needed to search for the start of a comment. - If your /* */ comments stop indenting afer N lines this is the - value you will want to change. - (default 70 lines). - -+ *cino-#* - #N When N is non-zero recognize shell/Perl comments, starting with - '#'. Default N is zero: don't recognizes '#' comments. Note - that lines starting with # will still be seen as preprocessor -*************** *** 483,489 **** diff --git a/7.3.203 b/7.3.203 index 4cbb4752..a724cf7e 100644 --- a/7.3.203 +++ b/7.3.203 @@ -10,57 +10,9 @@ Content-Transfer-Encoding: 8bit Patch 7.3.203 Problem: MS-Windows: Can't run an external command without a console window. Solution: Support ":!start /b cmd". (Xaizek) -Files: runtime/doc/os_win32.txt, src/os_win32.c +Files: src/os_win32.c -*** ../mercurial/vim73/runtime/doc/os_win32.txt 2011-01-08 16:05:50.000000000 +0100 ---- runtime/doc/os_win32.txt 2011-05-25 17:04:58.000000000 +0200 -*************** -*** 313,319 **** - with :!start do not get passed Vim's open file handles, which means they do - not have to be closed before Vim. - To avoid this special treatment, use ":! start". -! The optional "/min" argument causes the window to be minimized. - - Q. I'm using Win32s, and when I try to run an external command like "make", - Vim doesn't wait for it to finish! Help! ---- 313,348 ---- - with :!start do not get passed Vim's open file handles, which means they do - not have to be closed before Vim. - To avoid this special treatment, use ":! start". -! There are two optional arguments (see the next Q): -! /min the window will be minimized. -! /b" no console window will be opened -! You can only one of these flags at a time. A second second one will be -! treated as the start of the command. -! -! Q. How do I avoid getting a window for programs that I run asynchronously? -! A. You have two possible solutions depending on what exactly do you want: -! 1) You may use the /min flag that would run program in minimized state with -! no other changes. It will work equally for console and GUI applications. -! 2) You can use /b flag to run console applications without creating a -! console window for them (GUI applications are not affected). But you -! should use this flag only if application you run doesn't require any -! input. Otherwise it will get an EOF error because it's input stream -! (stdin) would be redirected to \\.\NUL (stdour and stderr too). -! -! Example for a console application, run Exuberant ctags: > -! :!start /min ctags -R . -! < When it has finished you should see file named "tags" in your current -! directory. You should notice the window title blinking on your taskbar. -! This is more noticable for commands that take longer. -! Now delete the "tags" file and run this command: > -! :!start /b ctags -R . -! < You should have the same "tags" file, but this time there will be no -! blinking on the taskbar. -! Example for a GUI application: > -! :!start /min notepad -! :!start /b notepad -! < The first command runs notepad minimized and the second one runs it -! normally. - - Q. I'm using Win32s, and when I try to run an external command like "make", - Vim doesn't wait for it to finish! Help! *** ../mercurial/vim73/src/os_win32.c 2011-05-05 18:31:54.000000000 +0200 --- src/os_win32.c 2011-05-25 16:45:31.000000000 +0200 *************** diff --git a/vim.spec b/vim.spec index cf69db34..282bba6a 100644 --- a/vim.spec +++ b/vim.spec @@ -56,7 +56,6 @@ Source23: ftp://ftp.vim.org/vol/2/vim/runtime/autoload/netrwSettings.vim Patch2002: vim-7.0-fixkeys.patch Patch2003: vim-6.2-specsyntax.patch Patch2004: vim-7.0-crv.patch -Patch2010: xxd-locale.patch %if %{withhunspell} Patch2011: vim-7.0-hunspell.patch BuildRequires: hunspell-devel @@ -265,7 +264,9 @@ Patch198: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.198 Patch199: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.199 Patch200: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.200 Patch201: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.201 +# Patched: Patch202: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.202 +# Patched: Patch203: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.203 Patch204: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.204 Patch205: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.205 @@ -406,7 +407,6 @@ chmod -x runtime/tools/mve.awk %patch2002 -p1 %patch2003 -p1 %patch2004 -p1 -%patch2010 -p1 %if %{withhunspell} %patch2011 -p1 %endif @@ -1088,7 +1088,8 @@ rm -rf $RPM_BUILD_ROOT %changelog * Mon May 30 2011 Karsten Hopp 7.3.206-1 -- patchlevel 206 +- drop xxd-locale patch +- update to patchlevel 206 * Wed May 11 2011 Karsten Hopp 7.3.189-1 - patchlevel 189 From 8b3bbbd6ec095316b5fdf03c0485dfae66ab0e12 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 30 May 2011 14:02:45 +0200 Subject: [PATCH 0227/3803] drop unused patch --- vim-7.1-ada.patch | 7018 --------------------------------------------- 1 file changed, 7018 deletions(-) delete mode 100644 vim-7.1-ada.patch diff --git a/vim-7.1-ada.patch b/vim-7.1-ada.patch deleted file mode 100644 index 112fdf22..00000000 --- a/vim-7.1-ada.patch +++ /dev/null @@ -1,7018 +0,0 @@ -diff -urN vim71/runtime/autoload/adacomplete.vim vim71_ada/runtime/autoload/adacomplete.vim ---- vim71/runtime/autoload/adacomplete.vim 2007-05-05 19:34:16.000000000 +0200 -+++ vim71_ada/runtime/autoload/adacomplete.vim 2008-01-16 16:46:40.000000000 +0100 -@@ -1,13 +1,13 @@ - "------------------------------------------------------------------------------ - " Description: Vim Ada omnicompletion file - " Language: Ada (2005) --" $Id: adacomplete.vim,v 1.1 2007/05/05 17:34:16 vimboss Exp $ -+" $Id: adacomplete.vim 825 2007-12-09 13:34:03Z krischik $ - " Maintainer: Martin Krischik --" $Author: vimboss $ --" $Date: 2007/05/05 17:34:16 $ --" Version: 4.2 --" $Revision: 1.1 $ --" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $ -+" $Author: krischik $ -+" $Date: 2007-12-09 14:34:03 +0100 (So, 09 Dez 2007) $ -+" Version: 4.5 -+" $Revision: 825 $ -+" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $ - " History: 24.05.2006 MK Unified Headers - " 26.05.2006 MK improved search for begin of word. - " 16.07.2006 MK Ada-Mode as vim-ball -diff -urN vim71/runtime/autoload/ada.vim vim71_ada/runtime/autoload/ada.vim ---- vim71/runtime/autoload/ada.vim 2007-05-05 20:02:22.000000000 +0200 -+++ vim71_ada/runtime/autoload/ada.vim 2008-01-16 16:46:40.000000000 +0100 -@@ -1,14 +1,16 @@ - "------------------------------------------------------------------------------ - " Description: Perform Ada specific completion & tagging. - " Language: Ada (2005) --" $Id: ada.vim,v 1.1 2007/05/05 18:02:22 vimboss Exp $ --" Maintainer: Martin Krischik -+" $Id: ada.vim 774 2007-09-17 09:11:59Z krischik $ -+" Maintainer: Martin Krischik -+" Taylor Venable - " Neil Bird --" $Author: vimboss $ --" $Date: 2007/05/05 18:02:22 $ --" Version: 4.2 --" $Revision: 1.1 $ --" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $ -+" Ned Okie -+" $Author: krischik $ -+" $Date: 2007-09-17 11:11:59 +0200 (Mo, 17 Sep 2007) $ -+" Version: 4.5 -+" $Revision: 774 $ -+" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $ - " History: 24.05.2006 MK Unified Headers - " 26.05.2006 MK ' should not be in iskeyword. - " 16.07.2006 MK Ada-Mode as vim-ball -@@ -17,6 +19,10 @@ - " 05.11.2006 MK Bram suggested not to use include protection for - " autoload - " 05.11.2006 MK Bram suggested to save on spaces -+" 08.07.2007 TV fix mapleader problems. -+" 09.05.2007 MK Session just won't work no matter how much -+" tweaking is done -+" 19.09.2007 NO still some mapleader problems - " Help Page: ft-ada-functions - "------------------------------------------------------------------------------ - -@@ -425,7 +431,15 @@ - execute '!ctags --excmd=number ' . l:Filename - endfunction ada#Create_Tags - --function ada#Switch_Session (New_Session) "{{{1 -+" Section: ada#Switch_Session {{{1 -+" -+function ada#Switch_Session (New_Session) -+ " -+ " you should not save to much date into the seession since they will -+ " be sourced -+ " -+ set sessionoptions=buffers,curdir,folds,globals,resize,slash,tabpages,tabpages,unix,winpos,winsize -+ - if a:New_Session != v:this_session - " - " We actualy got a new session - otherwise there -@@ -437,18 +451,23 @@ - - let v:this_session = a:New_Session - -- if filereadable (v:this_session) -- execute 'source ' . v:this_session -- endif -+ "if filereadable (v:this_session) -+ "execute 'source ' . v:this_session -+ "endif - - augroup ada_session - autocmd! - autocmd VimLeavePre * execute 'mksession! ' . v:this_session - augroup END -+ " -+ "if exists ("g:Tlist_Auto_Open") && g:Tlist_Auto_Open -+ "TlistOpen -+ "endif -+ - endif - - return --endfunction ada#Switch_Session "}}}1 -+endfunction ada#Switch_Session - - " Section: GNAT Pretty Printer folding {{{1 - " -@@ -546,18 +565,23 @@ - \ a:Keys . - \" :" . a:Command . "" - else -+ if exists("g:mapleader") -+ let l:leader = g:mapleader -+ else -+ let l:leader = '\' -+ endif - execute - \ "50amenu " . - \ "Ada." . escape(a:Text, ' ') . -- \ "" . escape(g:mapleader . "a" . a:Keys , '\') . -+ \ "" . escape(l:leader . "a" . a:Keys , '\') . - \ " :" . a:Command . "" - execute - \ "nnoremap " . -- \ escape(g:mapleader . "a" . a:Keys , '\') . -+ \ escape(l:leader . "a" . a:Keys , '\') . - \" :" . a:Command - execute - \ "inoremap " . -- \ escape(g:mapleader . "a" . a:Keys , '\') . -+ \ escape(l:leader . "a" . a:Keys , '\') . - \" :" . a:Command - endif - return -@@ -566,10 +590,15 @@ - " Section: ada#Map_Popup {{{2 - " - function ada#Map_Popup (Text, Keys, Command) -+ if exists("g:mapleader") -+ let l:leader = g:mapleader -+ else -+ let l:leader = '\' -+ endif - execute - \ "50amenu " . - \ "PopUp." . escape(a:Text, ' ') . -- \ "" . escape(g:mapleader . "a" . a:Keys , '\') . -+ \ "" . escape(l:leader . "a" . a:Keys , '\') . - \ " :" . a:Command . "" - - call ada#Map_Menu (a:Text, a:Keys, a:Command) -diff -urN vim71/runtime/autoload/decada.vim vim71_ada/runtime/autoload/decada.vim ---- vim71/runtime/autoload/decada.vim 2007-05-05 19:25:32.000000000 +0200 -+++ vim71_ada/runtime/autoload/decada.vim 2008-01-16 16:46:41.000000000 +0100 -@@ -1,14 +1,14 @@ - "------------------------------------------------------------------------------ - " Description: Vim Ada/Dec Ada compiler file - " Language: Ada (Dec Ada) --" $Id: decada.vim,v 1.1 2007/05/05 17:25:32 vimboss Exp $ -+" $Id: decada.vim 774 2007-09-17 09:11:59Z krischik $ - " Copyright: Copyright (C) 2006 Martin Krischik --" Maintainer: Martin Krischik --" $Author: vimboss $ --" $Date: 2007/05/05 17:25:32 $ --" Version: 4.2 --" $Revision: 1.1 $ --" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $ -+" Maintainer: Martin Krischik -+" $Author: krischik $ -+" $Date: 2007-09-17 11:11:59 +0200 (Mo, 17 Sep 2007) $ -+" Version: 4.5 -+" $Revision: 774 $ -+" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $ - " History: 21.07.2006 MK New Dec Ada - " 15.10.2006 MK Bram's suggestion for runtime integration - " 05.11.2006 MK Bram suggested not to use include protection for -@@ -45,7 +45,7 @@ - call ada#Switch_Session (a:1) - elseif argc() == 0 && strlen (v:servername) > 0 - call ada#Switch_Session ( -- \ expand('~')[0:-2] . ".vimfiles.session]" . -+ \ expand('~')[0:-2] . ".vimfiles.session]decada_" . - \ v:servername . ".vim") - endif - return -diff -urN vim71/runtime/autoload/gnat.vim vim71_ada/runtime/autoload/gnat.vim ---- vim71/runtime/autoload/gnat.vim 2007-05-05 20:18:20.000000000 +0200 -+++ vim71_ada/runtime/autoload/gnat.vim 2008-01-16 16:46:46.000000000 +0100 -@@ -1,14 +1,15 @@ - "------------------------------------------------------------------------------ - " Description: Vim Ada/GNAT compiler file - " Language: Ada (GNAT) --" $Id: gnat.vim,v 1.1 2007/05/05 18:18:20 vimboss Exp $ -+" $Id: gnat.vim 774 2007-09-17 09:11:59Z krischik $ - " Copyright: Copyright (C) 2006 Martin Krischik --" Maintainer: Martin Krischik --" $Author: vimboss $ --" $Date: 2007/05/05 18:18:20 $ --" Version: 4.2 --" $Revision: 1.1 $ --" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $ -+" Maintainer: Martin Krischi k -+" Ned Okie -+" $Author: krischik $ -+" $Date: 2007-09-17 11:11:59 +0200 (Mo, 17 Sep 2007) $ -+" Version: 4.5 -+" $Revision: 774 $ -+" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $ - " History: 24.05.2006 MK Unified Headers - " 16.07.2006 MK Ada-Mode as vim-ball - " 05.08.2006 MK Add session support -@@ -16,6 +17,7 @@ - " 05.11.2006 MK Bram suggested not to use include protection for - " autoload - " 05.11.2006 MK Bram suggested to save on spaces -+" 19.09.2007 NO use project file only when there is a project - " Help Page: compiler-gnat - "------------------------------------------------------------------------------ - -@@ -71,13 +73,19 @@ - execute 'mksession! ' . v:this_session - endif - -- if strlen (self.Project_File) > 0 -- call ada#Switch_Session ( -- \ expand('~') . "/vimfiles/session/" . -- \ fnamemodify (self.Project_File, ":t:r") . ".vim") -- else -- call ada#Switch_Session ('') -- endif -+ "if strlen (self.Project_File) > 0 -+ "if has("vms") -+ "call ada#Switch_Session ( -+ "\ expand('~')[0:-2] . ".vimfiles.session]gnat_" . -+ "\ fnamemodify (self.Project_File, ":t:r") . ".vim") -+ "else -+ "call ada#Switch_Session ( -+ "\ expand('~') . "/vimfiles/session/gnat_" . -+ "\ fnamemodify (self.Project_File, ":t:r") . ".vim") -+ "endif -+ "else -+ "call ada#Switch_Session ('') -+ "endif - - return - endfunction gnat#Set_Project_File " }}}1 -diff -urN vim71/runtime/compiler/decada.vim vim71_ada/runtime/compiler/decada.vim ---- vim71/runtime/compiler/decada.vim 2007-05-05 20:09:54.000000000 +0200 -+++ vim71_ada/runtime/compiler/decada.vim 2008-01-16 16:37:03.000000000 +0100 -@@ -1,16 +1,17 @@ - "------------------------------------------------------------------------------ - " Description: Vim Ada/Dec Ada compiler file - " Language: Ada (Dec Ada) --" $Id: decada.vim,v 1.1 2007/05/05 18:09:54 vimboss Exp $ -+" $Id: decada.vim 774 2007-09-17 09:11:59Z krischik $ - " Copyright: Copyright (C) 2006 Martin Krischik --" Maintainer: Martin Krischik --" $Author: vimboss $ --" $Date: 2007/05/05 18:09:54 $ --" Version: 4.2 --" $Revision: 1.1 $ --" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/decada.vim $ -+" Maintainer: Martin Krischik -+" $Author: krischik $ -+" $Date: 2007-09-17 11:11:59 +0200 (Mo, 17 Sep 2007) $ -+" Version: 4.5 -+" $Revision: 774 $ -+" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/decada.vim $ - " History: 21.07.2006 MK New Dec Ada - " 15.10.2006 MK Bram's suggestion for runtime integration -+" 08.09.2006 MK Correct double load protection. - " Help Page: compiler-decada - "------------------------------------------------------------------------------ - -@@ -24,6 +25,13 @@ - - if !exists("g:decada") - let g:decada = decada#New () -+ -+ call ada#Map_Menu ( -+ \'Dec Ada.Build', -+ \'', -+ \'call decada.Make ()') -+ -+ call g:decada.Set_Session () - endif - - if exists(":CompilerSet") != 2 -@@ -33,16 +41,9 @@ - command -nargs=* CompilerSet setlocal - endif - --call g:decada.Set_Session () -- - execute "CompilerSet makeprg=" . escape (g:decada.Make_Command, ' ') - execute "CompilerSet errorformat=" . escape (g:decada.Error_Format, ' ') - --call ada#Map_Menu ( -- \'Dec Ada.Build', -- \'', -- \'call decada.Make ()') -- - finish " 1}}} - - "------------------------------------------------------------------------------ -diff -urN vim71/runtime/compiler/gnat.vim vim71_ada/runtime/compiler/gnat.vim ---- vim71/runtime/compiler/gnat.vim 2007-05-05 20:04:19.000000000 +0200 -+++ vim71_ada/runtime/compiler/gnat.vim 2008-01-16 16:37:03.000000000 +0100 -@@ -1,17 +1,19 @@ - "------------------------------------------------------------------------------ - " Description: Vim Ada/GNAT compiler file - " Language: Ada (GNAT) --" $Id: gnat.vim,v 1.1 2007/05/05 18:04:19 vimboss Exp $ -+" $Id: gnat.vim 774 2007-09-17 09:11:59Z krischik $ - " Copyright: Copyright (C) 2006 Martin Krischik --" Maintainer: Martin Krischik --" $Author: vimboss $ --" $Date: 2007/05/05 18:04:19 $ --" Version: 4.2 --" $Revision: 1.1 $ --" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $ -+" Maintainer: Martin Krischi k -+" Ned Okie -+" $Author: krischik $ -+" $Date: 2007-09-17 11:11:59 +0200 (Mo, 17 Sep 2007) $ -+" Version: 4.5 -+" $Revision: 774 $ -+" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $ - " History: 24.05.2006 MK Unified Headers - " 16.07.2006 MK Ada-Mode as vim-ball - " 15.10.2006 MK Bram's suggestion for runtime integration -+" 19.09.2007 NO use project file only when there is a project - " Help Page: compiler-gnat - "------------------------------------------------------------------------------ - -@@ -46,6 +48,8 @@ - \ 'GNAT.Set Projectfile\.\.\.', - \ ':SetProject', - \ 'call gnat.Set_Project_File ()') -+ -+ call g:gnat.Set_Session () - endif - - if exists(":CompilerSet") != 2 -@@ -55,8 +59,6 @@ - command -nargs=* CompilerSet setlocal - endif - --call g:gnat.Set_Session () -- - execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ') - execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ') - -diff -urN vim71/runtime/doc/ft_ada.txt vim71_ada/runtime/doc/ft_ada.txt ---- vim71/runtime/doc/ft_ada.txt 1970-01-01 01:00:00.000000000 +0100 -+++ vim71_ada/runtime/doc/ft_ada.txt 2008-01-16 16:37:03.000000000 +0100 -@@ -0,0 +1,516 @@ -+*ft_ada.txt* Ada File type Plug-ins Last change: 2007 Seb 17 -+ -+ -+ ADA FILE TYPE PLUG-INS REFERENCE MANUAL~ -+ -+ADA *ada.vim* -+ -+1. Syntax Highlighting |ft-ada-syntax| -+2. Plug-in |ft-ada-plugin| -+3. Omni Completion |ft-ada-omni| -+ 3.1 Omni Completion with "gnat xref" |gnat-xref| -+ 3.2 Omni Completion with "ctags" |ada-ctags| -+4. Compiler Support |ada-compiler| -+ 4.1 GNAT |compiler-gnat| -+ 4.1 Dec Ada |compiler-decada| -+5. References |ada-reference| -+ 5.1 Options |ft-ada-options| -+ 5.2 Functions |ft-ada-functions| -+ 5.3 Commands |ft-ada-commands| -+ 5.4 Variables |ft-ada-variables| -+ 5.5 Constants |ft-ada-contstants| -+8. Extra Plug-ins |ada-extra-plugins| -+ -+============================================================================== -+1. Syntax Highlighting ~ -+ *ft-ada-syntax* -+ -+This mode is designed for the 2005 edition of Ada ("Ada 2005"), which includes -+support for objected-programming, protected types, and so on. It handles code -+written for the original Ada language ("Ada83", "Ada87", "Ada95") as well, -+though code which uses Ada 2005-only keywords will be wrongly colored (such -+code should be fixed anyway). For more information about Ada, see -+http://www.adapower.com. -+ -+The Ada mode handles a number of situations cleanly. -+ -+For example, it knows that the "-" in "-5" is a number, but the same character -+in "A-5" is an operator. Normally, a "with" or "use" clause referencing -+another compilation unit is coloured the same way as C's "#include" is coloured. -+If you have "Conditional" or "Repeat" groups coloured differently, then "end -+if" and "end loop" will be coloured as part of those respective groups. -+ -+You can set these to different colours using vim's "highlight" command (e.g., -+to change how loops are displayed, enter the command ":hi Repeat" followed by -+the colour specification; on simple terminals the colour specification -+ctermfg=White often shows well). -+ -+There are several options you can select in this Ada mode. See|ft-ada-options| -+for a complete list. -+ -+To enable them, assign a value to the option. For example, to turn one on: -+ > -+ > let g:ada_standard_types = 1 -+> -+To disable them use ":unlet". Example: -+> -+ > unlet g:ada_standard_types -+ -+You can just use ":" and type these into the command line to set these -+temporarily before loading an Ada file. You can make these option settings -+permanent by adding the "let" command(s), without a colon, to your "~/.vimrc" -+file. -+ -+Even on a slow (90Mhz) PC this mode works quickly, but if you find the -+performance unacceptable, turn on |g:ada_withuse_ordinary|. -+ -+Syntax folding instructions (|fold-syntax|) are added when |g:ada_folding| is -+set. -+ -+============================================================================== -+2. File type Plug-in ~ -+ *ft-ada-indent* *ft-ada-plugin* -+ -+The Ada plug-in provides support for: -+ -+ - auto indenting (|indent.txt|) -+ - insert completion (|i_CTRL-N|) -+ - user completion (|i_CTRL-X_CTRL-U|) -+ - tag searches (|tagsrch.txt|) -+ - Quick Fix (|quickfix.txt|) -+ - backspace handling (|'backspace'|) -+ - comment handling (|'comments'|, |'commentstring'|) -+ -+The plug-in only activates the features of the Ada mode whenever an Ada -+files is opened and add adds Ada related entries to the main and pop-up menu. -+ -+============================================================================== -+3. Omni Completion ~ -+ *ft-ada-omni* -+ -+The Ada omni-completions (|i_CTRL-X_CTRL-O|) uses tags database created either -+by "gnat xref -v" or the "exuberant Ctags (http://ctags.sourceforge.net). The -+complete function will automatically detect which tool was used to create the -+tags file. -+ -+------------------------------------------------------------------------------ -+3.1 Omni Completion with "gnat xref" ~ -+ *gnat-xref* -+ -+GNAT XREF uses the compiler internal information (ali-files) to produce the -+tags file. This has the advantage to be 100% correct and the option of deep -+nested analysis. However the code must compile, the generator is quite -+slow and the created tags file contains only the basic Ctags information for -+each entry - not enough for some of the more advanced Vim code browser -+plug-ins. -+ -+NOTE: "gnat xref -v" is very tricky to use as it has almost no diagnostic -+ output - If nothing is printed then usually the parameters are wrong. -+ Here some important tips: -+ -+1) You need to compile your code first and use the "-aO" option to point to -+ your .ali files. -+2) "gnat xref -v ../Include/adacl.ads" won't work - use the "gnat xref -v -+ -aI../Include adacl.ads" instead. -+3) "gnat xref -v -aI../Include *.ad?" won't work - use "cd ../Include" and -+ then "gnat xref -v *.ad?" -+4) Project manager support is completely broken - don't even try "gnat xref -+ -Padacl.gpr". -+5) VIM is faster when the tags file is sorted - use "sort --unique -+ --ignore-case --output=tags tags" . -+6) Remember to insert "!_TAG_FILE_SORTED 2 %sort ui" as first line to mark -+ the file assorted. -+ -+------------------------------------------------------------------------------ -+3.2 Omni Completion with "ctags"~ -+ *ada-ctags* -+ -+Exuberant Ctags uses it's own multi-language code parser. The parser is quite -+fast, produces a lot of extra informations (hence the name "Exuberant Ctags") -+and can run on files which currently do not compile. -+ -+There are also lots of other Vim-tools which use exuberant Ctags. -+ -+You will need to install a version of the Exuberant Ctags which has Ada -+support patched in. Such a version is available from the GNU Ada Project -+(http://gnuada.sourceforge.net). -+ -+The Ada parser for Exuberant Ctags is fairly new - don't expect complete -+support yet. -+ -+============================================================================== -+4. Compiler Support ~ -+ *ada-compiler* -+ -+The Ada mode supports more then one Ada compiler and will automatically load the -+compiler set in|g:ada_default_compiler|whenever an Ada source is opened. The -+provided compiler plug-ins are split into the actual compiler plug-in and a -+collection of support functions and variables. This allows the easy -+development of specialized compiler plug-ins fine tuned to your development -+environment. -+ -+------------------------------------------------------------------------------ -+4.1 GNAT ~ -+ *compiler-gnat* -+ -+GNAT is the only free (beer and speech) Ada compiler available. There are -+several version available which differentiate in the licence terms used. -+ -+The GNAT compiler plug-in will perform a compile on pressing and then -+immediately shows the result. You can set the project file to be used by -+setting: -+ > -+ > call g:gnat.Set_Project_File ('my_project.gpr') -+ -+Setting a project file will also create a Vim session (|views-sessions|) so - -+like with the GPS - opened files, window positions etc. will remembered -+separately for all projects. -+ -+ *gnat_members* -+GNAT OBJECT ~ -+ -+ *g:gnat.Make()* -+g:gnat.Make() -+ Calls|g:gnat.Make_Command|and displays the result inside a -+ |quickfix| window. -+ -+ *g:gnat.Pretty()* -+g:gnat.Pretty() -+ Calls|g:gnat.Pretty_Command| -+ -+ *g:gnat.Find()* -+g:gnat.Find() -+ Calls|g:gnat.Find_Command| -+ -+ *g:gnat.Tags()* -+g:gnat.Tags() -+ Calls|g:gnat.Tags_Command| -+ -+ *g:gnat.Set_Project_File()* -+g:gnat.Set_Project_File([{file}]) -+ Set gnat project file and load associated session. An open -+ project will be closed and the session written. If called -+ without file name the file selector opens for selection of a -+ project file. If called with an empty string then the project -+ and associated session are closed. -+ -+ *g:gnat.Project_File* -+g:gnat.Project_File string -+ Current project file. -+ -+ *g:gnat.Make_Command* -+g:gnat.Make_Command string -+ External command used for|g:gnat.Make()| (|'makeprg'|). -+ -+ *g:gnat.Pretty_Program* -+g:gnat.Pretty_Program string -+ External command used for|g:gnat.Pretty()| -+ -+ *g:gnat.Find_Program* -+g:gnat.Find_Program string -+ External command used for|g:gnat.Find()| -+ -+ *g:gnat.Tags_Command* -+g:gnat.Tags_Command string -+ External command used for|g:gnat.Tags()| -+ -+ *g:gnat.Error_Format* -+g:gnat.Error_Format string -+ Error format (|'errorformat'|) -+ -+------------------------------------------------------------------------------ -+4.2 Dec Ada ~ -+ *compiler-hpada* *compiler-decada* -+ *compiler-vaxada* *compiler-compaqada* -+ -+Dec Ada (also known by - in chronological order - VAX Ada, Dec Ada, Compaq Ada -+and HP Ada) is a fairly dated Ada 83 compiler. Support is basic: will -+compile the current unit. -+ -+The Dec Ada compiler expects the package name and not the file name to be -+passed a parameter. The compiler plug-in supports the usual file name -+convention to convert the file into a unit name. For separates both '-' and -+'__' are allowed. -+ -+ *decada_members* -+DEC ADA OBJECT ~ -+ -+ *g:decada.Make()* -+g:decada.Make() function -+ Calls|g:decada.Make_Command|and displays the result inside a -+ |quickfix| window. -+ -+ *g:decada.Unit_Name()* -+g:decada.Unit_Name() function -+ Get the Unit name for the current file. -+ -+ *g:decada.Make_Command* -+g:decada.Make_Command string -+ External command used for|g:decadat.Make()| (|'makeprg'|). -+ -+ *g:decada.Error_Format* -+g:decada.Error_Format| string -+ Error format (|'errorformat'|). -+ -+============================================================================== -+5. References ~ -+ *ada-reference* -+ -+------------------------------------------------------------------------------ -+5.1 Options ~ -+ *ft-ada-options* -+ -+ *g:ada_standard_types* -+g:ada_standard_types bool (true when exists) -+ Highlight types in package Standard (e.g., "Float") -+ -+ *g:ada_space_errors* -+ *g:ada_no_trail_space_error* -+ *g:ada_no_tab_space_error* -+ *g:ada_all_tab_usage* -+g:ada_space_errors bool (true when exists) -+ Highlight extraneous errors in spaces ... -+ g:ada_no_trail_space_error -+ - but ignore trailing spaces at the end of a line -+ g:ada_no_tab_space_error -+ - but ignore tabs after spaces -+ g:ada_all_tab_usage -+ - highlight all tab use -+ -+ *g:ada_line_errors* -+g:ada_line_errors bool (true when exists) -+ Highlight lines which are to long. Note: This highlighting -+ option is quite CPU intensive. -+ -+ *g:ada_rainbow_color* -+g:ada_rainbow_color bool (true when exists) -+ Use rainbow colours for '(' and ')'. You need the -+ rainbow_parenthesis for this to work -+ -+ *g:ada_folding* -+g:ada_folding set ('sigpft') -+ Use folding for Ada sources. -+ 's': activate syntax folding on load -+ 'p': fold packages -+ 'f': fold functions and procedures -+ 't': fold types -+ 'c': fold conditionals -+ 'g': activate gnat pretty print folding on load -+ 'i': lone 'is' folded with line above -+ 'b': lone 'begin' folded with line above -+ 'p': lone 'private' folded with line above -+ 'x': lone 'exception' folded with line above -+ 'i': activate indent folding on load -+ -+ Note: Syntax folding is in an early (unuseable) stage and -+ indent or gnat pretty folding is suggested. -+ -+ For gnat pretty folding to work the following settings are -+ suggested: -cl3 -M79 -c2 -c3 -c4 -A1 -A2 -A3 -A4 -A5 -+ -+ For indent folding to work the following settings are -+ suggested: shiftwidth=3 softtabstop=3 -+ -+ *g:ada_abbrev* -+g:ada_abbrev bool (true when exists) -+ Add some abbreviations. This feature more or less superseded -+ by the various completion methods. -+ -+ *g:ada_withuse_ordinary* -+g:ada_withuse_ordinary bool (true when exists) -+ Show "with" and "use" as ordinary keywords (when used to -+ reference other compilation units they're normally highlighted -+ specially). -+ -+ *g:ada_begin_preproc* -+g:ada_begin_preproc bool (true when exists) -+ Show all begin-like keywords using the colouring of C -+ preprocessor commands. -+ -+ *g:ada_omni_with_keywords* -+g:ada_omni_with_keywords -+ Add Keywords, Pragmas, Attributes to omni-completions -+ (|compl-omni|). Note: You can always complete then with user -+ completion (|i_CTRL-X_CTRL-U|). -+ -+ *g:ada_extended_tagging* -+g:ada_extended_tagging enum ('jump', 'list') -+ use extended tagging, two options are available -+ 'jump': use tjump to jump. -+ 'list': add tags quick fix list. -+ Normal tagging does not support function or operator -+ overloading as these features are not available in C and -+ tagging was originally developed for C. -+ -+ *g:ada_extended_completion* -+g:ada_extended_completion -+ Uses extended completion for and completions -+ (|i_CTRL-N|). In this mode the '.' is used as part of the -+ identifier so that 'Object.Method' or 'Package.Procedure' are -+ completed together. -+ -+ *g:ada_gnat_extensions* -+g:ada_gnat_extensions bool (true when exists) -+ Support GNAT extensions. -+ -+ *g:ada_with_gnat_project_files* -+g:ada_with_gnat_project_files bool (true when exists) -+ Add gnat project file keywords and Attributes. -+ -+ *g:ada_default_compiler* -+g:ada_default_compiler string -+ set default compiler. Currently supported is 'gnat' and -+ 'decada'. -+ -+An "exists" type is a boolean is considered true when the variable is defined -+and false when the variable is undefined. The value which the variable is -+set makes no difference. -+ -+------------------------------------------------------------------------------ -+5.3 Commands ~ -+ *ft-ada-commands* -+ -+:AdaRainbow *:AdaRainbow* -+ Toggles rainbow colour (|g:ada_rainbow_color|) mode for -+ '(' and ')' -+ -+:AdaLines *:AdaLines* -+ Toggles line error (|g:ada_line_errors|) display -+ -+:AdaSpaces *:AdaSpaces* -+ Toggles space error (|g:ada_space_errors|) display. -+ -+:AdaTagDir *:AdaTagDir* -+ Creates tags file for the directory of the current file. -+ -+:AdaTagFile *:AdaTagFile* -+ Creates tags file for the current file. -+ -+:AdaTypes *:AdaTypes* -+ Toggles standard types (|g:ada_standard_types|) colour. -+ -+:GnatFind *:GnatFind* -+ Calls |g:gnat.Find()| -+ -+:GnatPretty *:GnatPretty* -+ Calls |g:gnat.Pretty()| -+ -+:GnatTags *:GnatTags* -+ Calls |g:gnat.Tags()| -+ -+------------------------------------------------------------------------------ -+5.3 Variables ~ -+ *ft-ada-variables* -+ -+ *g:gnat* -+g:gnat object -+ Control object which manages GNAT compiles. The object -+ is created when the first Ada source code is loaded provided -+ that |g:ada_default_compiler|is set to 'gnat'. See|gnat_members| -+ for details. -+ -+ *g:decada* -+g:decada object -+ Control object which manages Dec Ada compiles. The object -+ is created when the first Ada source code is loaded provided -+ that |g:ada_default_compiler|is set to 'decada'. See -+ |decada_members|for details. -+ -+------------------------------------------------------------------------------ -+5.4 Constants ~ -+ *ft-ada-constants* -+ ft-ada-constants -+ -+All constants are locked. See |:lockvar| for details. -+ -+ *g:ada#WordRegex* -+g:ada#WordRegex string -+ Regular expression to search for Ada words -+ -+ *g:ada#DotWordRegex* -+g:ada#DotWordRegex string -+ Regular expression to search for Ada words separated by dots. -+ -+ *g:ada#Comment* -+g:ada#Comment string -+ Regular expression to search for Ada comments -+ -+ *g:ada#Keywords* -+g:ada#Keywords list of dictionaries -+ List of keywords, attributes etc. pp. in the format used by -+ omni completion. See |complete-items| for details. -+ -+ *g:ada#Ctags_Kinds* -+g:ada#Ctags_Kinds dictionary of lists -+ Dictionary of the various kinds of items which the Ada support -+ for Ctags generates. -+ -+------------------------------------------------------------------------------ -+5.2 Functions ~ -+ *ft-ada-functions* -+ -+ada#Word([{line}, {col}]) *ada#Word()* -+ Return full name of Ada entity under the cursor (or at given -+ line/column), stripping white space/newlines as necessary. -+ -+ada#List_Tag([{line}, {col}]) *ada#Listtags()* -+ List all occurrences of the Ada entity under the cursor (or at -+ given line/column) inside the quick-fix window -+ -+ada#Jump_Tag ({ident}, {mode}) *ada#Jump_Tag()* -+ List all occurrences of the Ada entity under the cursor (or at -+ given line/column) in the tag jump list. Mode can either be -+ 'tjump' or 'stjump'. -+ -+ada#Create_Tags ({option}) *ada#Create_Tags()* -+ Creates tag file using Ctags. The option can either be 'file' -+ for the current file, 'dir' for the directory of the current -+ file or a file name. -+ -+gnat#Insert_Tags_Header() *gnat#Insert_Tags_Header()* -+ Adds the tag file header (!_TAG_) information to the current -+ file which are missing from the GNAT XREF output. -+ -+ada#Switch_Syntax_Option ({option}) *ada#Switch_Syntax_Option()* -+ Toggles highlighting options on or off. Used for the Ada menu. -+ -+ *gnat#New()* -+gnat#New () -+ Create a new gnat object. See |g:gnat| for details. -+ -+ -+============================================================================== -+8. Extra Plugins ~ -+ *ada-extra-plugins* -+ -+You can optionally install the following extra plug-in. They work well with Ada -+and enhance the ability of the Ada mode.: -+ -+backup.vim -+ http://www.vim.org/scripts/script.php?script_id=1537 -+ Keeps as many backups as you like so you don't have to. -+ -+rainbow_parenthsis.vim -+ http://www.vim.org/scripts/script.php?script_id=1561 -+ Very helpful since Ada uses only '(' and ')'. -+ -+nerd_comments.vim -+ http://www.vim.org/scripts/script.php?script_id=1218 -+ Excellent commenting and uncommenting support for almost any -+ programming language. -+ -+matchit.vim -+ http://www.vim.org/scripts/script.php?script_id=39 -+ '%' jumping for any language. The normal '%' jump only works for '{}' -+ style languages. The Ada mode will set the needed search patters. -+ -+taglist.vim -+ http://www.vim.org/scripts/script.php?script_id=273 -+ Source code explorer sidebar. There is a patch for Ada available. -+ -+The GNU Ada Project distribution (http://gnuada.sourceforge.net) of Vim -+contains all of the above. -+ -+============================================================================== -+vim: textwidth=78 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab -+vim: filetype=help -diff -urN vim71/runtime/ftplugin/ada.vim vim71_ada/runtime/ftplugin/ada.vim ---- vim71/runtime/ftplugin/ada.vim 2007-05-05 19:17:45.000000000 +0200 -+++ vim71_ada/runtime/ftplugin/ada.vim 2008-01-16 16:37:03.000000000 +0100 -@@ -1,14 +1,15 @@ - "------------------------------------------------------------------------------ - " Description: Perform Ada specific completion & tagging. - " Language: Ada (2005) --" $Id: ada.vim,v 1.3 2007/05/05 17:17:45 vimboss Exp $ --" Maintainer: Martin Krischik -+" $Id: ada.vim 774 2007-09-17 09:11:59Z krischik $ -+" Maintainer: Martin Krischik -+" Taylor Venable - " Neil Bird --" $Author: vimboss $ --" $Date: 2007/05/05 17:17:45 $ --" Version: 4.2 --" $Revision: 1.3 $ --" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/ftplugin/ada.vim $ -+" $Author: krischik $ -+" $Date: 2007-09-17 11:11:59 +0200 (Mo, 17 Sep 2007) $ -+" Version: 4.5 -+" $Revision: 774 $ -+" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/ftplugin/ada.vim $ - " History: 24.05.2006 MK Unified Headers - " 26.05.2006 MK ' should not be in iskeyword. - " 16.07.2006 MK Ada-Mode as vim-ball -@@ -17,6 +18,7 @@ - " 05.11.2006 MK Bram suggested not to use include protection for - " autoload - " 05.11.2006 MK Bram suggested to save on spaces -+" 08.07.2007 TV fix default compiler problems. - " Help Page: ft-ada-plugin - "------------------------------------------------------------------------------ - " Provides mapping overrides for tag jumping that figure out the current -@@ -30,7 +32,7 @@ - endif - - " Don't load another plugin for this buffer --let b:did_ftplugin = 38 -+let b:did_ftplugin = 45 - - " - " Temporarily set cpoptions to ensure the script loads OK -@@ -104,8 +106,17 @@ - \ s:notend . '\:\\s\+\' - endif - -+ - " Section: Compiler {{{1 - " -+if ! exists("g:ada_default_compiler") -+ if has("vms") -+ let g:ada_default_compiler = 'decada' -+ else -+ let g:ada_default_compiler = 'gnat' -+ endif -+endif -+ - if ! exists("current_compiler") || - \ current_compiler != g:ada_default_compiler - execute "compiler " . g:ada_default_compiler -diff -urN vim71/runtime/indent/ada.vim vim71_ada/runtime/indent/ada.vim ---- vim71/runtime/indent/ada.vim 2007-05-05 19:25:37.000000000 +0200 -+++ vim71_ada/runtime/indent/ada.vim 2008-01-16 16:37:02.000000000 +0100 -@@ -1,19 +1,21 @@ - "------------------------------------------------------------------------------ - " Description: Vim Ada indent file - " Language: Ada (2005) --" $Id: ada.vim,v 1.4 2007/05/05 17:25:37 vimboss Exp $ -+" $Id: ada.vim 774 2007-09-17 09:11:59Z krischik $ - " Copyright: Copyright (C) 2006 Martin Krischik --" Maintainer: Martin Krischik -+" Maintainer: Martin Krischik - " Neil Bird --" $Author: vimboss $ --" $Date: 2007/05/05 17:25:37 $ --" Version: 4.2 --" $Revision: 1.4 $ --" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/indent/ada.vim $ -+" Ned Okie -+" $Author: krischik $ -+" $Date: 2007-09-17 11:11:59 +0200 (Mo, 17 Sep 2007) $ -+" Version: 4.5 -+" $Revision: 774 $ -+" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/indent/ada.vim $ - " History: 24.05.2006 MK Unified Headers - " 16.07.2006 MK Ada-Mode as vim-ball - " 15.10.2006 MK Bram's suggestion for runtime integration - " 05.11.2006 MK Bram suggested to save on spaces -+" 19.09.2007 NO g: missing before ada#Comment - " Help Page: ft-vim-indent - "------------------------------------------------------------------------------ - " ToDo: -@@ -27,7 +29,7 @@ - finish - endif - --let b:did_indent = 1 -+let b:did_indent = 45 - - setlocal indentexpr=GetAdaIndent() - setlocal indentkeys-=0{,0} -@@ -58,7 +60,7 @@ - " Seems to work OK as it 'starts' with the indent of the /previous/ line. - function s:MainBlockIndent (prev_indent, prev_lnum, blockstart, stop_at) - let lnum = a:prev_lnum -- let line = substitute( getline(lnum), ada#Comment, '', '' ) -+ let line = substitute( getline(lnum), g:ada#Comment, '', '' ) - while lnum > 1 - if a:stop_at != '' && line =~ '^\s*' . a:stop_at && indent(lnum) < a:prev_indent - return a:prev_indent -@@ -72,7 +74,7 @@ - let lnum = prevnonblank(lnum - 1) - " Get previous non-blank/non-comment-only line - while 1 -- let line = substitute( getline(lnum), ada#Comment, '', '' ) -+ let line = substitute( getline(lnum), g:ada#Comment, '', '' ) - if line !~ '^\s*$' && line !~ '^\s*#' - break - endif -@@ -116,7 +118,7 @@ - " Get previous non-blank/non-comment-only line - while 1 - let line = getline(lnum) -- let line = substitute( line, ada#Comment, '', '' ) -+ let line = substitute( line, g:ada#Comment, '', '' ) - if line !~ '^\s*$' - break - endif -@@ -143,7 +145,8 @@ - let lnum = prevnonblank(lnum - 1) - " Get previous non-blank/non-comment-only line - while 1 -- let line = substitute( getline(lnum), ada#Comment, '', '' ) -+ let line = substitute( getline(lnum), g:ada#Comment, '', '' ) -+ - if line !~ '^\s*$' && line !~ '^\s*#' - break - endif -@@ -222,7 +225,7 @@ - exe lnum - exe 'normal! $F)%' - if getline('.') =~ '^\s*(' -- " Dire layout - use previous indent (could check for ada#Comment here) -+ " Dire layout - use previous indent (could check for g:ada#Comment here) - let ind = indent( prevnonblank( line('.')-1 ) ) - else - let ind = indent('.') -diff -urN vim71/runtime/macros/svnignore.bash vim71_ada/runtime/macros/svnignore.bash ---- vim71/runtime/macros/svnignore.bash 1970-01-01 01:00:00.000000000 +0100 -+++ vim71_ada/runtime/macros/svnignore.bash 2008-01-16 16:37:02.000000000 +0100 -@@ -0,0 +1,9 @@ -+#!/bin/bash -+ -+svn propedit \ -+ --editor-cmd="gvim -f" \ -+ svn:ignore \ -+ "${@}" ; -+ -+# vim: textwidth=0 nowrap tabstop=8 shiftwidth=4 softtabstop=4 expandtab -+# vim: filetype=sh encoding=utf-8 fileformat=unix foldmethod=marker nospell -diff -urN vim71/runtime/macros/svnignore.btm vim71_ada/runtime/macros/svnignore.btm ---- vim71/runtime/macros/svnignore.btm 1970-01-01 01:00:00.000000000 +0100 -+++ vim71_ada/runtime/macros/svnignore.btm 2008-01-16 16:37:02.000000000 +0100 -@@ -0,0 +1,27 @@ -+::!C:\Bin\4Portable\App\4\4nt.EXE -+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -+:: Description: Works like "tail -f" . -+:: $Id: svnignore.btm 806 2007-11-21 09:35:26Z krischik $ -+:: Maintainer: Martin Krischik -+:: Jason Heddings (vim at heddway dot com) -+:: $Author: krischik $ -+:: $Date: 2007-11-21 10:35:26 +0100 (Mi, 21 Nov 2007) $ -+:: Version: 3.0 -+:: $Revision: 806 $ -+:: $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/macros/svnignore.btm $ -+:: History: 17.11.2007 Edit svn:ignore data -+:: Help Page: tail.txt -+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -+ -+svn propedit ^ -+ --editor-cmd="gvim -f" ^ -+ svn:ignore ^ -+ "%[$]" -+ -+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -+:: Copyright (C) 2006 Martin Krischik -+:: -+:: Vim is Charityware - see ":help license" or uganda.txt for licence details. -+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -+:: vim: textwidth=0 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab -+:: vim: filetype=btm encoding=utf-8 fileformat=unix foldmethod=marker nospell -diff -urN vim71/runtime/macros/svnignore.zsh vim71_ada/runtime/macros/svnignore.zsh ---- vim71/runtime/macros/svnignore.zsh 1970-01-01 01:00:00.000000000 +0100 -+++ vim71_ada/runtime/macros/svnignore.zsh 2008-01-16 16:37:02.000000000 +0100 -@@ -0,0 +1,29 @@ -+#!/bin/zsh -+#------------------------------------------------------------------------------ -+# Description: Works like "tail -f" . -+# $Id: svnignore.zsh 818 2007-12-03 21:21:48Z krischik $ -+# Maintainer: Martin Krischik -+# Jason Heddings (vim at heddway dot com) -+# $Author: krischik $ -+# $Date: 2007-12-03 22:21:48 +0100 (Mo, 03 Dez 2007) $ -+# Version: 3.0 -+# $Revision: 818 $ -+# $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/macros/svnignore.zsh $ -+# History: 17.11.2007 Edit svn:ignore data -+# Help Page: tail.txt -+#------------------------------------------------------------------------------ -+ -+setopt No_X_Trace; -+ -+svn propedit \ -+ --editor-cmd="gvim -f" \ -+ svn:ignore \ -+ "${=@}" ; -+ -+#------------------------------------------------------------------------------ -+# Copyright (C) 2006 Martin Krischik -+# -+# Vim is Charityware - see ":help license" or uganda.txt for licence details. -+#------------------------------------------------------------------------------ -+# vim: textwidth=0 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab -+# vim: filetype=zsh encoding=utf-8 fileformat=unix foldmethod=marker nospell -diff -urN vim71/runtime/macros/vim.bash vim71_ada/runtime/macros/vim.bash ---- vim71/runtime/macros/vim.bash 1970-01-01 01:00:00.000000000 +0100 -+++ vim71_ada/runtime/macros/vim.bash 2008-01-16 16:37:02.000000000 +0100 -@@ -0,0 +1,191 @@ -+#!/bin/echo usage: source -+########################################################### {{{1 ########### -+# Description: Set alias names for a custom installed vim/ctags. -+# Language: Bash Shell Script -+# $Id: vim.bash 820 2007-12-08 11:05:30Z krischik $ -+# Maintainer: Martin Krischik -+# $Author: krischik $ -+# $Date: 2007-12-08 12:05:30 +0100 (Sa, 08 Dez 2007) $ -+# Version: 3.6 -+# $Revision: 820 $ -+# $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/macros/vim.bash $ -+# History: 26.07.2006 MK pretty new -+# Usage: copy to /etc/profile.d and make world executable -+########################################################### }}}1 ########### -+ -+ -+if ! type lxpm 2>/dev/null 1>/dev/null; then -+ -+ # Variablen -+ UName=$(uname) -+ -+ case "${UName}" in # {{{1 -+ (Linux*) # {{{2 -+ if test -x "/opt/gnat/tools/bin/vim"; then -+ declare -x VIM="/opt/gnat/tools"; -+ declare -x VIMRUNTIME="${VIM}/share/vim/vim71"; -+ else -+ unset VIM 1>/dev/null 2>/dev/null; -+ unset VIMRUNTIME 1>/dev/null 2>/dev/null; -+ fi; -+ ;; # }}}2 -+ (CYGWIN*) # {{{2 -+ if test -x "/opt/gnat/tools/bin/vim"; then -+ declare -x VIM="/opt/gnat/tools"; -+ declare -x VIMRUNTIME="${VIM}/share/vim/vim71" -+ else -+ unset VIM 1>/dev/null 2>/dev/null; -+ unset VIMRUNTIME 1>/dev/null 2>/dev/null; -+ fi; -+ ;; # }}}2 -+ (SunOS) # {{{2 -+ if test -x "/opt/gnat/tools/bin/vim"; then -+ declare -x VIM="/opt/gnat/tools"; -+ declare -x VIMRUNTIME="${VIM}/share/vim/vim71"; -+ elif test -x "${HOME}/opt/gnat/tools/bin/vim"; then -+ declare -x VIM="${HOME}/opt/gnat/tools"; -+ declare -x VIMRUNTIME="${VIM}/share/vim/vim71" -+ PATH="${VIM}/bin:${PATH}" -+ else -+ unset VIM 1>/dev/null 2>/dev/null; -+ unset VIMRUNTIME 1>/dev/null 2>/dev/null; -+ fi -+ ;; # }}}2 -+ (*) # {{{2 -+ ;; # }}}2 -+ esac; # }}}1 -+ -+ # Simple Functions -+ -+ for i in ctags etags eview evim ex gview gvim gvimdiff rgview rgvim rview rvim view vim vimdiff vimtutor xxd; do # {{{1 -+ -+ case "${UName}" in # {{{2 -+ (MINGW*) # {{{3 -+ if test -n "${VIM}"; then -+ declare -x -f ${i}; -+ -+ eval "function ${i} () -+ { -+ ${VIM}/vim71/gvim.exe \"\${@}\" -+ return; -+ }" -+ else -+ unset -f ${i} 1>/dev/null 2>/dev/null; -+ fi; -+ ;; # }}}3 -+ (Linux|CYGWIN*) # {{{3 -+ if test -n "${VIM}"; then -+ declare -x -f ${i}; -+ -+ eval "function ${i} () -+ { -+ LD_LIBRARY_PATH=\"\${LD_LIBRARY_PATH}:${VIM}/lib\" \ -+ \"${VIM}/bin/${i}\" \"\${@}\" ; -+ return; -+ }" -+ else -+ unset -f ${i} 1>/dev/null 2>/dev/null; -+ fi; -+ ;; # }}}3 -+ (*) # {{{3 -+ ;; # }}}3 -+ esac; # }}}2 -+ done; # }}}1 -+ -+ # Server Functions -+ -+ for i in lxpm med epm; do # {{{1 -+ declare -x -f ${i} -+ -+ case "${UName}" in # {{{2 -+ (MINGW*) # {{{3 -+ if test -n "${VIM}"; then -+ eval "function ${i} () -+ { -+ if test -z "\${1}"; then -+ ${VIM}/vim71/gvim.exe --servername ${i} 1>/dev/null 2>/dev/null & -+ else -+ ${VIM}/vim71/gvim.exe --servername ${i} --remote-silent \"\${@}\" 1>/dev/null 2>/dev/null & -+ fi; -+ return; -+ }" -+ else -+ eval "function ${i} () -+ { -+ if test -z "\${1}"; then -+ gvim.exe --servername ${i} 1>/dev/null 2>/dev/null & -+ else -+ gvim.exe --servername ${i} --remote-silent \"\${@}\" 1>/dev/null 2>/dev/null & -+ fi; -+ return; -+ }" -+ fi; -+ ;; # }}}3 -+ (Linux|CYGWIN*|SunOS) # {{{3 -+ if test -n "${VIM}"; then -+ eval "function ${i} () -+ { -+ if test -z \"\${1}\"; then -+ LD_LIBRARY_PATH=\"\${LD_LIBRARY_PATH}:${VIM}/lib\" \ -+ \"${VIM}/bin/gvim\" --servername \"${i} ${HOSTNAME}\" \"\${@}\" \ -+ >/dev/null 2>/dev/null & -+ else -+ LD_LIBRARY_PATH=\"\${LD_LIBRARY_PATH}:${VIM}/lib\" \ -+ \"${VIM}/bin/gvim\" --servername \"${i} ${HOSTNAME}\" --remote-silent \"\${@}\" \ -+ >/dev/null 2>/dev/null & -+ fi -+ return; -+ }" -+ else -+ eval "function ${i} () -+ { -+ if test -z \"\${1}\"; then -+ gvim --servername \"${i} ${HOSTNAME}\" >/dev/null 2>/dev/null & -+ else -+ gvim --servername \"${i} ${HOSTNAME}\" --remote-silent \"\${@}\" >/dev/null 2>/dev/null & -+ fi -+ return; -+ }" -+ fi; -+ ;; # }}}3 -+ (*) # {{{3 -+ ;; # }}}3 -+ esac; # }}}2 -+ done; # }}}1 -+ -+ # Some applications read the EDITOR variable to determine your favourite text -+ # editor. So uncomment the line below and enter the editor of your choice :-) -+ if test -n "${VIM}"; then -+ declare -x EDITOR="${VIM}/bin/gvim -f"; -+ declare -x VISUAL="${VIM}/bin/gvim -f"; -+ else -+ declare -x EDITOR="$(which gvim) -f"; -+ declare -x VISUAL="$(which gvim) -f"; -+ fi; -+ # Unset local Variablen -+ -+ unset UName -+ -+ printf "\e[42m%-30.30s : \e[43m %-40.40s \e[m\n" "$(basename ${BASH_SOURCE:-${0}})" "VIM 7.0 symbols set." -+ -+fi; -+ -+########################################################### {{{1 ########### -+# Copyright (C) 2006 Martin Krischik -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License -+# as published by the Free Software Foundation; either version 2 -+# of the License, or (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+########################################################### }}}1 ########### -+# vim: textwidth=0 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab -+# vim: filetype=sh encoding=utf-8 fileformat=unix foldmethod=marker -diff -urN vim71/runtime/macros/vim.zsh vim71_ada/runtime/macros/vim.zsh ---- vim71/runtime/macros/vim.zsh 1970-01-01 01:00:00.000000000 +0100 -+++ vim71_ada/runtime/macros/vim.zsh 2008-01-16 16:37:02.000000000 +0100 -@@ -0,0 +1,17 @@ -+#!/bin/echo usage: source -+ -+setopt No_Verbose -+setopt No_X_Trace -+setopt Typeset_Silent; -+ -+# -+# Bash script is zsh compatible -+# -+HOSTNAME="${HOSTNAME:-${HOST}}" -+BASH_SOURCE="$(basename ${0} .zsh).bash" -+source "$(dirname ${0})/${BASH_SOURCE}" -+unset BASH_SOURCE; -+ -+############################################################# {{{1 ########### -+# vim: textwidth=0 nowrap tabstop=8 shiftwidth=4 softtabstop=4 expandtab -+# vim: filetype=zsh encoding=utf-8 fileformat=unix foldmethod=marker nospell -diff -urN vim71/runtime/plugin/matchit.vim vim71_ada/runtime/plugin/matchit.vim ---- vim71/runtime/plugin/matchit.vim 1970-01-01 01:00:00.000000000 +0100 -+++ vim71_ada/runtime/plugin/matchit.vim 2008-01-16 16:37:03.000000000 +0100 -@@ -0,0 +1,814 @@ -+" matchit.vim: (global plugin) Extended "%" matching -+" Last Change: Tue Oct 24 11:00 AM 2006 EDT -+" Maintainer: Benji Fisher PhD -+" Version: 1.12, for Vim 6.3+ -+" URL: http://www.vim.org/script.php?script_id=39 -+ -+" Documentation: -+" The documentation is in a separate file, matchit.txt . -+ -+" Credits: -+" Vim editor by Bram Moolenaar (Thanks, Bram!) -+" Original script and design by Raul Segura Acevedo -+" Support for comments by Douglas Potts -+" Support for back references and other improvements by Benji Fisher -+" Support for many languages by Johannes Zellner -+" Suggestions for improvement, bug reports, and support for additional -+" languages by Jordi-Albert Batalla, Neil Bird, Servatius Brandt, Mark -+" Collett, Stephen Wall, Dany St-Amant, Yuheng Xie, and Johannes Zellner. -+ -+" Debugging: -+" If you'd like to try the built-in debugging commands... -+" :MatchDebug to activate debugging for the current buffer -+" This saves the values of several key script variables as buffer-local -+" variables. See the MatchDebug() function, below, for details. -+ -+" TODO: I should think about multi-line patterns for b:match_words. -+" This would require an option: how many lines to scan (default 1). -+" This would be useful for Python, maybe also for *ML. -+" TODO: Maybe I should add a menu so that people will actually use some of -+" the features that I have implemented. -+" TODO: Eliminate the MultiMatch function. Add yet another argument to -+" Match_wrapper() instead. -+" TODO: Allow :let b:match_words = '\(\(foo\)\(bar\)\):\3\2:end\1' -+" TODO: Make backrefs safer by using '\V' (very no-magic). -+" TODO: Add a level of indirection, so that custom % scripts can use my -+" work but extend it. -+ -+" allow user to prevent loading -+" and prevent duplicate loading -+if exists("loaded_matchit") || &cp -+ finish -+endif -+let loaded_matchit = 1 -+let s:last_mps = "" -+let s:last_words = "" -+ -+let s:save_cpo = &cpo -+set cpo&vim -+ -+nnoremap % :call Match_wrapper('',1,'n') -+nnoremap g% :call Match_wrapper('',0,'n') -+vnoremap % :call Match_wrapper('',1,'v') m'gv`` -+vnoremap g% :call Match_wrapper('',0,'v') m'gv`` -+onoremap % v:call Match_wrapper('',1,'o') -+onoremap g% v:call Match_wrapper('',0,'o') -+ -+" Analogues of [{ and ]} using matching patterns: -+nnoremap [% :call MultiMatch("bW", "n") -+nnoremap ]% :call MultiMatch("W", "n") -+vmap [% [%m'gv`` -+vmap ]% ]%m'gv`` -+" vnoremap [% :call MultiMatch("bW", "v") m'gv`` -+" vnoremap ]% :call MultiMatch("W", "v") m'gv`` -+onoremap [% v:call MultiMatch("bW", "o") -+onoremap ]% v:call MultiMatch("W", "o") -+ -+" text object: -+vmap a% [%v]% -+ -+" Auto-complete mappings: (not yet "ready for prime time") -+" TODO Read :help write-plugin for the "right" way to let the user -+" specify a key binding. -+" let g:match_auto = '' -+" let g:match_autoCR = '' -+" if exists("g:match_auto") -+" execute "inoremap " . g:match_auto . ' x"=Autocomplete()Pls' -+" endif -+" if exists("g:match_autoCR") -+" execute "inoremap " . g:match_autoCR . ' =Autocomplete()' -+" endif -+" if exists("g:match_gthhoh") -+" execute "inoremap " . g:match_gthhoh . ' :call Gthhoh()' -+" endif " gthhoh = "Get the heck out of here!" -+ -+let s:notslash = '\\\@" -+ endif -+ " In s:CleanUp(), we may need to check whether the cursor moved forward. -+ let startline = line(".") -+ let startcol = col(".") -+ " Use default behavior if called with a count or if no patterns are defined. -+ if v:count -+ exe "normal! " . v:count . "%" -+ return s:CleanUp(restore_options, a:mode, startline, startcol) -+ elseif !exists("b:match_words") || b:match_words == "" -+ silent! normal! % -+ return s:CleanUp(restore_options, a:mode, startline, startcol) -+ end -+ -+ " First step: if not already done, set the script variables -+ " s:do_BR flag for whether there are backrefs -+ " s:pat parsed version of b:match_words -+ " s:all regexp based on s:pat and the default groups -+ " -+ " Allow b:match_words = "GetVimMatchWords()" . -+ if b:match_words =~ ":" -+ let match_words = b:match_words -+ else -+ execute "let match_words =" b:match_words -+ endif -+" Thanks to Preben "Peppe" Guldberg and Bram Moolenaar for this suggestion! -+ if (match_words != s:last_words) || (&mps != s:last_mps) || -+ \ exists("b:match_debug") -+ let s:last_words = match_words -+ let s:last_mps = &mps -+ if match_words !~ s:notslash . '\\\d' -+ let s:do_BR = 0 -+ let s:pat = match_words -+ else -+ let s:do_BR = 1 -+ let s:pat = s:ParseWords(match_words) -+ endif -+ " The next several lines were here before -+ " BF started messing with this script. -+ " quote the special chars in 'matchpairs', replace [,:] with \| and then -+ " append the builtin pairs (/*, */, #if, #ifdef, #else, #elif, #endif) -+ " let default = substitute(escape(&mps, '[$^.*~\\/?]'), '[,:]\+', -+ " \ '\\|', 'g').'\|\/\*\|\*\/\|#if\>\|#ifdef\>\|#else\>\|#elif\>\|#endif\>' -+ let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") . -+ \ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>' -+ " s:all = pattern with all the keywords -+ let s:all = s:pat . (strlen(s:pat) ? "," : "") . default -+ let s:all = substitute(s:all, s:notslash . '\zs[,:]\+', '\\|', 'g') -+ let s:all = '\%(' . s:all . '\)' -+ " let s:all = '\%(' . substitute(s:all, '\\\ze[,:]', '', 'g') . '\)' -+ if exists("b:match_debug") -+ let b:match_pat = s:pat -+ endif -+ endif -+ -+ " Second step: set the following local variables: -+ " matchline = line on which the cursor started -+ " curcol = number of characters before match -+ " prefix = regexp for start of line to start of match -+ " suffix = regexp for end of match to end of line -+ " Require match to end on or after the cursor and prefer it to -+ " start on or before the cursor. -+ let matchline = getline(startline) -+ if a:word != '' -+ " word given -+ if a:word !~ s:all -+ echohl WarningMsg|echo 'Missing rule for word:"'.a:word.'"'|echohl NONE -+ return s:CleanUp(restore_options, a:mode, startline, startcol) -+ endif -+ let matchline = a:word -+ let curcol = 0 -+ let prefix = '^\%(' -+ let suffix = '\)$' -+ " Now the case when "word" is not given -+ else " Find the match that ends on or after the cursor and set curcol. -+ let regexp = s:Wholematch(matchline, s:all, startcol-1) -+ let curcol = match(matchline, regexp) -+ let endcol = matchend(matchline, regexp) -+ let suf = strlen(matchline) - endcol -+ let prefix = (curcol ? '^.*\%' . (curcol + 1) . 'c\%(' : '^\%(') -+ let suffix = (suf ? '\)\%' . (endcol + 1) . 'c.*$' : '\)$') -+ " If the match comes from the defaults, bail out. -+ if matchline !~ prefix . -+ \ substitute(s:pat, s:notslash.'\zs[,:]\+', '\\|', 'g') . suffix -+ silent! norm! % -+ return s:CleanUp(restore_options, a:mode, startline, startcol) -+ endif -+ endif -+ if exists("b:match_debug") -+ let b:match_match = matchstr(matchline, regexp) -+ let b:match_col = curcol+1 -+ endif -+ -+ " Third step: Find the group and single word that match, and the original -+ " (backref) versions of these. Then, resolve the backrefs. -+ " Set the following local variable: -+ " group = colon-separated list of patterns, one of which matches -+ " = ini:mid:fin or ini:fin -+ " -+ " Reconstruct the version with unresolved backrefs. -+ let patBR = substitute(match_words.',', -+ \ s:notslash.'\zs[,:]*,[,:]*', ',', 'g') -+ let patBR = substitute(patBR, s:notslash.'\zs:\{2,}', ':', 'g') -+ " Now, set group and groupBR to the matching group: 'if:endif' or -+ " 'while:endwhile' or whatever. A bit of a kluge: s:Choose() returns -+ " group . "," . groupBR, and we pick it apart. -+ let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR) -+ let i = matchend(group, s:notslash . ",") -+ let groupBR = strpart(group, i) -+ let group = strpart(group, 0, i-1) -+ " Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix -+ if s:do_BR " Do the hard part: resolve those backrefs! -+ let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline) -+ endif -+ if exists("b:match_debug") -+ let b:match_wholeBR = groupBR -+ let i = matchend(groupBR, s:notslash . ":") -+ let b:match_iniBR = strpart(groupBR, 0, i-1) -+ endif -+ -+ " Fourth step: Set the arguments for searchpair(). -+ let i = matchend(group, s:notslash . ":") -+ let j = matchend(group, '.*' . s:notslash . ":") -+ let ini = strpart(group, 0, i-1) -+ let mid = substitute(strpart(group, i,j-i-1), s:notslash.'\zs:', '\\|', 'g') -+ let fin = strpart(group, j) -+ "Un-escape the remaining , and : characters. -+ let ini = substitute(ini, s:notslash . '\zs\\\(:\|,\)', '\1', 'g') -+ let mid = substitute(mid, s:notslash . '\zs\\\(:\|,\)', '\1', 'g') -+ let fin = substitute(fin, s:notslash . '\zs\\\(:\|,\)', '\1', 'g') -+ " searchpair() requires that these patterns avoid \(\) groups. -+ let ini = substitute(ini, s:notslash . '\zs\\(', '\\%(', 'g') -+ let mid = substitute(mid, s:notslash . '\zs\\(', '\\%(', 'g') -+ let fin = substitute(fin, s:notslash . '\zs\\(', '\\%(', 'g') -+ " Set mid. This is optimized for readability, not micro-efficiency! -+ if a:forward && matchline =~ prefix . fin . suffix -+ \ || !a:forward && matchline =~ prefix . ini . suffix -+ let mid = "" -+ endif -+ " Set flag. This is optimized for readability, not micro-efficiency! -+ if a:forward && matchline =~ prefix . fin . suffix -+ \ || !a:forward && matchline !~ prefix . ini . suffix -+ let flag = "bW" -+ else -+ let flag = "W" -+ endif -+ " Set skip. -+ if exists("b:match_skip") -+ let skip = b:match_skip -+ elseif exists("b:match_comment") " backwards compatibility and testing! -+ let skip = "r:" . b:match_comment -+ else -+ let skip = 's:comment\|string' -+ endif -+ let skip = s:ParseSkip(skip) -+ if exists("b:match_debug") -+ let b:match_ini = ini -+ let b:match_tail = (strlen(mid) ? mid.'\|' : '') . fin -+ endif -+ -+ " Fifth step: actually start moving the cursor and call searchpair(). -+ " Later, :execute restore_cursor to get to the original screen. -+ let restore_cursor = virtcol(".") . "|" -+ normal! g0 -+ let restore_cursor = line(".") . "G" . virtcol(".") . "|zs" . restore_cursor -+ normal! H -+ let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor -+ execute restore_cursor -+ call cursor(0, curcol + 1) -+ " normal! 0 -+ " if curcol -+ " execute "normal!" . curcol . "l" -+ " endif -+ if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on")) -+ let skip = "0" -+ else -+ execute "if " . skip . "| let skip = '0' | endif" -+ endif -+ let sp_return = searchpair(ini, mid, fin, flag, skip) -+ let final_position = "call cursor(" . line(".") . "," . col(".") . ")" -+ " Restore cursor position and original screen. -+ execute restore_cursor -+ normal! m' -+ if sp_return > 0 -+ execute final_position -+ endif -+ return s:CleanUp(restore_options, a:mode, startline, startcol, mid.'\|'.fin) -+endfun -+ -+" Restore options and do some special handling for Operator-pending mode. -+" The optional argument is the tail of the matching group. -+fun! s:CleanUp(options, mode, startline, startcol, ...) -+ execute "set" a:options -+ " Open folds, if appropriate. -+ if a:mode != "o" -+ if &foldopen =~ "percent" -+ normal! zv -+ endif -+ " In Operator-pending mode, we want to include the whole match -+ " (for example, d%). -+ " This is only a problem if we end up moving in the forward direction. -+ elseif (a:startline < line(".")) || -+ \ (a:startline == line(".") && a:startcol < col(".")) -+ if a:0 -+ " Check whether the match is a single character. If not, move to the -+ " end of the match. -+ let matchline = getline(".") -+ let currcol = col(".") -+ let regexp = s:Wholematch(matchline, a:1, currcol-1) -+ let endcol = matchend(matchline, regexp) -+ if endcol > currcol " This is NOT off by one! -+ execute "normal!" . (endcol - currcol) . "l" -+ endif -+ endif " a:0 -+ endif " a:mode != "o" && etc. -+ return 0 -+endfun -+ -+" Example (simplified HTML patterns): if -+" a:groupBR = '<\(\k\+\)>:' -+" a:prefix = '^.\{3}\(' -+" a:group = '<\(\k\+\)>:' -+" a:suffix = '\).\{2}$' -+" a:matchline = "12312" or "12312" -+" then extract "tag" from a:matchline and return ":" . -+fun! s:InsertRefs(groupBR, prefix, group, suffix, matchline) -+ if a:matchline !~ a:prefix . -+ \ substitute(a:group, s:notslash . '\zs:', '\\|', 'g') . a:suffix -+ return a:group -+ endif -+ let i = matchend(a:groupBR, s:notslash . ':') -+ let ini = strpart(a:groupBR, 0, i-1) -+ let tailBR = strpart(a:groupBR, i) -+ let word = s:Choose(a:group, a:matchline, ":", "", a:prefix, a:suffix, -+ \ a:groupBR) -+ let i = matchend(word, s:notslash . ":") -+ let wordBR = strpart(word, i) -+ let word = strpart(word, 0, i-1) -+ " Now, a:matchline =~ a:prefix . word . a:suffix -+ if wordBR != ini -+ let table = s:Resolve(ini, wordBR, "table") -+ else -+ " let table = "----------" -+ let table = "" -+ let d = 0 -+ while d < 10 -+ if tailBR =~ s:notslash . '\\' . d -+ " let table[d] = d -+ let table = table . d -+ else -+ let table = table . "-" -+ endif -+ let d = d + 1 -+ endwhile -+ endif -+ let d = 9 -+ while d -+ if table[d] != "-" -+ let backref = substitute(a:matchline, a:prefix.word.a:suffix, -+ \ '\'.table[d], "") -+ " Are there any other characters that should be escaped? -+ let backref = escape(backref, '*,:') -+ execute s:Ref(ini, d, "start", "len") -+ let ini = strpart(ini, 0, start) . backref . strpart(ini, start+len) -+ let tailBR = substitute(tailBR, s:notslash . '\zs\\' . d, -+ \ escape(backref, '\\'), 'g') -+ endif -+ let d = d-1 -+ endwhile -+ if exists("b:match_debug") -+ if s:do_BR -+ let b:match_table = table -+ let b:match_word = word -+ else -+ let b:match_table = "" -+ let b:match_word = "" -+ endif -+ endif -+ return ini . ":" . tailBR -+endfun -+ -+" Input a comma-separated list of groups with backrefs, such as -+" a:groups = '\(foo\):end\1,\(bar\):end\1' -+" and return a comma-separated list of groups with backrefs replaced: -+" return '\(foo\):end\(foo\),\(bar\):end\(bar\)' -+fun! s:ParseWords(groups) -+ let groups = substitute(a:groups.",", s:notslash.'\zs[,:]*,[,:]*', ',', 'g') -+ let groups = substitute(groups, s:notslash . '\zs:\{2,}', ':', 'g') -+ let parsed = "" -+ while groups =~ '[^,:]' -+ let i = matchend(groups, s:notslash . ':') -+ let j = matchend(groups, s:notslash . ',') -+ let ini = strpart(groups, 0, i-1) -+ let tail = strpart(groups, i, j-i-1) . ":" -+ let groups = strpart(groups, j) -+ let parsed = parsed . ini -+ let i = matchend(tail, s:notslash . ':') -+ while i != -1 -+ " In 'if:else:endif', ini='if' and word='else' and then word='endif'. -+ let word = strpart(tail, 0, i-1) -+ let tail = strpart(tail, i) -+ let i = matchend(tail, s:notslash . ':') -+ let parsed = parsed . ":" . s:Resolve(ini, word, "word") -+ endwhile " Now, tail has been used up. -+ let parsed = parsed . "," -+ endwhile " groups =~ '[^,:]' -+ return parsed -+endfun -+ -+" TODO I think this can be simplified and/or made more efficient. -+" TODO What should I do if a:start is out of range? -+" Return a regexp that matches all of a:string, such that -+" matchstr(a:string, regexp) represents the match for a:pat that starts -+" as close to a:start as possible, before being preferred to after, and -+" ends after a:start . -+" Usage: -+" let regexp = s:Wholematch(getline("."), 'foo\|bar', col(".")-1) -+" let i = match(getline("."), regexp) -+" let j = matchend(getline("."), regexp) -+" let match = matchstr(getline("."), regexp) -+fun! s:Wholematch(string, pat, start) -+ let group = '\%(' . a:pat . '\)' -+ let prefix = (a:start ? '\(^.*\%<' . (a:start + 2) . 'c\)\zs' : '^') -+ let len = strlen(a:string) -+ let suffix = (a:start+1 < len ? '\(\%>'.(a:start+1).'c.*$\)\@=' : '$') -+ if a:string !~ prefix . group . suffix -+ let prefix = '' -+ endif -+ return prefix . group . suffix -+endfun -+ -+" No extra arguments: s:Ref(string, d) will -+" find the d'th occurrence of '\(' and return it, along with everything up -+" to and including the matching '\)'. -+" One argument: s:Ref(string, d, "start") returns the index of the start -+" of the d'th '\(' and any other argument returns the length of the group. -+" Two arguments: s:Ref(string, d, "foo", "bar") returns a string to be -+" executed, having the effect of -+" :let foo = s:Ref(string, d, "start") -+" :let bar = s:Ref(string, d, "len") -+fun! s:Ref(string, d, ...) -+ let len = strlen(a:string) -+ if a:d == 0 -+ let start = 0 -+ else -+ let cnt = a:d -+ let match = a:string -+ while cnt -+ let cnt = cnt - 1 -+ let index = matchend(match, s:notslash . '\\(') -+ if index == -1 -+ return "" -+ endif -+ let match = strpart(match, index) -+ endwhile -+ let start = len - strlen(match) -+ if a:0 == 1 && a:1 == "start" -+ return start - 2 -+ endif -+ let cnt = 1 -+ while cnt -+ let index = matchend(match, s:notslash . '\\(\|\\)') - 1 -+ if index == -2 -+ return "" -+ endif -+ " Increment if an open, decrement if a ')': -+ let cnt = cnt + (match[index]=="(" ? 1 : -1) " ')' -+ " let cnt = stridx('0(', match[index]) + cnt -+ let match = strpart(match, index+1) -+ endwhile -+ let start = start - 2 -+ let len = len - start - strlen(match) -+ endif -+ if a:0 == 1 -+ return len -+ elseif a:0 == 2 -+ return "let " . a:1 . "=" . start . "| let " . a:2 . "=" . len -+ else -+ return strpart(a:string, start, len) -+ endif -+endfun -+ -+" Count the number of disjoint copies of pattern in string. -+" If the pattern is a literal string and contains no '0' or '1' characters -+" then s:Count(string, pattern, '0', '1') should be faster than -+" s:Count(string, pattern). -+fun! s:Count(string, pattern, ...) -+ let pat = escape(a:pattern, '\\') -+ if a:0 > 1 -+ let foo = substitute(a:string, '[^'.a:pattern.']', "a:1", "g") -+ let foo = substitute(a:string, pat, a:2, "g") -+ let foo = substitute(foo, '[^' . a:2 . ']', "", "g") -+ return strlen(foo) -+ endif -+ let result = 0 -+ let foo = a:string -+ let index = matchend(foo, pat) -+ while index != -1 -+ let result = result + 1 -+ let foo = strpart(foo, index) -+ let index = matchend(foo, pat) -+ endwhile -+ return result -+endfun -+ -+" s:Resolve('\(a\)\(b\)', '\(c\)\2\1\1\2') should return table.word, where -+" word = '\(c\)\(b\)\(a\)\3\2' and table = '-32-------'. That is, the first -+" '\1' in target is replaced by '\(a\)' in word, table[1] = 3, and this -+" indicates that all other instances of '\1' in target are to be replaced -+" by '\3'. The hard part is dealing with nesting... -+" Note that ":" is an illegal character for source and target, -+" unless it is preceded by "\". -+fun! s:Resolve(source, target, output) -+ let word = a:target -+ let i = matchend(word, s:notslash . '\\\d') - 1 -+ let table = "----------" -+ while i != -2 " There are back references to be replaced. -+ let d = word[i] -+ let backref = s:Ref(a:source, d) -+ " The idea is to replace '\d' with backref. Before we do this, -+ " replace any \(\) groups in backref with :1, :2, ... if they -+ " correspond to the first, second, ... group already inserted -+ " into backref. Later, replace :1 with \1 and so on. The group -+ " number w+b within backref corresponds to the group number -+ " s within a:source. -+ " w = number of '\(' in word before the current one -+ let w = s:Count( -+ \ substitute(strpart(word, 0, i-1), '\\\\', '', 'g'), '\(', '1') -+ let b = 1 " number of the current '\(' in backref -+ let s = d " number of the current '\(' in a:source -+ while b <= s:Count(substitute(backref, '\\\\', '', 'g'), '\(', '1') -+ \ && s < 10 -+ if table[s] == "-" -+ if w + b < 10 -+ " let table[s] = w + b -+ let table = strpart(table, 0, s) . (w+b) . strpart(table, s+1) -+ endif -+ let b = b + 1 -+ let s = s + 1 -+ else -+ execute s:Ref(backref, b, "start", "len") -+ let ref = strpart(backref, start, len) -+ let backref = strpart(backref, 0, start) . ":". table[s] -+ \ . strpart(backref, start+len) -+ let s = s + s:Count(substitute(ref, '\\\\', '', 'g'), '\(', '1') -+ endif -+ endwhile -+ let word = strpart(word, 0, i-1) . backref . strpart(word, i+1) -+ let i = matchend(word, s:notslash . '\\\d') - 1 -+ endwhile -+ let word = substitute(word, s:notslash . '\zs:', '\\', 'g') -+ if a:output == "table" -+ return table -+ elseif a:output == "word" -+ return word -+ else -+ return table . word -+ endif -+endfun -+ -+" Assume a:comma = ",". Then the format for a:patterns and a:1 is -+" a:patterns = ",,..." -+" a:1 = ",,..." -+" If is the first pattern that matches a:string then return -+" if no optional arguments are given; return , if a:1 is given. -+fun! s:Choose(patterns, string, comma, branch, prefix, suffix, ...) -+ let tail = (a:patterns =~ a:comma."$" ? a:patterns : a:patterns . a:comma) -+ let i = matchend(tail, s:notslash . a:comma) -+ if a:0 -+ let alttail = (a:1 =~ a:comma."$" ? a:1 : a:1 . a:comma) -+ let j = matchend(alttail, s:notslash . a:comma) -+ endif -+ let current = strpart(tail, 0, i-1) -+ if a:branch == "" -+ let currpat = current -+ else -+ let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g') -+ endif -+ while a:string !~ a:prefix . currpat . a:suffix -+ let tail = strpart(tail, i) -+ let i = matchend(tail, s:notslash . a:comma) -+ if i == -1 -+ return -1 -+ endif -+ let current = strpart(tail, 0, i-1) -+ if a:branch == "" -+ let currpat = current -+ else -+ let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g') -+ endif -+ if a:0 -+ let alttail = strpart(alttail, j) -+ let j = matchend(alttail, s:notslash . a:comma) -+ endif -+ endwhile -+ if a:0 -+ let current = current . a:comma . strpart(alttail, 0, j-1) -+ endif -+ return current -+endfun -+ -+" Call this function to turn on debugging information. Every time the main -+" script is run, buffer variables will be saved. These can be used directly -+" or viewed using the menu items below. -+if !exists(":MatchDebug") -+ command! -nargs=0 MatchDebug call s:Match_debug() -+endif -+ -+fun! s:Match_debug() -+ let b:match_debug = 1 " Save debugging information. -+ " pat = all of b:match_words with backrefs parsed -+ amenu &Matchit.&pat :echo b:match_pat -+ " match = bit of text that is recognized as a match -+ amenu &Matchit.&match :echo b:match_match -+ " curcol = cursor column of the start of the matching text -+ amenu &Matchit.&curcol :echo b:match_col -+ " wholeBR = matching group, original version -+ amenu &Matchit.wh&oleBR :echo b:match_wholeBR -+ " iniBR = 'if' piece, original version -+ amenu &Matchit.ini&BR :echo b:match_iniBR -+ " ini = 'if' piece, with all backrefs resolved from match -+ amenu &Matchit.&ini :echo b:match_ini -+ " tail = 'else\|endif' piece, with all backrefs resolved from match -+ amenu &Matchit.&tail :echo b:match_tail -+ " fin = 'endif' piece, with all backrefs resolved from match -+ amenu &Matchit.&word :echo b:match_word -+ " '\'.d in ini refers to the same thing as '\'.table[d] in word. -+ amenu &Matchit.t&able :echo '0:' . b:match_table . ':9' -+endfun -+ -+" Jump to the nearest unmatched "(" or "if" or "" if a:spflag == "bW" -+" or the nearest unmatched "" or "endif" or ")" if a:spflag == "W". -+" Return a "mark" for the original position, so that -+" let m = MultiMatch("bW", "n") ... execute m -+" will return to the original position. If there is a problem, do not -+" move the cursor and return "", unless a count is given, in which case -+" go up or down as many levels as possible and again return "". -+" TODO This relies on the same patterns as % matching. It might be a good -+" idea to give it its own matching patterns. -+fun! s:MultiMatch(spflag, mode) -+ if !exists("b:match_words") || b:match_words == "" -+ return "" -+ end -+ let restore_options = (&ic ? "" : "no") . "ignorecase" -+ if exists("b:match_ignorecase") -+ let &ignorecase = b:match_ignorecase -+ endif -+ let startline = line(".") -+ let startcol = col(".") -+ -+ " First step: if not already done, set the script variables -+ " s:do_BR flag for whether there are backrefs -+ " s:pat parsed version of b:match_words -+ " s:all regexp based on s:pat and the default groups -+ " This part is copied and slightly modified from s:Match_wrapper(). -+ let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") . -+ \ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>' -+ " Allow b:match_words = "GetVimMatchWords()" . -+ if b:match_words =~ ":" -+ let match_words = b:match_words -+ else -+ execute "let match_words =" b:match_words -+ endif -+ if (match_words != s:last_words) || (&mps != s:last_mps) || -+ \ exists("b:match_debug") -+ let s:last_words = match_words -+ let s:last_mps = &mps -+ if match_words !~ s:notslash . '\\\d' -+ let s:do_BR = 0 -+ let s:pat = match_words -+ else -+ let s:do_BR = 1 -+ let s:pat = s:ParseWords(match_words) -+ endif -+ let s:all = '\%(' . substitute(s:pat . (strlen(s:pat)?",":"") . default, -+ \ '[,:]\+','\\|','g') . '\)' -+ if exists("b:match_debug") -+ let b:match_pat = s:pat -+ endif -+ endif -+ -+ " Second step: figure out the patterns for searchpair() -+ " and save the screen, cursor position, and 'ignorecase'. -+ " - TODO: A lot of this is copied from s:Match_wrapper(). -+ " - maybe even more functionality should be split off -+ " - into separate functions! -+ let cdefault = (s:pat =~ '[^,]$' ? "," : "") . default -+ let open = substitute(s:pat . cdefault, -+ \ s:notslash . '\zs:.\{-}' . s:notslash . ',', '\\),\\(', 'g') -+ let open = '\(' . substitute(open, s:notslash . '\zs:.*$', '\\)', '') -+ let close = substitute(s:pat . cdefault, -+ \ s:notslash . '\zs,.\{-}' . s:notslash . ':', '\\),\\(', 'g') -+ let close = substitute(close, '^.\{-}' . s:notslash . ':', '\\(', '') . '\)' -+ if exists("b:match_skip") -+ let skip = b:match_skip -+ elseif exists("b:match_comment") " backwards compatibility and testing! -+ let skip = "r:" . b:match_comment -+ else -+ let skip = 's:comment\|string' -+ endif -+ let skip = s:ParseSkip(skip) -+ " let restore_cursor = line(".") . "G" . virtcol(".") . "|" -+ " normal! H -+ " let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor -+ let restore_cursor = virtcol(".") . "|" -+ normal! g0 -+ let restore_cursor = line(".") . "G" . virtcol(".") . "|zs" . restore_cursor -+ normal! H -+ let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor -+ execute restore_cursor -+ -+ " Third step: call searchpair(). -+ " Replace '\('--but not '\\('--with '\%(' and ',' with '\|'. -+ let openpat = substitute(open, '\(\\\@" or ... -+" and return "endif" or "endwhile" or "" or ... . -+" For now, this uses b:match_words and the same script variables -+" as s:Match_wrapper() . Later, it may get its own patterns, -+" either from a buffer variable or passed as arguments. -+" fun! s:Autocomplete() -+" echo "autocomplete not yet implemented :-(" -+" if !exists("b:match_words") || b:match_words == "" -+" return "" -+" end -+" let startpos = s:MultiMatch("bW") -+" -+" if startpos == "" -+" return "" -+" endif -+" " - TODO: figure out whether 'if' or '' matched, and construct -+" " - the appropriate closing. -+" let matchline = getline(".") -+" let curcol = col(".") - 1 -+" " - TODO: Change the s:all argument if there is a new set of match pats. -+" let regexp = s:Wholematch(matchline, s:all, curcol) -+" let suf = strlen(matchline) - matchend(matchline, regexp) -+" let prefix = (curcol ? '^.\{' . curcol . '}\%(' : '^\%(') -+" let suffix = (suf ? '\).\{' . suf . '}$' : '\)$') -+" " Reconstruct the version with unresolved backrefs. -+" let patBR = substitute(b:match_words.',', '[,:]*,[,:]*', ',', 'g') -+" let patBR = substitute(patBR, ':\{2,}', ':', "g") -+" " Now, set group and groupBR to the matching group: 'if:endif' or -+" " 'while:endwhile' or whatever. -+" let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR) -+" let i = matchend(group, s:notslash . ",") -+" let groupBR = strpart(group, i) -+" let group = strpart(group, 0, i-1) -+" " Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix -+" if s:do_BR -+" let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline) -+" endif -+" " let g:group = group -+" -+" " - TODO: Construct the closing from group. -+" let fake = "end" . expand("") -+" execute startpos -+" return fake -+" endfun -+ -+" Close all open structures. "Get the heck out of here!" -+" fun! s:Gthhoh() -+" let close = s:Autocomplete() -+" while strlen(close) -+" put=close -+" let close = s:Autocomplete() -+" endwhile -+" endfun -+ -+" Parse special strings as typical skip arguments for searchpair(): -+" s:foo becomes (current syntax item) =~ foo -+" S:foo becomes (current syntax item) !~ foo -+" r:foo becomes (line before cursor) =~ foo -+" R:foo becomes (line before cursor) !~ foo -+fun! s:ParseSkip(str) -+ let skip = a:str -+ if skip[1] == ":" -+ if skip[0] == "s" -+ let skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" . -+ \ strpart(skip,2) . "'" -+ elseif skip[0] == "S" -+ let skip = "synIDattr(synID(line('.'),col('.'),1),'name') !~? '" . -+ \ strpart(skip,2) . "'" -+ elseif skip[0] == "r" -+ let skip = "strpart(getline('.'),0,col('.'))=~'" . strpart(skip,2). "'" -+ elseif skip[0] == "R" -+ let skip = "strpart(getline('.'),0,col('.'))!~'" . strpart(skip,2). "'" -+ endif -+ endif -+ return skip -+endfun -+ -+let &cpo = s:save_cpo -+ -+" vim:sts=2:sw=2: -diff -urN vim71/runtime/plugin/taglist.vim vim71_ada/runtime/plugin/taglist.vim ---- vim71/runtime/plugin/taglist.vim 1970-01-01 01:00:00.000000000 +0100 -+++ vim71_ada/runtime/plugin/taglist.vim 2008-01-16 16:37:03.000000000 +0100 -@@ -0,0 +1,4524 @@ -+" File: taglist.vim -+" Author: Yegappan Lakshmanan (yegappan AT yahoo DOT com) -+" Version: 4.3 -+" Last Modified: February 18, 2007 -+" Copyright: Copyright (C) 2002-2006 Yegappan Lakshmanan -+" Permission is hereby granted to use and distribute this code, -+" with or without modifications, provided that this copyright -+" notice is copied with it. Like anything else that's free, -+" taglist.vim is provided *as is* and comes with no warranty of any -+" kind, either expressed or implied. In no event will the copyright -+" holder be liable for any damamges resulting from the use of this -+" software. -+" -+" The "Tag List" plugin is a source code browser plugin for Vim and provides -+" an overview of the structure of the programming language files and allows -+" you to efficiently browse through source code files for different -+" programming languages. You can visit the taglist plugin home page for more -+" information: -+" -+" http://vim-taglist.sourceforge.net -+" -+" You can subscribe to the taglist mailing list to post your questions -+" or suggestions for improvement or to report bugs. Visit the following -+" page for subscribing to the mailing list: -+" -+" http://groups.yahoo.com/group/taglist/ -+" -+" For more information about using this plugin, after installing the -+" taglist plugin, use the ":help taglist" command. -+" -+" Installation -+" ------------ -+" 1. Download the taglist.zip file and unzip the files to the $HOME/.vim -+" or the $HOME/vimfiles or the $VIM/vimfiles directory. This should -+" unzip the following two files (the directory structure should be -+" preserved): -+" -+" plugin/taglist.vim - main taglist plugin file -+" doc/taglist.txt - documentation (help) file -+" -+" Refer to the 'add-plugin', 'add-global-plugin' and 'runtimepath' -+" Vim help pages for more details about installing Vim plugins. -+" 2. Change to the $HOME/.vim/doc or $HOME/vimfiles/doc or -+" $VIM/vimfiles/doc directory, start Vim and run the ":helptags ." -+" command to process the taglist help file. -+" 3. If the exuberant ctags utility is not present in your PATH, then set the -+" Tlist_Ctags_Cmd variable to point to the location of the exuberant ctags -+" utility (not to the directory) in the .vimrc file. -+" 4. If you are running a terminal/console version of Vim and the -+" terminal doesn't support changing the window width then set the -+" 'Tlist_Inc_Winwidth' variable to 0 in the .vimrc file. -+" 5. Restart Vim. -+" 6. You can now use the ":TlistToggle" command to open/close the taglist -+" window. You can use the ":help taglist" command to get more -+" information about using the taglist plugin. -+" -+" ****************** Do not modify after this line ************************ -+ -+" Line continuation used here -+let s:cpo_save = &cpo -+set cpo&vim -+ -+if !exists('loaded_taglist') -+ " First time loading the taglist plugin -+ " -+ " To speed up the loading of Vim, the taglist plugin uses autoload -+ " mechanism to load the taglist functions. -+ " Only define the configuration variables, user commands and some -+ " auto-commands and finish sourcing the file -+ -+ " The taglist plugin requires the built-in Vim system() function. If this -+ " function is not available, then don't load the plugin. -+ if !exists('*system') -+ echomsg 'Taglist: Vim system() built-in function is not available. ' . -+ \ 'Plugin is not loaded.' -+ let loaded_taglist = 'no' -+ let &cpo = s:cpo_save -+ finish -+ endif -+ -+ " Location of the exuberant ctags tool -+ if !exists('Tlist_Ctags_Cmd') -+ if executable('exuberant-ctags') -+ " On Debian Linux, exuberant ctags is installed -+ " as exuberant-ctags -+ let Tlist_Ctags_Cmd = 'exuberant-ctags' -+ elseif executable(' exctags') -+ " On Free-BSD, exuberant ctags is installed as exctags -+ let Tlist_Ctags_ Cmd = 'exctags' -+ elseif executable('ctags') -+ let Tlist_Ctags_Cmd = 'ctags' -+ elseif executable('ctags.exe') -+ let Tlist_Ctags_Cmd = 'ctags.exe' -+ elseif executable('tags') -+ let Tlist_Ctags_Cmd = 'tags' -+ else -+ " echomsg 'Taglist: Exuberant ctags (http://ctags.sf.net) ' . -+ " \ 'not found in PATH. Plugin is not loaded.' -+ " Skip loading the plugin -+ let loaded_taglist = 'no' -+ let &cpo = s:cpo_save -+ finish -+ endif -+ endif -+ -+ -+ " Automatically open the taglist window on Vim startup -+ if !exists('Tlist_Auto_Open') -+ let Tlist_Auto_Open = 0 -+ endif -+ -+ " When the taglist window is toggle opened, move the cursor to the -+ " taglist window -+ if !exists('Tlist_GainFocus_On_ToggleOpen') -+ let Tlist_GainFocus_On_ToggleOpen = 0 -+ endif -+ -+ " Process files even when the taglist window is not open -+ if !exists('Tlist_Process_File_Always') -+ let Tlist_Process_File_Always = 0 -+ endif -+ -+ if !exists('Tlist_Show_Menu') -+ let Tlist_Show_Menu = 0 -+ endif -+ -+ " Tag listing sort type - 'name' or 'order' -+ if !exists('Tlist_Sort_Type') -+ let Tlist_Sort_Type = 'order' -+ endif -+ -+ " Tag listing window split (horizontal/vertical) control -+ if !exists('Tlist_Use_Horiz_Window') -+ let Tlist_Use_Horiz_Window = 0 -+ endif -+ -+ " Open the vertically split taglist window on the left or on the right -+ " side. This setting is relevant only if Tlist_Use_Horiz_Window is set to -+ " zero (i.e. only for vertically split windows) -+ if !exists('Tlist_Use_Right_Window') -+ let Tlist_Use_Right_Window = 0 -+ endif -+ -+ " Increase Vim window width to display vertically split taglist window. -+ " For MS-Windows version of Vim running in a MS-DOS window, this must be -+ " set to 0 otherwise the system may hang due to a Vim limitation. -+ if !exists('Tlist_Inc_Winwidth') -+ if (has('win16') || has('win95')) && !has('gui_running') -+ let Tlist_Inc_Winwidth = 0 -+ else -+ let Tlist_Inc_Winwidth = 1 -+ endif -+ endif -+ -+ " Vertically split taglist window width setting -+ if !exists('Tlist_WinWidth') -+ let Tlist_WinWidth = 30 -+ endif -+ -+ " Horizontally split taglist window height setting -+ if !exists('Tlist_WinHeight') -+ let Tlist_WinHeight = 10 -+ endif -+ -+ " Display tag prototypes or tag names in the taglist window -+ if !exists('Tlist_Display_Prototype') -+ let Tlist_Display_Prototype = 0 -+ endif -+ -+ " Display tag scopes in the taglist window -+ if !exists('Tlist_Display_Tag_Scope') -+ let Tlist_Display_Tag_Scope = 1 -+ endif -+ -+ " Use single left mouse click to jump to a tag. By default this is disabled. -+ " Only double click using the mouse will be processed. -+ if !exists('Tlist_Use_SingleClick') -+ let Tlist_Use_SingleClick = 0 -+ endif -+ -+ " Control whether additional help is displayed as part of the taglist or -+ " not. Also, controls whether empty lines are used to separate the tag -+ " tree. -+ if !exists('Tlist_Compact_Format') -+ let Tlist_Compact_Format = 0 -+ endif -+ -+ " Exit Vim if only the taglist window is currently open. By default, this is -+ " set to zero. -+ if !exists('Tlist_Exit_OnlyWindow') -+ let Tlist_Exit_OnlyWindow = 0 -+ endif -+ -+ " Automatically close the folds for the non-active files in the taglist -+ " window -+ if !exists('Tlist_File_Fold_Auto_Close') -+ let Tlist_File_Fold_Auto_Close = 0 -+ endif -+ -+ " Close the taglist window when a tag is selected -+ if !exists('Tlist_Close_On_Select') -+ let Tlist_Close_On_Select = 0 -+ endif -+ -+ " Automatically update the taglist window to display tags for newly -+ " edited files -+ if !exists('Tlist_Auto_Update') -+ let Tlist_Auto_Update = 1 -+ endif -+ -+ " Automatically highlight the current tag -+ if !exists('Tlist_Auto_Highlight_Tag') -+ let Tlist_Auto_Highlight_Tag = 1 -+ endif -+ -+ " Automatically highlight the current tag on entering a buffer -+ if !exists('Tlist_Highlight_Tag_On_BufEnter') -+ let Tlist_Highlight_Tag_On_BufEnter = 1 -+ endif -+ -+ " Enable fold column to display the folding for the tag tree -+ if !exists('Tlist_Enable_Fold_Column') -+ let Tlist_Enable_Fold_Column = 1 -+ endif -+ -+ " Display the tags for only one file in the taglist window -+ if !exists('Tlist_Show_One_File') -+ let Tlist_Show_One_File = 0 -+ endif -+ -+ if !exists('Tlist_Max_Submenu_Items') -+ let Tlist_Max_Submenu_Items = 20 -+ endif -+ -+ if !exists('Tlist_Max_Tag_Length') -+ let Tlist_Max_Tag_Length = 10 -+ endif -+ -+ " Do not change the name of the taglist title variable. The winmanager -+ " plugin relies on this name to determine the title for the taglist -+ " plugin. -+ let TagList_title = "__Tag_List__" -+ -+ " Taglist debug messages -+ let s:tlist_msg = '' -+ -+ " Define the taglist autocommand to automatically open the taglist window -+ " on Vim startup -+ if g:Tlist_Auto_Open -+ autocmd VimEnter * nested call s:Tlist_Window_Check_Auto_Open() -+ endif -+ -+ " Refresh the taglist -+ if g:Tlist_Process_File_Always -+ autocmd BufEnter * call s:Tlist_Refresh() -+ endif -+ -+ if g:Tlist_Show_Menu -+ autocmd GUIEnter * call s:Tlist_Menu_Init() -+ endif -+ -+ " When the taglist buffer is created when loading a Vim session file, -+ " the taglist buffer needs to be initialized. The BufFilePost event -+ " is used to handle this case. -+ autocmd BufFilePost __Tag_List__ call s:Tlist_Vim_Session_Load() -+ -+ " Define the user commands to manage the taglist window -+ command! -nargs=0 -bar TlistToggle call s:Tlist_Window_Toggle() -+ command! -nargs=0 -bar TlistOpen call s:Tlist_Window_Open() -+ " For backwards compatiblity define the Tlist command -+ command! -nargs=0 -bar Tlist TlistToggle -+ command! -nargs=+ -complete=file TlistAddFiles -+ \ call s:Tlist_Add_Files() -+ command! -nargs=+ -complete=dir TlistAddFilesRecursive -+ \ call s:Tlist_Add_Files_Recursive() -+ command! -nargs=0 -bar TlistClose call s:Tlist_Window_Close() -+ command! -nargs=0 -bar TlistUpdate call s:Tlist_Update_Current_File() -+ command! -nargs=0 -bar TlistHighlightTag call s:Tlist_Window_Highlight_Tag( -+ \ fnamemodify(bufname('%'), ':p'), line('.'), 2, 1) -+ " For backwards compatiblity define the TlistSync command -+ command! -nargs=0 -bar TlistSync TlistHighlightTag -+ command! -nargs=* -complete=buffer TlistShowPrototype -+ \ echo Tlist_Get_Tag_Prototype_By_Line() -+ command! -nargs=* -complete=buffer TlistShowTag -+ \ echo Tlist_Get_Tagname_By_Line() -+ command! -nargs=* -complete=file TlistSessionLoad -+ \ call s:Tlist_Session_Load() -+ command! -nargs=* -complete=file TlistSessionSave -+ \ call s:Tlist_Session_Save() -+ command! -bar TlistLock let Tlist_Auto_Update=0 -+ command! -bar TlistUnlock let Tlist_Auto_Update=1 -+ -+ " Commands for enabling/disabling debug and to display debug messages -+ command! -nargs=? -complete=file -bar TlistDebug -+ \ call s:Tlist_Debug_Enable() -+ command! -nargs=0 -bar TlistUndebug call s:Tlist_Debug_Disable() -+ command! -nargs=0 -bar TlistMessages call s:Tlist_Debug_Show() -+ -+ " Define autocommands to autoload the taglist plugin when needed. -+ -+ " Trick to get the current script ID -+ map xx xx -+ let s:tlist_sid = substitute(maparg('xx'), '\(\d\+_\)xx$', -+ \ '\1', '') -+ unmap xx -+ -+ exe 'autocmd FuncUndefined *' . s:tlist_sid . 'Tlist_* source ' . -+ \ escape(expand(''), ' ') -+ exe 'autocmd FuncUndefined *' . s:tlist_sid . 'Tlist_Window_* source ' . -+ \ escape(expand(''), ' ') -+ exe 'autocmd FuncUndefined *' . s:tlist_sid . 'Tlist_Menu_* source ' . -+ \ escape(expand(''), ' ') -+ exe 'autocmd FuncUndefined Tlist_* source ' . -+ \ escape(expand(''), ' ') -+ exe 'autocmd FuncUndefined TagList_* source ' . -+ \ escape(expand(''), ' ') -+ -+ let loaded_taglist = 'fast_load_done' -+ -+ if g:Tlist_Show_Menu && has('gui_running') -+ call s:Tlist_Menu_Init() -+ endif -+ -+ " restore 'cpo' -+ let &cpo = s:cpo_save -+ finish -+endif -+ -+if !exists('s:tlist_sid') -+ " Two or more versions of taglist plugin are installed. Don't -+ " load this version of the plugin. -+ finish -+endif -+ -+unlet! s:tlist_sid -+ -+if loaded_taglist != 'fast_load_done' -+ " restore 'cpo' -+ let &cpo = s:cpo_save -+ finish -+endif -+ -+" Taglist plugin functionality is available -+let loaded_taglist = 'available' -+ -+"------------------- end of user configurable options -------------------- -+ -+" Default language specific settings for supported file types and tag types -+" -+" Variable name format: -+" -+" s:tlist_def_{vim_ftype}_settings -+" -+" vim_ftype - Filetype detected by Vim -+" -+" Value format: -+" -+" ;:;:;... -+" -+" ctags_ftype - File type supported by exuberant ctags -+" flag - Flag supported by exuberant ctags to generate a tag type -+" name - Name of the tag type used in the taglist window to display the -+" tags of this type -+" -+ -+" Ada language -+let s:tlist_def_ada_settings = 'ada;' . -+ \ 'P:package spec;' . -+ \ 'p:package body;' . -+ \ 'T:type spec;' . -+ \ 't:type;' . -+ \ 'U:subtype spec;' . -+ \ 'u:subtype;' . -+ \ 'c:component;' . -+ \ 'l:literal;' . -+ \ 'V:variable spec;' . -+ \ 'v:variable;' . -+ \ 'f:formal;' . -+ \ 'n:constant;' . -+ \ 'x:exception;' . -+ \ 'R:subprogram spec;' . -+ \ 'r:subprogram body;' . -+ \ 'K:task spec;' . -+ \ 'k:task body;' . -+ \ 'O:protected spec;' . -+ \ 'o:protected body;' . -+ \ 'E:entry spec;' . -+ \ 'e:entry body;' . -+ \ 'b:label;' . -+ \ 'i:identifier;' . -+ \ 'a:autovar;' . -+ \ 'y:annon' -+ -+" assembly language -+let s:tlist_def_asm_settings = 'asm;d:define;l:label;m:macro;t:type' -+ -+" aspperl language -+let s:tlist_def_aspperl_settings = 'asp;f:function;s:sub;v:variable' -+ -+" aspvbs language -+let s:tlist_def_aspvbs_settings = 'asp;f:function;s:sub;v:variable' -+ -+" awk language -+let s:tlist_def_awk_settings = 'awk;f:function' -+ -+" beta language -+let s:tlist_def_beta_settings = 'beta;f:fragment;s:slot;v:pattern' -+ -+" c language -+let s:tlist_def_c_settings = 'c;d:macro;g:enum;s:struct;u:union;t:typedef;' . -+ \ 'v:variable;f:function' -+ -+" c++ language -+let s:tlist_def_cpp_settings = 'c++;n:namespace;v:variable;d:macro;t:typedef;' . -+ \ 'c:class;g:enum;s:struct;u:union;f:function' -+ -+" c# language -+let s:tlist_def_cs_settings = 'c#;d:macro;t:typedef;n:namespace;c:class;' . -+ \ 'E:event;g:enum;s:struct;i:interface;' . -+ \ 'p:properties;m:method' -+ -+" cobol language -+let s:tlist_def_cobol_settings = 'cobol;d:data;f:file;g:group;p:paragraph;' . -+ \ 'P:program;s:section' -+ -+" eiffel language -+let s:tlist_def_eiffel_settings = 'eiffel;c:class;f:feature' -+ -+" erlang language -+let s:tlist_def_erlang_settings = 'erlang;d:macro;r:record;m:module;f:function' -+ -+" expect (same as tcl) language -+let s:tlist_def_expect_settings = 'tcl;c:class;f:method;p:procedure' -+ -+" fortran language -+let s:tlist_def_fortran_settings = 'fortran;p:program;b:block data;' . -+ \ 'c:common;e:entry;i:interface;k:type;l:label;m:module;' . -+ \ 'n:namelist;t:derived;v:variable;f:function;s:subroutine' -+ -+" HTML language -+let s:tlist_def_html_settings = 'html;a:anchor;f:javascript function' -+ -+" java language -+let s:tlist_def_java_settings = 'java;p:package;c:class;i:interface;' . -+ \ 'f:field;m:method' -+ -+" javascript language -+let s:tlist_def_javascript_settings = 'javascript;f:function' -+ -+" lisp language -+let s:tlist_def_lisp_settings = 'lisp;f:function' -+ -+" lua language -+let s:tlist_def_lua_settings = 'lua;f:function' -+ -+" makefiles -+let s:tlist_def_make_settings = 'make;m:macro' -+ -+" pascal language -+let s:tlist_def_pascal_settings = 'pascal;f:function;p:procedure' -+ -+" perl language -+let s:tlist_def_perl_settings = 'perl;c:constant;l:label;p:package;s:subroutine' -+ -+" php language -+let s:tlist_def_php_settings = 'php;c:class;d:constant;v:variable;f:function' -+ -+" python language -+let s:tlist_def_python_settings = 'python;c:class;m:member;f:function' -+ -+" rexx language -+let s:tlist_def_rexx_settings = 'rexx;s:subroutine' -+ -+" ruby language -+let s:tlist_def_ruby_settings = 'ruby;c:class;f:method;F:function;' . -+ \ 'm:singleton method' -+ -+" scheme language -+let s:tlist_def_scheme_settings = 'scheme;s:set;f:function' -+ -+" shell language -+let s:tlist_def_sh_settings = 'sh;f:function' -+ -+" C shell language -+let s:tlist_def_csh_settings = 'sh;f:function' -+ -+" Z shell language -+let s:tlist_def_zsh_settings = 'sh;f:function' -+ -+" slang language -+let s:tlist_def_slang_settings = 'slang;n:namespace;f:function' -+ -+" sml language -+let s:tlist_def_sml_settings = 'sml;e:exception;c:functor;s:signature;' . -+ \ 'r:structure;t:type;v:value;f:function' -+ -+" sql language -+let s:tlist_def_sql_settings = 'sql;c:cursor;F:field;P:package;r:record;' . -+ \ 's:subtype;t:table;T:trigger;v:variable;f:function;p:procedure' -+ -+" tcl language -+let s:tlist_def_tcl_settings = 'tcl;c:class;f:method;m:method;p:procedure' -+ -+" vera language -+let s:tlist_def_vera_settings = 'vera;c:class;d:macro;e:enumerator;' . -+ \ 'f:function;g:enum;m:member;p:program;' . -+ \ 'P:prototype;t:task;T:typedef;v:variable;' . -+ \ 'x:externvar' -+ -+"verilog language -+let s:tlist_def_verilog_settings = 'verilog;m:module;c:constant;P:parameter;' . -+ \ 'e:event;r:register;t:task;w:write;p:port;v:variable;f:function' -+ -+" vim language -+let s:tlist_def_vim_settings = 'vim;a:autocmds;v:variable;f:function' -+ -+" yacc language -+let s:tlist_def_yacc_settings = 'yacc;l:label' -+ -+"------------------- end of language specific options -------------------- -+ -+" Vim window size is changed by the taglist plugin or not -+let s:tlist_winsize_chgd = -1 -+" Taglist window is maximized or not -+let s:tlist_win_maximized = 0 -+" Name of files in the taglist -+let s:tlist_file_names='' -+" Number of files in the taglist -+let s:tlist_file_count = 0 -+" Number of filetypes supported by taglist -+let s:tlist_ftype_count = 0 -+" Is taglist part of other plugins like winmanager or cream? -+let s:tlist_app_name = "none" -+" Are we displaying brief help text -+let s:tlist_brief_help = 1 -+" List of files removed on user request -+let s:tlist_removed_flist = "" -+" Index of current file displayed in the taglist window -+let s:tlist_cur_file_idx = -1 -+" Taglist menu is empty or not -+let s:tlist_menu_empty = 1 -+ -+" An autocommand is used to refresh the taglist window when entering any -+" buffer. We don't want to refresh the taglist window if we are entering the -+" file window from one of the taglist functions. The 'Tlist_Skip_Refresh' -+" variable is used to skip the refresh of the taglist window and is set -+" and cleared appropriately. -+let s:Tlist_Skip_Refresh = 0 -+ -+" Tlist_Window_Display_Help() -+function! s:Tlist_Window_Display_Help() -+ if s:tlist_app_name == "winmanager" -+ " To handle a bug in the winmanager plugin, add a space at the -+ " last line -+ call setline('$', ' ') -+ endif -+ -+ if s:tlist_brief_help -+ " Add the brief help -+ call append(0, '" Press to display help text') -+ else -+ " Add the extensive help -+ call append(0, '" : Jump to tag definition') -+ call append(1, '" o : Jump to tag definition in new window') -+ call append(2, '" p : Preview the tag definition') -+ call append(3, '" : Display tag prototype') -+ call append(4, '" u : Update tag list') -+ call append(5, '" s : Select sort field') -+ call append(6, '" d : Remove file from taglist') -+ call append(7, '" x : Zoom-out/Zoom-in taglist window') -+ call append(8, '" + : Open a fold') -+ call append(9, '" - : Close a fold') -+ call append(10, '" * : Open all folds') -+ call append(11, '" = : Close all folds') -+ call append(12, '" [[ : Move to the start of previous file') -+ call append(13, '" ]] : Move to the start of next file') -+ call append(14, '" q : Close the taglist window') -+ call append(15, '" : Remove help text') -+ endif -+endfunction -+ -+" Tlist_Window_Toggle_Help_Text() -+" Toggle taglist plugin help text between the full version and the brief -+" version -+function! s:Tlist_Window_Toggle_Help_Text() -+ if g:Tlist_Compact_Format -+ " In compact display mode, do not display help -+ return -+ endif -+ -+ " Include the empty line displayed after the help text -+ let brief_help_size = 1 -+ let full_help_size = 16 -+ -+ setlocal modifiable -+ -+ " Set report option to a huge value to prevent informational messages -+ " while deleting the lines -+ let old_report = &report -+ set report=99999 -+ -+ " Remove the currently highlighted tag. Otherwise, the help text -+ " might be highlighted by mistake -+ match none -+ -+ " Toggle between brief and full help text -+ if s:tlist_brief_help -+ let s:tlist_brief_help = 0 -+ -+ " Remove the previous help -+ exe '1,' . brief_help_size . ' delete _' -+ -+ " Adjust the start/end line numbers for the files -+ call s:Tlist_Window_Update_Line_Offsets(0, 1, full_help_size - brief_help_size) -+ else -+ let s:tlist_brief_help = 1 -+ -+ " Remove the previous help -+ exe '1,' . full_help_size . ' delete _' -+ -+ " Adjust the start/end line numbers for the files -+ call s:Tlist_Window_Update_Line_Offsets(0, 0, full_help_size - brief_help_size) -+ endif -+ -+ call s:Tlist_Window_Display_Help() -+ -+ " Restore the report option -+ let &report = old_report -+ -+ setlocal nomodifiable -+endfunction -+ -+" Taglist debug support -+let s:tlist_debug = 0 -+ -+" File for storing the debug messages -+let s:tlist_debug_file = '' -+ -+" Tlist_Debug_Enable -+" Enable logging of taglist debug messages. -+function! s:Tlist_Debug_Enable(...) -+ let s:tlist_debug = 1 -+ -+ " Check whether a valid file name is supplied. -+ if a:1 != '' -+ let s:tlist_debug_file = fnamemodify(a:1, ':p') -+ -+ " Empty the log file -+ exe 'redir! > ' . s:tlist_debug_file -+ redir END -+ -+ " Check whether the log file is present/created -+ if !filewritable(s:tlist_debug_file) -+ call s:Tlist_Warning_Msg('Taglist: Unable to create log file ' -+ \ . s:tlist_debug_file) -+ let s:tlist_debug_file = '' -+ endif -+ endif -+endfunction -+ -+" Tlist_Debug_Disable -+" Disable logging of taglist debug messages. -+function! s:Tlist_Debug_Disable(...) -+ let s:tlist_debug = 0 -+ let s:tlist_debug_file = '' -+endfunction -+ -+" Tlist_Debug_Show -+" Display the taglist debug messages in a new window -+function! s:Tlist_Debug_Show() -+ if s:tlist_msg == '' -+ call s:Tlist_Warning_Msg('Taglist: No debug messages') -+ return -+ endif -+ -+ " Open a new window to display the taglist debug messages -+ new taglist_debug.txt -+ " Delete all the lines (if the buffer already exists) -+ silent! %delete _ -+ " Add the messages -+ silent! put =s:tlist_msg -+ " Move the cursor to the first line -+ normal! gg -+endfunction -+ -+" Tlist_Log_Msg -+" Log the supplied debug message along with the time -+function! s:Tlist_Log_Msg(msg) -+ if s:tlist_debug -+ if s:tlist_debug_file != '' -+ exe 'redir >> ' . s:tlist_debug_file -+ silent echon strftime('%H:%M:%S') . ': ' . a:msg . "\n" -+ redir END -+ else -+ " Log the message into a variable -+ " Retain only the last 3000 characters -+ let len = strlen(s:tlist_msg) -+ if len > 3000 -+ let s:tlist_msg = strpart(s:tlist_msg, len - 3000) -+ endif -+ let s:tlist_msg = s:tlist_msg . strftime('%H:%M:%S') . ': ' . -+ \ a:msg . "\n" -+ endif -+ endif -+endfunction -+ -+" Tlist_Warning_Msg() -+" Display a message using WarningMsg highlight group -+function! s:Tlist_Warning_Msg(msg) -+ echohl WarningMsg -+ echomsg a:msg -+ echohl None -+endfunction -+ -+" Last returned file index for file name lookup. -+" Used to speed up file lookup -+let s:tlist_file_name_idx_cache = -1 -+ -+" Tlist_Get_File_Index() -+" Return the index of the specified filename -+function! s:Tlist_Get_File_Index(fname) -+ if s:tlist_file_count == 0 || a:fname == '' -+ return -1 -+ endif -+ -+ " If the new filename is same as the last accessed filename, then -+ " return that index -+ if s:tlist_file_name_idx_cache != -1 && -+ \ s:tlist_file_name_idx_cache < s:tlist_file_count -+ if s:tlist_{s:tlist_file_name_idx_cache}_filename == a:fname -+ " Same as the last accessed file -+ return s:tlist_file_name_idx_cache -+ endif -+ endif -+ -+ " First, check whether the filename is present -+ let s_fname = a:fname . "\n" -+ let i = stridx(s:tlist_file_names, s_fname) -+ if i == -1 -+ let s:tlist_file_name_idx_cache = -1 -+ return -1 -+ endif -+ -+ " Second, compute the file name index -+ let nl_txt = substitute(strpart(s:tlist_file_names, 0, i), "[^\n]", '', 'g') -+ let s:tlist_file_name_idx_cache = strlen(nl_txt) -+ return s:tlist_file_name_idx_cache -+endfunction -+ -+" Last returned file index for line number lookup. -+" Used to speed up file lookup -+let s:tlist_file_lnum_idx_cache = -1 -+ -+" Tlist_Window_Get_File_Index_By_Linenum() -+" Return the index of the filename present in the specified line number -+" Line number refers to the line number in the taglist window -+function! s:Tlist_Window_Get_File_Index_By_Linenum(lnum) -+ call s:Tlist_Log_Msg('Tlist_Window_Get_File_Index_By_Linenum (' . a:lnum . ')') -+ -+ " First try to see whether the new line number is within the range -+ " of the last returned file -+ if s:tlist_file_lnum_idx_cache != -1 && -+ \ s:tlist_file_lnum_idx_cache < s:tlist_file_count -+ if a:lnum >= s:tlist_{s:tlist_file_lnum_idx_cache}_start && -+ \ a:lnum <= s:tlist_{s:tlist_file_lnum_idx_cache}_end -+ return s:tlist_file_lnum_idx_cache -+ endif -+ endif -+ -+ let fidx = -1 -+ -+ if g:Tlist_Show_One_File -+ " Displaying only one file in the taglist window. Check whether -+ " the line is within the tags displayed for that file -+ if s:tlist_cur_file_idx != -1 -+ if a:lnum >= s:tlist_{s:tlist_cur_file_idx}_start -+ \ && a:lnum <= s:tlist_{s:tlist_cur_file_idx}_end -+ let fidx = s:tlist_cur_file_idx -+ endif -+ -+ endif -+ else -+ " Do a binary search in the taglist -+ let left = 0 -+ let right = s:tlist_file_count - 1 -+ -+ while left < right -+ let mid = (left + right) / 2 -+ -+ if a:lnum >= s:tlist_{mid}_start && a:lnum <= s:tlist_{mid}_end -+ let s:tlist_file_lnum_idx_cache = mid -+ return mid -+ endif -+ -+ if a:lnum < s:tlist_{mid}_start -+ let right = mid - 1 -+ else -+ let left = mid + 1 -+ endif -+ endwhile -+ -+ if left >= 0 && left < s:tlist_file_count -+ \ && a:lnum >= s:tlist_{left}_start -+ \ && a:lnum <= s:tlist_{left}_end -+ let fidx = left -+ endif -+ endif -+ -+ let s:tlist_file_lnum_idx_cache = fidx -+ -+ return fidx -+endfunction -+ -+" Tlist_Exe_Cmd_No_Acmds -+" Execute the specified Ex command after disabling autocommands -+function! s:Tlist_Exe_Cmd_No_Acmds(cmd) -+ let old_eventignore = &eventignore -+ set eventignore=all -+ exe a:cmd -+ let &eventignore = old_eventignore -+endfunction -+ -+" Tlist_Skip_File() -+" Check whether tag listing is supported for the specified file -+function! s:Tlist_Skip_File(filename, ftype) -+ " Skip buffers with no names and buffers with filetype not set -+ if a:filename == '' || a:ftype == '' -+ return 1 -+ endif -+ -+ " Skip files which are not supported by exuberant ctags -+ " First check whether default settings for this filetype are available. -+ " If it is not available, then check whether user specified settings are -+ " available. If both are not available, then don't list the tags for this -+ " filetype -+ let var = 's:tlist_def_' . a:ftype . '_settings' -+ if !exists(var) -+ let var = 'g:tlist_' . a:ftype . '_settings' -+ if !exists(var) -+ return 1 -+ endif -+ endif -+ -+ " Skip files which are not readable or files which are not yet stored -+ " to the disk -+ if !filereadable(a:filename) -+ return 1 -+ endif -+ -+ return 0 -+endfunction -+ -+" Tlist_User_Removed_File -+" Returns 1 if a file is removed by a user from the taglist -+function! s:Tlist_User_Removed_File(filename) -+ return stridx(s:tlist_removed_flist, a:filename . "\n") != -1 -+endfunction -+ -+" Tlist_Update_Remove_List -+" Update the list of user removed files from the taglist -+" add == 1, add the file to the removed list -+" add == 0, delete the file from the removed list -+function! s:Tlist_Update_Remove_List(filename, add) -+ if a:add -+ let s:tlist_removed_flist = s:tlist_removed_flist . a:filename . "\n" -+ else -+ let idx = stridx(s:tlist_removed_flist, a:filename . "\n") -+ let text_before = strpart(s:tlist_removed_flist, 0, idx) -+ let rem_text = strpart(s:tlist_removed_flist, idx) -+ let next_idx = stridx(rem_text, "\n") -+ let text_after = strpart(rem_text, next_idx + 1) -+ -+ let s:tlist_removed_flist = text_before . text_after -+ endif -+endfunction -+ -+" Tlist_FileType_Init -+" Initialize the ctags arguments and tag variable for the specified -+" file type -+function! s:Tlist_FileType_Init(ftype) -+ call s:Tlist_Log_Msg('Tlist_FileType_Init (' . a:ftype . ')') -+ " If the user didn't specify any settings, then use the default -+ " ctags args. Otherwise, use the settings specified by the user -+ let var = 'g:tlist_' . a:ftype . '_settings' -+ if exists(var) -+ " User specified ctags arguments -+ let settings = {var} . ';' -+ else -+ " Default ctags arguments -+ let var = 's:tlist_def_' . a:ftype . '_settings' -+ if !exists(var) -+ " No default settings for this file type. This filetype is -+ " not supported -+ return 0 -+ endif -+ let settings = s:tlist_def_{a:ftype}_settings . ';' -+ endif -+ -+ let msg = 'Taglist: Invalid ctags option setting - ' . settings -+ -+ " Format of the option that specifies the filetype and ctags arugments: -+ " -+ " ;flag1:name1;flag2:name2;flag3:name3 -+ " -+ -+ " Extract the file type to pass to ctags. This may be different from the -+ " file type detected by Vim -+ let pos = stridx(settings, ';') -+ if pos == -1 -+ call s:Tlist_Warning_Msg(msg) -+ return 0 -+ endif -+ let ctags_ftype = strpart(settings, 0, pos) -+ if ctags_ftype == '' -+ call s:Tlist_Warning_Msg(msg) -+ return 0 -+ endif -+ " Make sure a valid filetype is supplied. If the user didn't specify a -+ " valid filetype, then the ctags option settings may be treated as the -+ " filetype -+ if ctags_ftype =~ ':' -+ call s:Tlist_Warning_Msg(msg) -+ return 0 -+ endif -+ -+ " Remove the file type from settings -+ let settings = strpart(settings, pos + 1) -+ if settings == '' -+ call s:Tlist_Warning_Msg(msg) -+ return 0 -+ endif -+ -+ " Process all the specified ctags flags. The format is -+ " flag1:name1;flag2:name2;flag3:name3 -+ let ctags_flags = '' -+ let cnt = 0 -+ while settings != '' -+ " Extract the flag -+ let pos = stridx(settings, ':') -+ if pos == -1 -+ call s:Tlist_Warning_Msg(msg) -+ return 0 -+ endif -+ let flag = strpart(settings, 0, pos) -+ if flag == '' -+ call s:Tlist_Warning_Msg(msg) -+ return 0 -+ endif -+ " Remove the flag from settings -+ let settings = strpart(settings, pos + 1) -+ -+ " Extract the tag type name -+ let pos = stridx(settings, ';') -+ if pos == -1 -+ call s:Tlist_Warning_Msg(msg) -+ return 0 -+ endif -+ let name = strpart(settings, 0, pos) -+ if name == '' -+ call s:Tlist_Warning_Msg(msg) -+ return 0 -+ endif -+ let settings = strpart(settings, pos + 1) -+ -+ let cnt = cnt + 1 -+ -+ let s:tlist_{a:ftype}_{cnt}_name = flag -+ let s:tlist_{a:ftype}_{cnt}_fullname = name -+ let ctags_flags = ctags_flags . flag -+ endwhile -+ -+ let s:tlist_{a:ftype}_ctags_args = '--language-force=' . ctags_ftype . -+ \ ' --' . ctags_ftype . '-types=' . ctags_flags -+ let s:tlist_{a:ftype}_count = cnt -+ let s:tlist_{a:ftype}_ctags_flags = ctags_flags -+ -+ " Save the filetype name -+ let s:tlist_ftype_{s:tlist_ftype_count}_name = a:ftype -+ let s:tlist_ftype_count = s:tlist_ftype_count + 1 -+ -+ return 1 -+endfunction -+ -+" Tlist_Get_Filetype -+" Determine the filetype for the specified file -+function! s:Tlist_Get_Filetype(fname) -+ " Ignore the filetype autocommands -+ let old_eventignore = &eventignore -+ set eventignore=FileType -+ -+ " Save the 'filetype', as this will be changed temporarily -+ let old_filetype = &filetype -+ -+ " Run the filetypedetect group of autocommands to determine -+ " the filetype -+ exe 'doautocmd filetypedetect BufRead ' . a:fname -+ -+ " Save the detected filetype -+ let ftype = &filetype -+ -+ " Restore the previous state -+ let &filetype = old_filetype -+ let &eventignore = old_eventignore -+ -+ return ftype -+endfunction -+ -+" Tlist_Get_Buffer_Filetype -+" Get the filetype for the specified buffer -+function! s:Tlist_Get_Buffer_Filetype(bnum) -+ if bufloaded(a:bnum) -+ " For loaded buffers, the 'filetype' is already determined -+ return getbufvar(a:bnum, '&filetype') -+ endif -+ -+ " For unloaded buffers, if the 'filetype' option is set, return it -+ let ftype = getbufvar(a:bnum, '&filetype') -+ if ftype != '' -+ return ftype -+ endif -+ -+ " Skip non-existent buffers -+ if !bufexists(a:bnum) -+ return '' -+ endif -+ -+ " For buffers whose filetype is not yet determined, try to determine -+ " the filetype -+ let bname = bufname(a:bnum) -+ -+ return s:Tlist_Get_Filetype(bname) -+endfunction -+ -+" Tlist_Discard_TagInfo -+" Discard the stored tag information for a file -+function! s:Tlist_Discard_TagInfo(fidx) -+ call s:Tlist_Log_Msg('Tlist_Discard_TagInfo (' . -+ \ s:tlist_{a:fidx}_filename . ')') -+ let ftype = s:tlist_{a:fidx}_filetype -+ -+ " Discard information about the tags defined in the file -+ let i = 1 -+ while i <= s:tlist_{a:fidx}_tag_count -+ let fidx_i = 's:tlist_' . a:fidx . '_' . i -+ unlet! {fidx_i}_tag -+ unlet! {fidx_i}_tag_name -+ unlet! {fidx_i}_tag_type -+ unlet! {fidx_i}_ttype_idx -+ unlet! {fidx_i}_tag_proto -+ unlet! {fidx_i}_tag_searchpat -+ unlet! {fidx_i}_tag_linenum -+ let i = i + 1 -+ endwhile -+ -+ let s:tlist_{a:fidx}_tag_count = 0 -+ -+ " Discard information about tag type groups -+ let i = 1 -+ while i <= s:tlist_{ftype}_count -+ let ttype = s:tlist_{ftype}_{i}_name -+ if s:tlist_{a:fidx}_{ttype} != '' -+ let fidx_ttype = 's:tlist_' . a:fidx . '_' . ttype -+ let {fidx_ttype} = '' -+ let {fidx_ttype}_offset = 0 -+ let cnt = {fidx_ttype}_count -+ let {fidx_ttype}_count = 0 -+ let j = 1 -+ while j <= cnt -+ unlet! {fidx_ttype}_{j} -+ let j = j + 1 -+ endwhile -+ endif -+ let i = i + 1 -+ endwhile -+ -+ " Discard the stored menu command also -+ let s:tlist_{a:fidx}_menu_cmd = '' -+endfunction -+ -+" Tlist_Window_Update_Line_Offsets -+" Update the line offsets for tags for files starting from start_idx -+" and displayed in the taglist window by the specified offset -+function! s:Tlist_Window_Update_Line_Offsets(start_idx, increment, offset) -+ let i = a:start_idx -+ -+ while i < s:tlist_file_count -+ if s:tlist_{i}_visible -+ " Update the start/end line number only if the file is visible -+ if a:increment -+ let s:tlist_{i}_start = s:tlist_{i}_start + a:offset -+ let s:tlist_{i}_end = s:tlist_{i}_end + a:offset -+ else -+ let s:tlist_{i}_start = s:tlist_{i}_start - a:offset -+ let s:tlist_{i}_end = s:tlist_{i}_end - a:offset -+ endif -+ endif -+ let i = i + 1 -+ endwhile -+endfunction -+ -+" Tlist_Discard_FileInfo -+" Discard the stored information for a file -+function! s:Tlist_Discard_FileInfo(fidx) -+ call s:Tlist_Log_Msg('Tlist_Discard_FileInfo (' . -+ \ s:tlist_{a:fidx}_filename . ')') -+ call s:Tlist_Discard_TagInfo(a:fidx) -+ -+ let ftype = s:tlist_{a:fidx}_filetype -+ -+ let i = 1 -+ while i <= s:tlist_{ftype}_count -+ let ttype = s:tlist_{ftype}_{i}_name -+ unlet! s:tlist_{a:fidx}_{ttype} -+ unlet! s:tlist_{a:fidx}_{ttype}_offset -+ unlet! s:tlist_{a:fidx}_{ttype}_count -+ let i = i + 1 -+ endwhile -+ -+ unlet! s:tlist_{a:fidx}_filename -+ unlet! s:tlist_{a:fidx}_sort_type -+ unlet! s:tlist_{a:fidx}_filetype -+ unlet! s:tlist_{a:fidx}_mtime -+ unlet! s:tlist_{a:fidx}_start -+ unlet! s:tlist_{a:fidx}_end -+ unlet! s:tlist_{a:fidx}_valid -+ unlet! s:tlist_{a:fidx}_visible -+ unlet! s:tlist_{a:fidx}_tag_count -+ unlet! s:tlist_{a:fidx}_menu_cmd -+endfunction -+ -+" Tlist_Window_Remove_File_From_Display -+" Remove the specified file from display -+function! s:Tlist_Window_Remove_File_From_Display(fidx) -+ call s:Tlist_Log_Msg('Tlist_Window_Remove_File_From_Display (' . -+ \ s:tlist_{a:fidx}_filename . ')') -+ " If the file is not visible then no need to remove it -+ if !s:tlist_{a:fidx}_visible -+ return -+ endif -+ -+ " Remove the tags displayed for the specified file from the window -+ let start = s:tlist_{a:fidx}_start -+ " Include the empty line after the last line also -+ if g:Tlist_Compact_Format -+ let end = s:tlist_{a:fidx}_end -+ else -+ let end = s:tlist_{a:fidx}_end + 1 -+ endif -+ -+ setlocal modifiable -+ exe 'silent! ' . start . ',' . end . 'delete _' -+ setlocal nomodifiable -+ -+ " Correct the start and end line offsets for all the files following -+ " this file, as the tags for this file are removed -+ call s:Tlist_Window_Update_Line_Offsets(a:fidx + 1, 0, end - start + 1) -+endfunction -+ -+" Tlist_Remove_File -+" Remove the file under the cursor or the specified file index -+" user_request - User requested to remove the file from taglist -+function! s:Tlist_Remove_File(file_idx, user_request) -+ let fidx = a:file_idx -+ -+ if fidx == -1 -+ let fidx = s:Tlist_Window_Get_File_Index_By_Linenum(line('.')) -+ if fidx == -1 -+ return -+ endif -+ endif -+ call s:Tlist_Log_Msg('Tlist_Remove_File (' . -+ \ s:tlist_{fidx}_filename . ', ' . a:user_request . ')') -+ -+ let save_winnr = winnr() -+ let winnum = bufwinnr(g:TagList_title) -+ if winnum != -1 -+ " Taglist window is open, remove the file from display -+ -+ if save_winnr != winnum -+ let old_eventignore = &eventignore -+ set eventignore=all -+ exe winnum . 'wincmd w' -+ endif -+ -+ call s:Tlist_Window_Remove_File_From_Display(fidx) -+ -+ if save_winnr != winnum -+ exe save_winnr . 'wincmd w' -+ let &eventignore = old_eventignore -+ endif -+ endif -+ -+ let fname = s:tlist_{fidx}_filename -+ -+ if a:user_request -+ " As the user requested to remove the file from taglist, -+ " add it to the removed list -+ call s:Tlist_Update_Remove_List(fname, 1) -+ endif -+ -+ " Remove the file name from the taglist list of filenames -+ let idx = stridx(s:tlist_file_names, fname . "\n") -+ let text_before = strpart(s:tlist_file_names, 0, idx) -+ let rem_text = strpart(s:tlist_file_names, idx) -+ let next_idx = stridx(rem_text, "\n") -+ let text_after = strpart(rem_text, next_idx + 1) -+ let s:tlist_file_names = text_before . text_after -+ -+ call s:Tlist_Discard_FileInfo(fidx) -+ -+ " Shift all the file variables by one index -+ let i = fidx + 1 -+ -+ while i < s:tlist_file_count -+ let j = i - 1 -+ -+ let s:tlist_{j}_filename = s:tlist_{i}_filename -+ let s:tlist_{j}_sort_type = s:tlist_{i}_sort_type -+ let s:tlist_{j}_filetype = s:tlist_{i}_filetype -+ let s:tlist_{j}_mtime = s:tlist_{i}_mtime -+ let s:tlist_{j}_start = s:tlist_{i}_start -+ let s:tlist_{j}_end = s:tlist_{i}_end -+ let s:tlist_{j}_valid = s:tlist_{i}_valid -+ let s:tlist_{j}_visible = s:tlist_{i}_visible -+ let s:tlist_{j}_tag_count = s:tlist_{i}_tag_count -+ let s:tlist_{j}_menu_cmd = s:tlist_{i}_menu_cmd -+ -+ let k = 1 -+ while k <= s:tlist_{j}_tag_count -+ let s:tlist_{j}_{k}_tag = s:tlist_{i}_{k}_tag -+ let s:tlist_{j}_{k}_tag_name = s:tlist_{i}_{k}_tag_name -+ let s:tlist_{j}_{k}_tag_type = s:Tlist_Get_Tag_Type_By_Tag(i, k) -+ let s:tlist_{j}_{k}_ttype_idx = s:tlist_{i}_{k}_ttype_idx -+ let s:tlist_{j}_{k}_tag_proto = s:Tlist_Get_Tag_Prototype(i, k) -+ let s:tlist_{j}_{k}_tag_searchpat = s:Tlist_Get_Tag_SearchPat(i, k) -+ let s:tlist_{j}_{k}_tag_linenum = s:Tlist_Get_Tag_Linenum(i, k) -+ let k = k + 1 -+ endwhile -+ -+ let ftype = s:tlist_{i}_filetype -+ -+ let k = 1 -+ while k <= s:tlist_{ftype}_count -+ let ttype = s:tlist_{ftype}_{k}_name -+ let s:tlist_{j}_{ttype} = s:tlist_{i}_{ttype} -+ let s:tlist_{j}_{ttype}_offset = s:tlist_{i}_{ttype}_offset -+ let s:tlist_{j}_{ttype}_count = s:tlist_{i}_{ttype}_count -+ if s:tlist_{j}_{ttype} != '' -+ let l = 1 -+ while l <= s:tlist_{j}_{ttype}_count -+ let s:tlist_{j}_{ttype}_{l} = s:tlist_{i}_{ttype}_{l} -+ let l = l + 1 -+ endwhile -+ endif -+ let k = k + 1 -+ endwhile -+ -+ " As the file and tag information is copied to the new index, -+ " discard the previous information -+ call s:Tlist_Discard_FileInfo(i) -+ -+ let i = i + 1 -+ endwhile -+ -+ " Reduce the number of files displayed -+ let s:tlist_file_count = s:tlist_file_count - 1 -+ -+ if g:Tlist_Show_One_File -+ " If the tags for only one file is displayed and if we just -+ " now removed that file, then invalidate the current file idx -+ if s:tlist_cur_file_idx == fidx -+ let s:tlist_cur_file_idx = -1 -+ endif -+ endif -+endfunction -+ -+" Tlist_Window_Goto_Window -+" Goto the taglist window -+function! s:Tlist_Window_Goto_Window() -+ let winnum = bufwinnr(g:TagList_title) -+ if winnum != -1 -+ if winnr() != winnum -+ call s:Tlist_Exe_Cmd_No_Acmds(winnum . 'wincmd w') -+ endif -+ endif -+endfunction -+ -+" Tlist_Window_Create -+" Create a new taglist window. If it is already open, jump to it -+function! s:Tlist_Window_Create() -+ call s:Tlist_Log_Msg('Tlist_Window_Create()') -+ " If the window is open, jump to it -+ let winnum = bufwinnr(g:TagList_title) -+ if winnum != -1 -+ " Jump to the existing window -+ if winnr() != winnum -+ exe winnum . 'wincmd w' -+ endif -+ return -+ endif -+ -+ " If used with winmanager don't open windows. Winmanager will handle -+ " the window/buffer management -+ if s:tlist_app_name == "winmanager" -+ return -+ endif -+ -+ " Create a new window. If user prefers a horizontal window, then open -+ " a horizontally split window. Otherwise open a vertically split -+ " window -+ if g:Tlist_Use_Horiz_Window -+ " Open a horizontally split window -+ let win_dir = 'botright' -+ " Horizontal window height -+ let win_size = g:Tlist_WinHeight -+ else -+ if s:tlist_winsize_chgd == -1 -+ " Open a vertically split window. Increase the window size, if -+ " needed, to accomodate the new window -+ if g:Tlist_Inc_Winwidth && -+ \ &columns < (80 + g:Tlist_WinWidth) -+ " Save the original window position -+ let s:tlist_pre_winx = getwinposx() -+ let s:tlist_pre_winy = getwinposy() -+ -+ " one extra column is needed to include the vertical split -+ let &columns= &columns + g:Tlist_WinWidth + 1 -+ -+ let s:tlist_winsize_chgd = 1 -+ else -+ let s:tlist_winsize_chgd = 0 -+ endif -+ endif -+ -+ if g:Tlist_Use_Right_Window -+ " Open the window at the rightmost place -+ let win_dir = 'botright vertical' -+ else -+ " Open the window at the leftmost place -+ let win_dir = 'topleft vertical' -+ endif -+ let win_size = g:Tlist_WinWidth -+ endif -+ -+ " If the tag listing temporary buffer already exists, then reuse it. -+ " Otherwise create a new buffer -+ let bufnum = bufnr(g:TagList_title) -+ if bufnum == -1 -+ " Create a new buffer -+ let wcmd = g:TagList_title -+ else -+ " Edit the existing buffer -+ let wcmd = '+buffer' . bufnum -+ endif -+ -+ " Create the taglist window -+ exe 'silent! ' . win_dir . ' ' . win_size . 'split ' . wcmd -+ -+ " Save the new window position -+ let s:tlist_winx = getwinposx() -+ let s:tlist_winy = getwinposy() -+ -+ " Initialize the taglist window -+ call s:Tlist_Window_Init() -+endfunction -+ -+" Tlist_Window_Zoom -+" Zoom (maximize/minimize) the taglist window -+function! s:Tlist_Window_Zoom() -+ if s:tlist_win_maximized -+ " Restore the window back to the previous size -+ if g:Tlist_Use_Horiz_Window -+ exe 'resize ' . g:Tlist_WinHeight -+ else -+ exe 'vert resize ' . g:Tlist_WinWidth -+ endif -+ let s:tlist_win_maximized = 0 -+ else -+ " Set the window size to the maximum possible without closing other -+ " windows -+ if g:Tlist_Use_Horiz_Window -+ resize -+ else -+ vert resize -+ endif -+ let s:tlist_win_maximized = 1 -+ endif -+endfunction -+ -+" Tlist_Ballon_Expr -+" When the mouse cursor is over a tag in the taglist window, display the -+" tag prototype (balloon) -+function! Tlist_Ballon_Expr() -+ " Get the file index -+ let fidx = s:Tlist_Window_Get_File_Index_By_Linenum(v:beval_lnum) -+ if fidx == -1 -+ return '' -+ endif -+ -+ " Get the tag output line for the current tag -+ let tidx = s:Tlist_Window_Get_Tag_Index(fidx, v:beval_lnum) -+ if tidx == 0 -+ return '' -+ endif -+ -+ " Get the tag search pattern and display it -+ return s:Tlist_Get_Tag_Prototype(fidx, tidx) -+endfunction -+ -+" Tlist_Window_Check_Width -+" Check the width of the taglist window. For horizontally split windows, the -+" 'winfixheight' option is used to fix the height of the window. For -+" vertically split windows, Vim doesn't support the 'winfixwidth' option. So -+" need to handle window width changes from this function. -+function! s:Tlist_Window_Check_Width() -+ let tlist_winnr = bufwinnr(g:TagList_title) -+ if tlist_winnr == -1 -+ return -+ endif -+ -+ let width = winwidth(tlist_winnr) -+ if width != g:Tlist_WinWidth -+ call s:Tlist_Log_Msg("Tlist_Window_Check_Width: Changing window " . -+ \ "width from " . width . " to " . g:Tlist_WinWidth) -+ let save_winnr = winnr() -+ if save_winnr != tlist_winnr -+ call s:Tlist_Exe_Cmd_No_Acmds(tlist_winnr . 'wincmd w') -+ endif -+ exe 'vert resize ' . g:Tlist_WinWidth -+ if save_winnr != tlist_winnr -+ call s:Tlist_Exe_Cmd_No_Acmds('wincmd p') -+ endif -+ endif -+endfunction -+ -+" Tlist_Window_Exit_Only_Window -+" If the 'Tlist_Exit_OnlyWindow' option is set, then exit Vim if only the -+" taglist window is present. -+function! s:Tlist_Window_Exit_Only_Window() -+ " Before quitting Vim, delete the taglist buffer so that -+ " the '0 mark is correctly set to the previous buffer. -+ if v:version < 700 -+ if winbufnr(2) == -1 -+ bdelete -+ quit -+ endif -+ else -+ if winbufnr(2) == -1 -+ if tabpagenr('$') == 1 -+ " Only one tag page is present -+ bdelete -+ quit -+ else -+ " More than one tab page is present. Close only the current -+ " tab page -+ close -+ endif -+ endif -+ endif -+endfunction -+ -+" Tlist_Window_Init -+" Set the default options for the taglist window -+function! s:Tlist_Window_Init() -+ call s:Tlist_Log_Msg('Tlist_Window_Init()') -+ -+ " The 'readonly' option should not be set for the taglist buffer. -+ " If Vim is started as "view/gview" or if the ":view" command is -+ " used, then the 'readonly' option is set for all the buffers. -+ " Unset it for the taglist buffer -+ setlocal noreadonly -+ -+ " Set the taglist buffer filetype to taglist -+ setlocal filetype=taglist -+ -+ " Define taglist window element highlighting -+ syntax match TagListComment '^" .*' -+ syntax match TagListFileName '^[^" ].*$' -+ syntax match TagListTitle '^ \S.*$' -+ syntax match TagListTagScope '\s\[.\{-\}\]$' -+ -+ " Define the highlighting only if colors are supported -+ if has('gui_running') || &t_Co > 2 -+ " Colors to highlight various taglist window elements -+ " If user defined highlighting group exists, then use them. -+ " Otherwise, use default highlight groups. -+ if hlexists('MyTagListTagName') -+ highlight link TagListTagName MyTagListTagName -+ else -+ highlight default link TagListTagName Search -+ endif -+ " Colors to highlight comments and titles -+ if hlexists('MyTagListComment') -+ highlight link TagListComment MyTagListComment -+ else -+ highlight clear TagListComment -+ highlight default link TagListComment Comment -+ endif -+ if hlexists('MyTagListTitle') -+ highlight link TagListTitle MyTagListTitle -+ else -+ highlight clear TagListTitle -+ highlight default link TagListTitle Title -+ endif -+ if hlexists('MyTagListFileName') -+ highlight link TagListFileName MyTagListFileName -+ else -+ highlight clear TagListFileName -+ highlight default TagListFileName guibg=Grey ctermbg=darkgray -+ \ guifg=white ctermfg=white -+ endif -+ if hlexists('MyTagListTagScope') -+ highlight link TagListTagScope MyTagListTagScope -+ else -+ highlight clear TagListTagScope -+ highlight default link TagListTagScope Identifier -+ endif -+ else -+ highlight default TagListTagName term=reverse cterm=reverse -+ endif -+ -+ " Folding related settings -+ setlocal foldenable -+ setlocal foldminlines=0 -+ setlocal foldmethod=manual -+ setlocal foldlevel=9999 -+ if g:Tlist_Enable_Fold_Column -+ setlocal foldcolumn=3 -+ else -+ setlocal foldcolumn=0 -+ endif -+ setlocal foldtext=v:folddashes.getline(v:foldstart) -+ -+ if s:tlist_app_name != "winmanager" -+ " Mark buffer as scratch -+ silent! setlocal buftype=nofile -+ if s:tlist_app_name == "none" -+ silent! setlocal bufhidden=delete -+ endif -+ silent! setlocal noswapfile -+ " Due to a bug in Vim 6.0, the winbufnr() function fails for unlisted -+ " buffers. So if the taglist buffer is unlisted, multiple taglist -+ " windows will be opened. This bug is fixed in Vim 6.1 and above -+ if v:version >= 601 -+ silent! setlocal nobuflisted -+ endif -+ endif -+ -+ silent! setlocal nowrap -+ -+ " If the 'number' option is set in the source window, it will affect the -+ " taglist window. So forcefully disable 'number' option for the taglist -+ " window -+ silent! setlocal nonumber -+ -+ " Use fixed height when horizontally split window is used -+ if g:Tlist_Use_Horiz_Window -+ if v:version >= 602 -+ set winfixheight -+ endif -+ endif -+ if !g:Tlist_Use_Horiz_Window && v:version >= 700 -+ set winfixwidth -+ endif -+ -+ " Setup balloon evaluation to display tag prototype -+ if v:version >= 700 && has('balloon_eval') -+ setlocal balloonexpr=Tlist_Ballon_Expr() -+ set ballooneval -+ endif -+ -+ " Setup the cpoptions properly for the maps to work -+ let old_cpoptions = &cpoptions -+ set cpoptions&vim -+ -+ " Create buffer local mappings for jumping to the tags and sorting the list -+ nnoremap -+ \ :call Tlist_Window_Jump_To_Tag('useopen') -+ nnoremap o -+ \ :call Tlist_Window_Jump_To_Tag('newwin') -+ nnoremap p -+ \ :call Tlist_Window_Jump_To_Tag('preview') -+ nnoremap P -+ \ :call Tlist_Window_Jump_To_Tag('prevwin') -+ if v:version >= 700 -+ nnoremap t -+ \ :call Tlist_Window_Jump_To_Tag('checktab') -+ nnoremap -+ \ :call Tlist_Window_Jump_To_Tag('newtab') -+ endif -+ nnoremap <2-LeftMouse> -+ \ :call Tlist_Window_Jump_To_Tag('useopen') -+ nnoremap s -+ \ :call Tlist_Change_Sort('cmd', 'toggle', '') -+ nnoremap + :silent! foldopen -+ nnoremap - :silent! foldclose -+ nnoremap * :silent! %foldopen! -+ nnoremap = :silent! %foldclose -+ nnoremap :silent! foldopen -+ nnoremap :silent! foldclose -+ nnoremap :silent! %foldopen! -+ nnoremap :call Tlist_Window_Show_Info() -+ nnoremap u :call Tlist_Window_Update_File() -+ nnoremap d :call Tlist_Remove_File(-1, 1) -+ nnoremap x :call Tlist_Window_Zoom() -+ nnoremap [[ :call Tlist_Window_Move_To_File(-1) -+ nnoremap :call Tlist_Window_Move_To_File(-1) -+ nnoremap ]] :call Tlist_Window_Move_To_File(1) -+ nnoremap :call Tlist_Window_Move_To_File(1) -+ nnoremap :call Tlist_Window_Toggle_Help_Text() -+ nnoremap q :close -+ -+ " Insert mode mappings -+ inoremap -+ \ :call Tlist_Window_Jump_To_Tag('useopen') -+ " Windows needs return -+ inoremap -+ \ :call Tlist_Window_Jump_To_Tag('useopen') -+ inoremap o -+ \ :call Tlist_Window_Jump_To_Tag('newwin') -+ inoremap p -+ \ :call Tlist_Window_Jump_To_Tag('preview') -+ inoremap P -+ \ :call Tlist_Window_Jump_To_Tag('prevwin') -+ if v:version >= 700 -+ inoremap t -+ \ :call Tlist_Window_Jump_To_Tag('checktab') -+ inoremap -+ \ :call Tlist_Window_Jump_To_Tag('newtab') -+ endif -+ inoremap <2-LeftMouse> -+ \ :call Tlist_Window_Jump_To_Tag('useopen') -+ inoremap s -+ \ :call Tlist_Change_Sort('cmd', 'toggle', '') -+ inoremap + :silent! foldopen -+ inoremap - :silent! foldclose -+ inoremap * :silent! %foldopen! -+ inoremap = :silent! %foldclose -+ inoremap :silent! foldopen -+ inoremap :silent! foldclose -+ inoremap :silent! %foldopen! -+ inoremap :call -+ \ Tlist_Window_Show_Info() -+ inoremap u -+ \ :call Tlist_Window_Update_File() -+ inoremap d :call Tlist_Remove_File(-1, 1) -+ inoremap x :call Tlist_Window_Zoom() -+ inoremap [[ :call Tlist_Window_Move_To_File(-1) -+ inoremap :call Tlist_Window_Move_To_File(-1) -+ inoremap ]] :call Tlist_Window_Move_To_File(1) -+ inoremap :call Tlist_Window_Move_To_File(1) -+ inoremap :call Tlist_Window_Toggle_Help_Text() -+ inoremap q :close -+ -+ " Map single left mouse click if the user wants this functionality -+ if g:Tlist_Use_SingleClick == 1 -+ " Contributed by Bindu Wavell -+ " attempt to perform single click mapping, it would be much -+ " nicer if we could nnoremap ... however vim does -+ " not fire the when you use the mouse -+ " to enter a buffer. -+ let clickmap = ':if bufname("%") =~ "__Tag_List__" ' . -+ \ 'call Tlist_Window_Jump_To_Tag("useopen") ' . -+ \ ' endif ' -+ if maparg('', 'n') == '' -+ " no mapping for leftmouse -+ exe ':nnoremap ' . clickmap -+ else -+ " we have a mapping -+ let mapcmd = ':nnoremap ' -+ let mapcmd = mapcmd . substitute(substitute( -+ \ maparg('', 'n'), '|', '', 'g'), -+ \ '\c^', '', '') -+ let mapcmd = mapcmd . clickmap -+ exe mapcmd -+ endif -+ endif -+ -+ " Define the taglist autocommands -+ augroup TagListAutoCmds -+ autocmd! -+ " Display the tag prototype for the tag under the cursor. -+ autocmd CursorHold __Tag_List__ call s:Tlist_Window_Show_Info() -+ " Highlight the current tag periodically -+ autocmd CursorHold * silent call s:Tlist_Window_Highlight_Tag( -+ \ fnamemodify(bufname('%'), ':p'), line('.'), 1, 0) -+ -+ " Adjust the Vim window width when taglist window is closed -+ autocmd BufUnload __Tag_List__ call s:Tlist_Post_Close_Cleanup() -+ " Close the fold for this buffer when leaving the buffer -+ if g:Tlist_File_Fold_Auto_Close -+ autocmd BufEnter * silent -+ \ call s:Tlist_Window_Open_File_Fold(expand('')) -+ endif -+ " Exit Vim itself if only the taglist window is present (optional) -+ if g:Tlist_Exit_OnlyWindow -+ autocmd BufEnter __Tag_List__ nested -+ \ call s:Tlist_Window_Exit_Only_Window() -+ endif -+ if s:tlist_app_name != "winmanager" && -+ \ !g:Tlist_Process_File_Always && -+ \ (!has('gui_running') || !g:Tlist_Show_Menu) -+ " Auto refresh the taglist window -+ autocmd BufEnter * call s:Tlist_Refresh() -+ endif -+ -+ if !g:Tlist_Use_Horiz_Window -+ if v:version < 700 -+ autocmd WinEnter * call s:Tlist_Window_Check_Width() -+ endif -+ endif -+ augroup end -+ -+ " Restore the previous cpoptions settings -+ let &cpoptions = old_cpoptions -+endfunction -+ -+" Tlist_Window_Refresh -+" Display the tags for all the files in the taglist window -+function! s:Tlist_Window_Refresh() -+ call s:Tlist_Log_Msg('Tlist_Window_Refresh()') -+ " Set report option to a huge value to prevent informational messages -+ " while deleting the lines -+ let old_report = &report -+ set report=99999 -+ -+ " Mark the buffer as modifiable -+ setlocal modifiable -+ -+ " Delete the contents of the buffer to the black-hole register -+ silent! %delete _ -+ -+ " As we have cleared the taglist window, mark all the files -+ " as not visible -+ let i = 0 -+ while i < s:tlist_file_count -+ let s:tlist_{i}_visible = 0 -+ let i = i + 1 -+ endwhile -+ -+ if g:Tlist_Compact_Format == 0 -+ " Display help in non-compact mode -+ call s:Tlist_Window_Display_Help() -+ endif -+ -+ " Mark the buffer as not modifiable -+ setlocal nomodifiable -+ -+ " Restore the report option -+ let &report = old_report -+ -+ " If the tags for only one file should be displayed in the taglist -+ " window, then no need to add the tags here. The bufenter autocommand -+ " will add the tags for that file. -+ if g:Tlist_Show_One_File -+ return -+ endif -+ -+ " List all the tags for the previously processed files -+ " Do this only if taglist is configured to display tags for more than -+ " one file. Otherwise, when Tlist_Show_One_File is configured, -+ " tags for the wrong file will be displayed. -+ let i = 0 -+ while i < s:tlist_file_count -+ call s:Tlist_Window_Refresh_File(s:tlist_{i}_filename, -+ \ s:tlist_{i}_filetype) -+ let i = i + 1 -+ endwhile -+ -+ if g:Tlist_Auto_Update -+ " Add and list the tags for all buffers in the Vim buffer list -+ let i = 1 -+ let last_bufnum = bufnr('$') -+ while i <= last_bufnum -+ if buflisted(i) -+ let fname = fnamemodify(bufname(i), ':p') -+ let ftype = s:Tlist_Get_Buffer_Filetype(i) -+ " If the file doesn't support tag listing, skip it -+ if !s:Tlist_Skip_File(fname, ftype) -+ call s:Tlist_Window_Refresh_File(fname, ftype) -+ endif -+ endif -+ let i = i + 1 -+ endwhile -+ endif -+ -+ " If Tlist_File_Fold_Auto_Close option is set, then close all the folds -+ if g:Tlist_File_Fold_Auto_Close -+ " Close all the folds -+ silent! %foldclose -+ endif -+ -+ " Move the cursor to the top of the taglist window -+ normal! gg -+endfunction -+ -+" Tlist_Post_Close_Cleanup() -+" Close the taglist window and adjust the Vim window width -+function! s:Tlist_Post_Close_Cleanup() -+ call s:Tlist_Log_Msg('Tlist_Post_Close_Cleanup()') -+ " Mark all the files as not visible -+ let i = 0 -+ while i < s:tlist_file_count -+ let s:tlist_{i}_visible = 0 -+ let i = i + 1 -+ endwhile -+ -+ " Remove the taglist autocommands -+ silent! autocmd! TagListAutoCmds -+ -+ " Clear all the highlights -+ match none -+ -+ silent! syntax clear TagListTitle -+ silent! syntax clear TagListComment -+ silent! syntax clear TagListTagScope -+ -+ " Remove the left mouse click mapping if it was setup initially -+ if g:Tlist_Use_SingleClick -+ if hasmapto('') -+ nunmap -+ endif -+ endif -+ -+ if s:tlist_app_name != "winmanager" -+ if g:Tlist_Use_Horiz_Window || g:Tlist_Inc_Winwidth == 0 || -+ \ s:tlist_winsize_chgd != 1 || -+ \ &columns < (80 + g:Tlist_WinWidth) -+ " No need to adjust window width if using horizontally split taglist -+ " window or if columns is less than 101 or if the user chose not to -+ " adjust the window width -+ else -+ " If the user didn't manually move the window, then restore the window -+ " position to the pre-taglist position -+ if s:tlist_pre_winx != -1 && s:tlist_pre_winy != -1 && -+ \ getwinposx() == s:tlist_winx && -+ \ getwinposy() == s:tlist_winy -+ exe 'winpos ' . s:tlist_pre_winx . ' ' . s:tlist_pre_winy -+ endif -+ -+ " Adjust the Vim window width -+ let &columns= &columns - (g:Tlist_WinWidth + 1) -+ endif -+ endif -+ -+ let s:tlist_winsize_chgd = -1 -+ -+ " Reset taglist state variables -+ if s:tlist_app_name == "winmanager" -+ let s:tlist_app_name = "none" -+ endif -+ let s:tlist_window_initialized = 0 -+endfunction -+ -+" Tlist_Window_Refresh_File() -+" List the tags defined in the specified file in a Vim window -+function! s:Tlist_Window_Refresh_File(filename, ftype) -+ call s:Tlist_Log_Msg('Tlist_Window_Refresh_File (' . a:filename . ')') -+ " First check whether the file already exists -+ let fidx = s:Tlist_Get_File_Index(a:filename) -+ if fidx != -1 -+ let file_listed = 1 -+ else -+ let file_listed = 0 -+ endif -+ -+ if !file_listed -+ " Check whether this file is removed based on user request -+ " If it is, then don't display the tags for this file -+ if s:Tlist_User_Removed_File(a:filename) -+ return -+ endif -+ endif -+ -+ if file_listed && s:tlist_{fidx}_visible -+ " Check whether the file tags are currently valid -+ if s:tlist_{fidx}_valid -+ " Goto the first line in the file -+ exe s:tlist_{fidx}_start -+ -+ " If the line is inside a fold, open the fold -+ if foldclosed('.') != -1 -+ exe "silent! " . s:tlist_{fidx}_start . "," . -+ \ s:tlist_{fidx}_end . "foldopen!" -+ endif -+ return -+ endif -+ -+ " Discard and remove the tags for this file from display -+ call s:Tlist_Discard_TagInfo(fidx) -+ call s:Tlist_Window_Remove_File_From_Display(fidx) -+ endif -+ -+ " Process and generate a list of tags defined in the file -+ if !file_listed || !s:tlist_{fidx}_valid -+ let ret_fidx = s:Tlist_Process_File(a:filename, a:ftype) -+ if ret_fidx == -1 -+ return -+ endif -+ let fidx = ret_fidx -+ endif -+ -+ " Set report option to a huge value to prevent informational messages -+ " while adding lines to the taglist window -+ let old_report = &report -+ set report=99999 -+ -+ if g:Tlist_Show_One_File -+ " Remove the previous file -+ if s:tlist_cur_file_idx != -1 -+ call s:Tlist_Window_Remove_File_From_Display(s:tlist_cur_file_idx) -+ let s:tlist_{s:tlist_cur_file_idx}_visible = 0 -+ let s:tlist_{s:tlist_cur_file_idx}_start = 0 -+ let s:tlist_{s:tlist_cur_file_idx}_end = 0 -+ endif -+ let s:tlist_cur_file_idx = fidx -+ endif -+ -+ " Mark the buffer as modifiable -+ setlocal modifiable -+ -+ " Add new files to the end of the window. For existing files, add them at -+ " the same line where they were previously present. If the file is not -+ " visible, then add it at the end -+ if s:tlist_{fidx}_start == 0 || !s:tlist_{fidx}_visible -+ if g:Tlist_Compact_Format -+ let s:tlist_{fidx}_start = line('$') -+ else -+ let s:tlist_{fidx}_start = line('$') + 1 -+ endif -+ endif -+ -+ let s:tlist_{fidx}_visible = 1 -+ -+ " Goto the line where this file should be placed -+ if g:Tlist_Compact_Format -+ exe s:tlist_{fidx}_start -+ else -+ exe s:tlist_{fidx}_start - 1 -+ endif -+ -+ let txt = fnamemodify(s:tlist_{fidx}_filename, ':t') . ' (' . -+ \ fnamemodify(s:tlist_{fidx}_filename, ':p:h') . ')' -+ if g:Tlist_Compact_Format == 0 -+ silent! put =txt -+ else -+ silent! put! =txt -+ " Move to the next line -+ exe line('.') + 1 -+ endif -+ let file_start = s:tlist_{fidx}_start -+ -+ " Add the tag names grouped by tag type to the buffer with a title -+ let i = 1 -+ let ttype_cnt = s:tlist_{a:ftype}_count -+ while i <= ttype_cnt -+ let ttype = s:tlist_{a:ftype}_{i}_name -+ " Add the tag type only if there are tags for that type -+ let fidx_ttype = 's:tlist_' . fidx . '_' . ttype -+ let ttype_txt = {fidx_ttype} -+ if ttype_txt != '' -+ let txt = ' ' . s:tlist_{a:ftype}_{i}_fullname -+ if g:Tlist_Compact_Format == 0 -+ let ttype_start_lnum = line('.') + 1 -+ silent! put =txt -+ else -+ let ttype_start_lnum = line('.') -+ silent! put! =txt -+ endif -+ silent! put =ttype_txt -+ -+ let {fidx_ttype}_offset = ttype_start_lnum - file_start -+ -+ " create a fold for this tag type -+ let fold_start = ttype_start_lnum -+ let fold_end = fold_start + {fidx_ttype}_count -+ exe fold_start . ',' . fold_end . 'fold' -+ -+ " Adjust the cursor position -+ if g:Tlist_Compact_Format == 0 -+ exe ttype_start_lnum + {fidx_ttype}_count -+ else -+ exe ttype_start_lnum + {fidx_ttype}_count + 1 -+ endif -+ -+ if g:Tlist_Compact_Format == 0 -+ " Separate the tag types by a empty line -+ silent! put ='' -+ endif -+ endif -+ let i = i + 1 -+ endwhile -+ -+ if s:tlist_{fidx}_tag_count == 0 -+ if g:Tlist_Compact_Format == 0 -+ silent! put ='' -+ endif -+ endif -+ -+ let s:tlist_{fidx}_end = line('.') - 1 -+ -+ " Create a fold for the entire file -+ exe s:tlist_{fidx}_start . ',' . s:tlist_{fidx}_end . 'fold' -+ exe 'silent! ' . s:tlist_{fidx}_start . ',' . -+ \ s:tlist_{fidx}_end . 'foldopen!' -+ -+ " Goto the starting line for this file, -+ exe s:tlist_{fidx}_start -+ -+ if s:tlist_app_name == "winmanager" -+ " To handle a bug in the winmanager plugin, add a space at the -+ " last line -+ call setline('$', ' ') -+ endif -+ -+ " Mark the buffer as not modifiable -+ setlocal nomodifiable -+ -+ " Restore the report option -+ let &report = old_report -+ -+ " Update the start and end line numbers for all the files following this -+ " file -+ let start = s:tlist_{fidx}_start -+ " include the empty line after the last line -+ if g:Tlist_Compact_Format -+ let end = s:tlist_{fidx}_end -+ else -+ let end = s:tlist_{fidx}_end + 1 -+ endif -+ call s:Tlist_Window_Update_Line_Offsets(fidx + 1, 1, end - start + 1) -+ -+ " Now that we have updated the taglist window, update the tags -+ " menu (if present) -+ if g:Tlist_Show_Menu -+ call s:Tlist_Menu_Update_File(1) -+ endif -+endfunction -+ -+" Tlist_Init_File -+" Initialize the variables for a new file -+function! s:Tlist_Init_File(filename, ftype) -+ call s:Tlist_Log_Msg('Tlist_Init_File (' . a:filename . ')') -+ " Add new files at the end of the list -+ let fidx = s:tlist_file_count -+ let s:tlist_file_count = s:tlist_file_count + 1 -+ " Add the new file name to the taglist list of file names -+ let s:tlist_file_names = s:tlist_file_names . a:filename . "\n" -+ -+ " Initialize the file variables -+ let s:tlist_{fidx}_filename = a:filename -+ let s:tlist_{fidx}_sort_type = g:Tlist_Sort_Type -+ let s:tlist_{fidx}_filetype = a:ftype -+ let s:tlist_{fidx}_mtime = -1 -+ let s:tlist_{fidx}_start = 0 -+ let s:tlist_{fidx}_end = 0 -+ let s:tlist_{fidx}_valid = 0 -+ let s:tlist_{fidx}_visible = 0 -+ let s:tlist_{fidx}_tag_count = 0 -+ let s:tlist_{fidx}_menu_cmd = '' -+ -+ " Initialize the tag type variables -+ let i = 1 -+ while i <= s:tlist_{a:ftype}_count -+ let ttype = s:tlist_{a:ftype}_{i}_name -+ let s:tlist_{fidx}_{ttype} = '' -+ let s:tlist_{fidx}_{ttype}_offset = 0 -+ let s:tlist_{fidx}_{ttype}_count = 0 -+ let i = i + 1 -+ endwhile -+ -+ return fidx -+endfunction -+ -+" Tlist_Get_Tag_Type_By_Tag -+" Return the tag type for the specified tag index -+function! s:Tlist_Get_Tag_Type_By_Tag(fidx, tidx) -+ let ttype_var = 's:tlist_' . a:fidx . '_' . a:tidx . '_tag_type' -+ -+ " Already parsed and have the tag name -+ if exists(ttype_var) -+ return {ttype_var} -+ endif -+ -+ let tag_line = s:tlist_{a:fidx}_{a:tidx}_tag -+ let {ttype_var} = s:Tlist_Extract_Tagtype(tag_line) -+ -+ return {ttype_var} -+endfunction -+ -+" Tlist_Get_Tag_Prototype -+function! s:Tlist_Get_Tag_Prototype(fidx, tidx) -+ let tproto_var = 's:tlist_' . a:fidx . '_' . a:tidx . '_tag_proto' -+ -+ " Already parsed and have the tag prototype -+ if exists(tproto_var) -+ return {tproto_var} -+ endif -+ -+ " Parse and extract the tag prototype -+ let tag_line = s:tlist_{a:fidx}_{a:tidx}_tag -+ let start = stridx(tag_line, '/^') + 2 -+ let end = stridx(tag_line, '/;"' . "\t") -+ if tag_line[end - 1] == '$' -+ let end = end -1 -+ endif -+ let tag_proto = strpart(tag_line, start, end - start) -+ let {tproto_var} = substitute(tag_proto, '\s*', '', '') -+ -+ return {tproto_var} -+endfunction -+ -+" Tlist_Get_Tag_SearchPat -+function! s:Tlist_Get_Tag_SearchPat(fidx, tidx) -+ let tpat_var = 's:tlist_' . a:fidx . '_' . a:tidx . '_tag_searchpat' -+ -+ " Already parsed and have the tag search pattern -+ if exists(tpat_var) -+ return {tpat_var} -+ endif -+ -+ " Parse and extract the tag search pattern -+ let tag_line = s:tlist_{a:fidx}_{a:tidx}_tag -+ let start = stridx(tag_line, '/^') + 2 -+ let end = stridx(tag_line, '/;"' . "\t") -+ if tag_line[end - 1] == '$' -+ let end = end -1 -+ endif -+ let {tpat_var} = '\V\^' . strpart(tag_line, start, end - start) . -+ \ (tag_line[end] == '$' ? '\$' : '') -+ -+ return {tpat_var} -+endfunction -+ -+" Tlist_Get_Tag_Linenum -+" Return the tag line number, given the tag index -+function! s:Tlist_Get_Tag_Linenum(fidx, tidx) -+ let tline_var = 's:tlist_' . a:fidx . '_' . a:tidx . '_tag_linenum' -+ -+ " Already parsed and have the tag line number -+ if exists(tline_var) -+ return {tline_var} -+ endif -+ -+ " Parse and extract the tag line number -+ let tag_line = s:tlist_{a:fidx}_{a:tidx}_tag -+ let start = strridx(tag_line, 'line:') + 5 -+ let end = strridx(tag_line, "\t") -+ if end < start -+ let {tline_var} = strpart(tag_line, start) + 0 -+ else -+ let {tline_var} = strpart(tag_line, start, end - start) + 0 -+ endif -+ -+ return {tline_var} -+endfunction -+ -+" Tlist_Parse_Tagline -+" Parse a tag line from the ctags output. Separate the tag output based on the -+" tag type and store it in the tag type variable. -+" The format of each line in the ctags output is: -+" -+" tag_namefile_nameex_cmd;"extension_fields -+" -+function! s:Tlist_Parse_Tagline(tag_line) -+ if a:tag_line == '' -+ " Skip empty lines -+ return -+ endif -+ -+ " Extract the tag type -+ let ttype = s:Tlist_Extract_Tagtype(a:tag_line) -+ -+ " Make sure the tag type is a valid and supported one -+ if ttype == '' || stridx(s:ctags_flags, ttype) == -1 -+ " Line is not in proper tags format or Tag type is not supported -+ return -+ endif -+ -+ " Update the total tag count -+ let s:tidx = s:tidx + 1 -+ -+ " The following variables are used to optimize this code. Vim is slow in -+ " using curly brace names. To reduce the amount of processing needed, the -+ " curly brace variables are pre-processed here -+ let fidx_tidx = 's:tlist_' . s:fidx . '_' . s:tidx -+ let fidx_ttype = 's:tlist_' . s:fidx . '_' . ttype -+ -+ " Update the count of this tag type -+ let ttype_idx = {fidx_ttype}_count + 1 -+ let {fidx_ttype}_count = ttype_idx -+ -+ " Store the ctags output for this tag -+ let {fidx_tidx}_tag = a:tag_line -+ -+ " Store the tag index and the tag type index (back pointers) -+ let {fidx_ttype}_{ttype_idx} = s:tidx -+ let {fidx_tidx}_ttype_idx = ttype_idx -+ -+ " Extract the tag name -+ let tag_name = strpart(a:tag_line, 0, stridx(a:tag_line, "\t")) -+ -+ " Extract the tag scope/prototype -+ if g:Tlist_Display_Prototype -+ let ttxt = ' ' . s:Tlist_Get_Tag_Prototype(s:fidx, s:tidx) -+ else -+ let ttxt = ' ' . tag_name -+ -+ " Add the tag scope, if it is available and is configured. Tag -+ " scope is the last field after the 'line:\t' field -+ if g:Tlist_Display_Tag_Scope -+ let tag_scope = s:Tlist_Extract_Tag_Scope(a:tag_line) -+ if tag_scope != '' -+ let ttxt = ttxt . ' [' . tag_scope . ']' -+ endif -+ endif -+ endif -+ -+ " Add this tag to the tag type variable -+ let {fidx_ttype} = {fidx_ttype} . ttxt . "\n" -+ -+ " Save the tag name -+ let {fidx_tidx}_tag_name = tag_name -+endfunction -+ -+" Tlist_Process_File -+" Get the list of tags defined in the specified file and store them -+" in Vim variables. Returns the file index where the tags are stored. -+function! s:Tlist_Process_File(filename, ftype) -+ call s:Tlist_Log_Msg('Tlist_Process_File (' . a:filename . ', ' . -+ \ a:ftype . ')') -+ " Check whether this file is supported -+ if s:Tlist_Skip_File(a:filename, a:ftype) -+ return -1 -+ endif -+ -+ " If the tag types for this filetype are not yet created, then create -+ " them now -+ let var = 's:tlist_' . a:ftype . '_count' -+ if !exists(var) -+ if s:Tlist_FileType_Init(a:ftype) == 0 -+ return -1 -+ endif -+ endif -+ -+ " If this file is already processed, then use the cached values -+ let fidx = s:Tlist_Get_File_Index(a:filename) -+ if fidx == -1 -+ " First time, this file is loaded -+ let fidx = s:Tlist_Init_File(a:filename, a:ftype) -+ else -+ " File was previously processed. Discard the tag information -+ call s:Tlist_Discard_TagInfo(fidx) -+ endif -+ -+ let s:tlist_{fidx}_valid = 1 -+ -+ " Exuberant ctags arguments to generate a tag list -+ let ctags_args = ' -f - --format=2 --excmd=pattern --fields=nks ' -+ -+ " Form the ctags argument depending on the sort type -+ if s:tlist_{fidx}_sort_type == 'name' -+ let ctags_args = ctags_args . '--sort=yes' -+ else -+ let ctags_args = ctags_args . '--sort=no' -+ endif -+ -+ " Add the filetype specific arguments -+ let ctags_args = ctags_args . ' ' . s:tlist_{a:ftype}_ctags_args -+ -+ " Ctags command to produce output with regexp for locating the tags -+ let ctags_cmd = g:Tlist_Ctags_Cmd . ctags_args -+ let ctags_cmd = ctags_cmd . ' "' . a:filename . '"' -+ -+ if &shellxquote == '"' -+ " Double-quotes within double-quotes will not work in the -+ " command-line.If the 'shellxquote' option is set to double-quotes, -+ " then escape the double-quotes in the ctags command-line. -+ let ctags_cmd = escape(ctags_cmd, '"') -+ endif -+ -+ " In Windows 95, if not using cygwin, disable the 'shellslash' -+ " option. Otherwise, this will cause problems when running the -+ " ctags command. -+ if has('win95') && !has('win32unix') -+ let old_shellslash = &shellslash -+ set noshellslash -+ endif -+ -+ if has('win32') && !has('win32unix') && !has('win95') -+ \ && (&shell =~ 'cmd.exe') -+ " Windows does not correctly deal with commands that have more than 1 -+ " set of double quotes. It will strip them all resulting in: -+ " 'C:\Program' is not recognized as an internal or external command -+ " operable program or batch file. To work around this, place the -+ " command inside a batch file and call the batch file. -+ " Do this only on Win2K, WinXP and above. -+ " Contributed by: David Fishburn. -+ let s:taglist_tempfile = fnamemodify(tempname(), ':h') . -+ \ '\taglist.cmd' -+ exe 'redir! > ' . s:taglist_tempfile -+ silent echo ctags_cmd -+ redir END -+ -+ call s:Tlist_Log_Msg('Cmd inside batch file: ' . ctags_cmd) -+ let ctags_cmd = '"' . s:taglist_tempfile . '"' -+ endif -+ -+ call s:Tlist_Log_Msg('Cmd: ' . ctags_cmd) -+ -+ " Run ctags and get the tag list -+ let cmd_output = system(ctags_cmd) -+ -+ " Restore the value of the 'shellslash' option. -+ if has('win95') && !has('win32unix') -+ let &shellslash = old_shellslash -+ endif -+ -+ if exists('s:taglist_tempfile') -+ " Delete the temporary cmd file created on MS-Windows -+ call delete(s:taglist_tempfile) -+ endif -+ -+ " Handle errors -+ if v:shell_error -+ let msg = "Taglist: Failed to generate tags for " . a:filename -+ call s:Tlist_Warning_Msg(msg) -+ if cmd_output != '' -+ call s:Tlist_Warning_Msg(cmd_output) -+ endif -+ return fidx -+ endif -+ -+ " Store the modification time for the file -+ let s:tlist_{fidx}_mtime = getftime(a:filename) -+ -+ " No tags for current file -+ if cmd_output == '' -+ call s:Tlist_Log_Msg('No tags defined in ' . a:filename) -+ return fidx -+ endif -+ -+ call s:Tlist_Log_Msg('Generated tags information for ' . a:filename) -+ -+ if v:version > 601 -+ " The following script local variables are used by the -+ " Tlist_Parse_Tagline() function. -+ let s:ctags_flags = s:tlist_{a:ftype}_ctags_flags -+ let s:fidx = fidx -+ let s:tidx = 0 -+ -+ " Process the ctags output one line at a time. The substitute() -+ " command is used to parse the tag lines instead of using the -+ " matchstr()/stridx()/strpart() functions for performance reason -+ call substitute(cmd_output, "\\([^\n]\\+\\)\n", -+ \ '\=s:Tlist_Parse_Tagline(submatch(1))', 'g') -+ -+ " Save the number of tags for this file -+ let s:tlist_{fidx}_tag_count = s:tidx -+ -+ " The following script local variables are no longer needed -+ unlet! s:ctags_flags -+ unlet! s:tidx -+ unlet! s:fidx -+ else -+ " Due to a bug in Vim earlier than version 6.1, -+ " we cannot use substitute() to parse the ctags output. -+ " Instead the slow str*() functions are used -+ let ctags_flags = s:tlist_{a:ftype}_ctags_flags -+ let tidx = 0 -+ -+ while cmd_output != '' -+ " Extract one line at a time -+ let idx = stridx(cmd_output, "\n") -+ let one_line = strpart(cmd_output, 0, idx) -+ " Remove the line from the tags output -+ let cmd_output = strpart(cmd_output, idx + 1) -+ -+ if one_line == '' -+ " Line is not in proper tags format -+ continue -+ endif -+ -+ " Extract the tag type -+ let ttype = s:Tlist_Extract_Tagtype(one_line) -+ -+ " Make sure the tag type is a valid and supported one -+ if ttype == '' || stridx(ctags_flags, ttype) == -1 -+ " Line is not in proper tags format or Tag type is not -+ " supported -+ continue -+ endif -+ -+ " Update the total tag count -+ let tidx = tidx + 1 -+ -+ " The following variables are used to optimize this code. Vim is -+ " slow in using curly brace names. To reduce the amount of -+ " processing needed, the curly brace variables are pre-processed -+ " here -+ let fidx_tidx = 's:tlist_' . fidx . '_' . tidx -+ let fidx_ttype = 's:tlist_' . fidx . '_' . ttype -+ -+ " Update the count of this tag type -+ let ttype_idx = {fidx_ttype}_count + 1 -+ let {fidx_ttype}_count = ttype_idx -+ -+ " Store the ctags output for this tag -+ let {fidx_tidx}_tag = one_line -+ -+ " Store the tag index and the tag type index (back pointers) -+ let {fidx_ttype}_{ttype_idx} = tidx -+ let {fidx_tidx}_ttype_idx = ttype_idx -+ -+ " Extract the tag name -+ let tag_name = strpart(one_line, 0, stridx(one_line, "\t")) -+ -+ " Extract the tag scope/prototype -+ if g:Tlist_Display_Prototype -+ let ttxt = ' ' . s:Tlist_Get_Tag_Prototype(fidx, tidx) -+ else -+ let ttxt = ' ' . tag_name -+ -+ " Add the tag scope, if it is available and is configured. Tag -+ " scope is the last field after the 'line:\t' field -+ if g:Tlist_Display_Tag_Scope -+ let tag_scope = s:Tlist_Extract_Tag_Scope(one_line) -+ if tag_scope != '' -+ let ttxt = ttxt . ' [' . tag_scope . ']' -+ endif -+ endif -+ endif -+ -+ " Add this tag to the tag type variable -+ let {fidx_ttype} = {fidx_ttype} . ttxt . "\n" -+ -+ " Save the tag name -+ let {fidx_tidx}_tag_name = tag_name -+ endwhile -+ -+ " Save the number of tags for this file -+ let s:tlist_{fidx}_tag_count = tidx -+ endif -+ -+ call s:Tlist_Log_Msg('Processed ' . s:tlist_{fidx}_tag_count . -+ \ ' tags in ' . a:filename) -+ -+ return fidx -+endfunction -+ -+" Tlist_Update_File -+" Update the tags for a file (if needed) -+function! Tlist_Update_File(filename, ftype) -+ call s:Tlist_Log_Msg('Tlist_Update_File (' . a:filename . ')') -+ " If the file doesn't support tag listing, skip it -+ if s:Tlist_Skip_File(a:filename, a:ftype) -+ return -+ endif -+ -+ " Convert the file name to a full path -+ let fname = fnamemodify(a:filename, ':p') -+ -+ " First check whether the file already exists -+ let fidx = s:Tlist_Get_File_Index(fname) -+ -+ if fidx != -1 && s:tlist_{fidx}_valid -+ " File exists and the tags are valid -+ " Check whether the file was modified after the last tags update -+ " If it is modified, then update the tags -+ if s:tlist_{fidx}_mtime == getftime(fname) -+ return -+ endif -+ else -+ " If the tags were removed previously based on a user request, -+ " as we are going to update the tags (based on the user request), -+ " remove the filename from the deleted list -+ call s:Tlist_Update_Remove_List(fname, 0) -+ endif -+ -+ " If the taglist window is opened, update it -+ let winnum = bufwinnr(g:TagList_title) -+ if winnum == -1 -+ " Taglist window is not present. Just update the taglist -+ " and return -+ call s:Tlist_Process_File(fname, a:ftype) -+ else -+ if g:Tlist_Show_One_File && s:tlist_cur_file_idx != -1 -+ " If tags for only one file are displayed and we are not -+ " updating the tags for that file, then no need to -+ " refresh the taglist window. Otherwise, the taglist -+ " window should be updated. -+ if s:tlist_{s:tlist_cur_file_idx}_filename != fname -+ call s:Tlist_Process_File(fname, a:ftype) -+ return -+ endif -+ endif -+ -+ " Save the current window number -+ let save_winnr = winnr() -+ -+ " Goto the taglist window -+ call s:Tlist_Window_Goto_Window() -+ -+ " Save the cursor position -+ let save_line = line('.') -+ let save_col = col('.') -+ -+ " Update the taglist window -+ call s:Tlist_Window_Refresh_File(fname, a:ftype) -+ -+ " Restore the cursor position -+ if v:version >= 601 -+ call cursor(save_line, save_col) -+ else -+ exe save_line -+ exe 'normal! ' . save_col . '|' -+ endif -+ -+ if winnr() != save_winnr -+ " Go back to the original window -+ call s:Tlist_Exe_Cmd_No_Acmds(save_winnr . 'wincmd w') -+ endif -+ endif -+ -+ " Update the taglist menu -+ if g:Tlist_Show_Menu -+ call s:Tlist_Menu_Update_File(1) -+ endif -+endfunction -+ -+" Tlist_Window_Close -+" Close the taglist window -+function! s:Tlist_Window_Close() -+ call s:Tlist_Log_Msg('Tlist_Window_Close()') -+ " Make sure the taglist window exists -+ let winnum = bufwinnr(g:TagList_title) -+ if winnum == -1 -+ call s:Tlist_Warning_Msg('Error: Taglist window is not open') -+ return -+ endif -+ -+ if winnr() == winnum -+ " Already in the taglist window. Close it and return -+ if winbufnr(2) != -1 -+ " If a window other than the taglist window is open, -+ " then only close the taglist window. -+ close -+ endif -+ else -+ " Goto the taglist window, close it and then come back to the -+ " original window -+ let curbufnr = bufnr('%') -+ exe winnum . 'wincmd w' -+ close -+ " Need to jump back to the original window only if we are not -+ " already in that window -+ let winnum = bufwinnr(curbufnr) -+ if winnr() != winnum -+ exe winnum . 'wincmd w' -+ endif -+ endif -+endfunction -+ -+" Tlist_Window_Mark_File_Window -+" Mark the current window as the file window to use when jumping to a tag. -+" Only if the current window is a non-plugin, non-preview and non-taglist -+" window -+function! s:Tlist_Window_Mark_File_Window() -+ if getbufvar('%', '&buftype') == '' && !&previewwindow -+ let w:tlist_file_window = "yes" -+ endif -+endfunction -+ -+" Tlist_Window_Open -+" Open and refresh the taglist window -+function! s:Tlist_Window_Open() -+ call s:Tlist_Log_Msg('Tlist_Window_Open()') -+ " If the window is open, jump to it -+ let winnum = bufwinnr(g:TagList_title) -+ if winnum != -1 -+ " Jump to the existing window -+ if winnr() != winnum -+ exe winnum . 'wincmd w' -+ endif -+ return -+ endif -+ -+ if s:tlist_app_name == "winmanager" -+ " Taglist plugin is no longer part of the winmanager app -+ let s:tlist_app_name = "none" -+ endif -+ -+ " Get the filename and filetype for the specified buffer -+ let curbuf_name = fnamemodify(bufname('%'), ':p') -+ let curbuf_ftype = getbufvar('%', '&filetype') -+ let cur_lnum = line('.') -+ -+ " Mark the current window as the desired window to open a file when a tag -+ " is selected. -+ call s:Tlist_Window_Mark_File_Window() -+ -+ " Open the taglist window -+ call s:Tlist_Window_Create() -+ -+ call s:Tlist_Window_Refresh() -+ -+ if g:Tlist_Show_One_File -+ " Add only the current buffer and file -+ " -+ " If the file doesn't support tag listing, skip it -+ if !s:Tlist_Skip_File(curbuf_name, curbuf_ftype) -+ call s:Tlist_Window_Refresh_File(curbuf_name, curbuf_ftype) -+ endif -+ endif -+ -+ if g:Tlist_File_Fold_Auto_Close -+ " Open the fold for the current file, as all the folds in -+ " the taglist window are closed -+ let fidx = s:Tlist_Get_File_Index(curbuf_name) -+ if fidx != -1 -+ exe "silent! " . s:tlist_{fidx}_start . "," . -+ \ s:tlist_{fidx}_end . "foldopen!" -+ endif -+ endif -+ -+ " Highlight the current tag -+ call s:Tlist_Window_Highlight_Tag(curbuf_name, cur_lnum, 1, 1) -+endfunction -+ -+" Tlist_Window_Toggle() -+" Open or close a taglist window -+function! s:Tlist_Window_Toggle() -+ call s:Tlist_Log_Msg('Tlist_Window_Toggle()') -+ " If taglist window is open then close it. -+ let winnum = bufwinnr(g:TagList_title) -+ if winnum != -1 -+ call s:Tlist_Window_Close() -+ return -+ endif -+ -+ call s:Tlist_Window_Open() -+ -+ " Go back to the original window, if Tlist_GainFocus_On_ToggleOpen is not -+ " set -+ if !g:Tlist_GainFocus_On_ToggleOpen -+ call s:Tlist_Exe_Cmd_No_Acmds('wincmd p') -+ endif -+ -+ " Update the taglist menu -+ if g:Tlist_Show_Menu -+ call s:Tlist_Menu_Update_File(0) -+ endif -+endfunction -+ -+" Tlist_Process_Filelist -+" Process multiple files. Each filename is separated by "\n" -+" Returns the number of processed files -+function! s:Tlist_Process_Filelist(file_names) -+ let flist = a:file_names -+ -+ " Enable lazy screen updates -+ let old_lazyredraw = &lazyredraw -+ set lazyredraw -+ -+ " Keep track of the number of processed files -+ let fcnt = 0 -+ -+ " Process one file at a time -+ while flist != '' -+ let nl_idx = stridx(flist, "\n") -+ let one_file = strpart(flist, 0, nl_idx) -+ -+ " Remove the filename from the list -+ let flist = strpart(flist, nl_idx + 1) -+ -+ if one_file == '' -+ continue -+ endif -+ -+ " Skip directories -+ if isdirectory(one_file) -+ continue -+ endif -+ -+ let ftype = s:Tlist_Get_Filetype(one_file) -+ -+ echon "\r " -+ echon "\rProcessing tags for " . fnamemodify(one_file, ':p:t') -+ -+ let fcnt = fcnt + 1 -+ -+ call Tlist_Update_File(one_file, ftype) -+ endwhile -+ -+ " Clear the displayed informational messages -+ echon "\r " -+ -+ " Restore the previous state -+ let &lazyredraw = old_lazyredraw -+ -+ return fcnt -+endfunction -+ -+" Tlist_Process_Dir -+" Process the files in a directory matching the specified pattern -+function! s:Tlist_Process_Dir(dir_name, pat) -+ let flist = glob(a:dir_name . '/' . a:pat) . "\n" -+ -+ let fcnt = s:Tlist_Process_Filelist(flist) -+ -+ let len = strlen(a:dir_name) -+ if a:dir_name[len - 1] == '\' || a:dir_name[len - 1] == '/' -+ let glob_expr = a:dir_name . '*' -+ else -+ let glob_expr = a:dir_name . '/*' -+ endif -+ let all_files = glob(glob_expr) . "\n" -+ -+ while all_files != '' -+ let nl_idx = stridx(all_files, "\n") -+ let one_file = strpart(all_files, 0, nl_idx) -+ -+ let all_files = strpart(all_files, nl_idx + 1) -+ if one_file == '' -+ continue -+ endif -+ -+ " Skip non-directory names -+ if !isdirectory(one_file) -+ continue -+ endif -+ -+ echon "\r " -+ echon "\rProcessing files in directory " . fnamemodify(one_file, ':t') -+ let fcnt = fcnt + s:Tlist_Process_Dir(one_file, a:pat) -+ endwhile -+ -+ return fcnt -+endfunction -+ -+" Tlist_Add_Files_Recursive -+" Add files recursively from a directory -+function! s:Tlist_Add_Files_Recursive(dir, ...) -+ let dir_name = fnamemodify(a:dir, ':p') -+ if !isdirectory(dir_name) -+ call s:Tlist_Warning_Msg('Error: ' . dir_name . ' is not a directory') -+ return -+ endif -+ -+ if a:0 == 1 -+ " User specified file pattern -+ let pat = a:1 -+ else -+ " Default file pattern -+ let pat = '*' -+ endif -+ -+ echon "\r " -+ echon "\rProcessing files in directory " . fnamemodify(dir_name, ':t') -+ let fcnt = s:Tlist_Process_Dir(dir_name, pat) -+ -+ echon "\rAdded " . fcnt . " files to the taglist" -+endfunction -+ -+" Tlist_Add_Files -+" Add the specified list of files to the taglist -+function! s:Tlist_Add_Files(...) -+ let flist = '' -+ let i = 1 -+ -+ " Get all the files matching the file patterns supplied as argument -+ while i <= a:0 -+ let flist = flist . glob(a:{i}) . "\n" -+ let i = i + 1 -+ endwhile -+ -+ if flist == '' -+ call s:Tlist_Warning_Msg('Error: No matching files are found') -+ return -+ endif -+ -+ let fcnt = s:Tlist_Process_Filelist(flist) -+ echon "\rAdded " . fcnt . " files to the taglist" -+endfunction -+ -+" Tlist_Extract_Tagtype -+" Extract the tag type from the tag text -+function! s:Tlist_Extract_Tagtype(tag_line) -+ " The tag type is after the tag prototype field. The prototype field -+ " ends with the /;"\t string. We add 4 at the end to skip the characters -+ " in this special string.. -+ let start = strridx(a:tag_line, '/;"' . "\t") + 4 -+ let end = strridx(a:tag_line, 'line:') - 1 -+ let ttype = strpart(a:tag_line, start, end - start) -+ -+ return ttype -+endfunction -+ -+" Tlist_Extract_Tag_Scope -+" Extract the tag scope from the tag text -+function! s:Tlist_Extract_Tag_Scope(tag_line) -+ let start = strridx(a:tag_line, 'line:') -+ let end = strridx(a:tag_line, "\t") -+ if end <= start -+ return '' -+ endif -+ -+ let tag_scope = strpart(a:tag_line, end + 1) -+ let tag_scope = strpart(tag_scope, stridx(tag_scope, ':') + 1) -+ -+ return tag_scope -+endfunction -+ -+" Tlist_Refresh() -+" Refresh the taglist -+function! s:Tlist_Refresh() -+ call s:Tlist_Log_Msg('Tlist_Refresh (Skip_Refresh = ' . -+ \ s:Tlist_Skip_Refresh . ', ' . bufname('%') . ')') -+ " If we are entering the buffer from one of the taglist functions, then -+ " no need to refresh the taglist window again. -+ if s:Tlist_Skip_Refresh -+ " We still need to update the taglist menu -+ if g:Tlist_Show_Menu -+ call s:Tlist_Menu_Update_File(0) -+ endif -+ return -+ endif -+ -+ " If part of the winmanager plugin and not configured to process -+ " tags always and not configured to display the tags menu, then return -+ if (s:tlist_app_name == 'winmanager') && !g:Tlist_Process_File_Always -+ \ && !g:Tlist_Show_Menu -+ return -+ endif -+ -+ " Skip buffers with 'buftype' set to nofile, nowrite, quickfix or help -+ if &buftype != '' -+ return -+ endif -+ -+ let filename = fnamemodify(bufname('%'), ':p') -+ let ftype = &filetype -+ -+ " If the file doesn't support tag listing, skip it -+ if s:Tlist_Skip_File(filename, ftype) -+ return -+ endif -+ -+ let tlist_win = bufwinnr(g:TagList_title) -+ -+ " If the taglist window is not opened and not configured to process -+ " tags always and not displaying the tags menu, then return -+ if tlist_win == -1 && !g:Tlist_Process_File_Always && !g:Tlist_Show_Menu -+ return -+ endif -+ -+ let fidx = s:Tlist_Get_File_Index(filename) -+ if fidx == -1 -+ " Check whether this file is removed based on user request -+ " If it is, then don't display the tags for this file -+ if s:Tlist_User_Removed_File(filename) -+ return -+ endif -+ -+ " If the taglist should not be auto updated, then return -+ if !g:Tlist_Auto_Update -+ return -+ endif -+ endif -+ -+ let cur_lnum = line('.') -+ -+ if fidx == -1 -+ " Update the tags for the file -+ let fidx = s:Tlist_Process_File(filename, ftype) -+ else -+ let mtime = getftime(filename) -+ if s:tlist_{fidx}_mtime != mtime -+ " Invalidate the tags listed for this file -+ let s:tlist_{fidx}_valid = 0 -+ -+ " Update the taglist and the window -+ call Tlist_Update_File(filename, ftype) -+ -+ " Store the new file modification time -+ let s:tlist_{fidx}_mtime = mtime -+ endif -+ endif -+ -+ " Update the taglist window -+ if tlist_win != -1 -+ " Disable screen updates -+ let old_lazyredraw = &lazyredraw -+ set nolazyredraw -+ -+ " Save the current window number -+ let save_winnr = winnr() -+ -+ " Goto the taglist window -+ call s:Tlist_Window_Goto_Window() -+ -+ if !g:Tlist_Auto_Highlight_Tag || !g:Tlist_Highlight_Tag_On_BufEnter -+ " Save the cursor position -+ let save_line = line('.') -+ let save_col = col('.') -+ endif -+ -+ " Update the taglist window -+ call s:Tlist_Window_Refresh_File(filename, ftype) -+ -+ " Open the fold for the file -+ exe "silent! " . s:tlist_{fidx}_start . "," . -+ \ s:tlist_{fidx}_end . "foldopen!" -+ -+ if g:Tlist_Highlight_Tag_On_BufEnter && g:Tlist_Auto_Highlight_Tag -+ if g:Tlist_Show_One_File && s:tlist_cur_file_idx != fidx -+ " If displaying tags for only one file in the taglist -+ " window and about to display the tags for a new file, -+ " then center the current tag line for the new file -+ let center_tag_line = 1 -+ else -+ let center_tag_line = 0 -+ endif -+ -+ " Highlight the current tag -+ call s:Tlist_Window_Highlight_Tag(filename, cur_lnum, 1, center_tag_line) -+ else -+ " Restore the cursor position -+ if v:version >= 601 -+ call cursor(save_line, save_col) -+ else -+ exe save_line -+ exe 'normal! ' . save_col . '|' -+ endif -+ endif -+ -+ " Jump back to the original window -+ if save_winnr != winnr() -+ call s:Tlist_Exe_Cmd_No_Acmds(save_winnr . 'wincmd w') -+ endif -+ -+ " Restore screen updates -+ let &lazyredraw = old_lazyredraw -+ endif -+ -+ " Update the taglist menu -+ if g:Tlist_Show_Menu -+ call s:Tlist_Menu_Update_File(0) -+ endif -+endfunction -+ -+" Tlist_Change_Sort() -+" Change the sort order of the tag listing -+" caller == 'cmd', command used in the taglist window -+" caller == 'menu', taglist menu -+" action == 'toggle', toggle sort from name to order and vice versa -+" action == 'set', set the sort order to sort_type -+function! s:Tlist_Change_Sort(caller, action, sort_type) -+ call s:Tlist_Log_Msg('Tlist_Change_Sort (caller = ' . a:caller . -+ \ ', action = ' . a:action . ', sort_type = ' . a:sort_type . ')') -+ if a:caller == 'cmd' -+ let fidx = s:Tlist_Window_Get_File_Index_By_Linenum(line('.')) -+ if fidx == -1 -+ return -+ endif -+ -+ " Remove the previous highlighting -+ match none -+ elseif a:caller == 'menu' -+ let fidx = s:Tlist_Get_File_Index(fnamemodify(bufname('%'), ':p')) -+ if fidx == -1 -+ return -+ endif -+ endif -+ -+ if a:action == 'toggle' -+ let sort_type = s:tlist_{fidx}_sort_type -+ -+ " Toggle the sort order from 'name' to 'order' and vice versa -+ if sort_type == 'name' -+ let s:tlist_{fidx}_sort_type = 'order' -+ else -+ let s:tlist_{fidx}_sort_type = 'name' -+ endif -+ else -+ let s:tlist_{fidx}_sort_type = a:sort_type -+ endif -+ -+ " Invalidate the tags listed for this file -+ let s:tlist_{fidx}_valid = 0 -+ -+ if a:caller == 'cmd' -+ " Save the current line for later restoration -+ let curline = '\V\^' . getline('.') . '\$' -+ -+ call s:Tlist_Window_Refresh_File(s:tlist_{fidx}_filename, -+ \ s:tlist_{fidx}_filetype) -+ -+ exe s:tlist_{fidx}_start . ',' . s:tlist_{fidx}_end . 'foldopen!' -+ -+ " Go back to the cursor line before the tag list is sorted -+ call search(curline, 'w') -+ -+ call s:Tlist_Menu_Update_File(1) -+ else -+ call s:Tlist_Menu_Remove_File() -+ -+ call s:Tlist_Refresh() -+ endif -+endfunction -+ -+" Tlist_Update_Current_File() -+" Update taglist for the current buffer by regenerating the tag list -+" Contributed by WEN Guopeng. -+function! s:Tlist_Update_Current_File() -+ call s:Tlist_Log_Msg('Tlist_Update_Current_File()') -+ if winnr() == bufwinnr(g:TagList_title) -+ " In the taglist window. Update the current file -+ call s:Tlist_Window_Update_File() -+ else -+ " Not in the taglist window. Update the current buffer -+ let filename = fnamemodify(bufname('%'), ':p') -+ let fidx = s:Tlist_Get_File_Index(filename) -+ if fidx != -1 -+ let s:tlist_{fidx}_valid = 0 -+ endif -+ call Tlist_Update_File(filename, &filetype) -+ endif -+endfunction -+ -+" Tlist_Window_Update_File() -+" Update the tags displayed in the taglist window -+function! s:Tlist_Window_Update_File() -+ call s:Tlist_Log_Msg('Tlist_Window_Update_File()') -+ let fidx = s:Tlist_Window_Get_File_Index_By_Linenum(line('.')) -+ if fidx == -1 -+ return -+ endif -+ -+ " Remove the previous highlighting -+ match none -+ -+ " Save the current line for later restoration -+ let curline = '\V\^' . getline('.') . '\$' -+ -+ let s:tlist_{fidx}_valid = 0 -+ -+ " Update the taglist window -+ call s:Tlist_Window_Refresh_File(s:tlist_{fidx}_filename, -+ \ s:tlist_{fidx}_filetype) -+ -+ exe s:tlist_{fidx}_start . ',' . s:tlist_{fidx}_end . 'foldopen!' -+ -+ " Go back to the tag line before the list is updated -+ call search(curline, 'w') -+endfunction -+ -+" Tlist_Window_Get_Tag_Type_By_Linenum() -+" Return the tag type index for the specified line in the taglist window -+function! s:Tlist_Window_Get_Tag_Type_By_Linenum(fidx, lnum) -+ let ftype = s:tlist_{a:fidx}_filetype -+ -+ " Determine to which tag type the current line number belongs to using the -+ " tag type start line number and the number of tags in a tag type -+ let i = 1 -+ while i <= s:tlist_{ftype}_count -+ let ttype = s:tlist_{ftype}_{i}_name -+ let start_lnum = -+ \ s:tlist_{a:fidx}_start + s:tlist_{a:fidx}_{ttype}_offset -+ let end = start_lnum + s:tlist_{a:fidx}_{ttype}_count -+ if a:lnum >= start_lnum && a:lnum <= end -+ break -+ endif -+ let i = i + 1 -+ endwhile -+ -+ " Current line doesn't belong to any of the displayed tag types -+ if i > s:tlist_{ftype}_count -+ return '' -+ endif -+ -+ return ttype -+endfunction -+ -+" Tlist_Window_Get_Tag_Index() -+" Return the tag index for the specified line in the taglist window -+function! s:Tlist_Window_Get_Tag_Index(fidx, lnum) -+ let ttype = s:Tlist_Window_Get_Tag_Type_By_Linenum(a:fidx, a:lnum) -+ -+ " Current line doesn't belong to any of the displayed tag types -+ if ttype == '' -+ return 0 -+ endif -+ -+ " Compute the index into the displayed tags for the tag type -+ let ttype_lnum = s:tlist_{a:fidx}_start + s:tlist_{a:fidx}_{ttype}_offset -+ let tidx = a:lnum - ttype_lnum -+ if tidx == 0 -+ return 0 -+ endif -+ -+ " Get the corresponding tag line and return it -+ return s:tlist_{a:fidx}_{ttype}_{tidx} -+endfunction -+ -+" Tlist_Window_Highlight_Line -+" Highlight the current line -+function! s:Tlist_Window_Highlight_Line() -+ " Clear previously selected name -+ match none -+ -+ " Highlight the current line -+ if g:Tlist_Display_Prototype == 0 -+ let pat = '/\%' . line('.') . 'l\s\+\zs.*/' -+ else -+ let pat = '/\%' . line('.') . 'l.*/' -+ endif -+ -+ exe 'match TagListTagName ' . pat -+endfunction -+ -+" Tlist_Window_Open_File -+" Open the specified file in either a new window or an existing window -+" and place the cursor at the specified tag pattern -+function! s:Tlist_Window_Open_File(win_ctrl, filename, tagpat) -+ call s:Tlist_Log_Msg('Tlist_Window_Open_File (' . a:filename . ',' . -+ \ a:win_ctrl . ')') -+ let prev_Tlist_Skip_Refresh = s:Tlist_Skip_Refresh -+ let s:Tlist_Skip_Refresh = 1 -+ -+ if s:tlist_app_name == "winmanager" -+ " Let the winmanager edit the file -+ call WinManagerFileEdit(a:filename, a:win_ctrl == 'newwin') -+ else -+ -+ if a:win_ctrl == 'newtab' -+ " Create a new tab -+ exe 'tabnew ' . escape(a:filename, ' ') -+ " Open the taglist window in the new tab -+ call s:Tlist_Window_Open() -+ endif -+ -+ if a:win_ctrl == 'checktab' -+ " Check whether the file is present in any of the tabs. -+ " If the file is present in the current tab, then use the -+ " current tab. -+ if bufwinnr(a:filename) != -1 -+ let file_present_in_tab = 1 -+ let i = tabpagenr() -+ else -+ let i = 1 -+ let bnum = bufnr(a:filename) -+ let file_present_in_tab = 0 -+ while i <= tabpagenr('$') -+ if index(tabpagebuflist(i), bnum) != -1 -+ let file_present_in_tab = 1 -+ break -+ endif -+ let i += 1 -+ endwhile -+ endif -+ -+ if file_present_in_tab -+ " Goto the tab containing the file -+ exe 'tabnext ' . i -+ else -+ " Open a new tab -+ exe 'tabnew ' . escape(a:filename, ' ') -+ -+ " Open the taglist window -+ call s:Tlist_Window_Open() -+ endif -+ endif -+ -+ let winnum = -1 -+ if a:win_ctrl == 'prevwin' -+ " Open the file in the previous window, if it is usable -+ let cur_win = winnr() -+ wincmd p -+ if &buftype == '' && !&previewwindow -+ exe "edit " . escape(a:filename, ' ') -+ let winnum = winnr() -+ else -+ " Previous window is not usable -+ exe cur_win . 'wincmd w' -+ endif -+ endif -+ -+ " Goto the window containing the file. If the window is not there, open a -+ " new window -+ if winnum == -1 -+ let winnum = bufwinnr(a:filename) -+ endif -+ -+ if winnum == -1 -+ " Locate the previously used window for opening a file -+ let fwin_num = 0 -+ let first_usable_win = 0 -+ -+ let i = 1 -+ let bnum = winbufnr(i) -+ while bnum != -1 -+ if getwinvar(i, 'tlist_file_window') == 'yes' -+ let fwin_num = i -+ break -+ endif -+ if first_usable_win == 0 && -+ \ getbufvar(bnum, '&buftype') == '' && -+ \ !getwinvar(i, '&previewwindow') -+ " First non-taglist, non-plugin and non-preview window -+ let first_usable_win = i -+ endif -+ let i = i + 1 -+ let bnum = winbufnr(i) -+ endwhile -+ -+ " If a previously used window is not found, then use the first -+ " non-taglist window -+ if fwin_num == 0 -+ let fwin_num = first_usable_win -+ endif -+ -+ if fwin_num != 0 -+ " Jump to the file window -+ exe fwin_num . "wincmd w" -+ -+ " If the user asked to jump to the tag in a new window, then split -+ " the existing window into two. -+ if a:win_ctrl == 'newwin' -+ split -+ endif -+ exe "edit " . escape(a:filename, ' ') -+ else -+ " Open a new window -+ if g:Tlist_Use_Horiz_Window -+ exe 'leftabove split ' . escape(a:filename, ' ') -+ else -+ if winbufnr(2) == -1 -+ " Only the taglist window is present -+ if g:Tlist_Use_Right_Window -+ exe 'leftabove vertical split ' . -+ \ escape(a:filename, ' ') -+ else -+ exe 'rightbelow vertical split ' . -+ \ escape(a:filename, ' ') -+ endif -+ -+ " Go to the taglist window to change the window size to -+ " the user configured value -+ call s:Tlist_Exe_Cmd_No_Acmds('wincmd p') -+ if g:Tlist_Use_Horiz_Window -+ exe 'resize ' . g:Tlist_WinHeight -+ else -+ exe 'vertical resize ' . g:Tlist_WinWidth -+ endif -+ " Go back to the file window -+ call s:Tlist_Exe_Cmd_No_Acmds('wincmd p') -+ else -+ " A plugin or help window is also present -+ wincmd w -+ exe 'leftabove split ' . escape(a:filename, ' ') -+ endif -+ endif -+ endif -+ " Mark the window, so that it can be reused. -+ call s:Tlist_Window_Mark_File_Window() -+ else -+ if v:version >= 700 -+ " If the file is opened in more than one window, then check -+ " whether the last accessed window has the selected file. -+ " If it does, then use that window. -+ let lastwin_bufnum = winbufnr(winnr('#')) -+ if bufnr(a:filename) == lastwin_bufnum -+ let winnum = winnr('#') -+ endif -+ endif -+ exe winnum . 'wincmd w' -+ -+ " If the user asked to jump to the tag in a new window, then split the -+ " existing window into two. -+ if a:win_ctrl == 'newwin' -+ split -+ endif -+ endif -+ endif -+ -+ " Jump to the tag -+ if a:tagpat != '' -+ " Add the current cursor position to the jump list, so that user can -+ " jump back using the ' and ` marks. -+ mark ' -+ silent call search(a:tagpat, 'w') -+ -+ " Bring the line to the middle of the window -+ normal! z. -+ -+ " If the line is inside a fold, open the fold -+ if foldclosed('.') != -1 -+ .foldopen -+ endif -+ endif -+ -+ " If the user selects to preview the tag then jump back to the -+ " taglist window -+ if a:win_ctrl == 'preview' -+ " Go back to the taglist window -+ let winnum = bufwinnr(g:TagList_title) -+ exe winnum . 'wincmd w' -+ else -+ " If the user has selected to close the taglist window, when a -+ " tag is selected, close the taglist window -+ if g:Tlist_Close_On_Select -+ call s:Tlist_Window_Goto_Window() -+ close -+ -+ " Go back to the window displaying the selected file -+ let wnum = bufwinnr(a:filename) -+ if wnum != -1 && wnum != winnr() -+ call s:Tlist_Exe_Cmd_No_Acmds(wnum . 'wincmd w') -+ endif -+ endif -+ endif -+ -+ let s:Tlist_Skip_Refresh = prev_Tlist_Skip_Refresh -+endfunction -+ -+" Tlist_Window_Jump_To_Tag() -+" Jump to the location of the current tag -+" win_ctrl == useopen - Reuse the existing file window -+" win_ctrl == newwin - Open a new window -+" win_ctrl == preview - Preview the tag -+" win_ctrl == prevwin - Open in previous window -+" win_ctrl == newtab - Open in new tab -+function! s:Tlist_Window_Jump_To_Tag(win_ctrl) -+ call s:Tlist_Log_Msg('Tlist_Window_Jump_To_Tag(' . a:win_ctrl . ')') -+ " Do not process comment lines and empty lines -+ let curline = getline('.') -+ if curline =~ '^\s*$' || curline[0] == '"' -+ return -+ endif -+ -+ " If inside a closed fold, then use the first line of the fold -+ " and jump to the file. -+ let lnum = foldclosed('.') -+ if lnum == -1 -+ " Jump to the selected tag or file -+ let lnum = line('.') -+ else -+ " Open the closed fold -+ .foldopen! -+ endif -+ -+ let fidx = s:Tlist_Window_Get_File_Index_By_Linenum(lnum) -+ if fidx == -1 -+ return -+ endif -+ -+ " Get the tag output for the current tag -+ let tidx = s:Tlist_Window_Get_Tag_Index(fidx, lnum) -+ if tidx != 0 -+ let tagpat = s:Tlist_Get_Tag_SearchPat(fidx, tidx) -+ -+ " Highlight the tagline -+ call s:Tlist_Window_Highlight_Line() -+ else -+ " Selected a line which is not a tag name. Just edit the file -+ let tagpat = '' -+ endif -+ -+ call s:Tlist_Window_Open_File(a:win_ctrl, s:tlist_{fidx}_filename, tagpat) -+endfunction -+ -+" Tlist_Window_Show_Info() -+" Display information about the entry under the cursor -+function! s:Tlist_Window_Show_Info() -+ call s:Tlist_Log_Msg('Tlist_Window_Show_Info()') -+ -+ " Clear the previously displayed line -+ echo -+ -+ " Do not process comment lines and empty lines -+ let curline = getline('.') -+ if curline =~ '^\s*$' || curline[0] == '"' -+ return -+ endif -+ -+ " If inside a fold, then don't display the prototype -+ if foldclosed('.') != -1 -+ return -+ endif -+ -+ let lnum = line('.') -+ -+ " Get the file index -+ let fidx = s:Tlist_Window_Get_File_Index_By_Linenum(lnum) -+ if fidx == -1 -+ return -+ endif -+ -+ if lnum == s:tlist_{fidx}_start -+ " Cursor is on a file name -+ let fname = s:tlist_{fidx}_filename -+ if strlen(fname) > 50 -+ let fname = fnamemodify(fname, ':t') -+ endif -+ echo fname . ', Filetype=' . s:tlist_{fidx}_filetype . -+ \ ', Tag count=' . s:tlist_{fidx}_tag_count -+ return -+ endif -+ -+ " Get the tag output line for the current tag -+ let tidx = s:Tlist_Window_Get_Tag_Index(fidx, lnum) -+ if tidx == 0 -+ " Cursor is on a tag type -+ let ttype = s:Tlist_Window_Get_Tag_Type_By_Linenum(fidx, lnum) -+ if ttype == '' -+ return -+ endif -+ -+ let ttype_name = '' -+ -+ let ftype = s:tlist_{fidx}_filetype -+ let i = 1 -+ while i <= s:tlist_{ftype}_count -+ if ttype == s:tlist_{ftype}_{i}_name -+ let ttype_name = s:tlist_{ftype}_{i}_fullname -+ break -+ endif -+ let i = i + 1 -+ endwhile -+ -+ echo 'Tag type=' . ttype_name . -+ \ ', Tag count=' . s:tlist_{fidx}_{ttype}_count -+ return -+ endif -+ -+ " Get the tag search pattern and display it -+ echo s:Tlist_Get_Tag_Prototype(fidx, tidx) -+endfunction -+ -+" Tlist_Find_Nearest_Tag_Idx -+" Find the tag idx nearest to the supplied line number -+" Returns -1, if a tag couldn't be found for the specified line number -+function! s:Tlist_Find_Nearest_Tag_Idx(fidx, linenum) -+ let sort_type = s:tlist_{a:fidx}_sort_type -+ -+ let left = 1 -+ let right = s:tlist_{a:fidx}_tag_count -+ -+ if sort_type == 'order' -+ " Tags sorted by order, use a binary search. -+ " The idea behind this function is taken from the ctags.vim script (by -+ " Alexey Marinichev) available at the Vim online website. -+ -+ " If the current line is the less than the first tag, then no need to -+ " search -+ let first_lnum = s:Tlist_Get_Tag_Linenum(a:fidx, 1) -+ -+ if a:linenum < first_lnum -+ return -1 -+ endif -+ -+ while left < right -+ let middle = (right + left + 1) / 2 -+ let middle_lnum = s:Tlist_Get_Tag_Linenum(a:fidx, middle) -+ -+ if middle_lnum == a:linenum -+ let left = middle -+ break -+ endif -+ -+ if middle_lnum > a:linenum -+ let right = middle - 1 -+ else -+ let left = middle -+ endif -+ endwhile -+ else -+ " Tags sorted by name, use a linear search. (contributed by Dave -+ " Eggum). -+ " Look for a tag with a line number less than or equal to the supplied -+ " line number. If multiple tags are found, then use the tag with the -+ " line number closest to the supplied line number. IOW, use the tag -+ " with the highest line number. -+ let closest_lnum = 0 -+ let final_left = 0 -+ while left <= right -+ let lnum = s:Tlist_Get_Tag_Linenum(a:fidx, left) -+ -+ if lnum < a:linenum && lnum > closest_lnum -+ let closest_lnum = lnum -+ let final_left = left -+ elseif lnum == a:linenum -+ let closest_lnum = lnum -+ let final_left = left -+ break -+ else -+ let left = left + 1 -+ endif -+ endwhile -+ if closest_lnum == 0 -+ return -1 -+ endif -+ if left >= right -+ let left = final_left -+ endif -+ endif -+ -+ return left -+endfunction -+ -+" Tlist_Window_Highlight_Tag() -+" Highlight the current tag -+" cntx == 1, Called by the taglist plugin itself -+" cntx == 2, Forced by the user through the TlistHighlightTag command -+" center = 1, move the tag line to the center of the taglist window -+function! s:Tlist_Window_Highlight_Tag(filename, cur_lnum, cntx, center) -+ " Highlight the current tag only if the user configured the -+ " taglist plugin to do so or if the user explictly invoked the -+ " command to highlight the current tag. -+ if !g:Tlist_Auto_Highlight_Tag && a:cntx == 1 -+ return -+ endif -+ -+ if a:filename == '' -+ return -+ endif -+ -+ " Make sure the taglist window is present -+ let winnum = bufwinnr(g:TagList_title) -+ if winnum == -1 -+ call s:Tlist_Warning_Msg('Error: Taglist window is not open') -+ return -+ endif -+ -+ let fidx = s:Tlist_Get_File_Index(a:filename) -+ if fidx == -1 -+ return -+ endif -+ -+ " If the file is currently not displayed in the taglist window, then retrn -+ if !s:tlist_{fidx}_visible -+ return -+ endif -+ -+ " If there are no tags for this file, then no need to proceed further -+ if s:tlist_{fidx}_tag_count == 0 -+ return -+ endif -+ -+ " Ignore all autocommands -+ let old_ei = &eventignore -+ set eventignore=all -+ -+ " Save the original window number -+ let org_winnr = winnr() -+ -+ if org_winnr == winnum -+ let in_taglist_window = 1 -+ else -+ let in_taglist_window = 0 -+ endif -+ -+ " Go to the taglist window -+ if !in_taglist_window -+ exe winnum . 'wincmd w' -+ endif -+ -+ " Clear previously selected name -+ match none -+ -+ let tidx = s:Tlist_Find_Nearest_Tag_Idx(fidx, a:cur_lnum) -+ if tidx == -1 -+ " Make sure the current tag line is visible in the taglist window. -+ " Calling the winline() function makes the line visible. Don't know -+ " of a better way to achieve this. -+ let lnum = line('.') -+ -+ if lnum < s:tlist_{fidx}_start || lnum > s:tlist_{fidx}_end -+ " Move the cursor to the beginning of the file -+ exe s:tlist_{fidx}_start -+ endif -+ -+ if foldclosed('.') != -1 -+ .foldopen -+ endif -+ -+ call winline() -+ -+ if !in_taglist_window -+ exe org_winnr . 'wincmd w' -+ endif -+ -+ " Restore the autocommands -+ let &eventignore = old_ei -+ return -+ endif -+ -+ " Extract the tag type -+ let ttype = s:Tlist_Get_Tag_Type_By_Tag(fidx, tidx) -+ -+ " Compute the line number -+ " Start of file + Start of tag type + offset -+ let lnum = s:tlist_{fidx}_start + s:tlist_{fidx}_{ttype}_offset + -+ \ s:tlist_{fidx}_{tidx}_ttype_idx -+ -+ " Goto the line containing the tag -+ exe lnum -+ -+ " Open the fold -+ if foldclosed('.') != -1 -+ .foldopen -+ endif -+ -+ if a:center -+ " Move the tag line to the center of the taglist window -+ normal! z. -+ else -+ " Make sure the current tag line is visible in the taglist window. -+ " Calling the winline() function makes the line visible. Don't know -+ " of a better way to achieve this. -+ call winline() -+ endif -+ -+ " Highlight the tag name -+ call s:Tlist_Window_Highlight_Line() -+ -+ " Go back to the original window -+ if !in_taglist_window -+ exe org_winnr . 'wincmd w' -+ endif -+ -+ " Restore the autocommands -+ let &eventignore = old_ei -+ return -+endfunction -+ -+" Tlist_Get_Tag_Prototype_By_Line -+" Get the prototype for the tag on or before the specified line number in the -+" current buffer -+function! Tlist_Get_Tag_Prototype_By_Line(...) -+ if a:0 == 0 -+ " Arguments are not supplied. Use the current buffer name -+ " and line number -+ let filename = bufname('%') -+ let linenr = line('.') -+ elseif a:0 == 2 -+ " Filename and line number are specified -+ let filename = a:1 -+ let linenr = a:2 -+ if linenr !~ '\d\+' -+ " Invalid line number -+ return "" -+ endif -+ else -+ " Sufficient arguments are not supplied -+ let msg = 'Usage: Tlist_Get_Tag_Prototype_By_Line ' . -+ \ '' -+ call s:Tlist_Warning_Msg(msg) -+ return "" -+ endif -+ -+ " Expand the file to a fully qualified name -+ let filename = fnamemodify(filename, ':p') -+ if filename == '' -+ return "" -+ endif -+ -+ let fidx = s:Tlist_Get_File_Index(filename) -+ if fidx == -1 -+ return "" -+ endif -+ -+ " If there are no tags for this file, then no need to proceed further -+ if s:tlist_{fidx}_tag_count == 0 -+ return "" -+ endif -+ -+ " Get the tag text using the line number -+ let tidx = s:Tlist_Find_Nearest_Tag_Idx(fidx, linenr) -+ if tidx == -1 -+ return "" -+ endif -+ -+ return s:Tlist_Get_Tag_Prototype(fidx, tidx) -+endfunction -+ -+" Tlist_Get_Tagname_By_Line -+" Get the tag name on or before the specified line number in the -+" current buffer -+function! Tlist_Get_Tagname_By_Line(...) -+ if a:0 == 0 -+ " Arguments are not supplied. Use the current buffer name -+ " and line number -+ let filename = bufname('%') -+ let linenr = line('.') -+ elseif a:0 == 2 -+ " Filename and line number are specified -+ let filename = a:1 -+ let linenr = a:2 -+ if linenr !~ '\d\+' -+ " Invalid line number -+ return "" -+ endif -+ else -+ " Sufficient arguments are not supplied -+ let msg = 'Usage: Tlist_Get_Tagname_By_Line ' -+ call s:Tlist_Warning_Msg(msg) -+ return "" -+ endif -+ -+ " Make sure the current file has a name -+ let filename = fnamemodify(filename, ':p') -+ if filename == '' -+ return "" -+ endif -+ -+ let fidx = s:Tlist_Get_File_Index(filename) -+ if fidx == -1 -+ return "" -+ endif -+ -+ " If there are no tags for this file, then no need to proceed further -+ if s:tlist_{fidx}_tag_count == 0 -+ return "" -+ endif -+ -+ " Get the tag name using the line number -+ let tidx = s:Tlist_Find_Nearest_Tag_Idx(fidx, linenr) -+ if tidx == -1 -+ return "" -+ endif -+ -+ return s:tlist_{fidx}_{tidx}_tag_name -+endfunction -+ -+" Tlist_Window_Move_To_File -+" Move the cursor to the beginning of the current file or the next file -+" or the previous file in the taglist window -+" dir == -1, move to start of current or previous function -+" dir == 1, move to start of next function -+function! s:Tlist_Window_Move_To_File(dir) -+ if foldlevel('.') == 0 -+ " Cursor is on a non-folded line (it is not in any of the files) -+ " Move it to a folded line -+ if a:dir == -1 -+ normal! zk -+ else -+ " While moving down to the start of the next fold, -+ " no need to do go to the start of the next file. -+ normal! zj -+ return -+ endif -+ endif -+ -+ let fidx = s:Tlist_Window_Get_File_Index_By_Linenum(line('.')) -+ if fidx == -1 -+ return -+ endif -+ -+ let cur_lnum = line('.') -+ -+ if a:dir == -1 -+ if cur_lnum > s:tlist_{fidx}_start -+ " Move to the beginning of the current file -+ exe s:tlist_{fidx}_start -+ return -+ endif -+ -+ if fidx != 0 -+ " Move to the beginning of the previous file -+ let fidx = fidx - 1 -+ else -+ " Cursor is at the first file, wrap around to the last file -+ let fidx = s:tlist_file_count - 1 -+ endif -+ -+ exe s:tlist_{fidx}_start -+ return -+ else -+ " Move to the beginning of the next file -+ let fidx = fidx + 1 -+ -+ if fidx >= s:tlist_file_count -+ " Cursor is at the last file, wrap around to the first file -+ let fidx = 0 -+ endif -+ -+ if s:tlist_{fidx}_start != 0 -+ exe s:tlist_{fidx}_start -+ endif -+ return -+ endif -+endfunction -+ -+" Tlist_Session_Load -+" Load a taglist session (information about all the displayed files -+" and the tags) from the specified file -+function! s:Tlist_Session_Load(...) -+ if a:0 == 0 || a:1 == '' -+ call s:Tlist_Warning_Msg('Usage: TlistSessionLoad ') -+ return -+ endif -+ -+ let sessionfile = a:1 -+ -+ if !filereadable(sessionfile) -+ let msg = 'Taglist: Error - Unable to open file ' . sessionfile -+ call s:Tlist_Warning_Msg(msg) -+ return -+ endif -+ -+ " Mark the current window as the file window -+ call s:Tlist_Window_Mark_File_Window() -+ -+ " Source the session file -+ exe 'source ' . sessionfile -+ -+ let new_file_count = g:tlist_file_count -+ unlet! g:tlist_file_count -+ -+ let i = 0 -+ while i < new_file_count -+ let ftype = g:tlist_{i}_filetype -+ unlet! g:tlist_{i}_filetype -+ -+ if !exists('s:tlist_' . ftype . '_count') -+ if s:Tlist_FileType_Init(ftype) == 0 -+ let i = i + 1 -+ continue -+ endif -+ endif -+ -+ let fname = g:tlist_{i}_filename -+ unlet! g:tlist_{i}_filename -+ -+ let fidx = s:Tlist_Get_File_Index(fname) -+ if fidx != -1 -+ let s:tlist_{fidx}_visible = 0 -+ let i = i + 1 -+ continue -+ else -+ " As we are loading the tags from the session file, if this -+ " file was previously deleted by the user, now we need to -+ " add it back. So remove the file from the deleted list. -+ call s:Tlist_Update_Remove_List(fname, 0) -+ endif -+ -+ let fidx = s:Tlist_Init_File(fname, ftype) -+ -+ let s:tlist_{fidx}_filename = fname -+ -+ let s:tlist_{fidx}_sort_type = g:tlist_{i}_sort_type -+ unlet! g:tlist_{i}_sort_type -+ -+ let s:tlist_{fidx}_filetype = ftype -+ let s:tlist_{fidx}_mtime = getftime(fname) -+ -+ let s:tlist_{fidx}_start = 0 -+ let s:tlist_{fidx}_end = 0 -+ -+ let s:tlist_{fidx}_valid = 1 -+ -+ let s:tlist_{fidx}_tag_count = g:tlist_{i}_tag_count -+ unlet! g:tlist_{i}_tag_count -+ -+ let j = 1 -+ while j <= s:tlist_{fidx}_tag_count -+ let s:tlist_{fidx}_{j}_tag = g:tlist_{i}_{j}_tag -+ let s:tlist_{fidx}_{j}_tag_name = g:tlist_{i}_{j}_tag_name -+ let s:tlist_{fidx}_{j}_ttype_idx = g:tlist_{i}_{j}_ttype_idx -+ unlet! g:tlist_{i}_{j}_tag -+ unlet! g:tlist_{i}_{j}_tag_name -+ unlet! g:tlist_{i}_{j}_ttype_idx -+ let j = j + 1 -+ endwhile -+ -+ let j = 1 -+ while j <= s:tlist_{ftype}_count -+ let ttype = s:tlist_{ftype}_{j}_name -+ -+ if exists('g:tlist_' . i . '_' . ttype) -+ let s:tlist_{fidx}_{ttype} = g:tlist_{i}_{ttype} -+ unlet! g:tlist_{i}_{ttype} -+ let s:tlist_{fidx}_{ttype}_offset = 0 -+ let s:tlist_{fidx}_{ttype}_count = g:tlist_{i}_{ttype}_count -+ unlet! g:tlist_{i}_{ttype}_count -+ -+ let k = 1 -+ while k <= s:tlist_{fidx}_{ttype}_count -+ let s:tlist_{fidx}_{ttype}_{k} = g:tlist_{i}_{ttype}_{k} -+ unlet! g:tlist_{i}_{ttype}_{k} -+ let k = k + 1 -+ endwhile -+ else -+ let s:tlist_{fidx}_{ttype} = '' -+ let s:tlist_{fidx}_{ttype}_offset = 0 -+ let s:tlist_{fidx}_{ttype}_count = 0 -+ endif -+ -+ let j = j + 1 -+ endwhile -+ -+ let i = i + 1 -+ endwhile -+ -+ " If the taglist window is open, then update it -+ let winnum = bufwinnr(g:TagList_title) -+ if winnum != -1 -+ let save_winnr = winnr() -+ -+ " Goto the taglist window -+ call s:Tlist_Window_Goto_Window() -+ -+ " Refresh the taglist window -+ call s:Tlist_Window_Refresh() -+ -+ " Go back to the original window -+ if save_winnr != winnr() -+ call s:Tlist_Exe_Cmd_No_Acmds('wincmd p') -+ endif -+ endif -+endfunction -+ -+" Tlist_Session_Save -+" Save a taglist session (information about all the displayed files -+" and the tags) into the specified file -+function! s:Tlist_Session_Save(...) -+ if a:0 == 0 || a:1 == '' -+ call s:Tlist_Warning_Msg('Usage: TlistSessionSave ') -+ return -+ endif -+ -+ let sessionfile = a:1 -+ -+ if s:tlist_file_count == 0 -+ " There is nothing to save -+ call s:Tlist_Warning_Msg('Warning: Taglist is empty. Nothing to save.') -+ return -+ endif -+ -+ if filereadable(sessionfile) -+ let ans = input('Do you want to overwrite ' . sessionfile . ' (Y/N)?') -+ if ans !=? 'y' -+ return -+ endif -+ -+ echo "\n" -+ endif -+ -+ let old_verbose = &verbose -+ set verbose&vim -+ -+ exe 'redir! > ' . sessionfile -+ -+ silent! echo '" Taglist session file. This file is auto-generated.' -+ silent! echo '" File information' -+ silent! echo 'let tlist_file_count = ' . s:tlist_file_count -+ -+ let i = 0 -+ -+ while i < s:tlist_file_count -+ " Store information about the file -+ silent! echo 'let tlist_' . i . "_filename = '" . -+ \ s:tlist_{i}_filename . "'" -+ silent! echo 'let tlist_' . i . '_sort_type = "' . -+ \ s:tlist_{i}_sort_type . '"' -+ silent! echo 'let tlist_' . i . '_filetype = "' . -+ \ s:tlist_{i}_filetype . '"' -+ silent! echo 'let tlist_' . i . '_tag_count = ' . -+ \ s:tlist_{i}_tag_count -+ " Store information about all the tags -+ let j = 1 -+ while j <= s:tlist_{i}_tag_count -+ let txt = escape(s:tlist_{i}_{j}_tag, '"\\') -+ silent! echo 'let tlist_' . i . '_' . j . '_tag = "' . txt . '"' -+ silent! echo 'let tlist_' . i . '_' . j . '_tag_name = "' . -+ \ s:tlist_{i}_{j}_tag_name . '"' -+ silent! echo 'let tlist_' . i . '_' . j . '_ttype_idx' . ' = ' . -+ \ s:tlist_{i}_{j}_ttype_idx -+ let j = j + 1 -+ endwhile -+ -+ " Store information about all the tags grouped by their type -+ let ftype = s:tlist_{i}_filetype -+ let j = 1 -+ while j <= s:tlist_{ftype}_count -+ let ttype = s:tlist_{ftype}_{j}_name -+ if s:tlist_{i}_{ttype}_count != 0 -+ let txt = substitute(s:tlist_{i}_{ttype}, "\n", "\\\\n", 'g') -+ silent! echo 'let tlist_' . i . '_' . ttype . ' = "' . -+ \ txt . '"' -+ silent! echo 'let tlist_' . i . '_' . ttype . '_count = ' . -+ \ s:tlist_{i}_{ttype}_count -+ let k = 1 -+ while k <= s:tlist_{i}_{ttype}_count -+ silent! echo 'let tlist_' . i . '_' . ttype . '_' . k . -+ \ ' = ' . s:tlist_{i}_{ttype}_{k} -+ let k = k + 1 -+ endwhile -+ endif -+ let j = j + 1 -+ endwhile -+ -+ silent! echo -+ -+ let i = i + 1 -+ endwhile -+ -+ redir END -+ -+ let &verbose = old_verbose -+endfunction -+ -+" Tlist_Buffer_Removed -+" A buffer is removed from the Vim buffer list. Remove the tags defined -+" for that file -+function! s:Tlist_Buffer_Removed(filename) -+ call s:Tlist_Log_Msg('Tlist_Buffer_Removed (' . a:filename . ')') -+ -+ " Make sure a valid filename is supplied -+ if a:filename == '' -+ return -+ endif -+ -+ " Get tag list index of the specified file -+ let fidx = s:Tlist_Get_File_Index(a:filename) -+ if fidx == -1 -+ " File not present in the taglist -+ return -+ endif -+ -+ " Remove the file from the list -+ call s:Tlist_Remove_File(fidx, 0) -+endfunction -+ -+" When a buffer is deleted, remove the file from the taglist -+autocmd BufDelete * silent call s:Tlist_Buffer_Removed(expand(':p')) -+ -+" Tlist_Window_Open_File_Fold -+" Open the fold for the specified file and close the fold for all the -+" other files -+function! s:Tlist_Window_Open_File_Fold(acmd_file) -+ call s:Tlist_Log_Msg('Tlist_Window_Open_File_Fold (' . a:acmd_file . ')') -+ -+ " Make sure the taglist window is present -+ let winnum = bufwinnr(g:TagList_title) -+ if winnum == -1 -+ call s:Tlist_Warning_Msg('Taglist: Error - Taglist window is not open') -+ return -+ endif -+ -+ " Save the original window number -+ let org_winnr = winnr() -+ if org_winnr == winnum -+ let in_taglist_window = 1 -+ else -+ let in_taglist_window = 0 -+ endif -+ -+ if in_taglist_window -+ " When entering the taglist window, no need to update the folds -+ return -+ endif -+ -+ " Go to the taglist window -+ if !in_taglist_window -+ call s:Tlist_Exe_Cmd_No_Acmds(winnum . 'wincmd w') -+ endif -+ -+ " Close all the folds -+ silent! %foldclose -+ -+ " Get tag list index of the specified file -+ let fname = fnamemodify(a:acmd_file, ":p") -+ if filereadable(fname) -+ let fidx = s:Tlist_Get_File_Index(fname) -+ if fidx != -1 -+ " Open the fold for the file -+ exe "silent! " . s:tlist_{fidx}_start . "," . -+ \ s:tlist_{fidx}_end . "foldopen" -+ endif -+ endif -+ -+ " Go back to the original window -+ if !in_taglist_window -+ call s:Tlist_Exe_Cmd_No_Acmds(org_winnr . 'wincmd w') -+ endif -+endfunction -+ -+" Tlist_Window_Check_Auto_Open -+" Open the taglist window automatically on Vim startup. -+" Open the window only when files present in any of the Vim windows support -+" tags. -+function! s:Tlist_Window_Check_Auto_Open() -+ let open_window = 0 -+ -+ let i = 1 -+ let buf_num = winbufnr(i) -+ while buf_num != -1 -+ let filename = fnamemodify(bufname(buf_num), ':p') -+ if !s:Tlist_Skip_File(filename, getbufvar(buf_num, '&filetype')) -+ let open_window = 1 -+ break -+ endif -+ let i = i + 1 -+ let buf_num = winbufnr(i) -+ endwhile -+ -+ if open_window -+ call s:Tlist_Window_Toggle() -+ endif -+endfunction -+ -+function! s:Tlist_Menu_Add_Base_Menu() -+ call s:Tlist_Log_Msg('Adding the base menu') -+ -+ " Add the menu -+ anoremenu T&ags.Refresh\ menu :call Tlist_Menu_Refresh() -+ anoremenu T&ags.Sort\ menu\ by.Name -+ \ :call Tlist_Change_Sort('menu', 'set', 'name') -+ anoremenu T&ags.Sort\ menu\ by.Order -+ \ :call Tlist_Change_Sort('menu', 'set', 'order') -+ anoremenu T&ags.-SEP1- : -+ -+ if &mousemodel =~ 'popup' -+ anoremenu PopUp.T&ags.Refresh\ menu -+ \ :call Tlist_Menu_Refresh() -+ anoremenu PopUp.T&ags.Sort\ menu\ by.Name -+ \ :call Tlist_Change_Sort('menu', 'set', 'name') -+ anoremenu PopUp.T&ags.Sort\ menu\ by.Order -+ \ :call Tlist_Change_Sort('menu', 'set', 'order') -+ anoremenu PopUp.T&ags.-SEP1- : -+ endif -+endfunction -+ -+let s:menu_char_prefix = -+ \ '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' -+ -+" Tlist_Menu_Get_Tag_Type_Cmd -+" Get the menu command for the specified tag type -+" fidx - File type index -+" ftype - File Type -+" add_ttype_name - To add or not to add the tag type name to the menu entries -+" ttype_idx - Tag type index -+function! s:Tlist_Menu_Get_Tag_Type_Cmd(fidx, ftype, add_ttype_name, ttype_idx) -+ " Curly brace variable name optimization -+ let ftype_ttype_idx = a:ftype . '_' . a:ttype_idx -+ -+ let ttype = s:tlist_{ftype_ttype_idx}_name -+ if a:add_ttype_name -+ " If the tag type name contains space characters, escape it. This -+ " will be used to create the menu entries. -+ let ttype_fullname = escape(s:tlist_{ftype_ttype_idx}_fullname, ' ') -+ endif -+ -+ " Curly brace variable name optimization -+ let fidx_ttype = a:fidx . '_' . ttype -+ -+ " Number of tag entries for this tag type -+ let tcnt = s:tlist_{fidx_ttype}_count -+ if tcnt == 0 " No entries for this tag type -+ return '' -+ endif -+ -+ let mcmd = '' -+ -+ " Create the menu items for the tags. -+ " Depending on the number of tags of this type, split the menu into -+ " multiple sub-menus, if needed. -+ if tcnt > g:Tlist_Max_Submenu_Items -+ let j = 1 -+ while j <= tcnt -+ let final_index = j + g:Tlist_Max_Submenu_Items - 1 -+ if final_index > tcnt -+ let final_index = tcnt -+ endif -+ -+ " Extract the first and last tag name and form the -+ " sub-menu name -+ let tidx = s:tlist_{fidx_ttype}_{j} -+ let first_tag = s:tlist_{a:fidx}_{tidx}_tag_name -+ -+ let tidx = s:tlist_{fidx_ttype}_{final_index} -+ let last_tag = s:tlist_{a:fidx}_{tidx}_tag_name -+ -+ " Truncate the names, if they are greater than the -+ " max length -+ let first_tag = strpart(first_tag, 0, g:Tlist_Max_Tag_Length) -+ let last_tag = strpart(last_tag, 0, g:Tlist_Max_Tag_Length) -+ -+ " Form the menu command prefix -+ let m_prefix = 'anoremenu T\&ags.' -+ if a:add_ttype_name -+ let m_prefix = m_prefix . ttype_fullname . '.' -+ endif -+ let m_prefix = m_prefix . first_tag . '\.\.\.' . last_tag . '.' -+ -+ " Character prefix used to number the menu items (hotkey) -+ let m_prefix_idx = 0 -+ -+ while j <= final_index -+ let tidx = s:tlist_{fidx_ttype}_{j} -+ -+ let tname = s:tlist_{a:fidx}_{tidx}_tag_name -+ -+ let mcmd = mcmd . m_prefix . '\&' . -+ \ s:menu_char_prefix[m_prefix_idx] . '\.' . -+ \ tname . ' :call Tlist_Menu_Jump_To_Tag(' . -+ \ tidx . ')|' -+ -+ let m_prefix_idx = m_prefix_idx + 1 -+ let j = j + 1 -+ endwhile -+ endwhile -+ else -+ " Character prefix used to number the menu items (hotkey) -+ let m_prefix_idx = 0 -+ -+ let m_prefix = 'anoremenu T\&ags.' -+ if a:add_ttype_name -+ let m_prefix = m_prefix . ttype_fullname . '.' -+ endif -+ let j = 1 -+ while j <= tcnt -+ let tidx = s:tlist_{fidx_ttype}_{j} -+ -+ let tname = s:tlist_{a:fidx}_{tidx}_tag_name -+ -+ let mcmd = mcmd . m_prefix . '\&' . -+ \ s:menu_char_prefix[m_prefix_idx] . '\.' . -+ \ tname . ' :call Tlist_Menu_Jump_To_Tag(' . tidx -+ \ . ')|' -+ -+ let m_prefix_idx = m_prefix_idx + 1 -+ let j = j + 1 -+ endwhile -+ endif -+ -+ return mcmd -+endfunction -+ -+" Update the taglist menu with the tags for the specified file -+function! s:Tlist_Menu_File_Refresh(fidx) -+ call s:Tlist_Log_Msg('Refreshing the tag menu for ' . s:tlist_{a:fidx}_filename) -+ " The 'B' flag is needed in the 'cpoptions' option -+ let old_cpoptions = &cpoptions -+ set cpoptions&vim -+ -+ exe s:tlist_{a:fidx}_menu_cmd -+ -+ " Update the popup menu (if enabled) -+ if &mousemodel =~ 'popup' -+ let cmd = substitute(s:tlist_{a:fidx}_menu_cmd, ' T\\&ags\.', -+ \ ' PopUp.T\\\&ags.', "g") -+ exe cmd -+ endif -+ -+ " The taglist menu is not empty now -+ let s:tlist_menu_empty = 0 -+ -+ " Restore the 'cpoptions' settings -+ let &cpoptions = old_cpoptions -+endfunction -+ -+" Tlist_Menu_Update_File -+" Add the taglist menu -+function! s:Tlist_Menu_Update_File(clear_menu) -+ if !has('gui_running') -+ " Not running in GUI mode -+ return -+ endif -+ -+ call s:Tlist_Log_Msg('Updating the tag menu, clear_menu = ' . a:clear_menu) -+ -+ " Remove the tags menu -+ if a:clear_menu -+ call s:Tlist_Menu_Remove_File() -+ -+ endif -+ -+ let fname = escape(fnamemodify(bufname('%'), ':t'), '.') -+ if fname != '' -+ exe 'anoremenu T&ags.' . fname . ' ' -+ anoremenu T&ags.-SEP2- : -+ endif -+ -+ " Skip buffers with 'buftype' set to nofile, nowrite, quickfix or help -+ if &buftype != '' -+ return -+ endif -+ -+ let filename = fnamemodify(bufname('%'), ':p') -+ let ftype = &filetype -+ -+ " If the file doesn't support tag listing, skip it -+ if s:Tlist_Skip_File(filename, ftype) -+ return -+ endif -+ -+ let fidx = s:Tlist_Get_File_Index(filename) -+ if fidx == -1 || !s:tlist_{fidx}_valid -+ " Check whether this file is removed based on user request -+ " If it is, then don't display the tags for this file -+ if s:Tlist_User_Removed_File(filename) -+ return -+ endif -+ -+ " Process the tags for the file -+ let fidx = s:Tlist_Process_File(filename, ftype) -+ if fidx == -1 -+ return -+ endif -+ endif -+ -+ if !s:tlist_{fidx}_tag_count -+ return -+ endif -+ -+ if s:tlist_{fidx}_menu_cmd != '' -+ " Update the menu with the cached command -+ call s:Tlist_Menu_File_Refresh(fidx) -+ -+ return -+ endif -+ -+ " We are going to add entries to the tags menu, so the menu won't be -+ " empty -+ let s:tlist_menu_empty = 0 -+ -+ let cmd = '' -+ -+ " Determine whether the tag type name needs to be added to the menu -+ " If more than one tag type is present in the taglisting for a file, -+ " then the tag type name needs to be present -+ let add_ttype_name = -1 -+ let i = 1 -+ while i <= s:tlist_{ftype}_count && add_ttype_name < 1 -+ let ttype = s:tlist_{ftype}_{i}_name -+ if s:tlist_{fidx}_{ttype}_count -+ let add_ttype_name = add_ttype_name + 1 -+ endif -+ let i = i + 1 -+ endwhile -+ -+ " Process the tags by the tag type and get the menu command -+ let i = 1 -+ while i <= s:tlist_{ftype}_count -+ let mcmd = s:Tlist_Menu_Get_Tag_Type_Cmd(fidx, ftype, add_ttype_name, i) -+ if mcmd != '' -+ let cmd = cmd . mcmd -+ endif -+ -+ let i = i + 1 -+ endwhile -+ -+ " Cache the menu command for reuse -+ let s:tlist_{fidx}_menu_cmd = cmd -+ -+ " Update the menu -+ call s:Tlist_Menu_File_Refresh(fidx) -+endfunction -+ -+" Tlist_Menu_Remove_File -+" Remove the tags displayed in the tags menu -+function! s:Tlist_Menu_Remove_File() -+ if !has('gui_running') || s:tlist_menu_empty -+ return -+ endif -+ -+ call s:Tlist_Log_Msg('Removing the tags menu for a file') -+ -+ " Cleanup the Tags menu -+ silent! unmenu T&ags -+ if &mousemodel =~ 'popup' -+ silent! unmenu PopUp.T&ags -+ endif -+ -+ " Add a dummy menu item to retain teared off menu -+ noremenu T&ags.Dummy l -+ -+ silent! unmenu! T&ags -+ if &mousemodel =~ 'popup' -+ silent! unmenu! PopUp.T&ags -+ endif -+ -+ call s:Tlist_Menu_Add_Base_Menu() -+ -+ " Remove the dummy menu item -+ unmenu T&ags.Dummy -+ -+ let s:tlist_menu_empty = 1 -+endfunction -+ -+" Tlist_Menu_Refresh -+" Refresh the taglist menu -+function! s:Tlist_Menu_Refresh() -+ call s:Tlist_Log_Msg('Refreshing the tags menu') -+ let fidx = s:Tlist_Get_File_Index(fnamemodify(bufname('%'), ':p')) -+ if fidx != -1 -+ " Invalidate the cached menu command -+ let s:tlist_{fidx}_menu_cmd = '' -+ endif -+ -+ " Update the taglist, menu and window -+ call s:Tlist_Update_Current_File() -+endfunction -+ -+" Tlist_Menu_Jump_To_Tag -+" Jump to the selected tag -+function! s:Tlist_Menu_Jump_To_Tag(tidx) -+ let fidx = s:Tlist_Get_File_Index(fnamemodify(bufname('%'), ':p')) -+ if fidx == -1 -+ return -+ endif -+ -+ let tagpat = s:Tlist_Get_Tag_SearchPat(fidx, a:tidx) -+ if tagpat == '' -+ return -+ endif -+ -+ " Add the current cursor position to the jump list, so that user can -+ " jump back using the ' and ` marks. -+ mark ' -+ -+ silent call search(tagpat, 'w') -+ -+ " Bring the line to the middle of the window -+ normal! z. -+ -+ " If the line is inside a fold, open the fold -+ if foldclosed('.') != -1 -+ .foldopen -+ endif -+endfunction -+ -+" Tlist_Menu_Init -+" Initialize the taglist menu -+function! s:Tlist_Menu_Init() -+ call s:Tlist_Menu_Add_Base_Menu() -+ -+ " Automatically add the tags defined in the current file to the menu -+ augroup TagListMenuCmds -+ autocmd! -+ -+ if !g:Tlist_Process_File_Always -+ autocmd BufEnter * call s:Tlist_Refresh() -+ endif -+ autocmd BufLeave * call s:Tlist_Menu_Remove_File() -+ augroup end -+ -+ call s:Tlist_Menu_Update_File(0) -+endfunction -+ -+" Tlist_Vim_Session_Load -+" Initialize the taglist window/buffer, which is created when loading -+" a Vim session file. -+function! s:Tlist_Vim_Session_Load() -+ call s:Tlist_Log_Msg('Tlist_Vim_Session_Load') -+ -+ " Initialize the taglist window -+ call s:Tlist_Window_Init() -+ -+ " Refresh the taglist window -+ call s:Tlist_Window_Refresh() -+endfunction -+ -+" Tlist_Set_App -+" Set the name of the external plugin/application to which taglist -+" belongs. -+" Taglist plugin is part of another plugin like cream or winmanager. -+function! Tlist_Set_App(name) -+ if a:name == "" -+ return -+ endif -+ -+ let s:tlist_app_name = a:name -+endfunction -+ -+" Winmanager integration -+ -+" Initialization required for integration with winmanager -+function! TagList_Start() -+ " If current buffer is not taglist buffer, then don't proceed -+ if bufname('%') != '__Tag_List__' -+ return -+ endif -+ -+ call Tlist_Set_App('winmanager') -+ -+ " Get the current filename from the winmanager plugin -+ let bufnum = WinManagerGetLastEditedFile() -+ if bufnum != -1 -+ let filename = fnamemodify(bufname(bufnum), ':p') -+ let ftype = getbufvar(bufnum, '&filetype') -+ endif -+ -+ " Initialize the taglist window, if it is not already initialized -+ if !exists('s:tlist_window_initialized') || !s:tlist_window_initialized -+ call s:Tlist_Window_Init() -+ call s:Tlist_Window_Refresh() -+ let s:tlist_window_initialized = 1 -+ endif -+ -+ " Update the taglist window -+ if bufnum != -1 -+ if !s:Tlist_Skip_File(filename, ftype) && g:Tlist_Auto_Update -+ call s:Tlist_Window_Refresh_File(filename, ftype) -+ endif -+ endif -+endfunction -+ -+function! TagList_IsValid() -+ return 0 -+endfunction -+ -+function! TagList_WrapUp() -+ return 0 -+endfunction -+ -+" restore 'cpo' -+let &cpo = s:cpo_save -+unlet s:cpo_save -+ -diff -urN vim71/runtime/syntax/ada.vim vim71_ada/runtime/syntax/ada.vim ---- vim71/runtime/syntax/ada.vim 2007-05-05 20:22:26.000000000 +0200 -+++ vim71_ada/runtime/syntax/ada.vim 2008-01-16 16:37:03.000000000 +0100 -@@ -1,17 +1,17 @@ - "---------------------------------------------------------------------------- - " Description: Vim Ada syntax file - " Language: Ada (2005) --" $Id: ada.vim,v 1.2 2007/05/05 18:22:26 vimboss Exp $ -+" $Id: ada.vim 793 2007-11-01 18:29:58Z krischik $ - " Copyright: Copyright (C) 2006 Martin Krischik - " Maintainer: Martin Krischik - " David A. Wheeler - " Simon Bradley - " Contributors: Preben Randhol. --" $Author: vimboss $ --" $Date: 2007/05/05 18:22:26 $ --" Version: 4.2 --" $Revision: 1.2 $ --" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/syntax/ada.vim $ -+" $Author: krischik $ -+" $Date: 2007-11-01 19:29:58 +0100 (Do, 01 Nov 2007) $ -+" Version: 4.5 -+" $Revision: 793 $ -+" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/syntax/ada.vim $ - " http://www.dwheeler.com/vim - " History: 24.05.2006 MK Unified Headers - " 26.05.2006 MK ' should not be in iskeyword. -@@ -98,7 +98,8 @@ - " - if exists("g:ada_rainbow_color") - syntax match adaSpecial "[:;.,]" -- runtime plugin/Rainbow_Parenthsis.vim -+ call rainbow_parenthsis#LoadRound () -+ call rainbow_parenthsis#Activate () - else - syntax match adaSpecial "[:;().,]" - endif -@@ -159,7 +160,7 @@ - " Section: end {{{1 - " Unless special ("end loop", "end if", etc.), "end" marks the end of a - " begin, package, task etc. Assiging it to adaEnd. --syntax match adaEnd "\" -+syntax match adaEnd /\/ - - syntax keyword adaPreproc pragma - -diff -urN vim71/runtime/syntax/bush.vim vim71_ada/runtime/syntax/bush.vim ---- vim71/runtime/syntax/bush.vim 1970-01-01 01:00:00.000000000 +0100 -+++ vim71_ada/runtime/syntax/bush.vim 2008-01-16 16:37:03.000000000 +0100 -@@ -0,0 +1,309 @@ -+" Vim syntax file -+" Language: BUSH / AdaScript -+" Maintainer: Ken O. Burtch -+" URL: http://www.pegasoft.ca/bush -+" Last Change: 2004-06-29 -+ -+" Former Maintainer: Simon Bradley -+" (was ) -+" Other contributors: Preben Randhol. -+" The formal spec of Ada95 (ARM) is the "Ada95 Reference Manual". -+" For more Ada95 info, see http://www.gnuada.org and http://www.adapower.com. -+ -+" This vim syntax file works on vim 5.6, 5.7, 5.8 and 6.x. -+" It implements Bram Moolenaar's April 25, 2001 recommendations to make -+" the syntax file maximally portable across different versions of vim. -+" If vim 6.0+ is available, -+" this syntax file takes advantage of the vim 6.0 advanced pattern-matching -+" functions to avoid highlighting uninteresting leading spaces in -+" some expressions containing "with" and "use". -+ -+" For version 5.x: Clear all syntax items -+" For version 6.x: Quit when a syntax file was already loaded -+if version < 600 -+ syntax clear -+elseif exists("b:current_syntax") -+ finish -+endif -+ -+" Ada is entirely case-insensitive. -+syn case ignore -+ -+" We don't need to look backwards to highlight correctly; -+" this speeds things up greatly. -+syn sync minlines=1 maxlines=1 -+ -+" Highlighting commands. There are 69 reserved words in total in Ada95. -+" Some keywords are used in more than one way. For example: -+" 1. "end" is a general keyword, but "end if" ends a Conditional. -+" 2. "then" is a conditional, but "and then" is an operator. -+ -+ -+" Standard Exceptions (including I/O). -+" We'll highlight the standard exceptions, similar to vim's Python mode. -+" It's possible to redefine the standard exceptions as something else, -+" but doing so is very bad practice, so simply highlighting them makes sense. -+syn keyword adaException Constraint_Error Program_Error Storage_Error -+syn keyword adaException Tasking_Error -+syn keyword adaException Status_Error Mode_Error Name_Error Use_Error -+syn keyword adaException Device_Error End_Error Data_Error Layout_Error -+syn keyword adaException Length_Error Pattern_Error Index_Error -+syn keyword adaException Translation_Error -+syn keyword adaException Time_Error Argument_Error -+syn keyword adaException Tag_Error -+syn keyword adaException Picture_Error -+" Interfaces -+syn keyword adaException Terminator_Error Conversion_Error -+syn keyword adaException Pointer_Error Dereference_Error Update_Error -+" This isn't in the Ada spec, but a GNAT extension. -+syn keyword adaException Assert_Failure -+" We don't list ALL exceptions defined in particular compilers (e.g., GNAT), -+" because it's quite reasonable to define those phrases as non-exceptions. -+ -+ -+" We don't normally highlight types in package Standard -+" (Integer, Character, Float, etc.). I don't think it looks good -+" with the other type keywords, and many Ada programs define -+" so many of their own types that it looks inconsistent. -+" However, if you want this highlighting, turn on "ada_standard_types". -+" For package Standard's definition, see ARM section A.1. -+ -+if exists("ada_standard_types") -+ syn keyword adaBuiltinType Boolean Integer Natural Positive Float -+ syn keyword adaBuiltinType Character Wide_Character -+ syn keyword adaBuiltinType String Wide_String -+ syn keyword adaBuiltinType Duration -+ " These aren't listed in ARM section A.1's code, but they're noted as -+ " options in ARM sections 3.5.4 and 3.5.7: -+ syn keyword adaBuiltinType Short_Integer Short_Short_Integer -+ syn keyword adaBuiltinType Long_Integer Long_Long_Integer -+ syn keyword adaBuiltinType Short_Float Short_Short_Float -+ syn keyword adaBuiltinType Long_Float Long_Long_Float -+ " BUSH-specific types -+ syn keyword adaBuiltinType command -+ syn keyword adaBuiltinType socket_type -+ syn keyword adaBuiltinType unbounded_string -+ syn keyword adaBuiltinType universal_typeless -+ syn keyword adaBuiltinType universal_string -+ syn keyword adaBuiltinType universal_numeric -+endif -+ -+" There are MANY other predefined types; they've not been added, because -+" determining when they're a type requires context in general. -+" One potential addition would be Unbounded_String. -+ -+ -+syn keyword adaLabel others -+ -+syn keyword adaOperator abs mod not rem xor -+syn match adaOperator "\" -+syn match adaOperator "\" -+syn match adaOperator "\" -+syn match adaOperator "\" -+syn match adaOperator "[-+*/<>&]" -+syn keyword adaOperator ** -+syn match adaOperator "[/<>]=" -+syn keyword adaOperator => -+syn match adaOperator "\.\." -+syn match adaOperator "=" -+ -+" We won't map "adaAssignment" by default, but we need to map ":=" to -+" something or the "=" inside it will be mislabelled as an operator. -+" Note that in Ada, assignment (:=) is not considered an operator. -+syn match adaAssignment ":=" -+ -+" Handle the box, <>, specially: -+syn keyword adaSpecial <> -+ -+" Numbers, including floating point, exponents, and alternate bases. -+syn match adaNumber "\<\d[0-9_]*\(\.\d[0-9_]*\)\=\([Ee][+-]\=\d[0-9_]*\)\=\>" -+syn match adaNumber "\<\d\d\=#\x[0-9A-Fa-f_]*\(\.\x[0-9A-Fa-f_]*\)\=#\([Ee][+-]\=\d[0-9_]*\)\=" -+ -+" Identify leading numeric signs. In "A-5" the "-" is an operator, -+" but in "A:=-5" the "-" is a sign. This handles "A3+-5" (etc.) correctly. -+" This assumes that if you put a don't put a space after +/- when it's used -+" as an operator, you won't put a space before it either -- which is true -+" in code I've seen. -+syn match adaSign "[[:space:]<>=(,|:;&*/+-][+-]\d"lc=1,hs=s+1,he=e-1,me=e-1 -+ -+" Labels for the goto statement. -+syn region adaLabel start="<<" end=">>" -+ -+" Boolean Constants. -+syn keyword adaBoolean true false -+ -+" Warn people who try to use C/C++ notation erroneously: -+syn match adaError "//" -+syn match adaError "/\*" -+syn match adaError "==" -+ -+ -+if exists("ada_space_errors") -+ if !exists("ada_no_trail_space_error") -+ syn match adaSpaceError excludenl "\s\+$" -+ endif -+ if !exists("ada_no_tab_space_error") -+ syn match adaSpaceError " \+\t"me=e-1 -+ endif -+endif -+ -+" Unless special ("end loop", "end if", etc.), "end" marks the end of a -+" begin, package, task etc. Assiging it to adaEnd. -+syn match adaEnd "\" -+ -+syn keyword adaPreproc pragma -+ -+syn keyword adaRepeat exit for loop reverse while -+syn match adaRepeat "\" -+ -+syn keyword adaStatement accept delay goto raise requeue return -+syn keyword adaStatement terminate -+" BUSH-specific statements -+syn keyword adaStatement cd -+syn keyword adaStatement clear -+syn keyword adaStatement env -+syn keyword adaStatement inkey -+syn keyword adaStatement jobs -+syn keyword adaStatement logout -+syn keyword adaStatement pwd -+syn keyword adaStatement step -+syn keyword adaStatement trace -+syn keyword adaStatement typeset -+syn keyword adaStatement unset -+syn keyword adaStatement wait -+syn keyword adaStatement history -+syn keyword adaStatement "?" -+syn match adaStatement "\" -+ -+" Handle Ada's record keywords. -+" 'record' usually starts a structure, but "with null record;" does not, -+" and 'end record;' ends a structure. The ordering here is critical - -+" 'record;' matches a "with null record", so make it a keyword (this can -+" match when the 'with' or 'null' is on a previous line). -+" We see the "end" in "end record" before the word record, so we match that -+" pattern as adaStructure (and it won't match the "record;" pattern). -+syn match adaStructure "\" -+syn match adaStructure "\" -+syn match adaKeyword "\" -+syn match adaConditional "\" -+syn match adaConditional "\" -+syn match adaConditional "\" -+syn match adaConditional "\" -+syn match adaConditional "\" -+syn keyword adaConditional if case select -+syn keyword adaConditional elsif when -+ -+syn keyword adaKeyword all do exception in is new null out -+syn keyword adaKeyword separate until -+ -+" These keywords begin various constructs, and you _might_ want to -+" highlight them differently. -+syn keyword adaBegin begin body declare entry function generic -+syn keyword adaBegin package procedure protected renames task -+ -+ -+if exists("ada_withuse_ordinary") -+" Don't be fancy. Display "with" and "use" as ordinary keywords in all cases. -+ syn keyword adaKeyword with use -+else -+ " Highlight "with" and "use" clauses like C's "#include" when they're used -+ " to reference other compilation units; otherwise they're ordinary keywords. -+ " If we have vim 6.0 or later, we'll use its advanced pattern-matching -+ " capabilities so that we won't match leading spaces. -+ syn match adaKeyword "\" -+ syn match adaKeyword "\" -+ if version < 600 -+ syn match adaBeginWith "^\s*\(\(with\(\s\+type\)\=\)\|\(use\)\)\>" contains=adaInc -+ syn match adaSemiWith ";\s*\(\(with\(\s\+type\)\=\)\|\(use\)\)\>"lc=1 contains=adaInc -+ else -+ syn match adaBeginWith "^\s*\zs\(\(with\(\s\+type\)\=\)\|\(use\)\)\>" contains=adaInc -+ syn match adaSemiWith ";\s*\zs\(\(with\(\s\+type\)\=\)\|\(use\)\)\>" contains=adaInc -+ endif -+ syn match adaInc "\" contained contains=NONE -+ syn match adaInc "\" contained contains=NONE -+ syn match adaInc "\" contained contains=NONE -+ " Recognize "with null record" as a keyword (even the "record"). -+ syn match adaKeyword "\" -+ " Consider generic formal parameters of subprograms and packages as keywords. -+ if version < 600 -+ syn match adaKeyword ";\s*with\s\+\(function\|procedure\|package\)\>" -+ syn match adaKeyword "^\s*with\s\+\(function\|procedure\|package\)\>" -+ else -+ syn match adaKeyword ";\s*\zswith\s\+\(function\|procedure\|package\)\>" -+ syn match adaKeyword "^\s*\zswith\s\+\(function\|procedure\|package\)\>" -+ endif -+endif -+ -+ -+" String and character constants. -+syn region adaString start=+"+ skip=+""+ end=+"+ -+syn match adaCharacter "'.'" -+ -+" Todo (only highlighted in comments) -+syn keyword adaTodo contained TODO FIXME XXX -+ -+" Comments. -+syn region adaComment oneline contains=adaTodo start="--" end="$" -+ -+ -+ -+" Define the default highlighting. -+" For version 5.7 and earlier: only when not done already -+" For version 5.8 and later: only when an item doesn't have highlighting yet -+if version >= 508 || !exists("did_ada_syn_inits") -+ if version < 508 -+ let did_ada_syn_inits = 1 -+ command -nargs=+ HiLink hi link -+ else -+ command -nargs=+ HiLink hi def link -+ endif -+ -+ " The default methods for highlighting. Can be overridden later. -+ HiLink adaCharacter Character -+ HiLink adaComment Comment -+ HiLink adaConditional Conditional -+ HiLink adaKeyword Keyword -+ HiLink adaLabel Label -+ HiLink adaNumber Number -+ HiLink adaSign Number -+ HiLink adaOperator Operator -+ HiLink adaPreproc PreProc -+ HiLink adaRepeat Repeat -+ HiLink adaSpecial Special -+ HiLink adaStatement Statement -+ HiLink adaString String -+ HiLink adaStructure Structure -+ HiLink adaTodo Todo -+ HiLink adaType Type -+ HiLink adaTypedef Typedef -+ HiLink adaStorageClass StorageClass -+ HiLink adaBoolean Boolean -+ HiLink adaException Exception -+ HiLink adaInc Include -+ HiLink adaError Error -+ HiLink adaSpaceError Error -+ HiLink adaBuiltinType Type -+ -+ if exists("ada_begin_preproc") -+ " This is the old default display: -+ HiLink adaBegin PreProc -+ HiLink adaEnd PreProc -+ else -+ " This is the new default display: -+ HiLink adaBegin Keyword -+ HiLink adaEnd Keyword -+ endif -+ -+ delcommand HiLink -+endif -+ -+let b:current_syntax = "ada" -+ -+" vim: ts=8 From c38290dddd0a711b3336ddc5bcc8c1654a832502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 31 May 2011 22:22:50 +0300 Subject: [PATCH 0228/3803] Own the /usr/share/vim/vim73 dir. --- vim.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vim.spec b/vim.spec index 282bba6a..94354557 100644 --- a/vim.spec +++ b/vim.spec @@ -24,7 +24,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{beta}%{patchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Vim Group: Applications/Editors Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}%{?beta}%{?CVSDATE}.tar.bz2 @@ -911,6 +911,7 @@ rm -rf $RPM_BUILD_ROOT %doc Changelog.rpm %dir %{_datadir}/%{name} %{_datadir}/%{name}/vimfiles/template.spec +%dir %{_datadir}/%{name}/%{vimdir} %{_datadir}/%{name}/%{vimdir}/autoload %{_datadir}/%{name}/%{vimdir}/colors %{_datadir}/%{name}/%{vimdir}/compiler @@ -1087,6 +1088,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Tue May 31 2011 Ville Skyttä - 2:7.3.206-2 +- Own the /usr/share/vim/vim73 dir. + * Mon May 30 2011 Karsten Hopp 7.3.206-1 - drop xxd-locale patch - update to patchlevel 206 From 25cb99877b22b772c1ec7b5a06705572592ec830 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0229/3803] Patchlevel 056 --- 7.3.056 | 542 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 542 insertions(+) create mode 100644 7.3.056 diff --git a/7.3.056 b/7.3.056 new file mode 100644 index 00000000..49c91b62 --- /dev/null +++ b/7.3.056 @@ -0,0 +1,542 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.056 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.056 +Problem: "getline" argument in do_cmdline() shadows global. +Solution: Rename the argument. +Files: src/ex_docmd.c + + +*** ../vim-7.3.055/src/ex_docmd.c 2010-11-10 18:59:50.000000000 +0100 +--- src/ex_docmd.c 2010-11-16 11:24:40.000000000 +0100 +*************** +*** 733,739 **** + * do_cmdline(): execute one Ex command line + * + * 1. Execute "cmdline" when it is not NULL. +! * If "cmdline" is NULL, or more lines are needed, getline() is used. + * 2. Split up in parts separated with '|'. + * + * This function can be called recursively! +--- 733,739 ---- + * do_cmdline(): execute one Ex command line + * + * 1. Execute "cmdline" when it is not NULL. +! * If "cmdline" is NULL, or more lines are needed, fgetline() is used. + * 2. Split up in parts separated with '|'. + * + * This function can be called recursively! +*************** +*** 741,747 **** + * flags: + * DOCMD_VERBOSE - The command will be included in the error message. + * DOCMD_NOWAIT - Don't call wait_return() and friends. +! * DOCMD_REPEAT - Repeat execution until getline() returns NULL. + * DOCMD_KEYTYPED - Don't reset KeyTyped. + * DOCMD_EXCRESET - Reset the exception environment (used for debugging). + * DOCMD_KEEPLINE - Store first typed line (for repeating with "."). +--- 741,747 ---- + * flags: + * DOCMD_VERBOSE - The command will be included in the error message. + * DOCMD_NOWAIT - Don't call wait_return() and friends. +! * DOCMD_REPEAT - Repeat execution until fgetline() returns NULL. + * DOCMD_KEYTYPED - Don't reset KeyTyped. + * DOCMD_EXCRESET - Reset the exception environment (used for debugging). + * DOCMD_KEEPLINE - Store first typed line (for repeating with "."). +*************** +*** 749,763 **** + * return FAIL if cmdline could not be executed, OK otherwise + */ + int +! do_cmdline(cmdline, getline, cookie, flags) + char_u *cmdline; +! char_u *(*getline) __ARGS((int, void *, int)); +! void *cookie; /* argument for getline() */ + int flags; + { + char_u *next_cmdline; /* next cmd to execute */ + char_u *cmdline_copy = NULL; /* copy of cmd line */ +! int used_getline = FALSE; /* used "getline" to obtain command */ + static int recursive = 0; /* recursive depth */ + int msg_didout_before_start = 0; + int count = 0; /* line number count */ +--- 749,763 ---- + * return FAIL if cmdline could not be executed, OK otherwise + */ + int +! do_cmdline(cmdline, fgetline, cookie, flags) + char_u *cmdline; +! char_u *(*fgetline) __ARGS((int, void *, int)); +! void *cookie; /* argument for fgetline() */ + int flags; + { + char_u *next_cmdline; /* next cmd to execute */ + char_u *cmdline_copy = NULL; /* copy of cmd line */ +! int used_getline = FALSE; /* used "fgetline" to obtain command */ + static int recursive = 0; /* recursive depth */ + int msg_didout_before_start = 0; + int count = 0; /* line number count */ +*************** +*** 775,788 **** + struct msglist **saved_msg_list = NULL; + struct msglist *private_msg_list; + +! /* "getline" and "cookie" passed to do_one_cmd() */ + char_u *(*cmd_getline) __ARGS((int, void *, int)); + void *cmd_cookie; + struct loop_cookie cmd_loop_cookie; + void *real_cookie; + int getline_is_func; + #else +! # define cmd_getline getline + # define cmd_cookie cookie + #endif + static int call_depth = 0; /* recursiveness */ +--- 775,788 ---- + struct msglist **saved_msg_list = NULL; + struct msglist *private_msg_list; + +! /* "fgetline" and "cookie" passed to do_one_cmd() */ + char_u *(*cmd_getline) __ARGS((int, void *, int)); + void *cmd_cookie; + struct loop_cookie cmd_loop_cookie; + void *real_cookie; + int getline_is_func; + #else +! # define cmd_getline fgetline + # define cmd_cookie cookie + #endif + static int call_depth = 0; /* recursiveness */ +*************** +*** 822,831 **** + cstack.cs_lflags = 0; + ga_init2(&lines_ga, (int)sizeof(wcmd_T), 10); + +! real_cookie = getline_cookie(getline, cookie); + + /* Inside a function use a higher nesting level. */ +! getline_is_func = getline_equal(getline, cookie, get_func_line); + if (getline_is_func && ex_nesting_level == func_level(real_cookie)) + ++ex_nesting_level; + +--- 822,831 ---- + cstack.cs_lflags = 0; + ga_init2(&lines_ga, (int)sizeof(wcmd_T), 10); + +! real_cookie = getline_cookie(fgetline, cookie); + + /* Inside a function use a higher nesting level. */ +! getline_is_func = getline_equal(fgetline, cookie, get_func_line); + if (getline_is_func && ex_nesting_level == func_level(real_cookie)) + ++ex_nesting_level; + +*************** +*** 837,843 **** + breakpoint = func_breakpoint(real_cookie); + dbg_tick = func_dbg_tick(real_cookie); + } +! else if (getline_equal(getline, cookie, getsourceline)) + { + fname = sourcing_name; + breakpoint = source_breakpoint(real_cookie); +--- 837,843 ---- + breakpoint = func_breakpoint(real_cookie); + dbg_tick = func_dbg_tick(real_cookie); + } +! else if (getline_equal(fgetline, cookie, getsourceline)) + { + fname = sourcing_name; + breakpoint = source_breakpoint(real_cookie); +*************** +*** 881,887 **** + * KeyTyped is only set when calling vgetc(). Reset it here when not + * calling vgetc() (sourced command lines). + */ +! if (!(flags & DOCMD_KEYTYPED) && !getline_equal(getline, cookie, getexline)) + KeyTyped = FALSE; + + /* +--- 881,888 ---- + * KeyTyped is only set when calling vgetc(). Reset it here when not + * calling vgetc() (sourced command lines). + */ +! if (!(flags & DOCMD_KEYTYPED) +! && !getline_equal(fgetline, cookie, getexline)) + KeyTyped = FALSE; + + /* +*************** +*** 894,900 **** + do + { + #ifdef FEAT_EVAL +! getline_is_func = getline_equal(getline, cookie, get_func_line); + #endif + + /* stop skipping cmds for an error msg after all endif/while/for */ +--- 895,901 ---- + do + { + #ifdef FEAT_EVAL +! getline_is_func = getline_equal(fgetline, cookie, get_func_line); + #endif + + /* stop skipping cmds for an error msg after all endif/while/for */ +*************** +*** 909,915 **** + + /* + * 1. If repeating a line in a loop, get a line from lines_ga. +! * 2. If no line given: Get an allocated line with getline(). + * 3. If a line is given: Make a copy, so we can mess with it. + */ + +--- 910,916 ---- + + /* + * 1. If repeating a line in a loop, get a line from lines_ga. +! * 2. If no line given: Get an allocated line with fgetline(). + * 3. If a line is given: Make a copy, so we can mess with it. + */ + +*************** +*** 938,949 **** + } + #ifdef FEAT_PROFILE + else if (do_profiling == PROF_YES +! && getline_equal(getline, cookie, getsourceline)) + script_line_end(); + #endif + + /* Check if a sourced file hit a ":finish" command. */ +! if (source_finished(getline, cookie)) + { + retval = FAIL; + break; +--- 939,950 ---- + } + #ifdef FEAT_PROFILE + else if (do_profiling == PROF_YES +! && getline_equal(fgetline, cookie, getsourceline)) + script_line_end(); + #endif + + /* Check if a sourced file hit a ":finish" command. */ +! if (source_finished(fgetline, cookie)) + { + retval = FAIL; + break; +*************** +*** 954,960 **** + && *dbg_tick != debug_tick) + { + *breakpoint = dbg_find_breakpoint( +! getline_equal(getline, cookie, getsourceline), + fname, sourcing_lnum); + *dbg_tick = debug_tick; + } +--- 955,961 ---- + && *dbg_tick != debug_tick) + { + *breakpoint = dbg_find_breakpoint( +! getline_equal(fgetline, cookie, getsourceline), + fname, sourcing_lnum); + *dbg_tick = debug_tick; + } +*************** +*** 969,975 **** + dbg_breakpoint(fname, sourcing_lnum); + /* Find next breakpoint. */ + *breakpoint = dbg_find_breakpoint( +! getline_equal(getline, cookie, getsourceline), + fname, sourcing_lnum); + *dbg_tick = debug_tick; + } +--- 970,976 ---- + dbg_breakpoint(fname, sourcing_lnum); + /* Find next breakpoint. */ + *breakpoint = dbg_find_breakpoint( +! getline_equal(fgetline, cookie, getsourceline), + fname, sourcing_lnum); + *dbg_tick = debug_tick; + } +*************** +*** 978,984 **** + { + if (getline_is_func) + func_line_start(real_cookie); +! else if (getline_equal(getline, cookie, getsourceline)) + script_line_start(); + } + # endif +--- 979,985 ---- + { + if (getline_is_func) + func_line_start(real_cookie); +! else if (getline_equal(fgetline, cookie, getsourceline)) + script_line_start(); + } + # endif +*************** +*** 987,993 **** + if (cstack.cs_looplevel > 0) + { + /* Inside a while/for loop we need to store the lines and use them +! * again. Pass a different "getline" function to do_one_cmd() + * below, so that it stores lines in or reads them from + * "lines_ga". Makes it possible to define a function inside a + * while/for loop. */ +--- 988,994 ---- + if (cstack.cs_looplevel > 0) + { + /* Inside a while/for loop we need to store the lines and use them +! * again. Pass a different "fgetline" function to do_one_cmd() + * below, so that it stores lines in or reads them from + * "lines_ga". Makes it possible to define a function inside a + * while/for loop. */ +*************** +*** 995,1021 **** + cmd_cookie = (void *)&cmd_loop_cookie; + cmd_loop_cookie.lines_gap = &lines_ga; + cmd_loop_cookie.current_line = current_line; +! cmd_loop_cookie.getline = getline; + cmd_loop_cookie.cookie = cookie; + cmd_loop_cookie.repeating = (current_line < lines_ga.ga_len); + } + else + { +! cmd_getline = getline; + cmd_cookie = cookie; + } + #endif + +! /* 2. If no line given, get an allocated line with getline(). */ + if (next_cmdline == NULL) + { + /* + * Need to set msg_didout for the first line after an ":if", + * otherwise the ":if" will be overwritten. + */ +! if (count == 1 && getline_equal(getline, cookie, getexline)) + msg_didout = TRUE; +! if (getline == NULL || (next_cmdline = getline(':', cookie, + #ifdef FEAT_EVAL + cstack.cs_idx < 0 ? 0 : (cstack.cs_idx + 1) * 2 + #else +--- 996,1022 ---- + cmd_cookie = (void *)&cmd_loop_cookie; + cmd_loop_cookie.lines_gap = &lines_ga; + cmd_loop_cookie.current_line = current_line; +! cmd_loop_cookie.getline = fgetline; + cmd_loop_cookie.cookie = cookie; + cmd_loop_cookie.repeating = (current_line < lines_ga.ga_len); + } + else + { +! cmd_getline = fgetline; + cmd_cookie = cookie; + } + #endif + +! /* 2. If no line given, get an allocated line with fgetline(). */ + if (next_cmdline == NULL) + { + /* + * Need to set msg_didout for the first line after an ":if", + * otherwise the ":if" will be overwritten. + */ +! if (count == 1 && getline_equal(fgetline, cookie, getexline)) + msg_didout = TRUE; +! if (fgetline == NULL || (next_cmdline = fgetline(':', cookie, + #ifdef FEAT_EVAL + cstack.cs_idx < 0 ? 0 : (cstack.cs_idx + 1) * 2 + #else +*************** +*** 1142,1148 **** + * If the command was typed, remember it for the ':' register. + * Do this AFTER executing the command to make :@: work. + */ +! if (getline_equal(getline, cookie, getexline) + && new_last_cmdline != NULL) + { + vim_free(last_cmdline); +--- 1143,1149 ---- + * If the command was typed, remember it for the ':' register. + * Do this AFTER executing the command to make :@: work. + */ +! if (getline_equal(fgetline, cookie, getexline) + && new_last_cmdline != NULL) + { + vim_free(last_cmdline); +*************** +*** 1163,1169 **** + #ifdef FEAT_EVAL + /* reset did_emsg for a function that is not aborted by an error */ + if (did_emsg && !force_abort +! && getline_equal(getline, cookie, get_func_line) + && !func_has_abort(real_cookie)) + did_emsg = FALSE; + +--- 1164,1170 ---- + #ifdef FEAT_EVAL + /* reset did_emsg for a function that is not aborted by an error */ + if (did_emsg && !force_abort +! && getline_equal(fgetline, cookie, get_func_line) + && !func_has_abort(real_cookie)) + did_emsg = FALSE; + +*************** +*** 1202,1208 **** + if (breakpoint != NULL) + { + *breakpoint = dbg_find_breakpoint( +! getline_equal(getline, cookie, getsourceline), + fname, + ((wcmd_T *)lines_ga.ga_data)[current_line].lnum-1); + *dbg_tick = debug_tick; +--- 1203,1209 ---- + if (breakpoint != NULL) + { + *breakpoint = dbg_find_breakpoint( +! getline_equal(fgetline, cookie, getsourceline), + fname, + ((wcmd_T *)lines_ga.ga_data)[current_line].lnum-1); + *dbg_tick = debug_tick; +*************** +*** 1296,1303 **** + #endif + ) + && !(did_emsg && used_getline +! && (getline_equal(getline, cookie, getexmodeline) +! || getline_equal(getline, cookie, getexline))) + && (next_cmdline != NULL + #ifdef FEAT_EVAL + || cstack.cs_idx >= 0 +--- 1297,1304 ---- + #endif + ) + && !(did_emsg && used_getline +! && (getline_equal(fgetline, cookie, getexmodeline) +! || getline_equal(fgetline, cookie, getexline))) + && (next_cmdline != NULL + #ifdef FEAT_EVAL + || cstack.cs_idx >= 0 +*************** +*** 1316,1324 **** + * unclosed conditional. + */ + if (!got_int && !did_throw +! && ((getline_equal(getline, cookie, getsourceline) +! && !source_finished(getline, cookie)) +! || (getline_equal(getline, cookie, get_func_line) + && !func_has_ended(real_cookie)))) + { + if (cstack.cs_flags[cstack.cs_idx] & CSF_TRY) +--- 1317,1325 ---- + * unclosed conditional. + */ + if (!got_int && !did_throw +! && ((getline_equal(fgetline, cookie, getsourceline) +! && !source_finished(fgetline, cookie)) +! || (getline_equal(fgetline, cookie, get_func_line) + && !func_has_ended(real_cookie)))) + { + if (cstack.cs_flags[cstack.cs_idx] & CSF_TRY) +*************** +*** 1354,1360 **** + /* If a missing ":endtry", ":endwhile", ":endfor", or ":endif" or a memory + * lack was reported above and the error message is to be converted to an + * exception, do this now after rewinding the cstack. */ +! do_errthrow(&cstack, getline_equal(getline, cookie, get_func_line) + ? (char_u *)"endfunction" : (char_u *)NULL); + + if (trylevel == 0) +--- 1355,1361 ---- + /* If a missing ":endtry", ":endwhile", ":endfor", or ":endif" or a memory + * lack was reported above and the error message is to be converted to an + * exception, do this now after rewinding the cstack. */ +! do_errthrow(&cstack, getline_equal(fgetline, cookie, get_func_line) + ? (char_u *)"endfunction" : (char_u *)NULL); + + if (trylevel == 0) +*************** +*** 1449,1457 **** + */ + if (did_throw) + need_rethrow = TRUE; +! if ((getline_equal(getline, cookie, getsourceline) + && ex_nesting_level > source_level(real_cookie)) +! || (getline_equal(getline, cookie, get_func_line) + && ex_nesting_level > func_level(real_cookie) + 1)) + { + if (!did_throw) +--- 1450,1458 ---- + */ + if (did_throw) + need_rethrow = TRUE; +! if ((getline_equal(fgetline, cookie, getsourceline) + && ex_nesting_level > source_level(real_cookie)) +! || (getline_equal(fgetline, cookie, get_func_line) + && ex_nesting_level > func_level(real_cookie) + 1)) + { + if (!did_throw) +*************** +*** 1460,1475 **** + else + { + /* When leaving a function, reduce nesting level. */ +! if (getline_equal(getline, cookie, get_func_line)) + --ex_nesting_level; + /* + * Go to debug mode when returning from a function in which we are + * single-stepping. + */ +! if ((getline_equal(getline, cookie, getsourceline) +! || getline_equal(getline, cookie, get_func_line)) + && ex_nesting_level + 1 <= debug_break_level) +! do_debug(getline_equal(getline, cookie, getsourceline) + ? (char_u *)_("End of sourced file") + : (char_u *)_("End of function")); + } +--- 1461,1476 ---- + else + { + /* When leaving a function, reduce nesting level. */ +! if (getline_equal(fgetline, cookie, get_func_line)) + --ex_nesting_level; + /* + * Go to debug mode when returning from a function in which we are + * single-stepping. + */ +! if ((getline_equal(fgetline, cookie, getsourceline) +! || getline_equal(fgetline, cookie, get_func_line)) + && ex_nesting_level + 1 <= debug_break_level) +! do_debug(getline_equal(fgetline, cookie, getsourceline) + ? (char_u *)_("End of sourced file") + : (char_u *)_("End of function")); + } +*** ../vim-7.3.055/src/version.c 2010-11-16 11:28:33.000000000 +0100 +--- src/version.c 2010-11-16 11:27:09.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 56, + /**/ + +-- +Lawmakers made it obligatory for everybody to take at least one bath +each week -- on Saturday night. + [real standing law in Vermont, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 14af4458167bac747cf6ac1e23e374398a0c34c7 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0230/3803] Patchlevel 057 --- 7.3.057 | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 7.3.057 diff --git a/7.3.057 b/7.3.057 new file mode 100644 index 00000000..d4ea2bc0 --- /dev/null +++ b/7.3.057 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.057 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.057 +Problem: Segfault with command line abbreviation. (Randy Morris) +Solution: Don't retrigger the abbreviation when abandoning the command line. + Continue editing the command line after the error. +Files: src/ex_getln.c + + +*** ../vim-7.3.056/src/ex_getln.c 2010-11-10 15:37:00.000000000 +0100 +--- src/ex_getln.c 2010-11-16 14:03:09.000000000 +0100 +*************** +*** 712,718 **** + } + } + beep_flush(); +! c = ESC; + } + #endif + else +--- 712,722 ---- + } + } + beep_flush(); +! got_int = FALSE; /* don't abandon the command line */ +! did_emsg = FALSE; +! emsg_on_display = FALSE; +! redrawcmd(); +! goto cmdline_not_changed; + } + #endif + else +*** ../vim-7.3.056/src/version.c 2010-11-16 11:29:30.000000000 +0100 +--- src/version.c 2010-11-16 14:04:25.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 57, + /**/ + +-- +FROG: How you English say: I one more time, mac, I unclog my nose towards + you, sons of a window-dresser, so, you think you could out-clever us + French fellows with your silly knees-bent creeping about advancing + behaviour. (blows a raspberry) I wave my private parts at your aunties, + you brightly-coloured, mealy-templed, cranberry-smelling, electric + donkey-bottom biters. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 89d807edda325e7d161eb113a4c19217c5f188f0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0231/3803] Patchlevel 058 --- 7.3.058 | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 7.3.058 diff --git a/7.3.058 b/7.3.058 new file mode 100644 index 00000000..b1ede331 --- /dev/null +++ b/7.3.058 @@ -0,0 +1,158 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.058 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.058 +Problem: Error "code converter not found" when loading Ruby script. +Solution: Load Gem module. (Yasuhiro Matsumoto) +Files: src/if_ruby.c + + +*** ../vim-7.3.057/src/if_ruby.c 2010-10-27 17:40:53.000000000 +0200 +--- src/if_ruby.c 2010-11-16 14:37:48.000000000 +0100 +*************** +*** 229,234 **** +--- 229,237 ---- + # define rb_enc_find_index dll_rb_enc_find_index + # define rb_enc_find dll_rb_enc_find + # define rb_enc_str_new dll_rb_enc_str_new ++ # define rb_intern2 dll_rb_intern2 ++ # define rb_const_remove dll_rb_const_remove ++ # define Init_prelude dll_Init_prelude + # define rb_sprintf dll_rb_sprintf + # define ruby_init_stack dll_ruby_init_stack + #endif +*************** +*** 317,322 **** +--- 320,328 ---- + static int (*dll_rb_enc_find_index) (const char*); + static rb_encoding* (*dll_rb_enc_find) (const char*); + static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*); ++ static ID (*dll_rb_intern2) (const char*, long); ++ static void (*dll_Init_prelude) (void); ++ static VALUE (*dll_rb_const_remove) (VALUE, ID); + static VALUE (*dll_rb_sprintf) (const char*, ...); + static void (*ruby_init_stack)(VALUE*); + #endif +*************** +*** 425,430 **** +--- 431,439 ---- + {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, + {"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find}, + {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new}, ++ {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2}, ++ {"rb_const_remove", (RUBY_PROC*)&dll_rb_const_remove}, ++ {"Init_prelude", (RUBY_PROC*)&dll_Init_prelude}, + {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf}, + {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack}, + #endif +*************** +*** 662,667 **** +--- 671,682 ---- + ruby_io_init(); + #ifdef RUBY19_OR_LATER + rb_enc_find_index("encdb"); ++ ++ /* This avoids the error "Encoding::ConverterNotFoundError: code ++ * converter not found (UTF-16LE to ASCII-8BIT)". */ ++ rb_define_module("Gem"); ++ Init_prelude(); ++ rb_const_remove(rb_cObject, rb_intern2("TMP_RUBY_PREFIX", 15)); + #endif + ruby_vim_init(); + ruby_initialized = 1; +*************** +*** 946,958 **** + + static VALUE get_buffer_line(buf_T *buf, linenr_T n) + { +! if (n > 0 && n <= buf->b_ml.ml_line_count) +! { +! char *line = (char *)ml_get_buf(buf, n, FALSE); +! return line ? vim_str2rb_enc_str(line) : Qnil; +! } +! rb_raise(rb_eIndexError, "line number %ld out of range", (long)n); +! return Qnil; /* For stop warning */ + } + + static VALUE buffer_aref(VALUE self, VALUE num) +--- 961,969 ---- + + static VALUE get_buffer_line(buf_T *buf, linenr_T n) + { +! if (n <= 0 || n > buf->b_ml.ml_line_count) +! rb_raise(rb_eIndexError, "line number %ld out of range", (long)n); +! return vim_str2rb_enc_str((char *)ml_get_buf(buf, n, FALSE)); + } + + static VALUE buffer_aref(VALUE self, VALUE num) +*************** +*** 991,999 **** + else + { + rb_raise(rb_eIndexError, "line number %ld out of range", (long)n); +- #ifndef __GNUC__ +- return Qnil; /* For stop warning */ +- #endif + } + return str; + } +--- 1002,1007 ---- +*************** +*** 1048,1054 **** + long n = NUM2LONG(num); + aco_save_T aco; + +! if (line == NULL) { + rb_raise(rb_eIndexError, "NULL line"); + } + else if (n >= 0 && n <= buf->b_ml.ml_line_count) +--- 1056,1063 ---- + long n = NUM2LONG(num); + aco_save_T aco; + +! if (line == NULL) +! { + rb_raise(rb_eIndexError, "NULL line"); + } + else if (n >= 0 && n <= buf->b_ml.ml_line_count) +*************** +*** 1072,1078 **** + + update_curbuf(NOT_VALID); + } +! else { + rb_raise(rb_eIndexError, "line number %ld out of range", n); + } + return str; +--- 1081,1088 ---- + + update_curbuf(NOT_VALID); + } +! else +! { + rb_raise(rb_eIndexError, "line number %ld out of range", n); + } + return str; +*** ../vim-7.3.057/src/version.c 2010-11-16 14:05:48.000000000 +0100 +--- src/version.c 2010-11-16 14:44:42.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 58, + /**/ + +-- +SIGIRO -- irony detected (iron core dumped) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 95c478243418d5b23db5e3a72d10ed3eccc5ede7 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0232/3803] Patchlevel 059 --- 7.3.059 | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 7.3.059 diff --git a/7.3.059 b/7.3.059 new file mode 100644 index 00000000..6e99f876 --- /dev/null +++ b/7.3.059 @@ -0,0 +1,116 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.059 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.059 +Problem: Netbeans: Problem with recursively handling messages for Athena + and Motif. +Solution: Call netbeans_parse_messages() in the main loop, like it's done + for GTK. (Xavier de Gaye) +Files: src/gui_x11.c, src/netbeans.c + + +*** ../vim-7.3.058/src/gui_x11.c 2010-08-15 21:57:25.000000000 +0200 +--- src/gui_x11.c 2010-11-16 14:53:18.000000000 +0100 +*************** +*** 2895,2900 **** +--- 2895,2905 ---- + focus = gui.in_focus; + } + ++ #if defined(FEAT_NETBEANS_INTG) ++ /* Process any queued netbeans messages. */ ++ netbeans_parse_messages(); ++ #endif ++ + /* + * Don't use gui_mch_update() because then we will spin-lock until a + * char arrives, instead we use XtAppProcessEvent() to hang until an +*** ../vim-7.3.058/src/netbeans.c 2010-09-30 21:03:13.000000000 +0200 +--- src/netbeans.c 2010-11-16 14:52:55.000000000 +0100 +*************** +*** 726,734 **** + static char_u *buf = NULL; + int len = 0; + int readlen = 0; +- #if defined(NB_HAS_GUI) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32) +- static int level = 0; +- #endif + #ifdef HAVE_SELECT + struct timeval tval; + fd_set rfds; +--- 726,731 ---- +*************** +*** 744,756 **** + return; + } + +- #if defined(NB_HAS_GUI) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32) +- /* recursion guard; this will be called from the X event loop at unknown +- * moments */ +- if (NB_HAS_GUI) +- ++level; +- #endif +- + /* Allocate a buffer to read into. */ + if (buf == NULL) + { +--- 741,746 ---- +*************** +*** 803,823 **** + return; /* don't try to parse it */ + } + +! #if defined(NB_HAS_GUI) && !defined(FEAT_GUI_W32) +! /* Let the main loop handle messages. */ +! if (NB_HAS_GUI) +! { +! # ifdef FEAT_GUI_GTK +! if (gtk_main_level() > 0) +! gtk_main_quit(); +! # else +! /* Parse the messages now, but avoid recursion. */ +! if (level == 1) +! netbeans_parse_messages(); +! +! --level; +! # endif +! } + #endif + } + +--- 793,801 ---- + return; /* don't try to parse it */ + } + +! #if defined(NB_HAS_GUI) && defined(FEAT_GUI_GTK) +! if (NB_HAS_GUI && gtk_main_level() > 0) +! gtk_main_quit(); + #endif + } + +*** ../vim-7.3.058/src/version.c 2010-11-16 14:46:14.000000000 +0100 +--- src/version.c 2010-11-16 14:50:57.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 59, + /**/ + + +-- +ARTHUR: If you do not open these doors, we will take this castle by force ... + [A bucket of slops land on ARTHUR. He tries to retain his dignity.] + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 4d803331438a9457e4ba4a2c913798c7569d8032 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0233/3803] Patchlevel 060 --- 7.3.060 | 227 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 7.3.060 diff --git a/7.3.060 b/7.3.060 new file mode 100644 index 00000000..0edf20ce --- /dev/null +++ b/7.3.060 @@ -0,0 +1,227 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.060 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.060 +Problem: Netbeans: crash when socket is disconnected unexpectedly. +Solution: Don't cleanup when a read fails, put a message in the queue and + disconnect later. (Xavier de Gaye) +Files: src/netbeans.c + + +*** ../vim-7.3.059/src/netbeans.c 2010-11-16 15:04:51.000000000 +0100 +--- src/netbeans.c 2010-11-16 15:48:36.000000000 +0100 +*************** +*** 135,148 **** + static int needupdate = 0; + static int inAtomic = 0; + + static void +! netbeans_close(void) + { +- if (!NETBEANS_OPEN) +- return; +- +- netbeans_send_disconnect(); +- + #ifdef FEAT_GUI_X11 + if (inputHandler != (XtInputId)NULL) + { +--- 135,146 ---- + static int needupdate = 0; + static int inAtomic = 0; + ++ /* ++ * Close the socket and remove the input handlers. ++ */ + static void +! nb_close_socket(void) + { + #ifdef FEAT_GUI_X11 + if (inputHandler != (XtInputId)NULL) + { +*************** +*** 167,179 **** + # endif + #endif + + #ifdef FEAT_BEVAL + bevalServers &= ~BEVAL_NETBEANS; + #endif + +- sock_close(nbsock); +- nbsock = -1; +- + needupdate = 0; + inAtomic = 0; + nb_free(); +--- 165,191 ---- + # endif + #endif + ++ sock_close(nbsock); ++ nbsock = -1; ++ } ++ ++ /* ++ * Close the connection and cleanup. ++ * May be called when nb_close_socket() was called earlier. ++ */ ++ static void ++ netbeans_close(void) ++ { ++ if (NETBEANS_OPEN) ++ { ++ netbeans_send_disconnect(); ++ nb_close_socket(); ++ } ++ + #ifdef FEAT_BEVAL + bevalServers &= ~BEVAL_NETBEANS; + #endif + + needupdate = 0; + inAtomic = 0; + nb_free(); +*************** +*** 632,640 **** + char_u *p; + queue_T *node; + +- if (!NETBEANS_OPEN) +- return; +- + while (head.next != NULL && head.next != &head) + { + node = head.next; +--- 644,649 ---- +*************** +*** 720,725 **** +--- 729,736 ---- + } + #endif + ++ #define DETACH_MSG "DETACH\n" ++ + void + netbeans_read() + { +*************** +*** 780,801 **** + break; /* did read everything that's available */ + } + + if (readlen <= 0) + { +! /* read error or didn't read anything */ +! netbeans_close(); +! nbdebug(("messageFromNetbeans: Error in read() from socket\n")); + if (len < 0) + { + nbdebug(("read from Netbeans socket\n")); + PERROR(_("read from Netbeans socket")); + } +- return; /* don't try to parse it */ + } + + #if defined(NB_HAS_GUI) && defined(FEAT_GUI_GTK) + if (NB_HAS_GUI && gtk_main_level() > 0) +! gtk_main_quit(); + #endif + } + +--- 791,822 ---- + break; /* did read everything that's available */ + } + ++ /* Reading a socket disconnection (readlen == 0), or a socket error. */ + if (readlen <= 0) + { +! /* Queue a "DETACH" netbeans message in the command queue in order to +! * terminate the netbeans session later. Do not end the session here +! * directly as we may be running in the context of a call to +! * netbeans_parse_messages(): +! * netbeans_parse_messages +! * -> autocmd triggered while processing the netbeans cmd +! * -> ui_breakcheck +! * -> gui event loop or select loop +! * -> netbeans_read() +! */ +! save((char_u *)DETACH_MSG, strlen(DETACH_MSG)); +! nb_close_socket(); +! + if (len < 0) + { + nbdebug(("read from Netbeans socket\n")); + PERROR(_("read from Netbeans socket")); + } + } + + #if defined(NB_HAS_GUI) && defined(FEAT_GUI_GTK) + if (NB_HAS_GUI && gtk_main_level() > 0) +! gtk_main_quit(); + #endif + } + +*************** +*** 1164,1169 **** +--- 1185,1194 ---- + + nbdebug(("REP %d: \n", cmdno)); + ++ /* Avoid printing an annoying error message. */ ++ if (!NETBEANS_OPEN) ++ return; ++ + sprintf(reply, "%d\n", cmdno); + nb_send(reply, "nb_reply_nil"); + } +*************** +*** 2753,2763 **** + { + #ifdef FEAT_GUI + # if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \ +! && !defined(FEAT_GUI_W32) + if (gui.in_use) + { +! EMSG(_("E838: netbeans is not supported with this GUI")); +! return; + } + # endif + #endif +--- 2778,2788 ---- + { + #ifdef FEAT_GUI + # if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \ +! && !defined(FEAT_GUI_W32) + if (gui.in_use) + { +! EMSG(_("E838: netbeans is not supported with this GUI")); +! return; + } + # endif + #endif +*** ../vim-7.3.059/src/version.c 2010-11-16 15:04:51.000000000 +0100 +--- src/version.c 2010-11-16 15:22:39.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 60, + /**/ + +-- + Another bucket of what can only be described as human ordure hits ARTHUR. +ARTHUR: ... Right! (to the KNIGHTS) That settles it! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 552ed2b5a7435248d8bafe2ad71527fd063a4783 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0234/3803] Patchlevel 061 --- 7.3.061 | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 7.3.061 diff --git a/7.3.061 b/7.3.061 new file mode 100644 index 00000000..2b0bdacf --- /dev/null +++ b/7.3.061 @@ -0,0 +1,89 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.061 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.061 +Problem: Remote ":drop" does not respect 'autochdir'. (Peter Odding) +Solution: Don't restore the directory when 'autochdir' is set. (Benjamin + Fritz) +Files: src/main.c + + +*** ../vim-7.3.060/src/main.c 2010-09-29 17:26:57.000000000 +0200 +--- src/main.c 2010-11-16 16:16:11.000000000 +0100 +*************** +*** 3817,3822 **** +--- 3817,3824 ---- + /* Check if we have at least one argument. */ + if (filec <= 0) + mainerr_arg_missing((char_u *)filev[-1]); ++ ++ /* Temporarily cd to the current directory to handle relative file names. */ + if (mch_dirname(cwd, MAXPATHL) != OK) + return NULL; + if ((p = vim_strsave_escaped_ext(cwd, +*************** +*** 3858,3870 **** + ga_concat(&ga, p); + vim_free(p); + } + /* The :drop commands goes to Insert mode when 'insertmode' is set, use + * CTRL-\ CTRL-N again. */ +! ga_concat(&ga, (char_u *)"|if exists('*inputrestore')|call inputrestore()|endif"); +! ga_concat(&ga, (char_u *)":cd -"); + if (sendReply) +! ga_concat(&ga, (char_u *)":call SetupRemoteReplies()"); +! ga_concat(&ga, (char_u *)":"); + if (inicmd != NULL) + { + /* Can't use after "inicmd", because an "startinsert" would cause +--- 3860,3879 ---- + ga_concat(&ga, p); + vim_free(p); + } ++ ga_concat(&ga, (char_u *)"|if exists('*inputrestore')|call inputrestore()|endif"); ++ + /* The :drop commands goes to Insert mode when 'insertmode' is set, use + * CTRL-\ CTRL-N again. */ +! ga_concat(&ga, (char_u *)""); +! +! /* Switch back to the correct current directory (prior to temporary path +! * switch) unless 'autochdir' is set, in which case it will already be +! * correct after the :drop command. */ +! ga_concat(&ga, (char_u *)":if !exists('+acd')||!&acd|cd -|endif"); +! + if (sendReply) +! ga_concat(&ga, (char_u *)":call SetupRemoteReplies()"); +! ga_concat(&ga, (char_u *)":"); + if (inicmd != NULL) + { + /* Can't use after "inicmd", because an "startinsert" would cause +*** ../vim-7.3.060/src/version.c 2010-11-16 15:48:57.000000000 +0100 +--- src/version.c 2010-11-16 16:19:58.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 61, + /**/ + +-- +BEDEVERE: Stand by for attack!! + [CUT TO enormous army forming up. Trebuchets, rows of PIKEMEN, siege + towers, pennants flying, shouts of "Stand by for attack!" Traditional + army build-up shots. The shouts echo across the ranks of the army. + We see various groups reacting, and stirring themselves in readiness.] +ARTHUR: Who are they? +BEDEVERE: Oh, just some friends! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a9e00675ac55df9680a41606d4c153cf8311f9eb Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0235/3803] Patchlevel 062 --- 7.3.062 | 609 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 609 insertions(+) create mode 100644 7.3.062 diff --git a/7.3.062 b/7.3.062 new file mode 100644 index 00000000..ee69b3ae --- /dev/null +++ b/7.3.062 @@ -0,0 +1,609 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.062 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.062 +Problem: Python doesn't work properly when installed in another directory + than expected. +Solution: Figure out home directory in configure and use Py_SetPythonHome() + at runtime. (Roland Puntaier) +Files: src/configure.in, src/auto/configure, src/if_python.c, + src/if_python3.c + + +*** ../vim-7.3.061/src/configure.in 2010-11-03 22:32:18.000000000 +0100 +--- src/configure.in 2010-11-16 17:47:36.000000000 +0100 +*************** +*** 891,899 **** + + PYTHON_LIBS="${vi_cv_path_python_plibs}" + if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}" + else +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}" + fi + PYTHON_SRC="if_python.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +--- 891,899 ---- + + PYTHON_LIBS="${vi_cv_path_python_plibs}" + if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\"" + else +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\"" + fi + PYTHON_SRC="if_python.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +*************** +*** 905,911 **** + if test "${vi_cv_var_python_version}" = "1.4"; then + PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" + fi +! PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'" + + dnl On FreeBSD linking with "-pthread" is required to use threads. + dnl _THREAD_SAFE must be used for compiling then. +--- 905,911 ---- + if test "${vi_cv_var_python_version}" = "1.4"; then + PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" + fi +! PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'" + + dnl On FreeBSD linking with "-pthread" is required to use threads. + dnl _THREAD_SAFE must be used for compiling then. +*************** +*** 1063,1071 **** + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}" + fi + PYTHON3_SRC="if_python3.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +--- 1063,1071 ---- + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +*************** +*** 1143,1151 **** + if test "$python_ok" = yes && test "$python3_ok" = yes; then + AC_DEFINE(DYNAMIC_PYTHON) + AC_DEFINE(DYNAMIC_PYTHON3) +! AC_MSG_CHECKING(whether we can do without RTLD_GLOBAL) + cflags_save=$CFLAGS +! CFLAGS="$CFLAGS $PYTHON3_CFLAGS" + ldflags_save=$LDFLAGS + LDFLAGS="$LDFLAGS -ldl" + AC_RUN_IFELSE([ +--- 1143,1151 ---- + if test "$python_ok" = yes && test "$python3_ok" = yes; then + AC_DEFINE(DYNAMIC_PYTHON) + AC_DEFINE(DYNAMIC_PYTHON3) +! AC_MSG_CHECKING(whether we can do without RTLD_GLOBAL for Python) + cflags_save=$CFLAGS +! CFLAGS="$CFLAGS $PYTHON_CFLAGS" + ldflags_save=$LDFLAGS + LDFLAGS="$LDFLAGS -ldl" + AC_RUN_IFELSE([ +*************** +*** 1156,1170 **** + * Only the first pyhton version used will be switched on. + */ + +! int no_rtl_global_needed_for(char *python_instsoname) + { + int needed = 0; + void* pylib = dlopen(python_instsoname, RTLD_LAZY); + if (pylib != 0) + { + void (*init)(void) = dlsym(pylib, "Py_Initialize"); + int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString"); + void (*final)(void) = dlsym(pylib, "Py_Finalize"); + (*init)(); + needed = (*simple)("import termios") == -1; + (*final)(); +--- 1156,1172 ---- + * Only the first pyhton version used will be switched on. + */ + +! int no_rtl_global_needed_for(char *python_instsoname, char *prefix) + { + int needed = 0; + void* pylib = dlopen(python_instsoname, RTLD_LAZY); + if (pylib != 0) + { ++ void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome"); + void (*init)(void) = dlsym(pylib, "Py_Initialize"); + int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString"); + void (*final)(void) = dlsym(pylib, "Py_Finalize"); ++ (*pfx)(prefix); + (*init)(); + needed = (*simple)("import termios") == -1; + (*final)(); +*************** +*** 1176,1188 **** + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("libpython2.7.so.1.0") && no_rtl_global_needed_for("libpython3.1.so.1.0")) + not_needed = 1; + return !not_needed; + }], + [AC_MSG_RESULT(yes);AC_DEFINE(PY_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)]) + CFLAGS=$cflags_save + LDFLAGS=$ldflags_save + PYTHON_SRC="if_python.c" + PYTHON_OBJ="objects/if_python.o" + PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" +--- 1178,1237 ---- + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}")) + not_needed = 1; + return !not_needed; + }], + [AC_MSG_RESULT(yes);AC_DEFINE(PY_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)]) ++ + CFLAGS=$cflags_save + LDFLAGS=$ldflags_save ++ ++ AC_MSG_CHECKING(whether we can do without RTLD_GLOBAL for Python3) ++ cflags_save=$CFLAGS ++ CFLAGS="$CFLAGS $PYTHON3_CFLAGS" ++ ldflags_save=$LDFLAGS ++ LDFLAGS="$LDFLAGS -ldl" ++ AC_RUN_IFELSE([ ++ #include ++ #include ++ /* If this program fails, then RTLD_GLOBAL is needed. ++ * RTLD_GLOBAL will be used and then it is not possible to ++ * have both python versions enabled in the same vim instance. ++ * Only the first pyhton version used will be switched on. ++ */ ++ ++ int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix) ++ { ++ int needed = 0; ++ void* pylib = dlopen(python_instsoname, RTLD_LAZY); ++ if (pylib != 0) ++ { ++ void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome"); ++ void (*init)(void) = dlsym(pylib, "Py_Initialize"); ++ int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString"); ++ void (*final)(void) = dlsym(pylib, "Py_Finalize"); ++ (*pfx)(prefix); ++ (*init)(); ++ needed = (*simple)("import termios") == -1; ++ (*final)(); ++ dlclose(pylib); ++ } ++ return !needed; ++ } ++ ++ int main(int argc, char** argv) ++ { ++ int not_needed = 0; ++ if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}")) ++ not_needed = 1; ++ return !not_needed; ++ }], ++ [AC_MSG_RESULT(yes);AC_DEFINE(PY3_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)]) ++ ++ CFLAGS=$cflags_save ++ LDFLAGS=$ldflags_save ++ + PYTHON_SRC="if_python.c" + PYTHON_OBJ="objects/if_python.o" + PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" +*** ../vim-7.3.061/src/auto/configure 2010-11-03 22:32:18.000000000 +0100 +--- src/auto/configure 2010-11-16 17:47:42.000000000 +0100 +*************** +*** 5326,5334 **** + + PYTHON_LIBS="${vi_cv_path_python_plibs}" + if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}" + else +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}" + fi + PYTHON_SRC="if_python.c" + if test "x$MACOSX" = "xyes"; then +--- 5326,5334 ---- + + PYTHON_LIBS="${vi_cv_path_python_plibs}" + if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\"" + else +! PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\"" + fi + PYTHON_SRC="if_python.c" + if test "x$MACOSX" = "xyes"; then +*************** +*** 5339,5345 **** + if test "${vi_cv_var_python_version}" = "1.4"; then + PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" + fi +! PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5 + $as_echo_n "checking if -pthread should be used... " >&6; } +--- 5339,5345 ---- + if test "${vi_cv_var_python_version}" = "1.4"; then + PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" + fi +! PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5 + $as_echo_n "checking if -pthread should be used... " >&6; } +*************** +*** 5601,5609 **** + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}" + fi + PYTHON3_SRC="if_python3.c" + if test "x$MACOSX" = "xyes"; then +--- 5601,5609 ---- + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + if test "x$MACOSX" = "xyes"; then +*************** +*** 5708,5717 **** + + $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h + +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL" >&5 +! $as_echo_n "checking whether we can do without RTLD_GLOBAL... " >&6; } + cflags_save=$CFLAGS +! CFLAGS="$CFLAGS $PYTHON3_CFLAGS" + ldflags_save=$LDFLAGS + LDFLAGS="$LDFLAGS -ldl" + if test "$cross_compiling" = yes; then : +--- 5708,5717 ---- + + $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h + +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5 +! $as_echo_n "checking whether we can do without RTLD_GLOBAL for Python... " >&6; } + cflags_save=$CFLAGS +! CFLAGS="$CFLAGS $PYTHON_CFLAGS" + ldflags_save=$LDFLAGS + LDFLAGS="$LDFLAGS -ldl" + if test "$cross_compiling" = yes; then : +*************** +*** 5730,5744 **** + * Only the first pyhton version used will be switched on. + */ + +! int no_rtl_global_needed_for(char *python_instsoname) + { + int needed = 0; + void* pylib = dlopen(python_instsoname, RTLD_LAZY); + if (pylib != 0) + { + void (*init)(void) = dlsym(pylib, "Py_Initialize"); + int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString"); + void (*final)(void) = dlsym(pylib, "Py_Finalize"); + (*init)(); + needed = (*simple)("import termios") == -1; + (*final)(); +--- 5730,5746 ---- + * Only the first pyhton version used will be switched on. + */ + +! int no_rtl_global_needed_for(char *python_instsoname, char *prefix) + { + int needed = 0; + void* pylib = dlopen(python_instsoname, RTLD_LAZY); + if (pylib != 0) + { ++ void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome"); + void (*init)(void) = dlsym(pylib, "Py_Initialize"); + int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString"); + void (*final)(void) = dlsym(pylib, "Py_Finalize"); ++ (*pfx)(prefix); + (*init)(); + needed = (*simple)("import termios") == -1; + (*final)(); +*************** +*** 5750,5756 **** + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("libpython2.7.so.1.0") && no_rtl_global_needed_for("libpython3.1.so.1.0")) + not_needed = 1; + return !not_needed; + } +--- 5752,5758 ---- + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}")) + not_needed = 1; + return !not_needed; + } +*************** +*** 5767,5774 **** +--- 5769,5844 ---- + conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + ++ + CFLAGS=$cflags_save + LDFLAGS=$ldflags_save ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5 ++ $as_echo_n "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; } ++ cflags_save=$CFLAGS ++ CFLAGS="$CFLAGS $PYTHON3_CFLAGS" ++ ldflags_save=$LDFLAGS ++ LDFLAGS="$LDFLAGS -ldl" ++ if test "$cross_compiling" = yes; then : ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++ as_fn_error "cannot run test program while cross compiling ++ See \`config.log' for more details." "$LINENO" 5; } ++ else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ /* end confdefs.h. */ ++ ++ #include ++ #include ++ /* If this program fails, then RTLD_GLOBAL is needed. ++ * RTLD_GLOBAL will be used and then it is not possible to ++ * have both python versions enabled in the same vim instance. ++ * Only the first pyhton version used will be switched on. ++ */ ++ ++ int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix) ++ { ++ int needed = 0; ++ void* pylib = dlopen(python_instsoname, RTLD_LAZY); ++ if (pylib != 0) ++ { ++ void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome"); ++ void (*init)(void) = dlsym(pylib, "Py_Initialize"); ++ int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString"); ++ void (*final)(void) = dlsym(pylib, "Py_Finalize"); ++ (*pfx)(prefix); ++ (*init)(); ++ needed = (*simple)("import termios") == -1; ++ (*final)(); ++ dlclose(pylib); ++ } ++ return !needed; ++ } ++ ++ int main(int argc, char** argv) ++ { ++ int not_needed = 0; ++ if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}")) ++ not_needed = 1; ++ return !not_needed; ++ } ++ _ACEOF ++ if ac_fn_c_try_run "$LINENO"; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++ $as_echo "yes" >&6; };$as_echo "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h ++ ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++ $as_echo "no" >&6; } ++ fi ++ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++ fi ++ ++ ++ CFLAGS=$cflags_save ++ LDFLAGS=$ldflags_save ++ + PYTHON_SRC="if_python.c" + PYTHON_OBJ="objects/if_python.o" + PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" +*** ../vim-7.3.061/src/if_python.c 2010-10-23 14:02:48.000000000 +0200 +--- src/if_python.c 2010-11-16 17:07:00.000000000 +0100 +*************** +*** 102,108 **** + # include + # define FARPROC void* + # define HINSTANCE void* +! # ifdef PY_NO_RTLD_GLOBAL + # define load_dll(n) dlopen((n), RTLD_LAZY) + # else + # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL) +--- 102,108 ---- + # include + # define FARPROC void* + # define HINSTANCE void* +! # if defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL) + # define load_dll(n) dlopen((n), RTLD_LAZY) + # else + # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL) +*************** +*** 168,173 **** +--- 168,174 ---- + # define Py_BuildValue dll_Py_BuildValue + # define Py_FindMethod dll_Py_FindMethod + # define Py_InitModule4 dll_Py_InitModule4 ++ # define Py_SetPythonHome dll_Py_SetPythonHome + # define Py_Initialize dll_Py_Initialize + # define Py_Finalize dll_Py_Finalize + # define Py_IsInitialized dll_Py_IsInitialized +*************** +*** 226,231 **** +--- 227,233 ---- + static PyObject*(*dll_Py_BuildValue)(char *, ...); + static PyObject*(*dll_Py_FindMethod)(struct PyMethodDef[], PyObject *, char *); + static PyObject*(*dll_Py_InitModule4)(char *, struct PyMethodDef *, char *, PyObject *, int); ++ static void(*dll_Py_SetPythonHome)(char *home); + static void(*dll_Py_Initialize)(void); + static void(*dll_Py_Finalize)(void); + static int(*dll_Py_IsInitialized)(void); +*************** +*** 310,315 **** +--- 312,318 ---- + # else + {"Py_InitModule4", (PYTHON_PROC*)&dll_Py_InitModule4}, + # endif ++ {"Py_SetPythonHome", (PYTHON_PROC*)&dll_Py_SetPythonHome}, + {"Py_Initialize", (PYTHON_PROC*)&dll_Py_Initialize}, + {"Py_Finalize", (PYTHON_PROC*)&dll_Py_Finalize}, + {"Py_IsInitialized", (PYTHON_PROC*)&dll_Py_IsInitialized}, +*************** +*** 349,355 **** + { + int i; + +! #if !defined(PY_NO_RTLD_GLOBAL) && defined(UNIX) && defined(FEAT_PYTHON3) + /* Can't have Python and Python3 loaded at the same time. + * It cause a crash, because RTLD_GLOBAL is needed for + * standard C extension libraries of one or both python versions. */ +--- 352,358 ---- + { + int i; + +! #if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON3) + /* Can't have Python and Python3 loaded at the same time. + * It cause a crash, because RTLD_GLOBAL is needed for + * standard C extension libraries of one or both python versions. */ +*************** +*** 543,548 **** +--- 546,555 ---- + } + #endif + ++ #ifdef PYTHON_HOME ++ Py_SetPythonHome(PYTHON_HOME); ++ #endif ++ + init_structs(); + + #if !defined(MACOS) || defined(MACOS_X_UNIX) +*** ../vim-7.3.061/src/if_python3.c 2010-10-23 14:02:48.000000000 +0200 +--- src/if_python3.c 2010-11-16 17:07:26.000000000 +0100 +*************** +*** 80,86 **** + # include + # define FARPROC void* + # define HINSTANCE void* +! # ifdef PY_NO_RTLD_GLOBAL + # define load_dll(n) dlopen((n), RTLD_LAZY) + # else + # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL) +--- 80,86 ---- + # include + # define FARPROC void* + # define HINSTANCE void* +! # if defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL) + # define load_dll(n) dlopen((n), RTLD_LAZY) + # else + # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL) +*************** +*** 132,137 **** +--- 132,138 ---- + # define PyType_Ready py3_PyType_Ready + #undef Py_BuildValue + # define Py_BuildValue py3_Py_BuildValue ++ # define Py_SetPythonHome py3_Py_SetPythonHome + # define Py_Initialize py3_Py_Initialize + # define Py_Finalize py3_Py_Finalize + # define Py_IsInitialized py3_Py_IsInitialized +*************** +*** 170,175 **** +--- 171,177 ---- + * Pointers for dynamic link + */ + static int (*py3_PySys_SetArgv)(int, wchar_t **); ++ static void (*py3_Py_SetPythonHome)(wchar_t *home); + static void (*py3_Py_Initialize)(void); + static PyObject* (*py3_PyList_New)(Py_ssize_t size); + static PyGILState_STATE (*py3_PyGILState_Ensure)(void); +*************** +*** 254,259 **** +--- 256,262 ---- + } py3_funcname_table[] = + { + {"PySys_SetArgv", (PYTHON_PROC*)&py3_PySys_SetArgv}, ++ {"Py_SetPythonHome", (PYTHON_PROC*)&py3_Py_SetPythonHome}, + {"Py_Initialize", (PYTHON_PROC*)&py3_Py_Initialize}, + {"PyArg_ParseTuple", (PYTHON_PROC*)&py3_PyArg_ParseTuple}, + {"PyList_New", (PYTHON_PROC*)&py3_PyList_New}, +*************** +*** 336,342 **** + int i; + void *ucs_from_string, *ucs_from_string_and_size; + +! # if !defined(PY_NO_RTLD_GLOBAL) && defined(UNIX) && defined(FEAT_PYTHON) + /* Can't have Python and Python3 loaded at the same time. + * It cause a crash, because RTLD_GLOBAL is needed for + * standard C extension libraries of one or both python versions. */ +--- 339,345 ---- + int i; + void *ucs_from_string, *ucs_from_string_and_size; + +! # if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON) + /* Can't have Python and Python3 loaded at the same time. + * It cause a crash, because RTLD_GLOBAL is needed for + * standard C extension libraries of one or both python versions. */ +*************** +*** 539,544 **** +--- 542,552 ---- + + init_structs(); + ++ ++ #ifdef PYTHON3_HOME ++ Py_SetPythonHome(PYTHON3_HOME); ++ #endif ++ + /* initialise threads */ + PyEval_InitThreads(); + +*** ../vim-7.3.061/src/version.c 2010-11-16 16:25:46.000000000 +0100 +--- src/version.c 2010-11-16 17:12:40.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 62, + /**/ + +-- +ARTHUR: CHARGE! + [The mighty ARMY charges. Thundering noise of feet. Clatter of coconuts. + Shouts etc. Suddenly there is a wail of a siren and a couple of police + cars roar round in front of the charging ARMY and the POLICE leap out and + stop them. TWO POLICEMAN and the HISTORIAN'S WIFE. Black Marias skid up + behind them.] +HISTORIAN'S WIFE: They're the ones, I'm sure. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d59bb209d276817b3e323258a0542b0c3200b630 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0236/3803] Patchlevel 063 --- 7.3.063 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 7.3.063 diff --git a/7.3.063 b/7.3.063 new file mode 100644 index 00000000..27516ff2 --- /dev/null +++ b/7.3.063 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.063 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.063 +Problem: Win32: Running a filter command makes Vim lose focus. +Solution: Use SW_SHOWMINNOACTIVE instead of SW_SHOWMINIMIZED. (Hong Xu) +Files: src/os_win32.c + + +*** ../vim-7.3.062/src/os_win32.c 2010-11-10 15:37:00.000000000 +0100 +--- src/os_win32.c 2010-11-24 12:31:46.000000000 +0100 +*************** +*** 3185,3193 **** + * It's nicer to run a filter command in a minimized window, but in + * Windows 95 this makes the command MUCH slower. We can't do it under + * Win32s either as it stops the synchronous spawn workaround working. + */ + if ((options & SHELL_DOOUT) && !mch_windows95() && !gui_is_win32s()) +! si.wShowWindow = SW_SHOWMINIMIZED; + else + si.wShowWindow = SW_SHOWNORMAL; + si.cbReserved2 = 0; +--- 3185,3194 ---- + * It's nicer to run a filter command in a minimized window, but in + * Windows 95 this makes the command MUCH slower. We can't do it under + * Win32s either as it stops the synchronous spawn workaround working. ++ * Don't activate the window to keep focus on Vim. + */ + if ((options & SHELL_DOOUT) && !mch_windows95() && !gui_is_win32s()) +! si.wShowWindow = SW_SHOWMINNOACTIVE; + else + si.wShowWindow = SW_SHOWNORMAL; + si.cbReserved2 = 0; +*** ../vim-7.3.062/src/version.c 2010-11-16 19:25:56.000000000 +0100 +--- src/version.c 2010-11-24 12:32:52.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 63, + /**/ + +-- +SOLDIER: Where did you get the coconuts? +ARTHUR: Through ... We found them. +SOLDIER: Found them? In Mercea. The coconut's tropical! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 1d7b79be831510447408cdac24042d3e342c57dc Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0237/3803] Patchlevel 064 --- 7.3.064 | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 7.3.064 diff --git a/7.3.064 b/7.3.064 new file mode 100644 index 00000000..cbd49ad9 --- /dev/null +++ b/7.3.064 @@ -0,0 +1,72 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.064 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.064 +Problem: Win32: ":dis +" shows nothing, but "+p does insert text. +Solution: Display the * register, since that's what will be inserted. + (Christian Brabandt) +Files: src/globals.h, src/ops.c + + +*** ../vim-7.3.063/src/globals.h 2010-08-15 21:57:27.000000000 +0200 +--- src/globals.h 2010-11-24 14:06:47.000000000 +0100 +*************** +*** 510,515 **** +--- 510,516 ---- + EXTERN VimClipboard clip_plus; /* CLIPBOARD selection in X11 */ + # else + # define clip_plus clip_star /* there is only one clipboard */ ++ # define ONE_CLIPBOARD + # endif + EXTERN int clip_unnamed INIT(= FALSE); + EXTERN int clip_autoselect INIT(= FALSE); +*** ../vim-7.3.063/src/ops.c 2010-10-09 17:21:42.000000000 +0200 +--- src/ops.c 2010-11-24 14:26:25.000000000 +0100 +*************** +*** 3979,3985 **** + for (i = -1; i < NUM_REGISTERS && !got_int; ++i) + { + name = get_register_name(i); +! if (arg != NULL && vim_strchr(arg, name) == NULL) + continue; /* did not ask for this register */ + + #ifdef FEAT_CLIPBOARD +--- 3979,3990 ---- + for (i = -1; i < NUM_REGISTERS && !got_int; ++i) + { + name = get_register_name(i); +! if (arg != NULL && vim_strchr(arg, name) == NULL +! #ifdef ONE_CLIPBOARD +! /* Star register and plus register contain the same thing. */ +! && (name != '*' || vim_strchr(arg, '+') == NULL) +! #endif +! ) + continue; /* did not ask for this register */ + + #ifdef FEAT_CLIPBOARD +*** ../vim-7.3.063/src/version.c 2010-11-24 12:35:14.000000000 +0100 +--- src/version.c 2010-11-24 14:24:03.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 64, + /**/ + +-- +FIRST SOLDIER: So they wouldn't be able to bring a coconut back anyway. +SECOND SOLDIER: Wait a minute! Suppose two swallows carried it together? +FIRST SOLDIER: No, they'd have to have it on a line. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 659d752e217208a510690af01c172504627faa15 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0238/3803] Patchlevel 065 --- 7.3.065 | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 7.3.065 diff --git a/7.3.065 b/7.3.065 new file mode 100644 index 00000000..cd9b2a75 --- /dev/null +++ b/7.3.065 @@ -0,0 +1,120 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.065 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.065 +Problem: Can't get current line number in a source file. +Solution: Add the item, similar to . +Files: src/ex_docmd.c + + +*** ../vim-7.3.064/src/ex_docmd.c 2010-11-16 11:29:30.000000000 +0100 +--- src/ex_docmd.c 2010-11-24 15:41:51.000000000 +0100 +*************** +*** 9538,9554 **** + #define SPEC_CFILE 4 + "", /* ":so" file name */ + #define SPEC_SFILE 5 + #ifdef FEAT_AUTOCMD + "", /* autocommand file name */ +! # define SPEC_AFILE 6 + "", /* autocommand buffer number */ +! # define SPEC_ABUF 7 + "", /* autocommand match name */ +! # define SPEC_AMATCH 8 + #endif + #ifdef FEAT_CLIENTSERVER + "" +! # define SPEC_CLIENT 9 + #endif + }; + +--- 9538,9560 ---- + #define SPEC_CFILE 4 + "", /* ":so" file name */ + #define SPEC_SFILE 5 ++ "", /* ":so" file line number */ ++ #define SPEC_SLNUM 6 + #ifdef FEAT_AUTOCMD + "", /* autocommand file name */ +! # define SPEC_AFILE 7 + "", /* autocommand buffer number */ +! # define SPEC_ABUF 8 + "", /* autocommand match name */ +! # define SPEC_AMATCH 9 + #endif + #ifdef FEAT_CLIENTSERVER + "" +! # ifdef FEAT_AUTOCMD +! # define SPEC_CLIENT 10 +! # else +! # define SPEC_CLIENT 7 +! # endif + #endif + }; + +*************** +*** 9573,9578 **** +--- 9579,9585 ---- + * '' to WORD under the cursor + * '' to path name under the cursor + * '' to sourced file name ++ * '' to sourced file line number + * '' to file name for autocommand + * '' to buffer number for autocommand + * '' to matching name for autocommand +*************** +*** 9604,9613 **** + #ifdef FEAT_MODIFY_FNAME + int skip_mod = FALSE; + #endif +- +- #if defined(FEAT_AUTOCMD) || defined(FEAT_CLIENTSERVER) + char_u strbuf[30]; +- #endif + + *errormsg = NULL; + if (escaped != NULL) +--- 9611,9617 ---- +*************** +*** 9796,9801 **** +--- 9800,9814 ---- + return NULL; + } + break; ++ case SPEC_SLNUM: /* line in file for ":so" command */ ++ if (sourcing_name == NULL || sourcing_lnum == 0) ++ { ++ *errormsg = (char_u *)_("E842: no line number to use for \"\""); ++ return NULL; ++ } ++ sprintf((char *)strbuf, "%ld", (long)sourcing_lnum); ++ result = strbuf; ++ break; + #if defined(FEAT_CLIENTSERVER) + case SPEC_CLIENT: /* Source of last submitted input */ + sprintf((char *)strbuf, PRINTF_HEX_LONG_U, +*** ../vim-7.3.064/src/version.c 2010-11-24 14:28:53.000000000 +0100 +--- src/version.c 2010-11-24 15:49:57.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 65, + /**/ + + +-- +If you don't get everything you want, think of +everything you didn't get and don't want. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f0bda03f9776ce9d9f730b0d87eae5bf5a8278e3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0239/3803] Patchlevel 066 --- 7.3.066 | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 7.3.066 diff --git a/7.3.066 b/7.3.066 new file mode 100644 index 00000000..f4a6fd0b --- /dev/null +++ b/7.3.066 @@ -0,0 +1,90 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.066 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.066 +Problem: Crash when changing to another window while in a :vimgrep command. + (Christian Brabandt) +Solution: When wiping out the dummy before, remove it from aucmd_win. +Files: src/quickfix.c + + +*** ../vim-7.3.065/src/quickfix.c 2010-09-21 16:56:29.000000000 +0200 +--- src/quickfix.c 2010-11-24 16:27:40.000000000 +0100 +*************** +*** 3432,3437 **** +--- 3432,3438 ---- + char_u *fname; + { + buf_T *newbuf; ++ buf_T *newbuf_to_wipe = NULL; + int failed = TRUE; + aco_save_T aco; + +*************** +*** 3468,3482 **** + failed = FALSE; + if (curbuf != newbuf) + { +! /* Bloody autocommands changed the buffer! */ +! if (buf_valid(newbuf)) +! wipe_buffer(newbuf, FALSE); + newbuf = curbuf; + } + } + + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + } + + if (!buf_valid(newbuf)) +--- 3469,3487 ---- + failed = FALSE; + if (curbuf != newbuf) + { +! /* Bloody autocommands changed the buffer! Can happen when +! * using netrw and editing a remote file. Use the current +! * buffer instead, delete the dummy one after restoring the +! * window stuff. */ +! newbuf_to_wipe = newbuf; + newbuf = curbuf; + } + } + + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); ++ if (newbuf_to_wipe != NULL && buf_valid(newbuf_to_wipe)) ++ wipe_buffer(newbuf_to_wipe, FALSE); + } + + if (!buf_valid(newbuf)) +*** ../vim-7.3.065/src/version.c 2010-11-24 15:50:54.000000000 +0100 +--- src/version.c 2010-11-24 16:30:44.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 66, + /**/ + +-- +CART DRIVER: Bring out your dead! + We follow the cart through a wretched, impoverished plague-ridden village. + A few starved mongrels run about in the mud scavenging. In the open + doorway of one house perhaps we jug glimpse a pair of legs dangling from + the ceiling. In another doorway an OLD WOMAN is beating a cat against a + wall rather like one does with a mat. The cart passes round a dead donkey + or cow in the mud. And a MAN tied to a cart is being hammered to death by + four NUNS with huge mallets. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e95c32b20842ce5ccfe0cc44ba2f7258772600ec Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0240/3803] Patchlevel 067 --- 7.3.067 | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 7.3.067 diff --git a/7.3.067 b/7.3.067 new file mode 100644 index 00000000..c32c645a --- /dev/null +++ b/7.3.067 @@ -0,0 +1,68 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.067 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.067 (after 7.3.058) +Problem: Ruby: Init_prelude is not always available. +Solution: Remove use of Init_prelude. (Yasuhiro Matsumoto) +Files: src/if_ruby.c + + +*** ../vim-7.3.066/src/if_ruby.c 2010-11-16 14:46:14.000000000 +0100 +--- src/if_ruby.c 2010-11-24 16:53:06.000000000 +0100 +*************** +*** 231,237 **** + # define rb_enc_str_new dll_rb_enc_str_new + # define rb_intern2 dll_rb_intern2 + # define rb_const_remove dll_rb_const_remove +- # define Init_prelude dll_Init_prelude + # define rb_sprintf dll_rb_sprintf + # define ruby_init_stack dll_ruby_init_stack + #endif +--- 231,236 ---- +*************** +*** 433,439 **** + {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new}, + {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2}, + {"rb_const_remove", (RUBY_PROC*)&dll_rb_const_remove}, +- {"Init_prelude", (RUBY_PROC*)&dll_Init_prelude}, + {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf}, + {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack}, + #endif +--- 432,437 ---- +*************** +*** 675,681 **** + /* This avoids the error "Encoding::ConverterNotFoundError: code + * converter not found (UTF-16LE to ASCII-8BIT)". */ + rb_define_module("Gem"); +- Init_prelude(); + rb_const_remove(rb_cObject, rb_intern2("TMP_RUBY_PREFIX", 15)); + #endif + ruby_vim_init(); +--- 673,678 ---- +*** ../vim-7.3.066/src/version.c 2010-11-24 16:31:55.000000000 +0100 +--- src/version.c 2010-11-24 16:53:35.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 67, + /**/ + +-- +CART DRIVER: Bring out your dead! +LARGE MAN: Here's one! +CART DRIVER: Ninepence. +BODY: I'm not dead! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 2ecfd68c921d981f364a8d22154ab4619ebc17be Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0241/3803] Patchlevel 068 --- 7.3.068 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 7.3.068 diff --git a/7.3.068 b/7.3.068 new file mode 100644 index 00000000..8acbcab9 --- /dev/null +++ b/7.3.068 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.068 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.068 +Problem: Using freed memory when doing ":saveas" and an autocommand sets + 'autochdir'. (Kevin Klement) +Solution: Get the value of fname again after executing autocommands. +Files: src/ex_cmds.c + + +*** ../vim-7.3.067/src/ex_cmds.c 2010-10-15 20:20:00.000000000 +0200 +--- src/ex_cmds.c 2010-11-24 17:53:07.000000000 +0100 +*************** +*** 2705,2710 **** +--- 2705,2714 ---- + TRUE); + do_modelines(0); + } ++ ++ /* Autocommands may have changed buffer names, esp. when ++ * 'autochdir' is set. */ ++ fname = curbuf->b_sfname; + #endif + } + +*** ../vim-7.3.067/src/version.c 2010-11-24 17:03:34.000000000 +0100 +--- src/version.c 2010-11-24 17:55:11.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 68, + /**/ + +-- +I used to wonder about the meaning of life. But I looked it +up in the dictionary under "L" and there it was - the meaning +of life. It was less than I expected. - Dogbert + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From cbaf2f542dfff4a49edd7b91c5387442cb6a5a61 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0242/3803] Patchlevel 069 --- 7.3.069 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 7.3.069 diff --git a/7.3.069 b/7.3.069 new file mode 100644 index 00000000..d7761290 --- /dev/null +++ b/7.3.069 @@ -0,0 +1,49 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.069 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.069 +Problem: GTK: pressing Enter in inputdialog() doesn't work like clicking OK + as documented. +Solution: call gtk_entry_set_activates_default(). (Britton Kerin) +Files: src/gui_gtk.c + + +*** ../vim-7.3.068/src/gui_gtk.c 2010-08-15 21:57:32.000000000 +0200 +--- src/gui_gtk.c 2010-11-24 18:44:21.000000000 +0100 +*************** +*** 1287,1292 **** +--- 1287,1295 ---- + entry = gtk_entry_new(); + gtk_widget_show(entry); + ++ /* Make Enter work like pressing OK. */ ++ gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE); ++ + text = CONVERT_TO_UTF8(textfield); + gtk_entry_set_text(GTK_ENTRY(entry), (const char *)text); + CONVERT_TO_UTF8_FREE(text); +*** ../vim-7.3.068/src/version.c 2010-11-24 17:59:27.000000000 +0100 +--- src/version.c 2010-11-24 18:46:39.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 69, + /**/ + +-- +Why I like vim: +> I like VIM because, when I ask a question in this newsgroup, I get a +> one-line answer. With xemacs, I get a 1Kb lisp script with bugs in it ;-) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 8f7a50539c953628a8d18e4d8691b7fce80da0ca Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0243/3803] Patchlevel 070 --- 7.3.070 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 7.3.070 diff --git a/7.3.070 b/7.3.070 new file mode 100644 index 00000000..0da893f9 --- /dev/null +++ b/7.3.070 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.070 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.070 +Problem: Can set environment variables in the sandbox, could be abused. +Solution: Disallow it. +Files: src/eval.c + + +*** ../vim-7.3.069/src/eval.c 2010-11-10 20:31:24.000000000 +0100 +--- src/eval.c 2010-12-02 14:42:31.000000000 +0100 +*************** +*** 2326,2332 **** + else if (endchars != NULL + && vim_strchr(endchars, *skipwhite(arg)) == NULL) + EMSG(_(e_letunexp)); +! else + { + c1 = name[len]; + name[len] = NUL; +--- 2326,2332 ---- + else if (endchars != NULL + && vim_strchr(endchars, *skipwhite(arg)) == NULL) + EMSG(_(e_letunexp)); +! else if (!check_secure()) + { + c1 = name[len]; + name[len] = NUL; +*** ../vim-7.3.069/src/version.c 2010-11-24 18:48:08.000000000 +0100 +--- src/version.c 2010-12-02 14:46:44.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 70, + /**/ + +-- +The only way the average employee can speak to an executive is by taking a +second job as a golf caddie. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a356313cb4e0a05174516ccc0abdb21e680792b1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0244/3803] Patchlevel 071 --- 7.3.071 | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 7.3.071 diff --git a/7.3.071 b/7.3.071 new file mode 100644 index 00000000..75b6979f --- /dev/null +++ b/7.3.071 @@ -0,0 +1,65 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.071 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.071 +Problem: Editing a file in a window that's in diff mode resets 'diff' + but not cursor binding. +Solution: Reset cursor binding in two more places. +Files: src/quickfix.c, src/option.c + + +*** ../vim-7.3.070/src/quickfix.c 2010-11-24 16:31:55.000000000 +0100 +--- src/quickfix.c 2010-12-02 15:02:00.000000000 +0100 +*************** +*** 2359,2364 **** +--- 2359,2365 ---- + set_option_value((char_u *)"bt", 0L, (char_u *)"quickfix", + OPT_LOCAL); + set_option_value((char_u *)"bh", 0L, (char_u *)"wipe", OPT_LOCAL); ++ RESET_BINDING(curwin); + #ifdef FEAT_DIFF + curwin->w_p_diff = FALSE; + #endif +*** ../vim-7.3.070/src/option.c 2010-10-13 14:05:29.000000000 +0200 +--- src/option.c 2010-12-02 15:12:02.000000000 +0100 +*************** +*** 9756,9761 **** +--- 9759,9767 ---- + #ifdef FEAT_SCROLLBIND + to->wo_scb = from->wo_scb; + #endif ++ #ifdef FEAT_CURSORBIND ++ to->wo_crb = from->wo_crb; ++ #endif + #ifdef FEAT_SPELL + to->wo_spell = from->wo_spell; + #endif +*** ../vim-7.3.070/src/version.c 2010-12-02 14:47:56.000000000 +0100 +--- src/version.c 2010-12-02 15:31:12.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 71, + /**/ + +-- +A salesperson says: Translation: +"backward compatible" Old technology +"Premium" Overpriced +"Can't keep it on the shelf" Unavailable +"Stands alone" Piece of shit +"Proprietary" Incompatible + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From dac4c712c073b9efc764ce0d4cd8d01abd290896 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0245/3803] Patchlevel 072 --- 7.3.072 | 295 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 295 insertions(+) create mode 100644 7.3.072 diff --git a/7.3.072 b/7.3.072 new file mode 100644 index 00000000..88e54f9e --- /dev/null +++ b/7.3.072 @@ -0,0 +1,295 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.072 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.072 +Problem: Can't complete file names while ignoring case. +Solution: Add 'wildignorecase'. +Files: src/ex_docmd.c, src/ex_getln.c, src/misc1.c, src/option.c, + src/option.h, src/vim.h, runtime/doc/options.txt + + +*** ../vim-7.3.071/src/ex_docmd.c 2010-11-24 15:50:54.000000000 +0100 +--- src/ex_docmd.c 2010-12-02 15:58:10.000000000 +0100 +*************** +*** 4524,4535 **** + else /* n == 2 */ + { + expand_T xpc; + + ExpandInit(&xpc); + xpc.xp_context = EXPAND_FILES; + p = ExpandOne(&xpc, eap->arg, NULL, +! WILD_LIST_NOTFOUND|WILD_ADD_SLASH, +! WILD_EXPAND_FREE); + if (p == NULL) + return FAIL; + } +--- 4524,4537 ---- + else /* n == 2 */ + { + expand_T xpc; ++ int options = WILD_LIST_NOTFOUND|WILD_ADD_SLASH; + + ExpandInit(&xpc); + xpc.xp_context = EXPAND_FILES; ++ if (p_wic) ++ options += WILD_ICASE; + p = ExpandOne(&xpc, eap->arg, NULL, +! options, WILD_EXPAND_FREE); + if (p == NULL) + return FAIL; + } +*** ../vim-7.3.071/src/ex_getln.c 2010-11-16 14:05:48.000000000 +0100 +--- src/ex_getln.c 2010-11-28 15:07:49.000000000 +0100 +*************** +*** 3339,3348 **** + p2 = NULL; + else + { + p2 = ExpandOne(xp, p1, + vim_strnsave(&ccline.cmdbuff[i], xp->xp_pattern_len), +! WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE +! |options, type); + vim_free(p1); + /* longest match: make sure it is not shorter, happens with :help */ + if (p2 != NULL && type == WILD_LONGEST) +--- 3339,3352 ---- + p2 = NULL; + else + { ++ int use_options = options | ++ WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE; ++ ++ if (p_wic) ++ use_options += WILD_ICASE; + p2 = ExpandOne(xp, p1, + vim_strnsave(&ccline.cmdbuff[i], xp->xp_pattern_len), +! use_options, type); + vim_free(p1); + /* longest match: make sure it is not shorter, happens with :help */ + if (p2 != NULL && type == WILD_LONGEST) +*************** +*** 3428,3433 **** +--- 3432,3438 ---- + * options = WILD_KEEP_ALL: don't remove 'wildignore' entries + * options = WILD_SILENT: don't print warning messages + * options = WILD_ESCAPE: put backslash before special chars ++ * options = WILD_ICASE: ignore case for files + * + * The variables xp->xp_context and xp->xp_backslash must have been set! + */ +*************** +*** 4361,4366 **** +--- 4366,4372 ---- + char_u ***matches; /* return: array of pointers to matches */ + { + char_u *file_str = NULL; ++ int options = WILD_ADD_SLASH|WILD_SILENT; + + if (xp->xp_context == EXPAND_UNSUCCESSFUL) + { +*************** +*** 4379,4387 **** + if (file_str == NULL) + return EXPAND_UNSUCCESSFUL; + + /* find all files that match the description */ +! if (ExpandFromContext(xp, file_str, matchcount, matches, +! WILD_ADD_SLASH|WILD_SILENT) == FAIL) + { + *matchcount = 0; + *matches = NULL; +--- 4385,4395 ---- + if (file_str == NULL) + return EXPAND_UNSUCCESSFUL; + ++ if (p_wic) ++ options += WILD_ICASE; ++ + /* find all files that match the description */ +! if (ExpandFromContext(xp, file_str, matchcount, matches, options) == FAIL) + { + *matchcount = 0; + *matches = NULL; +*************** +*** 4433,4439 **** + char_u *pat; + int *num_file; + char_u ***file; +! int options; + { + #ifdef FEAT_CMDL_COMPL + regmatch_T regmatch; +--- 4441,4447 ---- + char_u *pat; + int *num_file; + char_u ***file; +! int options; /* EW_ flags */ + { + #ifdef FEAT_CMDL_COMPL + regmatch_T regmatch; +*************** +*** 4487,4492 **** +--- 4495,4503 ---- + flags |= (EW_FILE | EW_PATH); + else + flags = (flags | EW_DIR) & ~EW_FILE; ++ if (options & WILD_ICASE) ++ flags |= EW_ICASE; ++ + /* Expand wildcards, supporting %:h and the like. */ + ret = expand_wildcards_eval(&pat, num_file, file, flags); + if (free_pat) +*** ../vim-7.3.071/src/misc1.c 2010-08-16 21:46:12.000000000 +0200 +--- src/misc1.c 2010-11-28 15:02:57.000000000 +0100 +*************** +*** 9161,9167 **** + #ifdef CASE_INSENSITIVE_FILENAME + regmatch.rm_ic = TRUE; /* Behave like Terminal.app */ + #else +! regmatch.rm_ic = FALSE; /* Don't ever ignore case */ + #endif + regmatch.regprog = vim_regcomp(pat, RE_MAGIC); + vim_free(pat); +--- 9161,9170 ---- + #ifdef CASE_INSENSITIVE_FILENAME + regmatch.rm_ic = TRUE; /* Behave like Terminal.app */ + #else +! if (flags & EW_ICASE) +! regmatch.rm_ic = TRUE; /* 'wildignorecase' set */ +! else +! regmatch.rm_ic = FALSE; /* Don't ignore case */ + #endif + regmatch.regprog = vim_regcomp(pat, RE_MAGIC); + vim_free(pat); +*************** +*** 9643,9649 **** + if (paths == NULL) + return 0; + +! files = globpath(paths, pattern, 0); + vim_free(paths); + if (files == NULL) + return 0; +--- 9646,9652 ---- + if (paths == NULL) + return 0; + +! files = globpath(paths, pattern, (flags & EW_ICASE) ? WILD_ICASE : 0); + vim_free(paths); + if (files == NULL) + return 0; +*** ../vim-7.3.071/src/option.c 2010-12-02 15:33:10.000000000 +0100 +--- src/option.c 2010-12-02 15:12:02.000000000 +0100 +*************** +*** 2740,2746 **** + (char_u *)&p_wc, PV_NONE, + {(char_u *)(long)Ctrl_E, (char_u *)(long)TAB} + SCRIPTID_INIT}, +! {"wildcharm", "wcm", P_NUM|P_VI_DEF, + (char_u *)&p_wcm, PV_NONE, + {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"wildignore", "wig", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, +--- 2740,2746 ---- + (char_u *)&p_wc, PV_NONE, + {(char_u *)(long)Ctrl_E, (char_u *)(long)TAB} + SCRIPTID_INIT}, +! {"wildcharm", "wcm", P_NUM|P_VI_DEF, + (char_u *)&p_wcm, PV_NONE, + {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"wildignore", "wig", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, +*************** +*** 2750,2755 **** +--- 2750,2758 ---- + (char_u *)NULL, PV_NONE, + #endif + {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, ++ {"wildignorecase", "wic", P_BOOL|P_VI_DEF, ++ (char_u *)&p_wic, PV_NONE, ++ {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"wildmenu", "wmnu", P_BOOL|P_VI_DEF, + #ifdef FEAT_WILDMENU + (char_u *)&p_wmnu, PV_NONE, +*** ../vim-7.3.071/src/option.h 2010-08-15 21:57:28.000000000 +0200 +--- src/option.h 2010-11-28 14:29:18.000000000 +0100 +*************** +*** 872,877 **** +--- 872,878 ---- + EXTERN char_u *p_ww; /* 'whichwrap' */ + EXTERN long p_wc; /* 'wildchar' */ + EXTERN long p_wcm; /* 'wildcharm' */ ++ EXTERN long p_wic; /* 'wildignorecase' */ + EXTERN char_u *p_wim; /* 'wildmode' */ + #ifdef FEAT_WILDMENU + EXTERN int p_wmnu; /* 'wildmenu' */ +*** ../vim-7.3.071/src/vim.h 2010-10-20 19:17:43.000000000 +0200 +--- src/vim.h 2010-11-28 14:49:02.000000000 +0100 +*************** +*** 798,803 **** +--- 798,804 ---- + #define WILD_KEEP_ALL 32 + #define WILD_SILENT 64 + #define WILD_ESCAPE 128 ++ #define WILD_ICASE 256 + + /* Flags for expand_wildcards() */ + #define EW_DIR 0x01 /* include directory names */ +*************** +*** 808,813 **** +--- 809,815 ---- + #define EW_SILENT 0x20 /* don't print "1 returned" from shell */ + #define EW_EXEC 0x40 /* executable files */ + #define EW_PATH 0x80 /* search in 'path' too */ ++ #define EW_ICASE 0x100 /* ignore case */ + /* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND + * is used when executing commands and EW_SILENT for interactive expanding. */ + +*** ../vim-7.3.071/runtime/doc/options.txt 2010-10-20 17:44:01.000000000 +0200 +--- runtime/doc/options.txt 2010-12-02 11:15:01.000000000 +0100 +*************** +*** 7748,7753 **** +--- 7756,7772 ---- + a pattern from the list. This avoids problems when a future version + uses another default. + ++ ++ *'wildignorecase* *'wic'* *'nowildignorecase* *'nowic'* ++ 'wildignorecase' 'wic' boolean (default off) ++ global ++ {not in Vi} ++ When set case is ignored when completing file names and directories. ++ Has no effect on systems where file name case is generally ignored. ++ Does not apply when the shell is used to expand wildcards, which ++ happens when there are special characters. ++ ++ + *'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'* + 'wildmenu' 'wmnu' boolean (default off) + global +*** ../vim-7.3.071/src/version.c 2010-12-02 15:33:10.000000000 +0100 +--- src/version.c 2010-12-02 15:57:14.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 72, + /**/ + +-- +I recommend ordering large cargo containers of paper towels to make up +whatever budget underruns you have. Paper products are always useful and they +have the advantage of being completely flushable if you need to make room in +the storage area later. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From c0991f0cc53341c9871c3d8aa54eef585ee3c50f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0246/3803] Patchlevel 073 --- 7.3.073 | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 7.3.073 diff --git a/7.3.073 b/7.3.073 new file mode 100644 index 00000000..4a79e20b --- /dev/null +++ b/7.3.073 @@ -0,0 +1,92 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.073 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.073 +Problem: Double free memory when netbeans command follows DETACH. +Solution: Only free the node when owned. (Xavier de Gaye) +Files: src/netbeans.c + + +*** ../vim-7.3.072/src/netbeans.c 2010-11-16 15:48:57.000000000 +0100 +--- src/netbeans.c 2010-12-02 16:59:11.000000000 +0100 +*************** +*** 643,648 **** +--- 643,649 ---- + { + char_u *p; + queue_T *node; ++ int own_node; + + while (head.next != NULL && head.next != &head) + { +*************** +*** 681,700 **** + *p++ = NUL; + if (*p == NUL) + { + head.next = node->next; + node->next->prev = node->prev; + } + + /* now, parse and execute the commands */ + nb_parse_cmd(node->buffer); + +! if (*p == NUL) + { + /* buffer finished, dispose of the node and buffer */ + vim_free(node->buffer); + vim_free(node); + } +! else + { + /* more follows, move to the start */ + STRMOVE(node->buffer, p); +--- 682,706 ---- + *p++ = NUL; + if (*p == NUL) + { ++ own_node = TRUE; + head.next = node->next; + node->next->prev = node->prev; + } ++ else ++ own_node = FALSE; + + /* now, parse and execute the commands */ + nb_parse_cmd(node->buffer); + +! if (own_node) + { + /* buffer finished, dispose of the node and buffer */ + vim_free(node->buffer); + vim_free(node); + } +! /* Check that "head" wasn't changed under our fingers, e.g. when a +! * DETACH command was handled. */ +! else if (head.next == node) + { + /* more follows, move to the start */ + STRMOVE(node->buffer, p); +*** ../vim-7.3.072/src/version.c 2010-12-02 16:01:23.000000000 +0100 +--- src/version.c 2010-12-02 17:00:29.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 73, + /**/ + +-- +If the Universe is constantly expanding, why can't I ever find a parking space? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 6444359cf84f7c58358526b691b2bdba437de966 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0247/3803] Patchlevel 074 --- 7.3.074 | 235 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 7.3.074 diff --git a/7.3.074 b/7.3.074 new file mode 100644 index 00000000..1223d6dc --- /dev/null +++ b/7.3.074 @@ -0,0 +1,235 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.074 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.074 +Problem: Can't use the "+ register like "* for yank and put. +Solution: Add "unnamedplus" to the 'clipboard' option. (Ivan Krasilnikov) +Files: runtime/doc/options.txt, src/eval.c, src/globals.h, src/ops.c, + src/option.c + + +*** ../vim-7.3.073/runtime/doc/options.txt 2010-12-02 16:01:23.000000000 +0100 +--- runtime/doc/options.txt 2010-12-02 21:22:48.000000000 +0100 +*************** +*** 1434,1439 **** +--- 1434,1448 ---- + explicitly accessed using the "* notation. Also see + |gui-clipboard|. + ++ unnamedplus A variant of "unnamed" flag which uses the clipboard ++ register '+' (|quoteplus|) instead of register '*' for ++ all operations except yank. Yank shall copy the text ++ into register '+' and also into '*' when "unnamed" is ++ included. ++ Only available with the |+x11| feature. ++ Availability can be checked with: > ++ if has('unnamedplus') ++ < + autoselect Works like the 'a' flag in 'guioptions': If present, + then whenever Visual mode is started, or the Visual + area extended, Vim tries to become the owner of the +*** ../vim-7.3.073/src/eval.c 2010-12-02 14:47:56.000000000 +0100 +--- src/eval.c 2010-12-02 17:30:23.000000000 +0100 +*************** +*** 12135,12140 **** +--- 12139,12147 ---- + #ifdef FEAT_TOOLBAR + "toolbar", + #endif ++ #if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) ++ "unnamedplus", ++ #endif + #ifdef FEAT_USR_CMDS + "user-commands", /* was accidentally included in 5.4 */ + "user_commands", +*** ../vim-7.3.073/src/globals.h 2010-11-24 14:28:53.000000000 +0100 +--- src/globals.h 2010-12-02 20:07:42.000000000 +0100 +*************** +*** 512,518 **** + # define clip_plus clip_star /* there is only one clipboard */ + # define ONE_CLIPBOARD + # endif +! EXTERN int clip_unnamed INIT(= FALSE); + EXTERN int clip_autoselect INIT(= FALSE); + EXTERN int clip_autoselectml INIT(= FALSE); + EXTERN int clip_html INIT(= FALSE); +--- 512,522 ---- + # define clip_plus clip_star /* there is only one clipboard */ + # define ONE_CLIPBOARD + # endif +! +! #define CLIP_UNNAMED 1 +! #define CLIP_UNNAMED_PLUS 2 +! EXTERN int clip_unnamed INIT(= 0); /* above two values or'ed */ +! + EXTERN int clip_autoselect INIT(= FALSE); + EXTERN int clip_autoselectml INIT(= FALSE); + EXTERN int clip_html INIT(= FALSE); +*** ../vim-7.3.073/src/ops.c 2010-11-24 14:28:53.000000000 +0100 +--- src/ops.c 2010-12-02 21:33:04.000000000 +0100 +*************** +*** 1584,1592 **** + adjust_clip_reg(rp) + int *rp; + { +! /* If no reg. specified, and "unnamed" is in 'clipboard', use '*' reg. */ +! if (*rp == 0 && clip_unnamed) +! *rp = '*'; + if (!clip_star.available && *rp == '*') + *rp = 0; + if (!clip_plus.available && *rp == '+') +--- 1584,1594 ---- + adjust_clip_reg(rp) + int *rp; + { +! /* If no reg. specified, and "unnamed" or "unnamedplus" is in 'clipboard', +! * use '*' or '+' reg, respectively. "unnamedplus" prevails. */ +! if (*rp == 0 && clip_unnamed != 0) +! *rp = ((clip_unnamed & CLIP_UNNAMED_PLUS) && clip_plus.available) +! ? '+' : '*'; + if (!clip_star.available && *rp == '*') + *rp = 0; + if (!clip_plus.available && *rp == '+') +*************** +*** 2842,2847 **** +--- 2844,2850 ---- + char_u *p; + char_u *pnew; + struct block_def bd; ++ int did_star = FALSE; + + /* check for read-only register */ + if (oap->regname != 0 && !valid_yank_reg(oap->regname, TRUE)) +*************** +*** 3115,3121 **** + */ + if (clip_star.available + && (curr == &(y_regs[STAR_REGISTER]) +! || (!deleting && oap->regname == 0 && clip_unnamed))) + { + if (curr != &(y_regs[STAR_REGISTER])) + /* Copy the text from register 0 to the clipboard register. */ +--- 3118,3125 ---- + */ + if (clip_star.available + && (curr == &(y_regs[STAR_REGISTER]) +! || (!deleting && oap->regname == 0 +! && (clip_unnamed & CLIP_UNNAMED)))) + { + if (curr != &(y_regs[STAR_REGISTER])) + /* Copy the text from register 0 to the clipboard register. */ +*************** +*** 3123,3128 **** +--- 3127,3133 ---- + + clip_own_selection(&clip_star); + clip_gen_set_selection(&clip_star); ++ did_star = TRUE; + } + + # ifdef FEAT_X11 +*************** +*** 3130,3141 **** + * If we were yanking to the '+' register, send result to selection. + * Also copy to the '*' register, in case auto-select is off. + */ +! else if (clip_plus.available && curr == &(y_regs[PLUS_REGISTER])) + { + /* No need to copy to * register upon 'unnamed' now - see below */ + clip_own_selection(&clip_plus); + clip_gen_set_selection(&clip_plus); +! if (!clip_isautosel()) + { + copy_yank_reg(&(y_regs[STAR_REGISTER])); + clip_own_selection(&clip_star); +--- 3135,3153 ---- + * If we were yanking to the '+' register, send result to selection. + * Also copy to the '*' register, in case auto-select is off. + */ +! if (clip_plus.available +! && (curr == &(y_regs[PLUS_REGISTER]) +! || (!deleting && oap->regname == 0 +! && (clip_unnamed & CLIP_UNNAMED_PLUS)))) + { ++ if (curr != &(y_regs[PLUS_REGISTER])) ++ /* Copy the text from register 0 to the clipboard register. */ ++ copy_yank_reg(&(y_regs[PLUS_REGISTER])); ++ + /* No need to copy to * register upon 'unnamed' now - see below */ + clip_own_selection(&clip_plus); + clip_gen_set_selection(&clip_plus); +! if (!clip_isautosel() && !did_star) + { + copy_yank_reg(&(y_regs[STAR_REGISTER])); + clip_own_selection(&clip_star); +*** ../vim-7.3.073/src/option.c 2010-12-02 16:01:23.000000000 +0100 +--- src/option.c 2010-12-02 21:41:32.000000000 +0100 +*************** +*** 7307,7313 **** + static char_u * + check_clipboard_option() + { +! int new_unnamed = FALSE; + int new_autoselect = FALSE; + int new_autoselectml = FALSE; + int new_html = FALSE; +--- 7307,7313 ---- + static char_u * + check_clipboard_option() + { +! int new_unnamed = 0; + int new_autoselect = FALSE; + int new_autoselectml = FALSE; + int new_html = FALSE; +*************** +*** 7319,7327 **** + { + if (STRNCMP(p, "unnamed", 7) == 0 && (p[7] == ',' || p[7] == NUL)) + { +! new_unnamed = TRUE; + p += 7; + } + else if (STRNCMP(p, "autoselect", 10) == 0 + && (p[10] == ',' || p[10] == NUL)) + { +--- 7319,7333 ---- + { + if (STRNCMP(p, "unnamed", 7) == 0 && (p[7] == ',' || p[7] == NUL)) + { +! new_unnamed |= CLIP_UNNAMED; + p += 7; + } ++ else if (STRNCMP(p, "unnamedplus", 11) == 0 ++ && (p[11] == ',' || p[11] == NUL)) ++ { ++ new_unnamed |= CLIP_UNNAMED_PLUS; ++ p += 11; ++ } + else if (STRNCMP(p, "autoselect", 10) == 0 + && (p[10] == ',' || p[10] == NUL)) + { +*** ../vim-7.3.073/src/version.c 2010-12-02 17:09:48.000000000 +0100 +--- src/version.c 2010-12-02 21:34:40.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 74, + /**/ + +-- +The budget process was invented by an alien race of sadistic beings who +resemble large cats. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 8edf96134b72ba730c969f93ade9ceb25321c7ad Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0248/3803] Patchlevel 075 --- 7.3.075 | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 7.3.075 diff --git a/7.3.075 b/7.3.075 new file mode 100644 index 00000000..91cbb516 --- /dev/null +++ b/7.3.075 @@ -0,0 +1,132 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.075 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.075 (after 7.3.072) +Problem: Missing part of 'wildignorecase' +Solution: Also adjust expand() +Files: src/eval.c + + +*** ../vim-7.3.074/src/eval.c 2010-12-02 21:43:10.000000000 +0100 +--- src/eval.c 2010-12-02 17:30:23.000000000 +0100 +*************** +*** 9876,9882 **** + char_u *s; + int len; + char_u *errormsg; +! int flags = WILD_SILENT|WILD_USE_NL|WILD_LIST_NOTFOUND; + expand_T xpc; + int error = FALSE; + +--- 9876,9882 ---- + char_u *s; + int len; + char_u *errormsg; +! int options = WILD_SILENT|WILD_USE_NL|WILD_LIST_NOTFOUND; + expand_T xpc; + int error = FALSE; + +*************** +*** 9894,9905 **** + * for 'wildignore' and don't put matches for 'suffixes' at the end. */ + if (argvars[1].v_type != VAR_UNKNOWN + && get_tv_number_chk(&argvars[1], &error)) +! flags |= WILD_KEEP_ALL; + if (!error) + { + ExpandInit(&xpc); + xpc.xp_context = EXPAND_FILES; +! rettv->vval.v_string = ExpandOne(&xpc, s, NULL, flags, WILD_ALL); + } + else + rettv->vval.v_string = NULL; +--- 9894,9907 ---- + * for 'wildignore' and don't put matches for 'suffixes' at the end. */ + if (argvars[1].v_type != VAR_UNKNOWN + && get_tv_number_chk(&argvars[1], &error)) +! options |= WILD_KEEP_ALL; + if (!error) + { + ExpandInit(&xpc); + xpc.xp_context = EXPAND_FILES; +! if (p_wic) +! options += WILD_ICASE; +! rettv->vval.v_string = ExpandOne(&xpc, s, NULL, options, WILD_ALL); + } + else + rettv->vval.v_string = NULL; +*************** +*** 11672,11678 **** + typval_T *argvars; + typval_T *rettv; + { +! int flags = WILD_SILENT|WILD_USE_NL; + expand_T xpc; + int error = FALSE; + +--- 11674,11680 ---- + typval_T *argvars; + typval_T *rettv; + { +! int options = WILD_SILENT|WILD_USE_NL; + expand_T xpc; + int error = FALSE; + +*************** +*** 11680,11693 **** + * for 'wildignore' and don't put matches for 'suffixes' at the end. */ + if (argvars[1].v_type != VAR_UNKNOWN + && get_tv_number_chk(&argvars[1], &error)) +! flags |= WILD_KEEP_ALL; + rettv->v_type = VAR_STRING; + if (!error) + { + ExpandInit(&xpc); + xpc.xp_context = EXPAND_FILES; + rettv->vval.v_string = ExpandOne(&xpc, get_tv_string(&argvars[0]), +! NULL, flags, WILD_ALL); + } + else + rettv->vval.v_string = NULL; +--- 11682,11697 ---- + * for 'wildignore' and don't put matches for 'suffixes' at the end. */ + if (argvars[1].v_type != VAR_UNKNOWN + && get_tv_number_chk(&argvars[1], &error)) +! options |= WILD_KEEP_ALL; + rettv->v_type = VAR_STRING; + if (!error) + { + ExpandInit(&xpc); + xpc.xp_context = EXPAND_FILES; ++ if (p_wic) ++ options += WILD_ICASE; + rettv->vval.v_string = ExpandOne(&xpc, get_tv_string(&argvars[0]), +! NULL, options, WILD_ALL); + } + else + rettv->vval.v_string = NULL; +*** ../vim-7.3.074/src/version.c 2010-12-02 21:43:10.000000000 +0100 +--- src/version.c 2010-12-02 21:43:59.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 75, + /**/ + +-- +Engineers will go without food and hygiene for days to solve a problem. +(Other times just because they forgot.) + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 2528c53220fb68038af91d8ebaf2e3796e38b97b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0249/3803] Patchlevel 076 --- 7.3.076 | 203 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 7.3.076 diff --git a/7.3.076 b/7.3.076 new file mode 100644 index 00000000..9ec7db42 --- /dev/null +++ b/7.3.076 @@ -0,0 +1,203 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.076 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.076 +Problem: Clang warnings for dead code. +Solution: Remove it. (Carlo Teubner) +Files: src/gui_gtk.c, src/if_ruby.c, src/misc2.c, src/netbeans.c, + src/spell.c + + +*** ../vim-7.3.075/src/gui_gtk.c 2010-11-24 18:48:08.000000000 +0100 +--- src/gui_gtk.c 2010-12-08 12:25:17.000000000 +0100 +*************** +*** 1798,1804 **** + char_u *repl_text; + gboolean direction_down; + SharedFindReplace *sfr; +- int rc; + + flags = (int)(long)data; /* avoid a lint warning here */ + +--- 1798,1803 ---- +*************** +*** 1824,1830 **** + + repl_text = CONVERT_FROM_UTF8(repl_text); + find_text = CONVERT_FROM_UTF8(find_text); +! rc = gui_do_findrepl(flags, find_text, repl_text, direction_down); + CONVERT_FROM_UTF8_FREE(repl_text); + CONVERT_FROM_UTF8_FREE(find_text); + } +--- 1823,1829 ---- + + repl_text = CONVERT_FROM_UTF8(repl_text); + find_text = CONVERT_FROM_UTF8(find_text); +! gui_do_findrepl(flags, find_text, repl_text, direction_down); + CONVERT_FROM_UTF8_FREE(repl_text); + CONVERT_FROM_UTF8_FREE(find_text); + } +*** ../vim-7.3.075/src/if_ruby.c 2010-11-24 17:03:34.000000000 +0100 +--- src/if_ruby.c 2010-12-08 12:30:38.000000000 +0100 +*************** +*** 586,594 **** + if (u_save(eap->line1 - 1, eap->line2 + 1) != OK) + return; + for (i = eap->line1; i <= eap->line2; i++) { +! VALUE line, oldline; + +! line = oldline = vim_str2rb_enc_str((char *)ml_get(i)); + rb_lastline_set(line); + eval_enc_string_protect((char *) eap->arg, &state); + if (state) { +--- 586,594 ---- + if (u_save(eap->line1 - 1, eap->line2 + 1) != OK) + return; + for (i = eap->line1; i <= eap->line2; i++) { +! VALUE line; + +! line = vim_str2rb_enc_str((char *)ml_get(i)); + rb_lastline_set(line); + eval_enc_string_protect((char *) eap->arg, &state); + if (state) { +*** ../vim-7.3.075/src/misc2.c 2010-08-15 21:57:32.000000000 +0200 +--- src/misc2.c 2010-12-08 12:42:44.000000000 +0100 +*************** +*** 200,206 **** + } + #endif + +- idx = -1; + ptr = line; + while (col <= wcol && *ptr != NUL) + { +--- 200,205 ---- +*************** +*** 1223,1229 **** + #endif + + /* +! * copy a string into newly allocated memory + */ + char_u * + vim_strsave(string) +--- 1222,1228 ---- + #endif + + /* +! * Copy "string" into newly allocated memory. + */ + char_u * + vim_strsave(string) +*************** +*** 1239,1244 **** +--- 1238,1249 ---- + return p; + } + ++ /* ++ * Copy up to "len" bytes of "string" into newly allocated memory and ++ * terminate with a NUL. ++ * The allocated memory always has size "len + 1", also when "string" is ++ * shorter. ++ */ + char_u * + vim_strnsave(string, len) + char_u *string; +*** ../vim-7.3.075/src/netbeans.c 2010-12-02 17:09:48.000000000 +0100 +--- src/netbeans.c 2010-12-08 12:43:57.000000000 +0100 +*************** +*** 960,966 **** + keyQ_T *key_node = keyHead.next; + queue_T *cmd_node = head.next; + nbbuf_T buf; +- buf_T *bufp; + int i; + + /* free the netbeans buffer list */ +--- 960,965 ---- +*************** +*** 969,975 **** + buf = buf_list[i]; + vim_free(buf.displayname); + vim_free(buf.signmap); +! if ((bufp=buf.bufp) != NULL) + { + buf.bufp->b_netbeans_file = FALSE; + buf.bufp->b_was_netbeans_file = FALSE; +--- 968,974 ---- + buf = buf_list[i]; + vim_free(buf.displayname); + vim_free(buf.signmap); +! if (buf.bufp != NULL) + { + buf.bufp->b_netbeans_file = FALSE; + buf.bufp->b_was_netbeans_file = FALSE; +*** ../vim-7.3.075/src/spell.c 2010-09-29 18:32:47.000000000 +0200 +--- src/spell.c 2010-12-08 12:47:13.000000000 +0100 +*************** +*** 9839,9848 **** + { + /* be quick for ASCII */ + if (wp->w_s->b_spell_ismw[*p]) +- { + s = p + 1; /* skip a mid-word character */ +- l = MB_BYTE2LEN(*s); +- } + } + else + { +--- 9839,9845 ---- +*************** +*** 9850,9859 **** + if (c < 256 ? wp->w_s->b_spell_ismw[c] + : (wp->w_s->b_spell_ismw_mb != NULL + && vim_strchr(wp->w_s->b_spell_ismw_mb, c) != NULL)) +- { + s = p + l; +- l = MB_BYTE2LEN(*s); +- } + } + + c = mb_ptr2char(s); +--- 9847,9853 ---- +*************** +*** 13813,13823 **** + su->su_sfmaxscore = cleanup_suggestions(gap, + su->su_sfmaxscore, SUG_CLEAN_COUNT(su)); + else +- { +- i = su->su_maxscore; + su->su_maxscore = cleanup_suggestions(gap, + su->su_maxscore, SUG_CLEAN_COUNT(su)); +- } + } + } + } +--- 13807,13814 ---- +*** ../vim-7.3.075/src/version.c 2010-12-02 21:44:35.000000000 +0100 +--- src/version.c 2010-12-08 13:10:00.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 76, + /**/ + +-- +Never enter the boss's office unless it's absolutely necessary. Every boss +saves one corner of the desk for useless assignments that are doled out like +Halloween candy to each visitor. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e0d4ba564d169f9410560dd9f7cac57d976fac29 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0250/3803] Patchlevel 077 --- 7.3.077 | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 7.3.077 diff --git a/7.3.077 b/7.3.077 new file mode 100644 index 00000000..c0af4b96 --- /dev/null +++ b/7.3.077 @@ -0,0 +1,134 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.077 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.077 +Problem: When updating crypt of swapfile fails there is no error message. + (Carlo Teubner) +Solution: Add the error message. +Files: src/memline.c + + +*** ../vim-7.3.076/src/memline.c 2010-08-15 21:57:31.000000000 +0200 +--- src/memline.c 2010-12-08 12:39:10.000000000 +0100 +*************** +*** 582,587 **** +--- 582,590 ---- + idx = ip->ip_index + 1; /* go to next index */ + page_count = 1; + } ++ ++ if (error > 0) ++ EMSG(_("E843: Error while updating swap file crypt")); + } + + mfp->mf_old_key = NULL; +*************** +*** 2384,2390 **** + * Make a copy of the line if necessary. + */ + /* +! * get a pointer to a (read-only copy of a) line + * + * On failure an error message is given and IObuff is returned (to avoid + * having to check for error everywhere). +--- 2387,2393 ---- + * Make a copy of the line if necessary. + */ + /* +! * Return a pointer to a (read-only copy of a) line. + * + * On failure an error message is given and IObuff is returned (to avoid + * having to check for error everywhere). +*************** +*** 2397,2403 **** + } + + /* +! * ml_get_pos: get pointer to position 'pos' + */ + char_u * + ml_get_pos(pos) +--- 2400,2406 ---- + } + + /* +! * Return pointer to position "pos". + */ + char_u * + ml_get_pos(pos) +*************** +*** 2407,2413 **** + } + + /* +! * ml_get_curline: get pointer to cursor line. + */ + char_u * + ml_get_curline() +--- 2410,2416 ---- + } + + /* +! * Return pointer to cursor line. + */ + char_u * + ml_get_curline() +*************** +*** 2416,2422 **** + } + + /* +! * ml_get_cursor: get pointer to cursor position + */ + char_u * + ml_get_cursor() +--- 2419,2425 ---- + } + + /* +! * Return pointer to cursor position. + */ + char_u * + ml_get_cursor() +*************** +*** 2426,2432 **** + } + + /* +! * get a pointer to a line in a specific buffer + * + * "will_change": if TRUE mark the buffer dirty (chars in the line will be + * changed) +--- 2429,2435 ---- + } + + /* +! * Return a pointer to a line in a specific buffer + * + * "will_change": if TRUE mark the buffer dirty (chars in the line will be + * changed) +*** ../vim-7.3.076/src/version.c 2010-12-08 13:11:15.000000000 +0100 +--- src/version.c 2010-12-08 13:15:44.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 77, + /**/ + +-- +An operatingsystem is just a name you give to the rest of bloating +idiosyncratic machine-based-features you left out of your editor. + (author unknown) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 08cb9621b0c93c8279f2921816b010c83b3f3cd2 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0251/3803] Patchlevel 078 --- 7.3.078 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.078 diff --git a/7.3.078 b/7.3.078 new file mode 100644 index 00000000..ae8a9dad --- /dev/null +++ b/7.3.078 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.078 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.078 +Problem: Warning for unused variable. +Solution: Adjuste #ifdefs. +Files: src/ops.c + + +*** ../vim-7.3.077/src/ops.c 2010-12-02 21:43:10.000000000 +0100 +--- src/ops.c 2010-12-08 14:21:48.000000000 +0100 +*************** +*** 2844,2850 **** +--- 2844,2852 ---- + char_u *p; + char_u *pnew; + struct block_def bd; ++ #if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) + int did_star = FALSE; ++ #endif + + /* check for read-only register */ + if (oap->regname != 0 && !valid_yank_reg(oap->regname, TRUE)) +*************** +*** 3127,3133 **** +--- 3129,3137 ---- + + clip_own_selection(&clip_star); + clip_gen_set_selection(&clip_star); ++ # ifdef FEAT_X11 + did_star = TRUE; ++ # endif + } + + # ifdef FEAT_X11 +*** ../vim-7.3.077/src/version.c 2010-12-08 13:16:58.000000000 +0100 +--- src/version.c 2010-12-08 14:22:42.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 78, + /**/ + +-- +A)bort, R)etry, D)o it right this time + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From bdb58c816653e9565d0d1113bab3b8a610b34b60 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0252/3803] Patchlevel 079 --- 7.3.079 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 7.3.079 diff --git a/7.3.079 b/7.3.079 new file mode 100644 index 00000000..493d52f3 --- /dev/null +++ b/7.3.079 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.079 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.079 +Problem: Duplicate lines in makefile. +Solution: Remove the lines. (Hong Xu) +Files: src/Make_mvc.mak + + +*** ../vim-7.3.078/src/Make_mvc.mak 2010-11-03 21:59:23.000000000 +0100 +--- src/Make_mvc.mak 2010-12-08 14:53:16.000000000 +0100 +*************** +*** 380,388 **** + !if "$(_NMAKE_VER)" == "10.00.30319.01" + MSVCVER = 10.0 + !endif +- !if "$(_NMAKE_VER)" == "9.00.30729.01" +- MSVCVER = 9.0 +- !endif + !endif + + # Abort bulding VIM if version of VC is unrecognised. +--- 380,385 ---- +*** ../vim-7.3.078/src/version.c 2010-12-08 14:23:08.000000000 +0100 +--- src/version.c 2010-12-08 14:54:02.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 79, + /**/ + +-- +login: yes +password: I don't know, please tell me +password is incorrect +login: yes +password: incorrect + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f7e795f63517bf6da1bb3342352020c0f89bb003 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0253/3803] Patchlevel 080 --- 7.3.080 | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 7.3.080 diff --git a/7.3.080 b/7.3.080 new file mode 100644 index 00000000..6cf9f6d7 --- /dev/null +++ b/7.3.080 @@ -0,0 +1,205 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.080 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.080 +Problem: Spell doesn't work on VMS. +Solution: Use different file names. (Zoltan Bartos, Zoltan Arpadffy) +Files: src/spell.c + + +*** ../vim-7.3.079/src/spell.c 2010-12-08 13:11:15.000000000 +0100 +--- src/spell.c 2010-12-08 17:01:13.000000000 +0100 +*************** +*** 327,332 **** +--- 327,342 ---- + typedef long idx_T; + #endif + ++ #ifdef VMS ++ # define SPL_FNAME_TMPL "%s_%s.spl" ++ # define SPL_FNAME_ADD "_add." ++ # define SPL_FNAME_ASCII "_ascii." ++ #else ++ # define SPL_FNAME_TMPL "%s.%s.spl" ++ # define SPL_FNAME_ADD ".add." ++ # define SPL_FNAME_ASCII ".ascii." ++ #endif ++ + /* Flags used for a word. Only the lowest byte can be used, the region byte + * comes above it. */ + #define WF_REGION 0x01 /* region byte follows */ +*************** +*** 2471,2484 **** + * Find the first spell file for "lang" in 'runtimepath' and load it. + */ + vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5, +! "spell/%s.%s.spl", lang, spell_enc()); + r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl); + + if (r == FAIL && *sl.sl_lang != NUL) + { + /* Try loading the ASCII version. */ + vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5, +! "spell/%s.ascii.spl", lang); + r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl); + + #ifdef FEAT_AUTOCMD +--- 2481,2504 ---- + * Find the first spell file for "lang" in 'runtimepath' and load it. + */ + vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5, +! #ifdef VMS +! "spell/%s_%s.spl", +! #else +! "spell/%s.%s.spl", +! #endif +! lang, spell_enc()); + r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl); + + if (r == FAIL && *sl.sl_lang != NUL) + { + /* Try loading the ASCII version. */ + vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5, +! #ifdef VMS +! "spell/%s_ascii.spl", +! #else +! "spell/%s.ascii.spl", +! #endif +! lang); + r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl); + + #ifdef FEAT_AUTOCMD +*************** +*** 2496,2502 **** + + if (r == FAIL) + { +! smsg((char_u *)_("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""), + lang, spell_enc(), lang); + } + else if (sl.sl_slang != NULL) +--- 2516,2527 ---- + + if (r == FAIL) + { +! smsg((char_u *) +! #ifdef VMS +! _("Warning: Cannot find word list \"%s_%s.spl\" or \"%s_ascii.spl\""), +! #else +! _("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""), +! #endif + lang, spell_enc(), lang); + } + else if (sl.sl_slang != NULL) +*************** +*** 2530,2536 **** + int_wordlist_spl(fname) + char_u *fname; + { +! vim_snprintf((char *)fname, MAXPATHL, "%s.%s.spl", + int_wordlist, spell_enc()); + } + +--- 2555,2561 ---- + int_wordlist_spl(fname) + char_u *fname; + { +! vim_snprintf((char *)fname, MAXPATHL, SPL_FNAME_TMPL, + int_wordlist, spell_enc()); + } + +*************** +*** 2785,2792 **** + if (lp->sl_fname == NULL) + goto endFAIL; + +! /* Check for .add.spl. */ +! lp->sl_add = strstr((char *)gettail(fname), ".add.") != NULL; + } + else + lp = old_lp; +--- 2810,2817 ---- + if (lp->sl_fname == NULL) + goto endFAIL; + +! /* Check for .add.spl (_add.spl for VMS). */ +! lp->sl_add = strstr((char *)gettail(fname), SPL_FNAME_ADD) != NULL; + } + else + lp = old_lp; +*************** +*** 9109,9116 **** + /* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, sizeof(wfname), "%s.%s.spl", fnames[0], +! spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + } + else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0) + { +--- 9134,9141 ---- + /* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL, +! fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + } + else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0) + { +*************** +*** 9119,9133 **** + } + else + /* Name should be language, make the file name from it. */ +! vim_snprintf((char *)wfname, sizeof(wfname), "%s.%s.spl", fnames[0], +! spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + + /* Check for .ascii.spl. */ +! if (strstr((char *)gettail(wfname), ".ascii.") != NULL) + spin.si_ascii = TRUE; + + /* Check for .add.spl. */ +! if (strstr((char *)gettail(wfname), ".add.") != NULL) + spin.si_add = TRUE; + } + +--- 9144,9158 ---- + } + else + /* Name should be language, make the file name from it. */ +! vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL, +! fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + + /* Check for .ascii.spl. */ +! if (strstr((char *)gettail(wfname), SPL_FNAME_ASCII) != NULL) + spin.si_ascii = TRUE; + + /* Check for .add.spl. */ +! if (strstr((char *)gettail(wfname), SPL_FNAME_ADD) != NULL) + spin.si_add = TRUE; + } + +*** ../vim-7.3.079/src/version.c 2010-12-08 14:54:58.000000000 +0100 +--- src/version.c 2010-12-08 16:58:03.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 80, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +5. You find yourself brainstorming for new subjects to search. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From eaae1645834613b56c40bdc267563e1cd2fd0faf Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0254/3803] Patchlevel 081 --- 7.3.081 | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 7.3.081 diff --git a/7.3.081 b/7.3.081 new file mode 100644 index 00000000..635b9b50 --- /dev/null +++ b/7.3.081 @@ -0,0 +1,84 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.081 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.081 +Problem: Non-printable characters in 'statusline' cause trouble. (ZyX) +Solution: Use transstr(). (partly by Caio Ariede) +Files: src/screen.c + + +*** ../vim-7.3.080/src/screen.c 2010-08-15 21:57:32.000000000 +0200 +--- src/screen.c 2010-12-08 19:27:20.000000000 +0100 +*************** +*** 3405,3413 **** + # endif + ) + { +! int_u text_sign; + # ifdef FEAT_SIGN_ICONS +! int_u icon_sign; + # endif + + /* Draw two cells with the sign value or blank. */ +--- 3405,3413 ---- + # endif + ) + { +! int text_sign; + # ifdef FEAT_SIGN_ICONS +! int icon_sign; + # endif + + /* Draw two cells with the sign value or blank. */ +*************** +*** 6522,6529 **** + stl, use_sandbox, + fillchar, maxwidth, hltab, tabtab); + vim_free(stl); +- len = (int)STRLEN(buf); + + while (width < maxwidth && len < (int)sizeof(buf) - 1) + { + #ifdef FEAT_MBYTE +--- 6522,6538 ---- + stl, use_sandbox, + fillchar, maxwidth, hltab, tabtab); + vim_free(stl); + ++ /* Make all characters printable. */ ++ p = transstr(buf); ++ if (p != NULL) ++ { ++ vim_strncpy(buf, p, sizeof(buf) - 1); ++ vim_free(p); ++ } ++ ++ /* fill up with "fillchar" */ ++ len = (int)STRLEN(buf); + while (width < maxwidth && len < (int)sizeof(buf) - 1) + { + #ifdef FEAT_MBYTE +*** ../vim-7.3.080/src/version.c 2010-12-08 17:09:27.000000000 +0100 +--- src/version.c 2010-12-08 19:31:40.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 81, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +6. You refuse to go to a vacation spot with no electricity and no phone lines. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 571c3e696391009654e5dff2db24afdf3814f52a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0255/3803] Patchlevel 082 --- 7.3.082 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 7.3.082 diff --git a/7.3.082 b/7.3.082 new file mode 100644 index 00000000..5753c05e --- /dev/null +++ b/7.3.082 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.082 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.082 +Problem: Leaking file descriptor when hostname doesn't exist. +Solution: Remove old debugging lines. +Files: src/netbeans.c + + +*** ../vim-7.3.081/src/netbeans.c 2010-12-08 13:11:15.000000000 +0100 +--- src/netbeans.c 2010-12-17 12:13:32.000000000 +0100 +*************** +*** 323,334 **** + 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; +- } + nbdebug(("error in gethostbyname() in netbeans_connect()\n")); + PERROR("gethostbyname() in netbeans_connect()"); + goto theend; +--- 323,328 ---- +*** ../vim-7.3.081/src/version.c 2010-12-08 19:56:52.000000000 +0100 +--- src/version.c 2010-12-17 12:17:11.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 82, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +1. At lunch time, sit in your parked car with sunglasses on and point + a hair dryer at passing cars. See if they slow down. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 4c02e4cc5cf7f07fc92f7e97cb4be0ccc687f035 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0256/3803] Patchlevel 083 --- 7.3.083 | 362 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 362 insertions(+) create mode 100644 7.3.083 diff --git a/7.3.083 b/7.3.083 new file mode 100644 index 00000000..f337d210 --- /dev/null +++ b/7.3.083 @@ -0,0 +1,362 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.083 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.083 +Problem: When a read() or write() is interrupted by a signal it fails. +Solution: Add read_eintr() and write_eintr(). +Files: src/fileio.c, src/proto/fileio.pro, src/memfile.c, src/memline.c, + src/os_unix.c, src/undo.c, src/vim.h + + +*** ../vim-7.3.082/src/fileio.c 2010-08-15 21:57:26.000000000 +0200 +--- src/fileio.c 2010-12-17 16:04:30.000000000 +0100 +*************** +*** 918,924 **** + { + /* Read the first line (and a bit more). Immediately rewind to + * the start of the file. If the read() fails "len" is -1. */ +! len = vim_read(fd, firstline, 80); + lseek(fd, (off_t)0L, SEEK_SET); + for (p = firstline; p < firstline + len; ++p) + if (*p >= 0x80) +--- 918,924 ---- + { + /* Read the first line (and a bit more). Immediately rewind to + * the start of the file. If the read() fails "len" is -1. */ +! len = read_eintr(fd, firstline, 80); + lseek(fd, (off_t)0L, SEEK_SET); + for (p = firstline; p < firstline + len; ++p) + if (*p >= 0x80) +*************** +*** 1373,1379 **** + /* + * Read bytes from the file. + */ +! size = vim_read(fd, ptr, size); + } + + if (size <= 0) +--- 1373,1379 ---- + /* + * Read bytes from the file. + */ +! size = read_eintr(fd, ptr, size); + } + + if (size <= 0) +*************** +*** 4000,4006 **** + #ifdef HAS_BW_FLAGS + write_info.bw_flags = FIO_NOCONVERT; + #endif +! while ((write_info.bw_len = vim_read(fd, copybuf, + BUFSIZE)) > 0) + { + if (buf_write_bytes(&write_info) == FAIL) +--- 4000,4006 ---- + #ifdef HAS_BW_FLAGS + write_info.bw_flags = FIO_NOCONVERT; + #endif +! while ((write_info.bw_len = read_eintr(fd, copybuf, + BUFSIZE)) > 0) + { + if (buf_write_bytes(&write_info) == FAIL) +*************** +*** 4813,4819 **** + #ifdef HAS_BW_FLAGS + write_info.bw_flags = FIO_NOCONVERT; + #endif +! while ((write_info.bw_len = vim_read(fd, smallbuf, + SMBUFSIZE)) > 0) + if (buf_write_bytes(&write_info) == FAIL) + break; +--- 4813,4819 ---- + #ifdef HAS_BW_FLAGS + write_info.bw_flags = FIO_NOCONVERT; + #endif +! while ((write_info.bw_len = read_eintr(fd, smallbuf, + SMBUFSIZE)) > 0) + if (buf_write_bytes(&write_info) == FAIL) + break; +*************** +*** 5330,5336 **** + + /* + * Call write() to write a number of bytes to the file. +! * Also handles encryption and 'encoding' conversion. + * + * Return FAIL for failure, OK otherwise. + */ +--- 5330,5336 ---- + + /* + * Call write() to write a number of bytes to the file. +! * Handles encryption and 'encoding' conversion. + * + * Return FAIL for failure, OK otherwise. + */ +*************** +*** 5702,5717 **** + crypt_encode(buf, len, buf); + #endif + +! /* Repeat the write(), it may be interrupted by a signal. */ +! while (len > 0) +! { +! wlen = vim_write(ip->bw_fd, buf, len); +! if (wlen <= 0) /* error! */ +! return FAIL; +! len -= wlen; +! buf += wlen; +! } +! return OK; + } + + #ifdef FEAT_MBYTE +--- 5702,5709 ---- + crypt_encode(buf, len, buf); + #endif + +! wlen = write_eintr(ip->bw_fd, buf, len); +! return (wlen < len) ? FAIL : OK; + } + + #ifdef FEAT_MBYTE +*************** +*** 6662,6669 **** + return -1; + } + +! while ((n = vim_read(fd_in, buffer, BUFSIZE)) > 0) +! if (vim_write(fd_out, buffer, n) != n) + { + errmsg = _("E208: Error writing to \"%s\""); + break; +--- 6654,6661 ---- + return -1; + } + +! while ((n = read_eintr(fd_in, buffer, BUFSIZE)) > 0) +! if (write_eintr(fd_out, buffer, n) != n) + { + errmsg = _("E208: Error writing to \"%s\""); + break; +*************** +*** 10304,10306 **** +--- 10296,10350 ---- + } + return reg_pat; + } ++ ++ #if defined(EINTR) || defined(PROTO) ++ /* ++ * Version of read() that retries when interrupted by EINTR (possibly ++ * by a SIGWINCH). ++ */ ++ long ++ read_eintr(fd, buf, bufsize) ++ int fd; ++ void *buf; ++ size_t bufsize; ++ { ++ long ret; ++ ++ for (;;) ++ { ++ ret = vim_read(fd, buf, bufsize); ++ if (ret >= 0 || errno != EINTR) ++ break; ++ } ++ return ret; ++ } ++ ++ /* ++ * Version of write() that retries when interrupted by EINTR (possibly ++ * by a SIGWINCH). ++ */ ++ long ++ write_eintr(fd, buf, bufsize) ++ int fd; ++ void *buf; ++ size_t bufsize; ++ { ++ long ret = 0; ++ long wlen; ++ ++ /* Repeat the write() so long it didn't fail, other than being interrupted ++ * by a signal. */ ++ while (ret < (long)bufsize) ++ { ++ wlen = vim_write(fd, buf + ret, bufsize - ret); ++ if (wlen < 0) ++ { ++ if (errno != EINTR) ++ break; ++ } ++ else ++ ret += wlen; ++ } ++ return ret; ++ } ++ #endif +*** ../vim-7.3.082/src/proto/fileio.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/fileio.pro 2010-12-17 15:01:26.000000000 +0100 +*************** +*** 54,57 **** +--- 54,59 ---- + int match_file_pat __ARGS((char_u *pattern, regprog_T *prog, char_u *fname, char_u *sfname, char_u *tail, int allow_dirs)); + int match_file_list __ARGS((char_u *list, char_u *sfname, char_u *ffname)); + char_u *file_pat_to_reg_pat __ARGS((char_u *pat, char_u *pat_end, char *allow_dirs, int no_bslash)); ++ long read_eintr __ARGS((int fd, void *buf, size_t bufsize)); ++ long write_eintr __ARGS((int fd, void *buf, size_t bufsize)); + /* vim: set ft=c : */ +*** ../vim-7.3.082/src/memfile.c 2010-08-15 21:57:25.000000000 +0200 +--- src/memfile.c 2010-12-17 16:02:54.000000000 +0100 +*************** +*** 1049,1055 **** + PERROR(_("E294: Seek error in swap file read")); + return FAIL; + } +! if ((unsigned)vim_read(mfp->mf_fd, hp->bh_data, size) != size) + { + PERROR(_("E295: Read error in swap file")); + return FAIL; +--- 1049,1055 ---- + PERROR(_("E294: Seek error in swap file read")); + return FAIL; + } +! if ((unsigned)read_eintr(mfp->mf_fd, hp->bh_data, size) != size) + { + PERROR(_("E295: Read error in swap file")); + return FAIL; +*************** +*** 1168,1174 **** + } + #endif + +! if ((unsigned)vim_write(mfp->mf_fd, data, size) != size) + result = FAIL; + + #ifdef FEAT_CRYPT +--- 1168,1174 ---- + } + #endif + +! if ((unsigned)write_eintr(mfp->mf_fd, data, size) != size) + result = FAIL; + + #ifdef FEAT_CRYPT +*** ../vim-7.3.082/src/memline.c 2010-12-08 13:16:58.000000000 +0100 +--- src/memline.c 2010-12-17 15:46:49.000000000 +0100 +*************** +*** 2062,2068 **** + fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0); + if (fd >= 0) + { +! if (read(fd, (char *)&b0, sizeof(b0)) == sizeof(b0)) + { + if (STRNCMP(b0.b0_version, "VIM 3.0", 7) == 0) + { +--- 2062,2068 ---- + fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0); + if (fd >= 0) + { +! if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0)) + { + if (STRNCMP(b0.b0_version, "VIM 3.0", 7) == 0) + { +*************** +*** 4392,4398 **** + fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0); + if (fd >= 0) + { +! if (read(fd, (char *)&b0, sizeof(b0)) == sizeof(b0)) + { + /* + * If the swapfile has the same directory as the +--- 4392,4398 ---- + fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0); + if (fd >= 0) + { +! if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0)) + { + /* + * If the swapfile has the same directory as the +*** ../vim-7.3.082/src/os_unix.c 2010-10-20 19:17:43.000000000 +0200 +--- src/os_unix.c 2010-12-17 16:17:43.000000000 +0100 +*************** +*** 4454,4460 **** + ++noread_cnt; + while (RealWaitForChar(fromshell_fd, 10L, NULL)) + { +! len = read(fromshell_fd, (char *)buffer + # ifdef FEAT_MBYTE + + buffer_off, (size_t)(BUFLEN - buffer_off) + # else +--- 4454,4460 ---- + ++noread_cnt; + while (RealWaitForChar(fromshell_fd, 10L, NULL)) + { +! len = read_eintr(fromshell_fd, buffer + # ifdef FEAT_MBYTE + + buffer_off, (size_t)(BUFLEN - buffer_off) + # else +*** ../vim-7.3.082/src/undo.c 2010-11-03 19:32:36.000000000 +0100 +--- src/undo.c 2010-12-17 15:39:24.000000000 +0100 +*************** +*** 1386,1392 **** + char_u mbuf[UF_START_MAGIC_LEN]; + int len; + +! len = vim_read(fd, mbuf, UF_START_MAGIC_LEN); + close(fd); + if (len < UF_START_MAGIC_LEN + || memcmp(mbuf, UF_START_MAGIC, UF_START_MAGIC_LEN) != 0) +--- 1386,1392 ---- + char_u mbuf[UF_START_MAGIC_LEN]; + int len; + +! len = read_eintr(fd, mbuf, UF_START_MAGIC_LEN); + close(fd); + if (len < UF_START_MAGIC_LEN + || memcmp(mbuf, UF_START_MAGIC, UF_START_MAGIC_LEN) != 0) +*** ../vim-7.3.082/src/vim.h 2010-12-02 16:01:23.000000000 +0100 +--- src/vim.h 2010-12-17 14:55:04.000000000 +0100 +*************** +*** 1642,1647 **** +--- 1642,1652 ---- + # define USE_INPUT_BUF + #endif + ++ #ifndef EINTR ++ # define read_eintr(fd, buf, count) vim_read((fd), (buf), (count)) ++ # define write_eintr(fd, buf, count) vim_write((fd), (buf), (count)) ++ #endif ++ + #ifdef MSWIN + /* On MS-Windows the third argument isn't size_t. This matters for Win64, + * where sizeof(size_t)==8, not 4 */ +*** ../vim-7.3.082/src/version.c 2010-12-17 12:19:14.000000000 +0100 +--- src/version.c 2010-12-17 16:10:58.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 83, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +9. As often as possible, skip rather than walk. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From affb91eb7fb002fc8f3db53e4b8ce805627667c0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0257/3803] Patchlevel 084 --- 7.3.084 | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 7.3.084 diff --git a/7.3.084 b/7.3.084 new file mode 100644 index 00000000..a46892e3 --- /dev/null +++ b/7.3.084 @@ -0,0 +1,123 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.084 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.084 +Problem: When splitting the window, the new one scrolls with the cursor at + the top. +Solution: Compute w_fraction before setting the new height. +Files: src/window.c + + +*** ../vim-7.3.083/src/window.c 2010-09-21 16:56:29.000000000 +0200 +--- src/window.c 2010-12-17 17:09:51.000000000 +0100 +*************** +*** 70,76 **** + #endif /* FEAT_WINDOWS */ + + static win_T *win_alloc __ARGS((win_T *after, int hidden)); +! static void win_new_height __ARGS((win_T *, int)); + + #define URL_SLASH 1 /* path_is_url() has found "://" */ + #define URL_BACKSLASH 2 /* path_is_url() has found ":\\" */ +--- 70,77 ---- + #endif /* FEAT_WINDOWS */ + + static win_T *win_alloc __ARGS((win_T *after, int hidden)); +! static void set_fraction __ARGS((win_T *wp)); +! static void win_new_height __ARGS((win_T *wp, int height)); + + #define URL_SLASH 1 /* path_is_url() has found "://" */ + #define URL_BACKSLASH 2 /* path_is_url() has found ":\\" */ +*************** +*** 983,992 **** +--- 984,999 ---- + else + frame_append(curfrp, frp); + ++ /* Set w_fraction now so that the cursor keeps the same relative ++ * vertical position. */ ++ set_fraction(oldwin); ++ wp->w_fraction = oldwin->w_fraction; ++ + #ifdef FEAT_VERTSPLIT + if (flags & WSP_VERT) + { + wp->w_p_scr = curwin->w_p_scr; ++ + if (need_status) + { + win_new_height(oldwin, oldwin->w_height - 1); +*************** +*** 5453,5458 **** +--- 5460,5478 ---- + + #endif /* FEAT_WINDOWS */ + ++ #define FRACTION_MULT 16384L ++ ++ /* ++ * Set wp->w_fraction for the current w_wrow and w_height. ++ */ ++ static void ++ set_fraction(wp) ++ win_T *wp; ++ { ++ wp->w_fraction = ((long)wp->w_wrow * FRACTION_MULT ++ + FRACTION_MULT / 2) / (long)wp->w_height; ++ } ++ + /* + * Set the height of a window. + * This takes care of the things inside the window, not what happens to the +*************** +*** 5465,5471 **** + { + linenr_T lnum; + int sline, line_size; +- #define FRACTION_MULT 16384L + + /* Don't want a negative height. Happens when splitting a tiny window. + * Will equalize heights soon to fix it. */ +--- 5485,5490 ---- +*************** +*** 5475,5482 **** + return; /* nothing to do */ + + if (wp->w_wrow != wp->w_prev_fraction_row && wp->w_height > 0) +! wp->w_fraction = ((long)wp->w_wrow * FRACTION_MULT +! + FRACTION_MULT / 2) / (long)wp->w_height; + + wp->w_height = height; + wp->w_skipcol = 0; +--- 5494,5500 ---- + return; /* nothing to do */ + + if (wp->w_wrow != wp->w_prev_fraction_row && wp->w_height > 0) +! set_fraction(wp); + + wp->w_height = height; + wp->w_skipcol = 0; +*** ../vim-7.3.083/src/version.c 2010-12-17 16:27:10.000000000 +0100 +--- src/version.c 2010-12-17 17:14:19.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 84, + /**/ + +-- +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/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 44c4da0ee47bd5f00aa1d59d1f40cd97a5e63e05 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0258/3803] Patchlevel 085 --- 7.3.085 | 313 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 313 insertions(+) create mode 100644 7.3.085 diff --git a/7.3.085 b/7.3.085 new file mode 100644 index 00000000..15fb87ff --- /dev/null +++ b/7.3.085 @@ -0,0 +1,313 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.085 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.085 (after 7.3.083) +Problem: Inconsistency with preproc symbols. void * computation. +Solution: Include vimio.h from vim.h. Add type cast. +Files: src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, src/fileio.c, + src/if_cscope.c, src/if_sniff.c, src/main.c, src/memfile.c, + src/memline.c, src/netbeans.c, src/os_msdos.c, src/os_mswin.c, + src/os_win16.c, src/os_win32.c, src/spell.c, src/tag.c, + src/undo.c, src/vim.h + + +*** ../vim-7.3.084/src/eval.c 2010-12-02 21:44:35.000000000 +0100 +--- src/eval.c 2010-12-17 17:45:37.000000000 +0100 +*************** +*** 10,18 **** + /* + * eval.c: Expression evaluation. + */ +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for mch_open(), must be before vim.h */ +- #endif + + #include "vim.h" + +--- 10,15 ---- +*** ../vim-7.3.084/src/ex_cmds.c 2010-11-24 17:59:27.000000000 +0100 +--- src/ex_cmds.c 2010-12-17 17:46:09.000000000 +0100 +*************** +*** 11,20 **** + * ex_cmds.c: some functions for command line commands + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for mch_open(), must be before vim.h */ +- #endif +- + #include "vim.h" + #include "version.h" + +--- 11,16 ---- +*** ../vim-7.3.084/src/ex_cmds2.c 2010-09-21 16:56:29.000000000 +0200 +--- src/ex_cmds2.c 2010-12-17 17:46:26.000000000 +0100 +*************** +*** 11,20 **** + * ex_cmds2.c: some more functions for command line commands + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for mch_open(), must be before vim.h */ +- #endif +- + #include "vim.h" + #include "version.h" + +--- 11,16 ---- +*** ../vim-7.3.084/src/fileio.c 2010-12-17 16:27:09.000000000 +0100 +--- src/fileio.c 2010-12-17 17:52:42.000000000 +0100 +*************** +*** 11,24 **** + * fileio.c: read from and write to a file + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for lseek(), must be before vim.h */ +- #endif +- +- #if defined __EMX__ +- # include "vimio.h" /* for mktemp(), CJW 1997-12-03 */ +- #endif +- + #include "vim.h" + + #if defined(__TANDEM) || defined(__MINT__) +--- 11,16 ---- +*************** +*** 10336,10342 **** + * by a signal. */ + while (ret < (long)bufsize) + { +! wlen = vim_write(fd, buf + ret, bufsize - ret); + if (wlen < 0) + { + if (errno != EINTR) +--- 10328,10334 ---- + * by a signal. */ + while (ret < (long)bufsize) + { +! wlen = vim_write(fd, (char *)buf + ret, bufsize - ret); + if (wlen < 0) + { + if (errno != EINTR) +*** ../vim-7.3.084/src/if_cscope.c 2010-09-21 16:56:29.000000000 +0200 +--- src/if_cscope.c 2010-12-17 17:47:02.000000000 +0100 +*************** +*** 20,28 **** + #include + #if defined(UNIX) + # include +- #else +- /* not UNIX, must be WIN32 */ +- # include "vimio.h" + #endif + #include "if_cscope.h" + +--- 20,25 ---- +*** ../vim-7.3.084/src/if_sniff.c 2010-08-15 21:57:25.000000000 +0200 +--- src/if_sniff.c 2010-12-17 17:47:20.000000000 +0100 +*************** +*** 9,15 **** + + #ifdef WIN32 + # include +- # include "vimio.h" + # include + # include + # include +--- 9,14 ---- +*** ../vim-7.3.084/src/main.c 2010-11-16 16:25:46.000000000 +0100 +--- src/main.c 2010-12-17 17:47:41.000000000 +0100 +*************** +*** 7,16 **** + * See README.txt for an overview of the Vim source code. + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for close() and dup() */ +- #endif +- + #define EXTERN + #include "vim.h" + +--- 7,12 ---- +*** ../vim-7.3.084/src/memfile.c 2010-12-17 16:27:10.000000000 +0100 +--- src/memfile.c 2010-12-17 17:47:54.000000000 +0100 +*************** +*** 32,41 **** + * file is opened. + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for lseek(), must be before vim.h */ +- #endif +- + #include "vim.h" + + /* +--- 32,37 ---- +*** ../vim-7.3.084/src/memline.c 2010-12-17 16:27:10.000000000 +0100 +--- src/memline.c 2010-12-17 17:48:06.000000000 +0100 +*************** +*** 42,51 **** + * mf_get(). + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for mch_open(), must be before vim.h */ +- #endif +- + #include "vim.h" + + #ifndef UNIX /* it's in os_unix.h for Unix */ +--- 42,47 ---- +*** ../vim-7.3.084/src/netbeans.c 2010-12-17 12:19:14.000000000 +0100 +--- src/netbeans.c 2010-12-17 17:48:19.000000000 +0100 +*************** +*** 16,25 **** + * See ":help netbeans-protocol" for explanation. + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for mch_open(), must be before vim.h */ +- #endif +- + #include "vim.h" + + #if defined(FEAT_NETBEANS_INTG) || defined(PROTO) +--- 16,21 ---- +*** ../vim-7.3.084/src/os_msdos.c 2010-08-15 21:57:25.000000000 +0200 +--- src/os_msdos.c 2010-12-17 17:48:40.000000000 +0100 +*************** +*** 21,27 **** + * Some functions are also used for Win16 (MS-Windows 3.1). + */ + +- #include "vimio.h" + #include "vim.h" + + #include +--- 21,26 ---- +*** ../vim-7.3.084/src/os_mswin.c 2010-10-23 14:02:48.000000000 +0200 +--- src/os_mswin.c 2010-12-17 17:48:51.000000000 +0100 +*************** +*** 22,28 **** + # endif + #endif + +- #include "vimio.h" + #include "vim.h" + + #ifdef WIN16 +--- 22,27 ---- +*** ../vim-7.3.084/src/os_win16.c 2010-08-15 21:57:32.000000000 +0200 +--- src/os_win16.c 2010-12-17 17:49:02.000000000 +0100 +*************** +*** 20,26 **** + # pragma warn -obs + #endif + +- #include "vimio.h" + #include "vim.h" + + #include +--- 20,25 ---- +*** ../vim-7.3.084/src/os_win32.c 2010-11-24 12:35:14.000000000 +0100 +--- src/os_win32.c 2010-12-17 17:49:11.000000000 +0100 +*************** +*** 20,26 **** + * Roger Knobbe did the initial port of Vim 3.0. + */ + +- #include "vimio.h" + #include "vim.h" + + #ifdef FEAT_MZSCHEME +--- 20,25 ---- +*** ../vim-7.3.084/src/spell.c 2010-12-08 17:09:27.000000000 +0100 +--- src/spell.c 2010-12-17 17:49:24.000000000 +0100 +*************** +*** 303,312 **** + * few bytes as possible, see offset2bytes()) + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for lseek(), must be before vim.h */ +- #endif +- + #include "vim.h" + + #if defined(FEAT_SPELL) || defined(PROTO) +--- 303,308 ---- +*** ../vim-7.3.084/src/tag.c 2010-09-21 16:56:29.000000000 +0200 +--- src/tag.c 2010-12-17 17:49:35.000000000 +0100 +*************** +*** 11,20 **** + * Code to handle tags and the tag stack + */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for lseek(), must be before vim.h */ +- #endif +- + #include "vim.h" + + /* +--- 11,16 ---- +*** ../vim-7.3.084/src/undo.c 2010-12-17 16:27:10.000000000 +0100 +--- src/undo.c 2010-12-17 17:49:59.000000000 +0100 +*************** +*** 81,90 **** + #define UH_MAGIC 0x18dade /* value for uh_magic when in use */ + #define UE_MAGIC 0xabc123 /* value for ue_magic when in use */ + +- #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) +- # include "vimio.h" /* for vim_read(), must be before vim.h */ +- #endif +- + #include "vim.h" + + static void u_unch_branch __ARGS((u_header_T *uhp)); +--- 81,86 ---- +*** ../vim-7.3.084/src/vim.h 2010-12-17 16:27:10.000000000 +0100 +--- src/vim.h 2010-12-17 17:51:43.000000000 +0100 +*************** +*** 27,32 **** +--- 27,37 ---- + # endif + #endif + ++ #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) \ ++ || defined(__EMX__) ++ # include "vimio.h" ++ #endif ++ + /* ============ the header file puzzle (ca. 50-100 pieces) ========= */ + + #ifdef HAVE_CONFIG_H /* GNU autoconf (or something else) was here */ +*** ../vim-7.3.084/src/version.c 2010-12-17 17:35:05.000000000 +0100 +--- src/version.c 2010-12-17 17:55:39.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 85, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +14. Put mosquito netting around your work area. Play a tape of jungle + sounds all day. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 0bfd6391c172d2259a81e0b58034c4b62eb346c3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0259/3803] Patchlevel 086 --- 7.3.086 | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 7.3.086 diff --git a/7.3.086 b/7.3.086 new file mode 100644 index 00000000..cf494e00 --- /dev/null +++ b/7.3.086 @@ -0,0 +1,138 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.086 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.086 +Problem: When using a mapping with an expression and there was no count, + v:count has the value of the previous command. (ZyX) +Solution: Also set v:count and v:count1 before getting the character that + could be a command or a count. +Files: src/normal.c + + +*** ../vim-7.3.085/src/normal.c 2010-10-13 18:06:42.000000000 +0200 +--- src/normal.c 2010-12-17 18:46:56.000000000 +0100 +*************** +*** 25,30 **** +--- 25,33 ---- + static int restart_VIsual_select = 0; + #endif + ++ #ifdef FEAT_EVAL ++ static void set_vcount_ca __ARGS((cmdarg_T *cap, int *set_prevcount)); ++ #endif + static int + # ifdef __BORLANDC__ + _RTLENTRYF +*************** +*** 648,653 **** +--- 651,664 ---- + dont_scroll = FALSE; /* allow scrolling here */ + #endif + ++ #ifdef FEAT_EVAL ++ /* Set v:count here, when called from main() and not a stuffed ++ * command, so that v:count can be used in an expression mapping ++ * when there is no count. */ ++ if (toplevel && stuff_empty()) ++ set_vcount_ca(&ca, &set_prevcount); ++ #endif ++ + /* + * Get the command character from the user. + */ +*************** +*** 725,739 **** + * command, so that v:count can be used in an expression mapping + * right after the count. */ + if (toplevel && stuff_empty()) +! { +! long count = ca.count0; +! +! /* multiply with ca.opcount the same way as below */ +! if (ca.opcount != 0) +! count = ca.opcount * (count == 0 ? 1 : count); +! set_vcount(count, count == 0 ? 1 : count, set_prevcount); +! set_prevcount = FALSE; /* only set v:prevcount once */ +! } + #endif + if (ctrl_w) + { +--- 736,742 ---- + * command, so that v:count can be used in an expression mapping + * right after the count. */ + if (toplevel && stuff_empty()) +! set_vcount_ca(&ca, &set_prevcount); + #endif + if (ctrl_w) + { +*************** +*** 1386,1391 **** +--- 1389,1414 ---- + opcount = ca.opcount; + } + ++ #ifdef FEAT_EVAL ++ /* ++ * Set v:count and v:count1 according to "cap". ++ * Set v:prevcount only when "set_prevcount" is TRUE. ++ */ ++ static void ++ set_vcount_ca(cap, set_prevcount) ++ cmdarg_T *cap; ++ int *set_prevcount; ++ { ++ long count = cap->count0; ++ ++ /* multiply with cap->opcount the same way as above */ ++ if (cap->opcount != 0) ++ count = cap->opcount * (count == 0 ? 1 : count); ++ set_vcount(count, count == 0 ? 1 : count, *set_prevcount); ++ *set_prevcount = FALSE; /* only set v:prevcount once */ ++ } ++ #endif ++ + /* + * Handle an operator after visual mode or when the movement is finished + */ +*************** +*** 8529,8535 **** + else + curwin->w_curswant = 0; + /* keep curswant at the column where we wanted to go, not where +! we ended; differs if line is too short */ + curwin->w_set_curswant = FALSE; + } + +--- 8552,8558 ---- + else + curwin->w_curswant = 0; + /* keep curswant at the column where we wanted to go, not where +! * we ended; differs if line is too short */ + curwin->w_set_curswant = FALSE; + } + +*** ../vim-7.3.085/src/version.c 2010-12-17 18:06:00.000000000 +0100 +--- src/version.c 2010-12-17 18:51:20.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 86, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +15. Five days in advance, tell your friends you can't attend their + party because you're not in the mood. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 48f656a88689a88615fa940ed25b58486d74a842 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0260/3803] Patchlevel 087 --- 7.3.087 | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 7.3.087 diff --git a/7.3.087 b/7.3.087 new file mode 100644 index 00000000..e0497dbd --- /dev/null +++ b/7.3.087 @@ -0,0 +1,152 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.087 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.087 +Problem: EINTR is not always defined. +Solution: Include errno.h in vim.h. +Files: src/if_cscope.c, src/if_tcl.c, src/integration.c, src/memline.c, + src/os_mswin.c, src/os_win16.c, src/os_win32.c, src/vim.h, + src/workshop.c + + +*** ../vim-7.3.086/src/if_cscope.c 2010-12-17 18:06:00.000000000 +0100 +--- src/if_cscope.c 2010-12-17 20:06:01.000000000 +0100 +*************** +*** 13,20 **** + + #if defined(FEAT_CSCOPE) || defined(PROTO) + +- #include +- #include + #include + #include + #include +--- 13,18 ---- +*** ../vim-7.3.086/src/if_tcl.c 2010-08-15 21:57:27.000000000 +0200 +--- src/if_tcl.c 2010-12-17 20:06:56.000000000 +0100 +*************** +*** 74,80 **** + #endif + + #include +- #include + #include + + typedef struct +--- 74,79 ---- +*** ../vim-7.3.086/src/integration.c 2010-08-15 21:57:29.000000000 +0200 +--- src/integration.c 2010-12-17 20:07:12.000000000 +0100 +*************** +*** 33,39 **** + #include + #endif + +- #include + #include + #include + #include +--- 33,38 ---- +*** ../vim-7.3.086/src/memline.c 2010-12-17 18:06:00.000000000 +0100 +--- src/memline.c 2010-12-17 20:07:31.000000000 +0100 +*************** +*** 52,61 **** + # include /* for Open() and Close() */ + #endif + +- #ifdef HAVE_ERRNO_H +- # include +- #endif +- + typedef struct block0 ZERO_BL; /* contents of the first block */ + typedef struct pointer_block PTR_BL; /* contents of a pointer block */ + typedef struct data_block DATA_BL; /* contents of a data block */ +--- 52,57 ---- +*** ../vim-7.3.086/src/os_mswin.c 2010-12-17 18:06:00.000000000 +0100 +--- src/os_mswin.c 2010-12-17 20:08:14.000000000 +0100 +*************** +*** 30,36 **** + # include + #endif + #include +- #include + #include + #include + #include +--- 30,35 ---- +*** ../vim-7.3.086/src/os_win16.c 2010-12-17 18:06:00.000000000 +0100 +--- src/os_win16.c 2010-12-17 20:08:53.000000000 +0100 +*************** +*** 25,31 **** + #include + #include + #include +- #include + #include + #include + #include +--- 25,30 ---- +*** ../vim-7.3.086/src/os_win32.c 2010-12-17 18:06:00.000000000 +0100 +--- src/os_win32.c 2010-12-17 20:09:18.000000000 +0100 +*************** +*** 27,33 **** + #endif + + #include +- #include + #include + #include + #include +--- 27,32 ---- +*** ../vim-7.3.086/src/vim.h 2010-12-17 18:06:00.000000000 +0100 +--- src/vim.h 2010-12-17 20:09:56.000000000 +0100 +*************** +*** 480,485 **** +--- 480,490 ---- + # include + #endif + ++ #if defined(HAVE_ERRNO_H) || defined(DJGPP) || defined(WIN16) \ ++ || defined(WIN32) || defined(_WIN64) || defined(__EMX__) ++ # include ++ #endif ++ + /* + * Allow other (non-unix) systems to configure themselves now + * These are also in os_unix.h, because osdef.sh needs them there. +*** ../vim-7.3.086/src/workshop.c 2010-08-15 21:57:26.000000000 +0200 +--- src/workshop.c 2010-12-17 20:09:31.000000000 +0100 +*************** +*** 16,22 **** + #include + #include + #include +- #include + #include + #ifdef HAVE_LIBGEN_H + # include +--- 16,21 ---- +*** ../vim-7.3.086/src/version.c 2010-12-17 18:52:56.000000000 +0100 +--- src/version.c 2010-12-17 20:14:49.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 87, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +17. When the money comes out the ATM, scream "I won!, I won! 3rd + time this week!!!!!" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 4314607d16bb6b4fe9ceeb3543eb458befcbcd1e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0261/3803] Patchlevel 088 --- 7.3.088 | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 7.3.088 diff --git a/7.3.088 b/7.3.088 new file mode 100644 index 00000000..98acc7c1 --- /dev/null +++ b/7.3.088 @@ -0,0 +1,152 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.088 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.088 +Problem: Ruby can't load Gems sometimes, may cause a crash. +Solution: Undefine off_t. Use ruby_process_options(). (Yasuhiro Matsumoto) +Files: src/if_ruby.c + + +*** ../vim-7.3.087/src/if_ruby.c 2010-12-08 13:11:15.000000000 +0100 +--- src/if_ruby.c 2010-12-24 12:18:31.000000000 +0100 +*************** +*** 90,95 **** +--- 90,96 ---- + # include + #endif + ++ #undef off_t /* ruby defines off_t as _int64, Mingw uses long */ + #undef EXTERN + #undef _ + +*************** +*** 229,238 **** + # define rb_enc_find_index dll_rb_enc_find_index + # define rb_enc_find dll_rb_enc_find + # define rb_enc_str_new dll_rb_enc_str_new +- # define rb_intern2 dll_rb_intern2 +- # define rb_const_remove dll_rb_const_remove + # define rb_sprintf dll_rb_sprintf + # define ruby_init_stack dll_ruby_init_stack + #endif + + /* +--- 230,239 ---- + # define rb_enc_find_index dll_rb_enc_find_index + # define rb_enc_find dll_rb_enc_find + # define rb_enc_str_new dll_rb_enc_str_new + # define rb_sprintf dll_rb_sprintf ++ # define rb_require dll_rb_require + # define ruby_init_stack dll_ruby_init_stack ++ # define ruby_process_options dll_ruby_process_options + #endif + + /* +*************** +*** 319,329 **** + static int (*dll_rb_enc_find_index) (const char*); + static rb_encoding* (*dll_rb_enc_find) (const char*); + static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*); +- static ID (*dll_rb_intern2) (const char*, long); +- static void (*dll_Init_prelude) (void); +- static VALUE (*dll_rb_const_remove) (VALUE, ID); + static VALUE (*dll_rb_sprintf) (const char*, ...); + static void (*ruby_init_stack)(VALUE*); + #endif + + #ifdef RUBY19_OR_LATER +--- 320,329 ---- + static int (*dll_rb_enc_find_index) (const char*); + static rb_encoding* (*dll_rb_enc_find) (const char*); + static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*); + static VALUE (*dll_rb_sprintf) (const char*, ...); ++ static VALUE (*dll_rb_require) (const char*); + static void (*ruby_init_stack)(VALUE*); ++ static void* (*ruby_process_options)(int, char**); + #endif + + #ifdef RUBY19_OR_LATER +*************** +*** 430,439 **** + {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, + {"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find}, + {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new}, +- {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2}, +- {"rb_const_remove", (RUBY_PROC*)&dll_rb_const_remove}, + {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf}, + {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack}, + #endif + {"", NULL}, + }; +--- 430,439 ---- + {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, + {"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find}, + {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new}, + {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf}, ++ {"rb_require", (RUBY_PROC*)&dll_rb_require}, + {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack}, ++ {"ruby_process_options", (RUBY_PROC*)&dll_ruby_process_options}, + #endif + {"", NULL}, + }; +*************** +*** 663,680 **** + ruby_init(); + } + #ifdef RUBY19_OR_LATER + ruby_script("vim-ruby"); +! #endif + ruby_init_loadpath(); +- ruby_io_init(); +- #ifdef RUBY19_OR_LATER +- rb_enc_find_index("encdb"); +- +- /* This avoids the error "Encoding::ConverterNotFoundError: code +- * converter not found (UTF-16LE to ASCII-8BIT)". */ +- rb_define_module("Gem"); +- rb_const_remove(rb_cObject, rb_intern2("TMP_RUBY_PREFIX", 15)); + #endif + ruby_vim_init(); + ruby_initialized = 1; + #ifdef DYNAMIC_RUBY +--- 663,678 ---- + ruby_init(); + } + #ifdef RUBY19_OR_LATER ++ { ++ int dummy_argc = 2; ++ char *dummy_argv[] = {"vim-ruby", "-e0"}; ++ ruby_process_options(dummy_argc, dummy_argv); ++ } + ruby_script("vim-ruby"); +! #else + ruby_init_loadpath(); + #endif ++ ruby_io_init(); + ruby_vim_init(); + ruby_initialized = 1; + #ifdef DYNAMIC_RUBY +*** ../vim-7.3.087/src/version.c 2010-12-17 20:23:56.000000000 +0100 +--- src/version.c 2010-12-24 13:38:51.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 88, + /**/ + +-- +It is hard to understand how a cemetery raised its burial +cost and blamed it on the cost of living. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From bf306a5a25da29cf94060b8c96415e9e6a020025 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0262/3803] Patchlevel 089 --- 7.3.089 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 7.3.089 diff --git a/7.3.089 b/7.3.089 new file mode 100644 index 00000000..47b894af --- /dev/null +++ b/7.3.089 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.089 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.089 +Problem: Compiler warning on 64 bit MS-Windows. +Solution: Add type cast. (Mike Williams) +Files: src/netbeans.c + + +*** ../vim-7.3.088/src/netbeans.c 2010-12-17 18:06:00.000000000 +0100 +--- src/netbeans.c 2010-12-17 20:21:05.000000000 +0100 +*************** +*** 800,806 **** + * -> gui event loop or select loop + * -> netbeans_read() + */ +! save((char_u *)DETACH_MSG, strlen(DETACH_MSG)); + nb_close_socket(); + + if (len < 0) +--- 800,806 ---- + * -> gui event loop or select loop + * -> netbeans_read() + */ +! save((char_u *)DETACH_MSG, (int)strlen(DETACH_MSG)); + nb_close_socket(); + + if (len < 0) +*** ../vim-7.3.088/src/version.c 2010-12-24 13:39:29.000000000 +0100 +--- src/version.c 2010-12-24 13:59:03.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 89, + /**/ + +-- +The 50-50-90 rule: Anytime you have a 50-50 chance of getting +something right, there's a 90% probability you'll get it wrong. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e6d0b39e0947fd21c1bdb39e2ea765f7d328aebb Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0263/3803] Patchlevel 090 --- 7.3.090 | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 7.3.090 diff --git a/7.3.090 b/7.3.090 new file mode 100644 index 00000000..cf68d620 --- /dev/null +++ b/7.3.090 @@ -0,0 +1,68 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.090 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.090 +Problem: Wrong help text for Cscope. +Solution: Adjust the help text for "t". (Dominique Pelle) +Files: src/if_cscope.c + + +*** ../vim-7.3.089/src/if_cscope.c 2010-12-17 20:23:56.000000000 +0100 +--- src/if_cscope.c 2010-12-30 11:35:37.000000000 +0100 +*************** +*** 1346,1352 **** + " g: Find this definition\n" + " i: Find files #including this file\n" + " s: Find this C symbol\n" +! " t: Find assignments to\n")); + + cmdp++; + } +--- 1346,1352 ---- + " g: Find this definition\n" + " i: Find files #including this file\n" + " s: Find this C symbol\n" +! " t: Find this text string\n")); + + cmdp++; + } +*************** +*** 1657,1663 **** + /* + * PRIVATE: cs_make_vim_style_matches + * +! * convert the cscope output into into a ctags style entry (as might be found + * in a ctags tags file). there's one catch though: cscope doesn't tell you + * the type of the tag you are looking for. for example, in Darren Hiebert's + * ctags (the one that comes with vim), #define's use a line number to find the +--- 1657,1663 ---- + /* + * PRIVATE: cs_make_vim_style_matches + * +! * convert the cscope output into a ctags style entry (as might be found + * in a ctags tags file). there's one catch though: cscope doesn't tell you + * the type of the tag you are looking for. for example, in Darren Hiebert's + * ctags (the one that comes with vim), #define's use a line number to find the +*** ../vim-7.3.089/src/version.c 2010-12-24 14:00:09.000000000 +0100 +--- src/version.c 2010-12-30 11:36:33.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 90, + /**/ + +-- +ERROR 047: Keyboard not found. Press RETURN to continue. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d6850c501e6f20a02d9ad79f6c5353b8b2c216cb Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0264/3803] Patchlevel 091 --- 7.3.091 | 321 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 321 insertions(+) create mode 100644 7.3.091 diff --git a/7.3.091 b/7.3.091 new file mode 100644 index 00000000..f0aac0d9 --- /dev/null +++ b/7.3.091 @@ -0,0 +1,321 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.091 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.091 +Problem: "vim -w foo" writes special key codes for removed escape + sequences. (Josh Triplett) +Solution: Don't write K_IGNORE codes. +Files: src/getchar.c, src/misc1.c, src/term.c, src/vim.h + + +*** ../vim-7.3.090/src/getchar.c 2010-10-27 17:39:00.000000000 +0200 +--- src/getchar.c 2010-12-30 12:16:36.000000000 +0100 +*************** +*** 1506,1514 **** + } + } + +- #define KL_PART_KEY -1 /* keylen value for incomplete key-code */ +- #define KL_PART_MAP -2 /* keylen value for incomplete mapping */ +- + /* + * Get the next input character. + * Can return a special key or a multi-byte character. +--- 1506,1511 ---- +*************** +*** 2171,2177 **** + if (!timedout) + { + /* break at a partly match */ +! keylen = KL_PART_MAP; + break; + } + } +--- 2168,2174 ---- + if (!timedout) + { + /* break at a partly match */ +! keylen = KEYLEN_PART_MAP; + break; + } + } +*************** +*** 2192,2198 **** + + /* If no partly match found, use the longest full + * match. */ +! if (keylen != KL_PART_MAP) + { + mp = mp_match; + keylen = mp_match_len; +--- 2189,2195 ---- + + /* If no partly match found, use the longest full + * match. */ +! if (keylen != KEYLEN_PART_MAP) + { + mp = mp_match; + keylen = mp_match_len; +*************** +*** 2230,2236 **** + } + /* Need more chars for partly match. */ + if (mlen == typebuf.tb_len) +! keylen = KL_PART_KEY; + else if (max_mlen < mlen) + /* no match, may have to check for termcode at + * next character */ +--- 2227,2233 ---- + } + /* Need more chars for partly match. */ + if (mlen == typebuf.tb_len) +! keylen = KEYLEN_PART_KEY; + else if (max_mlen < mlen) + /* no match, may have to check for termcode at + * next character */ +*************** +*** 2238,2244 **** + } + + if ((mp == NULL || max_mlen >= mp_match_len) +! && keylen != KL_PART_MAP) + { + int save_keylen = keylen; + +--- 2235,2241 ---- + } + + if ((mp == NULL || max_mlen >= mp_match_len) +! && keylen != KEYLEN_PART_MAP) + { + int save_keylen = keylen; + +*************** +*** 2264,2271 **** + /* If no termcode matched but 'pastetoggle' + * matched partially it's like an incomplete key + * sequence. */ +! if (keylen == 0 && save_keylen == KL_PART_KEY) +! keylen = KL_PART_KEY; + + /* + * When getting a partial match, but the last +--- 2261,2268 ---- + /* If no termcode matched but 'pastetoggle' + * matched partially it's like an incomplete key + * sequence. */ +! if (keylen == 0 && save_keylen == KEYLEN_PART_KEY) +! keylen = KEYLEN_PART_KEY; + + /* + * When getting a partial match, but the last +*************** +*** 2302,2308 **** + continue; + } + if (*s == NUL) /* need more characters */ +! keylen = KL_PART_KEY; + } + if (keylen >= 0) + #endif +--- 2299,2305 ---- + continue; + } + if (*s == NUL) /* need more characters */ +! keylen = KEYLEN_PART_KEY; + } + if (keylen >= 0) + #endif +*************** +*** 2339,2345 **** + if (keylen > 0) /* full matching terminal code */ + { + #if defined(FEAT_GUI) && defined(FEAT_MENU) +! if (typebuf.tb_buf[typebuf.tb_off] == K_SPECIAL + && typebuf.tb_buf[typebuf.tb_off + 1] + == KS_MENU) + { +--- 2336,2343 ---- + if (keylen > 0) /* full matching terminal code */ + { + #if defined(FEAT_GUI) && defined(FEAT_MENU) +! if (typebuf.tb_len >= 2 +! && typebuf.tb_buf[typebuf.tb_off] == K_SPECIAL + && typebuf.tb_buf[typebuf.tb_off + 1] + == KS_MENU) + { +*************** +*** 2381,2387 **** + /* Partial match: get some more characters. When a + * matching mapping was found use that one. */ + if (mp == NULL || keylen < 0) +! keylen = KL_PART_KEY; + else + keylen = mp_match_len; + } +--- 2379,2385 ---- + /* Partial match: get some more characters. When a + * matching mapping was found use that one. */ + if (mp == NULL || keylen < 0) +! keylen = KEYLEN_PART_KEY; + else + keylen = mp_match_len; + } +*************** +*** 2553,2559 **** + #endif + && typebuf.tb_maplen == 0 + && (State & INSERT) +! && (p_timeout || (keylen == KL_PART_KEY && p_ttimeout)) + && (c = inchar(typebuf.tb_buf + typebuf.tb_off + + typebuf.tb_len, 3, 25L, + typebuf.tb_change_cnt)) == 0) +--- 2551,2558 ---- + #endif + && typebuf.tb_maplen == 0 + && (State & INSERT) +! && (p_timeout +! || (keylen == KEYLEN_PART_KEY && p_ttimeout)) + && (c = inchar(typebuf.tb_buf + typebuf.tb_off + + typebuf.tb_len, 3, 25L, + typebuf.tb_change_cnt)) == 0) +*************** +*** 2783,2791 **** + ? 0 + : ((typebuf.tb_len == 0 + || !(p_timeout || (p_ttimeout +! && keylen == KL_PART_KEY))) + ? -1L +! : ((keylen == KL_PART_KEY && p_ttm >= 0) + ? p_ttm + : p_tm)), typebuf.tb_change_cnt); + +--- 2782,2790 ---- + ? 0 + : ((typebuf.tb_len == 0 + || !(p_timeout || (p_ttimeout +! && keylen == KEYLEN_PART_KEY))) + ? -1L +! : ((keylen == KEYLEN_PART_KEY && p_ttm >= 0) + ? p_ttm + : p_tm)), typebuf.tb_change_cnt); + +*** ../vim-7.3.090/src/misc1.c 2010-12-02 16:01:23.000000000 +0100 +--- src/misc1.c 2010-12-30 12:28:59.000000000 +0100 +*************** +*** 3114,3123 **** + && (!p_ttimeout || waited * 100L < (p_ttm < 0 ? p_tm : p_ttm))) + continue; + +! /* found a termcode: adjust length */ +! if (n > 0) + len = n; +! if (len == 0) /* nothing typed yet */ + continue; + + /* Handle modifier and/or special key code. */ +--- 3114,3124 ---- + && (!p_ttimeout || waited * 100L < (p_ttm < 0 ? p_tm : p_ttm))) + continue; + +! if (n == KEYLEN_REMOVED) /* key code removed */ +! continue; +! if (n > 0) /* found a termcode: adjust length */ + len = n; +! if (len == 0) /* nothing typed yet */ + continue; + + /* Handle modifier and/or special key code. */ +*** ../vim-7.3.090/src/term.c 2010-08-15 21:57:32.000000000 +0200 +--- src/term.c 2010-12-30 12:14:48.000000000 +0100 +*************** +*** 3828,3833 **** +--- 3831,3837 ---- + * Check from typebuf.tb_buf[typebuf.tb_off] to typebuf.tb_buf[typebuf.tb_off + * + max_offset]. + * Return 0 for no match, -1 for partial match, > 0 for full match. ++ * Return KEYLEN_REMOVED when a key code was deleted. + * With a match, the match is removed, the replacement code is inserted in + * typebuf.tb_buf[] and the number of characters in typebuf.tb_buf[] is + * returned. +*************** +*** 3845,3850 **** +--- 3849,3855 ---- + int slen = 0; /* init for GCC */ + int modslen; + int len; ++ int retval = 0; + int offset; + char_u key_name[2]; + int modifiers; +*************** +*** 4940,4945 **** +--- 4945,4957 ---- + #endif + string[new_slen++] = key_name[1]; + } ++ else if (new_slen == 0 && key_name[0] == KS_EXTRA ++ && key_name[1] == KE_IGNORE) ++ { ++ /* Do not put K_IGNORE into the buffer, do return KEYLEN_REMOVED ++ * to indicate what happened. */ ++ retval = KEYLEN_REMOVED; ++ } + else + { + string[new_slen++] = K_SPECIAL; +*************** +*** 4976,4982 **** + (size_t)(buflen - offset)); + mch_memmove(buf + offset, string, (size_t)new_slen); + } +! return (len + extra + offset); + } + + return 0; /* no match found */ +--- 4988,4994 ---- + (size_t)(buflen - offset)); + mch_memmove(buf + offset, string, (size_t)new_slen); + } +! return retval == 0 ? (len + extra + offset) : retval; + } + + return 0; /* no match found */ +*** ../vim-7.3.090/src/vim.h 2010-12-17 20:23:56.000000000 +0100 +--- src/vim.h 2010-12-30 12:06:45.000000000 +0100 +*************** +*** 2211,2214 **** +--- 2211,2218 ---- + #define MSCR_LEFT -1 + #define MSCR_RIGHT -2 + ++ #define KEYLEN_PART_KEY -1 /* keylen value for incomplete key-code */ ++ #define KEYLEN_PART_MAP -2 /* keylen value for incomplete mapping */ ++ #define KEYLEN_REMOVED 9999 /* keylen value for removed sequence */ ++ + #endif /* VIM__H */ +*** ../vim-7.3.090/src/version.c 2010-12-30 11:41:05.000000000 +0100 +--- src/version.c 2010-12-30 12:24:56.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 91, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +56. You leave the modem speaker on after connecting because you think it + sounds like the ocean wind...the perfect soundtrack for "surfing the net". + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d96b88ed45f488c4e347bfd3b48286bf691c8c9e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0265/3803] Patchlevel 092 --- 7.3.092 | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 7.3.092 diff --git a/7.3.092 b/7.3.092 new file mode 100644 index 00000000..d100b00b --- /dev/null +++ b/7.3.092 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.092 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.092 +Problem: Resizing the window when exiting. +Solution: Don't resize when exiting. +Files: src/term.c + + +*** ../vim-7.3.091/src/term.c 2010-12-30 12:30:26.000000000 +0100 +--- src/term.c 2010-12-30 12:14:48.000000000 +0100 +*************** +*** 3053,3062 **** + int old_Rows = Rows; + int old_Columns = Columns; + +! (void)ui_get_shellsize(); +! check_shellsize(); +! if (old_Rows != Rows || old_Columns != Columns) +! shell_resized(); + } + + /* +--- 3053,3065 ---- + int old_Rows = Rows; + int old_Columns = Columns; + +! if (!exiting) +! { +! (void)ui_get_shellsize(); +! check_shellsize(); +! if (old_Rows != Rows || old_Columns != Columns) +! shell_resized(); +! } + } + + /* +*** ../vim-7.3.091/src/version.c 2010-12-30 12:30:26.000000000 +0100 +--- src/version.c 2010-12-30 14:47:04.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 92, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +57. You begin to wonder how on earth your service provider is allowed to call + 200 hours per month "unlimited." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From de8edfc82320ad06b413676cd9f392586560565e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0266/3803] Patchlevel 093 --- 7.3.093 | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 7.3.093 diff --git a/7.3.093 b/7.3.093 new file mode 100644 index 00000000..9bf0fe8a --- /dev/null +++ b/7.3.093 @@ -0,0 +1,201 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.093 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.093 +Problem: New DLL dependencies in MingW with gcc 4.5.0. +Solution: Add STATIC_STDCPLUS, LDFLAGS and split up WINDRES. (Guopeng Wen) +Files: src/GvimExt/Make_ming.mak, src/Make_ming.mak + + +*** ../vim-7.3.092/src/GvimExt/Make_ming.mak 2010-09-29 18:42:25.000000000 +0200 +--- src/GvimExt/Make_ming.mak 2010-12-30 14:42:51.000000000 +0100 +*************** +*** 17,22 **** +--- 17,33 ---- + # check also the executables + MINGWOLD = no + ++ # Link against the shared versions of libgcc/libstdc++ by default. Set ++ # STATIC_STDCPLUS to "yes" to link against static versions instead. ++ STATIC_STDCPLUS=no ++ #STATIC_STDCPLUS=yes ++ ++ # Note: -static-libstdc++ is not available until gcc 4.5.x. ++ LDFLAGS += -shared ++ ifeq (yes, $(STATIC_STDCPLUS)) ++ LDFLAGS += -static-libgcc -static-libstdc++ ++ endif ++ + ifeq ($(CROSS),yes) + DEL = rm + ifeq ($(MINGWOLD),yes) +*************** +*** 33,39 **** + endif + endif + CXX := $(CROSS_COMPILE)g++ +! WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CXX) -E -xc" -DRC_INVOKED + LIBS := -luuid + RES := gvimext.res + DEFFILE = gvimext_ming.def +--- 44,52 ---- + endif + endif + CXX := $(CROSS_COMPILE)g++ +! WINDRES := $(CROSS_COMPILE)windres +! WINDRES_CXX = $(CXX) +! WINDRES_FLAGS = --preprocessor="$(WINDRES_CXX) -E -xc" -DRC_INVOKED + LIBS := -luuid + RES := gvimext.res + DEFFILE = gvimext_ming.def +*************** +*** 46,52 **** + all: all-before $(DLL) all-after + + $(DLL): $(OBJ) $(RES) $(DEFFILE) +! $(CXX) -shared $(CXXFLAGS) -s -o $@ \ + -Wl,--enable-auto-image-base \ + -Wl,--enable-auto-import \ + -Wl,--whole-archive \ +--- 59,65 ---- + all: all-before $(DLL) all-after + + $(DLL): $(OBJ) $(RES) $(DEFFILE) +! $(CXX) $(LDFLAGS) $(CXXFLAGS) -s -o $@ \ + -Wl,--enable-auto-image-base \ + -Wl,--enable-auto-import \ + -Wl,--whole-archive \ +*************** +*** 58,64 **** + $(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@ + + $(RES): gvimext_ming.rc +! $(WINDRES) --input-format=rc --output-format=coff -DMING $? -o $@ + + clean: clean-custom + -$(DEL) $(OBJ) $(RES) $(DLL) +--- 71,77 ---- + $(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@ + + $(RES): gvimext_ming.rc +! $(WINDRES) $(WINDRES_FLAGS) --input-format=rc --output-format=coff -DMING $? -o $@ + + clean: clean-custom + -$(DEL) $(OBJ) $(RES) $(DLL) +*** ../vim-7.3.092/src/Make_ming.mak 2010-11-03 21:59:23.000000000 +0100 +--- src/Make_ming.mak 2010-12-30 14:42:51.000000000 +0100 +*************** +*** 56,61 **** +--- 56,67 ---- + NETBEANS=$(GUI) + + ++ # Link against the shared version of libstdc++ by default. Set ++ # STATIC_STDCPLUS to "yes" to link against static version instead. ++ ifndef STATIC_STDCPLUS ++ STATIC_STDCPLUS=no ++ endif ++ + # If the user doesn't want gettext, undefine it. + ifeq (no, $(GETTEXT)) + GETTEXT= +*************** +*** 309,320 **** + endif + endif + CC := $(CROSS_COMPILE)gcc +! WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CC) -E -xc" -DRC_INVOKED + + #>>>>> end of choices + ########################################################################### + + CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall + + ifdef GETTEXT + DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H +--- 315,328 ---- + endif + endif + CC := $(CROSS_COMPILE)gcc +! WINDRES := $(CROSS_COMPILE)windres +! WINDRES_CC = $(CC) + + #>>>>> end of choices + ########################################################################### + + CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall ++ WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED + + ifdef GETTEXT + DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H +*************** +*** 577,584 **** + endif + + ifeq (yes, $(OLE)) +! LIB += -loleaut32 -lstdc++ + OBJ += $(OUTDIR)/if_ole.o + endif + + ifeq (yes, $(MBYTE)) +--- 585,597 ---- + endif + + ifeq (yes, $(OLE)) +! LIB += -loleaut32 + OBJ += $(OUTDIR)/if_ole.o ++ ifeq (yes, $(STATIC_STDCPLUS)) ++ LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic ++ else ++ LIB += -lstdc++ ++ endif + endif + + ifeq (yes, $(MBYTE)) +*************** +*** 656,665 **** + $(CC) -c $(CFLAGS) $< -o $@ + + $(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h +! $(WINDRES) $(DEFINES) vim.rc $(OUTDIR)/vimres.res + + $(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res +! $(WINDRES) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o + + $(OUTDIR): + $(MKDIR) $(OUTDIR) +--- 669,678 ---- + $(CC) -c $(CFLAGS) $< -o $@ + + $(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h +! $(WINDRES) $(WINDRES_FLAGS) $(DEFINES) vim.rc $(OUTDIR)/vimres.res + + $(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res +! $(WINDRES) $(WINDRES_FLAGS) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o + + $(OUTDIR): + $(MKDIR) $(OUTDIR) +*** ../vim-7.3.092/src/version.c 2010-12-30 14:47:32.000000000 +0100 +--- src/version.c 2010-12-30 14:48:34.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 93, + /**/ + +-- +Creating the world with Emacs: M-x let-there-be-light +Creating the world with Vim: :make world + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From bfc13c634e60547446562554e9d6de6d25639b1d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0267/3803] Patchlevel 094 --- 7.3.094 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 7.3.094 diff --git a/7.3.094 b/7.3.094 new file mode 100644 index 00000000..e95122bb --- /dev/null +++ b/7.3.094 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.094 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.094 +Problem: Using abs() requires type cast to int. +Solution: Use labs() so that the value remains long. (Hong Xu) +Files: src/screen.c + + +*** ../vim-7.3.093/src/screen.c 2010-12-08 19:56:52.000000000 +0100 +--- src/screen.c 2010-12-30 14:54:08.000000000 +0100 +*************** +*** 2317,2323 **** + num = (long)lnum; + else + /* 'relativenumber', don't use negative numbers */ +! num = (long)abs((int)get_cursor_rel_lnum(wp, lnum)); + + sprintf((char *)buf, "%*ld ", w, num); + #ifdef FEAT_RIGHTLEFT +--- 2317,2323 ---- + num = (long)lnum; + else + /* 'relativenumber', don't use negative numbers */ +! num = labs((long)get_cursor_rel_lnum(wp, lnum)); + + sprintf((char *)buf, "%*ld ", w, num); + #ifdef FEAT_RIGHTLEFT +*************** +*** 3475,3482 **** + num = (long)lnum; + else + /* 'relativenumber', don't use negative numbers */ +! num = (long)abs((int)get_cursor_rel_lnum(wp, +! lnum)); + + sprintf((char *)extra, "%*ld ", + number_width(wp), num); +--- 3475,3481 ---- + num = (long)lnum; + else + /* 'relativenumber', don't use negative numbers */ +! num = labs((long)get_cursor_rel_lnum(wp, lnum)); + + sprintf((char *)extra, "%*ld ", + number_width(wp), num); +*** ../vim-7.3.093/src/version.c 2010-12-30 14:50:46.000000000 +0100 +--- src/version.c 2010-12-30 14:56:32.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 94, + /**/ + +-- +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/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 69050df79b8953367b4504695a918e605eebdaa0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0268/3803] Patchlevel 095 --- 7.3.095 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 7.3.095 diff --git a/7.3.095 b/7.3.095 new file mode 100644 index 00000000..2ea34924 --- /dev/null +++ b/7.3.095 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.095 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.095 +Problem: Win32: In Chinese tear-off menu doesn't work. (Weasley) +Solution: Use menu_name_equal(). (Alex Jakushev) +Files: src/menu.c + + +*** ../vim-7.3.094/src/menu.c 2010-08-15 21:57:25.000000000 +0200 +--- src/menu.c 2011-01-04 17:41:38.000000000 +0100 +*************** +*** 1512,1519 **** + { + #ifdef FEAT_MULTI_LANG + if (menu->en_name != NULL +! && (menu_namecmp(name,menu->en_name) +! || menu_namecmp(name,menu->en_dname))) + return TRUE; + #endif + return menu_namecmp(name, menu->name) || menu_namecmp(name, menu->dname); +--- 1512,1519 ---- + { + #ifdef FEAT_MULTI_LANG + if (menu->en_name != NULL +! && (menu_namecmp(name, menu->en_name) +! || menu_namecmp(name, menu->en_dname))) + return TRUE; + #endif + return menu_namecmp(name, menu->name) || menu_namecmp(name, menu->dname); +*************** +*** 2342,2348 **** + + while (menu != NULL) + { +! if (STRCMP(name, menu->name) == 0 || STRCMP(name, menu->dname) == 0) + { + if (menu->children == NULL) + { +--- 2342,2348 ---- + + while (menu != NULL) + { +! if (menu_name_equal(name, menu)) + { + if (menu->children == NULL) + { +*** ../vim-7.3.094/src/version.c 2010-12-30 14:57:03.000000000 +0100 +--- src/version.c 2011-01-04 17:43:41.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 95, + /**/ + +-- +If your nose runs, and your feet smell, you might be upside down. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 821107e026a168d02284a21cd9ea427af1c409e1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0269/3803] Patchlevel 096 --- 7.3.096 | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 7.3.096 diff --git a/7.3.096 b/7.3.096 new file mode 100644 index 00000000..b8b541b7 --- /dev/null +++ b/7.3.096 @@ -0,0 +1,97 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.096 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.096 +Problem: "gvim -nb" is not interruptable. Leaking file descriptor on + netbeans connection error. +Solution: Check for CTRL-C typed. Free file descriptor. (Xavier de Gaye) +Files: src/netbeans.c + + +*** ../vim-7.3.095/src/netbeans.c 2010-12-24 14:00:09.000000000 +0100 +--- src/netbeans.c 2011-01-04 18:00:35.000000000 +0100 +*************** +*** 321,326 **** +--- 321,327 ---- + { + nbdebug(("error in gethostbyname() in netbeans_connect()\n")); + PERROR("gethostbyname() in netbeans_connect()"); ++ sock_close(sd); + goto theend; + } + memcpy((char *)&server.sin_addr, host->h_addr, host->h_length); +*************** +*** 370,384 **** + || (errno == EINTR))) + { + nbdebug(("retrying...\n")); +! sleep(5); +! if (!doabort) + { +! ui_breakcheck(); +! if (got_int) +! { +! errno = EINTR; +! break; +! } + } + if (connect(sd, (struct sockaddr *)&server, + sizeof(server)) == 0) +--- 371,382 ---- + || (errno == EINTR))) + { + nbdebug(("retrying...\n")); +! mch_delay(3000L, TRUE); +! ui_breakcheck(); +! if (got_int) + { +! errno = EINTR; +! break; + } + if (connect(sd, (struct sockaddr *)&server, + sizeof(server)) == 0) +*************** +*** 393,398 **** +--- 391,397 ---- + /* Get here when the server can't be found. */ + nbdebug(("Cannot connect to Netbeans #2\n")); + PERROR(_("Cannot connect to Netbeans #2")); ++ sock_close(sd); + if (doabort) + getout(1); + goto theend; +*************** +*** 403,408 **** +--- 402,408 ---- + { + nbdebug(("Cannot connect to Netbeans\n")); + PERROR(_("Cannot connect to Netbeans")); ++ sock_close(sd); + if (doabort) + getout(1); + goto theend; +*** ../vim-7.3.095/src/version.c 2011-01-04 17:49:25.000000000 +0100 +--- src/version.c 2011-01-04 18:09:46.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 96, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +85. Choice between paying Compuserve bill and paying for kids education + is a no brainer -- although a bit painful for your kids. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 0a122640f1a7b1ac6a025a90810c218ef237b58f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0270/3803] Patchlevel 097 --- 7.3.097 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 7.3.097 diff --git a/7.3.097 b/7.3.097 new file mode 100644 index 00000000..2ee20a32 --- /dev/null +++ b/7.3.097 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.097 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.097 +Problem: Using ":call" inside "if 0" does not see that a function returns a + Dict and gives error for "." as string concatenation. +Solution: Use eval0() to skip over the expression. (Yasuhiro Matsumoto) +Files: src/eval.c + + +*** ../vim-7.3.096/src/eval.c 2010-12-17 18:06:00.000000000 +0100 +--- src/eval.c 2011-01-04 18:54:27.000000000 +0100 +*************** +*** 3335,3340 **** +--- 3335,3349 ---- + int failed = FALSE; + funcdict_T fudi; + ++ if (eap->skip) ++ { ++ /* trans_function_name() doesn't work well when skipping, use eval0() ++ * instead to skip to any following command, e.g. for: ++ * :if 0 | call dict.foo().bar() | endif */ ++ eval0(eap->arg, &rettv, &eap->nextcmd, FALSE); ++ return; ++ } ++ + tofree = trans_function_name(&arg, eap->skip, TFN_INT, &fudi); + if (fudi.fd_newkey != NULL) + { +*** ../vim-7.3.096/src/version.c 2011-01-04 18:11:39.000000000 +0100 +--- src/version.c 2011-01-04 19:00:21.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 97, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +86. E-mail Deficiency Depression (EDD) forces you to e-mail yourself. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 08b2fd2336e9261ef0bd481412565d2e93f73380 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0271/3803] Patchlevel 098 --- 7.3.098 | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 7.3.098 diff --git a/7.3.098 b/7.3.098 new file mode 100644 index 00000000..9e6435eb --- /dev/null +++ b/7.3.098 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.098 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.098 +Problem: Function that ignores error still causes called_emsg to be set. + E.g. when expand() fails the status line is disabled. +Solution: Move check for emsg_not_now() up. (James Vega) +Files: src/message.c + + +*** ../vim-7.3.097/src/message.c 2010-10-20 21:22:17.000000000 +0200 +--- src/message.c 2011-01-04 19:19:04.000000000 +0100 +*************** +*** 569,574 **** +--- 569,578 ---- + int severe; + #endif + ++ /* Skip this if not giving error messages at the moment. */ ++ if (emsg_not_now()) ++ return TRUE; ++ + called_emsg = TRUE; + ex_exitval = 1; + +*************** +*** 581,590 **** + emsg_severe = FALSE; + #endif + +- /* Skip this if not giving error messages at the moment. */ +- if (emsg_not_now()) +- return TRUE; +- + if (!emsg_off || vim_strchr(p_debug, 't') != NULL) + { + #ifdef FEAT_EVAL +--- 585,590 ---- +*** ../vim-7.3.097/src/version.c 2011-01-04 19:03:22.000000000 +0100 +--- src/version.c 2011-01-04 19:24:30.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 98, + /**/ + +-- +Ed's Radiator Shop: The Best Place in Town to Take a Leak. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From feb24050dbe9e3e4417505b64ac68d6443d9e763 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0272/3803] Patchlevel 099 --- 7.3.099 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 7.3.099 diff --git a/7.3.099 b/7.3.099 new file mode 100644 index 00000000..84aa2a3f --- /dev/null +++ b/7.3.099 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.099 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.099 +Problem: Crash when splitting a window with zero height. (Yukihiro + Nakadaira) +Solution: Don't set the fraction in a window with zero height. +Files: src/window.c + + +*** ../vim-7.3.098/src/window.c 2010-12-17 17:35:05.000000000 +0100 +--- src/window.c 2011-01-08 14:41:32.000000000 +0100 +*************** +*** 986,992 **** + + /* Set w_fraction now so that the cursor keeps the same relative + * vertical position. */ +! set_fraction(oldwin); + wp->w_fraction = oldwin->w_fraction; + + #ifdef FEAT_VERTSPLIT +--- 986,993 ---- + + /* Set w_fraction now so that the cursor keeps the same relative + * vertical position. */ +! if (oldwin->w_height > 0) +! set_fraction(oldwin); + wp->w_fraction = oldwin->w_fraction; + + #ifdef FEAT_VERTSPLIT +*** ../vim-7.3.098/src/version.c 2011-01-04 19:25:46.000000000 +0100 +--- src/version.c 2011-01-08 14:44:02.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 99, + /**/ + +-- +From "know your smileys": + 8-O "Omigod!!" (done "rm -rf *" ?) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 2451f23ca2ef9a62c3cf3869539d8995c4ef1d3f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0273/3803] Patchlevel 100 --- 7.3.100 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 7.3.100 diff --git a/7.3.100 b/7.3.100 new file mode 100644 index 00000000..2b6e8b04 --- /dev/null +++ b/7.3.100 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.100 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.100 +Problem: When using :normal v:count isn't set. +Solution: Call normal_cmd() with toplevel set to TRUE. +Files: src/ex_docmd.c + + +*** ../vim-7.3.099/src/ex_docmd.c 2010-12-02 16:01:23.000000000 +0100 +--- src/ex_docmd.c 2011-01-06 17:23:43.000000000 +0100 +*************** +*** 9310,9316 **** + && !got_int) + { + update_topline_cursor(); +! normal_cmd(&oa, FALSE); /* execute a Normal mode cmd */ + } + } + #endif +--- 9310,9316 ---- + && !got_int) + { + update_topline_cursor(); +! normal_cmd(&oa, TRUE); /* execute a Normal mode cmd */ + } + } + #endif +*** ../vim-7.3.099/src/version.c 2011-01-08 14:45:57.000000000 +0100 +--- src/version.c 2011-01-17 19:49:07.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 100, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +109. You actually read -- and enjoy -- lists like this. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 08e61e2e667bbe445f496b61c1d96afb2ef9e786 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:16 +0200 Subject: [PATCH 0274/3803] Patchlevel 101 --- 7.3.101 | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 7.3.101 diff --git a/7.3.101 b/7.3.101 new file mode 100644 index 00000000..8869baf1 --- /dev/null +++ b/7.3.101 @@ -0,0 +1,92 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.1 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.101 +Problem: ino_t defined with wrong size. +Solution: Move including auto/config.h before other includes. (Marius + Geminas) +Files: src/if_ruby.c, src/if_lua.c + + +*** ../vim-7.3.100/src/if_ruby.c 2010-12-24 13:39:29.000000000 +0100 +--- src/if_ruby.c 2011-01-09 14:43:14.000000000 +0100 +*************** +*** 11,23 **** + * See README.txt for an overview of the Vim source code. + */ + +- #include +- #include +- + #ifdef HAVE_CONFIG_H + # include "auto/config.h" + #endif + + #ifdef _WIN32 + # if !defined(DYNAMIC_RUBY_VER) || (DYNAMIC_RUBY_VER < 18) + # define NT +--- 11,23 ---- + * See README.txt for an overview of the Vim source code. + */ + + #ifdef HAVE_CONFIG_H + # include "auto/config.h" + #endif + ++ #include ++ #include ++ + #ifdef _WIN32 + # if !defined(DYNAMIC_RUBY_VER) || (DYNAMIC_RUBY_VER < 18) + # define NT +*** ../vim-7.3.100/src/if_lua.c 2010-10-23 14:02:48.000000000 +0200 +--- src/if_lua.c 2011-01-09 14:46:46.000000000 +0100 +*************** +*** 9,20 **** + * See README.txt for an overview of the Vim source code. + */ + +! #include +! #include + #include + #include + #include +- #include "vim.h" + + /* Only do the following when the feature is enabled. Needed for "make + * depend". */ +--- 9,19 ---- + * See README.txt for an overview of the Vim source code. + */ + +! #include "vim.h" +! + #include + #include + #include + + /* Only do the following when the feature is enabled. Needed for "make + * depend". */ +*** ../vim-7.3.100/src/version.c 2011-01-17 19:50:01.000000000 +0100 +--- src/version.c 2011-01-17 19:51:40.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 101, + /**/ + +-- +In a world without walls and borders, who needs windows and gates? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From adcb8af3159e8938522fdc0b163cde567e6c6d98 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0275/3803] Patchlevel 102 --- 7.3.102 | 615 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 615 insertions(+) create mode 100644 7.3.102 diff --git a/7.3.102 b/7.3.102 new file mode 100644 index 00000000..785e597b --- /dev/null +++ b/7.3.102 @@ -0,0 +1,615 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.102 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.102 +Problem: When using ":make", typing the next command and then getting the + "reload" prompt the next command is (partly) eaten by the reload + prompt. +Solution: Accept ':' as a special character at the reload prompt to accept + the default choice and execute the command. +Files: src/eval.c, src/fileio.c, src/gui.c, src/gui_xmdlg.c, + src/memline.c, src/message.c, src/proto/message.pro, + src/gui_athena.c, src/gui_gtk.c, src/gui_mac.c, src/gui_motif.c, + src/gui_photon.c, src/gui_w16.c, src/gui_w32.c, src/os_mswin.c + src/proto/gui_athena.pro, src/proto/gui_gtk.pro, + src/proto/gui_mac.pro, src/proto/gui_motif.pro, + src/proto/gui_photon.pro, src/proto/gui_w16.pro, + src/proto/gui_w32.pro + + +*** ../vim-7.3.101/src/eval.c 2011-01-04 19:03:22.000000000 +0100 +--- src/eval.c 2011-01-16 00:14:21.000000000 +0100 +*************** +*** 9323,9329 **** + + if (!error) + rettv->vval.v_number = do_dialog(type, NULL, message, buttons, +! def, NULL); + #endif + } + +--- 9323,9329 ---- + + if (!error) + rettv->vval.v_number = do_dialog(type, NULL, message, buttons, +! def, NULL, FALSE); + #endif + } + +*************** +*** 12744,12750 **** + IObuff[0] = NUL; + if (message != NULL && defstr != NULL + && do_dialog(VIM_QUESTION, NULL, message, +! (char_u *)_("&OK\n&Cancel"), 1, IObuff) == 1) + rettv->vval.v_string = vim_strsave(IObuff); + else + { +--- 12744,12750 ---- + IObuff[0] = NUL; + if (message != NULL && defstr != NULL + && do_dialog(VIM_QUESTION, NULL, message, +! (char_u *)_("&OK\n&Cancel"), 1, IObuff, FALSE) == 1) + rettv->vval.v_string = vim_strsave(IObuff); + else + { +*** ../vim-7.3.101/src/fileio.c 2010-12-17 18:06:00.000000000 +0100 +--- src/fileio.c 2011-01-16 00:14:37.000000000 +0100 +*************** +*** 7008,7014 **** + STRCAT(tbuf, mesg2); + } + if (do_dialog(VIM_WARNING, (char_u *)_("Warning"), tbuf, +! (char_u *)_("&OK\n&Load File"), 1, NULL) == 2) + reload = TRUE; + } + else +--- 7008,7014 ---- + STRCAT(tbuf, mesg2); + } + if (do_dialog(VIM_WARNING, (char_u *)_("Warning"), tbuf, +! (char_u *)_("&OK\n&Load File"), 1, NULL, TRUE) == 2) + reload = TRUE; + } + else +*** ../vim-7.3.101/src/gui.c 2010-10-20 19:17:43.000000000 +0200 +--- src/gui.c 2011-01-16 00:14:56.000000000 +0100 +*************** +*** 4903,4909 **** + if (STRLEN(p) > 2000) + STRCPY(p + 2000 - 14, "...(truncated)"); + (void)do_dialog(VIM_ERROR, (char_u *)_("Error"), +! p, (char_u *)_("&Ok"), 1, NULL); + break; + } + ga_clear(&error_ga); +--- 4903,4909 ---- + if (STRLEN(p) > 2000) + STRCPY(p + 2000 - 14, "...(truncated)"); + (void)do_dialog(VIM_ERROR, (char_u *)_("Error"), +! p, (char_u *)_("&Ok"), 1, NULL, FALSE); + break; + } + ga_clear(&error_ga); +*** ../vim-7.3.101/src/gui_xmdlg.c 2010-08-15 21:57:32.000000000 +0200 +--- src/gui_xmdlg.c 2011-01-16 00:15:33.000000000 +0100 +*************** +*** 688,694 **** + do_dialog(VIM_ERROR, + (char_u *)_("Error"), + (char_u *)_("Invalid font specification"), +! (char_u *)_("&Dismiss"), 1, NULL); + + return True; + } +--- 688,694 ---- + do_dialog(VIM_ERROR, + (char_u *)_("Error"), + (char_u *)_("Invalid font specification"), +! (char_u *)_("&Dismiss"), 1, NULL, FALSE); + + return True; + } +*************** +*** 807,813 **** + do_dialog(VIM_ERROR, + (char_u *)_("Error"), + (char_u *)_("Invalid font specification"), +! (char_u *)_("&Dismiss"), 1, NULL); + XFreeFontNames(name); + } + else +--- 807,813 ---- + do_dialog(VIM_ERROR, + (char_u *)_("Error"), + (char_u *)_("Invalid font specification"), +! (char_u *)_("&Dismiss"), 1, NULL, FALSE); + XFreeFontNames(name); + } + else +*** ../vim-7.3.101/src/memline.c 2010-12-17 20:23:56.000000000 +0100 +--- src/memline.c 2011-01-16 00:15:47.000000000 +0100 +*************** +*** 4516,4522 **** + process_still_running + ? (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Quit\n&Abort") : + # endif +! (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL); + + # if defined(UNIX) || defined(__EMX__) || defined(VMS) + if (process_still_running && choice >= 4) +--- 4516,4522 ---- + process_still_running + ? (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Quit\n&Abort") : + # endif +! (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL, FALSE); + + # if defined(UNIX) || defined(__EMX__) || defined(VMS) + if (process_still_running && choice >= 4) +*** ../vim-7.3.101/src/message.c 2011-01-04 19:25:46.000000000 +0100 +--- src/message.c 2011-01-17 19:57:30.000000000 +0100 +*************** +*** 3315,3321 **** + * different letter. + */ + int +! do_dialog(type, title, message, buttons, dfltbutton, textfield) + int type UNUSED; + char_u *title UNUSED; + char_u *message; +--- 3315,3321 ---- + * different letter. + */ + int +! do_dialog(type, title, message, buttons, dfltbutton, textfield, ex_cmd) + int type UNUSED; + char_u *title UNUSED; + char_u *message; +*************** +*** 3323,3328 **** +--- 3323,3330 ---- + int dfltbutton; + char_u *textfield UNUSED; /* IObuff for inputdialog(), NULL + otherwise */ ++ int ex_cmd; /* when TRUE pressing : accepts default and starts ++ Ex command */ + { + int oldState; + int retval = 0; +*************** +*** 3341,3347 **** + if (gui.in_use && vim_strchr(p_go, GO_CONDIALOG) == NULL) + { + c = gui_mch_dialog(type, title, message, buttons, dfltbutton, +! textfield); + /* avoid a hit-enter prompt without clearing the cmdline */ + need_wait_return = FALSE; + emsg_on_display = FALSE; +--- 3343,3349 ---- + if (gui.in_use && vim_strchr(p_go, GO_CONDIALOG) == NULL) + { + c = gui_mch_dialog(type, title, message, buttons, dfltbutton, +! textfield, ex_cmd); + /* avoid a hit-enter prompt without clearing the cmdline */ + need_wait_return = FALSE; + emsg_on_display = FALSE; +*************** +*** 3388,3393 **** +--- 3390,3402 ---- + default: /* Could be a hotkey? */ + if (c < 0) /* special keys are ignored here */ + continue; ++ if (c == ':' && ex_cmd) ++ { ++ retval = dfltbutton; ++ ins_char_typebuf(':'); ++ break; ++ } ++ + /* Make the character lowercase, as chars in "hotkeys" are. */ + c = MB_TOLOWER(c); + retval = 1; +*************** +*** 3661,3667 **** + if (do_dialog(type, + title == NULL ? (char_u *)_("Question") : title, + message, +! (char_u *)_("&Yes\n&No"), dflt, NULL) == 1) + return VIM_YES; + return VIM_NO; + } +--- 3670,3676 ---- + if (do_dialog(type, + title == NULL ? (char_u *)_("Question") : title, + message, +! (char_u *)_("&Yes\n&No"), dflt, NULL, FALSE) == 1) + return VIM_YES; + return VIM_NO; + } +*************** +*** 3676,3682 **** + switch (do_dialog(type, + title == NULL ? (char_u *)_("Question") : title, + message, +! (char_u *)_("&Yes\n&No\n&Cancel"), dflt, NULL)) + { + case 1: return VIM_YES; + case 2: return VIM_NO; +--- 3685,3691 ---- + switch (do_dialog(type, + title == NULL ? (char_u *)_("Question") : title, + message, +! (char_u *)_("&Yes\n&No\n&Cancel"), dflt, NULL, FALSE)) + { + case 1: return VIM_YES; + case 2: return VIM_NO; +*************** +*** 3695,3701 **** + title == NULL ? (char_u *)"Question" : title, + message, + (char_u *)_("&Yes\n&No\nSave &All\n&Discard All\n&Cancel"), +! dflt, NULL)) + { + case 1: return VIM_YES; + case 2: return VIM_NO; +--- 3704,3710 ---- + title == NULL ? (char_u *)"Question" : title, + message, + (char_u *)_("&Yes\n&No\nSave &All\n&Discard All\n&Cancel"), +! dflt, NULL, FALSE)) + { + case 1: return VIM_YES; + case 2: return VIM_NO; +*** ../vim-7.3.101/src/proto/message.pro 2010-10-20 21:22:17.000000000 +0200 +--- src/proto/message.pro 2011-01-16 00:22:36.000000000 +0100 +*************** +*** 64,70 **** + int verbose_open __ARGS((void)); + void give_warning __ARGS((char_u *message, int hl)); + void msg_advance __ARGS((int col)); +! int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); + void display_confirm_msg __ARGS((void)); + int vim_dialog_yesno __ARGS((int type, char_u *title, char_u *message, int dflt)); + int vim_dialog_yesnocancel __ARGS((int type, char_u *title, char_u *message, int dflt)); +--- 64,70 ---- + int verbose_open __ARGS((void)); + void give_warning __ARGS((char_u *message, int hl)); + void msg_advance __ARGS((int col)); +! int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); + void display_confirm_msg __ARGS((void)); + int vim_dialog_yesno __ARGS((int type, char_u *title, char_u *message, int dflt)); + int vim_dialog_yesnocancel __ARGS((int type, char_u *title, char_u *message, int dflt)); +*** ../vim-7.3.101/src/gui_athena.c 2010-08-15 21:57:25.000000000 +0200 +--- src/gui_athena.c 2011-01-16 00:18:47.000000000 +0100 +*************** +*** 2117,2129 **** + } + + int +! gui_mch_dialog(type, title, message, buttons, dfltbutton, textfield) + int type UNUSED; + char_u *title; + char_u *message; + char_u *buttons; + int dfltbutton UNUSED; + char_u *textfield; + { + char_u *buts; + char_u *p, *next; +--- 2117,2130 ---- + } + + int +! gui_mch_dialog(type, title, message, buttons, dfltbutton, textfield, ex_cmd) + int type UNUSED; + char_u *title; + char_u *message; + char_u *buttons; + int dfltbutton UNUSED; + char_u *textfield; ++ int ex_cmd UNUSED; + { + char_u *buts; + char_u *p, *next; +*** ../vim-7.3.101/src/gui_gtk.c 2010-12-08 13:11:15.000000000 +0100 +--- src/gui_gtk.c 2011-01-16 00:24:44.000000000 +0100 +*************** +*** 1268,1274 **** + char_u *message, /* message text */ + char_u *buttons, /* names of buttons */ + int def_but, /* default button */ +! char_u *textfield) /* text for textfield or NULL */ + { + GtkWidget *dialog; + GtkWidget *entry = NULL; +--- 1268,1275 ---- + char_u *message, /* message text */ + char_u *buttons, /* names of buttons */ + int def_but, /* default button */ +! char_u *textfield, /* text for textfield or NULL */ +! int ex_cmd UNUSED) + { + GtkWidget *dialog; + GtkWidget *entry = NULL; +*** ../vim-7.3.101/src/gui_mac.c 2010-09-21 17:34:26.000000000 +0200 +--- src/gui_mac.c 2011-01-16 00:19:52.000000000 +0100 +*************** +*** 5583,5589 **** + char_u *message, + char_u *buttons, + int dfltbutton, +! char_u *textfield) + { + Handle buttonDITL; + Handle iconDITL; +--- 5583,5590 ---- + char_u *message, + char_u *buttons, + int dfltbutton, +! char_u *textfield, +! int ex_cmd) + { + Handle buttonDITL; + Handle iconDITL; +*** ../vim-7.3.101/src/gui_motif.c 2010-08-15 21:57:28.000000000 +0200 +--- src/gui_motif.c 2011-01-16 00:20:14.000000000 +0100 +*************** +*** 2549,2561 **** + #endif + + int +! gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield) + int type UNUSED; + char_u *title; + char_u *message; + char_u *button_names; + int dfltbutton; + char_u *textfield; /* buffer of size IOSIZE */ + { + char_u *buts; + char_u *p, *next; +--- 2549,2562 ---- + #endif + + int +! gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield, ex_cmd) + int type UNUSED; + char_u *title; + char_u *message; + char_u *button_names; + int dfltbutton; + char_u *textfield; /* buffer of size IOSIZE */ ++ int ex_cmd UNUSED; + { + char_u *buts; + char_u *p, *next; +*** ../vim-7.3.101/src/gui_photon.c 2010-08-15 21:57:27.000000000 +0200 +--- src/gui_photon.c 2011-01-16 00:20:28.000000000 +0100 +*************** +*** 1502,1508 **** + char_u *message, + char_u *buttons, + int default_button, +! char_u *textfield) + { + char_u *str; + char_u **button_array; +--- 1502,1509 ---- + char_u *message, + char_u *buttons, + int default_button, +! char_u *textfield, +! int ex_cmd) + { + char_u *str; + char_u **button_array; +*** ../vim-7.3.101/src/gui_w16.c 2010-08-15 21:57:28.000000000 +0200 +--- src/gui_w16.c 2011-01-16 00:20:48.000000000 +0100 +*************** +*** 1098,1104 **** + char_u *message, + char_u *buttons, + int dfltbutton, +! char_u *textfield) + { + FARPROC dp; + LPWORD p, pnumitems; +--- 1098,1105 ---- + char_u *message, + char_u *buttons, + int dfltbutton, +! char_u *textfield, +! int ex_cmd) + { + FARPROC dp; + LPWORD p, pnumitems; +*** ../vim-7.3.101/src/gui_w32.c 2010-10-27 12:33:12.000000000 +0200 +--- src/gui_w32.c 2011-01-16 00:21:08.000000000 +0100 +*************** +*** 3005,3011 **** + char_u *message, + char_u *buttons, + int dfltbutton, +! char_u *textfield) + { + WORD *p, *pdlgtemplate, *pnumitems; + DWORD *dwp; +--- 3005,3012 ---- + char_u *message, + char_u *buttons, + int dfltbutton, +! char_u *textfield, +! int ex_cmd) + { + WORD *p, *pdlgtemplate, *pnumitems; + DWORD *dwp; +*** ../vim-7.3.101/src/os_mswin.c 2010-12-17 20:23:56.000000000 +0100 +--- src/os_mswin.c 2011-01-16 00:21:41.000000000 +0100 +*************** +*** 593,599 **** + gui.starting ? (char_u *)_("Message") : + #endif + (char_u *)_("Error"), +! p, (char_u *)_("&Ok"), 1, NULL); + break; + } + ga_clear(&error_ga); +--- 593,599 ---- + gui.starting ? (char_u *)_("Message") : + #endif + (char_u *)_("Error"), +! p, (char_u *)_("&Ok"), 1, NULL, FALSE); + break; + } + ga_clear(&error_ga); +*** ../vim-7.3.101/src/proto/gui_athena.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_athena.pro 2011-01-16 00:23:00.000000000 +0100 +*************** +*** 27,31 **** + void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb)); + Window gui_x11_get_wid __ARGS((void)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); + /* vim: set ft=c : */ +--- 27,31 ---- + void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb)); + Window gui_x11_get_wid __ARGS((void)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); + /* vim: set ft=c : */ +*** ../vim-7.3.101/src/proto/gui_gtk.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_gtk.pro 2011-01-16 00:22:57.000000000 +0100 +*************** +*** 13,19 **** + void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); + char_u *gui_mch_browsedir __ARGS((char_u *title, char_u *initdir)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int def_but, char_u *textfield)); + void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); + void gui_make_popup __ARGS((char_u *path_name, int mouse_pos)); + void gui_mch_find_dialog __ARGS((exarg_T *eap)); +--- 13,19 ---- + void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); + char_u *gui_mch_browsedir __ARGS((char_u *title, char_u *initdir)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int def_but, char_u *textfield, int ex_cmd)); + void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); + void gui_make_popup __ARGS((char_u *path_name, int mouse_pos)); + void gui_mch_find_dialog __ARGS((exarg_T *eap)); +*** ../vim-7.3.101/src/proto/gui_mac.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_mac.pro 2011-01-16 00:31:46.000000000 +0100 +*************** +*** 81,87 **** + int gui_mch_get_mouse_y __ARGS((void)); + void gui_mch_setmouse __ARGS((int x, int y)); + void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); + void gui_mch_set_foreground __ARGS((void)); + void gui_mch_show_tabline __ARGS((int showit)); +--- 81,87 ---- + int gui_mch_get_mouse_y __ARGS((void)); + void gui_mch_setmouse __ARGS((int x, int y)); + void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); + void gui_mch_set_foreground __ARGS((void)); + void gui_mch_show_tabline __ARGS((int showit)); +*** ../vim-7.3.101/src/proto/gui_motif.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_motif.pro 2011-01-16 00:22:58.000000000 +0100 +*************** +*** 29,35 **** + void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb)); + Window gui_x11_get_wid __ARGS((void)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *button_names, int dfltbutton, char_u *textfield)); + void gui_mch_enable_footer __ARGS((int showit)); + void gui_mch_set_footer __ARGS((char_u *s)); + void gui_mch_show_toolbar __ARGS((int showit)); +--- 29,35 ---- + void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb)); + Window gui_x11_get_wid __ARGS((void)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *button_names, int dfltbutton, char_u *textfield, int ex_cmd)); + void gui_mch_enable_footer __ARGS((int showit)); + void gui_mch_set_footer __ARGS((char_u *s)); + void gui_mch_show_toolbar __ARGS((int showit)); +*** ../vim-7.3.101/src/proto/gui_photon.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_photon.pro 2011-01-16 00:32:33.000000000 +0100 +*************** +*** 8,14 **** + void gui_mch_update __ARGS((void)); + int gui_mch_wait_for_chars __ARGS((int wtime)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *default_name, char_u *ext, char_u *initdir, char_u *filter)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int default_button, char_u *textfield)); + int gui_mch_get_winpos __ARGS((int *x, int *y)); + void gui_mch_set_winpos __ARGS((int x, int y)); + void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction)); +--- 8,14 ---- + void gui_mch_update __ARGS((void)); + int gui_mch_wait_for_chars __ARGS((int wtime)); + char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *default_name, char_u *ext, char_u *initdir, char_u *filter)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int default_button, char_u *textfield, int ex_cmd)); + int gui_mch_get_winpos __ARGS((int *x, int *y)); + void gui_mch_set_winpos __ARGS((int x, int y)); + void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction)); +*** ../vim-7.3.101/src/proto/gui_w16.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_w16.pro 2011-01-16 00:34:36.000000000 +0100 +*************** +*** 74,79 **** + void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx)); + void gui_mch_destroy_menu __ARGS((vimmenu_T *menu)); + void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); + void gui_mch_set_foreground __ARGS((void)); + /* vim: set ft=c : */ +--- 74,79 ---- + void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx)); + void gui_mch_destroy_menu __ARGS((vimmenu_T *menu)); + void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); + void gui_mch_set_foreground __ARGS((void)); + /* vim: set ft=c : */ +*** ../vim-7.3.101/src/proto/gui_w32.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_w32.pro 2011-01-16 00:33:12.000000000 +0100 +*************** +*** 81,87 **** + void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx)); + void gui_mch_destroy_menu __ARGS((vimmenu_T *menu)); + void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); + void gui_mch_set_foreground __ARGS((void)); + void gui_mch_drawsign __ARGS((int row, int col, int typenr)); + void *gui_mch_register_sign __ARGS((char_u *signfile)); +--- 81,87 ---- + void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx)); + void gui_mch_destroy_menu __ARGS((vimmenu_T *menu)); + void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); +! int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd)); + void gui_mch_set_foreground __ARGS((void)); + void gui_mch_drawsign __ARGS((int row, int col, int typenr)); + void *gui_mch_register_sign __ARGS((char_u *signfile)); +*** ../vim-7.3.101/src/version.c 2011-01-17 19:53:20.000000000 +0100 +--- src/version.c 2011-01-17 20:05:02.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 102, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +110. You actually volunteer to become your employer's webmaster. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f21795f48e8c32551c9834933437d53ed4faed14 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0276/3803] Patchlevel 103 --- 7.3.103 | 145 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 7.3.103 diff --git a/7.3.103 b/7.3.103 new file mode 100644 index 00000000..f9e086fa --- /dev/null +++ b/7.3.103 @@ -0,0 +1,145 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.103 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.103 +Problem: Changing 'fileformat' and then using ":w" in an empty file sets + the 'modified' option. +Solution: In unchanged() don't ignore 'ff' for an empty file. +Files: src/misc1.c, src/option.c, src/proto/option.pro, src/undo.c + + +*** ../vim-7.3.102/src/misc1.c 2010-12-30 12:30:26.000000000 +0100 +--- src/misc1.c 2011-01-22 00:00:24.000000000 +0100 +*************** +*** 2919,2925 **** + buf_T *buf; + int ff; /* also reset 'fileformat' */ + { +! if (buf->b_changed || (ff && file_ff_differs(buf))) + { + buf->b_changed = 0; + ml_setflags(buf); +--- 2919,2925 ---- + buf_T *buf; + int ff; /* also reset 'fileformat' */ + { +! if (buf->b_changed || (ff && file_ff_differs(buf, FALSE))) + { + buf->b_changed = 0; + ml_setflags(buf); +*** ../vim-7.3.102/src/option.c 2010-12-02 21:43:10.000000000 +0100 +--- src/option.c 2011-01-22 00:03:40.000000000 +0100 +*************** +*** 11296,11311 **** + * from when editing started (save_file_ff() called). + * Also when 'endofline' was changed and 'binary' is set, or when 'bomb' was + * changed and 'binary' is not set. +! * Don't consider a new, empty buffer to be changed. + */ + int +! file_ff_differs(buf) + buf_T *buf; + { + /* In a buffer that was never loaded the options are not valid. */ + if (buf->b_flags & BF_NEVERLOADED) + return FALSE; +! if ((buf->b_flags & BF_NEW) + && buf->b_ml.ml_line_count == 1 + && *ml_get_buf(buf, (linenr_T)1, FALSE) == NUL) + return FALSE; +--- 11296,11314 ---- + * from when editing started (save_file_ff() called). + * Also when 'endofline' was changed and 'binary' is set, or when 'bomb' was + * changed and 'binary' is not set. +! * When "ignore_empty" is true don't consider a new, empty buffer to be +! * changed. + */ + int +! file_ff_differs(buf, ignore_empty) + buf_T *buf; ++ int ignore_empty; + { + /* In a buffer that was never loaded the options are not valid. */ + if (buf->b_flags & BF_NEVERLOADED) + return FALSE; +! if (ignore_empty +! && (buf->b_flags & BF_NEW) + && buf->b_ml.ml_line_count == 1 + && *ml_get_buf(buf, (linenr_T)1, FALSE) == NUL) + return FALSE; +*** ../vim-7.3.102/src/proto/option.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/option.pro 2011-01-22 00:04:35.000000000 +0100 +*************** +*** 54,59 **** + int option_was_set __ARGS((char_u *name)); + int can_bs __ARGS((int what)); + void save_file_ff __ARGS((buf_T *buf)); +! int file_ff_differs __ARGS((buf_T *buf)); + int check_ff_value __ARGS((char_u *p)); + /* vim: set ft=c : */ +--- 54,59 ---- + int option_was_set __ARGS((char_u *name)); + int can_bs __ARGS((int what)); + void save_file_ff __ARGS((buf_T *buf)); +! int file_ff_differs __ARGS((buf_T *buf, int ignore_empty)); + int check_ff_value __ARGS((char_u *p)); + /* vim: set ft=c : */ +*** ../vim-7.3.102/src/undo.c 2010-12-17 18:06:00.000000000 +0100 +--- src/undo.c 2011-01-22 00:03:58.000000000 +0100 +*************** +*** 3304,3310 **** + #ifdef FEAT_QUICKFIX + !bt_dontwrite(buf) && + #endif +! (buf->b_changed || file_ff_differs(buf)); + } + + int +--- 3304,3310 ---- + #ifdef FEAT_QUICKFIX + !bt_dontwrite(buf) && + #endif +! (buf->b_changed || file_ff_differs(buf, TRUE)); + } + + int +*************** +*** 3314,3320 **** + #ifdef FEAT_QUICKFIX + !bt_dontwrite(curbuf) && + #endif +! (curbuf->b_changed || file_ff_differs(curbuf)); + } + + #if defined(FEAT_EVAL) || defined(PROTO) +--- 3314,3320 ---- + #ifdef FEAT_QUICKFIX + !bt_dontwrite(curbuf) && + #endif +! (curbuf->b_changed || file_ff_differs(curbuf, TRUE)); + } + + #if defined(FEAT_EVAL) || defined(PROTO) +*** ../vim-7.3.102/src/version.c 2011-01-17 20:08:03.000000000 +0100 +--- src/version.c 2011-01-22 00:07:56.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 103, + /**/ + +-- +In a world without fences, who needs Gates and Windows? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 46a198374bafea06560ea64be4f8fe13ca6b2b5f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0277/3803] Patchlevel 104 --- 7.3.104 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 7.3.104 diff --git a/7.3.104 b/7.3.104 new file mode 100644 index 00000000..1e719bd7 --- /dev/null +++ b/7.3.104 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.104 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Problem: Conceal: using Tab for cchar causes problems. (ZyX) +Solution: Do not accept a control character for cchar. +Files: src/syntax.c + + +*** ../vim-7.3.103/src/syntax.c 2010-09-29 18:32:47.000000000 +0200 +--- src/syntax.c 2011-01-22 00:50:20.000000000 +0100 +*************** +*** 4537,4542 **** +--- 4537,4549 ---- + ; + #endif + } ++ #ifdef FEAT_CONCEAL ++ if (!vim_isprintc_strict(*conceal_char)) ++ { ++ EMSG(_("E844: invalid cchar value")); ++ return NULL; ++ } ++ #endif + arg = skipwhite(arg + 7); + } + else +*** ../vim-7.3.103/src/version.c 2011-01-22 00:11:42.000000000 +0100 +--- src/version.c 2011-01-22 00:54:56.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 104, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +132. You come back and check this list every half-hour. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a0674e8cdc537d2c9c78f63d709bf735c09d2611 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0278/3803] Patchlevel 105 --- 7.3.105 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 7.3.105 diff --git a/7.3.105 b/7.3.105 new file mode 100644 index 00000000..abf69ac5 --- /dev/null +++ b/7.3.105 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.105 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.105 +Problem: Can't get the value of "b:changedtick" with getbufvar(). +Solution: Make it work. (Christian Brabandt) +Files: src/eval.c + + +*** ../vim-7.3.104/src/eval.c 2011-01-17 20:08:03.000000000 +0100 +--- src/eval.c 2011-01-22 01:10:42.000000000 +0100 +*************** +*** 10866,10871 **** +--- 10866,10876 ---- + + if (*varname == '&') /* buffer-local-option */ + get_option_tv(&varname, rettv, TRUE); ++ else if (STRCMP(varname, "changedtick") == 0) ++ { ++ rettv->v_type = VAR_NUMBER; ++ rettv->vval.v_number = curbuf->b_changedtick; ++ } + else + { + if (*varname == NUL) +*** ../vim-7.3.104/src/version.c 2011-01-22 00:58:15.000000000 +0100 +--- src/version.c 2011-01-22 01:13:19.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 105, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +133. You communicate with people on other continents more than you + do with your own neighbors. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e423a19bd07836043ab7d633c17ddbc0859456f8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0279/3803] Patchlevel 106 --- 7.3.106 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.106 diff --git a/7.3.106 b/7.3.106 new file mode 100644 index 00000000..f98df307 --- /dev/null +++ b/7.3.106 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.106 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.106 +Problem: When 'cursorbind' is set another window may scroll unexpectedly + when 'scrollbind' is also set. (Xavier Wang) +Solution: Don't call update_topline() if 'scrollbind' is set. +Files: src/move.c + + +*** ../vim-7.3.105/src/move.c 2010-08-15 21:57:29.000000000 +0200 +--- src/move.c 2011-01-22 20:58:50.000000000 +0100 +*************** +*** 2882,2890 **** + if (has_mbyte) + mb_adjust_cursor(); + # endif +- + redraw_later(VALID); +! update_topline(); + # ifdef FEAT_WINDOWS + curwin->w_redr_status = TRUE; + # endif +--- 2882,2892 ---- + if (has_mbyte) + mb_adjust_cursor(); + # endif + redraw_later(VALID); +! +! /* Only scroll when 'scrollbind' hasn't done this. */ +! if (!curwin->w_p_scb) +! update_topline(); + # ifdef FEAT_WINDOWS + curwin->w_redr_status = TRUE; + # endif +*** ../vim-7.3.105/src/version.c 2011-01-22 01:13:33.000000000 +0100 +--- src/version.c 2011-01-22 21:03:21.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 106, + /**/ + +-- +Never eat yellow snow. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 410cb993aebfb7795bab6815e1b9b8834845f180 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0280/3803] Patchlevel 107 --- 7.3.107 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.107 diff --git a/7.3.107 b/7.3.107 new file mode 100644 index 00000000..1256b817 --- /dev/null +++ b/7.3.107 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.107 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.107 +Problem: Year number for :undolist can be confused with month or day. +Solution: Change "%y" to "%Y". +Files: src/undo.c + + +*** ../vim-7.3.106/src/undo.c 2011-01-22 00:11:42.000000000 +0100 +--- src/undo.c 2011-01-22 00:03:58.000000000 +0100 +*************** +*** 2884,2890 **** + (void)strftime((char *)buf, buflen, "%m/%d %H:%M:%S", curtime); + else + /* long ago */ +! (void)strftime((char *)buf, buflen, "%y/%m/%d %H:%M:%S", curtime); + } + else + #endif +--- 2884,2890 ---- + (void)strftime((char *)buf, buflen, "%m/%d %H:%M:%S", curtime); + else + /* long ago */ +! (void)strftime((char *)buf, buflen, "%Y/%m/%d %H:%M:%S", curtime); + } + else + #endif +*** ../vim-7.3.106/src/version.c 2011-01-22 21:05:02.000000000 +0100 +--- src/version.c 2011-01-22 21:24:07.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 107, + /**/ + +-- +"The sun oozed over the horizon, shoved aside darkness, crept along the +greensward, and, with sickly fingers, pushed through the castle window, +revealing the pillaged princess, hand at throat, crown asunder, gaping +in frenzied horror at the sated, sodden amphibian lying beside her, +disbelieving the magnitude of the frog's deception, screaming madly, +"You lied!" + - Winner of the Bulwer-Lytton contest (San Jose State University), + wherein one writes only the first line of a bad novel + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5696d26a2edbd10ce8825c84f7429c3271335f52 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0281/3803] Patchlevel 108 --- 7.3.108 | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 7.3.108 diff --git a/7.3.108 b/7.3.108 new file mode 100644 index 00000000..91f3ceb9 --- /dev/null +++ b/7.3.108 @@ -0,0 +1,111 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.108 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.108 +Problem: Useless check for NULL when calling vim_free(). +Solution: Remove the check. (Dominique Pelle) +Files: src/eval.c, src/ex_cmds.c, src/os_win32.c + + +*** ../vim-7.3.107/src/eval.c 2011-01-22 01:13:33.000000000 +0100 +--- src/eval.c 2011-01-30 21:37:53.000000000 +0100 +*************** +*** 5106,5114 **** + else + ret = OK; + } +! +! if (alias != NULL) +! vim_free(alias); + } + + *arg = skipwhite(*arg); +--- 5106,5112 ---- + else + ret = OK; + } +! vim_free(alias); + } + + *arg = skipwhite(*arg); +*************** +*** 19807,19813 **** + EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name); + return; + } +! /* Don't allow hiding a function. When "v" is not NULL we migth be + * assigning another function to the same var, the type is checked + * below. */ + if (v == NULL && function_exists(name)) +--- 19805,19811 ---- + EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name); + return; + } +! /* Don't allow hiding a function. When "v" is not NULL we might be + * assigning another function to the same var, the type is checked + * below. */ + if (v == NULL && function_exists(name)) +*** ../vim-7.3.107/src/ex_cmds.c 2010-12-17 18:06:00.000000000 +0100 +--- src/ex_cmds.c 2011-01-30 21:37:53.000000000 +0100 +*************** +*** 5412,5418 **** + vir_T *virp; + int force; + { +! if (old_sub != NULL && force) + vim_free(old_sub); + if (force || old_sub == NULL) + old_sub = viminfo_readstring(virp, 1, TRUE); +--- 5412,5418 ---- + vir_T *virp; + int force; + { +! if (force) + vim_free(old_sub); + if (force || old_sub == NULL) + old_sub = viminfo_readstring(virp, 1, TRUE); +*** ../vim-7.3.107/src/os_win32.c 2010-12-17 20:23:56.000000000 +0100 +--- src/os_win32.c 2011-01-30 21:37:53.000000000 +0100 +*************** +*** 1886,1893 **** + cb->BufferSize.X = cb->Info.dwSize.X; + cb->BufferSize.Y = cb->Info.dwSize.Y; + NumCells = cb->BufferSize.X * cb->BufferSize.Y; +! if (cb->Buffer != NULL) +! vim_free(cb->Buffer); + cb->Buffer = (PCHAR_INFO)alloc(NumCells * sizeof(CHAR_INFO)); + if (cb->Buffer == NULL) + return FALSE; +--- 1886,1892 ---- + cb->BufferSize.X = cb->Info.dwSize.X; + cb->BufferSize.Y = cb->Info.dwSize.Y; + NumCells = cb->BufferSize.X * cb->BufferSize.Y; +! vim_free(cb->Buffer); + cb->Buffer = (PCHAR_INFO)alloc(NumCells * sizeof(CHAR_INFO)); + if (cb->Buffer == NULL) + return FALSE; +*** ../vim-7.3.107/src/version.c 2011-01-22 21:25:07.000000000 +0100 +--- src/version.c 2011-02-01 13:47:07.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 108, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +173. You keep tracking down the email addresses of all your friends + (even childhood friends). + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 7b8ba3d67b6c64c666d142745b3ff674993616e8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0282/3803] Patchlevel 109 --- 7.3.109 | 266 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 7.3.109 diff --git a/7.3.109 b/7.3.109 new file mode 100644 index 00000000..ce35fb0a --- /dev/null +++ b/7.3.109 @@ -0,0 +1,266 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.109 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.109 +Problem: Processing new Esperanto spell file fails and crashes Vim. + (Dominique Pelle) +Solution: When running out of memory give an error. Handle '?' in + COMPOUNDRULE properly. +Files: src/spell.c + + +*** ../vim-7.3.108/src/spell.c 2010-12-17 18:06:00.000000000 +0100 +--- src/spell.c 2011-02-01 13:43:52.000000000 +0100 +*************** +*** 3634,3640 **** + } + + /* Add all flags to "sl_compallflags". */ +! if (vim_strchr((char_u *)"+*[]/", c) == NULL + && !byte_in_str(slang->sl_compallflags, c)) + { + *ap++ = c; +--- 3634,3640 ---- + } + + /* Add all flags to "sl_compallflags". */ +! if (vim_strchr((char_u *)"?*+[]/", c) == NULL + && !byte_in_str(slang->sl_compallflags, c)) + { + *ap++ = c; +*************** +*** 3664,3670 **** + /* Copy flag to "sl_comprules", unless we run into a wildcard. */ + if (crp != NULL) + { +! if (c == '+' || c == '*') + { + vim_free(slang->sl_comprules); + slang->sl_comprules = NULL; +--- 3664,3670 ---- + /* Copy flag to "sl_comprules", unless we run into a wildcard. */ + if (crp != NULL) + { +! if (c == '?' || c == '+' || c == '*') + { + vim_free(slang->sl_comprules); + slang->sl_comprules = NULL; +*************** +*** 3682,3689 **** + } + else /* normal char, "[abc]" and '*' are copied as-is */ + { +! if (c == '+' || c == '~') +! *pp++ = '\\'; /* "a+" becomes "a\+" */ + #ifdef FEAT_MBYTE + if (enc_utf8) + pp += mb_char2bytes(c, pp); +--- 3682,3689 ---- + } + else /* normal char, "[abc]" and '*' are copied as-is */ + { +! if (c == '?' || c == '+' || c == '~') +! *pp++ = '\\'; /* "a?" becomes "a\?", "a+" becomes "a\+" */ + #ifdef FEAT_MBYTE + if (enc_utf8) + pp += mb_char2bytes(c, pp); +*************** +*** 4951,4956 **** +--- 4951,4958 ---- + + sblock_T *si_blocks; /* memory blocks used */ + long si_blocks_cnt; /* memory blocks allocated */ ++ int si_did_emsg; /* TRUE when ran out of memory */ ++ + long si_compress_cnt; /* words to add before lowering + compression limit */ + wordnode_T *si_first_free; /* List of nodes that have been freed during +*************** +*** 5477,5497 **** + } + else if (is_aff_rule(items, itemcnt, "COMPOUNDRULE", 2)) + { +! /* Concatenate this string to previously defined ones, using a +! * slash to separate them. */ +! l = (int)STRLEN(items[1]) + 1; +! if (compflags != NULL) +! l += (int)STRLEN(compflags) + 1; +! p = getroom(spin, l, FALSE); +! if (p != NULL) + { + if (compflags != NULL) + { +! STRCPY(p, compflags); +! STRCAT(p, "/"); + } +- STRCAT(p, items[1]); +- compflags = p; + } + } + else if (is_aff_rule(items, itemcnt, "COMPOUNDWORDMAX", 2) +--- 5479,5503 ---- + } + else if (is_aff_rule(items, itemcnt, "COMPOUNDRULE", 2)) + { +! /* Don't use the first rule if it is a number. */ +! if (compflags != NULL || *skipdigits(items[1]) != NUL) + { ++ /* Concatenate this string to previously defined ones, ++ * using a slash to separate them. */ ++ l = (int)STRLEN(items[1]) + 1; + if (compflags != NULL) ++ l += (int)STRLEN(compflags) + 1; ++ p = getroom(spin, l, FALSE); ++ if (p != NULL) + { +! if (compflags != NULL) +! { +! STRCPY(p, compflags); +! STRCAT(p, "/"); +! } +! STRCAT(p, items[1]); +! compflags = p; + } + } + } + else if (is_aff_rule(items, itemcnt, "COMPOUNDWORDMAX", 2) +*************** +*** 6291,6297 **** + + for (p = compflags; *p != NUL; ) + { +! if (vim_strchr((char_u *)"/*+[]", *p) != NULL) + /* Copy non-flag characters directly. */ + *tp++ = *p++; + else +--- 6297,6303 ---- + + for (p = compflags; *p != NUL; ) + { +! if (vim_strchr((char_u *)"/?*+[]", *p) != NULL) + /* Copy non-flag characters directly. */ + *tp++ = *p++; + else +*************** +*** 6320,6326 **** + { + check_renumber(spin); + id = spin->si_newcompID--; +! } while (vim_strchr((char_u *)"/+*[]\\-^", id) != NULL); + ci->ci_newID = id; + hash_add(&aff->af_comp, ci->ci_key); + } +--- 6326,6332 ---- + { + check_renumber(spin); + id = spin->si_newcompID--; +! } while (vim_strchr((char_u *)"/?*+[]\\-^", id) != NULL); + ci->ci_newID = id; + hash_add(&aff->af_comp, ci->ci_key); + } +*************** +*** 7364,7373 **** + + if (bl == NULL || bl->sb_used + len > SBLOCKSIZE) + { +! /* Allocate a block of memory. This is not freed until much later. */ +! bl = (sblock_T *)alloc_clear((unsigned)(sizeof(sblock_T) + SBLOCKSIZE)); + if (bl == NULL) + return NULL; + bl->sb_next = spin->si_blocks; + spin->si_blocks = bl; + bl->sb_used = 0; +--- 7370,7390 ---- + + if (bl == NULL || bl->sb_used + len > SBLOCKSIZE) + { +! if (len >= SBLOCKSIZE) +! bl = NULL; +! else +! /* Allocate a block of memory. It is not freed until much later. */ +! bl = (sblock_T *)alloc_clear( +! (unsigned)(sizeof(sblock_T) + SBLOCKSIZE)); + if (bl == NULL) ++ { ++ if (!spin->si_did_emsg) ++ { ++ EMSG(_("E845: Insufficient memory, word list will be incomplete")); ++ spin->si_did_emsg = TRUE; ++ } + return NULL; ++ } + bl->sb_next = spin->si_blocks; + spin->si_blocks = bl; + bl->sb_used = 0; +*************** +*** 7382,7387 **** +--- 7399,7405 ---- + + /* + * Make a copy of a string into memory allocated with getroom(). ++ * Returns NULL when out of memory. + */ + static char_u * + getroom_save(spin, s) +*************** +*** 7416,7421 **** +--- 7434,7440 ---- + + /* + * Allocate the root of a word tree. ++ * Returns NULL when out of memory. + */ + static wordnode_T * + wordtree_alloc(spin) +*************** +*** 7700,7705 **** +--- 7719,7725 ---- + /* + * Get a wordnode_T, either from the list of previously freed nodes or + * allocate a new one. ++ * Returns NULL when out of memory. + */ + static wordnode_T * + get_wordnode(spin) +*************** +*** 7717,7723 **** + --spin->si_free_count; + } + #ifdef SPELL_PRINTTREE +! n->wn_nr = ++spin->si_wordnode_nr; + #endif + return n; + } +--- 7737,7744 ---- + --spin->si_free_count; + } + #ifdef SPELL_PRINTTREE +! if (n != NULL) +! n->wn_nr = ++spin->si_wordnode_nr; + #endif + return n; + } +*** ../vim-7.3.108/src/version.c 2011-02-01 13:48:47.000000000 +0100 +--- src/version.c 2011-02-01 13:56:38.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 109, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +174. You know what a listserv is. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f46c53609dc4e8810204185cd1b58e42a37ed55e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0283/3803] Patchlevel 110 --- 7.3.110 | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 7.3.110 diff --git a/7.3.110 b/7.3.110 new file mode 100644 index 00000000..3ffc7f2c --- /dev/null +++ b/7.3.110 @@ -0,0 +1,76 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.110 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.110 +Problem: The "nbsp" item in 'listchars' isn't used for ":list". +Solution: Make it work. (Christian Brabandt) +Files: src/message.c + + +*** ../vim-7.3.109/src/message.c 2011-01-17 20:08:03.000000000 +0100 +--- src/message.c 2011-02-01 17:06:21.000000000 +0100 +*************** +*** 1637,1644 **** + else if (has_mbyte && (l = (*mb_ptr2len)(s)) > 1) + { + col += (*mb_ptr2cells)(s); +! mch_memmove(buf, s, (size_t)l); +! buf[l] = NUL; + msg_puts(buf); + s += l; + continue; +--- 1637,1652 ---- + else if (has_mbyte && (l = (*mb_ptr2len)(s)) > 1) + { + col += (*mb_ptr2cells)(s); +! if (lcs_nbsp != NUL && list && mb_ptr2char(s) == 160) +! { +! mb_char2bytes(lcs_nbsp, buf); +! buf[(*mb_ptr2len)(buf)] = NUL; +! } +! else +! { +! mch_memmove(buf, s, (size_t)l); +! buf[l] = NUL; +! } + msg_puts(buf); + s += l; + continue; +*************** +*** 1664,1669 **** +--- 1672,1682 ---- + attr = hl_attr(HLF_8); + } + } ++ else if (c == 160 && list && lcs_nbsp != NUL) ++ { ++ c = lcs_nbsp; ++ attr = hl_attr(HLF_8); ++ } + else if (c == NUL && list && lcs_eol != NUL) + { + p_extra = (char_u *)""; +*** ../vim-7.3.109/src/version.c 2011-02-01 13:59:44.000000000 +0100 +--- src/version.c 2011-02-01 17:08:31.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 110, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +176. You lie, even to user-friends, about how long you were online yesterday. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e9d74f9ab2df375a338ae8f51bfd6014ef7272d3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0284/3803] Patchlevel 111 --- 7.3.111 | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 7.3.111 diff --git a/7.3.111 b/7.3.111 new file mode 100644 index 00000000..e3cf717c --- /dev/null +++ b/7.3.111 @@ -0,0 +1,121 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.111 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.111 (after 7.3.100) +Problem: Executing a :normal command in 'statusline' evaluation causes the + cursor to move. (Dominique Pelle) +Solution: When updating the cursor for 'cursorbind' allow the cursor beyond + the end of the line. When evaluating 'statusline' temporarily + reset 'cursorbind'. +Files: src/move.c, src/screen.c + + +*** ../vim-7.3.110/src/move.c 2011-01-22 21:05:02.000000000 +0100 +--- src/move.c 2011-02-01 17:36:10.000000000 +0100 +*************** +*** 2846,2851 **** +--- 2846,2852 ---- + colnr_T col = curwin->w_cursor.col; + win_T *old_curwin = curwin; + buf_T *old_curbuf = curbuf; ++ int restart_edit_save; + # ifdef FEAT_VISUAL + int old_VIsual_select = VIsual_select; + int old_VIsual_active = VIsual_active; +*************** +*** 2875,2882 **** + curwin->w_cursor.lnum = line; + curwin->w_cursor.col = col; + +! /* Make sure the cursor is in a valid position. */ + check_cursor(); + # ifdef FEAT_MBYTE + /* Correct cursor for multi-byte character. */ + if (has_mbyte) +--- 2876,2887 ---- + curwin->w_cursor.lnum = line; + curwin->w_cursor.col = col; + +! /* Make sure the cursor is in a valid position. Temporarily set +! * "restart_edit" to allow the cursor to be beyond the EOL. */ +! restart_edit_save = restart_edit; +! restart_edit = TRUE; + check_cursor(); ++ restart_edit = restart_edit_save; + # ifdef FEAT_MBYTE + /* Correct cursor for multi-byte character. */ + if (has_mbyte) +*** ../vim-7.3.110/src/screen.c 2010-12-30 14:57:03.000000000 +0100 +--- src/screen.c 2011-02-01 17:45:45.000000000 +0100 +*************** +*** 6435,6440 **** +--- 6435,6442 ---- + struct stl_hlrec hltab[STL_MAX_ITEM]; + struct stl_hlrec tabtab[STL_MAX_ITEM]; + int use_sandbox = FALSE; ++ win_T *ewp; ++ int p_crb_save; + + /* setup environment for the task at hand */ + if (wp == NULL) +*************** +*** 6513,6526 **** + if (maxwidth <= 0) + return; + + /* Make a copy, because the statusline may include a function call that + * might change the option value and free the memory. */ + stl = vim_strsave(stl); +! width = build_stl_str_hl(wp == NULL ? curwin : wp, +! buf, sizeof(buf), + stl, use_sandbox, + fillchar, maxwidth, hltab, tabtab); + vim_free(stl); + + /* Make all characters printable. */ + p = transstr(buf); +--- 6515,6534 ---- + if (maxwidth <= 0) + return; + ++ /* Temporarily reset 'cursorbind', we don't want a side effect from moving ++ * the cursor away and back. */ ++ ewp = wp == NULL ? curwin : wp; ++ p_crb_save = ewp->w_p_crb; ++ ewp->w_p_crb = FALSE; ++ + /* Make a copy, because the statusline may include a function call that + * might change the option value and free the memory. */ + stl = vim_strsave(stl); +! width = build_stl_str_hl(ewp, buf, sizeof(buf), + stl, use_sandbox, + fillchar, maxwidth, hltab, tabtab); + vim_free(stl); ++ ewp->w_p_crb = p_crb_save; + + /* Make all characters printable. */ + p = transstr(buf); +*** ../vim-7.3.110/src/version.c 2011-02-01 17:12:20.000000000 +0100 +--- src/version.c 2011-02-01 18:00:14.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 111, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +177. You log off of your system because it's time to go to work. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 06bd8ca392914d82fc3dd5cb3fea6b2992921bf3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0285/3803] Patchlevel 112 --- 7.3.112 | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 7.3.112 diff --git a/7.3.112 b/7.3.112 new file mode 100644 index 00000000..af9b8818 --- /dev/null +++ b/7.3.112 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.112 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.112 +Problem: Setting 'statusline' to "%!'asdf%' reads uninitialized memory. +Solution: Check for NUL after %. +Files: src/buffer.c + + +*** ../vim-7.3.111/src/buffer.c 2010-10-27 16:17:56.000000000 +0200 +--- src/buffer.c 2011-02-01 21:40:17.000000000 +0100 +*************** +*** 3364,3370 **** + * or truncated if too long, fillchar is used for all whitespace. + */ + int +! build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar, maxwidth, hltab, tabtab) + win_T *wp; + char_u *out; /* buffer to write into != NameBuff */ + size_t outlen; /* length of out[] */ +--- 3364,3371 ---- + * or truncated if too long, fillchar is used for all whitespace. + */ + int +! build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar, +! maxwidth, hltab, tabtab) + win_T *wp; + char_u *out; /* buffer to write into != NameBuff */ + size_t outlen; /* length of out[] */ +*************** +*** 3474,3479 **** +--- 3475,3482 ---- + * Handle one '%' item. + */ + s++; ++ if (*s == NUL) /* ignore trailing % */ ++ break; + if (*s == '%') + { + if (p + 1 >= out + outlen) +*** ../vim-7.3.111/src/version.c 2011-02-01 18:01:06.000000000 +0100 +--- src/version.c 2011-02-01 21:54:01.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 112, + /**/ + +-- +Rule #1: Don't give somebody a tool that he's going to hurt himself with. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 80e7f717a247cd776ce97c629c2e522ad0585971 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0286/3803] Patchlevel 113 --- 7.3.113 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 7.3.113 diff --git a/7.3.113 b/7.3.113 new file mode 100644 index 00000000..a4383ad9 --- /dev/null +++ b/7.3.113 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.113 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.113 +Problem: Windows: Fall back directory for creating temp file is wrong. +Solution: Use "." instead of empty string. (Hong Xu) +Files: src/fileio.c + + +*** ../vim-7.3.112/src/fileio.c 2011-01-17 20:08:03.000000000 +0100 +--- src/fileio.c 2011-02-06 13:14:25.000000000 +0100 +*************** +*** 7459,7465 **** + + STRCPY(itmp, ""); + if (GetTempPath(_MAX_PATH, szTempFile) == 0) +! szTempFile[0] = NUL; /* GetTempPath() failed, use current dir */ + strcpy(buf4, "VIM"); + buf4[2] = extra_char; /* make it "VIa", "VIb", etc. */ + if (GetTempFileName(szTempFile, buf4, 0, itmp) == 0) +--- 7459,7468 ---- + + STRCPY(itmp, ""); + if (GetTempPath(_MAX_PATH, szTempFile) == 0) +! { +! szTempFile[0] = '.'; /* GetTempPath() failed, use current dir */ +! szTempFile[1] = NUL; +! } + strcpy(buf4, "VIM"); + buf4[2] = extra_char; /* make it "VIa", "VIb", etc. */ + if (GetTempFileName(szTempFile, buf4, 0, itmp) == 0) +*** ../vim-7.3.112/src/version.c 2011-02-01 21:54:56.000000000 +0100 +--- src/version.c 2011-02-09 14:46:12.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 113, + /**/ + +-- +'Psychologist' -- Someone who looks at everyone else when +an attractive woman enters the room. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b686a0952b6d26843e93e0c54d3ba08cf757bda6 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0287/3803] Patchlevel 114 --- 7.3.114 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 7.3.114 diff --git a/7.3.114 b/7.3.114 new file mode 100644 index 00000000..34bdd364 --- /dev/null +++ b/7.3.114 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.114 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.114 +Problem: Potential problem in initialization when giving an error message + early. +Solution: Initialize 'verbosefile' empty. (Ben Schmidt) +Files: src/option.h + + +*** ../vim-7.3.113/src/option.h 2010-12-02 16:01:23.000000000 +0100 +--- src/option.h 2011-02-09 15:37:36.000000000 +0100 +*************** +*** 854,860 **** +--- 854,864 ---- + # define VE_ONEMORE 8 + #endif + EXTERN long p_verbose; /* 'verbose' */ ++ #ifdef IN_OPTION_C ++ char_u *p_vfile = (char_u *)""; /* used before options are initialized */ ++ #else + EXTERN char_u *p_vfile; /* 'verbosefile' */ ++ #endif + EXTERN int p_warn; /* 'warn' */ + #ifdef FEAT_CMDL_COMPL + EXTERN char_u *p_wop; /* 'wildoptions' */ +*** ../vim-7.3.113/src/version.c 2011-02-09 14:46:58.000000000 +0100 +--- src/version.c 2011-02-09 15:46:17.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 114, + /**/ + +-- +From the classified section of a city newspaper: +Dog for sale: eats anything and is fond of children. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 993ea3acb6187707a990a10baba6a7301b4008bc Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0288/3803] Patchlevel 115 --- 7.3.115 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.115 diff --git a/7.3.115 b/7.3.115 new file mode 100644 index 00000000..dd36df30 --- /dev/null +++ b/7.3.115 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.115 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.115 +Problem: Vim can crash when tmpnam() returns NULL. +Solution: Check for NULL. (Hong Xu) +Files: src/fileio.c + + +*** ../vim-7.3.114/src/fileio.c 2011-02-09 14:46:58.000000000 +0100 +--- src/fileio.c 2011-02-09 16:14:35.000000000 +0100 +*************** +*** 7483,7490 **** + # else /* WIN3264 */ + + # ifdef USE_TMPNAM + /* tmpnam() will make its own name */ +! if (*tmpnam((char *)itmp) == NUL) + return NULL; + # else + char_u *p; +--- 7483,7493 ---- + # else /* WIN3264 */ + + # ifdef USE_TMPNAM ++ char_u *p; ++ + /* tmpnam() will make its own name */ +! p = tmpnam((char *)itmp); +! if (p == NULL || *p == NUL) + return NULL; + # else + char_u *p; +*** ../vim-7.3.114/src/version.c 2011-02-09 15:59:32.000000000 +0100 +--- src/version.c 2011-02-09 16:44:11.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 115, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +218. Your spouse hands you a gift wrapped magnet with your PC's name + on it and you accuse him or her of genocide. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From cbfeff34d707e181d5f81b36ad92b423538d3a1c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0289/3803] Patchlevel 116 --- 7.3.116 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.116 diff --git a/7.3.116 b/7.3.116 new file mode 100644 index 00000000..ee9543af --- /dev/null +++ b/7.3.116 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.116 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.116 +Problem: 'cursorline' is displayed too short when there are concealed + characters and 'list' is set. (Dennis Preiser) +Solution: Check for 'cursorline' when 'list' is set. (Christian Brabandt) +Files: src/screen.c + + +*** ../vim-7.3.115/src/screen.c 2011-02-01 18:01:06.000000000 +0100 +--- src/screen.c 2011-02-09 16:59:28.000000000 +0100 +*************** +*** 5099,5105 **** + #ifdef FEAT_DIFF + || filler_todo > 0 + #endif +! || (wp->w_p_list && lcs_eol != NUL && p_extra != at_end_str) + || (n_extra != 0 && (c_extra != NUL || *p_extra != NUL))) + ) + { +--- 5099,5109 ---- + #ifdef FEAT_DIFF + || filler_todo > 0 + #endif +! || (wp->w_p_list && lcs_eol != NUL && p_extra != at_end_str +! #ifdef FEAT_SYN_HL +! && !wp->w_p_cul +! #endif +! ) + || (n_extra != 0 && (c_extra != NUL || *p_extra != NUL))) + ) + { +*** ../vim-7.3.115/src/version.c 2011-02-09 16:44:45.000000000 +0100 +--- src/version.c 2011-02-09 17:08:58.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 116, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +219. Your spouse has his or her lawyer deliver the divorce papers... + via e-mail. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From bc132c8de057f2bb3f0c0da97d09f3328f44cf5e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0290/3803] Patchlevel 117 --- 7.3.117 | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 7.3.117 diff --git a/7.3.117 b/7.3.117 new file mode 100644 index 00000000..19fcf739 --- /dev/null +++ b/7.3.117 @@ -0,0 +1,89 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.117 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.117 +Problem: On some systems --as-needed does not work, because the "tinfo" + library is included indirectly from "ncurses". (Charles Campbell) +Solution: In configure prefer using "tinfo" instead of "ncurses". +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.3.116/src/configure.in 2010-11-16 19:25:56.000000000 +0100 +--- src/configure.in 2011-02-09 17:28:16.000000000 +0100 +*************** +*** 2618,2630 **** + AC_MSG_RESULT([empty: automatic terminal library selection]) + dnl On HP-UX 10.10 termcap or termlib should be used instead of + dnl curses, because curses is much slower. +! dnl Newer versions of ncurses are preferred over anything. + dnl Older versions of ncurses have bugs, get a new one! + dnl Digital Unix (OSF1) should use curses (Ronald Schild). + dnl On SCO Openserver should prefer termlib (Roger Cornelius). + case "`uname -s 2>/dev/null`" in +! OSF1|SCO_SV) tlibs="ncurses curses termlib termcap";; +! *) tlibs="ncurses termlib termcap curses";; + esac + for libname in $tlibs; do + AC_CHECK_LIB(${libname}, tgetent,,) +--- 2618,2631 ---- + AC_MSG_RESULT([empty: automatic terminal library selection]) + dnl On HP-UX 10.10 termcap or termlib should be used instead of + dnl curses, because curses is much slower. +! dnl Newer versions of ncurses are preferred over anything, except +! dnl when tinfo has been split off, it conains all we need. + dnl Older versions of ncurses have bugs, get a new one! + dnl Digital Unix (OSF1) should use curses (Ronald Schild). + dnl On SCO Openserver should prefer termlib (Roger Cornelius). + case "`uname -s 2>/dev/null`" in +! OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";; +! *) tlibs="tinfo ncurses termlib termcap curses";; + esac + for libname in $tlibs; do + AC_CHECK_LIB(${libname}, tgetent,,) +*** ../vim-7.3.116/src/auto/configure 2010-11-16 19:25:56.000000000 +0100 +--- src/auto/configure 2011-02-09 17:29:13.000000000 +0100 +*************** +*** 9886,9894 **** + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5 + $as_echo "empty: automatic terminal library selection" >&6; } +! case "`uname -s 2>/dev/null`" in +! OSF1|SCO_SV) tlibs="ncurses curses termlib termcap";; +! *) tlibs="ncurses termlib termcap curses";; + esac + for libname in $tlibs; do + as_ac_Lib=`$as_echo "ac_cv_lib_${libname}''_tgetent" | $as_tr_sh` +--- 9886,9894 ---- + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5 + $as_echo "empty: automatic terminal library selection" >&6; } +! case "`uname -s 2>/dev/null`" in +! OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";; +! *) tlibs="tinfo ncurses termlib termcap curses";; + esac + for libname in $tlibs; do + as_ac_Lib=`$as_echo "ac_cv_lib_${libname}''_tgetent" | $as_tr_sh` +*** ../vim-7.3.116/src/version.c 2011-02-09 17:09:26.000000000 +0100 +--- src/version.c 2011-02-09 17:41:37.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 117, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +220. Your wife asks for sex and you tell her where to find you on IRC. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f8aa1bdce98ba612be55dccd4beb49f19d6c130a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0291/3803] Patchlevel 118 --- 7.3.118 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 7.3.118 diff --git a/7.3.118 b/7.3.118 new file mode 100644 index 00000000..fecb948b --- /dev/null +++ b/7.3.118 @@ -0,0 +1,69 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.118 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.118 +Problem: Ruby uses SIGVTALARM which makes Vim exit. (Alec Tica) +Solution: Ignore SIGVTALARM. (Dominique Pelle) +Files: src/os_unix.c + + +*** ../vim-7.3.117/src/os_unix.c 2010-12-17 16:27:10.000000000 +0100 +--- src/os_unix.c 2011-02-09 18:19:57.000000000 +0100 +*************** +*** 283,289 **** + #ifdef SIGTERM + {SIGTERM, "TERM", TRUE}, + #endif +! #ifdef SIGVTALRM + {SIGVTALRM, "VTALRM", TRUE}, + #endif + #if defined(SIGPROF) && !defined(FEAT_MZSCHEME) && !defined(WE_ARE_PROFILING) +--- 283,289 ---- + #ifdef SIGTERM + {SIGTERM, "TERM", TRUE}, + #endif +! #if defined(SIGVTALRM) && !defined(FEAT_RUBY) + {SIGVTALRM, "VTALRM", TRUE}, + #endif + #if defined(SIGPROF) && !defined(FEAT_MZSCHEME) && !defined(WE_ARE_PROFILING) +*************** +*** 1107,1113 **** + * On Linux, signal is not always handled immediately either. + * See https://bugs.launchpad.net/bugs/291373 + * +! * volatile because it is used in in signal handler sigcont_handler(). + */ + static volatile int sigcont_received; + static RETSIGTYPE sigcont_handler __ARGS(SIGPROTOARG); +--- 1107,1113 ---- + * On Linux, signal is not always handled immediately either. + * See https://bugs.launchpad.net/bugs/291373 + * +! * volatile because it is used in signal handler sigcont_handler(). + */ + static volatile int sigcont_received; + static RETSIGTYPE sigcont_handler __ARGS(SIGPROTOARG); +*** ../vim-7.3.117/src/version.c 2011-02-09 17:42:53.000000000 +0100 +--- src/version.c 2011-02-09 18:46:53.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 118, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +221. Your wife melts your keyboard in the oven. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f7add040f87f5a4d696e2ddf4ac6993390bba223 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0292/3803] Patchlevel 119 --- 7.3.119 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 7.3.119 diff --git a/7.3.119 b/7.3.119 new file mode 100644 index 00000000..1547625d --- /dev/null +++ b/7.3.119 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.1 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.119 +Problem: Build problem on Mac. (Nicholas Stallard) +Solution: Use "extern" instead of "EXTERN" for p_vfile. +Files: src/option.h + + +*** ../vim-7.3.118/src/option.h 2011-02-09 15:59:32.000000000 +0100 +--- src/option.h 2011-02-12 13:56:50.000000000 +0100 +*************** +*** 857,863 **** + #ifdef IN_OPTION_C + char_u *p_vfile = (char_u *)""; /* used before options are initialized */ + #else +! EXTERN char_u *p_vfile; /* 'verbosefile' */ + #endif + EXTERN int p_warn; /* 'warn' */ + #ifdef FEAT_CMDL_COMPL +--- 857,863 ---- + #ifdef IN_OPTION_C + char_u *p_vfile = (char_u *)""; /* used before options are initialized */ + #else +! extern char_u *p_vfile; /* 'verbosefile' */ + #endif + EXTERN int p_warn; /* 'warn' */ + #ifdef FEAT_CMDL_COMPL +*** ../vim-7.3.118/src/version.c 2011-02-09 18:47:36.000000000 +0100 +--- src/version.c 2011-02-12 13:59:41.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 119, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +237. You tattoo your email address on your forehead. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 67b55d9ff444d8b51c7bd74a702377c62b799731 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0293/3803] Patchlevel 120 --- 7.3.120 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 7.3.120 diff --git a/7.3.120 b/7.3.120 new file mode 100644 index 00000000..04e2f633 --- /dev/null +++ b/7.3.120 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.120 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.120 +Problem: The message for an existing swap file is too long to fit in a 25 + line terminal. +Solution: Make the message shorter. (Chad Miller) +Files: src/memline.c + + +*** ../vim-7.3.119/src/memline.c 2011-01-17 20:08:03.000000000 +0100 +--- src/memline.c 2011-02-13 14:18:08.000000000 +0100 +*************** +*** 4071,4079 **** + } + /* Some of these messages are long to allow translation to + * other languages. */ +! MSG_PUTS(_("\n(1) Another program may be editing the same file.\n If this is the case, be careful not to end up with two\n different instances of the same file when making changes.\n")); +! MSG_PUTS(_(" Quit, or continue with caution.\n")); +! MSG_PUTS(_("\n(2) An edit session for this file crashed.\n")); + MSG_PUTS(_(" If this is the case, use \":recover\" or \"vim -r ")); + msg_outtrans(buf->b_fname); + MSG_PUTS(_("\"\n to recover the changes (see \":help recovery\").\n")); +--- 4071,4079 ---- + } + /* Some of these messages are long to allow translation to + * other languages. */ +! MSG_PUTS(_("\n(1) Another program may be editing the same file. If this is the case,\n be careful not to end up with two different instances of the same\n file when making changes.")); +! MSG_PUTS(_(" Quit, or continue with caution.\n")); +! MSG_PUTS(_("(2) An edit session for this file crashed.\n")); + MSG_PUTS(_(" If this is the case, use \":recover\" or \"vim -r ")); + msg_outtrans(buf->b_fname); + MSG_PUTS(_("\"\n to recover the changes (see \":help recovery\").\n")); +*** ../vim-7.3.119/src/version.c 2011-02-12 13:59:55.000000000 +0100 +--- src/version.c 2011-02-15 11:56:14.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 120, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +257. Your "hundred-and-one" lists include well over 101 items, since you + automatically interpret all numbers in hexadecimal notation. + (hex 101 = decimal 257) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e2a9aa3c4df2f10fa2663b2e2defdaaf32cda6ce Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0294/3803] Patchlevel 121 --- 7.3.121 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 7.3.121 diff --git a/7.3.121 b/7.3.121 new file mode 100644 index 00000000..f51a7747 --- /dev/null +++ b/7.3.121 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.121 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.121 +Problem: Complicated 'statusline' causes a crash. (Christian Brabandt) +Solution: Check that the number of items is not too big. +Files: src/buffer.c + + +*** ../vim-7.3.120/src/buffer.c 2011-02-01 21:54:56.000000000 +0100 +--- src/buffer.c 2011-02-15 14:00:51.000000000 +0100 +*************** +*** 3460,3465 **** +--- 3461,3478 ---- + prevchar_isitem = FALSE; + for (s = usefmt; *s; ) + { ++ if (curitem == STL_MAX_ITEM) ++ { ++ /* There are too many items. Add the error code to the statusline ++ * to give the user a hint about what went wrong. */ ++ if (p + 6 < out + outlen) ++ { ++ mch_memmove(p, " E541", (size_t)5); ++ p += 5; ++ } ++ break; ++ } ++ + if (*s != NUL && *s != '%') + prevchar_isflag = prevchar_isitem = FALSE; + +*** ../vim-7.3.120/src/version.c 2011-02-15 11:56:56.000000000 +0100 +--- src/version.c 2011-02-15 14:23:39.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 121, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +265. Your reason for not staying in touch with family is that + they do not have e-mail addresses. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ef6a737a1a635c438108e281cc1a81ab789d2739 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0295/3803] Patchlevel 122 --- 7.3.122 | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 7.3.122 diff --git a/7.3.122 b/7.3.122 new file mode 100644 index 00000000..02e9759b --- /dev/null +++ b/7.3.122 @@ -0,0 +1,100 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.122 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.122 +Problem: Having auto/config.mk in the repository causes problems. +Solution: Remove auto/config.mk from the distribution. In the toplevel + Makefile copy it from the "dist" file. +Files: Makefile, src/Makefile, src/auto/config.mk + + +*** ../vim-7.3.121/Makefile 2010-08-15 21:57:20.000000000 +0200 +--- Makefile 2011-02-12 14:28:09.000000000 +0100 +*************** +*** 23,28 **** +--- 23,31 ---- + # has run can result in compiling with $(CC) empty. + + first: ++ @if test ! -f src/auto/config.mk; then \ ++ cp src/config.mk.dist src/auto/config.mk; \ ++ fi + @echo "Starting make in the src directory." + @echo "If there are problems, cd to the src directory and run make there" + cd src && $(MAKE) $@ +*************** +*** 30,35 **** +--- 33,41 ---- + # Some make programs use the last target for the $@ default; put the other + # targets separately to always let $@ expand to "first" by default. + all install uninstall tools config configure reconfig proto depend lint tags types test testclean clean distclean: ++ @if test ! -f src/auto/config.mk; then \ ++ cp src/config.mk.dist src/auto/config.mk; \ ++ fi + @echo "Starting make in the src directory." + @echo "If there are problems, cd to the src directory and run make there" + cd src && $(MAKE) $@ +*** ../vim-7.3.121/src/Makefile 2010-11-03 22:32:18.000000000 +0100 +--- src/Makefile 2011-02-15 15:21:37.000000000 +0100 +*************** +*** 283,294 **** + + ######################## auto/config.mk ######################## {{{1 + # At this position auto/config.mk is included. When starting from the +! # distribution it is almost empty. After running auto/configure it contains +! # settings that have been discovered for your system. Settings below this +! # include override settings in auto/config.mk! +! +! # Note: if auto/config.mk is lost somehow (e.g., because configure was +! # interrupted), create an empty auto/config.mk file and do "make config". + + # (X) How to include auto/config.mk depends on the version of "make" you have, + # if the current choice doesn't work, try the other one. +--- 283,295 ---- + + ######################## auto/config.mk ######################## {{{1 + # At this position auto/config.mk is included. When starting from the +! # toplevel Makefile it is almost empty. After running auto/configure it +! # contains settings that have been discovered for your system. Settings below +! # this include override settings in auto/config.mk! +! +! # Note: If make fails because auto/config.mk does not exist (it is not +! # included in the repository), do: +! # cp config.mk.dist auto/config.mk + + # (X) How to include auto/config.mk depends on the version of "make" you have, + # if the current choice doesn't work, try the other one. +*** ../vim-7.3.121/src/auto/config.mk 2010-08-16 21:59:00.000000000 +0200 +--- src/auto/config.mk 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,5 **** +- the first targets to make vim are: scratch config myself +- srcdir = . +- VIMNAME = vim +- EXNAME = ex +- VIEWNAME = view +--- 0 ---- +*** ../vim-7.3.121/src/version.c 2011-02-15 14:24:42.000000000 +0100 +--- src/version.c 2011-02-15 15:25:07.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 122, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +267. You get an extra phone line so you can get phone calls. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 383147ba40b673de6e0731379511ad573927363f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0296/3803] Patchlevel 123 --- 7.3.123 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 7.3.123 diff --git a/7.3.123 b/7.3.123 new file mode 100644 index 00000000..0bca41b8 --- /dev/null +++ b/7.3.123 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.123 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.123 +Problem: ml_get error when executing register being recorded into, deleting + lines and 'conceallevel' is set. (ZyX) +Solution: Don't redraw a line for concealing when it doesn't exist. +Files: src/main.c + + +*** ../vim-7.3.122/src/main.c 2010-12-17 18:06:00.000000000 +0100 +--- src/main.c 2011-02-15 16:09:41.000000000 +0100 +*************** +*** 1198,1204 **** + || conceal_cursor_line(curwin) + || need_cursor_line_redraw)) + { +! if (conceal_old_cursor_line != conceal_new_cursor_line) + update_single_line(curwin, conceal_old_cursor_line); + update_single_line(curwin, conceal_new_cursor_line); + curwin->w_valid &= ~VALID_CROW; +--- 1198,1206 ---- + || conceal_cursor_line(curwin) + || need_cursor_line_redraw)) + { +! if (conceal_old_cursor_line != conceal_new_cursor_line +! && conceal_old_cursor_line +! <= curbuf->b_ml.ml_line_count) + update_single_line(curwin, conceal_old_cursor_line); + update_single_line(curwin, conceal_new_cursor_line); + curwin->w_valid &= ~VALID_CROW; +*** ../vim-7.3.122/src/version.c 2011-02-15 15:27:00.000000000 +0100 +--- src/version.c 2011-02-15 16:15:28.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 123, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +268. You get up in the morning and go online before getting your coffee. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 146e0d489e98915357b60d227f5d3817202a6d5c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0297/3803] Patchlevel 124 --- 7.3.124 | 229 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 7.3.124 diff --git a/7.3.124 b/7.3.124 new file mode 100644 index 00000000..738c2a16 --- /dev/null +++ b/7.3.124 @@ -0,0 +1,229 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.124 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.124 +Problem: When writing a file in binary mode it may be missing the final EOL + if a file previously read was missing the EOL. (Kevin Goodsell) +Solution: Move the write_no_eol_lnum into the buffer struct. +Files: src/structs.h, src/fileio.c, src/globals.h, src/os_unix.c + + +*** ../vim-7.3.123/src/structs.h 2010-10-20 21:22:17.000000000 +0200 +--- src/structs.h 2011-02-15 17:06:34.000000000 +0100 +*************** +*** 1564,1569 **** +--- 1564,1572 ---- + + /* end of buffer options */ + ++ linenr_T b_no_eol_lnum; /* non-zero lnum when last line of next binary ++ * write should not have an end-of-line */ ++ + int b_start_eol; /* last line had eol when it was read */ + int b_start_ffc; /* first char of 'ff' when edit started */ + #ifdef FEAT_MBYTE +*** ../vim-7.3.123/src/fileio.c 2011-02-09 16:44:45.000000000 +0100 +--- src/fileio.c 2011-02-15 17:30:54.000000000 +0100 +*************** +*** 317,323 **** + int using_b_fname; + #endif + +! write_no_eol_lnum = 0; /* in case it was set by the previous read */ + + /* + * If there is no file name yet, use the one for the read file. +--- 317,323 ---- + int using_b_fname; + #endif + +! curbuf->b_no_eol_lnum = 0; /* in case it was set by the previous read */ + + /* + * If there is no file name yet, use the one for the read file. +*************** +*** 2599,2608 **** + + /* + * Trick: We remember if the last line of the read didn't have +! * an eol for when writing it again. This is required for + * ":autocmd FileReadPost *.gz set bin|'[,']!gunzip" to work. + */ +! write_no_eol_lnum = read_no_eol_lnum; + + /* When reloading a buffer put the cursor at the first line that is + * different. */ +--- 2599,2609 ---- + + /* + * Trick: We remember if the last line of the read didn't have +! * an eol even when 'binary' is off, for when writing it again with +! * 'binary' on. This is required for + * ":autocmd FileReadPost *.gz set bin|'[,']!gunzip" to work. + */ +! curbuf->b_no_eol_lnum = read_no_eol_lnum; + + /* When reloading a buffer put the cursor at the first line that is + * different. */ +*************** +*** 2650,2662 **** + FALSE, NULL, eap); + if (msg_scrolled == n) + msg_scroll = m; +! #ifdef FEAT_EVAL + if (aborting()) /* autocmds may abort script processing */ + return FAIL; +! #endif + } + #endif + + if (recoverymode && error) + return FAIL; + return OK; +--- 2651,2667 ---- + FALSE, NULL, eap); + if (msg_scrolled == n) + msg_scroll = m; +! # ifdef FEAT_EVAL + if (aborting()) /* autocmds may abort script processing */ + return FAIL; +! # endif + } + #endif + ++ /* Reset now, following writes should not omit the EOL. Also, the line ++ * number will become invalid because of edits. */ ++ curbuf->b_no_eol_lnum = 0; ++ + if (recoverymode && error) + return FAIL; + return OK; +*************** +*** 4560,4566 **** + if (end == 0 + || (lnum == end + && write_bin +! && (lnum == write_no_eol_lnum + || (lnum == buf->b_ml.ml_line_count && !buf->b_p_eol)))) + { + ++lnum; /* written the line, count it */ +--- 4565,4571 ---- + if (end == 0 + || (lnum == end + && write_bin +! && (lnum == buf->b_no_eol_lnum + || (lnum == buf->b_ml.ml_line_count && !buf->b_p_eol)))) + { + ++lnum; /* written the line, count it */ +*************** +*** 5086,5093 **** + { + aco_save_T aco; + +- write_no_eol_lnum = 0; /* in case it was set by the previous read */ +- + /* + * Apply POST autocommands. + * Careful: The autocommands may call buf_write() recursively! +--- 5091,5096 ---- +*************** +*** 7256,7263 **** + write_lnum_adjust(offset) + linenr_T offset; + { +! if (write_no_eol_lnum != 0) /* only if there is a missing eol */ +! write_no_eol_lnum += offset; + } + + #if defined(TEMPDIRNAMES) || defined(PROTO) +--- 7259,7266 ---- + write_lnum_adjust(offset) + linenr_T offset; + { +! if (curbuf->b_no_eol_lnum != 0) /* only if there is a missing eol */ +! curbuf->b_no_eol_lnum += offset; + } + + #if defined(TEMPDIRNAMES) || defined(PROTO) +*** ../vim-7.3.123/src/globals.h 2010-12-02 21:43:10.000000000 +0100 +--- src/globals.h 2011-02-15 17:06:06.000000000 +0100 +*************** +*** 1057,1066 **** + ; + #endif + +- EXTERN linenr_T write_no_eol_lnum INIT(= 0); /* non-zero lnum when last line +- of next binary write should +- not have an end-of-line */ +- + #ifdef FEAT_WINDOWS + EXTERN int postponed_split INIT(= 0); /* for CTRL-W CTRL-] command */ + EXTERN int postponed_split_flags INIT(= 0); /* args for win_split() */ +--- 1057,1062 ---- +*** ../vim-7.3.123/src/os_unix.c 2011-02-09 18:47:36.000000000 +0100 +--- src/os_unix.c 2011-02-15 17:07:22.000000000 +0100 +*************** +*** 4245,4251 **** + * should not have one. */ + if (lnum != curbuf->b_op_end.lnum + || !curbuf->b_p_bin +! || (lnum != write_no_eol_lnum + && (lnum != + curbuf->b_ml.ml_line_count + || curbuf->b_p_eol))) +--- 4245,4251 ---- + * should not have one. */ + if (lnum != curbuf->b_op_end.lnum + || !curbuf->b_p_bin +! || (lnum != curbuf->b_no_eol_lnum + && (lnum != + curbuf->b_ml.ml_line_count + || curbuf->b_p_eol))) +*************** +*** 4588,4597 **** + { + append_ga_line(&ga); + /* remember that the NL was missing */ +! write_no_eol_lnum = curwin->w_cursor.lnum; + } + else +! write_no_eol_lnum = 0; + ga_clear(&ga); + } + +--- 4588,4597 ---- + { + append_ga_line(&ga); + /* remember that the NL was missing */ +! curbuf->b_no_eol_lnum = curwin->w_cursor.lnum; + } + else +! curbuf->b_no_eol_lnum = 0; + ga_clear(&ga); + } + +*** ../vim-7.3.123/src/version.c 2011-02-15 16:29:54.000000000 +0100 +--- src/version.c 2011-02-15 17:37:38.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 124, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +270. You are subscribed to a mailing list for every piece of software + you use. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5ed4bea16616d6ac8d5962737166034e9a02ec02 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0298/3803] Patchlevel 125 --- 7.3.125 | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 7.3.125 diff --git a/7.3.125 b/7.3.125 new file mode 100644 index 00000000..719fc95e --- /dev/null +++ b/7.3.125 @@ -0,0 +1,66 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.125 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.125 +Problem: MSVC: Problem with quotes in link argument. +Solution: Escape backslashes and quotes. (Weasley) +Files: src/Make_mvc.mak + + +*** ../vim-7.3.124/src/Make_mvc.mak 2010-12-08 14:54:58.000000000 +0100 +--- src/Make_mvc.mak 2011-02-15 17:55:24.000000000 +0100 +*************** +*** 1159,1164 **** +--- 1159,1168 ---- + E0_CFLAGS = $(CFLAGS:\=\\) + E_CFLAGS = $(E0_CFLAGS:"=\") + # ") stop the string ++ # $LINKARGS2 may contain backslashes and double quotes, escape them both. ++ E0_LINKARGS2 = $(LINKARGS2:\=\\) ++ E_LINKARGS2 = $(E0_LINKARGS2:"=\") ++ # ") stop the string + + $(PATHDEF_SRC): auto + @echo creating $(PATHDEF_SRC) +*************** +*** 1167,1173 **** + @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC) + @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC) + @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC) +! @echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(LINKARGS2:\=\\)"; >> $(PATHDEF_SRC) + @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC) + @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC) + +--- 1171,1177 ---- + @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC:\=\\)"; >> $(PATHDEF_SRC) + @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR:\=\\)"; >> $(PATHDEF_SRC) + @echo char_u *all_cflags = (char_u *)"$(CC:\=\\) $(E_CFLAGS)"; >> $(PATHDEF_SRC) +! @echo char_u *all_lflags = (char_u *)"$(link:\=\\) $(LINKARGS1:\=\\) $(E_LINKARGS2)"; >> $(PATHDEF_SRC) + @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC) + @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC) + +*** ../vim-7.3.124/src/version.c 2011-02-15 17:39:14.000000000 +0100 +--- src/version.c 2011-02-15 17:55:49.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 125, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +271. You collect hilarious signatures from all 250 mailing lists you + are subscribed to. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 848e4ace7dd7f3b003eb5c09980fc9e3a1583a80 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0299/3803] Patchlevel 126 --- 7.3.126 | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 7.3.126 diff --git a/7.3.126 b/7.3.126 new file mode 100644 index 00000000..89d9684f --- /dev/null +++ b/7.3.126 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.126 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.126 +Problem: Compiler warning for signed pointer. +Solution: Use unsigned int argument for sscanf(). +Files: src/blowfish.c + + +*** ../vim-7.3.125/src/blowfish.c 2010-08-15 21:57:28.000000000 +0200 +--- src/blowfish.c 2010-12-17 19:58:18.000000000 +0100 +*************** +*** 413,418 **** +--- 413,419 ---- + int salt_len; + { + int i, j, keypos = 0; ++ unsigned u; + UINT32_T val, data_l, data_r; + char_u *key; + int keylen; +*************** +*** 432,439 **** + } + for (i = 0; i < keylen; i++) + { +! sscanf((char *)&key[i * 2], "%2x", &j); +! key[i] = j; + } + + mch_memmove(sbx, sbi, 4 * 4 * 256); +--- 433,440 ---- + } + for (i = 0; i < keylen; i++) + { +! sscanf((char *)&key[i * 2], "%2x", &u); +! key[i] = u; + } + + mch_memmove(sbx, sbi, 4 * 4 * 256); +*** ../vim-7.3.125/src/version.c 2011-02-15 18:06:11.000000000 +0100 +--- src/version.c 2011-02-25 14:40:22.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 126, + /**/ + +-- +Why doesn't Tarzan have a beard? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 8b72aa594a5774bcd4ccbe4134f50c3a4765c84d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0300/3803] Patchlevel 127 --- 7.3.127 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 7.3.127 diff --git a/7.3.127 b/7.3.127 new file mode 100644 index 00000000..518d2f7c --- /dev/null +++ b/7.3.127 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.127 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.127 +Problem: Compiler complains about comma. +Solution: Remove comma after last enum element. +Files: src/ex_cmds2.c + + +*** ../vim-7.3.126/src/ex_cmds2.c 2010-12-17 18:06:00.000000000 +0100 +--- src/ex_cmds2.c 2010-12-17 19:58:37.000000000 +0100 +*************** +*** 1115,1121 **** + static enum + { + PEXP_SUBCMD, /* expand :profile sub-commands */ +! PEXP_FUNC, /* expand :profile func {funcname} */ + } pexpand_what; + + static char *pexpand_cmds[] = { +--- 1115,1121 ---- + static enum + { + PEXP_SUBCMD, /* expand :profile sub-commands */ +! PEXP_FUNC /* expand :profile func {funcname} */ + } pexpand_what; + + static char *pexpand_cmds[] = { +*** ../vim-7.3.126/src/version.c 2011-02-25 14:40:51.000000000 +0100 +--- src/version.c 2011-02-25 14:45:19.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 127, + /**/ + +-- + LAUNCELOT leaps into SHOT with a mighty cry and runs the GUARD through and + hacks him to the floor. Blood. Swashbuckling music (perhaps). + LAUNCELOT races through into the castle screaming. +SECOND SENTRY: Hey! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b88897f63c9a5fe21ced672353b55e1856ffbcd2 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0301/3803] Patchlevel 128 --- 7.3.128 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.128 diff --git a/7.3.128 b/7.3.128 new file mode 100644 index 00000000..d4438688 --- /dev/null +++ b/7.3.128 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.128 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.128 +Problem: Another compiler warning for signed pointer. +Solution: Use unsigned int argument for sscanf(). +Files: src/mark.c + + +*** ../vim-7.3.127/src/mark.c 2010-08-15 21:57:25.000000000 +0200 +--- src/mark.c 2010-12-17 20:00:05.000000000 +0100 +*************** +*** 1750,1756 **** + { + if (line[1] != NUL) + { +! sscanf((char *)line + 2, "%ld %u", &pos.lnum, &pos.col); + switch (line[1]) + { + case '"': curbuf->b_last_cursor = pos; break; +--- 1750,1759 ---- + { + if (line[1] != NUL) + { +! unsigned u; +! +! sscanf((char *)line + 2, "%ld %u", &pos.lnum, &u); +! pos.col = u; + switch (line[1]) + { + case '"': curbuf->b_last_cursor = pos; break; +*** ../vim-7.3.127/src/version.c 2011-02-25 14:46:06.000000000 +0100 +--- src/version.c 2011-02-25 15:10:34.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 128, + /**/ + +-- +FATHER: Who are you? +PRINCE: I'm ... your son ... +FATHER: Not you. +LAUNCELOT: I'm ... er ... Sir Launcelot, sir. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 1947e7c9ae3a29873ca72c8060ebbe354b7abc7b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0302/3803] Patchlevel 129 --- 7.3.129 | 241 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 241 insertions(+) create mode 100644 7.3.129 diff --git a/7.3.129 b/7.3.129 new file mode 100644 index 00000000..10f11d61 --- /dev/null +++ b/7.3.129 @@ -0,0 +1,241 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.129 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.129 +Problem: Using integer like a boolean. +Solution: Nicer check for integer being non-zero. +Files: src/tag.c + + +*** ../vim-7.3.128/src/tag.c 2010-12-17 18:06:00.000000000 +0100 +--- src/tag.c 2010-12-17 17:49:35.000000000 +0100 +*************** +*** 204,210 **** + else + { + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview) + use_tagstack = FALSE; + else + #endif +--- 204,210 ---- + else + { + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0) + use_tagstack = FALSE; + else + #endif +*************** +*** 222,228 **** + )) + { + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview) + { + if (ptag_entry.tagname != NULL + && STRCMP(ptag_entry.tagname, tag) == 0) +--- 222,228 ---- + )) + { + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0) + { + if (ptag_entry.tagname != NULL + && STRCMP(ptag_entry.tagname, tag) == 0) +*************** +*** 278,284 **** + { + if ( + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! g_do_tagpreview ? ptag_entry.tagname == NULL : + #endif + tagstacklen == 0) + { +--- 278,284 ---- + { + if ( + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! g_do_tagpreview != 0 ? ptag_entry.tagname == NULL : + #endif + tagstacklen == 0) + { +*************** +*** 361,367 **** + ) + { + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview) + { + cur_match = ptag_entry.cur_match; + cur_fnum = ptag_entry.cur_fnum; +--- 361,367 ---- + ) + { + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0) + { + cur_match = ptag_entry.cur_match; + cur_fnum = ptag_entry.cur_fnum; +*************** +*** 399,405 **** + prevtagstackidx = tagstackidx; + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview) + { + cur_match = ptag_entry.cur_match; + cur_fnum = ptag_entry.cur_fnum; +--- 399,405 ---- + prevtagstackidx = tagstackidx; + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0) + { + cur_match = ptag_entry.cur_match; + cur_fnum = ptag_entry.cur_fnum; +*************** +*** 437,443 **** + } + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview) + { + if (type != DT_SELECT && type != DT_JUMP) + { +--- 437,443 ---- + } + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0) + { + if (type != DT_SELECT && type != DT_JUMP) + { +*************** +*** 492,498 **** + if (use_tagstack) + name = tagstack[tagstackidx].tagname; + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! else if (g_do_tagpreview) + name = ptag_entry.tagname; + #endif + else +--- 492,498 ---- + if (use_tagstack) + name = tagstack[tagstackidx].tagname; + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! else if (g_do_tagpreview != 0) + name = ptag_entry.tagname; + #endif + else +*************** +*** 620,626 **** + parse_match(matches[i], &tagp); + if (!new_tag && ( + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! (g_do_tagpreview + && i == ptag_entry.cur_match) || + #endif + (use_tagstack +--- 620,626 ---- + parse_match(matches[i], &tagp); + if (!new_tag && ( + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! (g_do_tagpreview != 0 + && i == ptag_entry.cur_match) || + #endif + (use_tagstack +*************** +*** 962,968 **** + ++tagstackidx; + } + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! else if (g_do_tagpreview) + { + ptag_entry.cur_match = cur_match; + ptag_entry.cur_fnum = cur_fnum; +--- 962,968 ---- + ++tagstackidx; + } + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! else if (g_do_tagpreview != 0) + { + ptag_entry.cur_match = cur_match; + ptag_entry.cur_fnum = cur_fnum; +*************** +*** 3110,3116 **** + #endif + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview) + { + postponed_split = 0; /* don't split again below */ + curwin_save = curwin; /* Save current window */ +--- 3110,3116 ---- + #endif + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0) + { + postponed_split = 0; /* don't split again below */ + curwin_save = curwin; /* Save current window */ +*************** +*** 3148,3154 **** + /* A :ta from a help file will keep the b_help flag set. For ":ptag" + * we need to use the flag from the window where we came from. */ + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview) + keep_help_flag = curwin_save->w_buffer->b_help; + else + #endif +--- 3148,3154 ---- + /* A :ta from a help file will keep the b_help flag set. For ":ptag" + * we need to use the flag from the window where we came from. */ + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0) + keep_help_flag = curwin_save->w_buffer->b_help; + else + #endif +*************** +*** 3322,3328 **** + } + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview && curwin != curwin_save && win_valid(curwin_save)) + { + /* Return cursor to where we were */ + validate_cursor(); +--- 3322,3329 ---- + } + + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! if (g_do_tagpreview != 0 +! && curwin != curwin_save && win_valid(curwin_save)) + { + /* Return cursor to where we were */ + validate_cursor(); +*** ../vim-7.3.128/src/version.c 2011-02-25 15:11:17.000000000 +0100 +--- src/version.c 2011-02-25 15:12:25.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 129, + /**/ + +-- +PRINCE: He's come to rescue me, father. +LAUNCELOT: (embarrassed) Well, let's not jump to conclusions ... + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e3361df88fa186cca8fc3699916c46de9461d1a5 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0303/3803] Patchlevel 130 --- 7.3.130 | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 7.3.130 diff --git a/7.3.130 b/7.3.130 new file mode 100644 index 00000000..3f7db765 --- /dev/null +++ b/7.3.130 @@ -0,0 +1,74 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.130 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.130 +Problem: Variable misplaced in #ifdef. +Solution: Move clipboard_event_time outside of #ifdef. +Files: src/gui_gtk_x11.c + + +*** ../vim-7.3.129/src/gui_gtk_x11.c 2010-08-15 21:57:31.000000000 +0200 +--- src/gui_gtk_x11.c 2010-12-04 15:26:41.000000000 +0100 +*************** +*** 86,94 **** + + #ifdef HAVE_X11_SUNKEYSYM_H + # include +- static guint32 clipboard_event_time = CurrentTime; + #endif + + /* + * Easy-to-use macro for multihead support. + */ +--- 86,95 ---- + + #ifdef HAVE_X11_SUNKEYSYM_H + # include + #endif + ++ static guint32 clipboard_event_time = CurrentTime; ++ + /* + * Easy-to-use macro for multihead support. + */ +*************** +*** 5419,5425 **** + } + + #if defined(FEAT_NETBEANS_INTG) +! /* Process the queued netbeans messages. */ + netbeans_parse_messages(); + #endif + +--- 5420,5426 ---- + } + + #if defined(FEAT_NETBEANS_INTG) +! /* Process any queued netbeans messages. */ + netbeans_parse_messages(); + #endif + +*** ../vim-7.3.129/src/version.c 2011-02-25 15:13:43.000000000 +0100 +--- src/version.c 2011-02-25 15:15:02.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 130, + /**/ + +-- +A vacation is a period of travel during which you find that you +took twice as many clothes and half as much money as you needed. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 630a8365194296258d6d365a0550d5f515d26b4e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0304/3803] Patchlevel 131 --- 7.3.131 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 7.3.131 diff --git a/7.3.131 b/7.3.131 new file mode 100644 index 00000000..e142059f --- /dev/null +++ b/7.3.131 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.131 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.131 +Problem: Including errno.h too often. +Solution: Don't include errno.h in Unix header file. +Files: src/os_unix.h + + +*** ../vim-7.3.130/src/os_unix.h 2010-08-15 21:57:28.000000000 +0200 +--- src/os_unix.h 2010-12-17 20:05:34.000000000 +0100 +*************** +*** 184,193 **** + + #define BASENAMELEN (MAXNAMLEN - 5) + +- #ifdef HAVE_ERRNO_H +- # include +- #endif +- + #ifdef HAVE_PWD_H + # include + #endif +--- 184,189 ---- +*** ../vim-7.3.130/src/version.c 2011-02-25 15:15:43.000000000 +0100 +--- src/version.c 2011-02-25 15:16:49.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 131, + /**/ + +-- +Overflow on /dev/null, please empty the bit bucket. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5a6bd036d565396cb498f9e67993d343897c18db Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0305/3803] Patchlevel 132 --- 7.3.132 | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 7.3.132 diff --git a/7.3.132 b/7.3.132 new file mode 100644 index 00000000..2f0753df --- /dev/null +++ b/7.3.132 @@ -0,0 +1,82 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.132 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.132 +Problem: C++ style comments. +Solution: Change to C comments. +Files: src/if_python3.c + + +*** ../vim-7.3.131/src/if_python3.c 2010-11-16 19:25:56.000000000 +0100 +--- src/if_python3.c 2011-01-16 01:28:35.000000000 +0100 +*************** +*** 22,29 **** + * Adaptations to support both python3.x and python2.x + */ + +! // uncomment this if used with the debug version of python +! // #define Py_DEBUG + + #include "vim.h" + +--- 22,29 ---- + * Adaptations to support both python3.x and python2.x + */ + +! /* uncomment this if used with the debug version of python */ +! /* #define Py_DEBUG */ + + #include "vim.h" + +*************** +*** 74,80 **** + #define PyString_Size(obj) PyUnicode_GET_SIZE(obj) + #define PyString_FromString(repr) PyUnicode_FromString(repr) + +! #if defined(DYNAMIC_PYTHON3) + + # ifndef WIN3264 + # include +--- 74,80 ---- + #define PyString_Size(obj) PyUnicode_GET_SIZE(obj) + #define PyString_FromString(repr) PyUnicode_FromString(repr) + +! #if defined(DYNAMIC_PYTHON3) || defined(PROTO) + + # ifndef WIN3264 + # include +*** ../vim-7.3.131/src/version.c 2011-02-25 15:17:14.000000000 +0100 +--- src/version.c 2011-02-25 15:18:18.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 132, + /**/ + +-- + ** Hello and Welcome to the Psychiatric Hotline ** +If you are obsessive-compulsive, please press 1 repeatedly. +If you are co-dependent, please ask someone to press 2. +If you have multiple personalities, please press 3, 4, 5 and 6. +If you are paranoid-delusional, we know who you are and what you want + - just stay on the line so we can trace the call. +If you are schizophrenic, listen carefully and a little voice will + tell you which number to press next. +If you are manic-depressive, it doesn't matter which number you press + - no one will answer. +If you suffer from panic attacks, push every button you can find. +If you are sane, please hold on - we have the rest of humanity on the + other line and they desparately want to ask you a few questions. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 250891f6475ba5ca8cb4d30e6fe6e680e67e7f41 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0306/3803] Patchlevel 133 --- 7.3.133 | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 7.3.133 diff --git a/7.3.133 b/7.3.133 new file mode 100644 index 00000000..d7d99518 --- /dev/null +++ b/7.3.133 @@ -0,0 +1,122 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.133 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.133 +Problem: When using encryption it's not clear what method was used. +Solution: In the file message show "blowfish" when using blowfish. +Files: src/fileio.c + + +*** ../vim-7.3.132/src/fileio.c 2011-02-15 17:39:14.000000000 +0100 +--- src/fileio.c 2011-02-25 16:30:19.000000000 +0100 +*************** +*** 250,255 **** +--- 250,256 ---- + #ifdef FEAT_CRYPT + char_u *cryptkey = NULL; + int did_ask_for_key = FALSE; ++ int crypt_method_used; + #endif + #ifdef FEAT_PERSISTENT_UNDO + context_sha256_T sha_ctx; +*************** +*** 2289,2294 **** +--- 2290,2296 ---- + save_file_ff(curbuf); /* remember the current file format */ + + #ifdef FEAT_CRYPT ++ crypt_method_used = use_crypt_method; + if (cryptkey != NULL) + { + crypt_pop_state(); +*************** +*** 2483,2489 **** + #ifdef FEAT_CRYPT + if (cryptkey != NULL) + { +! STRCAT(IObuff, _("[crypted]")); + c = TRUE; + } + #endif +--- 2485,2494 ---- + #ifdef FEAT_CRYPT + if (cryptkey != NULL) + { +! if (crypt_method_used == 1) +! STRCAT(IObuff, _("[blowfish]")); +! else +! STRCAT(IObuff, _("[crypted]")); + c = TRUE; + } + #endif +*************** +*** 3199,3204 **** +--- 3204,3212 ---- + int write_undo_file = FALSE; + context_sha256_T sha_ctx; + #endif ++ #ifdef FEAT_CRYPT ++ int crypt_method_used; ++ #endif + + if (fname == NULL || *fname == NUL) /* safety check */ + return FAIL; +*************** +*** 4728,4733 **** +--- 4736,4742 ---- + mch_set_acl(wfname, acl); + #endif + #ifdef FEAT_CRYPT ++ crypt_method_used = use_crypt_method; + if (wb_flags & FIO_ENCRYPTED) + crypt_pop_state(); + #endif +*************** +*** 4882,4888 **** + #ifdef FEAT_CRYPT + if (wb_flags & FIO_ENCRYPTED) + { +! STRCAT(IObuff, _("[crypted]")); + c = TRUE; + } + #endif +--- 4891,4900 ---- + #ifdef FEAT_CRYPT + if (wb_flags & FIO_ENCRYPTED) + { +! if (crypt_method_used == 1) +! STRCAT(IObuff, _("[blowfish]")); +! else +! STRCAT(IObuff, _("[crypted]")); + c = TRUE; + } + #endif +*** ../vim-7.3.132/src/version.c 2011-02-25 15:18:46.000000000 +0100 +--- src/version.c 2011-02-25 16:42:58.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 133, + /**/ + +-- + [clop clop] +GUARD #1: Halt! Who goes there? +ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of + Camelot. King of the Britons, defeator of the Saxons, sovereign of + all England! +GUARD #1: Pull the other one! + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ae570c249151e242694eccb093a3216e9bb70e71 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0307/3803] Patchlevel 134 --- 7.3.134 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 7.3.134 diff --git a/7.3.134 b/7.3.134 new file mode 100644 index 00000000..cb20ce43 --- /dev/null +++ b/7.3.134 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.134 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.134 +Problem: Drag-n-drop doesn't work in KDE Dolphin. +Solution: Add GDK_ACTION_MOVE flag. (Florian Degner) +Files: src/gui_gtk_x11.c + + +*** ../vim-7.3.133/src/gui_gtk_x11.c 2011-02-25 15:15:43.000000000 +0100 +--- src/gui_gtk_x11.c 2011-02-25 17:07:36.000000000 +0100 +*************** +*** 3094,3100 **** + gtk_drag_dest_set(gui.drawarea, + GTK_DEST_DEFAULT_ALL, + targets, n_targets, +! GDK_ACTION_COPY); + } + + /* +--- 3094,3100 ---- + gtk_drag_dest_set(gui.drawarea, + GTK_DEST_DEFAULT_ALL, + targets, n_targets, +! GDK_ACTION_COPY | GDK_ACTION_MOVE); + } + + /* +*** ../vim-7.3.133/src/version.c 2011-02-25 16:52:13.000000000 +0100 +--- src/version.c 2011-02-25 17:08:35.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 134, + /**/ + +-- +Proverb: A nightingale that forgets the lyrics is a hummingbird. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 4c8a4677e294a77d1825c7aec228852e4a5410b0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0308/3803] Patchlevel 135 --- 7.3.135 | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 7.3.135 diff --git a/7.3.135 b/7.3.135 new file mode 100644 index 00000000..ca1ebd68 --- /dev/null +++ b/7.3.135 @@ -0,0 +1,90 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.135 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.135 +Problem: When there is no previous substitute pattern, the previous search + pattern is used. The other way around doesn't work. +Solution: When there is no previous search pattern, use the previous + substitute pattern if possible. (Christian Brabandt) +Files: src/search.c + + +*** ../vim-7.3.134/src/search.c 2010-09-21 16:56:29.000000000 +0200 +--- src/search.c 2011-02-25 18:36:56.000000000 +0100 +*************** +*** 1161,1172 **** + { + if (spats[RE_SEARCH].pat == NULL) /* no previous pattern */ + { +! EMSG(_(e_noprevre)); +! retval = 0; +! goto end_do_search; + } +- /* make search_regcomp() use spats[RE_SEARCH].pat */ +- searchstr = (char_u *)""; + } + + if (pat != NULL && *pat != NUL) /* look for (new) offset */ +--- 1161,1180 ---- + { + if (spats[RE_SEARCH].pat == NULL) /* no previous pattern */ + { +! pat = spats[RE_SUBST].pat; +! if (pat == NULL) +! { +! EMSG(_(e_noprevre)); +! retval = 0; +! goto end_do_search; +! } +! searchstr = pat; +! } +! else +! { +! /* make search_regcomp() use spats[RE_SEARCH].pat */ +! searchstr = (char_u *)""; + } + } + + if (pat != NULL && *pat != NUL) /* look for (new) offset */ +*************** +*** 4527,4533 **** + #if defined(FEAT_FIND_ID) || defined(PROTO) + /* + * Find identifiers or defines in included files. +! * if p_ic && (compl_cont_status & CONT_SOL) then ptr must be in lowercase. + */ + void + find_pattern_in_path(ptr, dir, len, whole, skip_comments, +--- 4535,4541 ---- + #if defined(FEAT_FIND_ID) || defined(PROTO) + /* + * Find identifiers or defines in included files. +! * If p_ic && (compl_cont_status & CONT_SOL) then ptr must be in lowercase. + */ + void + find_pattern_in_path(ptr, dir, len, whole, skip_comments, +*** ../vim-7.3.134/src/version.c 2011-02-25 17:10:22.000000000 +0100 +--- src/version.c 2011-02-25 18:35:30.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 135, + /**/ + +-- +A real patriot is the fellow who gets a parking ticket and rejoices +that the system works. + + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 1ab4c20b346022ef62c4e9c8412995f2b4c433e6 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0309/3803] Patchlevel 136 --- 7.3.136 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 7.3.136 diff --git a/7.3.136 b/7.3.136 new file mode 100644 index 00000000..87acecb6 --- /dev/null +++ b/7.3.136 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.136 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.136 +Problem: Duplicate include of assert.h. +Solution: Remove it. +Files: src/if_cscope.c + + +*** ../vim-7.3.135/src/if_cscope.c 2010-12-30 11:41:05.000000000 +0100 +--- src/if_cscope.c 2011-03-03 15:01:15.000000000 +0100 +*************** +*** 13,19 **** + + #if defined(FEAT_CSCOPE) || defined(PROTO) + +- #include + #include + #include + #if defined(UNIX) +--- 13,18 ---- +*** ../vim-7.3.135/src/version.c 2011-02-25 18:38:29.000000000 +0100 +--- src/version.c 2011-03-03 14:59:32.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 136, + /**/ + +-- +ARTHUR: You fight with the strength of many men, Sir knight. + I am Arthur, King of the Britons. [pause] + I seek the finest and the bravest knights in the land to join me + in my Court of Camelot. [pause] + You have proved yourself worthy; will you join me? [pause] + You make me sad. So be it. Come, Patsy. +BLACK KNIGHT: None shall pass. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ee42d7cc46a40c7cd62152f5e639b6ad1dff07b0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0310/3803] Patchlevel 137 --- 7.3.137 | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 7.3.137 diff --git a/7.3.137 b/7.3.137 new file mode 100644 index 00000000..91f68ed3 --- /dev/null +++ b/7.3.137 @@ -0,0 +1,81 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.137 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.137 (after 7.3.091) +Problem: When 'lazyredraw' is set the screen may not be updated. (Ivan + Krasilnikov) +Solution: Call update_screen() before waiting for input. +Files: src/misc1.c, src/getchar.c + + +*** ../vim-7.3.136/src/misc1.c 2011-01-22 00:11:42.000000000 +0100 +--- src/misc1.c 2011-03-03 14:02:02.000000000 +0100 +*************** +*** 3115,3121 **** +--- 3115,3129 ---- + continue; + + if (n == KEYLEN_REMOVED) /* key code removed */ ++ { ++ if (must_redraw) ++ { ++ /* Redrawing was postponed, do it now. */ ++ update_screen(0); ++ setcursor(); /* put cursor back where it belongs */ ++ } + continue; ++ } + if (n > 0) /* found a termcode: adjust length */ + len = n; + if (len == 0) /* nothing typed yet */ +*** ../vim-7.3.136/src/getchar.c 2010-12-30 12:30:26.000000000 +0100 +--- src/getchar.c 2011-03-03 14:01:26.000000000 +0100 +*************** +*** 2710,2717 **** + * are still available. But when those available characters + * are part of a mapping, and we are going to do a blocking + * wait here. Need to update the screen to display the +! * changed text so far. */ +! if ((State & INSERT) && advance && must_redraw != 0) + { + update_screen(0); + setcursor(); /* put cursor back where it belongs */ +--- 2710,2719 ---- + * are still available. But when those available characters + * are part of a mapping, and we are going to do a blocking + * wait here. Need to update the screen to display the +! * changed text so far. Also for when 'lazyredraw' is set and +! * redrawing was postponed because there was something in the +! * input buffer (e.g., termresponse). */ +! if (((State & INSERT) || p_lz) && advance && must_redraw != 0) + { + update_screen(0); + setcursor(); /* put cursor back where it belongs */ +*** ../vim-7.3.136/src/version.c 2011-03-03 15:01:25.000000000 +0100 +--- src/version.c 2011-03-03 15:02:45.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 137, + /**/ + +-- +ARTHUR: What? +BLACK KNIGHT: None shall pass. +ARTHUR: I have no quarrel with you, good Sir knight, but I must cross + this bridge. +BLACK KNIGHT: Then you shall die. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 11c8e0eead2bba0010595bc3d6c1ba756f3a6c3b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0311/3803] Patchlevel 138 --- 7.3.138 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 7.3.138 diff --git a/7.3.138 b/7.3.138 new file mode 100644 index 00000000..e045e790 --- /dev/null +++ b/7.3.138 @@ -0,0 +1,69 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.138 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.138 +Problem: ":com" changes the multi-byte text of :echo. (Dimitar Dimitrov) +Solution: Search for K_SPECIAL as a byte, not a character. (Ben Schmidt) +Files: src/ex_docmd.c + + +*** ../vim-7.3.137/src/ex_docmd.c 2011-01-17 19:50:01.000000000 +0100 +--- src/ex_docmd.c 2011-03-03 15:47:00.000000000 +0100 +*************** +*** 6054,6068 **** + end = vim_strchr(start + 1, '>'); + if (buf != NULL) + { +! ksp = vim_strchr(p, K_SPECIAL); +! if (ksp != NULL && (start == NULL || ksp < start || end == NULL) + && ((ksp[1] == KS_SPECIAL && ksp[2] == KE_FILLER) + # ifdef FEAT_GUI + || (ksp[1] == KS_EXTRA && ksp[2] == (int)KE_CSI) + # endif + )) + { +! /* K_SPECIAL han been put in the buffer as K_SPECIAL + * KS_SPECIAL KE_FILLER, like for mappings, but + * do_cmdline() doesn't handle that, so convert it back. + * Also change K_SPECIAL KS_EXTRA KE_CSI into CSI. */ +--- 6054,6070 ---- + end = vim_strchr(start + 1, '>'); + if (buf != NULL) + { +! for (ksp = p; *ksp != NUL && *ksp != K_SPECIAL; ++ksp) +! ; +! if (*ksp == K_SPECIAL +! && (start == NULL || ksp < start || end == NULL) + && ((ksp[1] == KS_SPECIAL && ksp[2] == KE_FILLER) + # ifdef FEAT_GUI + || (ksp[1] == KS_EXTRA && ksp[2] == (int)KE_CSI) + # endif + )) + { +! /* K_SPECIAL has been put in the buffer as K_SPECIAL + * KS_SPECIAL KE_FILLER, like for mappings, but + * do_cmdline() doesn't handle that, so convert it back. + * Also change K_SPECIAL KS_EXTRA KE_CSI into CSI. */ +*** ../vim-7.3.137/src/version.c 2011-03-03 15:04:01.000000000 +0100 +--- src/version.c 2011-03-03 15:53:41.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 138, + /**/ + +-- + f y cn rd ths thn y cn hv grt jb n cmptr prgrmmng + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d46de11094db517c1da6715c4c8011d6b8f7a30c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0312/3803] Patchlevel 139 --- 7.3.139 | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 7.3.139 diff --git a/7.3.139 b/7.3.139 new file mode 100644 index 00000000..057bf655 --- /dev/null +++ b/7.3.139 @@ -0,0 +1,111 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.139 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.139 (after 7.3.137) +Problem: When 'lazyredraw' is set ":ver" output can't be read. +Solution: Don't redraw the screen when at a prompt or command line. +Files: src/getchar.c, src/message.c, src/misc1.c + + +*** ../vim-7.3.138/src/getchar.c 2011-03-03 15:04:01.000000000 +0100 +--- src/getchar.c 2011-03-22 12:16:23.000000000 +0100 +*************** +*** 2713,2719 **** + * changed text so far. Also for when 'lazyredraw' is set and + * redrawing was postponed because there was something in the + * input buffer (e.g., termresponse). */ +! if (((State & INSERT) || p_lz) && advance && must_redraw != 0) + { + update_screen(0); + setcursor(); /* put cursor back where it belongs */ +--- 2713,2720 ---- + * changed text so far. Also for when 'lazyredraw' is set and + * redrawing was postponed because there was something in the + * input buffer (e.g., termresponse). */ +! if (((State & INSERT) != 0 || p_lz) && (State & CMDLINE) == 0 +! && advance && must_redraw != 0 && !need_wait_return) + { + update_screen(0); + setcursor(); /* put cursor back where it belongs */ +*** ../vim-7.3.138/src/message.c 2011-02-01 17:12:20.000000000 +0100 +--- src/message.c 2011-03-22 13:06:24.000000000 +0100 +*************** +*** 879,894 **** + if (msg_silent != 0) + return; + +! /* +! * With the global command (and some others) we only need one return at the +! * end. Adjust cmdline_row to avoid the next message overwriting the last one. +! * When inside vgetc(), we can't wait for a typed character at all. +! */ + if (vgetc_busy > 0) + return; + if (no_wait_return) + { +- need_wait_return = TRUE; + if (!exmode_active) + cmdline_row = msg_row; + return; +--- 879,895 ---- + if (msg_silent != 0) + return; + +! /* +! * When inside vgetc(), we can't wait for a typed character at all. +! * With the global command (and some others) we only need one return at +! * the end. Adjust cmdline_row to avoid the next message overwriting the +! * last one. +! */ + if (vgetc_busy > 0) + return; ++ need_wait_return = TRUE; + if (no_wait_return) + { + if (!exmode_active) + cmdline_row = msg_row; + return; +*** ../vim-7.3.138/src/misc1.c 2011-03-03 15:04:01.000000000 +0100 +--- src/misc1.c 2011-03-22 12:15:26.000000000 +0100 +*************** +*** 3116,3122 **** + + if (n == KEYLEN_REMOVED) /* key code removed */ + { +! if (must_redraw) + { + /* Redrawing was postponed, do it now. */ + update_screen(0); +--- 3116,3122 ---- + + if (n == KEYLEN_REMOVED) /* key code removed */ + { +! if (must_redraw != 0 && !need_wait_return && (State & CMDLINE) == 0) + { + /* Redrawing was postponed, do it now. */ + update_screen(0); +*** ../vim-7.3.138/src/version.c 2011-03-03 15:54:45.000000000 +0100 +--- src/version.c 2011-03-22 13:06:33.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 139, + /**/ + +-- +"Software is like sex... it's better when it's free." + -- Linus Torvalds, initiator of the free Linux OS +Makes me wonder what FSF stands for...? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 8604a4c031a305d069ffbdbb708a1367e9be3035 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0313/3803] Patchlevel 140 --- 7.3.140 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.140 diff --git a/7.3.140 b/7.3.140 new file mode 100644 index 00000000..53c3aafb --- /dev/null +++ b/7.3.140 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.140 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.140 +Problem: Crash when drawing the "$" at end-of-line for list mode just after + the window border and 'cursorline' is set. +Solution: Don't check for 'cursorline'. (Quentin Carbonneaux) +Files: src/screen.c + + +*** ../vim-7.3.139/src/screen.c 2011-02-09 17:09:26.000000000 +0100 +--- src/screen.c 2011-03-22 13:29:04.000000000 +0100 +*************** +*** 5099,5109 **** + #ifdef FEAT_DIFF + || filler_todo > 0 + #endif +! || (wp->w_p_list && lcs_eol != NUL && p_extra != at_end_str +! #ifdef FEAT_SYN_HL +! && !wp->w_p_cul +! #endif +! ) + || (n_extra != 0 && (c_extra != NUL || *p_extra != NUL))) + ) + { +--- 5099,5105 ---- + #ifdef FEAT_DIFF + || filler_todo > 0 + #endif +! || (wp->w_p_list && lcs_eol != NUL && p_extra != at_end_str) + || (n_extra != 0 && (c_extra != NUL || *p_extra != NUL))) + ) + { +*** ../vim-7.3.139/src/version.c 2011-03-22 13:07:19.000000000 +0100 +--- src/version.c 2011-03-22 13:27:26.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 140, + /**/ + +-- +Lawmakers made it obligatory for everybody to take at least one bath +each week -- on Saturday night. + [real standing law in Vermont, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 4096a471ef90491a922a15742e272df9a51330e9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0314/3803] Patchlevel 141 --- 7.3.141 | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 7.3.141 diff --git a/7.3.141 b/7.3.141 new file mode 100644 index 00000000..deb001b7 --- /dev/null +++ b/7.3.141 @@ -0,0 +1,94 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.141 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.141 +Problem: When a key code is not set get a confusing error message. +Solution: Change the error message to say the key code is not set. +Files: src/option.c, runtime/doc/options.txt + + +*** ../vim-7.3.140/src/option.c 2011-01-22 00:11:42.000000000 +0100 +--- src/option.c 2011-03-22 14:25:52.000000000 +0100 +*************** +*** 4352,4358 **** + p = find_termcode(key_name); + if (p == NULL) + { +! errmsg = (char_u *)N_("E518: Unknown option"); + goto skip; + } + else +--- 4352,4358 ---- + p = find_termcode(key_name); + if (p == NULL) + { +! errmsg = (char_u *)N_("E846: Key code not set"); + goto skip; + } + else +*************** +*** 4700,4707 **** + || s[i] == ',' + || s[i] == NUL)) + break; +! /* Count backspaces. Only a comma with an +! * even number of backspaces before it is + * recognized as a separator */ + if (s > origval && s[-1] == '\\') + ++bs; +--- 4700,4707 ---- + || s[i] == ',' + || s[i] == NUL)) + break; +! /* Count backslashes. Only a comma with an +! * even number of backslashes before it is + * recognized as a separator */ + if (s > origval && s[-1] == '\\') + ++bs; +*** ../vim-7.3.140/runtime/doc/options.txt 2010-12-02 21:43:10.000000000 +0100 +--- runtime/doc/options.txt 2011-03-22 14:32:14.000000000 +0100 +*************** +*** 150,155 **** +--- 150,167 ---- + (the ^[ is a real here, use CTRL-V to enter it) + The advantage over a mapping is that it works in all situations. + ++ You can define any key codes, e.g.: > ++ :set t_xy=^[foo; ++ There is no warning for using a name that isn't recognized. You can map these ++ codes as you like: > ++ :map something ++ < *E846* ++ When a key code is not set, it's like it does not exist. Trying to get its ++ value will result in an error: > ++ :set t_kb= ++ :set t_kb ++ E846: Key code not set: t_kb ++ + The t_xx options cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + +*** ../vim-7.3.140/src/version.c 2011-03-22 13:29:20.000000000 +0100 +--- src/version.c 2011-03-22 14:32:59.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 141, + /**/ + +-- +"I know that there are people who don't love their fellow man, +and I hate those people!" - Tom Lehrer + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 99c35b4a580580c4f25456d16cc90f4f6b2cdc73 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0315/3803] Patchlevel 142 --- 7.3.142 | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 7.3.142 diff --git a/7.3.142 b/7.3.142 new file mode 100644 index 00000000..6574f71f --- /dev/null +++ b/7.3.142 @@ -0,0 +1,85 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.142 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.142 +Problem: Python stdout doesn't have a flush() method, causing an import to + fail. +Solution: Add a dummy flush() method. (Tobias Columbus) +Files: src/if_py_both.h + + +*** ../vim-7.3.141/src/if_py_both.h 2010-10-27 12:17:54.000000000 +0200 +--- src/if_py_both.h 2011-03-22 15:37:43.000000000 +0100 +*************** +*** 33,38 **** +--- 33,39 ---- + + static PyObject *OutputWrite(PyObject *, PyObject *); + static PyObject *OutputWritelines(PyObject *, PyObject *); ++ static PyObject *OutputFlush(PyObject *, PyObject *); + + /* Function to write a line, points to either msg() or emsg(). */ + typedef void (*writefn)(char_u *); +*************** +*** 47,55 **** + + static struct PyMethodDef OutputMethods[] = { + /* name, function, calling, documentation */ +! {"write", OutputWrite, 1, "" }, +! {"writelines", OutputWritelines, 1, "" }, +! { NULL, NULL, 0, NULL } + }; + + #define PyErr_SetVim(str) PyErr_SetString(VimError, str) +--- 48,57 ---- + + static struct PyMethodDef OutputMethods[] = { + /* name, function, calling, documentation */ +! {"write", OutputWrite, 1, ""}, +! {"writelines", OutputWritelines, 1, ""}, +! {"flush", OutputFlush, 1, ""}, +! { NULL, NULL, 0, NULL} + }; + + #define PyErr_SetVim(str) PyErr_SetString(VimError, str) +*************** +*** 123,128 **** +--- 125,139 ---- + return Py_None; + } + ++ static PyObject * ++ OutputFlush(PyObject *self UNUSED, PyObject *args UNUSED) ++ { ++ /* do nothing */ ++ Py_INCREF(Py_None); ++ return Py_None; ++ } ++ ++ + /* Buffer IO, we write one whole line at a time. */ + static garray_T io_ga = {0, 0, 1, 80, NULL}; + static writefn old_fn = NULL; +*** ../vim-7.3.141/src/version.c 2011-03-22 14:35:01.000000000 +0100 +--- src/version.c 2011-03-22 15:45:38.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 142, + /**/ + +-- +Living on Earth includes an annual free trip around the Sun. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9cbfb8a171c6ef04178a7db0e3737a9be7e06b99 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0316/3803] Patchlevel 143 --- 7.3.143 | 1520 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1520 insertions(+) create mode 100644 7.3.143 diff --git a/7.3.143 b/7.3.143 new file mode 100644 index 00000000..82585b0e --- /dev/null +++ b/7.3.143 @@ -0,0 +1,1520 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.143 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.143 +Problem: Memfile is not tested sufficiently. Looking up blocks in a + memfile is slow when there are many blocks. +Solution: Add high level test and unittest. Adjust the number of hash + buckets to the number of blocks. (Ivan Krasilnikov) +Files: Filelist, src/Makefile, src/main.c, src/memfile.c, + src/memfile_test.c src/structs.h src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mak, + src/testdir/Makefile, src/testdir/test77.in, src/testdir/test77.ok + + +*** ../vim-7.3.142/Filelist 2010-08-15 21:57:20.000000000 +0200 +--- Filelist 2011-03-22 17:39:22.000000000 +0100 +*************** +*** 39,44 **** +--- 39,45 ---- + src/mark.c \ + src/mbyte.c \ + src/memfile.c \ ++ src/memfile_test.c \ + src/memline.c \ + src/menu.c \ + src/message.c \ +*************** +*** 686,691 **** +--- 687,694 ---- + runtime/tutor/tutor.utf-8 \ + runtime/tutor/tutor.?? \ + runtime/tutor/tutor.??.* \ ++ runtime/tutor/tutor.bar \ ++ runtime/tutor/tutor.bar.* \ + runtime/spell/README.txt \ + runtime/spell/??/*.diff \ + runtime/spell/??/main.aap \ +*** ../vim-7.3.142/src/Makefile 2011-02-15 15:27:00.000000000 +0100 +--- src/Makefile 2011-03-22 18:07:25.000000000 +0100 +*************** +*** 561,567 **** + #CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce -Wall -Wmissing-prototypes + + # Use this with GCC to check for mistakes, unused arguments, etc. +! #CFLAGS = -g -Wall -Wextra -Wmissing-prototypes -Wunreachable-code -D_FORTIFY_SOURCE=1 -DU_DEBUG + #CFLAGS = -g -O2 -Wall -Wextra -Wmissing-prototypes -D_FORTIFY_SOURCE=1 -DU_DEBUG + #PYTHON_CFLAGS_EXTRA = -Wno-missing-field-initializers + #MZSCHEME_CFLAGS_EXTRA = -Wno-unreachable-code -Wno-unused-parameter +--- 561,567 ---- + #CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce -Wall -Wmissing-prototypes + + # Use this with GCC to check for mistakes, unused arguments, etc. +! #CFLAGS = -g -Wall -Wextra -Wmissing-prototypes -Wunreachable-code -D_FORTIFY_SOURCE=1 + #CFLAGS = -g -O2 -Wall -Wextra -Wmissing-prototypes -D_FORTIFY_SOURCE=1 -DU_DEBUG + #PYTHON_CFLAGS_EXTRA = -Wno-missing-field-initializers + #MZSCHEME_CFLAGS_EXTRA = -Wno-unreachable-code -Wno-unused-parameter +*************** +*** 594,601 **** + + # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof. + # Might not work with GUI or Perl. +! # For unknown reasons adding "-lc" fixes a linking problem with GCC. That's +! # probably a bug in the "-pg" implementation. + # Need to recompile everything after changing this: "make clean" "make". + #PROFILE_CFLAGS = -pg -g -DWE_ARE_PROFILING + #PROFILE_LIBS = -pg +--- 594,602 ---- + + # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof. + # Might not work with GUI or Perl. +! # For unknown reasons adding "-lc" fixes a linking problem with some versions +! # of GCC. That's probably a bug in the "-pg" implementation. +! # After running Vim see the profile result with: gmon vim gmon.out | vim - + # Need to recompile everything after changing this: "make clean" "make". + #PROFILE_CFLAGS = -pg -g -DWE_ARE_PROFILING + #PROFILE_LIBS = -pg +*************** +*** 606,613 **** + # Configuration is in the .ccmalloc or ~/.ccmalloc file. + # Doesn't work very well, since memory linked to from global variables + # (in libraries) is also marked as leaked memory. +! #PROFILE_CFLAGS = -DEXITFREE +! #PROFILE_LIBS = -lccmalloc + + ##################################################### + ### Specific systems, check if yours is listed! ### {{{ +--- 607,614 ---- + # Configuration is in the .ccmalloc or ~/.ccmalloc file. + # Doesn't work very well, since memory linked to from global variables + # (in libraries) is also marked as leaked memory. +! #LEAK_CFLAGS = -DEXITFREE +! #LEAK_LIBS = -lccmalloc + + ##################################################### + ### Specific systems, check if yours is listed! ### {{{ +*************** +*** 1329,1335 **** + PRE_DEFS = -Iproto $(DEFS) $(GUI_DEFS) $(GUI_IPATH) $(CPPFLAGS) $(EXTRA_IPATHS) + POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(TCL_CFLAGS) $(EXTRA_DEFS) + +! ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(POST_DEFS) + + # Exclude $CFLAGS for osdef.sh, for Mac 10.4 some flags don't work together + # with "-E". +--- 1330,1336 ---- + PRE_DEFS = -Iproto $(DEFS) $(GUI_DEFS) $(GUI_IPATH) $(CPPFLAGS) $(EXTRA_IPATHS) + POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(TCL_CFLAGS) $(EXTRA_DEFS) + +! ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(LEAK_CFLAGS) $(POST_DEFS) + + # Exclude $CFLAGS for osdef.sh, for Mac 10.4 some flags don't work together + # with "-E". +*************** +*** 1358,1364 **** + $(PYTHON3_LIBS) \ + $(TCL_LIBS) \ + $(RUBY_LIBS) \ +! $(PROFILE_LIBS) + + # abbreviations + DEST_BIN = $(DESTDIR)$(BINDIR) +--- 1359,1366 ---- + $(PYTHON3_LIBS) \ + $(TCL_LIBS) \ + $(RUBY_LIBS) \ +! $(PROFILE_LIBS) \ +! $(LEAK_LIBS) + + # abbreviations + DEST_BIN = $(DESTDIR)$(BINDIR) +*************** +*** 1480,1487 **** + if_python.c if_python3.c if_tcl.c if_ruby.c if_sniff.c \ + gui_beval.c workshop.c wsdebug.c integration.c netbeans.c + + # All sources, also the ones that are not configured +! ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(EXTRA_SRC) + + # Which files to check with lint. Select one of these three lines. ALL_SRC + # checks more, but may not work well for checking a GUI that wasn't configured. +--- 1482,1496 ---- + if_python.c if_python3.c if_tcl.c if_ruby.c if_sniff.c \ + gui_beval.c workshop.c wsdebug.c integration.c netbeans.c + ++ # Unittest files ++ MEMFILE_TEST_SRC = memfile_test.c ++ MEMFILE_TEST_TARGET = memfile_test$(EXEEXT) ++ ++ UNITTEST_SRC = $(MEMFILE_TEST_SRC) ++ UNITTEST_TARGETS = $(MEMFILE_TEST_TARGET) ++ + # All sources, also the ones that are not configured +! ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(UNITTEST_SRC) $(EXTRA_SRC) + + # Which files to check with lint. Select one of these three lines. ALL_SRC + # checks more, but may not work well for checking a GUI that wasn't configured. +*************** +*** 1492,1498 **** + #LINT_SRC = $(ALL_SRC) + #LINT_SRC = $(BASIC_SRC) + +! OBJ = \ + objects/buffer.o \ + objects/blowfish.o \ + objects/charset.o \ +--- 1501,1507 ---- + #LINT_SRC = $(ALL_SRC) + #LINT_SRC = $(BASIC_SRC) + +! OBJ_COMMON = \ + objects/buffer.o \ + objects/blowfish.o \ + objects/charset.o \ +*************** +*** 1513,1522 **** + $(HANGULIN_OBJ) \ + objects/if_cscope.o \ + objects/if_xcmdsrv.o \ +- objects/main.o \ + objects/mark.o \ +! objects/memfile.o \ +! objects/memline.o \ + objects/menu.o \ + objects/message.o \ + objects/misc1.o \ +--- 1522,1529 ---- + $(HANGULIN_OBJ) \ + objects/if_cscope.o \ + objects/if_xcmdsrv.o \ + objects/mark.o \ +! objects/memline.o \ + objects/menu.o \ + objects/message.o \ + objects/misc1.o \ +*************** +*** 1541,1546 **** +--- 1548,1554 ---- + objects/term.o \ + objects/ui.o \ + objects/undo.o \ ++ objects/version.o \ + objects/window.o \ + $(GUI_OBJ) \ + $(LUA_OBJ) \ +*************** +*** 1555,1560 **** +--- 1563,1575 ---- + $(NETBEANS_OBJ) \ + $(WSDEBUG_OBJ) + ++ OBJ = $(OBJ_COMMON) \ ++ objects/main.o \ ++ objects/memfile.o \ ++ ++ MEMFILE_TEST_OBJ = $(OBJ_COMMON) \ ++ objects/memfile_test.o ++ + PRO_AUTO = \ + blowfish.pro \ + buffer.pro \ +*************** +*** 1700,1706 **** + $(VIMTARGET): auto/config.mk objects $(OBJ) version.c version.h + $(CCC) version.c -o objects/version.o + @LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \ +! -o $(VIMTARGET) $(OBJ) objects/version.o $(ALL_LIBS)" \ + MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \ + sh $(srcdir)/link.sh + +--- 1715,1721 ---- + $(VIMTARGET): auto/config.mk objects $(OBJ) version.c version.h + $(CCC) version.c -o objects/version.o + @LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \ +! -o $(VIMTARGET) $(OBJ) $(ALL_LIBS)" \ + MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \ + sh $(srcdir)/link.sh + +*************** +*** 1825,1830 **** +--- 1840,1854 ---- + ln -s $(VIMTARGET) vim; \ + fi + cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) ++ $(MAKE) -f Makefile unittest ++ ++ unittesttargets: ++ $(MAKE) -f Makefile $(UNITTEST_TARGETS) ++ ++ unittest unittests: $(UNITTEST_TARGETS) ++ @for t in $(UNITTEST_TARGETS); do \ ++ ./$$t || exit 1; echo $$t passed; \ ++ done + + testclean: + cd testdir; $(MAKE) -f Makefile clean +*************** +*** 1832,1837 **** +--- 1856,1872 ---- + cd $(PODIR); $(MAKE) checkclean; \ + fi + ++ # Unittests ++ # It's build just like Vim to satisfy all dependencies. ++ $(MEMFILE_TEST_TARGET): auto/config.mk objects $(MEMFILE_TEST_OBJ) ++ $(CCC) version.c -o objects/version.o ++ @LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \ ++ -o $(MEMFILE_TEST_TARGET) $(MEMFILE_TEST_OBJ) $(ALL_LIBS)" \ ++ MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \ ++ sh $(srcdir)/link.sh ++ ++ # install targets ++ + install: $(GUI_INSTALL) + + install_normal: installvim installtools $(INSTALL_LANGS) install-icons +*************** +*** 2265,2270 **** +--- 2300,2306 ---- + -rm -f *.o objects/* core $(VIMTARGET).core $(VIMTARGET) vim xxd/*.o + -rm -f $(TOOLS) auto/osdef.h auto/pathdef.c auto/if_perl.c + -rm -f conftest* *~ auto/link.sed ++ -rm -f $(UNITTEST_TARGETS) + -rm -f runtime pixmaps + -rm -rf $(APPDIR) + -rm -rf mzscheme_base.c +*************** +*** 2559,2564 **** +--- 2595,2603 ---- + objects/memfile.o: memfile.c + $(CCC) -o $@ memfile.c + ++ objects/memfile_test.o: memfile_test.c ++ $(CCC) -o $@ memfile_test.c ++ + objects/memline.o: memline.c + $(CCC) -o $@ memline.c + +*************** +*** 2877,2883 **** + objects/os_unix.o: os_unix.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \ + ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ + gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ +! arabic.h if_mzsch.h os_unixx.h + objects/pathdef.o: auto/pathdef.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ +--- 2916,2922 ---- + objects/os_unix.o: os_unix.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \ + ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ + gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ +! arabic.h os_unixx.h + objects/pathdef.o: auto/pathdef.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ +*************** +*** 3016,3021 **** +--- 3055,3064 ---- + objects/pty.o: pty.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \ + keymap.h term.h macros.h option.h structs.h regexp.h gui.h gui_beval.h \ + proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h arabic.h ++ objects/memfile_test.o: memfile_test.c main.c vim.h auto/config.h feature.h \ ++ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h \ ++ structs.h regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h \ ++ proto.h globals.h farsi.h arabic.h farsi.c arabic.c memfile.c + objects/hangulin.o: hangulin.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ +*************** +*** 3027,3033 **** + objects/if_mzsch.o: if_mzsch.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ +! globals.h farsi.h arabic.h if_mzsch.h mzscheme_base.c + objects/if_perl.o: auto/if_perl.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ +--- 3070,3076 ---- + objects/if_mzsch.o: if_mzsch.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ +! globals.h farsi.h arabic.h if_mzsch.h + objects/if_perl.o: auto/if_perl.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ +*************** +*** 3048,3054 **** + ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ + gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ + arabic.h +! objects/if_ruby.o: if_ruby.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \ + ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ + gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ + arabic.h version.h +--- 3091,3097 ---- + ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ + gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ + arabic.h +! objects/if_ruby.o: if_ruby.c auto/config.h vim.h feature.h os_unix.h auto/osdef.h \ + ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ + gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ + arabic.h version.h +*** ../vim-7.3.142/src/main.c 2011-02-15 16:29:54.000000000 +0100 +--- src/main.c 2011-03-18 13:19:48.000000000 +0100 +*************** +*** 92,128 **** + #define EDIT_TAG 3 /* tag name argument given, use tagname */ + #define EDIT_QF 4 /* start in quickfix mode */ + +! #if defined(UNIX) || defined(VMS) + static int file_owned __ARGS((char *fname)); + #endif + static void mainerr __ARGS((int, char_u *)); + static void main_msg __ARGS((char *s)); + static void usage __ARGS((void)); + static int get_number_arg __ARGS((char_u *p, int *idx, int def)); +! #if defined(HAVE_LOCALE_H) || defined(X_LOCALE) + static void init_locale __ARGS((void)); +! #endif + static void parse_command_name __ARGS((mparm_T *parmp)); + static void early_arg_scan __ARGS((mparm_T *parmp)); + static void command_line_scan __ARGS((mparm_T *parmp)); + static void check_tty __ARGS((mparm_T *parmp)); + static void read_stdin __ARGS((void)); + static void create_windows __ARGS((mparm_T *parmp)); +! #ifdef FEAT_WINDOWS + static void edit_buffers __ARGS((mparm_T *parmp)); +! #endif + static void exe_pre_commands __ARGS((mparm_T *parmp)); + static void exe_commands __ARGS((mparm_T *parmp)); + static void source_startup_scripts __ARGS((mparm_T *parmp)); + static void main_start_gui __ARGS((void)); +! #if defined(HAS_SWAP_EXISTS_ACTION) + static void check_swap_exists_action __ARGS((void)); +! #endif +! #ifdef FEAT_CLIENTSERVER + static void exec_on_server __ARGS((mparm_T *parmp)); + static void prepare_server __ARGS((mparm_T *parmp)); + static void cmdsrv_main __ARGS((int *argc, char **argv, char_u *serverName_arg, char_u **serverStr)); + static char_u *serverMakeName __ARGS((char_u *arg, char *cmd)); + #endif + + +--- 92,130 ---- + #define EDIT_TAG 3 /* tag name argument given, use tagname */ + #define EDIT_QF 4 /* start in quickfix mode */ + +! #if (defined(UNIX) || defined(VMS)) && !defined(NO_VIM_MAIN) + static int file_owned __ARGS((char *fname)); + #endif + static void mainerr __ARGS((int, char_u *)); ++ #ifndef NO_VIM_MAIN + static void main_msg __ARGS((char *s)); + static void usage __ARGS((void)); + static int get_number_arg __ARGS((char_u *p, int *idx, int def)); +! # if defined(HAVE_LOCALE_H) || defined(X_LOCALE) + static void init_locale __ARGS((void)); +! # endif + static void parse_command_name __ARGS((mparm_T *parmp)); + static void early_arg_scan __ARGS((mparm_T *parmp)); + static void command_line_scan __ARGS((mparm_T *parmp)); + static void check_tty __ARGS((mparm_T *parmp)); + static void read_stdin __ARGS((void)); + static void create_windows __ARGS((mparm_T *parmp)); +! # ifdef FEAT_WINDOWS + static void edit_buffers __ARGS((mparm_T *parmp)); +! # endif + static void exe_pre_commands __ARGS((mparm_T *parmp)); + static void exe_commands __ARGS((mparm_T *parmp)); + static void source_startup_scripts __ARGS((mparm_T *parmp)); + static void main_start_gui __ARGS((void)); +! # if defined(HAS_SWAP_EXISTS_ACTION) + static void check_swap_exists_action __ARGS((void)); +! # endif +! # if defined(FEAT_CLIENTSERVER) || defined(PROTO) + static void exec_on_server __ARGS((mparm_T *parmp)); + static void prepare_server __ARGS((mparm_T *parmp)); + static void cmdsrv_main __ARGS((int *argc, char **argv, char_u *serverName_arg, char_u **serverStr)); + static char_u *serverMakeName __ARGS((char_u *arg, char *cmd)); ++ # endif + #endif + + +*************** +*** 145,151 **** + #define ME_INVALID_ARG 5 + }; + +! #ifndef PROTO /* don't want a prototype for main() */ + int + # ifdef VIMDLL + _export +--- 147,154 ---- + #define ME_INVALID_ARG 5 + }; + +! #ifndef NO_VIM_MAIN /* skip this for unittests */ +! #ifndef PROTO /* don't want a prototype for main() */ + int + # ifdef VIMDLL + _export +*************** +*** 966,971 **** +--- 969,975 ---- + return 0; + } + #endif /* PROTO */ ++ #endif /* NO_VIM_MAIN */ + + /* + * Main loop: Execute Normal mode commands until exiting Vim. +*************** +*** 1430,1435 **** +--- 1434,1440 ---- + mch_exit(exitval); + } + ++ #ifndef NO_VIM_MAIN + /* + * Get a (optional) count for a Vim argument. + */ +*************** +*** 2994,2999 **** +--- 2999,3006 ---- + #endif + } + ++ #endif /* NO_VIM_MAIN */ ++ + /* + * Get an environment variable, and execute it as Ex commands. + * Returns FAIL if the environment variable was not executed, OK otherwise. +*************** +*** 3033,3039 **** + return FAIL; + } + +! #if defined(UNIX) || defined(VMS) + /* + * Return TRUE if we are certain the user owns the file "fname". + * Used for ".vimrc" and ".exrc". +--- 3040,3046 ---- + return FAIL; + } + +! #if (defined(UNIX) || defined(VMS)) && !defined(NO_VIM_MAIN) + /* + * Return TRUE if we are certain the user owns the file "fname". + * Used for ".vimrc" and ".exrc". +*************** +*** 3091,3096 **** +--- 3098,3104 ---- + mainerr(ME_ARG_MISSING, str); + } + ++ #ifndef NO_VIM_MAIN + /* + * print a message with three spaces prepended and '\n' appended. + */ +*************** +*** 3311,3316 **** +--- 3319,3326 ---- + } + #endif + ++ #endif ++ + #if defined(STARTUPTIME) || defined(PROTO) + static void time_diff __ARGS((struct timeval *then, struct timeval *now)); + +*************** +*** 3420,3426 **** + + #endif + +! #if defined(FEAT_CLIENTSERVER) || defined(PROTO) + + /* + * Common code for the X command server and the Win32 command server. +--- 3430,3436 ---- + + #endif + +! #if (defined(FEAT_CLIENTSERVER) && !defined(NO_VIM_MAIN)) || defined(PROTO) + + /* + * Common code for the X command server and the Win32 command server. +*************** +*** 3888,3893 **** +--- 3898,3929 ---- + } + + /* ++ * Make our basic server name: use the specified "arg" if given, otherwise use ++ * the tail of the command "cmd" we were started with. ++ * Return the name in allocated memory. This doesn't include a serial number. ++ */ ++ static char_u * ++ serverMakeName(arg, cmd) ++ char_u *arg; ++ char *cmd; ++ { ++ char_u *p; ++ ++ if (arg != NULL && *arg != NUL) ++ p = vim_strsave_up(arg); ++ else ++ { ++ p = vim_strsave_up(gettail((char_u *)cmd)); ++ /* Remove .exe or .bat from the name. */ ++ if (p != NULL && vim_strchr(p, '.') != NULL) ++ *vim_strchr(p, '.') = NUL; ++ } ++ return p; ++ } ++ #endif /* FEAT_CLIENTSERVER */ ++ ++ #if defined(FEAT_CLIENTSERVER) || defined(PROTO) ++ /* + * Replace termcodes such as and insert as key presses if there is room. + */ + void +*************** +*** 3998,4029 **** + # endif + return res; + } +! +! +! /* +! * Make our basic server name: use the specified "arg" if given, otherwise use +! * the tail of the command "cmd" we were started with. +! * Return the name in allocated memory. This doesn't include a serial number. +! */ +! static char_u * +! serverMakeName(arg, cmd) +! char_u *arg; +! char *cmd; +! { +! char_u *p; +! +! if (arg != NULL && *arg != NUL) +! p = vim_strsave_up(arg); +! else +! { +! p = vim_strsave_up(gettail((char_u *)cmd)); +! /* Remove .exe or .bat from the name. */ +! if (p != NULL && vim_strchr(p, '.') != NULL) +! *vim_strchr(p, '.') = NUL; +! } +! return p; +! } +! #endif /* FEAT_CLIENTSERVER */ + + /* + * When FEAT_FKMAP is defined, also compile the Farsi source code. +--- 4034,4040 ---- + # endif + return res; + } +! #endif + + /* + * When FEAT_FKMAP is defined, also compile the Farsi source code. +*** ../vim-7.3.142/src/memfile.c 2010-12-17 18:06:00.000000000 +0100 +--- src/memfile.c 2011-03-03 18:47:39.000000000 +0100 +*************** +*** 84,89 **** +--- 84,96 ---- + static int mf_write_block __ARGS((memfile_T *mfp, bhdr_T *hp, off_t offset, unsigned size)); + static int mf_trans_add __ARGS((memfile_T *, bhdr_T *)); + static void mf_do_open __ARGS((memfile_T *, char_u *, int)); ++ static void mf_hash_init __ARGS((mf_hashtab_T *)); ++ static void mf_hash_free __ARGS((mf_hashtab_T *)); ++ static void mf_hash_free_all __ARGS((mf_hashtab_T *)); ++ static mf_hashitem_T *mf_hash_find __ARGS((mf_hashtab_T *, blocknr_T)); ++ static void mf_hash_add_item __ARGS((mf_hashtab_T *, mf_hashitem_T *)); ++ static void mf_hash_rem_item __ARGS((mf_hashtab_T *, mf_hashitem_T *)); ++ static int mf_hash_grow __ARGS((mf_hashtab_T *)); + + /* + * The functions for using a memfile: +*************** +*** 119,125 **** + int flags; + { + memfile_T *mfp; +- int i; + off_t size; + #if defined(STATFS) && defined(UNIX) && !defined(__QNX__) + # define USE_FSTATFS +--- 126,131 ---- +*************** +*** 152,162 **** + mfp->mf_used_last = NULL; + mfp->mf_dirty = FALSE; + mfp->mf_used_count = 0; +! for (i = 0; i < MEMHASHSIZE; ++i) +! { +! mfp->mf_hash[i] = NULL; /* hash lists are empty */ +! mfp->mf_trans[i] = NULL; /* trans lists are empty */ +! } + mfp->mf_page_size = MEMFILE_PAGE_SIZE; + #ifdef FEAT_CRYPT + mfp->mf_old_key = NULL; +--- 158,165 ---- + mfp->mf_used_last = NULL; + mfp->mf_dirty = FALSE; + mfp->mf_used_count = 0; +! mf_hash_init(&mfp->mf_hash); +! mf_hash_init(&mfp->mf_trans); + mfp->mf_page_size = MEMFILE_PAGE_SIZE; + #ifdef FEAT_CRYPT + mfp->mf_old_key = NULL; +*************** +*** 242,249 **** + int del_file; + { + bhdr_T *hp, *nextp; +- NR_TRANS *tp, *tpnext; +- int i; + + if (mfp == NULL) /* safety check */ + return; +--- 245,250 ---- +*************** +*** 263,274 **** + } + while (mfp->mf_free_first != NULL) /* free entries in free list */ + vim_free(mf_rem_free(mfp)); +! for (i = 0; i < MEMHASHSIZE; ++i) /* free entries in trans lists */ +! for (tp = mfp->mf_trans[i]; tp != NULL; tp = tpnext) +! { +! tpnext = tp->nt_next; +! vim_free(tp); +! } + vim_free(mfp->mf_fname); + vim_free(mfp->mf_ffname); + vim_free(mfp); +--- 264,271 ---- + } + while (mfp->mf_free_first != NULL) /* free entries in free list */ + vim_free(mf_rem_free(mfp)); +! mf_hash_free(&mfp->mf_hash); +! mf_hash_free_all(&mfp->mf_trans); /* free hashtable and its items */ + vim_free(mfp->mf_fname); + vim_free(mfp->mf_ffname); + vim_free(mfp); +*************** +*** 743,758 **** + memfile_T *mfp; + bhdr_T *hp; + { +! bhdr_T *hhp; +! int hash; +! +! hash = MEMHASH(hp->bh_bnum); +! hhp = mfp->mf_hash[hash]; +! hp->bh_hash_next = hhp; +! hp->bh_hash_prev = NULL; +! if (hhp != NULL) +! hhp->bh_hash_prev = hp; +! mfp->mf_hash[hash] = hp; + } + + /* +--- 740,746 ---- + memfile_T *mfp; + bhdr_T *hp; + { +! mf_hash_add_item(&mfp->mf_hash, (mf_hashitem_T *)hp); + } + + /* +*************** +*** 763,775 **** + memfile_T *mfp; + bhdr_T *hp; + { +! if (hp->bh_hash_prev == NULL) +! mfp->mf_hash[MEMHASH(hp->bh_bnum)] = hp->bh_hash_next; +! else +! hp->bh_hash_prev->bh_hash_next = hp->bh_hash_next; +! +! if (hp->bh_hash_next) +! hp->bh_hash_next->bh_hash_prev = hp->bh_hash_prev; + } + + /* +--- 751,757 ---- + memfile_T *mfp; + bhdr_T *hp; + { +! mf_hash_rem_item(&mfp->mf_hash, (mf_hashitem_T *)hp); + } + + /* +*************** +*** 780,791 **** + memfile_T *mfp; + blocknr_T nr; + { +! bhdr_T *hp; +! +! for (hp = mfp->mf_hash[MEMHASH(nr)]; hp != NULL; hp = hp->bh_hash_next) +! if (hp->bh_bnum == nr) +! break; +! return hp; + } + + /* +--- 762,768 ---- + memfile_T *mfp; + blocknr_T nr; + { +! return (bhdr_T *)mf_hash_find(&mfp->mf_hash, nr); + } + + /* +*************** +*** 1187,1193 **** + { + bhdr_T *freep; + blocknr_T new_bnum; +- int hash; + NR_TRANS *np; + int page_count; + +--- 1164,1169 ---- +*************** +*** 1235,1246 **** + hp->bh_bnum = new_bnum; + mf_ins_hash(mfp, hp); /* insert in new hash list */ + +! hash = MEMHASH(np->nt_old_bnum); /* insert in trans list */ +! np->nt_next = mfp->mf_trans[hash]; +! mfp->mf_trans[hash] = np; +! if (np->nt_next != NULL) +! np->nt_next->nt_prev = np; +! np->nt_prev = NULL; + + return OK; + } +--- 1211,1218 ---- + hp->bh_bnum = new_bnum; + mf_ins_hash(mfp, hp); /* insert in new hash list */ + +! /* Insert "np" into "mf_trans" hashtable with key "np->nt_old_bnum" */ +! mf_hash_add_item(&mfp->mf_trans, (mf_hashitem_T *)np); + + return OK; + } +*************** +*** 1255,1279 **** + memfile_T *mfp; + blocknr_T old_nr; + { +- int hash; + NR_TRANS *np; + blocknr_T new_bnum; + +! hash = MEMHASH(old_nr); +! for (np = mfp->mf_trans[hash]; np != NULL; np = np->nt_next) +! if (np->nt_old_bnum == old_nr) +! break; + if (np == NULL) /* not found */ + return old_nr; + + mfp->mf_neg_count--; + new_bnum = np->nt_new_bnum; +! if (np->nt_prev != NULL) /* remove entry from the trans list */ +! np->nt_prev->nt_next = np->nt_next; +! else +! mfp->mf_trans[hash] = np->nt_next; +! if (np->nt_next != NULL) +! np->nt_next->nt_prev = np->nt_prev; + vim_free(np); + + return new_bnum; +--- 1227,1246 ---- + memfile_T *mfp; + blocknr_T old_nr; + { + NR_TRANS *np; + blocknr_T new_bnum; + +! np = (NR_TRANS *)mf_hash_find(&mfp->mf_trans, old_nr); +! + if (np == NULL) /* not found */ + return old_nr; + + mfp->mf_neg_count--; + new_bnum = np->nt_new_bnum; +! +! /* remove entry from the trans list */ +! mf_hash_rem_item(&mfp->mf_trans, (mf_hashitem_T *)np); +! + vim_free(np); + + return new_bnum; +*************** +*** 1397,1399 **** +--- 1364,1570 ---- + mch_hide(mfp->mf_fname); /* try setting the 'hidden' flag */ + } + } ++ ++ /* ++ * Implementation of mf_hashtab_T follows. ++ */ ++ ++ /* ++ * The number of buckets in the hashtable is increased by a factor of ++ * MHT_GROWTH_FACTOR when the average number of items per bucket ++ * exceeds 2 ^ MHT_LOG_LOAD_FACTOR. ++ */ ++ #define MHT_LOG_LOAD_FACTOR 6 ++ #define MHT_GROWTH_FACTOR 2 /* must be a power of two */ ++ ++ /* ++ * Initialize an empty hash table. ++ */ ++ static void ++ mf_hash_init(mht) ++ mf_hashtab_T *mht; ++ { ++ vim_memset(mht, 0, sizeof(mf_hashtab_T)); ++ mht->mht_buckets = mht->mht_small_buckets; ++ mht->mht_mask = MHT_INIT_SIZE - 1; ++ } ++ ++ /* ++ * Free the array of a hash table. Does not free the items it contains! ++ * The hash table must not be used again without another mf_hash_init() call. ++ */ ++ static void ++ mf_hash_free(mht) ++ mf_hashtab_T *mht; ++ { ++ if (mht->mht_buckets != mht->mht_small_buckets) ++ vim_free(mht->mht_buckets); ++ } ++ ++ /* ++ * Free the array of a hash table and all the items it contains. ++ */ ++ static void ++ mf_hash_free_all(mht) ++ mf_hashtab_T *mht; ++ { ++ long_u idx; ++ mf_hashitem_T *mhi; ++ mf_hashitem_T *next; ++ ++ for (idx = 0; idx <= mht->mht_mask; idx++) ++ for (mhi = mht->mht_buckets[idx]; mhi != NULL; mhi = next) ++ { ++ next = mhi->mhi_next; ++ vim_free(mhi); ++ } ++ ++ mf_hash_free(mht); ++ } ++ ++ /* ++ * Find "key" in hashtable "mht". ++ * Returns a pointer to a mf_hashitem_T or NULL if the item was not found. ++ */ ++ static mf_hashitem_T * ++ mf_hash_find(mht, key) ++ mf_hashtab_T *mht; ++ blocknr_T key; ++ { ++ mf_hashitem_T *mhi; ++ ++ mhi = mht->mht_buckets[key & mht->mht_mask]; ++ while (mhi != NULL && mhi->mhi_key != key) ++ mhi = mhi->mhi_next; ++ ++ return mhi; ++ } ++ ++ /* ++ * Add item "mhi" to hashtable "mht". ++ * "mhi" must not be NULL. ++ */ ++ static void ++ mf_hash_add_item(mht, mhi) ++ mf_hashtab_T *mht; ++ mf_hashitem_T *mhi; ++ { ++ long_u idx; ++ ++ idx = mhi->mhi_key & mht->mht_mask; ++ mhi->mhi_next = mht->mht_buckets[idx]; ++ mhi->mhi_prev = NULL; ++ if (mhi->mhi_next != NULL) ++ mhi->mhi_next->mhi_prev = mhi; ++ mht->mht_buckets[idx] = mhi; ++ ++ mht->mht_count++; ++ ++ /* ++ * Grow hashtable when we have more thank 2^MHT_LOG_LOAD_FACTOR ++ * items per bucket on average ++ */ ++ if (mht->mht_fixed == 0 ++ && (mht->mht_count >> MHT_LOG_LOAD_FACTOR) > mht->mht_mask) ++ { ++ if (mf_hash_grow(mht) == FAIL) ++ { ++ /* stop trying to grow after first failure to allocate memory */ ++ mht->mht_fixed = 1; ++ } ++ } ++ } ++ ++ /* ++ * Remove item "mhi" from hashtable "mht". ++ * "mhi" must not be NULL and must have been inserted into "mht". ++ */ ++ static void ++ mf_hash_rem_item(mht, mhi) ++ mf_hashtab_T *mht; ++ mf_hashitem_T *mhi; ++ { ++ if (mhi->mhi_prev == NULL) ++ mht->mht_buckets[mhi->mhi_key & mht->mht_mask] = mhi->mhi_next; ++ else ++ mhi->mhi_prev->mhi_next = mhi->mhi_next; ++ ++ if (mhi->mhi_next != NULL) ++ mhi->mhi_next->mhi_prev = mhi->mhi_prev; ++ ++ mht->mht_count--; ++ ++ /* We could shrink the table here, but it typically takes little memory, ++ * so why bother? */ ++ } ++ ++ /* ++ * Increase number of buckets in the hashtable by MHT_GROWTH_FACTOR and ++ * rehash items. ++ * Returns FAIL when out of memory. ++ */ ++ static int ++ mf_hash_grow(mht) ++ mf_hashtab_T *mht; ++ { ++ long_u i, j; ++ int shift; ++ mf_hashitem_T *mhi; ++ mf_hashitem_T *tails[MHT_GROWTH_FACTOR]; ++ mf_hashitem_T **buckets; ++ size_t size; ++ ++ size = (mht->mht_mask + 1) * MHT_GROWTH_FACTOR * sizeof(void *); ++ buckets = (mf_hashitem_T **)lalloc_clear(size, FALSE); ++ if (buckets == NULL) ++ return FAIL; ++ ++ shift = 0; ++ while ((mht->mht_mask >> shift) != 0) ++ shift++; ++ ++ for (i = 0; i <= mht->mht_mask; i++) ++ { ++ /* ++ * Traverse the items in the i-th original bucket and move them into ++ * MHT_GROWTH_FACTOR new buckets, preserving their relative order ++ * within each new bucket. Preserving the order is important because ++ * mf_get() tries to keep most recently used items at the front of ++ * each bucket. ++ * ++ * Here we strongly rely on the fact the hashes are computed modulo ++ * a power of two. ++ */ ++ ++ vim_memset(tails, 0, sizeof(tails)); ++ ++ for (mhi = mht->mht_buckets[i]; mhi != NULL; mhi = mhi->mhi_next) ++ { ++ j = (mhi->mhi_key >> shift) & (MHT_GROWTH_FACTOR - 1); ++ if (tails[j] == NULL) ++ { ++ buckets[i + (j << shift)] = mhi; ++ tails[j] = mhi; ++ mhi->mhi_prev = NULL; ++ } ++ else ++ { ++ tails[j]->mhi_next = mhi; ++ mhi->mhi_prev = tails[j]; ++ tails[j] = mhi; ++ } ++ } ++ ++ for (j = 0; j < MHT_GROWTH_FACTOR; j++) ++ if (tails[j] != NULL) ++ tails[j]->mhi_next = NULL; ++ } ++ ++ if (mht->mht_buckets != mht->mht_small_buckets) ++ vim_free(mht->mht_buckets); ++ ++ mht->mht_buckets = buckets; ++ mht->mht_mask = (mht->mht_mask + 1) * MHT_GROWTH_FACTOR - 1; ++ ++ return OK; ++ } +*** ../vim-7.3.142/src/memfile_test.c 2011-03-03 21:58:14.000000000 +0100 +--- src/memfile_test.c 2011-03-03 20:40:29.000000000 +0100 +*************** +*** 0 **** +--- 1,145 ---- ++ /* vi:set ts=8 sts=4 sw=4: ++ * ++ * VIM - Vi IMproved by Bram Moolenaar ++ * ++ * Do ":help uganda" in Vim to read copying and usage conditions. ++ * Do ":help credits" in Vim to see a list of people who contributed. ++ * See README.txt for an overview of the Vim source code. ++ */ ++ ++ /* ++ * memfile_test.c: Unittests for memfile.c ++ * Mostly by Ivan Krasilnikov. ++ */ ++ ++ #undef NDEBUG ++ #include ++ ++ /* Must include main.c because it contains much more than just main() */ ++ #define NO_VIM_MAIN ++ #include "main.c" ++ ++ /* This file has to be included because the tested functions are static */ ++ #include "memfile.c" ++ ++ #define index_to_key(i) ((i) ^ 15167) ++ #define TEST_COUNT 50000 ++ ++ static void test_mf_hash __ARGS((void)); ++ ++ /* ++ * Test mf_hash_*() functions. ++ */ ++ static void ++ test_mf_hash() ++ { ++ mf_hashtab_T ht; ++ mf_hashitem_T *item; ++ blocknr_T key; ++ long_u i; ++ long_u num_buckets; ++ ++ mf_hash_init(&ht); ++ ++ /* insert some items and check invariants */ ++ for (i = 0; i < TEST_COUNT; i++) ++ { ++ assert(ht.mht_count == i); ++ ++ /* check that number of buckets is a power of 2 */ ++ num_buckets = ht.mht_mask + 1; ++ assert(num_buckets > 0 && (num_buckets & (num_buckets - 1)) == 0); ++ ++ /* check load factor */ ++ assert(ht.mht_count <= (num_buckets << MHT_LOG_LOAD_FACTOR)); ++ ++ if (i < (MHT_INIT_SIZE << MHT_LOG_LOAD_FACTOR)) ++ { ++ /* first expansion shouldn't have occurred yet */ ++ assert(num_buckets == MHT_INIT_SIZE); ++ assert(ht.mht_buckets == ht.mht_small_buckets); ++ } ++ else ++ { ++ assert(num_buckets > MHT_INIT_SIZE); ++ assert(ht.mht_buckets != ht.mht_small_buckets); ++ } ++ ++ key = index_to_key(i); ++ assert(mf_hash_find(&ht, key) == NULL); ++ ++ /* allocate and add new item */ ++ item = (mf_hashitem_T *)lalloc_clear(sizeof(mf_hashtab_T), FALSE); ++ assert(item != NULL); ++ item->mhi_key = key; ++ mf_hash_add_item(&ht, item); ++ ++ assert(mf_hash_find(&ht, key) == item); ++ ++ if (ht.mht_mask + 1 != num_buckets) ++ { ++ /* hash table was expanded */ ++ assert(ht.mht_mask + 1 == num_buckets * MHT_GROWTH_FACTOR); ++ assert(i + 1 == (num_buckets << MHT_LOG_LOAD_FACTOR)); ++ } ++ } ++ ++ /* check presence of inserted items */ ++ for (i = 0; i < TEST_COUNT; i++) ++ { ++ key = index_to_key(i); ++ item = mf_hash_find(&ht, key); ++ assert(item != NULL); ++ assert(item->mhi_key == key); ++ } ++ ++ /* delete some items */ ++ for (i = 0; i < TEST_COUNT; i++) ++ { ++ if (i % 100 < 70) ++ { ++ key = index_to_key(i); ++ item = mf_hash_find(&ht, key); ++ assert(item != NULL); ++ assert(item->mhi_key == key); ++ ++ mf_hash_rem_item(&ht, item); ++ assert(mf_hash_find(&ht, key) == NULL); ++ ++ mf_hash_add_item(&ht, item); ++ assert(mf_hash_find(&ht, key) == item); ++ ++ mf_hash_rem_item(&ht, item); ++ assert(mf_hash_find(&ht, key) == NULL); ++ ++ vim_free(item); ++ } ++ } ++ ++ /* check again */ ++ for (i = 0; i < TEST_COUNT; i++) ++ { ++ key = index_to_key(i); ++ item = mf_hash_find(&ht, key); ++ ++ if (i % 100 < 70) ++ { ++ assert(item == NULL); ++ } ++ else ++ { ++ assert(item != NULL); ++ assert(item->mhi_key == key); ++ } ++ } ++ ++ /* free hash table and all remaining items */ ++ mf_hash_free_all(&ht); ++ } ++ ++ int ++ main() ++ { ++ test_mf_hash(); ++ return 0; ++ } +*** ../vim-7.3.142/src/structs.h 2011-02-15 17:39:14.000000000 +0100 +--- src/structs.h 2011-03-03 18:49:01.000000000 +0100 +*************** +*** 378,383 **** +--- 378,412 ---- + typedef long blocknr_T; + + /* ++ * mf_hashtab_T is a chained hashtable with blocknr_T key and arbitrary ++ * structures as items. This is an intrusive data structure: we require ++ * that items begin with mf_hashitem_T which contains the key and linked ++ * list pointers. List of items in each bucket is doubly-linked. ++ */ ++ ++ typedef struct mf_hashitem_S mf_hashitem_T; ++ ++ struct mf_hashitem_S ++ { ++ mf_hashitem_T *mhi_next; ++ mf_hashitem_T *mhi_prev; ++ blocknr_T mhi_key; ++ }; ++ ++ #define MHT_INIT_SIZE 64 ++ ++ typedef struct mf_hashtab_S ++ { ++ long_u mht_mask; /* mask used for hash value (nr of items ++ * in array is "mht_mask" + 1) */ ++ long_u mht_count; /* nr of items inserted into hashtable */ ++ mf_hashitem_T **mht_buckets; /* points to mht_small_buckets or ++ *dynamically allocated array */ ++ mf_hashitem_T *mht_small_buckets[MHT_INIT_SIZE]; /* initial buckets */ ++ char mht_fixed; /* non-zero value forbids growth */ ++ } mf_hashtab_T; ++ ++ /* + * for each (previously) used block in the memfile there is one block header. + * + * The block may be linked in the used list OR in the free list. +*************** +*** 394,404 **** + + struct block_hdr + { + bhdr_T *bh_next; /* next block_hdr in free or used list */ + bhdr_T *bh_prev; /* previous block_hdr in used list */ +- bhdr_T *bh_hash_next; /* next block_hdr in hash list */ +- bhdr_T *bh_hash_prev; /* previous block_hdr in hash list */ +- blocknr_T bh_bnum; /* block number */ + char_u *bh_data; /* pointer to memory (for used block) */ + int bh_page_count; /* number of pages in this block */ + +--- 423,433 ---- + + struct block_hdr + { ++ mf_hashitem_T bh_hashitem; /* header for hash table and key */ ++ #define bh_bnum bh_hashitem.mhi_key /* block number, part of bh_hashitem */ ++ + bhdr_T *bh_next; /* next block_hdr in free or used list */ + bhdr_T *bh_prev; /* previous block_hdr in used list */ + char_u *bh_data; /* pointer to memory (for used block) */ + int bh_page_count; /* number of pages in this block */ + +*************** +*** 417,425 **** + + struct nr_trans + { +! NR_TRANS *nt_next; /* next nr_trans in hash list */ +! NR_TRANS *nt_prev; /* previous nr_trans in hash list */ +! blocknr_T nt_old_bnum; /* old, negative, number */ + blocknr_T nt_new_bnum; /* new, positive, number */ + }; + +--- 446,454 ---- + + struct nr_trans + { +! mf_hashitem_T nt_hashitem; /* header for hash table and key */ +! #define nt_old_bnum nt_hashitem.mhi_key /* old, negative, number */ +! + blocknr_T nt_new_bnum; /* new, positive, number */ + }; + +*************** +*** 499,510 **** + + typedef struct file_buffer buf_T; /* forward declaration */ + +- /* +- * Simplistic hashing scheme to quickly locate the blocks in the used list. +- * 64 blocks are found directly (64 * 4K = 256K, most files are smaller). +- */ +- #define MEMHASHSIZE 64 +- #define MEMHASH(nr) ((nr) & (MEMHASHSIZE - 1)) + #define MF_SEED_LEN 8 + + struct memfile +--- 528,533 ---- +*************** +*** 517,524 **** + bhdr_T *mf_used_last; /* lru block_hdr in used list */ + unsigned mf_used_count; /* number of pages in used list */ + unsigned mf_used_count_max; /* maximum number of pages in memory */ +! bhdr_T *mf_hash[MEMHASHSIZE]; /* array of hash lists */ +! NR_TRANS *mf_trans[MEMHASHSIZE]; /* array of trans lists */ + blocknr_T mf_blocknr_max; /* highest positive block number + 1*/ + blocknr_T mf_blocknr_min; /* lowest negative block number - 1 */ + blocknr_T mf_neg_count; /* number of negative blocks numbers */ +--- 540,547 ---- + bhdr_T *mf_used_last; /* lru block_hdr in used list */ + unsigned mf_used_count; /* number of pages in used list */ + unsigned mf_used_count_max; /* maximum number of pages in memory */ +! mf_hashtab_T mf_hash; /* hash lists */ +! mf_hashtab_T mf_trans; /* trans lists */ + blocknr_T mf_blocknr_max; /* highest positive block number + 1*/ + blocknr_T mf_blocknr_min; /* lowest negative block number - 1 */ + blocknr_T mf_neg_count; /* number of negative blocks numbers */ +*** ../vim-7.3.142/src/testdir/Make_amiga.mak 2010-11-10 16:54:16.000000000 +0100 +--- src/testdir/Make_amiga.mak 2011-03-03 17:04:14.000000000 +0100 +*************** +*** 28,34 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out + + .SUFFIXES: .in .out + +--- 28,34 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out + + .SUFFIXES: .in .out + +*************** +*** 124,126 **** +--- 124,127 ---- + test74.out: test74.in + test75.out: test75.in + test76.out: test76.in ++ test77.out: test77.in +*** ../vim-7.3.142/src/testdir/Make_dos.mak 2010-11-10 16:54:16.000000000 +0100 +--- src/testdir/Make_dos.mak 2011-03-03 17:04:20.000000000 +0100 +*************** +*** 28,34 **** + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out + + SCRIPTS32 = test50.out test70.out + +--- 28,34 ---- + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.142/src/testdir/Make_ming.mak 2010-11-10 16:54:16.000000000 +0100 +--- src/testdir/Make_ming.mak 2011-03-03 17:04:32.000000000 +0100 +*************** +*** 48,54 **** + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out + + SCRIPTS32 = test50.out test70.out + +--- 48,54 ---- + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.142/src/testdir/Make_os2.mak 2010-11-10 16:54:16.000000000 +0100 +--- src/testdir/Make_os2.mak 2011-03-03 17:04:48.000000000 +0100 +*************** +*** 28,34 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out + + .SUFFIXES: .in .out + +--- 28,34 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out + + .SUFFIXES: .in .out + +*** ../vim-7.3.142/src/testdir/Makefile 2010-11-10 16:54:16.000000000 +0100 +--- src/testdir/Makefile 2011-03-22 17:03:25.000000000 +0100 +*************** +*** 25,31 **** + test59.out test60.out test61.out test62.out test63.out \ + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out + + SCRIPTS_GUI = test16.out + +--- 25,31 ---- + test59.out test60.out test61.out test62.out test63.out \ + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out + + SCRIPTS_GUI = test16.out + +*************** +*** 71,77 **** + fi \ + else echo $* NO OUTPUT >>test.log; \ + fi" +! -rm -rf X* test.ok viminfo + + test49.out: test49.vim + +--- 71,77 ---- + fi \ + else echo $* NO OUTPUT >>test.log; \ + fi" +! # -rm -rf X* test.ok viminfo + + test49.out: test49.vim + +*** ../vim-7.3.142/src/testdir/test77.in 2011-03-03 21:59:10.000000000 +0100 +--- src/testdir/test77.in 2011-03-22 17:12:38.000000000 +0100 +*************** +*** 0 **** +--- 1,27 ---- ++ Inserts 2 million lines with consecutive integers starting from 1 ++ (essentially, the output of GNU's seq 1 2000000), writes them to Xtest ++ and writes its cksum to test.out. ++ ++ We need 2 million lines to trigger a call to mf_hash_grow(). If it would mess ++ up the lines the checksum would differ. ++ ++ cksum is part of POSIX and so should be available on most Unixes. ++ If it isn't available then the test will be skipped. ++ ++ STARTTEST ++ :so small.vim ++ :if !executable("cksum") ++ : e! test.ok ++ : w! test.out ++ : qa! ++ :endif ++ :set fileformat=unix undolevels=-1 ++ ggdG ++ :let i = 1 ++ :while i <= 2000000 | call append(i, range(i, i + 99)) | let i += 100 | endwhile ++ ggdd ++ :w! Xtest ++ :!cksum Xtest > test.out ++ :qa! ++ ENDTEST ++ +*** ../vim-7.3.142/src/testdir/test77.ok 2011-03-03 21:59:10.000000000 +0100 +--- src/testdir/test77.ok 2011-03-22 17:10:14.000000000 +0100 +*************** +*** 0 **** +--- 1 ---- ++ 3678979763 14888896 Xtest +*** ../vim-7.3.142/src/version.c 2011-03-22 15:47:18.000000000 +0100 +--- src/version.c 2011-03-22 18:01:48.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 143, + /**/ + +-- +SIGIRO -- irony detected (iron core dumped) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 18d2d56e86526358ce5c9a88510c799e2a1c92a8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0317/3803] Patchlevel 144 --- 7.3.144 | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 7.3.144 diff --git a/7.3.144 b/7.3.144 new file mode 100644 index 00000000..3bdea8da --- /dev/null +++ b/7.3.144 @@ -0,0 +1,80 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.144 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.144 +Problem: Crash with ":python help(dir)". (Kearn Holliday) +Solution: Fix the way the type is set on objects. (Tobias Columbus) +Files: src/if_python.c + + +*** ../vim-7.3.143/src/if_python.c 2010-11-16 19:25:56.000000000 +0100 +--- src/if_python.c 2011-03-26 13:54:22.000000000 +0100 +*************** +*** 780,786 **** + PythonIO_Init(void) + { + /* Fixups... */ +! OutputType.ob_type = &PyType_Type; + + return PythonIO_Init_io(); + } +--- 780,786 ---- + PythonIO_Init(void) + { + /* Fixups... */ +! PyType_Ready(&OutputType); + + return PythonIO_Init_io(); + } +*************** +*** 1402,1413 **** + static char *(argv[2]) = {"/must>not&exist/foo", NULL}; + + /* Fixups... */ +! BufferType.ob_type = &PyType_Type; +! RangeType.ob_type = &PyType_Type; +! WindowType.ob_type = &PyType_Type; +! BufListType.ob_type = &PyType_Type; +! WinListType.ob_type = &PyType_Type; +! CurrentType.ob_type = &PyType_Type; + + /* Set sys.argv[] to avoid a crash in warn(). */ + PySys_SetArgv(1, argv); +--- 1402,1413 ---- + static char *(argv[2]) = {"/must>not&exist/foo", NULL}; + + /* Fixups... */ +! PyType_Ready(&BufferType); +! PyType_Ready(&RangeType); +! PyType_Ready(&WindowType); +! PyType_Ready(&BufListType); +! PyType_Ready(&WinListType); +! PyType_Ready(&CurrentType); + + /* Set sys.argv[] to avoid a crash in warn(). */ + PySys_SetArgv(1, argv); +*** ../vim-7.3.143/src/version.c 2011-03-22 18:10:34.000000000 +0100 +--- src/version.c 2011-03-26 13:56:15.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 144, + /**/ + +-- +The chat program is in public domain. This is not the GNU public license. +If it breaks then you get to keep both pieces. + -- Copyright notice for the chat program + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ed7c160706966ba8a72e35153f75c9ec4f1e9755 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0318/3803] Patchlevel 145 --- 7.3.145 | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 7.3.145 diff --git a/7.3.145 b/7.3.145 new file mode 100644 index 00000000..a435fc28 --- /dev/null +++ b/7.3.145 @@ -0,0 +1,64 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.145 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.145 (after 7.3.144) +Problem: Can't build with Python dynamically loading. +Solution: Add dll_PyType_Ready. +Files: src/if_python.c + + +*** ../vim-7.3.144/src/if_python.c 2011-03-26 13:56:41.000000000 +0100 +--- src/if_python.c 2011-03-26 18:10:00.000000000 +0100 +*************** +*** 165,170 **** +--- 165,171 ---- + # define PySys_SetObject dll_PySys_SetObject + # define PySys_SetArgv dll_PySys_SetArgv + # define PyType_Type (*dll_PyType_Type) ++ # define PyType_Ready (*dll_PyType_Ready) + # define Py_BuildValue dll_Py_BuildValue + # define Py_FindMethod dll_Py_FindMethod + # define Py_InitModule4 dll_Py_InitModule4 +*************** +*** 224,229 **** +--- 225,231 ---- + static int(*dll_PySys_SetObject)(char *, PyObject *); + static int(*dll_PySys_SetArgv)(int, char **); + static PyTypeObject* dll_PyType_Type; ++ static int (*dll_PyType_Ready)(PyTypeObject *type); + static PyObject*(*dll_Py_BuildValue)(char *, ...); + static PyObject*(*dll_Py_FindMethod)(struct PyMethodDef[], PyObject *, char *); + static PyObject*(*dll_Py_InitModule4)(char *, struct PyMethodDef *, char *, PyObject *, int); +*************** +*** 305,310 **** +--- 307,313 ---- + {"PySys_SetObject", (PYTHON_PROC*)&dll_PySys_SetObject}, + {"PySys_SetArgv", (PYTHON_PROC*)&dll_PySys_SetArgv}, + {"PyType_Type", (PYTHON_PROC*)&dll_PyType_Type}, ++ {"PyType_Ready", (PYTHON_PROC*)&dll_PyType_Ready}, + {"Py_BuildValue", (PYTHON_PROC*)&dll_Py_BuildValue}, + {"Py_FindMethod", (PYTHON_PROC*)&dll_Py_FindMethod}, + # if (PY_VERSION_HEX >= 0x02050000) && SIZEOF_SIZE_T != SIZEOF_INT +*** ../vim-7.3.144/src/version.c 2011-03-26 13:56:41.000000000 +0100 +--- src/version.c 2011-03-26 18:11:19.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 145, + /**/ + +-- +This message contains 78% recycled characters. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From af68e8a2c61e5018e3a1b48f9564a15968197003 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0319/3803] Patchlevel 146 --- 7.3.146 | 224 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 7.3.146 diff --git a/7.3.146 b/7.3.146 new file mode 100644 index 00000000..0a7390ce --- /dev/null +++ b/7.3.146 @@ -0,0 +1,224 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.146 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.146 +Problem: It's possible to assign to a read-only member of a dict. + It's possible to create a global variable "0". (ZyX) + It's possible to add a v: variable with ":let v:.name = 1". +Solution: Add check for dict item being read-only. + Check the name of g: variables. + Disallow adding v: variables. +Files: src/eval.c + + +*** ../vim-7.3.145/src/eval.c 2011-02-01 13:48:47.000000000 +0100 +--- src/eval.c 2011-03-27 15:56:44.000000000 +0200 +*************** +*** 789,794 **** +--- 789,796 ---- + static void set_var __ARGS((char_u *name, typval_T *varp, int copy)); + static int var_check_ro __ARGS((int flags, char_u *name)); + static int var_check_fixed __ARGS((int flags, char_u *name)); ++ static int var_check_func_name __ARGS((char_u *name, int new_var)); ++ static int valid_varname __ARGS((char_u *varname)); + static int tv_check_lock __ARGS((int lock, char_u *name)); + static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int copyID)); + static char_u *find_option_end __ARGS((char_u **arg, int *opt_flags)); +*************** +*** 2716,2723 **** +--- 2718,2744 ---- + lp->ll_list = NULL; + lp->ll_dict = lp->ll_tv->vval.v_dict; + lp->ll_di = dict_find(lp->ll_dict, key, len); ++ ++ /* When assigning to g: check that a function and variable name is ++ * valid. */ ++ if (rettv != NULL && lp->ll_dict == &globvardict) ++ { ++ if (rettv->v_type == VAR_FUNC ++ && var_check_func_name(key, lp->ll_di == NULL)) ++ return NULL; ++ if (!valid_varname(key)) ++ return NULL; ++ } ++ + if (lp->ll_di == NULL) + { ++ /* Can't add "v:" variable. */ ++ if (lp->ll_dict == &vimvardict) ++ { ++ EMSG2(_(e_illvar), name); ++ return NULL; ++ } ++ + /* Key does not exist in dict: may need to add it. */ + if (*p == '[' || *p == '.' || unlet) + { +*************** +*** 2737,2742 **** +--- 2758,2767 ---- + p = NULL; + break; + } ++ /* existing variable, need to check if it can be changed */ ++ else if (var_check_ro(lp->ll_di->di_flags, name)) ++ return NULL; ++ + if (len == -1) + clear_tv(&var1); + lp->ll_tv = &lp->ll_di->di_tv; +*************** +*** 19786,19792 **** + dictitem_T *v; + char_u *varname; + hashtab_T *ht; +- char_u *p; + + ht = find_var_ht(name, &varname); + if (ht == NULL || *varname == NUL) +--- 19811,19816 ---- +*************** +*** 19796,19820 **** + } + v = find_var_in_ht(ht, varname, TRUE); + +! if (tv->v_type == VAR_FUNC) +! { +! if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':') +! && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') +! ? name[2] : name[0])) +! { +! EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name); +! return; +! } +! /* Don't allow hiding a function. When "v" is not NULL we might be +! * assigning another function to the same var, the type is checked +! * below. */ +! if (v == NULL && function_exists(name)) +! { +! EMSG2(_("E705: Variable name conflicts with existing function: %s"), +! name); +! return; +! } +! } + + if (v != NULL) + { +--- 19820,19827 ---- + } + v = find_var_in_ht(ht, varname, TRUE); + +! if (tv->v_type == VAR_FUNC && var_check_func_name(name, v == NULL)) +! return; + + if (v != NULL) + { +*************** +*** 19880,19892 **** + } + + /* Make sure the variable name is valid. */ +! for (p = varname; *p != NUL; ++p) +! if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p)) +! && *p != AUTOLOAD_CHAR) +! { +! EMSG2(_(e_illvar), varname); +! return; +! } + + v = (dictitem_T *)alloc((unsigned)(sizeof(dictitem_T) + + STRLEN(varname))); +--- 19887,19894 ---- + } + + /* Make sure the variable name is valid. */ +! if (!valid_varname(varname)) +! return; + + v = (dictitem_T *)alloc((unsigned)(sizeof(dictitem_T) + + STRLEN(varname))); +*************** +*** 19951,19956 **** +--- 19953,20007 ---- + } + + /* ++ * Check if a funcref is assigned to a valid variable name. ++ * Return TRUE and give an error if not. ++ */ ++ static int ++ var_check_func_name(name, new_var) ++ char_u *name; /* points to start of variable name */ ++ int new_var; /* TRUE when creating the variable */ ++ { ++ if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':') ++ && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') ++ ? name[2] : name[0])) ++ { ++ EMSG2(_("E704: Funcref variable name must start with a capital: %s"), ++ name); ++ return TRUE; ++ } ++ /* Don't allow hiding a function. When "v" is not NULL we might be ++ * assigning another function to the same var, the type is checked ++ * below. */ ++ if (new_var && function_exists(name)) ++ { ++ EMSG2(_("E705: Variable name conflicts with existing function: %s"), ++ name); ++ return TRUE; ++ } ++ return FALSE; ++ } ++ ++ /* ++ * Check if a variable name is valid. ++ * Return FALSE and give an error if not. ++ */ ++ static int ++ valid_varname(varname) ++ char_u *varname; ++ { ++ char_u *p; ++ ++ for (p = varname; *p != NUL; ++p) ++ if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p)) ++ && *p != AUTOLOAD_CHAR) ++ { ++ EMSG2(_(e_illvar), varname); ++ return FALSE; ++ } ++ return TRUE; ++ } ++ ++ /* + * Return TRUE if typeval "tv" is set to be locked (immutable). + * Also give an error message, using "name". + */ +*** ../vim-7.3.145/src/version.c 2011-03-26 18:32:00.000000000 +0100 +--- src/version.c 2011-03-27 16:01:03.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 146, + /**/ + +-- +ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of Camelot. + King of all Britons, defeator of the Saxons, sovereign of all England! + [Pause] +SOLDIER: Get away! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e1950acda4a3c3f91e90e36dbef819227794dd33 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0320/3803] Patchlevel 147 --- 7.3.147 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 7.3.147 diff --git a/7.3.147 b/7.3.147 new file mode 100644 index 00000000..b6fd756a --- /dev/null +++ b/7.3.147 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.147 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.147 (after 7.3.143) +Problem: Can't build on HP-UX. +Solution: Remove an unnecessary backslash. (John Marriott) +Files: src/Makefile + + +*** ../vim-7.3.146/src/Makefile 2011-03-22 18:10:34.000000000 +0100 +--- src/Makefile 2011-04-01 13:00:58.000000000 +0200 +*************** +*** 1565,1571 **** + + OBJ = $(OBJ_COMMON) \ + objects/main.o \ +! objects/memfile.o \ + + MEMFILE_TEST_OBJ = $(OBJ_COMMON) \ + objects/memfile_test.o +--- 1565,1571 ---- + + OBJ = $(OBJ_COMMON) \ + objects/main.o \ +! objects/memfile.o + + MEMFILE_TEST_OBJ = $(OBJ_COMMON) \ + objects/memfile_test.o +*** ../vim-7.3.146/src/version.c 2011-03-27 16:03:09.000000000 +0200 +--- src/version.c 2011-04-01 13:05:18.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 147, + /**/ + +-- +DENNIS: You can't expect to wield supreme executive power just 'cause some + watery tart threw a sword at you! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 657f608fd8defe34d86fe322135081a32608fe97 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0321/3803] Patchlevel 148 --- 7.3.148 | 252 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 7.3.148 diff --git a/7.3.148 b/7.3.148 new file mode 100644 index 00000000..30492c0b --- /dev/null +++ b/7.3.148 @@ -0,0 +1,252 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.148 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.148 +Problem: A syntax file with a huge number of items or clusters causes weird + behavior, a hang or a crash. (Yukihiro Nakadaira) +Solution: Check running out of IDs. (partly by Ben Schmidt) +Files: src/syntax.c + + +*** ../vim-7.3.147/src/syntax.c 2011-01-22 00:58:15.000000000 +0100 +--- src/syntax.c 2011-04-01 14:25:39.000000000 +0200 +*************** +*** 219,234 **** + + /* + * Syntax group IDs have different types: +! * 0 - 9999 normal syntax groups +! * 10000 - 14999 ALLBUT indicator (current_syn_inc_tag added) +! * 15000 - 19999 TOP indicator (current_syn_inc_tag added) +! * 20000 - 24999 CONTAINED indicator (current_syn_inc_tag added) +! * >= 25000 cluster IDs (subtract SYNID_CLUSTER for the cluster ID) +! */ +! #define SYNID_ALLBUT 10000 /* syntax group ID for contains=ALLBUT */ +! #define SYNID_TOP 15000 /* syntax group ID for contains=TOP */ +! #define SYNID_CONTAINED 20000 /* syntax group ID for contains=CONTAINED */ +! #define SYNID_CLUSTER 25000 /* first syntax group ID for clusters */ + + /* + * Annoying Hack(TM): ":syn include" needs this pointer to pass to +--- 219,238 ---- + + /* + * Syntax group IDs have different types: +! * 0 - 19999 normal syntax groups +! * 20000 - 20999 ALLBUT indicator (current_syn_inc_tag added) +! * 21000 - 21999 TOP indicator (current_syn_inc_tag added) +! * 22000 - 22999 CONTAINED indicator (current_syn_inc_tag added) +! * 23000 - 32767 cluster IDs (subtract SYNID_CLUSTER for the cluster ID) +! */ +! #define SYNID_ALLBUT 20000 /* syntax group ID for contains=ALLBUT */ +! #define SYNID_TOP 21000 /* syntax group ID for contains=TOP */ +! #define SYNID_CONTAINED 22000 /* syntax group ID for contains=CONTAINED */ +! #define SYNID_CLUSTER 23000 /* first syntax group ID for clusters */ +! +! #define MAX_SYNID SYNID_ALLBUT +! #define MAX_SYN_INC_TAG 999 /* maximum before the above overflow */ +! #define MAX_CLUSTER_ID (32767 - SYNID_CLUSTER) + + /* + * Annoying Hack(TM): ":syn include" needs this pointer to pass to +*************** +*** 3442,3447 **** +--- 3446,3454 ---- + /* free the stored states */ + syn_stack_free_all(block); + invalidate_current_state(); ++ ++ /* Reset the counter for ":syn include" */ ++ running_syn_inc_tag = 0; + } + + /* +*************** +*** 4661,4666 **** +--- 4668,4675 ---- + return; + } + sgl_id = syn_check_cluster(arg, (int)(group_name_end - arg)); ++ if (sgl_id == 0) ++ return; + /* separate_nextcmd() and expand_filename() depend on this */ + eap->arg = rest; + } +*************** +*** 4689,4694 **** +--- 4698,4708 ---- + * Save and restore the existing top-level grouplist id and ":syn + * include" tag around the actual inclusion. + */ ++ if (running_syn_inc_tag >= MAX_SYN_INC_TAG) ++ { ++ EMSG((char_u *)_("E847: Too many syntax includes")); ++ return; ++ } + prev_syn_inc_tag = current_syn_inc_tag; + current_syn_inc_tag = ++running_syn_inc_tag; + prev_toplvl_grp = curwin->w_s->b_syn_topgrp; +*************** +*** 4712,4718 **** + char_u *group_name_end; + int syn_id; + char_u *rest; +! char_u *keyword_copy; + char_u *p; + char_u *kw; + syn_opt_arg_T syn_opt_arg; +--- 4726,4732 ---- + char_u *group_name_end; + int syn_id; + char_u *rest; +! char_u *keyword_copy = NULL; + char_u *p; + char_u *kw; + syn_opt_arg_T syn_opt_arg; +*************** +*** 4724,4732 **** + if (rest != NULL) + { + syn_id = syn_check_group(arg, (int)(group_name_end - arg)); +! +! /* allocate a buffer, for removing the backslashes in the keyword */ +! keyword_copy = alloc((unsigned)STRLEN(rest) + 1); + if (keyword_copy != NULL) + { + syn_opt_arg.flags = 0; +--- 4738,4746 ---- + if (rest != NULL) + { + syn_id = syn_check_group(arg, (int)(group_name_end - arg)); +! if (syn_id != 0) +! /* allocate a buffer, for removing backslashes in the keyword */ +! keyword_copy = alloc((unsigned)STRLEN(rest) + 1); + if (keyword_copy != NULL) + { + syn_opt_arg.flags = 0; +*************** +*** 5133,5139 **** + (item == ITEM_SKIP) ? SPTYPE_SKIP : SPTYPE_END; + SYN_ITEMS(curwin->w_s)[idx].sp_flags |= syn_opt_arg.flags; + SYN_ITEMS(curwin->w_s)[idx].sp_syn.id = syn_id; +! SYN_ITEMS(curwin->w_s)[idx].sp_syn.inc_tag = current_syn_inc_tag; + SYN_ITEMS(curwin->w_s)[idx].sp_syn_match_id = + ppp->pp_matchgroup_id; + #ifdef FEAT_CONCEAL +--- 5147,5154 ---- + (item == ITEM_SKIP) ? SPTYPE_SKIP : SPTYPE_END; + SYN_ITEMS(curwin->w_s)[idx].sp_flags |= syn_opt_arg.flags; + SYN_ITEMS(curwin->w_s)[idx].sp_syn.id = syn_id; +! SYN_ITEMS(curwin->w_s)[idx].sp_syn.inc_tag = +! current_syn_inc_tag; + SYN_ITEMS(curwin->w_s)[idx].sp_syn_match_id = + ppp->pp_matchgroup_id; + #ifdef FEAT_CONCEAL +*************** +*** 5426,5431 **** +--- 5441,5454 ---- + curwin->w_s->b_syn_clusters.ga_growsize = 10; + } + ++ len = curwin->w_s->b_syn_clusters.ga_len; ++ if (len >= MAX_CLUSTER_ID) ++ { ++ EMSG((char_u *)_("E848: Too many syntax clusters")); ++ vim_free(name); ++ return 0; ++ } ++ + /* + * Make room for at least one other cluster entry. + */ +*************** +*** 5434,5440 **** + vim_free(name); + return 0; + } +- len = curwin->w_s->b_syn_clusters.ga_len; + + vim_memset(&(SYN_CLSTR(curwin->w_s)[len]), 0, sizeof(syn_cluster_T)); + SYN_CLSTR(curwin->w_s)[len].scl_name = name; +--- 5457,5462 ---- +*************** +*** 5476,5483 **** + + if (rest != NULL) + { +! scl_id = syn_check_cluster(arg, (int)(group_name_end - arg)) +! - SYNID_CLUSTER; + + for (;;) + { +--- 5498,5507 ---- + + if (rest != NULL) + { +! scl_id = syn_check_cluster(arg, (int)(group_name_end - arg)); +! if (scl_id == 0) +! return; +! scl_id -= SYNID_CLUSTER; + + for (;;) + { +*************** +*** 5516,5522 **** + if (got_clstr) + { + redraw_curbuf_later(SOME_VALID); +! syn_stack_free_all(curwin->w_s); /* Need to recompute all syntax. */ + } + } + +--- 5540,5546 ---- + if (got_clstr) + { + redraw_curbuf_later(SOME_VALID); +! syn_stack_free_all(curwin->w_s); /* Need to recompute all. */ + } + } + +*************** +*** 8972,8977 **** +--- 8996,9008 ---- + highlight_ga.ga_growsize = 10; + } + ++ if (highlight_ga.ga_len >= MAX_SYNID) ++ { ++ EMSG(_("E849: Too many syntax groups")); ++ vim_free(name); ++ return 0; ++ } ++ + /* + * Make room for at least one other syntax_highlight entry. + */ +*** ../vim-7.3.147/src/version.c 2011-04-01 13:05:37.000000000 +0200 +--- src/version.c 2011-04-01 14:26:44.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 148, + /**/ + +-- +BLACK KNIGHT: None shall pass. +ARTHUR: I have no quarrel with you, brave Sir knight, but I must cross + this bridge. +BLACK KNIGHT: Then you shall die. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e60d44f8955c9bb8e9b15f9a50559bb785e79287 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0322/3803] Patchlevel 149 --- 7.3.149 | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 7.3.149 diff --git a/7.3.149 b/7.3.149 new file mode 100644 index 00000000..1901a74f --- /dev/null +++ b/7.3.149 @@ -0,0 +1,78 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.149 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.149 +Problem: The cursor disappears after the processing of the 'setDot' + netbeans command when vim runs in a terminal. +Solution: Show the cursor after a screen update. (Xavier de Gaye, 2011 +Files: src/netbeans.c + + +*** ../vim-7.3.148/src/netbeans.c 2011-01-04 18:11:39.000000000 +0100 +--- src/netbeans.c 2011-04-01 15:33:49.000000000 +0200 +*************** +*** 191,196 **** +--- 191,197 ---- + changed_window_setting(); + update_screen(CLEAR); + setcursor(); ++ cursor_on(); + out_flush(); + #ifdef FEAT_GUI + if (gui.in_use) +*************** +*** 2248,2253 **** +--- 2249,2255 ---- + update_topline(); /* scroll to show the line */ + update_screen(VALID); + setcursor(); ++ cursor_on(); + out_flush(); + #ifdef FEAT_GUI + if (gui.in_use) +*************** +*** 2642,2647 **** +--- 2644,2650 ---- + { + update_screen(NOT_VALID); + setcursor(); ++ cursor_on(); + out_flush(); + #ifdef FEAT_GUI + if (gui.in_use) +*************** +*** 3008,3013 **** +--- 3011,3017 ---- + changed_window_setting(); + update_screen(CLEAR); + setcursor(); ++ cursor_on(); + out_flush(); + #ifdef FEAT_GUI + if (gui.in_use) +*** ../vim-7.3.148/src/version.c 2011-04-01 14:44:54.000000000 +0200 +--- src/version.c 2011-04-01 15:33:21.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 149, + /**/ + +-- +ARTHUR: You are indeed brave Sir knight, but the fight is mine. +BLACK KNIGHT: Had enough? +ARTHUR: You stupid bastard. You havn't got any arms left. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From cc496303941daacd9859c40a35a1539fc46ff50b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0323/3803] Patchlevel 150 --- 7.3.150 | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 7.3.150 diff --git a/7.3.150 b/7.3.150 new file mode 100644 index 00000000..83a8bf28 --- /dev/null +++ b/7.3.150 @@ -0,0 +1,113 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.150 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.150 +Problem: readline() does not return the last line when the NL is missing. + (Hong Xu) +Solution: When at the end of the file Also check for a previous line. +Files: src/eval.c + + +*** ../vim-7.3.149/src/eval.c 2011-03-27 16:03:09.000000000 +0200 +--- src/eval.c 2011-04-01 16:06:04.000000000 +0200 +*************** +*** 14305,14313 **** + { + if (buf[filtd] == '\n' || readlen <= 0) + { +! /* Only when in binary mode add an empty list item when the +! * last line ends in a '\n'. */ +! if (!binary && readlen == 0 && filtd == 0) + break; + + /* Found end-of-line or end-of-file: add a text line to the +--- 14305,14313 ---- + { + if (buf[filtd] == '\n' || readlen <= 0) + { +! /* In binary mode add an empty list item when the last +! * non-empty line ends in a '\n'. */ +! if (!binary && readlen == 0 && filtd == 0 && prev == NULL) + break; + + /* Found end-of-line or end-of-file: add a text line to the +*************** +*** 14372,14396 **** + + if (tolist == 0) + { +! /* "buf" is full, need to move text to an allocated buffer */ +! if (prev == NULL) + { +! prev = vim_strnsave(buf, buflen); +! prevlen = buflen; +! } +! else +! { +! s = alloc((unsigned)(prevlen + buflen)); +! if (s != NULL) + { +! mch_memmove(s, prev, prevlen); +! mch_memmove(s + prevlen, buf, buflen); +! vim_free(prev); +! prev = s; +! prevlen += buflen; + } + } +- filtd = 0; + } + else + { +--- 14372,14399 ---- + + if (tolist == 0) + { +! if (buflen >= FREAD_SIZE / 2) + { +! /* "buf" is full, need to move text to an allocated buffer */ +! if (prev == NULL) +! { +! prev = vim_strnsave(buf, buflen); +! prevlen = buflen; +! } +! else + { +! s = alloc((unsigned)(prevlen + buflen)); +! if (s != NULL) +! { +! mch_memmove(s, prev, prevlen); +! mch_memmove(s + prevlen, buf, buflen); +! vim_free(prev); +! prev = s; +! prevlen += buflen; +! } + } ++ filtd = 0; + } + } + else + { +*** ../vim-7.3.149/src/version.c 2011-04-01 15:33:54.000000000 +0200 +--- src/version.c 2011-04-01 16:04:42.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 150, + /**/ + +-- +ARTHUR: What are you going to do. bleed on me? + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 500cf6bde3457b5858cefef68f0060beec3efe1c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0324/3803] Patchlevel 151 --- 7.3.151 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 7.3.151 diff --git a/7.3.151 b/7.3.151 new file mode 100644 index 00000000..20f51051 --- /dev/null +++ b/7.3.151 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.151 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.151 (after 7.3.074) +Problem: When "unnamedplus" is in 'clipboard' the selection is sometimes + also copied to the star register. +Solution: Avoid copy to the star register when undesired. (James Vega) +Files: src/ops.c + + +*** ../vim-7.3.150/src/ops.c 2010-12-08 14:23:08.000000000 +0100 +--- src/ops.c 2011-04-01 16:23:10.000000000 +0200 +*************** +*** 3148,3157 **** + /* Copy the text from register 0 to the clipboard register. */ + copy_yank_reg(&(y_regs[PLUS_REGISTER])); + +- /* No need to copy to * register upon 'unnamed' now - see below */ + clip_own_selection(&clip_plus); + clip_gen_set_selection(&clip_plus); +! if (!clip_isautosel() && !did_star) + { + copy_yank_reg(&(y_regs[STAR_REGISTER])); + clip_own_selection(&clip_star); +--- 3148,3156 ---- + /* Copy the text from register 0 to the clipboard register. */ + copy_yank_reg(&(y_regs[PLUS_REGISTER])); + + clip_own_selection(&clip_plus); + clip_gen_set_selection(&clip_plus); +! if (!clip_isautosel() && !did_star && curr == &(y_regs[PLUS_REGISTER])) + { + copy_yank_reg(&(y_regs[STAR_REGISTER])); + clip_own_selection(&clip_star); +*** ../vim-7.3.150/src/version.c 2011-04-01 16:07:41.000000000 +0200 +--- src/version.c 2011-04-01 16:25:40.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 151, + /**/ + +-- +BLACK KNIGHT: I'm invincible! +ARTHUR: You're a looney. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 8555db133d99209d7affa4005c753fc7f1afc6d9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0325/3803] Patchlevel 152 --- 7.3.152 | 643 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 643 insertions(+) create mode 100644 7.3.152 diff --git a/7.3.152 b/7.3.152 new file mode 100644 index 00000000..fdc58a08 --- /dev/null +++ b/7.3.152 @@ -0,0 +1,643 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.152 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.152 +Problem: Xxd does not check for errors from library functions. +Solution: Add error checks. (Florian Zumbiehl) +Files: src/xxd/xxd.c + + +*** ../vim-7.3.151/src/xxd/xxd.c 2010-08-15 21:57:25.000000000 +0200 +--- src/xxd/xxd.c 2011-04-01 18:56:11.000000000 +0200 +*************** +*** 49,54 **** +--- 49,56 ---- + * option -b added: 01000101 binary output in normal format. + * 16.05.00 Added VAXC changes by Stephen P. Wall + * 16.05.00 Improved MMS file and merge for VMS by Zoltan Arpadffy ++ * 2011 March Better error handling by Florian Zumbiehl. ++ * 2011 April Formatting by Bram Moolenaar + * + * (c) 1990-1998 by Juergen Weigert (jnweiger@informatik.uni-erlangen.de) + * +*************** +*** 207,214 **** + + /* Let's collect some prototypes */ + /* CodeWarrior is really picky about missing prototypes */ +! static void exit_with_usage __P((char *)); +! static int huntype __P((FILE *, FILE *, FILE *, char *, int, int, long)); + static void xxdline __P((FILE *, char *, int)); + + #define TRY_SEEK /* attempt to use lseek, or skip forward by reading */ +--- 209,216 ---- + + /* Let's collect some prototypes */ + /* CodeWarrior is really picky about missing prototypes */ +! static void exit_with_usage __P((void)); +! static int huntype __P((FILE *, FILE *, FILE *, int, int, long)); + static void xxdline __P((FILE *, char *, int)); + + #define TRY_SEEK /* attempt to use lseek, or skip forward by reading */ +*************** +*** 223,231 **** + #define HEX_CINCLUDE 2 + #define HEX_BITS 3 /* not hex a dump, but bits: 01111001 */ + +! static void +! exit_with_usage(pname) +! char *pname; + { + fprintf(stderr, "Usage:\n %s [options] [infile [outfile]]\n", pname); + fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname); +--- 225,234 ---- + #define HEX_CINCLUDE 2 + #define HEX_BITS 3 /* not hex a dump, but bits: 01111001 */ + +! static char *pname; +! +! static void +! exit_with_usage() + { + fprintf(stderr, "Usage:\n %s [options] [infile [outfile]]\n", pname); + fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname); +*************** +*** 252,257 **** +--- 255,269 ---- + exit(1); + } + ++ static void ++ die(ret) ++ int ret; ++ { ++ fprintf(stderr, "%s: ", pname); ++ perror(NULL); ++ exit(ret); ++ } ++ + /* + * Max. cols binary characters are decoded from the input stream per line. + * Two adjacent garbage characters after evaluated data delimit valid data. +*************** +*** 259,270 **** + * + * The name is historic and came from 'undo type opt h'. + */ +! static int +! huntype(fpi, fpo, fperr, pname, cols, hextype, base_off) +! FILE *fpi, *fpo, *fperr; +! char *pname; +! int cols, hextype; +! long base_off; + { + int c, ign_garb = 1, n1 = -1, n2 = 0, n3, p = cols; + long have_off = 0, want_off = 0; +--- 271,281 ---- + * + * The name is historic and came from 'undo type opt h'. + */ +! static int +! huntype(fpi, fpo, fperr, cols, hextype, base_off) +! FILE *fpi, *fpo, *fperr; +! int cols, hextype; +! long base_off; + { + int c, ign_garb = 1, n1 = -1, n2 = 0, n3, p = cols; + long have_off = 0, want_off = 0; +*************** +*** 318,324 **** + + if (base_off + want_off != have_off) + { +! fflush(fpo); + #ifdef TRY_SEEK + c = fseek(fpo, base_off + want_off - have_off, 1); + if (c >= 0) +--- 329,336 ---- + + if (base_off + want_off != have_off) + { +! if (fflush(fpo) != 0) +! die(3); + #ifdef TRY_SEEK + c = fseek(fpo, base_off + want_off - have_off, 1); + if (c >= 0) +*************** +*** 330,341 **** + return 5; + } + for (; have_off < base_off + want_off; have_off++) +! putc(0, fpo); + } + + if (n2 >= 0 && n1 >= 0) + { +! putc((n2 << 4) | n1, fpo); + have_off++; + want_off++; + n1 = -1; +--- 342,355 ---- + return 5; + } + for (; have_off < base_off + want_off; have_off++) +! if (putc(0, fpo) == EOF) +! die(3); + } + + if (n2 >= 0 && n1 >= 0) + { +! if (putc((n2 << 4) | n1, fpo) == EOF) +! die(3); + have_off++; + want_off++; + n1 = -1; +*************** +*** 345,350 **** +--- 359,366 ---- + want_off = 0; + while ((c = getc(fpi)) != '\n' && c != EOF) + ; ++ if (c == EOF && ferror(fpi)) ++ die(2); + ign_garb = 1; + } + } +*************** +*** 355,369 **** + want_off = 0; + while ((c = getc(fpi)) != '\n' && c != EOF) + ; + ign_garb = 1; + } + } +! fflush(fpo); + #ifdef TRY_SEEK + fseek(fpo, 0L, 2); + #endif +! fclose(fpo); +! fclose(fpi); + return 0; + } + +--- 371,390 ---- + want_off = 0; + while ((c = getc(fpi)) != '\n' && c != EOF) + ; ++ if (c == EOF && ferror(fpi)) ++ die(2); + ign_garb = 1; + } + } +! if (fflush(fpo) != 0) +! die(3); + #ifdef TRY_SEEK + fseek(fpo, 0L, 2); + #endif +! if (fclose(fpo) != 0) +! die(3); +! if (fclose(fpi) != 0) +! die(2); + return 0; + } + +*************** +*** 379,389 **** + * + * If nz is always positive, lines are never suppressed. + */ +! static void + xxdline(fp, l, nz) +! FILE *fp; +! char *l; +! int nz; + { + static char z[LLEN+1]; + static int zero_seen = 0; +--- 400,410 ---- + * + * If nz is always positive, lines are never suppressed. + */ +! static void + xxdline(fp, l, nz) +! FILE *fp; +! char *l; +! int nz; + { + static char z[LLEN+1]; + static int zero_seen = 0; +*************** +*** 398,409 **** + if (nz < 0) + zero_seen--; + if (zero_seen == 2) +! fputs(z, fp); + if (zero_seen > 2) +! fputs("*\n", fp); + } + if (nz >= 0 || zero_seen > 0) +! fputs(l, fp); + if (nz) + zero_seen = 0; + } +--- 419,433 ---- + if (nz < 0) + zero_seen--; + if (zero_seen == 2) +! if (fputs(z, fp) == EOF) +! die(3); + if (zero_seen > 2) +! if (fputs("*\n", fp) == EOF) +! die(3); + } + if (nz >= 0 || zero_seen > 0) +! if (fputs(l, fp) == EOF) +! die(3); + if (nz) + zero_seen = 0; + } +*************** +*** 439,448 **** + 0070,0071,0372,0373,0374,0375,0376,0377 + }; + +! int + main(argc, argv) +! int argc; +! char *argv[]; + { + FILE *fp, *fpo; + int c, e, p = 0, relseek = 1, negseek = 0, revert = 0; +--- 463,472 ---- + 0070,0071,0372,0373,0374,0375,0376,0377 + }; + +! int + main(argc, argv) +! int argc; +! char *argv[]; + { + FILE *fp, *fpo; + int c, e, p = 0, relseek = 1, negseek = 0, revert = 0; +*************** +*** 452,458 **** + int grplen; /* total chars per octet group */ + long length = -1, n = 0, seekoff = 0; + char l[LLEN+1]; +! char *pname, *pp; + + #ifdef AMIGA + /* This program doesn't work when started from the Workbench */ +--- 476,482 ---- + int grplen; /* total chars per octet group */ + long length = -1, n = 0, seekoff = 0; + char l[LLEN+1]; +! char *pp; + + #ifdef AMIGA + /* This program doesn't work when started from the Workbench */ +*************** +*** 495,501 **** + else + { + if (!argv[2]) +! exit_with_usage(pname); + cols = (int)strtol(argv[2], NULL, 0); + argv++; + argc--; +--- 519,525 ---- + else + { + if (!argv[2]) +! exit_with_usage(); + cols = (int)strtol(argv[2], NULL, 0); + argv++; + argc--; +*************** +*** 508,514 **** + else + { + if (!argv[2]) +! exit_with_usage(pname); + octspergrp = (int)strtol(argv[2], NULL, 0); + argv++; + argc--; +--- 532,538 ---- + else + { + if (!argv[2]) +! exit_with_usage(); + octspergrp = (int)strtol(argv[2], NULL, 0); + argv++; + argc--; +*************** +*** 531,537 **** + else + { + if (!argv[2]) +! exit_with_usage(pname); + #ifdef TRY_SEEK + if (argv[2][0] == '+') + relseek++; +--- 555,561 ---- + else + { + if (!argv[2]) +! exit_with_usage(); + #ifdef TRY_SEEK + if (argv[2][0] == '+') + relseek++; +*************** +*** 550,556 **** + else + { + if (!argv[2]) +! exit_with_usage(pname); + length = strtol(argv[2], (char **)NULL, 0); + argv++; + argc--; +--- 574,580 ---- + else + { + if (!argv[2]) +! exit_with_usage(); + length = strtol(argv[2], (char **)NULL, 0); + argv++; + argc--; +*************** +*** 563,569 **** + break; + } + else if (pp[0] == '-' && pp[1]) /* unknown option */ +! exit_with_usage(pname); + else + break; /* not an option */ + +--- 587,593 ---- + break; + } + else if (pp[0] == '-' && pp[1]) /* unknown option */ +! exit_with_usage(); + else + break; /* not an option */ + +*************** +*** 602,608 **** + octspergrp = cols; + + if (argc > 3) +! exit_with_usage(pname); + + if (argc == 1 || (argv[1][0] == '-' && !argv[1][1])) + BIN_ASSIGN(fp = stdin, !revert); +--- 626,632 ---- + octspergrp = cols; + + if (argc > 3) +! exit_with_usage(); + + if (argc == 1 || (argv[1][0] == '-' && !argv[1][1])) + BIN_ASSIGN(fp = stdin, !revert); +*************** +*** 640,646 **** + fprintf(stderr, "%s: sorry, cannot revert this type of hexdump\n", pname); + return -1; + } +! return huntype(fp, fpo, stderr, pname, cols, hextype, + negseek ? -seekoff : seekoff); + } + +--- 664,670 ---- + fprintf(stderr, "%s: sorry, cannot revert this type of hexdump\n", pname); + return -1; + } +! return huntype(fp, fpo, stderr, cols, hextype, + negseek ? -seekoff : seekoff); + } + +*************** +*** 664,670 **** + long s = seekoff; + + while (s--) +! (void)getc(fp); + } + } + +--- 688,703 ---- + long s = seekoff; + + while (s--) +! if (getc(fp) == EOF) +! if (ferror(fp)) +! { +! die(2); +! } +! else +! { +! fprintf(stderr, "%s: sorry cannot seek.\n", pname); +! return 4; +! } + } + } + +*************** +*** 672,725 **** + { + if (fp != stdin) + { +! fprintf(fpo, "unsigned char %s", isdigit((int)argv[1][0]) ? "__" : ""); + for (e = 0; (c = argv[1][e]) != 0; e++) +! putc(isalnum(c) ? c : '_', fpo); +! fputs("[] = {\n", fpo); + } + + p = 0; + while ((length < 0 || p < length) && (c = getc(fp)) != EOF) + { +! fprintf(fpo, (hexx == hexxa) ? "%s0x%02x" : "%s0X%02X", +! (p % cols) ? ", " : ",\n "+2*!p, c); + p++; + } + + if (p) +! fputs("\n};\n"+3*(fp == stdin), fpo); + + if (fp != stdin) + { +! fprintf(fpo, "unsigned int %s", isdigit((int)argv[1][0]) ? "__" : ""); + for (e = 0; (c = argv[1][e]) != 0; e++) +! putc(isalnum(c) ? c : '_', fpo); +! fprintf(fpo, "_len = %d;\n", p); + } + +! fclose(fp); +! fclose(fpo); + return 0; + } + + if (hextype == HEX_POSTSCRIPT) + { + p = cols; + while ((length < 0 || n < length) && (e = getc(fp)) != EOF) + { +! putchar(hexx[(e >> 4) & 0xf]); +! putchar(hexx[(e ) & 0xf]); + n++; + if (!--p) + { +! putchar('\n'); + p = cols; + } + } + if (p < cols) +! putchar('\n'); +! fclose(fp); +! fclose(fpo); + return 0; + } + +--- 705,779 ---- + { + if (fp != stdin) + { +! if (fprintf(fpo, "unsigned char %s", isdigit((int)argv[1][0]) ? "__" : "") < 0) +! die(3); + for (e = 0; (c = argv[1][e]) != 0; e++) +! if (putc(isalnum(c) ? c : '_', fpo) == EOF) +! die(3); +! if (fputs("[] = {\n", fpo) == EOF) +! die(3); + } + + p = 0; ++ c = 0; + while ((length < 0 || p < length) && (c = getc(fp)) != EOF) + { +! if (fprintf(fpo, (hexx == hexxa) ? "%s0x%02x" : "%s0X%02X", +! (p % cols) ? ", " : ",\n "+2*!p, c) < 0) +! die(3); + p++; + } ++ if (c == EOF && ferror(fp)) ++ die(2); + + if (p) +! if (fputs("\n};\n" + 3 * (fp == stdin), fpo) == EOF) +! die(3); + + if (fp != stdin) + { +! if (fprintf(fpo, "unsigned int %s", isdigit((int)argv[1][0]) ? "__" : "") < 0) +! die(3); + for (e = 0; (c = argv[1][e]) != 0; e++) +! if (putc(isalnum(c) ? c : '_', fpo) == EOF) +! die(3); +! if (fprintf(fpo, "_len = %d;\n", p) < 0) +! die(3); + } + +! if (fclose(fp)) +! die(2); +! if (fclose(fpo)) +! die(3); + return 0; + } + + if (hextype == HEX_POSTSCRIPT) + { + p = cols; ++ e = 0; + while ((length < 0 || n < length) && (e = getc(fp)) != EOF) + { +! if (putc(hexx[(e >> 4) & 0xf], fpo) == EOF +! || putc(hexx[e & 0xf], fpo) == EOF) +! die(3); + n++; + if (!--p) + { +! if (putc('\n', fpo) == EOF) +! die(3); + p = cols; + } + } ++ if (e == EOF && ferror(fp)) ++ die(2); + if (p < cols) +! if (putc('\n', fpo) == EOF) +! die(3); +! if (fclose(fp)) +! die(2); +! if (fclose(fpo)) +! die(3); + return 0; + } + +*************** +*** 730,735 **** +--- 784,790 ---- + else /* hextype == HEX_BITS */ + grplen = 8 * octspergrp + 1; + ++ e = 0; + while ((length < 0 || n < length) && (e = getc(fp)) != EOF) + { + if (p == 0) +*************** +*** 771,776 **** +--- 826,833 ---- + p = 0; + } + } ++ if (e == EOF && ferror(fp)) ++ die(2); + if (p) + { + l[c = (11 + (grplen * cols - 1)/octspergrp + p)] = '\n'; l[++c] = '\0'; +*************** +*** 779,785 **** + else if (autoskip) + xxdline(fpo, l, -1); /* last chance to flush out suppressed lines */ + +! fclose(fp); +! fclose(fpo); + return 0; + } +--- 836,846 ---- + else if (autoskip) + xxdline(fpo, l, -1); /* last chance to flush out suppressed lines */ + +! if (fclose(fp)) +! die(2); +! if (fclose(fpo)) +! die(3); + return 0; + } ++ ++ /* vi:set ts=8 sw=4 sts=2 cino+={2 cino+=n-2 : */ +*** ../vim-7.3.151/src/version.c 2011-04-01 16:28:33.000000000 +0200 +--- src/version.c 2011-04-01 19:00:26.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 152, + /**/ + +-- +Eye have a spelling checker, it came with my PC; +It plainly marks four my revue mistakes I cannot sea. +I've run this poem threw it, I'm sure your please to no, +It's letter perfect in it's weigh, my checker tolled me sew! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 62cd1a56080d636bab3d8858f77fc9c902aaff0c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0326/3803] Patchlevel 153 --- 7.3.153 | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 7.3.153 diff --git a/7.3.153 b/7.3.153 new file mode 100644 index 00000000..9f76b518 --- /dev/null +++ b/7.3.153 @@ -0,0 +1,66 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.153 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.153 (after 7.3.152) +Problem: Compiler warning for ambiguous else, missing prototype. +Solution: Add braces. (Dominique Pelle) Add prototype for die(). +Files: src/xxd/xxd.c + + +*** ../vim-7.3.152/src/xxd/xxd.c 2011-04-01 19:14:35.000000000 +0200 +--- src/xxd/xxd.c 2011-04-02 14:42:54.000000000 +0200 +*************** +*** 210,215 **** +--- 210,216 ---- + /* Let's collect some prototypes */ + /* CodeWarrior is really picky about missing prototypes */ + static void exit_with_usage __P((void)); ++ static void die __P((int)); + static int huntype __P((FILE *, FILE *, FILE *, int, int, long)); + static void xxdline __P((FILE *, char *, int)); + +*************** +*** 689,694 **** +--- 690,696 ---- + + while (s--) + if (getc(fp) == EOF) ++ { + if (ferror(fp)) + { + die(2); +*************** +*** 698,703 **** +--- 700,706 ---- + fprintf(stderr, "%s: sorry cannot seek.\n", pname); + return 4; + } ++ } + } + } + +*** ../vim-7.3.152/src/version.c 2011-04-01 19:14:35.000000000 +0200 +--- src/version.c 2011-04-02 14:41:12.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 153, + /**/ + +-- + | + +Ceci n'est pas une pipe. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ad34591a4ebfe7ae1d237e72bca389385afac6bf Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0327/3803] Patchlevel 154 --- 7.3.154 | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 7.3.154 diff --git a/7.3.154 b/7.3.154 new file mode 100644 index 00000000..e7c88620 --- /dev/null +++ b/7.3.154 @@ -0,0 +1,106 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.154 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.154 (after 7.3.148) +Problem: Can't compile with tiny features. (Tony Mechelynck) +Solution: Move #define outside of #ifdef. +Files: src/syntax.c + + +*** ../vim-7.3.153/src/syntax.c 2011-04-01 14:44:54.000000000 +0200 +--- src/syntax.c 2011-04-02 15:11:47.000000000 +0200 +*************** +*** 68,73 **** +--- 68,75 ---- + + #define HL_TABLE() ((struct hl_group *)((highlight_ga.ga_data))) + ++ #define MAX_HL_ID 20000 /* maximum value for a highlight ID. */ ++ + #ifdef FEAT_CMDL_COMPL + /* Flags to indicate an additional string for highlight name completion. */ + static int include_none = 0; /* when 1 include "None" */ +*************** +*** 225,236 **** + * 22000 - 22999 CONTAINED indicator (current_syn_inc_tag added) + * 23000 - 32767 cluster IDs (subtract SYNID_CLUSTER for the cluster ID) + */ +! #define SYNID_ALLBUT 20000 /* syntax group ID for contains=ALLBUT */ + #define SYNID_TOP 21000 /* syntax group ID for contains=TOP */ + #define SYNID_CONTAINED 22000 /* syntax group ID for contains=CONTAINED */ + #define SYNID_CLUSTER 23000 /* first syntax group ID for clusters */ + +- #define MAX_SYNID SYNID_ALLBUT + #define MAX_SYN_INC_TAG 999 /* maximum before the above overflow */ + #define MAX_CLUSTER_ID (32767 - SYNID_CLUSTER) + +--- 227,237 ---- + * 22000 - 22999 CONTAINED indicator (current_syn_inc_tag added) + * 23000 - 32767 cluster IDs (subtract SYNID_CLUSTER for the cluster ID) + */ +! #define SYNID_ALLBUT MAX_HL_ID /* syntax group ID for contains=ALLBUT */ + #define SYNID_TOP 21000 /* syntax group ID for contains=TOP */ + #define SYNID_CONTAINED 22000 /* syntax group ID for contains=CONTAINED */ + #define SYNID_CLUSTER 23000 /* first syntax group ID for clusters */ + + #define MAX_SYN_INC_TAG 999 /* maximum before the above overflow */ + #define MAX_CLUSTER_ID (32767 - SYNID_CLUSTER) + +*************** +*** 6462,6468 **** + + #endif /* FEAT_SYN_HL */ + +- + /************************************** + * Highlighting stuff * + **************************************/ +--- 6463,6468 ---- +*************** +*** 8996,9004 **** + highlight_ga.ga_growsize = 10; + } + +! if (highlight_ga.ga_len >= MAX_SYNID) + { +! EMSG(_("E849: Too many syntax groups")); + vim_free(name); + return 0; + } +--- 8996,9004 ---- + highlight_ga.ga_growsize = 10; + } + +! if (highlight_ga.ga_len >= MAX_HL_ID) + { +! EMSG(_("E849: Too many highlight and syntax groups")); + vim_free(name); + return 0; + } +*** ../vim-7.3.153/src/version.c 2011-04-02 14:44:50.000000000 +0200 +--- src/version.c 2011-04-02 14:52:33.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 154, + /**/ + +-- +BEDEVERE: Why do you think she is a witch? +SECOND VILLAGER: She turned me into a newt. +BEDEVERE: A newt? +SECOND VILLAGER: (After looking at himself for some time) I got better. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From dff5b23db41d84b20bb41da8c99813d8a8527018 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0328/3803] Patchlevel 155 --- 7.3.155 | 286 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 286 insertions(+) create mode 100644 7.3.155 diff --git a/7.3.155 b/7.3.155 new file mode 100644 index 00000000..806efca2 --- /dev/null +++ b/7.3.155 @@ -0,0 +1,286 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.155 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.155 +Problem: Crash when using map(), filter() and remove() on v:. (ZyX) + Also for extend(). (Yukihiro Nakadaira) +Solution: Mark v: as locked. Also correct locking error messages. +Files: src/eval.c + + +*** ../vim-7.3.154/src/eval.c 2011-04-01 16:07:41.000000000 +0200 +--- src/eval.c 2011-04-11 13:28:34.000000000 +0200 +*************** +*** 853,858 **** +--- 853,859 ---- + + init_var_dict(&globvardict, &globvars_var); + init_var_dict(&vimvardict, &vimvars_var); ++ vimvardict.dv_lock = VAR_FIXED; + hash_init(&compat_hashtab); + hash_init(&func_hashtab); + +*************** +*** 8545,8551 **** + if (argvars[0].v_type == VAR_LIST) + { + if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)"add()") + && list_append_tv(l, &argvars[1]) == OK) + copy_tv(&argvars[0], rettv); + } +--- 8546,8552 ---- + if (argvars[0].v_type == VAR_LIST) + { + if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)_("add() argument")) + && list_append_tv(l, &argvars[1]) == OK) + copy_tv(&argvars[0], rettv); + } +*************** +*** 9946,9951 **** +--- 9947,9954 ---- + typval_T *argvars; + typval_T *rettv; + { ++ char *arg_errmsg = N_("extend() argument"); ++ + if (argvars[0].v_type == VAR_LIST && argvars[1].v_type == VAR_LIST) + { + list_T *l1, *l2; +*************** +*** 9955,9961 **** + + l1 = argvars[0].vval.v_list; + l2 = argvars[1].vval.v_list; +! if (l1 != NULL && !tv_check_lock(l1->lv_lock, (char_u *)"extend()") + && l2 != NULL) + { + if (argvars[2].v_type != VAR_UNKNOWN) +--- 9958,9964 ---- + + l1 = argvars[0].vval.v_list; + l2 = argvars[1].vval.v_list; +! if (l1 != NULL && !tv_check_lock(l1->lv_lock, (char_u *)_(arg_errmsg)) + && l2 != NULL) + { + if (argvars[2].v_type != VAR_UNKNOWN) +*************** +*** 9994,10000 **** + + d1 = argvars[0].vval.v_dict; + d2 = argvars[1].vval.v_dict; +! if (d1 != NULL && !tv_check_lock(d1->dv_lock, (char_u *)"extend()") + && d2 != NULL) + { + /* Check the third argument. */ +--- 9997,10003 ---- + + d1 = argvars[0].vval.v_dict; + d2 = argvars[1].vval.v_dict; +! if (d1 != NULL && !tv_check_lock(d1->dv_lock, (char_u *)_(arg_errmsg)) + && d2 != NULL) + { + /* Check the third argument. */ +*************** +*** 10236,10255 **** + typval_T save_key; + int rem; + int todo; +! char_u *ermsg = map ? (char_u *)"map()" : (char_u *)"filter()"; + int save_did_emsg; + int idx = 0; + + if (argvars[0].v_type == VAR_LIST) + { + if ((l = argvars[0].vval.v_list) == NULL +! || (map && tv_check_lock(l->lv_lock, ermsg))) + return; + } + else if (argvars[0].v_type == VAR_DICT) + { + if ((d = argvars[0].vval.v_dict) == NULL +! || (map && tv_check_lock(d->dv_lock, ermsg))) + return; + } + else +--- 10239,10260 ---- + typval_T save_key; + int rem; + int todo; +! char_u *ermsg = (char_u *)(map ? "map()" : "filter()"); +! char *arg_errmsg = (map ? N_("map() argument") +! : N_("filter() argument")); + int save_did_emsg; + int idx = 0; + + if (argvars[0].v_type == VAR_LIST) + { + if ((l = argvars[0].vval.v_list) == NULL +! || tv_check_lock(l->lv_lock, (char_u *)_(arg_errmsg))) + return; + } + else if (argvars[0].v_type == VAR_DICT) + { + if ((d = argvars[0].vval.v_dict) == NULL +! || tv_check_lock(d->dv_lock, (char_u *)_(arg_errmsg))) + return; + } + else +*************** +*** 10286,10292 **** + { + --todo; + di = HI2DI(hi); +! if (tv_check_lock(di->di_tv.v_lock, ermsg)) + break; + vimvars[VV_KEY].vv_str = vim_strsave(di->di_key); + if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL +--- 10291,10298 ---- + { + --todo; + di = HI2DI(hi); +! if (tv_check_lock(di->di_tv.v_lock, +! (char_u *)_(arg_errmsg))) + break; + vimvars[VV_KEY].vv_str = vim_strsave(di->di_key); + if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL +*************** +*** 10305,10311 **** + + for (li = l->lv_first; li != NULL; li = nli) + { +! if (tv_check_lock(li->li_tv.v_lock, ermsg)) + break; + nli = li->li_next; + vimvars[VV_KEY].vv_nr = idx; +--- 10311,10317 ---- + + for (li = l->lv_first; li != NULL; li = nli) + { +! if (tv_check_lock(li->li_tv.v_lock, (char_u *)_(arg_errmsg))) + break; + nli = li->li_next; + vimvars[VV_KEY].vv_nr = idx; +*************** +*** 12910,12916 **** + if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listarg), "insert()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)"insert()")) + { + if (argvars[2].v_type != VAR_UNKNOWN) + before = get_tv_number_chk(&argvars[2], &error); +--- 12916,12922 ---- + if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listarg), "insert()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)_("insert() argument"))) + { + if (argvars[2].v_type != VAR_UNKNOWN) + before = get_tv_number_chk(&argvars[2], &error); +*************** +*** 14775,14787 **** + char_u *key; + dict_T *d; + dictitem_T *di; + + if (argvars[0].v_type == VAR_DICT) + { + if (argvars[2].v_type != VAR_UNKNOWN) + EMSG2(_(e_toomanyarg), "remove()"); + else if ((d = argvars[0].vval.v_dict) != NULL +! && !tv_check_lock(d->dv_lock, (char_u *)"remove() argument")) + { + key = get_tv_string_chk(&argvars[1]); + if (key != NULL) +--- 14781,14794 ---- + char_u *key; + dict_T *d; + dictitem_T *di; ++ char *arg_errmsg = N_("remove() argument"); + + if (argvars[0].v_type == VAR_DICT) + { + if (argvars[2].v_type != VAR_UNKNOWN) + EMSG2(_(e_toomanyarg), "remove()"); + else if ((d = argvars[0].vval.v_dict) != NULL +! && !tv_check_lock(d->dv_lock, (char_u *)_(arg_errmsg))) + { + key = get_tv_string_chk(&argvars[1]); + if (key != NULL) +*************** +*** 14801,14807 **** + else if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listdictarg), "remove()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)"remove() argument")) + { + int error = FALSE; + +--- 14808,14814 ---- + else if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listdictarg), "remove()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)_(arg_errmsg))) + { + int error = FALSE; + +*************** +*** 15135,15141 **** + if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listarg), "reverse()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)"reverse()")) + { + li = l->lv_last; + l->lv_first = l->lv_last = NULL; +--- 15142,15148 ---- + if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listarg), "reverse()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)_("reverse() argument"))) + { + li = l->lv_last; + l->lv_first = l->lv_last = NULL; +*************** +*** 16432,16438 **** + else + { + l = argvars[0].vval.v_list; +! if (l == NULL || tv_check_lock(l->lv_lock, (char_u *)"sort()")) + return; + rettv->vval.v_list = l; + rettv->v_type = VAR_LIST; +--- 16439,16446 ---- + else + { + l = argvars[0].vval.v_list; +! if (l == NULL || tv_check_lock(l->lv_lock, +! (char_u *)_("sort() argument"))) + return; + rettv->vval.v_list = l; + rettv->v_type = VAR_LIST; +*** ../vim-7.3.154/src/version.c 2011-04-02 15:12:45.000000000 +0200 +--- src/version.c 2011-04-11 13:13:38.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 155, + /**/ + +-- +I used to be indecisive, now I'm not sure. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5d1bb0707ab7483a43104f79ceddf536d69f4c30 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0329/3803] Patchlevel 156 --- 7.3.156 | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 7.3.156 diff --git a/7.3.156 b/7.3.156 new file mode 100644 index 00000000..ec873242 --- /dev/null +++ b/7.3.156 @@ -0,0 +1,89 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.156 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.156 +Problem: Tty names possibly left unterminated. +Solution: Use vim_strncpy() instead of strncpy(). +Files: src/pty.c + + +*** ../vim-7.3.155/src/pty.c 2010-08-15 21:57:28.000000000 +0200 +--- src/pty.c 2011-04-11 14:02:49.000000000 +0200 +*************** +*** 209,216 **** + #ifdef _SEQUENT_ + fvhangup(s); + #endif +! strncpy(PtyName, m, sizeof(PtyName)); +! strncpy(TtyName, s, sizeof(TtyName)); + initmaster(f); + *ttyn = TtyName; + return f; +--- 209,216 ---- + #ifdef _SEQUENT_ + fvhangup(s); + #endif +! vim_strncpy((char_u *)PtyName, (char_u *)m, sizeof(PtyName) - 1); +! vim_strncpy((char_u *)TtyName, (char_u *)s, sizeof(TtyName) - 1); + initmaster(f); + *ttyn = TtyName; + return f; +*************** +*** 301,307 **** + return -1; + } + signal(SIGCHLD, sigcld); +! strncpy(TtyName, m, sizeof(TtyName)); + initmaster(f); + *ttyn = TtyName; + return f; +--- 301,307 ---- + return -1; + } + signal(SIGCHLD, sigcld); +! vim_strncpy((char_u *)TtyName, (char_u *)m, sizeof(TtyName) - 1); + initmaster(f); + *ttyn = TtyName; + return f; +*************** +*** 326,332 **** + /* a dumb looking loop replaced by mycrofts code: */ + if ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_EXTRA)) < 0) + return -1; +! strncpy(TtyName, ttyname(f), sizeof(TtyName)); + if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK)) + { + close(f); +--- 326,332 ---- + /* a dumb looking loop replaced by mycrofts code: */ + if ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_EXTRA)) < 0) + return -1; +! vim_strncpy((char_u *)TtyName, (char_u *)ttyname(f), sizeof(TtyName) - 1); + if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK)) + { + close(f); +*** ../vim-7.3.155/src/version.c 2011-04-11 13:46:07.000000000 +0200 +--- src/version.c 2011-04-11 14:23:38.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 156, + /**/ + +-- +I think that you'll agree that engineers are very effective in their social +interactions. It's the "normal" people who are nuts. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 25f58c3ba7477e1d0072136ee7844c7cc077ab89 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0330/3803] Patchlevel 157 --- 7.3.157 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 7.3.157 diff --git a/7.3.157 b/7.3.157 new file mode 100644 index 00000000..403c9486 --- /dev/null +++ b/7.3.157 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.157 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.157 +Problem: Superfluous assignment. +Solution: Remove assignment. +Files: src/misc1.c + + +*** ../vim-7.3.156/src/misc1.c 2011-03-22 13:07:19.000000000 +0100 +--- src/misc1.c 2011-04-11 14:11:17.000000000 +0200 +*************** +*** 6773,6780 **** + { + curwin->w_cursor.lnum = our_paren_pos.lnum; + curwin->w_cursor.col = col; +! if ((trypos = find_match_paren(ind_maxparen, +! ind_maxcomment)) != NULL) + amount += ind_unclosed2; + else + amount += ind_unclosed; +--- 6775,6781 ---- + { + curwin->w_cursor.lnum = our_paren_pos.lnum; + curwin->w_cursor.col = col; +! if (find_match_paren(ind_maxparen, ind_maxcomment) != NULL) + amount += ind_unclosed2; + else + amount += ind_unclosed; +*** ../vim-7.3.156/src/version.c 2011-04-11 14:24:33.000000000 +0200 +--- src/version.c 2011-04-11 14:25:36.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 157, + /**/ + +-- +A radioactive cat has eighteen half-lives. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ef8be35ad622a256c9461b351dfa81b89508a47c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0331/3803] Patchlevel 158 --- 7.3.158 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 7.3.158 diff --git a/7.3.158 b/7.3.158 new file mode 100644 index 00000000..8fba3508 --- /dev/null +++ b/7.3.158 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.158 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.158 +Problem: Might use uninitialized memory in C indenting. +Solution: Init arrays to empty. +Files: src/misc1.c + + +*** ../vim-7.3.157/src/misc1.c 2011-04-11 14:26:15.000000000 +0200 +--- src/misc1.c 2011-04-11 14:11:17.000000000 +0200 +*************** +*** 6433,6438 **** +--- 6433,6440 ---- + /* find how indented the line beginning the comment is */ + getvcol(curwin, trypos, &col, NULL, NULL); + amount = col; ++ *lead_start = NUL; ++ *lead_middle = NUL; + + p = curbuf->b_p_com; + while (*p != NUL) +*** ../vim-7.3.157/src/version.c 2011-04-11 14:26:15.000000000 +0200 +--- src/version.c 2011-04-11 14:27:05.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 158, + /**/ + +-- +It's totally unfair to suggest - as many have - that engineers are socially +inept. Engineers simply have different objectives when it comes to social +interaction. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a73bac5cdfd5544775f0559b6b83c709d5d8b0d0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0332/3803] Patchlevel 159 --- 7.3.159 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 7.3.159 diff --git a/7.3.159 b/7.3.159 new file mode 100644 index 00000000..7029ac86 --- /dev/null +++ b/7.3.159 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.159 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.159 +Problem: Using uninitialized pointer when out of memory. +Solution: Check for NULL return value. +Files: src/mbyte.c + + +*** ../vim-7.3.158/src/mbyte.c 2010-10-27 13:37:39.000000000 +0200 +--- src/mbyte.c 2011-04-11 14:17:39.000000000 +0200 +*************** +*** 4129,4135 **** + done = to - (char *)result; + } + +! if (resultlenp != NULL) + *resultlenp = (int)(to - (char *)result); + return result; + } +--- 4129,4135 ---- + done = to - (char *)result; + } + +! if (resultlenp != NULL && result != NULL) + *resultlenp = (int)(to - (char *)result); + return result; + } +*** ../vim-7.3.158/src/version.c 2011-04-11 14:27:34.000000000 +0200 +--- src/version.c 2011-04-11 14:28:08.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 159, + /**/ + +-- +I learned the customs and mannerisms of engineers by observing them, much the +way Jane Goodall learned about the great apes, but without the hassle of +grooming. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 70040e2426b30ab41a3e87952f4e648d9f0ef4f5 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0333/3803] Patchlevel 160 --- 7.3.160 | 482 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 482 insertions(+) create mode 100644 7.3.160 diff --git a/7.3.160 b/7.3.160 new file mode 100644 index 00000000..bf3a069f --- /dev/null +++ b/7.3.160 @@ -0,0 +1,482 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.160 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.160 +Problem: Unsafe string copying. +Solution: Use vim_strncpy() instead of strcpy(). Use vim_strcat() instead + of strcat(). +Files: src/buffer.c, src/ex_docmd.c, src/hardcopy.c, src/menu.c, + src/misc1.c, src/misc2.c, src/proto/misc2.pro, src/netbeans.c, + src/os_unix.c, src/spell.c, src/syntax.c, src/tag.c + +*** ../vim-7.3.159/src/buffer.c 2011-02-15 14:24:42.000000000 +0100 +--- src/buffer.c 2011-04-11 16:08:38.000000000 +0200 +*************** +*** 3176,3182 **** + /* format: "fname + (path) (1 of 2) - VIM" */ + + if (curbuf->b_fname == NULL) +! STRCPY(buf, _("[No Name]")); + else + { + p = transstr(gettail(curbuf->b_fname)); +--- 3176,3182 ---- + /* format: "fname + (path) (1 of 2) - VIM" */ + + if (curbuf->b_fname == NULL) +! vim_strncpy(buf, (char_u *)_("[No Name]"), IOSIZE - 100); + else + { + p = transstr(gettail(curbuf->b_fname)); +*************** +*** 3232,3238 **** + if (serverName != NULL) + { + STRCAT(buf, " - "); +! STRCAT(buf, serverName); + } + else + #endif +--- 3232,3238 ---- + if (serverName != NULL) + { + STRCAT(buf, " - "); +! vim_strcat(buf, serverName, IOSIZE); + } + else + #endif +*** ../vim-7.3.159/src/ex_docmd.c 2011-03-03 15:54:45.000000000 +0100 +--- src/ex_docmd.c 2011-04-11 15:43:48.000000000 +0200 +*************** +*** 5096,5102 **** + char_u buff[IOSIZE]; + + if (n == 1) +! STRCPY(buff, _("1 more file to edit. Quit anyway?")); + else + vim_snprintf((char *)buff, IOSIZE, + _("%d more files to edit. Quit anyway?"), n); +--- 5096,5104 ---- + char_u buff[IOSIZE]; + + if (n == 1) +! vim_strncpy(buff, +! (char_u *)_("1 more file to edit. Quit anyway?"), +! IOSIZE - 1); + else + vim_snprintf((char *)buff, IOSIZE, + _("%d more files to edit. Quit anyway?"), n); +*** ../vim-7.3.159/src/hardcopy.c 2010-08-15 21:57:25.000000000 +0200 +--- src/hardcopy.c 2011-04-11 15:30:09.000000000 +0200 +*************** +*** 1761,1772 **** + { + char_u buffer[MAXPATHL + 1]; + +! STRCPY(resource->name, name); + /* Look for named resource file in runtimepath */ + STRCPY(buffer, "print"); + add_pathsep(buffer); +! STRCAT(buffer, name); +! STRCAT(buffer, ".ps"); + resource->filename[0] = NUL; + return (do_in_runtimepath(buffer, FALSE, prt_resource_name, + resource->filename) +--- 1761,1772 ---- + { + char_u buffer[MAXPATHL + 1]; + +! vim_strncpy(resource->name, (char_u *)name, 63); + /* Look for named resource file in runtimepath */ + STRCPY(buffer, "print"); + add_pathsep(buffer); +! vim_strcat(buffer, (char_u *)name, MAXPATHL); +! vim_strcat(buffer, (char_u *)".ps", MAXPATHL); + resource->filename[0] = NUL; + return (do_in_runtimepath(buffer, FALSE, prt_resource_name, + resource->filename) +*** ../vim-7.3.159/src/menu.c 2011-01-04 17:49:25.000000000 +0100 +--- src/menu.c 2011-04-11 15:17:21.000000000 +0200 +*************** +*** 1394,1400 **** + int idx; + { + static vimmenu_T *menu = NULL; +! static char_u tbuffer[256]; /*hack*/ + char_u *str; + #ifdef FEAT_MULTI_LANG + static int should_advance = FALSE; +--- 1394,1401 ---- + int idx; + { + static vimmenu_T *menu = NULL; +! #define TBUFFER_LEN 256 +! static char_u tbuffer[TBUFFER_LEN]; /*hack*/ + char_u *str; + #ifdef FEAT_MULTI_LANG + static int should_advance = FALSE; +*************** +*** 1428,1438 **** + { + #ifdef FEAT_MULTI_LANG + if (should_advance) +! STRCPY(tbuffer, menu->en_dname); + else + { + #endif +! STRCPY(tbuffer, menu->dname); + #ifdef FEAT_MULTI_LANG + if (menu->en_dname == NULL) + should_advance = TRUE; +--- 1429,1439 ---- + { + #ifdef FEAT_MULTI_LANG + if (should_advance) +! vim_strncpy(tbuffer, menu->en_dname, TBUFFER_LEN - 2); + else + { + #endif +! vim_strncpy(tbuffer, menu->dname, TBUFFER_LEN - 2); + #ifdef FEAT_MULTI_LANG + if (menu->en_dname == NULL) + should_advance = TRUE; +*** ../vim-7.3.159/src/misc1.c 2011-04-11 14:27:34.000000000 +0200 +--- src/misc1.c 2011-04-11 16:03:22.000000000 +0200 +*************** +*** 3332,3350 **** + if (pn == 1) + { + if (n > 0) +! STRCPY(msg_buf, _("1 more line")); + else +! STRCPY(msg_buf, _("1 line less")); + } + else + { + if (n > 0) +! sprintf((char *)msg_buf, _("%ld more lines"), pn); + else +! sprintf((char *)msg_buf, _("%ld fewer lines"), pn); + } + if (got_int) +! STRCAT(msg_buf, _(" (Interrupted)")); + if (msg(msg_buf)) + { + set_keep_msg(msg_buf, 0); +--- 3332,3354 ---- + if (pn == 1) + { + if (n > 0) +! vim_strncpy(msg_buf, (char_u *)_("1 more line"), +! MSG_BUF_LEN - 1); + else +! vim_strncpy(msg_buf, (char_u *)_("1 line less"), +! MSG_BUF_LEN - 1); + } + else + { + if (n > 0) +! vim_snprintf((char *)msg_buf, MSG_BUF_LEN, +! _("%ld more lines"), pn); + else +! vim_snprintf((char *)msg_buf, MSG_BUF_LEN, +! _("%ld fewer lines"), pn); + } + if (got_int) +! vim_strcat(msg_buf, (char_u *)_(" (Interrupted)"), MSG_BUF_LEN); + if (msg(msg_buf)) + { + set_keep_msg(msg_buf, 0); +*** ../vim-7.3.159/src/misc2.c 2010-12-08 13:11:15.000000000 +0100 +--- src/misc2.c 2011-04-11 15:30:20.000000000 +0200 +*************** +*** 1647,1652 **** +--- 1647,1674 ---- + } + + /* ++ * Like strcat(), but make sure the result fits in "tosize" bytes and is ++ * always NUL terminated. ++ */ ++ void ++ vim_strcat(to, from, tosize) ++ char_u *to; ++ char_u *from; ++ size_t tosize; ++ { ++ size_t tolen = STRLEN(to); ++ size_t fromlen = STRLEN(from); ++ ++ if (tolen + fromlen + 1 > tosize) ++ { ++ mch_memmove(to + tolen, from, tosize - tolen - 1); ++ to[tosize - 1] = NUL; ++ } ++ else ++ STRCPY(to + tolen, from); ++ } ++ ++ /* + * Isolate one part of a string option where parts are separated with + * "sep_chars". + * The part is copied into "buf[maxlen]". +*** ../vim-7.3.159/src/proto/misc2.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/misc2.pro 2011-04-11 15:29:55.000000000 +0200 +*************** +*** 40,45 **** +--- 40,46 ---- + void copy_chars __ARGS((char_u *ptr, size_t count, int c)); + void del_trailing_spaces __ARGS((char_u *ptr)); + void vim_strncpy __ARGS((char_u *to, char_u *from, size_t len)); ++ void vim_strcat __ARGS((char_u *to, char_u *from, size_t tosize)); + int copy_option_part __ARGS((char_u **option, char_u *buf, int maxlen, char *sep_chars)); + void vim_free __ARGS((void *x)); + int vim_stricmp __ARGS((char *s1, char *s2)); +*** ../vim-7.3.159/src/netbeans.c 2011-04-01 15:33:54.000000000 +0200 +--- src/netbeans.c 2011-04-11 16:02:51.000000000 +0200 +*************** +*** 3914,3927 **** + } + else + { +! char_u ebuf[BUFSIZ]; + +! STRCPY(ebuf, (char_u *)_("E505: ")); +! STRCAT(ebuf, IObuff); +! STRCAT(ebuf, (char_u *)_("is read-only (add ! to override)")); +! STRCPY(IObuff, ebuf); +! nbdebug((" %s\n", ebuf )); +! emsg(IObuff); + } + } + +--- 3914,3925 ---- + } + else + { +! char_u msgbuf[IOSIZE]; + +! vim_snprintf((char *)msgbuf, IOSIZE, +! _("E505: %s is read-only (add ! to override)"), IObuff); +! nbdebug((" %s\n", msgbuf)); +! emsg(msgbuf); + } + } + +*** ../vim-7.3.159/src/os_unix.c 2011-02-15 17:39:14.000000000 +0100 +--- src/os_unix.c 2011-04-11 16:39:11.000000000 +0200 +*************** +*** 5725,5730 **** +--- 5725,5731 ---- + if (shell_style == STYLE_PRINT && !did_find_nul) + { + /* If there is a NUL, set did_find_nul, else set check_spaces */ ++ buffer[len] = NUL; + if (len && (int)STRLEN(buffer) < (int)len - 1) + did_find_nul = TRUE; + else +*************** +*** 6594,6600 **** + xterm_hints.x = 2; + return TRUE; + } +! if (mouse_code == NULL) + { + xterm_trace = 0; + return FALSE; +--- 6595,6601 ---- + xterm_hints.x = 2; + return TRUE; + } +! if (mouse_code == NULL || STRLEN(mouse_code) > 45) + { + xterm_trace = 0; + return FALSE; +*** ../vim-7.3.159/src/spell.c 2011-02-01 13:59:44.000000000 +0100 +--- src/spell.c 2011-04-11 15:50:40.000000000 +0200 +*************** +*** 6957,6963 **** + if (ae->ae_add == NULL) + *newword = NUL; + else +! STRCPY(newword, ae->ae_add); + p = word; + if (ae->ae_chop != NULL) + { +--- 6957,6963 ---- + if (ae->ae_add == NULL) + *newword = NUL; + else +! vim_strncpy(newword, ae->ae_add, MAXWLEN - 1); + p = word; + if (ae->ae_chop != NULL) + { +*************** +*** 6978,6984 **** + else + { + /* suffix: chop/add at the end of the word */ +! STRCPY(newword, word); + if (ae->ae_chop != NULL) + { + /* Remove chop string. */ +--- 6978,6984 ---- + else + { + /* suffix: chop/add at the end of the word */ +! vim_strncpy(newword, word, MAXWLEN - 1); + if (ae->ae_chop != NULL) + { + /* Remove chop string. */ +*************** +*** 8654,8660 **** + * Write the .sug file. + * Make the file name by changing ".spl" to ".sug". + */ +! STRCPY(fname, wfname); + len = (int)STRLEN(fname); + fname[len - 2] = 'u'; + fname[len - 1] = 'g'; +--- 8654,8660 ---- + * Write the .sug file. + * Make the file name by changing ".spl" to ".sug". + */ +! vim_strncpy(fname, wfname, MAXPATHL - 1); + len = (int)STRLEN(fname); + fname[len - 2] = 'u'; + fname[len - 1] = 'g'; +*************** +*** 10261,10267 **** + + /* The suggested word may replace only part of the bad word, add + * the not replaced part. */ +! STRCPY(wcopy, stp->st_word); + if (sug.su_badlen > stp->st_orglen) + vim_strncpy(wcopy + stp->st_wordlen, + sug.su_badptr + stp->st_orglen, +--- 10261,10267 ---- + + /* The suggested word may replace only part of the bad word, add + * the not replaced part. */ +! vim_strncpy(wcopy, stp->st_word, MAXWLEN); + if (sug.su_badlen > stp->st_orglen) + vim_strncpy(wcopy + stp->st_wordlen, + sug.su_badptr + stp->st_orglen, +*************** +*** 13162,13168 **** + pbad = badsound2; + } + +! if (lendiff > 0) + { + /* Add part of the bad word to the good word, so that we soundfold + * what replaces the bad word. */ +--- 13162,13168 ---- + pbad = badsound2; + } + +! if (lendiff > 0 && stp->st_wordlen + lendiff < MAXWLEN) + { + /* Add part of the bad word to the good word, so that we soundfold + * what replaces the bad word. */ +*************** +*** 13875,13881 **** + for (i = gap->ga_len - 1; i >= 0; --i) + { + /* Need to append what follows to check for "the the". */ +! STRCPY(longword, stp[i].st_word); + len = stp[i].st_wordlen; + vim_strncpy(longword + len, su->su_badptr + stp[i].st_orglen, + MAXWLEN - len); +--- 13875,13881 ---- + for (i = gap->ga_len - 1; i >= 0; --i) + { + /* Need to append what follows to check for "the the". */ +! vim_strncpy(longword, stp[i].st_word, MAXWLEN); + len = stp[i].st_wordlen; + vim_strncpy(longword + len, su->su_badptr + stp[i].st_orglen, + MAXWLEN - len); +*************** +*** 14221,14227 **** + *t = NUL; + } + else +! STRCPY(word, s); + + smp = (salitem_T *)slang->sl_sal.ga_data; + +--- 14221,14227 ---- + *t = NUL; + } + else +! vim_strncpy(word, s, MAXWLEN - 1); + + smp = (salitem_T *)slang->sl_sal.ga_data; + +*** ../vim-7.3.159/src/syntax.c 2011-04-02 15:12:45.000000000 +0200 +--- src/syntax.c 2011-04-11 15:44:30.000000000 +0200 +*************** +*** 8576,8583 **** + if (iarg & hl_attr_table[i]) + { + if (buf[0] != NUL) +! STRCAT(buf, ","); +! STRCAT(buf, hl_name_table[i]); + iarg &= ~hl_attr_table[i]; /* don't want "inverse" */ + } + } +--- 8576,8583 ---- + if (iarg & hl_attr_table[i]) + { + if (buf[0] != NUL) +! vim_strcat(buf, (char_u *)",", 100); +! vim_strcat(buf, (char_u *)hl_name_table[i], 100); + iarg &= ~hl_attr_table[i]; /* don't want "inverse" */ + } + } +*** ../vim-7.3.159/src/tag.c 2011-02-25 15:13:43.000000000 +0100 +--- src/tag.c 2011-04-11 15:34:59.000000000 +0200 +*************** +*** 806,812 **** + p = tag_full_fname(&tagp); + if (p == NULL) + continue; +! STRCPY(fname, p); + vim_free(p); + + /* +--- 806,812 ---- + p = tag_full_fname(&tagp); + if (p == NULL) + continue; +! vim_strncpy(fname, p, MAXPATHL); + vim_free(p); + + /* +*** ../vim-7.3.159/src/version.c 2011-04-11 14:29:13.000000000 +0200 +--- src/version.c 2011-04-11 16:50:53.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 160, + /**/ + +-- +If someone questions your market projections, simply point out that your +target market is "People who are nuts" and "People who will buy any damn +thing". Nobody is going to tell you there aren't enough of those people +to go around. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 266bc257d3b3b31e24d4d904b2e06c74d2365a84 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0334/3803] Patchlevel 161 --- 7.3.161 | 1645 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1645 insertions(+) create mode 100644 7.3.161 diff --git a/7.3.161 b/7.3.161 new file mode 100644 index 00000000..61223ec2 --- /dev/null +++ b/7.3.161 @@ -0,0 +1,1645 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.161 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.161 +Problem: Items on the stack may be too big. +Solution: Make items static or allocate them. +Files: src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, + src/fileio.c, src/hardcopy.c, src/quickfix.c, src/main.c, + src/netbeans.c, src/spell.c, src/tag.c, src/vim.h, src/xxd/xxd.c + + +*** ../vim-7.3.160/src/eval.c 2011-04-11 13:46:07.000000000 +0200 +--- src/eval.c 2011-04-11 21:05:50.000000000 +0200 +*************** +*** 11100,11117 **** + typval_T *argvars UNUSED; + typval_T *rettv; + { +! char_u cwd[MAXPATHL]; + + rettv->v_type = VAR_STRING; +! if (mch_dirname(cwd, MAXPATHL) == FAIL) +! rettv->vval.v_string = NULL; +! else + { +! rettv->vval.v_string = vim_strsave(cwd); + #ifdef BACKSLASH_IN_FILENAME +! if (rettv->vval.v_string != NULL) +! slash_adjust(rettv->vval.v_string); + #endif + } + } + +--- 11100,11121 ---- + typval_T *argvars UNUSED; + typval_T *rettv; + { +! char_u *cwd; + + rettv->v_type = VAR_STRING; +! rettv->vval.v_string = NULL; +! cwd = alloc(MAXPATHL); +! if (cwd != NULL) + { +! if (mch_dirname(cwd, MAXPATHL) != FAIL) +! { +! rettv->vval.v_string = vim_strsave(cwd); + #ifdef BACKSLASH_IN_FILENAME +! if (rettv->vval.v_string != NULL) +! slash_adjust(rettv->vval.v_string); + #endif ++ } ++ vim_free(cwd); + } + } + +*************** +*** 14938,14943 **** +--- 14942,14950 ---- + typval_T *rettv; + { + char_u *p; ++ #ifdef HAVE_READLINK ++ char_u *buf = NULL; ++ #endif + + p = get_tv_string(&argvars[0]); + #ifdef FEAT_SHORTCUT +*************** +*** 14953,14959 **** + #else + # ifdef HAVE_READLINK + { +- char_u buf[MAXPATHL + 1]; + char_u *cpy; + int len; + char_u *remain = NULL; +--- 14960,14965 ---- +*************** +*** 14981,14986 **** +--- 14987,14996 ---- + q[-1] = NUL; + } + ++ buf = alloc(MAXPATHL + 1); ++ if (buf == NULL) ++ goto fail; ++ + for (;;) + { + for (;;) +*************** +*** 15124,15129 **** +--- 15134,15140 ---- + + #ifdef HAVE_READLINK + fail: ++ vim_free(buf); + #endif + rettv->v_type = VAR_STRING; + } +*************** +*** 17604,17621 **** + typval_T *argvars UNUSED; + typval_T *rettv; + { +! char_u fname[MAXPATHL + 1]; + tagname_T tn; + int first; + + if (rettv_list_alloc(rettv) == FAIL) + return; + + for (first = TRUE; ; first = FALSE) + if (get_tagfname(&tn, first, fname) == FAIL + || list_append_string(rettv->vval.v_list, fname, -1) == FAIL) + break; + tagname_free(&tn); + } + + /* +--- 17615,17636 ---- + typval_T *argvars UNUSED; + typval_T *rettv; + { +! char_u *fname; + tagname_T tn; + int first; + + if (rettv_list_alloc(rettv) == FAIL) + return; ++ fname = alloc(MAXPATHL); ++ if (fname == NULL) ++ return; + + for (first = TRUE; ; first = FALSE) + if (get_tagfname(&tn, first, fname) == FAIL + || list_append_string(rettv->vval.v_list, fname, -1) == FAIL) + break; + tagname_free(&tn); ++ vim_free(fname); + } + + /* +*** ../vim-7.3.160/src/ex_cmds.c 2011-02-01 13:48:47.000000000 +0100 +--- src/ex_cmds.c 2011-04-11 20:51:34.000000000 +0200 +*************** +*** 2777,2783 **** + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if (p_confirm || cmdmod.confirm) + { +! char_u buff[IOSIZE]; + + dialog_msg(buff, _("Overwrite existing file \"%s\"?"), fname); + if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 2) != VIM_YES) +--- 2777,2783 ---- + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if (p_confirm || cmdmod.confirm) + { +! char_u buff[DIALOG_MSG_SIZE]; + + dialog_msg(buff, _("Overwrite existing file \"%s\"?"), fname); + if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 2) != VIM_YES) +*************** +*** 2795,2801 **** + /* For ":w! filename" check that no swap file exists for "filename". */ + if (other && !emsg_silent) + { +! char_u dir[MAXPATHL]; + char_u *p; + int r; + char_u *swapname; +--- 2795,2801 ---- + /* For ":w! filename" check that no swap file exists for "filename". */ + if (other && !emsg_silent) + { +! char_u *dir; + char_u *p; + int r; + char_u *swapname; +*************** +*** 2806,2825 **** + * Use 'shortname' of the current buffer, since there is no buffer + * for the written file. */ + if (*p_dir == NUL) + STRCPY(dir, "."); + else + { + p = p_dir; + copy_option_part(&p, dir, MAXPATHL, ","); + } + swapname = makeswapname(fname, ffname, curbuf, dir); + r = vim_fexists(swapname); + if (r) + { + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if (p_confirm || cmdmod.confirm) + { +! char_u buff[IOSIZE]; + + dialog_msg(buff, + _("Swap file \"%s\" exists, overwrite anyway?"), +--- 2806,2834 ---- + * Use 'shortname' of the current buffer, since there is no buffer + * for the written file. */ + if (*p_dir == NUL) ++ { ++ dir = alloc(5); ++ if (dir == NULL) ++ return FAIL; + STRCPY(dir, "."); ++ } + else + { ++ dir = alloc(MAXPATHL); ++ if (dir == NULL) ++ return FAIL; + p = p_dir; + copy_option_part(&p, dir, MAXPATHL, ","); + } + swapname = makeswapname(fname, ffname, curbuf, dir); ++ vim_free(dir); + r = vim_fexists(swapname); + if (r) + { + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if (p_confirm || cmdmod.confirm) + { +! char_u buff[DIALOG_MSG_SIZE]; + + dialog_msg(buff, + _("Swap file \"%s\" exists, overwrite anyway?"), +*************** +*** 2969,2975 **** + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if ((p_confirm || cmdmod.confirm) && buf->b_fname != NULL) + { +! char_u buff[IOSIZE]; + + if (buf->b_p_ro) + dialog_msg(buff, _("'readonly' option is set for \"%s\".\nDo you wish to write anyway?"), +--- 2978,2984 ---- + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if ((p_confirm || cmdmod.confirm) && buf->b_fname != NULL) + { +! char_u buff[DIALOG_MSG_SIZE]; + + if (buf->b_p_ro) + dialog_msg(buff, _("'readonly' option is set for \"%s\".\nDo you wish to write anyway?"), +*** ../vim-7.3.160/src/ex_cmds2.c 2011-02-25 14:46:06.000000000 +0100 +--- src/ex_cmds2.c 2011-04-11 20:51:40.000000000 +0200 +*************** +*** 1492,1498 **** + buf_T *buf; + int checkall; /* may abandon all changed buffers */ + { +! char_u buff[IOSIZE]; + int ret; + buf_T *buf2; + +--- 1492,1498 ---- + buf_T *buf; + int checkall; /* may abandon all changed buffers */ + { +! char_u buff[DIALOG_MSG_SIZE]; + int ret; + buf_T *buf2; + +*** ../vim-7.3.160/src/ex_docmd.c 2011-04-11 16:56:29.000000000 +0200 +--- src/ex_docmd.c 2011-04-11 21:20:35.000000000 +0200 +*************** +*** 5093,5106 **** + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if ((p_confirm || cmdmod.confirm) && curbuf->b_fname != NULL) + { +! char_u buff[IOSIZE]; + + if (n == 1) + vim_strncpy(buff, + (char_u *)_("1 more file to edit. Quit anyway?"), +! IOSIZE - 1); + else +! vim_snprintf((char *)buff, IOSIZE, + _("%d more files to edit. Quit anyway?"), n); + if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 1) == VIM_YES) + return OK; +--- 5093,5106 ---- + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if ((p_confirm || cmdmod.confirm) && curbuf->b_fname != NULL) + { +! char_u buff[DIALOG_MSG_SIZE]; + + if (n == 1) + vim_strncpy(buff, + (char_u *)_("1 more file to edit. Quit anyway?"), +! DIALOG_MSG_SIZE - 1); + else +! vim_snprintf((char *)buff, DIALOG_MSG_SIZE, + _("%d more files to edit. Quit anyway?"), n); + if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 1) == VIM_YES) + return OK; +*************** +*** 8926,8960 **** + failed = TRUE; + if (eap->cmdidx == CMD_mksession) + { +! char_u dirnow[MAXPATHL]; /* current directory */ + +! /* +! * Change to session file's dir. +! */ +! if (mch_dirname(dirnow, MAXPATHL) == FAIL +! || mch_chdir((char *)dirnow) != 0) +! *dirnow = NUL; +! if (*dirnow != NUL && (ssop_flags & SSOP_SESDIR)) +! { +! if (vim_chdirfile(fname) == OK) +! shorten_fnames(TRUE); +! } +! else if (*dirnow != NUL +! && (ssop_flags & SSOP_CURDIR) && globaldir != NULL) + { +! if (mch_chdir((char *)globaldir) == 0) +! shorten_fnames(TRUE); +! } + +! failed |= (makeopens(fd, dirnow) == FAIL); + +! /* restore original dir */ +! if (*dirnow != NUL && ((ssop_flags & SSOP_SESDIR) + || ((ssop_flags & SSOP_CURDIR) && globaldir != NULL))) +! { +! if (mch_chdir((char *)dirnow) != 0) +! EMSG(_(e_prev_dir)); +! shorten_fnames(TRUE); + } + } + else +--- 8926,8967 ---- + failed = TRUE; + if (eap->cmdidx == CMD_mksession) + { +! char_u *dirnow; /* current directory */ + +! dirnow = alloc(MAXPATHL); +! if (dirnow == NULL) +! failed = TRUE; +! else + { +! /* +! * Change to session file's dir. +! */ +! if (mch_dirname(dirnow, MAXPATHL) == FAIL +! || mch_chdir((char *)dirnow) != 0) +! *dirnow = NUL; +! if (*dirnow != NUL && (ssop_flags & SSOP_SESDIR)) +! { +! if (vim_chdirfile(fname) == OK) +! shorten_fnames(TRUE); +! } +! else if (*dirnow != NUL +! && (ssop_flags & SSOP_CURDIR) && globaldir != NULL) +! { +! if (mch_chdir((char *)globaldir) == 0) +! shorten_fnames(TRUE); +! } + +! failed |= (makeopens(fd, dirnow) == FAIL); + +! /* restore original dir */ +! if (*dirnow != NUL && ((ssop_flags & SSOP_SESDIR) + || ((ssop_flags & SSOP_CURDIR) && globaldir != NULL))) +! { +! if (mch_chdir((char *)dirnow) != 0) +! EMSG(_(e_prev_dir)); +! shorten_fnames(TRUE); +! } +! vim_free(dirnow); + } + } + else +*************** +*** 8985,8994 **** + else if (eap->cmdidx == CMD_mksession) + { + /* successful session write - set this_session var */ +! char_u tbuf[MAXPATHL]; + +! if (vim_FullName(fname, tbuf, MAXPATHL, FALSE) == OK) +! set_vim_var_string(VV_THIS_SESSION, tbuf, -1); + } + #endif + #ifdef MKSESSION_NL +--- 8992,9006 ---- + else if (eap->cmdidx == CMD_mksession) + { + /* successful session write - set this_session var */ +! char_u *tbuf; + +! tbuf = alloc(MAXPATHL); +! if (tbuf != NULL) +! { +! if (vim_FullName(fname, tbuf, MAXPATHL, FALSE) == OK) +! set_vim_var_string(VV_THIS_SESSION, tbuf, -1); +! vim_free(tbuf); +! } + } + #endif + #ifdef MKSESSION_NL +*************** +*** 10677,10683 **** + unsigned *flagp; + { + int i; +! char_u buf[MAXPATHL]; + char_u *s; + + if (gap->ga_len == 0) +--- 10689,10695 ---- + unsigned *flagp; + { + int i; +! char_u *buf = NULL; + char_u *s; + + if (gap->ga_len == 0) +*************** +*** 10692,10702 **** + { + if (fullname) + { +! (void)vim_FullName(s, buf, MAXPATHL, FALSE); +! s = buf; + } + if (fputs(" ", fd) < 0 || ses_put_fname(fd, s, flagp) == FAIL) + return FAIL; + } + } + return put_eol(fd); +--- 10704,10722 ---- + { + if (fullname) + { +! buf = alloc(MAXPATHL); +! if (buf != NULL) +! { +! (void)vim_FullName(s, buf, MAXPATHL, FALSE); +! s = buf; +! } + } + if (fputs(" ", fd) < 0 || ses_put_fname(fd, s, flagp) == FAIL) ++ { ++ vim_free(buf); + return FAIL; ++ } ++ vim_free(buf); + } + } + return put_eol(fd); +*************** +*** 10925,10931 **** + + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) || defined(PROTO) + /* +! * Make a dialog message in "buff[IOSIZE]". + * "format" must contain "%s". + */ + void +--- 10945,10951 ---- + + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) || defined(PROTO) + /* +! * Make a dialog message in "buff[DIALOG_MSG_SIZE]". + * "format" must contain "%s". + */ + void +*************** +*** 10936,10942 **** + { + if (fname == NULL) + fname = (char_u *)_("Untitled"); +! vim_snprintf((char *)buff, IOSIZE, format, fname); + } + #endif + +--- 10956,10962 ---- + { + if (fname == NULL) + fname = (char_u *)_("Untitled"); +! vim_snprintf((char *)buff, DIALOG_MSG_SIZE, format, fname); + } + #endif + +*** ../vim-7.3.160/src/fileio.c 2011-02-25 16:52:13.000000000 +0100 +--- src/fileio.c 2011-04-11 18:35:10.000000000 +0200 +*************** +*** 6023,6037 **** + shorten_fname1(full_path) + char_u *full_path; + { +! char_u dirname[MAXPATHL]; + char_u *p = full_path; + + if (mch_dirname(dirname, MAXPATHL) == OK) + { + p = shorten_fname(full_path, dirname); + if (p == NULL || *p == NUL) + p = full_path; + } + return p; + } + #endif +--- 6023,6041 ---- + shorten_fname1(full_path) + char_u *full_path; + { +! char_u *dirname; + char_u *p = full_path; + ++ dirname = alloc(MAXPATHL); ++ if (dirname == NULL) ++ return full_path; + if (mch_dirname(dirname, MAXPATHL) == OK) + { + p = shorten_fname(full_path, dirname); + if (p == NULL || *p == NUL) + p = full_path; + } ++ vim_free(dirname); + return p; + } + #endif +*** ../vim-7.3.160/src/hardcopy.c 2011-04-11 16:56:29.000000000 +0200 +--- src/hardcopy.c 2011-04-11 18:23:38.000000000 +0200 +*************** +*** 1759,1765 **** + char *name; + struct prt_ps_resource_S *resource; + { +! char_u buffer[MAXPATHL + 1]; + + vim_strncpy(resource->name, (char_u *)name, 63); + /* Look for named resource file in runtimepath */ +--- 1759,1770 ---- + char *name; + struct prt_ps_resource_S *resource; + { +! char_u *buffer; +! int retval; +! +! buffer = alloc(MAXPATHL + 1); +! if (buffer == NULL) +! return FALSE; + + vim_strncpy(resource->name, (char_u *)name, 63); + /* Look for named resource file in runtimepath */ +*************** +*** 1768,1776 **** + vim_strcat(buffer, (char_u *)name, MAXPATHL); + vim_strcat(buffer, (char_u *)".ps", MAXPATHL); + resource->filename[0] = NUL; +! return (do_in_runtimepath(buffer, FALSE, prt_resource_name, + resource->filename) + && resource->filename[0] != NUL); + } + + /* PS CR and LF characters have platform independent values */ +--- 1773,1783 ---- + vim_strcat(buffer, (char_u *)name, MAXPATHL); + vim_strcat(buffer, (char_u *)".ps", MAXPATHL); + resource->filename[0] = NUL; +! retval = (do_in_runtimepath(buffer, FALSE, prt_resource_name, + resource->filename) + && resource->filename[0] != NUL); ++ vim_free(buffer); ++ return retval; + } + + /* PS CR and LF characters have platform independent values */ +*************** +*** 2848,2862 **** + double right; + double top; + double bottom; +! struct prt_ps_resource_S res_prolog; +! struct prt_ps_resource_S res_encoding; + char buffer[256]; + char_u *p_encoding; + char_u *p; + #ifdef FEAT_MBYTE +! struct prt_ps_resource_S res_cidfont; +! struct prt_ps_resource_S res_cmap; + #endif + + /* + * PS DSC Header comments - no PS code! +--- 2855,2887 ---- + double right; + double top; + double bottom; +! struct prt_ps_resource_S *res_prolog; +! struct prt_ps_resource_S *res_encoding; + char buffer[256]; + char_u *p_encoding; + char_u *p; + #ifdef FEAT_MBYTE +! struct prt_ps_resource_S *res_cidfont; +! struct prt_ps_resource_S *res_cmap; + #endif ++ int retval = FALSE; ++ ++ res_prolog = (struct prt_ps_resource_S *) ++ alloc(sizeof(struct prt_ps_resource_S)); ++ res_encoding = (struct prt_ps_resource_S *) ++ alloc(sizeof(struct prt_ps_resource_S)); ++ #ifdef FEAT_MBYTE ++ res_cidfont = (struct prt_ps_resource_S *) ++ alloc(sizeof(struct prt_ps_resource_S)); ++ res_cmap = (struct prt_ps_resource_S *) ++ alloc(sizeof(struct prt_ps_resource_S)); ++ #endif ++ if (res_prolog == NULL || res_encoding == NULL ++ #ifdef FEAT_MBYTE ++ || res_cidfont == NULL || res_cmap == NULL ++ #endif ++ ) ++ goto theend; + + /* + * PS DSC Header comments - no PS code! +*************** +*** 2932,2958 **** + #endif + + /* Search for external resources VIM supplies */ +! if (!prt_find_resource("prolog", &res_prolog)) + { + EMSG(_("E456: Can't find PostScript resource file \"prolog.ps\"")); + return FALSE; + } +! if (!prt_open_resource(&res_prolog)) + return FALSE; +! if (!prt_check_resource(&res_prolog, PRT_PROLOG_VERSION)) + return FALSE; + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { + /* Look for required version of multi-byte printing procset */ +! if (!prt_find_resource("cidfont", &res_cidfont)) + { + EMSG(_("E456: Can't find PostScript resource file \"cidfont.ps\"")); + return FALSE; + } +! if (!prt_open_resource(&res_cidfont)) + return FALSE; +! if (!prt_check_resource(&res_cidfont, PRT_CID_PROLOG_VERSION)) + return FALSE; + } + #endif +--- 2957,2983 ---- + #endif + + /* Search for external resources VIM supplies */ +! if (!prt_find_resource("prolog", res_prolog)) + { + EMSG(_("E456: Can't find PostScript resource file \"prolog.ps\"")); + return FALSE; + } +! if (!prt_open_resource(res_prolog)) + return FALSE; +! if (!prt_check_resource(res_prolog, PRT_PROLOG_VERSION)) + return FALSE; + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { + /* Look for required version of multi-byte printing procset */ +! if (!prt_find_resource("cidfont", res_cidfont)) + { + EMSG(_("E456: Can't find PostScript resource file \"cidfont.ps\"")); + return FALSE; + } +! if (!prt_open_resource(res_cidfont)) + return FALSE; +! if (!prt_check_resource(res_cidfont, PRT_CID_PROLOG_VERSION)) + return FALSE; + } + #endif +*************** +*** 2968,2974 **** + #endif + p_encoding = enc_skip(p_penc); + if (*p_encoding == NUL +! || !prt_find_resource((char *)p_encoding, &res_encoding)) + { + /* 'printencoding' not set or not supported - find alternate */ + #ifdef FEAT_MBYTE +--- 2993,2999 ---- + #endif + p_encoding = enc_skip(p_penc); + if (*p_encoding == NUL +! || !prt_find_resource((char *)p_encoding, res_encoding)) + { + /* 'printencoding' not set or not supported - find alternate */ + #ifdef FEAT_MBYTE +*************** +*** 2977,2989 **** + p_encoding = enc_skip(p_enc); + props = enc_canon_props(p_encoding); + if (!(props & ENC_8BIT) +! || !prt_find_resource((char *)p_encoding, &res_encoding)) + /* 8-bit 'encoding' is not supported */ + #endif + { + /* Use latin1 as default printing encoding */ + p_encoding = (char_u *)"latin1"; +! if (!prt_find_resource((char *)p_encoding, &res_encoding)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + p_encoding); +--- 3002,3014 ---- + p_encoding = enc_skip(p_enc); + props = enc_canon_props(p_encoding); + if (!(props & ENC_8BIT) +! || !prt_find_resource((char *)p_encoding, res_encoding)) + /* 8-bit 'encoding' is not supported */ + #endif + { + /* Use latin1 as default printing encoding */ + p_encoding = (char_u *)"latin1"; +! if (!prt_find_resource((char *)p_encoding, res_encoding)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + p_encoding); +*************** +*** 2991,2997 **** + } + } + } +! if (!prt_open_resource(&res_encoding)) + return FALSE; + /* For the moment there are no checks on encoding resource files to + * perform */ +--- 3016,3022 ---- + } + } + } +! if (!prt_open_resource(res_encoding)) + return FALSE; + /* For the moment there are no checks on encoding resource files to + * perform */ +*************** +*** 3005,3017 **** + if (prt_use_courier) + { + /* Include ASCII range encoding vector */ +! if (!prt_find_resource(prt_ascii_encoding, &res_encoding)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + prt_ascii_encoding); + return FALSE; + } +! if (!prt_open_resource(&res_encoding)) + return FALSE; + /* For the moment there are no checks on encoding resource files to + * perform */ +--- 3030,3042 ---- + if (prt_use_courier) + { + /* Include ASCII range encoding vector */ +! if (!prt_find_resource(prt_ascii_encoding, res_encoding)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + prt_ascii_encoding); + return FALSE; + } +! if (!prt_open_resource(res_encoding)) + return FALSE; + /* For the moment there are no checks on encoding resource files to + * perform */ +*************** +*** 3034,3077 **** + if (prt_out_mbyte && prt_custom_cmap) + { + /* Find user supplied CMap */ +! if (!prt_find_resource(prt_cmap, &res_cmap)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + prt_cmap); + return FALSE; + } +! if (!prt_open_resource(&res_cmap)) + return FALSE; + } + #endif + + /* List resources supplied */ +! STRCPY(buffer, res_prolog.title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_prolog.version); + prt_dsc_resources("DocumentSuppliedResources", "procset", buffer); + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { +! STRCPY(buffer, res_cidfont.title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_cidfont.version); + prt_dsc_resources(NULL, "procset", buffer); + + if (prt_custom_cmap) + { +! STRCPY(buffer, res_cmap.title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_cmap.version); + prt_dsc_resources(NULL, "cmap", buffer); + } + } + if (!prt_out_mbyte || prt_use_courier) + #endif + { +! STRCPY(buffer, res_encoding.title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_encoding.version); + prt_dsc_resources(NULL, "encoding", buffer); + } + prt_dsc_requirements(prt_duplex, prt_tumble, prt_collate, +--- 3059,3102 ---- + if (prt_out_mbyte && prt_custom_cmap) + { + /* Find user supplied CMap */ +! if (!prt_find_resource(prt_cmap, res_cmap)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + prt_cmap); + return FALSE; + } +! if (!prt_open_resource(res_cmap)) + return FALSE; + } + #endif + + /* List resources supplied */ +! STRCPY(buffer, res_prolog->title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_prolog->version); + prt_dsc_resources("DocumentSuppliedResources", "procset", buffer); + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { +! STRCPY(buffer, res_cidfont->title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_cidfont->version); + prt_dsc_resources(NULL, "procset", buffer); + + if (prt_custom_cmap) + { +! STRCPY(buffer, res_cmap->title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_cmap->version); + prt_dsc_resources(NULL, "cmap", buffer); + } + } + if (!prt_out_mbyte || prt_use_courier) + #endif + { +! STRCPY(buffer, res_encoding->title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_encoding->version); + prt_dsc_resources(NULL, "encoding", buffer); + } + prt_dsc_requirements(prt_duplex, prt_tumble, prt_collate, +*************** +*** 3114,3128 **** + prt_dsc_noarg("BeginProlog"); + + /* Add required procsets - NOTE: order is important! */ +! if (!prt_add_resource(&res_prolog)) + return FALSE; + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { + /* Add CID font procset, and any user supplied CMap */ +! if (!prt_add_resource(&res_cidfont)) + return FALSE; +! if (prt_custom_cmap && !prt_add_resource(&res_cmap)) + return FALSE; + } + #endif +--- 3139,3153 ---- + prt_dsc_noarg("BeginProlog"); + + /* Add required procsets - NOTE: order is important! */ +! if (!prt_add_resource(res_prolog)) + return FALSE; + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { + /* Add CID font procset, and any user supplied CMap */ +! if (!prt_add_resource(res_cidfont)) + return FALSE; +! if (prt_custom_cmap && !prt_add_resource(res_cmap)) + return FALSE; + } + #endif +*************** +*** 3132,3138 **** + #endif + /* There will be only one Roman font encoding to be included in the PS + * file. */ +! if (!prt_add_resource(&res_encoding)) + return FALSE; + + prt_dsc_noarg("EndProlog"); +--- 3157,3163 ---- + #endif + /* There will be only one Roman font encoding to be included in the PS + * file. */ +! if (!prt_add_resource(res_encoding)) + return FALSE; + + prt_dsc_noarg("EndProlog"); +*************** +*** 3248,3254 **** + prt_dsc_noarg("EndSetup"); + + /* Fail if any problems writing out to the PS file */ +! return !prt_file_error; + } + + void +--- 3273,3289 ---- + prt_dsc_noarg("EndSetup"); + + /* Fail if any problems writing out to the PS file */ +! retval = !prt_file_error; +! +! theend: +! vim_free(res_prolog); +! vim_free(res_encoding); +! #ifdef FEAT_MBYTE +! vim_free(res_cidfont); +! vim_free(res_cmap); +! #endif +! +! return retval; + } + + void +*** ../vim-7.3.160/src/quickfix.c 2010-12-02 15:33:10.000000000 +0100 +--- src/quickfix.c 2011-04-11 17:54:07.000000000 +0200 +*************** +*** 3049,3056 **** + int flags = 0; + colnr_T col; + long tomatch; +! char_u dirname_start[MAXPATHL]; +! char_u dirname_now[MAXPATHL]; + char_u *target_dir = NULL; + #ifdef FEAT_AUTOCMD + char_u *au_name = NULL; +--- 3049,3056 ---- + int flags = 0; + colnr_T col; + long tomatch; +! char_u *dirname_start = NULL; +! char_u *dirname_now = NULL; + char_u *target_dir = NULL; + #ifdef FEAT_AUTOCMD + char_u *au_name = NULL; +*************** +*** 3128,3133 **** +--- 3128,3138 ---- + goto theend; + } + ++ dirname_start = alloc(MAXPATHL); ++ dirname_now = alloc(MAXPATHL); ++ if (dirname_start == NULL || dirname_now == NULL) ++ goto theend; ++ + /* Remember the current directory, because a BufRead autocommand that does + * ":lcd %:p:h" changes the meaning of short path names. */ + mch_dirname(dirname_start, MAXPATHL); +*************** +*** 3364,3369 **** +--- 3369,3376 ---- + } + + theend: ++ vim_free(dirname_now); ++ vim_free(dirname_start); + vim_free(target_dir); + vim_free(regmatch.regprog); + } +*** ../vim-7.3.160/src/main.c 2011-03-22 18:10:34.000000000 +0100 +--- src/main.c 2011-04-11 18:06:06.000000000 +0200 +*************** +*** 3814,3820 **** + int i; + char_u *inicmd = NULL; + char_u *p; +! char_u cwd[MAXPATHL]; + + if (filec > 0 && filev[0][0] == '+') + { +--- 3814,3820 ---- + int i; + char_u *inicmd = NULL; + char_u *p; +! char_u *cwd; + + if (filec > 0 && filev[0][0] == '+') + { +*************** +*** 3827,3841 **** + mainerr_arg_missing((char_u *)filev[-1]); + + /* Temporarily cd to the current directory to handle relative file names. */ + if (mch_dirname(cwd, MAXPATHL) != OK) + return NULL; +! if ((p = vim_strsave_escaped_ext(cwd, + #ifdef BACKSLASH_IN_FILENAME + "", /* rem_backslash() will tell what chars to escape */ + #else + PATH_ESC_CHARS, + #endif +! '\\', TRUE)) == NULL) + return NULL; + ga_init2(&ga, 1, 100); + ga_concat(&ga, (char_u *)":cd "); +--- 3827,3849 ---- + mainerr_arg_missing((char_u *)filev[-1]); + + /* Temporarily cd to the current directory to handle relative file names. */ ++ cwd = alloc(MAXPATHL); ++ if (cwd == NULL) ++ return NULL; + if (mch_dirname(cwd, MAXPATHL) != OK) ++ { ++ vim_free(cwd); + return NULL; +! } +! p = vim_strsave_escaped_ext(cwd, + #ifdef BACKSLASH_IN_FILENAME + "", /* rem_backslash() will tell what chars to escape */ + #else + PATH_ESC_CHARS, + #endif +! '\\', TRUE); +! vim_free(cwd); +! if (p == NULL) + return NULL; + ga_init2(&ga, 1, 100); + ga_concat(&ga, (char_u *)":cd "); +*** ../vim-7.3.160/src/netbeans.c 2011-04-11 16:56:29.000000000 +0200 +--- src/netbeans.c 2011-04-11 18:27:08.000000000 +0200 +*************** +*** 2891,2897 **** + char_u *text; + linenr_T lnum; + int col; +! char buf[MAXPATHL * 2 + 25]; + char_u *p; + + /* Don't do anything when 'ballooneval' is off, messages scrolled the +--- 2891,2897 ---- + char_u *text; + linenr_T lnum; + int col; +! char *buf; + char_u *p; + + /* Don't do anything when 'ballooneval' is off, messages scrolled the +*************** +*** 2905,2919 **** + * length. */ + if (text != NULL && text[0] != NUL && STRLEN(text) < MAXPATHL) + { +! p = nb_quote(text); +! if (p != NULL) + { +! vim_snprintf(buf, sizeof(buf), +! "0:balloonText=%d \"%s\"\n", r_cmdno, p); +! vim_free(p); + } +- nbdebug(("EVT: %s", buf)); +- nb_send(buf, "netbeans_beval_cb"); + } + vim_free(text); + } +--- 2905,2924 ---- + * length. */ + if (text != NULL && text[0] != NUL && STRLEN(text) < MAXPATHL) + { +! buf = (char *)alloc(MAXPATHL * 2 + 25); +! if (buf != NULL) + { +! p = nb_quote(text); +! if (p != NULL) +! { +! vim_snprintf(buf, MAXPATHL * 2 + 25, +! "0:balloonText=%d \"%s\"\n", r_cmdno, p); +! vim_free(p); +! } +! nbdebug(("EVT: %s", buf)); +! nb_send(buf, "netbeans_beval_cb"); +! vim_free(buf); + } + } + vim_free(text); + } +*** ../vim-7.3.160/src/spell.c 2011-04-11 16:56:29.000000000 +0200 +--- src/spell.c 2011-04-11 18:00:49.000000000 +0200 +*************** +*** 8590,8596 **** + spellinfo_T *spin; + char_u *wfname; + { +! char_u fname[MAXPATHL]; + int len; + slang_T *slang; + int free_slang = FALSE; +--- 8590,8596 ---- + spellinfo_T *spin; + char_u *wfname; + { +! char_u *fname = NULL; + int len; + slang_T *slang; + int free_slang = FALSE; +*************** +*** 8654,8659 **** +--- 8654,8662 ---- + * Write the .sug file. + * Make the file name by changing ".spl" to ".sug". + */ ++ fname = alloc(MAXPATHL); ++ if (fname == NULL) ++ goto theend; + vim_strncpy(fname, wfname, MAXPATHL - 1); + len = (int)STRLEN(fname); + fname[len - 2] = 'u'; +*************** +*** 8661,8666 **** +--- 8664,8670 ---- + sug_write(spin, fname); + + theend: ++ vim_free(fname); + if (free_slang) + slang_free(slang); + free_blocks(spin->si_blocks); +*************** +*** 9106,9113 **** + int overwrite; /* overwrite existing output file */ + int added_word; /* invoked through "zg" */ + { +! char_u fname[MAXPATHL]; +! char_u wfname[MAXPATHL]; + char_u **innames; + int incount; + afffile_T *(afile[8]); +--- 9110,9117 ---- + int overwrite; /* overwrite existing output file */ + int added_word; /* invoked through "zg" */ + { +! char_u *fname = NULL; +! char_u *wfname; + char_u **innames; + int incount; + afffile_T *(afile[8]); +*************** +*** 9135,9140 **** +--- 9139,9148 ---- + innames = &fnames[1]; + incount = fcount - 1; + ++ wfname = alloc(MAXPATHL); ++ if (wfname == NULL) ++ return; ++ + if (fcount >= 1) + { + len = (int)STRLEN(fnames[0]); +*************** +*** 9144,9167 **** + * "path/en.latin1.add.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, sizeof(wfname), "%s.spl", fnames[0]); + } + else if (fcount == 1) + { + /* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL, + fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + } + else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0) + { + /* Name ends in ".spl", use as the file name. */ +! vim_strncpy(wfname, fnames[0], sizeof(wfname) - 1); + } + else + /* Name should be language, make the file name from it. */ +! vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL, + fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + + /* Check for .ascii.spl. */ +--- 9152,9175 ---- + * "path/en.latin1.add.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, MAXPATHL, "%s.spl", fnames[0]); + } + else if (fcount == 1) + { + /* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, MAXPATHL, SPL_FNAME_TMPL, + fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + } + else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0) + { + /* Name ends in ".spl", use as the file name. */ +! vim_strncpy(wfname, fnames[0], MAXPATHL - 1); + } + else + /* Name should be language, make the file name from it. */ +! vim_snprintf((char *)wfname, MAXPATHL, SPL_FNAME_TMPL, + fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + + /* Check for .ascii.spl. */ +*************** +*** 9186,9199 **** + if (!overwrite && mch_stat((char *)wfname, &st) >= 0) + { + EMSG(_(e_exists)); +! return; + } + if (mch_isdir(wfname)) + { + EMSG2(_(e_isadir2), wfname); +! return; + } + + /* + * Init the aff and dic pointers. + * Get the region names if there are more than 2 arguments. +--- 9194,9211 ---- + if (!overwrite && mch_stat((char *)wfname, &st) >= 0) + { + EMSG(_(e_exists)); +! goto theend; + } + if (mch_isdir(wfname)) + { + EMSG2(_(e_isadir2), wfname); +! goto theend; + } + ++ fname = alloc(MAXPATHL); ++ if (fname == NULL) ++ goto theend; ++ + /* + * Init the aff and dic pointers. + * Get the region names if there are more than 2 arguments. +*************** +*** 9209,9215 **** + || innames[i][len - 3] != '_') + { + EMSG2(_("E755: Invalid region in %s"), innames[i]); +! return; + } + spin.si_region_name[i * 2] = TOLOWER_ASC(innames[i][len - 2]); + spin.si_region_name[i * 2 + 1] = +--- 9221,9227 ---- + || innames[i][len - 3] != '_') + { + EMSG2(_("E755: Invalid region in %s"), innames[i]); +! goto theend; + } + spin.si_region_name[i * 2] = TOLOWER_ASC(innames[i][len - 2]); + spin.si_region_name[i * 2 + 1] = +*************** +*** 9226,9232 **** + || spin.si_prefroot == NULL) + { + free_blocks(spin.si_blocks); +! return; + } + + /* When not producing a .add.spl file clear the character table when +--- 9238,9244 ---- + || spin.si_prefroot == NULL) + { + free_blocks(spin.si_blocks); +! goto theend; + } + + /* When not producing a .add.spl file clear the character table when +*************** +*** 9247,9253 **** + spin.si_conv.vc_type = CONV_NONE; + spin.si_region = 1 << i; + +! vim_snprintf((char *)fname, sizeof(fname), "%s.aff", innames[i]); + if (mch_stat((char *)fname, &st) >= 0) + { + /* Read the .aff file. Will init "spin->si_conv" based on the +--- 9259,9265 ---- + spin.si_conv.vc_type = CONV_NONE; + spin.si_region = 1 << i; + +! vim_snprintf((char *)fname, MAXPATHL, "%s.aff", innames[i]); + if (mch_stat((char *)fname, &st) >= 0) + { + /* Read the .aff file. Will init "spin->si_conv" based on the +*************** +*** 9258,9264 **** + else + { + /* Read the .dic file and store the words in the trees. */ +! vim_snprintf((char *)fname, sizeof(fname), "%s.dic", + innames[i]); + if (spell_read_dic(&spin, fname, afile[i]) == FAIL) + error = TRUE; +--- 9270,9276 ---- + else + { + /* Read the .dic file and store the words in the trees. */ +! vim_snprintf((char *)fname, MAXPATHL, "%s.dic", + innames[i]); + if (spell_read_dic(&spin, fname, afile[i]) == FAIL) + error = TRUE; +*************** +*** 9340,9345 **** +--- 9352,9361 ---- + spell_make_sugfile(&spin, wfname); + + } ++ ++ theend: ++ vim_free(fname); ++ vim_free(wfname); + } + + /* +*************** +*** 9392,9398 **** + buf_T *buf = NULL; + int new_spf = FALSE; + char_u *fname; +! char_u fnamebuf[MAXPATHL]; + char_u line[MAXWLEN * 2]; + long fpos, fpos_next = 0; + int i; +--- 9408,9414 ---- + buf_T *buf = NULL; + int new_spf = FALSE; + char_u *fname; +! char_u *fnamebuf = NULL; + char_u line[MAXWLEN * 2]; + long fpos, fpos_next = 0; + int i; +*************** +*** 9422,9427 **** +--- 9438,9446 ---- + EMSG2(_(e_notset), "spellfile"); + return; + } ++ fnamebuf = alloc(MAXPATHL); ++ if (fnamebuf == NULL) ++ return; + + for (spf = curwin->w_s->b_p_spf, i = 1; *spf != NUL; ++i) + { +*************** +*** 9431,9436 **** +--- 9450,9456 ---- + if (*spf == NUL) + { + EMSGN(_("E765: 'spellfile' does not have %ld entries"), idx); ++ vim_free(fnamebuf); + return; + } + } +*************** +*** 9442,9447 **** +--- 9462,9468 ---- + if (buf != NULL && bufIsChanged(buf)) + { + EMSG(_(e_bufloaded)); ++ vim_free(fnamebuf); + return; + } + +*************** +*** 9536,9541 **** +--- 9557,9563 ---- + + redraw_all_later(SOME_VALID); + } ++ vim_free(fnamebuf); + } + + /* +*************** +*** 9544,9550 **** + static void + init_spellfile() + { +! char_u buf[MAXPATHL]; + int l; + char_u *fname; + char_u *rtp; +--- 9566,9572 ---- + static void + init_spellfile() + { +! char_u *buf; + int l; + char_u *fname; + char_u *rtp; +*************** +*** 9554,9559 **** +--- 9576,9585 ---- + + if (*curwin->w_s->b_p_spl != NUL && curwin->w_s->b_langp.ga_len > 0) + { ++ buf = alloc(MAXPATHL); ++ if (buf == NULL) ++ return; ++ + /* Find the end of the language name. Exclude the region. If there + * is a path separator remember the start of the tail. */ + for (lend = curwin->w_s->b_p_spl; *lend != NUL +*************** +*** 9597,9603 **** + "/%.*s", (int)(lend - lstart), lstart); + } + l = (int)STRLEN(buf); +! fname = LANGP_ENTRY(curwin->w_s->b_langp, 0)->lp_slang->sl_fname; + vim_snprintf((char *)buf + l, MAXPATHL - l, ".%s.add", + fname != NULL + && strstr((char *)gettail(fname), ".ascii.") != NULL +--- 9623,9630 ---- + "/%.*s", (int)(lend - lstart), lstart); + } + l = (int)STRLEN(buf); +! fname = LANGP_ENTRY(curwin->w_s->b_langp, 0) +! ->lp_slang->sl_fname; + vim_snprintf((char *)buf + l, MAXPATHL - l, ".%s.add", + fname != NULL + && strstr((char *)gettail(fname), ".ascii.") != NULL +*************** +*** 9607,9612 **** +--- 9634,9641 ---- + } + aspath = FALSE; + } ++ ++ vim_free(buf); + } + } + +*** ../vim-7.3.160/src/tag.c 2011-04-11 16:56:29.000000000 +0200 +--- src/tag.c 2011-04-11 20:54:36.000000000 +0200 +*************** +*** 775,791 **** + { + list_T *list; + char_u tag_name[128 + 1]; +! char_u fname[MAXPATHL + 1]; +! char_u cmd[CMDBUFFSIZE + 1]; + + /* + * Add the matching tags to the location list for the current + * window. + */ + + list = list_alloc(); +! if (list == NULL) + goto end_do_tag; + + for (i = 0; i < num_matches; ++i) + { +--- 775,799 ---- + { + list_T *list; + char_u tag_name[128 + 1]; +! char_u *fname; +! char_u *cmd; + + /* + * Add the matching tags to the location list for the current + * window. + */ + ++ fname = alloc(MAXPATHL + 1); ++ cmd = alloc(CMDBUFFSIZE + 1); + list = list_alloc(); +! if (list == NULL || fname == NULL || cmd == NULL) +! { +! vim_free(cmd); +! vim_free(fname); +! if (list != NULL) +! list_free(list, TRUE); + goto end_do_tag; ++ } + + for (i = 0; i < num_matches; ++i) + { +*************** +*** 911,916 **** +--- 919,926 ---- + set_errorlist(curwin, list, ' ', IObuff); + + list_free(list, TRUE); ++ vim_free(fname); ++ vim_free(cmd); + + cur_match = 0; /* Jump to the first tag */ + } +*************** +*** 3777,3784 **** + char_u *start; /* start of the value */ + char_u *end; /* after the value; can be NULL */ + { +! char_u buf[MAXPATHL]; + int len = 0; + + /* check that the field name doesn't exist yet */ + if (dict_find(dict, (char_u *)field_name, -1) != NULL) +--- 3787,3795 ---- + char_u *start; /* start of the value */ + char_u *end; /* after the value; can be NULL */ + { +! char_u *buf; + int len = 0; ++ int retval; + + /* check that the field name doesn't exist yet */ + if (dict_find(dict, (char_u *)field_name, -1) != NULL) +*************** +*** 3791,3796 **** +--- 3802,3810 ---- + } + return FAIL; + } ++ buf = alloc(MAXPATHL); ++ if (buf == NULL) ++ return FAIL; + if (start != NULL) + { + if (end == NULL) +*************** +*** 3800,3811 **** + --end; + } + len = (int)(end - start); +! if (len > (int)sizeof(buf) - 1) +! len = sizeof(buf) - 1; + vim_strncpy(buf, start, len); + } + buf[len] = NUL; +! return dict_add_nr_str(dict, field_name, 0L, buf); + } + + /* +--- 3814,3827 ---- + --end; + } + len = (int)(end - start); +! if (len > MAXPATHL - 1) +! len = MAXPATHL - 1; + vim_strncpy(buf, start, len); + } + buf[len] = NUL; +! retval = dict_add_nr_str(dict, field_name, 0L, buf); +! vim_free(buf); +! return retval; + } + + /* +*** ../vim-7.3.160/src/vim.h 2010-12-30 12:30:26.000000000 +0100 +--- src/vim.h 2011-04-11 20:50:54.000000000 +0200 +*************** +*** 1435,1440 **** +--- 1435,1442 ---- + + #define IOSIZE (1024+1) /* file i/o and sprintf buffer size */ + ++ #define DIALOG_MSG_SIZE 1000 /* buffer size for dialog_msg() */ ++ + #ifdef FEAT_MBYTE + # define MSG_BUF_LEN 480 /* length of buffer for small messages */ + # define MSG_BUF_CLEN (MSG_BUF_LEN / 6) /* cell length (worst case: utf-8 +*** ../vim-7.3.160/src/xxd/xxd.c 2011-04-02 14:44:50.000000000 +0200 +--- src/xxd/xxd.c 2011-04-11 16:40:48.000000000 +0200 +*************** +*** 476,482 **** + int octspergrp = -1; /* number of octets grouped in output */ + int grplen; /* total chars per octet group */ + long length = -1, n = 0, seekoff = 0; +! char l[LLEN+1]; + char *pp; + + #ifdef AMIGA +--- 476,482 ---- + int octspergrp = -1; /* number of octets grouped in output */ + int grplen; /* total chars per octet group */ + long length = -1, n = 0, seekoff = 0; +! static char l[LLEN+1]; /* static because it may be too big for stack */ + char *pp; + + #ifdef AMIGA +*** ../vim-7.3.160/src/version.c 2011-04-11 16:56:29.000000000 +0200 +--- src/version.c 2011-04-11 21:15:33.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 161, + /**/ + +-- +The process for understanding customers primarily involves sitting around with +other marketing people and talking about what you would to if you were dumb +enough to be a customer. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ae21e3adb994089277acb9c229ac7e4abb511c61 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0335/3803] Patchlevel 162 --- 7.3.162 | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 7.3.162 diff --git a/7.3.162 b/7.3.162 new file mode 100644 index 00000000..3f0173af --- /dev/null +++ b/7.3.162 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.162 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.162 +Problem: No error message when assigning to a list with an index out of + range. (Yukihiro Nakadaira) +Solution: Add the error message. +Files: src/eval.c + + +*** ../vim-7.3.161/src/eval.c 2011-04-11 21:35:03.000000000 +0200 +--- src/eval.c 2011-04-21 13:40:38.000000000 +0200 +*************** +*** 2794,2799 **** +--- 2794,2801 ---- + { + if (lp->ll_range && !lp->ll_empty2) + clear_tv(&var2); ++ if (!quiet) ++ EMSGN(_(e_listidx), lp->ll_n1); + return NULL; + } + +*************** +*** 2811,2817 **** +--- 2813,2823 ---- + { + ni = list_find(lp->ll_list, lp->ll_n2); + if (ni == NULL) ++ { ++ if (!quiet) ++ EMSGN(_(e_listidx), lp->ll_n2); + return NULL; ++ } + lp->ll_n2 = list_idx_of_item(lp->ll_list, ni); + } + +*************** +*** 2819,2825 **** +--- 2825,2835 ---- + if (lp->ll_n1 < 0) + lp->ll_n1 = list_idx_of_item(lp->ll_list, lp->ll_li); + if (lp->ll_n2 < lp->ll_n1) ++ { ++ if (!quiet) ++ EMSGN(_(e_listidx), lp->ll_n2); + return NULL; ++ } + } + + lp->ll_tv = &lp->ll_li->li_tv; +*** ../vim-7.3.161/src/version.c 2011-04-11 21:35:03.000000000 +0200 +--- src/version.c 2011-04-21 13:44:46.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 162, + /**/ + +-- +Far back in the mists of ancient time, in the great and glorious days of the +former Galactic Empire, life was wild, rich and largely tax free. +Mighty starships plied their way between exotic suns, seeking adventure and +reward among the furthest reaches of Galactic space. In those days, spirits +were brave, the stakes were high, men were real men, women were real women +and small furry creatures from Alpha Centauri were real small furry creatures +from Alpha Centauri. And all dared to brave unknown terrors, to do mighty +deeds, to boldly split infinitives that no man had split before -- and thus +was the Empire forged. + -- 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/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f03b4c72342043b5b096023583cd8bae8baaf9b1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0336/3803] Patchlevel 163 --- 7.3.163 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 7.3.163 diff --git a/7.3.163 b/7.3.163 new file mode 100644 index 00000000..b5f1cb4a --- /dev/null +++ b/7.3.163 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.163 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.163 +Problem: For the default of 'shellpipe' "mksh" and "pdksh" are not + recognized. +Solution: Recognize these shell names. +Files: src/option.c + + +*** ../vim-7.3.162/src/option.c 2011-03-22 14:35:01.000000000 +0100 +--- src/option.c 2011-04-15 20:49:54.000000000 +0200 +*************** +*** 3846,3851 **** +--- 3846,3853 ---- + # ifndef OS2 /* Always use bourne shell style redirection if we reach this */ + if ( fnamecmp(p, "sh") == 0 + || fnamecmp(p, "ksh") == 0 ++ || fnamecmp(p, "mksh") == 0 ++ || fnamecmp(p, "pdksh") == 0 + || fnamecmp(p, "zsh") == 0 + || fnamecmp(p, "zsh-beta") == 0 + || fnamecmp(p, "bash") == 0 +*************** +*** 3853,3858 **** +--- 3855,3862 ---- + || fnamecmp(p, "cmd") == 0 + || fnamecmp(p, "sh.exe") == 0 + || fnamecmp(p, "ksh.exe") == 0 ++ || fnamecmp(p, "mksh.exe") == 0 ++ || fnamecmp(p, "pdksh.exe") == 0 + || fnamecmp(p, "zsh.exe") == 0 + || fnamecmp(p, "zsh-beta.exe") == 0 + || fnamecmp(p, "bash.exe") == 0 +*** ../vim-7.3.162/src/version.c 2011-04-21 14:27:21.000000000 +0200 +--- src/version.c 2011-04-28 12:56:03.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 163, + /**/ + +-- +If you put 7 of the most talented OSS developers in a room for a week +and asked them to fix a bug in a spreadsheet program, in 1 week +you'd have 2 new mail readers and a text-based web browser. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5a31509dd04fa60c44021c7413c8fff42f300c88 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0337/3803] Patchlevel 164 --- 7.3.164 | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 7.3.164 diff --git a/7.3.164 b/7.3.164 new file mode 100644 index 00000000..9049f1b5 --- /dev/null +++ b/7.3.164 @@ -0,0 +1,181 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.164 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.164 +Problem: C-indenting: a preprocessor statement confuses detection of a + function delcaration. +Solution: Ignore preprocessor lines. (Lech Lorens) Also recognize the style + to put a comma before the argument name. +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.163/src/misc1.c 2011-04-11 16:56:29.000000000 +0200 +--- src/misc1.c 2011-04-28 12:49:55.000000000 +0200 +*************** +*** 5396,5403 **** + cin_ispreproc(s) + char_u *s; + { +! s = skipwhite(s); +! if (*s == '#') + return TRUE; + return FALSE; + } +--- 5396,5402 ---- + cin_ispreproc(s) + char_u *s; + { +! if (*skipwhite(s) == '#') + return TRUE; + return FALSE; + } +*************** +*** 5513,5518 **** +--- 5512,5521 ---- + else + s = *sp; + ++ /* Ignore line starting with #. */ ++ if (cin_ispreproc(s)) ++ return FALSE; ++ + while (*s && *s != '(' && *s != ';' && *s != '\'' && *s != '"') + { + if (cin_iscomment(s)) /* ignore comments */ +*************** +*** 5538,5550 **** + 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); +--- 5541,5569 ---- + retval = TRUE; + goto done; + } +! if ((*s == ',' && cin_nocode(s + 1)) || s[1] == NUL || cin_nocode(s)) + { +! int comma = (*s == ','); +! +! /* ',' at the end: continue looking in the next line. +! * At the end: check for ',' in the next line, for this style: +! * func(arg1 +! * , arg2) */ +! for (;;) +! { +! if (lnum >= curbuf->b_ml.ml_line_count) +! break; +! s = ml_get(++lnum); +! if (!cin_ispreproc(s)) +! break; +! } + if (lnum >= curbuf->b_ml.ml_line_count) + break; +! /* Require a comma at end of the line or a comma or ')' at the +! * start of next line. */ +! s = skipwhite(s); +! if (!comma && *s != ',' && *s != ')') +! break; + } + else if (cin_iscomment(s)) /* ignore comments */ + s = cin_skipcomment(s); +*** ../vim-7.3.163/src/testdir/test3.in 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test3.in 2011-04-28 12:15:12.000000000 +0200 +*************** +*** 1315,1320 **** +--- 1315,1349 ---- + } + + STARTTEST ++ :set cino=(0,ts ++ 2kdd=][ ++ ENDTEST ++ ++ void func(int a ++ #if defined(FOO) ++ , int b ++ , int c ++ #endif ++ ) ++ { ++ } ++ ++ STARTTEST ++ :set cino=(0 ++ 2kdd=][ ++ ENDTEST ++ ++ void ++ func(int a ++ #if defined(FOO) ++ , int b ++ , int c ++ #endif ++ ) ++ { ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../vim-7.3.163/src/testdir/test3.ok 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test3.ok 2011-04-28 12:54:04.000000000 +0200 +*************** +*** 1183,1185 **** +--- 1183,1206 ---- + foo; + } + ++ ++ void func(int a ++ #if defined(FOO) ++ , int b ++ , int c ++ #endif ++ ) ++ { ++ } ++ ++ ++ void ++ func(int a ++ #if defined(FOO) ++ , int b ++ , int c ++ #endif ++ ) ++ { ++ } ++ +*** ../vim-7.3.163/src/version.c 2011-04-28 12:56:57.000000000 +0200 +--- src/version.c 2011-04-28 12:59:55.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 164, + /**/ + +-- +Due knot trussed yore spell chequer two fined awl miss steaks. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 2306058a73d9ab20e13554c2fe6a197e170af359 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0338/3803] Patchlevel 165 --- 7.3.165 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 7.3.165 diff --git a/7.3.165 b/7.3.165 new file mode 100644 index 00000000..2725259e --- /dev/null +++ b/7.3.165 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.165 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.165 +Problem: ":find" completion does not escape spaces in a directory name. + (Isz) +Solution: Add backslashes for EXPAND_FILES_IN_PATH. (Carlo Teubner) +Files: src/ex_getln.c + + +*** ../vim-7.3.164/src/ex_getln.c 2010-12-02 16:01:23.000000000 +0100 +--- src/ex_getln.c 2011-04-28 12:52:12.000000000 +0200 +*************** +*** 3702,3707 **** +--- 3702,3708 ---- + if (options & WILD_ESCAPE) + { + if (xp->xp_context == EXPAND_FILES ++ || xp->xp_context == EXPAND_FILES_IN_PATH + || xp->xp_context == EXPAND_SHELLCMD + || xp->xp_context == EXPAND_BUFFERS + || xp->xp_context == EXPAND_DIRECTORIES) +*** ../vim-7.3.164/src/version.c 2011-04-28 13:01:59.000000000 +0200 +--- src/version.c 2011-04-28 17:17:53.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 165, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +38. You wake up at 3 a.m. to go to the bathroom and stop and check your e-mail + on the way back to bed. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5a2c4962b0b8e1d547a1a687b72f8e6a982f7545 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0339/3803] Patchlevel 166 --- 7.3.166 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 7.3.166 diff --git a/7.3.166 b/7.3.166 new file mode 100644 index 00000000..93c6ed35 --- /dev/null +++ b/7.3.166 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.166 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.166 +Problem: Buffer on the stack may be too big +Solution: Allocate the space. +Files: src/option.c + + +*** ../vim-7.3.165/src/option.c 2011-04-28 12:56:57.000000000 +0200 +--- src/option.c 2011-04-15 20:49:54.000000000 +0200 +*************** +*** 9185,9191 **** + int expand; + { + char_u *s; +! char_u buf[MAXPATHL]; + + if (fprintf(fd, "%s %s=", cmd, name) < 0) + return FAIL; +--- 9185,9191 ---- + int expand; + { + char_u *s; +! char_u *buf; + + if (fprintf(fd, "%s %s=", cmd, name) < 0) + return FAIL; +*************** +*** 9203,9211 **** +--- 9203,9218 ---- + } + else if (expand) + { ++ buf = alloc(MAXPATHL); ++ if (buf == NULL) ++ return FAIL; + home_replace(NULL, *valuep, buf, MAXPATHL, FALSE); + if (put_escstr(fd, buf, 2) == FAIL) ++ { ++ vim_free(buf); + return FAIL; ++ } ++ vim_free(buf); + } + else if (put_escstr(fd, *valuep, 2) == FAIL) + return FAIL; +*** ../vim-7.3.165/src/version.c 2011-04-28 17:21:49.000000000 +0200 +--- src/version.c 2011-04-28 17:23:24.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 166, + /**/ + +-- +He who laughs last, thinks slowest. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From c93e4e1a3ab988d1f0fcbd972c18367dff548301 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0340/3803] Patchlevel 167 --- 7.3.167 | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 7.3.167 diff --git a/7.3.167 b/7.3.167 new file mode 100644 index 00000000..4a6de89f --- /dev/null +++ b/7.3.167 @@ -0,0 +1,96 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.167 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.167 +Problem: When using the internal grep QuickFixCmdPost is not triggered. + (Yukihiro Nakadaira) +Solution: Change the place where autocommands are triggered. +Files: src/quickfix.c + + +*** ../vim-7.3.166/src/quickfix.c 2011-04-11 21:35:03.000000000 +0200 +--- src/quickfix.c 2011-04-28 13:28:03.000000000 +0200 +*************** +*** 2742,2747 **** +--- 2742,2754 ---- + #ifdef FEAT_AUTOCMD + char_u *au_name = NULL; + ++ /* Redirect ":grep" to ":vimgrep" if 'grepprg' is "internal". */ ++ if (grep_internal(eap->cmdidx)) ++ { ++ ex_vimgrep(eap); ++ return; ++ } ++ + switch (eap->cmdidx) + { + case CMD_make: au_name = (char_u *)"make"; break; +*************** +*** 2763,2775 **** + } + #endif + +- /* Redirect ":grep" to ":vimgrep" if 'grepprg' is "internal". */ +- if (grep_internal(eap->cmdidx)) +- { +- ex_vimgrep(eap); +- return; +- } +- + if (eap->cmdidx == CMD_lmake || eap->cmdidx == CMD_lgrep + || eap->cmdidx == CMD_lgrepadd) + wp = curwin; +--- 2770,2775 ---- +*************** +*** 3057,3066 **** + + switch (eap->cmdidx) + { +! case CMD_vimgrep: au_name = (char_u *)"vimgrep"; break; +! case CMD_lvimgrep: au_name = (char_u *)"lvimgrep"; break; +! case CMD_vimgrepadd: au_name = (char_u *)"vimgrepadd"; break; + case CMD_lvimgrepadd: au_name = (char_u *)"lvimgrepadd"; break; + default: break; + } + if (au_name != NULL) +--- 3057,3070 ---- + + switch (eap->cmdidx) + { +! case CMD_vimgrep: au_name = (char_u *)"vimgrep"; break; +! case CMD_lvimgrep: au_name = (char_u *)"lvimgrep"; break; +! case CMD_vimgrepadd: au_name = (char_u *)"vimgrepadd"; break; + case CMD_lvimgrepadd: au_name = (char_u *)"lvimgrepadd"; break; ++ case CMD_grep: au_name = (char_u *)"grep"; break; ++ case CMD_lgrep: au_name = (char_u *)"lgrep"; break; ++ case CMD_grepadd: au_name = (char_u *)"grepadd"; break; ++ case CMD_lgrepadd: au_name = (char_u *)"lgrepadd"; break; + default: break; + } + if (au_name != NULL) +*** ../vim-7.3.166/src/version.c 2011-04-28 17:24:54.000000000 +0200 +--- src/version.c 2011-04-28 17:26:17.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 167, + /**/ + +-- +Micro$oft: where do you want to go today? + Linux: where do you want to go tomorrow? + FreeBSD: are you guys coming, or what? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 4db2164a3ab4e96afd8bf4bbfb39c6ce479c5ae8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0341/3803] Patchlevel 168 --- 7.3.168 | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 7.3.168 diff --git a/7.3.168 b/7.3.168 new file mode 100644 index 00000000..3d6fe947 --- /dev/null +++ b/7.3.168 @@ -0,0 +1,82 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.168 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.168 +Problem: When the second argument of input() contains a CR the text up to + that is used without asking the user. (Yasuhiro Matsumoto) +Solution: Change CR, NL and ESC in the text to a space. +Files: src/getchar.c + + +*** ../vim-7.3.167/src/getchar.c 2011-03-22 13:07:19.000000000 +0100 +--- src/getchar.c 2011-04-28 14:50:26.000000000 +0200 +*************** +*** 635,645 **** +--- 635,648 ---- + /* + * Stuff "s" into the stuff buffer, leaving special key codes unmodified and + * escaping other K_SPECIAL and CSI bytes. ++ * Change CR, LF and ESC into a space. + */ + void + stuffReadbuffSpec(s) + char_u *s; + { ++ int c; ++ + while (*s != NUL) + { + if (*s == K_SPECIAL && s[1] != NUL && s[2] != NUL) +*************** +*** 649,659 **** + s += 3; + } + else + #ifdef FEAT_MBYTE +! stuffcharReadbuff(mb_ptr2char_adv(&s)); + #else +! stuffcharReadbuff(*s++); + #endif + } + } + #endif +--- 652,667 ---- + s += 3; + } + else ++ { + #ifdef FEAT_MBYTE +! c = mb_ptr2char_adv(&s); + #else +! c = *s++; + #endif ++ if (c == CAR || c == NL || c == ESC) ++ c = ' '; ++ stuffcharReadbuff(c); ++ } + } + } + #endif +*** ../vim-7.3.167/src/version.c 2011-04-28 17:27:05.000000000 +0200 +--- src/version.c 2011-04-28 17:28:36.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 168, + /**/ + +-- +Everyone has a photographic memory. Some don't have film. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 6a878e0a66c6ba21951639ce8966092b8837828c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0342/3803] Patchlevel 169 --- 7.3.169 | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 7.3.169 diff --git a/7.3.169 b/7.3.169 new file mode 100644 index 00000000..056ca99f --- /dev/null +++ b/7.3.169 @@ -0,0 +1,130 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.169 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.169 +Problem: Freeing memory already freed, warning from static code analyzer. +Solution: Initialize pointers to NULL, correct use of "mustfree". (partly by + Dominique Pelle) +Files: src/mis1.c + + +*** ../vim-7.3.168/src/misc1.c 2011-04-28 13:01:59.000000000 +0200 +--- src/misc1.c 2011-04-28 17:42:00.000000000 +0200 +*************** +*** 3505,3511 **** + if (enc_utf8 && var != NULL) + { + int len; +! char_u *pp; + + /* Convert from active codepage to UTF-8. Other conversions are + * not done, because they would fail for non-ASCII characters. */ +--- 3505,3511 ---- + if (enc_utf8 && var != NULL) + { + int len; +! char_u *pp = NULL; + + /* Convert from active codepage to UTF-8. Other conversions are + * not done, because they would fail for non-ASCII characters. */ +*************** +*** 3872,3882 **** + * Vim's version of getenv(). + * Special handling of $HOME, $VIM and $VIMRUNTIME. + * Also does ACP to 'enc' conversion for Win32. + */ + char_u * + vim_getenv(name, mustfree) + char_u *name; +! int *mustfree; /* set to TRUE when returned is allocated */ + { + char_u *p; + char_u *pend; +--- 3872,3884 ---- + * Vim's version of getenv(). + * Special handling of $HOME, $VIM and $VIMRUNTIME. + * Also does ACP to 'enc' conversion for Win32. ++ * "mustfree" is set to TRUE when returned is allocated, it must be ++ * initialized to FALSE by the caller. + */ + char_u * + vim_getenv(name, mustfree) + char_u *name; +! int *mustfree; + { + char_u *p; + char_u *pend; +*************** +*** 3898,3904 **** + if (enc_utf8) + { + int len; +! char_u *pp; + + /* Convert from active codepage to UTF-8. Other conversions are + * not done, because they would fail for non-ASCII characters. */ +--- 3900,3906 ---- + if (enc_utf8) + { + int len; +! char_u *pp = NULL; + + /* Convert from active codepage to UTF-8. Other conversions are + * not done, because they would fail for non-ASCII characters. */ +*************** +*** 3942,3948 **** + if (enc_utf8) + { + int len; +! char_u *pp; + + /* Convert from active codepage to UTF-8. Other conversions + * are not done, because they would fail for non-ASCII +--- 3944,3950 ---- + if (enc_utf8) + { + int len; +! char_u *pp = NULL; + + /* Convert from active codepage to UTF-8. Other conversions + * are not done, because they would fail for non-ASCII +*************** +*** 3950,3956 **** + acp_to_enc(p, (int)STRLEN(p), &pp, &len); + if (pp != NULL) + { +! if (mustfree) + vim_free(p); + p = pp; + *mustfree = TRUE; +--- 3952,3958 ---- + acp_to_enc(p, (int)STRLEN(p), &pp, &len); + if (pp != NULL) + { +! if (*mustfree) + vim_free(p); + p = pp; + *mustfree = TRUE; +*** ../vim-7.3.168/src/version.c 2011-04-28 17:30:05.000000000 +0200 +--- src/version.c 2011-04-28 17:48:04.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 169, + /**/ + +-- +A day without sunshine is like, well, night. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 2d54d072cfdb52097036acdcd3fac556e19b5a16 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0343/3803] Patchlevel 170 --- 7.3.170 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 7.3.170 diff --git a/7.3.170 b/7.3.170 new file mode 100644 index 00000000..933173ea --- /dev/null +++ b/7.3.170 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.170 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.170 +Problem: VMS Makefile for testing was not updated for test77. +Solution: Add test77 to the Makefile. +Files: src/testdir/Make_vms.mms + + +*** ../vim-7.3.169/src/testdir/Make_vms.mms 2010-11-10 16:54:16.000000000 +0100 +--- src/testdir/Make_vms.mms 2011-03-03 17:04:56.000000000 +0100 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2010 Nov 10 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Mar 03 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +*************** +*** 74,80 **** + test56.out test57.out test60.out \ + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ +! test71.out test72.out test74.out test75.out test76.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 74,81 ---- + test56.out test57.out test60.out \ + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ +! test71.out test72.out test74.out test75.out test76.out \ +! test77.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.3.169/src/version.c 2011-04-28 17:48:39.000000000 +0200 +--- src/version.c 2011-04-28 19:04:33.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 170, + /**/ + +-- +The users that I support would double-click on a landmine to find out +what happens. -- A system administrator + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ed64b5a57206ed23ed2fb6c88cbb753ed152a588 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0344/3803] Patchlevel 171 --- 7.3.171 | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 7.3.171 diff --git a/7.3.171 b/7.3.171 new file mode 100644 index 00000000..f965e0a2 --- /dev/null +++ b/7.3.171 @@ -0,0 +1,142 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.171 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.171 +Problem: When the clipboard isn't supported: ":yank*" gives a confusing + error message. +Solution: Specifically mention that the register name is invalid. + (Jean-Rene David) +Files: runtime/doc/change.txt, src/ex_docmd.c, src/globals.h + + +*** ../vim-7.3.170/runtime/doc/change.txt 2010-08-15 21:57:18.000000000 +0200 +--- runtime/doc/change.txt 2011-05-05 13:48:00.000000000 +0200 +*************** +*** 916,923 **** + {Visual}["x]Y Yank the highlighted lines [into register x] (for + {Visual} see |Visual-mode|). {not in Vi} + +! *:y* *:yank* +! :[range]y[ank] [x] Yank [range] lines [into register x]. + + :[range]y[ank] [x] {count} + Yank {count} lines, starting with last line number +--- 917,926 ---- + {Visual}["x]Y Yank the highlighted lines [into register x] (for + {Visual} see |Visual-mode|). {not in Vi} + +! *:y* *:yank* *E850* +! :[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the +! "* or "+ registers is possible only in GUI versions or +! when the |+xterm_clipboard| feature is included. + + :[range]y[ank] [x] {count} + Yank {count} lines, starting with last line number +*** ../vim-7.3.170/src/ex_docmd.c 2011-04-11 21:35:03.000000000 +0200 +--- src/ex_docmd.c 2011-05-05 13:48:57.000000000 +0200 +*************** +*** 2424,2448 **** + if ( (ea.argt & REGSTR) + && *ea.arg != NUL + #ifdef FEAT_USR_CMDS +- && valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put +- && USER_CMDIDX(ea.cmdidx))) + /* Do not allow register = for user commands */ + && (!USER_CMDIDX(ea.cmdidx) || *ea.arg != '=') +- #else +- && valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put) + #endif + && !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg))) + { +! ea.regname = *ea.arg++; +! #ifdef FEAT_EVAL +! /* for '=' register: accept the rest of the line as an expression */ +! if (ea.arg[-1] == '=' && ea.arg[0] != NUL) + { +! set_expr_line(vim_strsave(ea.arg)); +! ea.arg += STRLEN(ea.arg); + } + #endif +! ea.arg = skipwhite(ea.arg); + } + + /* +--- 2424,2462 ---- + if ( (ea.argt & REGSTR) + && *ea.arg != NUL + #ifdef FEAT_USR_CMDS + /* Do not allow register = for user commands */ + && (!USER_CMDIDX(ea.cmdidx) || *ea.arg != '=') + #endif + && !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg))) + { +! #ifndef FEAT_CLIPBOARD +! /* check these explicitly for a more specific error message */ +! if (*ea.arg == '*' || *ea.arg == '+') + { +! errormsg = (char_u *)_(e_invalidreg); +! goto doend; + } + #endif +! if ( +! #ifdef FEAT_USR_CMDS +! valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put +! && USER_CMDIDX(ea.cmdidx))) +! #else +! valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put) +! #endif +! ) +! { +! ea.regname = *ea.arg++; +! #ifdef FEAT_EVAL +! /* for '=' register: accept the rest of the line as an expression */ +! if (ea.arg[-1] == '=' && ea.arg[0] != NUL) +! { +! set_expr_line(vim_strsave(ea.arg)); +! ea.arg += STRLEN(ea.arg); +! } +! #endif +! ea.arg = skipwhite(ea.arg); +! } + } + + /* +*** ../vim-7.3.170/src/globals.h 2011-02-15 17:39:14.000000000 +0100 +--- src/globals.h 2011-05-05 13:47:44.000000000 +0200 +*************** +*** 1561,1566 **** +--- 1561,1569 ---- + (defined(FEAT_INS_EXPAND) && defined(FEAT_COMPL_FUNC)) + EXTERN char_u e_notset[] INIT(= N_("E764: Option '%s' is not set")); + #endif ++ #ifndef FEAT_CLIPBOARD ++ EXTERN char_u e_invalidreg[] INIT(= N_("E850: Invalid register name")); ++ #endif + + #ifdef MACOS_X_UNIX + EXTERN short disallow_gui INIT(= FALSE); +*** ../vim-7.3.170/src/version.c 2011-04-28 19:05:01.000000000 +0200 +--- src/version.c 2011-05-05 14:24:39.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 171, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +53. To find out what time it is, you send yourself an e-mail and check the + "Date:" field. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 969e9e8e76bab06ee399f57c9939ddeab13164bc Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0345/3803] Patchlevel 172 --- 7.3.172 | 268 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 268 insertions(+) create mode 100644 7.3.172 diff --git a/7.3.172 b/7.3.172 new file mode 100644 index 00000000..66a78521 --- /dev/null +++ b/7.3.172 @@ -0,0 +1,268 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.172 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.172 +Problem: MS-Windows: rename() might delete the file if the name differs but + it's actually the same file. +Solution: Use the file handle to check if it's the same file. (Yukihiro + Nakadaira) +Files: src/if_cscope.c, src/fileio.c, src/os_win32.c, + src/proto/os_win32.pro, src/vim.h + + +*** ../vim-7.3.171/src/if_cscope.c 2011-03-03 15:01:25.000000000 +0100 +--- src/if_cscope.c 2011-05-05 16:16:38.000000000 +0200 +*************** +*** 1412,1428 **** + { + short i, j; + #ifndef UNIX +- HANDLE hFile; + BY_HANDLE_FILE_INFORMATION bhfi; + +- vim_memset(&bhfi, 0, sizeof(bhfi)); + /* On windows 9x GetFileInformationByHandle doesn't work, so skip it */ + if (!mch_windows95()) + { +! hFile = CreateFile(fname, FILE_READ_ATTRIBUTES, 0, NULL, OPEN_EXISTING, +! FILE_ATTRIBUTE_NORMAL, NULL); +! if (hFile == INVALID_HANDLE_VALUE) + { + if (p_csverbose) + { + char *cant_msg = _("E625: cannot open cscope database: %s"); +--- 1412,1426 ---- + { + short i, j; + #ifndef UNIX + BY_HANDLE_FILE_INFORMATION bhfi; + + /* On windows 9x GetFileInformationByHandle doesn't work, so skip it */ + if (!mch_windows95()) + { +! switch (win32_fileinfo(fname, &bhfi)) + { ++ case FILEINFO_ENC_FAIL: /* enc_to_utf16() failed */ ++ case FILEINFO_READ_FAIL: /* CreateFile() failed */ + if (p_csverbose) + { + char *cant_msg = _("E625: cannot open cscope database: %s"); +*************** +*** 1438,1452 **** + (void)EMSG2(cant_msg, fname); + } + return -1; +! } +! if (!GetFileInformationByHandle(hFile, &bhfi)) +! { +! CloseHandle(hFile); + if (p_csverbose) + (void)EMSG(_("E626: cannot get cscope database information")); + return -1; + } +- CloseHandle(hFile); + } + #endif + +--- 1436,1447 ---- + (void)EMSG2(cant_msg, fname); + } + return -1; +! +! case FILEINFO_INFO_FAIL: /* GetFileInformationByHandle() failed */ + if (p_csverbose) + (void)EMSG(_("E626: cannot get cscope database information")); + return -1; + } + } + #endif + +*** ../vim-7.3.171/src/fileio.c 2011-04-11 21:35:03.000000000 +0200 +--- src/fileio.c 2011-05-05 16:22:22.000000000 +0200 +*************** +*** 6555,6560 **** +--- 6555,6575 ---- + use_tmp_file = TRUE; + } + #endif ++ #ifdef WIN3264 ++ { ++ BY_HANDLE_FILE_INFORMATION info1, info2; ++ ++ /* It's possible for the source and destination to be the same file. ++ * In that case go through a temp file name. This makes rename("foo", ++ * "./foo") a no-op (in a complicated way). */ ++ if (win32_fileinfo(from, &info1) == FILEINFO_OK ++ && win32_fileinfo(to, &info2) == FILEINFO_OK ++ && info1.dwVolumeSerialNumber == info2.dwVolumeSerialNumber ++ && info1.nFileIndexHigh == info2.nFileIndexHigh ++ && info1.nFileIndexLow == info2.nFileIndexLow) ++ use_tmp_file = TRUE; ++ } ++ #endif + + #if defined(UNIX) || defined(CASE_INSENSITIVE_FILENAME) + if (use_tmp_file) +*** ../vim-7.3.171/src/os_win32.c 2011-02-01 13:48:47.000000000 +0100 +--- src/os_win32.c 2011-05-05 16:24:17.000000000 +0200 +*************** +*** 2645,2669 **** + int + mch_is_linked(char_u *fname) + { + HANDLE hFile; +! int res = 0; +! BY_HANDLE_FILE_INFORMATION inf; + #ifdef FEAT_MBYTE + WCHAR *wn = NULL; + + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) + wn = enc_to_utf16(fname, NULL); + if (wn != NULL) + { + hFile = CreateFileW(wn, /* file name */ + GENERIC_READ, /* access mode */ +! 0, /* share mode */ + NULL, /* security descriptor */ + OPEN_EXISTING, /* creation disposition */ +! 0, /* file attributes */ + NULL); /* handle to template file */ + if (hFile == INVALID_HANDLE_VALUE +! && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + /* Retry with non-wide function (for Windows 98). */ + vim_free(wn); +--- 2645,2688 ---- + int + mch_is_linked(char_u *fname) + { ++ BY_HANDLE_FILE_INFORMATION info; ++ ++ return win32_fileinfo(fname, &info) == FILEINFO_OK ++ && info.nNumberOfLinks > 1; ++ } ++ ++ /* ++ * Get the by-handle-file-information for "fname". ++ * Returns FILEINFO_OK when OK. ++ * returns FILEINFO_ENC_FAIL when enc_to_utf16() failed. ++ * Returns FILEINFO_READ_FAIL when CreateFile() failed. ++ * Returns FILEINFO_INFO_FAIL when GetFileInformationByHandle() failed. ++ */ ++ int ++ win32_fileinfo(char_u *fname, BY_HANDLE_FILE_INFORMATION *info) ++ { + HANDLE hFile; +! int res = FILEINFO_READ_FAIL; + #ifdef FEAT_MBYTE + WCHAR *wn = NULL; + + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) ++ { + wn = enc_to_utf16(fname, NULL); ++ if (wn == NULL) ++ res = FILEINFO_ENC_FAIL; ++ } + if (wn != NULL) + { + hFile = CreateFileW(wn, /* file name */ + GENERIC_READ, /* access mode */ +! FILE_SHARE_READ | FILE_SHARE_WRITE, /* share mode */ + NULL, /* security descriptor */ + OPEN_EXISTING, /* creation disposition */ +! FILE_FLAG_BACKUP_SEMANTICS, /* file attributes */ + NULL); /* handle to template file */ + if (hFile == INVALID_HANDLE_VALUE +! && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + /* Retry with non-wide function (for Windows 98). */ + vim_free(wn); +*************** +*** 2674,2690 **** + #endif + hFile = CreateFile(fname, /* file name */ + GENERIC_READ, /* access mode */ +! 0, /* share mode */ + NULL, /* security descriptor */ + OPEN_EXISTING, /* creation disposition */ +! 0, /* file attributes */ + NULL); /* handle to template file */ + + if (hFile != INVALID_HANDLE_VALUE) + { +! if (GetFileInformationByHandle(hFile, &inf) != 0 +! && inf.nNumberOfLinks > 1) +! res = 1; + CloseHandle(hFile); + } + +--- 2693,2710 ---- + #endif + hFile = CreateFile(fname, /* file name */ + GENERIC_READ, /* access mode */ +! FILE_SHARE_READ | FILE_SHARE_WRITE, /* share mode */ + NULL, /* security descriptor */ + OPEN_EXISTING, /* creation disposition */ +! FILE_FLAG_BACKUP_SEMANTICS, /* file attributes */ + NULL); /* handle to template file */ + + if (hFile != INVALID_HANDLE_VALUE) + { +! if (GetFileInformationByHandle(hFile, info) != 0) +! res = FILEINFO_OK; +! else +! res = FILEINFO_INFO_FAIL; + CloseHandle(hFile); + } + +*** ../vim-7.3.171/src/proto/os_win32.pro 2010-10-23 14:02:48.000000000 +0200 +--- src/proto/os_win32.pro 2011-05-05 16:17:42.000000000 +0200 +*************** +*** 21,26 **** +--- 21,27 ---- + void mch_hide __ARGS((char_u *name)); + int mch_isdir __ARGS((char_u *name)); + int mch_is_linked __ARGS((char_u *fname)); ++ int win32_fileinfo __ARGS((char_u *name, BY_HANDLE_FILE_INFORMATION *lpFileInfo)); + int mch_writable __ARGS((char_u *name)); + int mch_can_exe __ARGS((char_u *name)); + int mch_nodetype __ARGS((char_u *name)); +*** ../vim-7.3.171/src/vim.h 2011-04-11 21:35:03.000000000 +0200 +--- src/vim.h 2011-05-05 16:16:57.000000000 +0200 +*************** +*** 2217,2220 **** +--- 2217,2226 ---- + #define KEYLEN_PART_MAP -2 /* keylen value for incomplete mapping */ + #define KEYLEN_REMOVED 9999 /* keylen value for removed sequence */ + ++ /* Return values from win32_fileinfo(). */ ++ #define FILEINFO_OK 0 ++ #define FILEINFO_ENC_FAIL 1 /* enc_to_utf16() failed */ ++ #define FILEINFO_READ_FAIL 2 /* CreateFile() failed */ ++ #define FILEINFO_INFO_FAIL 3 /* GetFileInformationByHandle() failed */ ++ + #endif /* VIM__H */ +*** ../vim-7.3.171/src/version.c 2011-05-05 14:26:37.000000000 +0200 +--- src/version.c 2011-05-05 16:39:35.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 172, + /**/ + +-- +Q: What is a patch 22? +A: A patch you need to include to make it possible to include patches. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ea559b433cc32fa53d329ea9febad6d13b654958 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0346/3803] Patchlevel 173 --- 7.3.173 | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 7.3.173 diff --git a/7.3.173 b/7.3.173 new file mode 100644 index 00000000..ac8cffb9 --- /dev/null +++ b/7.3.173 @@ -0,0 +1,79 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.173 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.173 +Problem: After using setqflist() to make the quickfix list empty ":cwindow" + may open the window anyway. Also after ":vimgrep". +Solution: Correctly check whether the list is empty. (Ingo Karkat) +Files: src/quickfix.c + + +*** ../vim-7.3.172/src/quickfix.c 2011-04-28 17:27:05.000000000 +0200 +--- src/quickfix.c 2011-05-05 16:55:47.000000000 +0200 +*************** +*** 1164,1170 **** + + /* When no valid entries are present in the list, qf_ptr points to + * the first item in the list */ +! if (to_qfl->qf_nonevalid == TRUE) + to_qfl->qf_ptr = to_qfl->qf_start; + } + +--- 1164,1170 ---- + + /* When no valid entries are present in the list, qf_ptr points to + * the first item in the list */ +! if (to_qfl->qf_nonevalid) + to_qfl->qf_ptr = to_qfl->qf_start; + } + +*************** +*** 2243,2248 **** +--- 2243,2249 ---- + * it if we have errors; otherwise, leave it closed. + */ + if (qi->qf_lists[qi->qf_curlist].qf_nonevalid ++ || qi->qf_lists[qi->qf_curlist].qf_count == 0 + || qi->qf_curlist >= qi->qf_listcount) + { + if (win != NULL) +*************** +*** 3711,3717 **** + } + + if (qi->qf_lists[qi->qf_curlist].qf_index == 0) +! /* empty list or no valid entry */ + qi->qf_lists[qi->qf_curlist].qf_nonevalid = TRUE; + else + qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE; +--- 3712,3718 ---- + } + + if (qi->qf_lists[qi->qf_curlist].qf_index == 0) +! /* no valid entry */ + qi->qf_lists[qi->qf_curlist].qf_nonevalid = TRUE; + else + qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE; +*** ../vim-7.3.172/src/version.c 2011-05-05 16:41:19.000000000 +0200 +--- src/version.c 2011-05-05 17:11:57.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 173, + /**/ + +-- +"I can't complain, but sometimes I still do." (Joe Walsh) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 7597e926f13cb3afb878466785834e59e526df44 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0347/3803] Patchlevel 174 --- 7.3.174 | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 7.3.174 diff --git a/7.3.174 b/7.3.174 new file mode 100644 index 00000000..33d60035 --- /dev/null +++ b/7.3.174 @@ -0,0 +1,109 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.174 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.174 +Problem: When Exuberant ctags binary is exctags it's not found. +Solution: Add configure check for exctags. (Hong Xu) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.3.173/src/configure.in 2011-02-09 17:42:53.000000000 +0100 +--- src/configure.in 2011-05-05 17:18:21.000000000 +0200 +*************** +*** 2619,2625 **** + dnl On HP-UX 10.10 termcap or termlib should be used instead of + dnl curses, because curses is much slower. + dnl Newer versions of ncurses are preferred over anything, except +! dnl when tinfo has been split off, it conains all we need. + dnl Older versions of ncurses have bugs, get a new one! + dnl Digital Unix (OSF1) should use curses (Ronald Schild). + dnl On SCO Openserver should prefer termlib (Roger Cornelius). +--- 2619,2625 ---- + dnl On HP-UX 10.10 termcap or termlib should be used instead of + dnl curses, because curses is much slower. + dnl Newer versions of ncurses are preferred over anything, except +! dnl when tinfo has been split off, it contains all we need. + dnl Older versions of ncurses have bugs, get a new one! + dnl Digital Unix (OSF1) should use curses (Ronald Schild). + dnl On SCO Openserver should prefer termlib (Roger Cornelius). +*************** +*** 3370,3376 **** + AC_CHECK_LIB(xpg4, _xpg4_setrunelocale, [LIBS="$LIBS -lxpg4"],,) + + dnl Check how we can run ctags. Default to "ctags" when nothing works. +! dnl --version for Exuberant ctags (preferred) + dnl Add --fields=+S to get function signatures for omni completion. + dnl -t for typedefs (many ctags have this) + dnl -s for static functions (Elvis ctags only?) +--- 3370,3376 ---- + AC_CHECK_LIB(xpg4, _xpg4_setrunelocale, [LIBS="$LIBS -lxpg4"],,) + + dnl Check how we can run ctags. Default to "ctags" when nothing works. +! dnl Use --version to detect Exuberant ctags (preferred) + dnl Add --fields=+S to get function signatures for omni completion. + dnl -t for typedefs (many ctags have this) + dnl -s for static functions (Elvis ctags only?) +*************** +*** 3378,3384 **** + dnl -i+m to test for older Exuberant ctags + AC_MSG_CHECKING(how to create tags) + test -f tags && mv tags tags.save +! if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" +--- 3378,3386 ---- + dnl -i+m to test for older Exuberant ctags + AC_MSG_CHECKING(how to create tags) + test -f tags && mv tags tags.save +! if (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then +! TAGPRG="exctags -I INIT+ --fields=+S" +! elif (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" +*** ../vim-7.3.173/src/auto/configure 2011-02-09 17:42:53.000000000 +0100 +--- src/auto/configure 2011-05-05 17:19:26.000000000 +0200 +*************** +*** 12031,12037 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5 + $as_echo_n "checking how to create tags... " >&6; } + test -f tags && mv tags tags.save +! if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" +--- 12031,12039 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5 + $as_echo_n "checking how to create tags... " >&6; } + test -f tags && mv tags tags.save +! if (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then +! TAGPRG="exctags -I INIT+ --fields=+S" +! elif (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" +*** ../vim-7.3.173/src/version.c 2011-05-05 17:14:07.000000000 +0200 +--- src/version.c 2011-05-05 17:19:37.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 174, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +54. You start tilting your head sideways to smile. :-) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 7d2766faf71fdc09e087ea43a0978d2801d3b0b8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0348/3803] Patchlevel 175 --- 7.3.175 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 7.3.175 diff --git a/7.3.175 b/7.3.175 new file mode 100644 index 00000000..57fbc4a7 --- /dev/null +++ b/7.3.175 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.175 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.175 +Problem: When 'colorcolumn' is set locally to a window, ":new" opens a + window with the same highlighting but 'colorcolumn' is empty. + (Tyru) +Solution: Call check_colorcolumn() after clearing and copying options. + (Christian Brabandt) +Files: src/buffer.c + + +*** ../vim-7.3.174/src/buffer.c 2011-04-11 16:56:29.000000000 +0200 +--- src/buffer.c 2011-05-05 17:28:24.000000000 +0200 +*************** +*** 2527,2532 **** +--- 2527,2535 ---- + if (p_fdls >= 0) + curwin->w_p_fdl = p_fdls; + #endif ++ #ifdef FEAT_SYN_HL ++ check_colorcolumn(curwin); ++ #endif + } + + /* +*** ../vim-7.3.174/src/version.c 2011-05-05 17:23:58.000000000 +0200 +--- src/version.c 2011-05-05 17:30:32.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 175, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +55. You ask your doctor to implant a gig in your brain. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 2d8d72813aeaa4c3b815a5eaefb4180de451e845 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0349/3803] Patchlevel 176 --- 7.3.176 | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 7.3.176 diff --git a/7.3.176 b/7.3.176 new file mode 100644 index 00000000..fcf4880d --- /dev/null +++ b/7.3.176 @@ -0,0 +1,165 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.176 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.176 +Problem: Ruby linking doesn't work properly on Mac OS X. +Solution: Fix the configure check for Ruby. (Bjorn Winckler) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.3.175/src/configure.in 2011-05-05 17:23:58.000000000 +0200 +--- src/configure.in 2011-05-05 18:03:38.000000000 +0200 +*************** +*** 1387,1396 **** + AC_MSG_RESULT($enable_rubyinterp) + if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then + AC_MSG_CHECKING(--with-ruby-command argument) + AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)], +! RUBY_CMD="$withval"; AC_MSG_RESULT($RUBY_CMD), + RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD)) +- AC_SUBST(vi_cv_path_ruby) + AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD) + if test "X$vi_cv_path_ruby" != "X"; then + AC_MSG_CHECKING(Ruby version) +--- 1387,1396 ---- + AC_MSG_RESULT($enable_rubyinterp) + if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then + AC_MSG_CHECKING(--with-ruby-command argument) ++ AC_SUBST(vi_cv_path_ruby) + AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)], +! RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; AC_MSG_RESULT($RUBY_CMD), + RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD)) + AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD) + if test "X$vi_cv_path_ruby" != "X"; then + AC_MSG_CHECKING(Ruby version) +*************** +*** 1412,1429 **** + RUBY_LIBS="$rubylibs" + fi + librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'` +! if test -f "$rubyhdrdir/$librubyarg"; then +! librubyarg="$rubyhdrdir/$librubyarg" +! else +! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'` +! if test -f "$rubylibdir/$librubyarg"; then +! librubyarg="$rubylibdir/$librubyarg" +! elif test "$librubyarg" = "libruby.a"; then +! dnl required on Mac OS 10.3 where libruby.a doesn't exist +! librubyarg="-lruby" +! else +! librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"` +! fi + fi + + if test "X$librubyarg" != "X"; then +--- 1412,1426 ---- + RUBY_LIBS="$rubylibs" + fi + librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'` +! librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBY_A"]])'` +! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'` +! if test -f "$rubylibdir/$librubya"; then +! librubyarg="$librubyarg" +! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" +! elif test "$librubyarg" = "libruby.a"; then +! dnl required on Mac OS 10.3 where libruby.a doesn't exist +! librubyarg="-lruby" +! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" + fi + + if test "X$librubyarg" != "X"; then +*** ../vim-7.3.175/src/auto/configure 2011-05-05 17:23:58.000000000 +0200 +--- src/auto/configure 2011-05-05 18:06:47.000000000 +0200 +*************** +*** 6218,6233 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5 + $as_echo_n "checking --with-ruby-command argument... " >&6; } + + # Check whether --with-ruby-command was given. + if test "${with_ruby_command+set}" = set; then : +! withval=$with_ruby_command; RUBY_CMD="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5 + $as_echo "$RUBY_CMD" >&6; } + else + RUBY_CMD="ruby"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5 + $as_echo "defaulting to $RUBY_CMD" >&6; } + fi + +- + # Extract the first word of "$RUBY_CMD", so it can be a program name with args. + set dummy $RUBY_CMD; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +--- 6218,6233 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5 + $as_echo_n "checking --with-ruby-command argument... " >&6; } + ++ + # Check whether --with-ruby-command was given. + if test "${with_ruby_command+set}" = set; then : +! withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5 + $as_echo "$RUBY_CMD" >&6; } + else + RUBY_CMD="ruby"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5 + $as_echo "defaulting to $RUBY_CMD" >&6; } + fi + + # Extract the first word of "$RUBY_CMD", so it can be a program name with args. + set dummy $RUBY_CMD; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +*************** +*** 6292,6308 **** + RUBY_LIBS="$rubylibs" + fi + librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'` +! if test -f "$rubyhdrdir/$librubyarg"; then +! librubyarg="$rubyhdrdir/$librubyarg" +! else +! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'` +! if test -f "$rubylibdir/$librubyarg"; then +! librubyarg="$rubylibdir/$librubyarg" +! elif test "$librubyarg" = "libruby.a"; then +! librubyarg="-lruby" +! else +! librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"` +! fi + fi + + if test "X$librubyarg" != "X"; then +--- 6292,6305 ---- + RUBY_LIBS="$rubylibs" + fi + librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'` +! librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBY_A"])'` +! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'` +! if test -f "$rubylibdir/$librubya"; then +! librubyarg="$librubyarg" +! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" +! elif test "$librubyarg" = "libruby.a"; then +! librubyarg="-lruby" +! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" + fi + + if test "X$librubyarg" != "X"; then +*** ../vim-7.3.175/src/version.c 2011-05-05 17:32:40.000000000 +0200 +--- src/version.c 2011-05-05 18:08:52.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 176, + /**/ + +-- +"I simultaneously try to keep my head in the clouds and my feet on the +ground. Sometimes it's a stretch, though." -- Larry Wall + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a724e590edd09d457f892b88967ac0f7b8ea7fbc Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0350/3803] Patchlevel 177 --- 7.3.177 | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 7.3.177 diff --git a/7.3.177 b/7.3.177 new file mode 100644 index 00000000..895b3b13 --- /dev/null +++ b/7.3.177 @@ -0,0 +1,97 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.177 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.177 +Problem: MS-Windows: mkdir() doesn't work properly when 'encoding' is + "utf-8". +Solution: Convert to utf-16. (Yukihiro Nakadaira) +Files: src/os_win32.c, src/os_win32.h, src/proto/os_win32.pro + + +*** ../vim-7.3.176/src/os_win32.c 2011-05-05 16:41:19.000000000 +0200 +--- src/os_win32.c 2011-05-05 18:24:36.000000000 +0200 +*************** +*** 2640,2645 **** +--- 2640,2669 ---- + } + + /* ++ * Create directory "name". ++ * Return 0 on success, -1 on error. ++ */ ++ int ++ mch_mkdir(char_u *name) ++ { ++ #ifdef FEAT_MBYTE ++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) ++ { ++ WCHAR *p; ++ int retval; ++ ++ p = enc_to_utf16(name, NULL); ++ if (p == NULL) ++ return -1; ++ retval = _wmkdir(p); ++ vim_free(p); ++ return retval; ++ } ++ #endif ++ return _mkdir(name); ++ } ++ ++ /* + * Return TRUE if file "fname" has more than one link. + */ + int +*** ../vim-7.3.176/src/os_win32.h 2010-08-15 21:57:30.000000000 +0200 +--- src/os_win32.h 2011-05-05 18:25:44.000000000 +0200 +*************** +*** 191,195 **** + #ifdef __BORLANDC__ + # define vim_mkdir(x, y) mkdir(x) + #else +! # define vim_mkdir(x, y) _mkdir(x) + #endif +--- 191,195 ---- + #ifdef __BORLANDC__ + # define vim_mkdir(x, y) mkdir(x) + #else +! # define vim_mkdir(x, y) mch_mkdir(x) + #endif +*** ../vim-7.3.176/src/proto/os_win32.pro 2011-05-05 16:41:19.000000000 +0200 +--- src/proto/os_win32.pro 2011-05-05 18:26:20.000000000 +0200 +*************** +*** 20,25 **** +--- 20,26 ---- + int mch_setperm __ARGS((char_u *name, long perm)); + void mch_hide __ARGS((char_u *name)); + int mch_isdir __ARGS((char_u *name)); ++ int mch_mkdir __ARGS((char_u *name)); + int mch_is_linked __ARGS((char_u *fname)); + int win32_fileinfo __ARGS((char_u *name, BY_HANDLE_FILE_INFORMATION *lpFileInfo)); + int mch_writable __ARGS((char_u *name)); +*** ../vim-7.3.176/src/version.c 2011-05-05 18:10:11.000000000 +0200 +--- src/version.c 2011-05-05 18:27:56.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 177, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +56. You leave the modem speaker on after connecting because you think it + sounds like the ocean wind...the perfect soundtrack for "surfing the net". + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b5dc58016c357b77fa082c2957df6620b15c8888 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0351/3803] Patchlevel 178 --- 7.3.178 | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 7.3.178 diff --git a/7.3.178 b/7.3.178 new file mode 100644 index 00000000..9b6ca7c3 --- /dev/null +++ b/7.3.178 @@ -0,0 +1,163 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.178 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.178 +Problem: C-indent doesn't handle code right after { correctly. +Solution: Fix detecting unterminated line. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.177/src/misc1.c 2011-04-28 17:48:39.000000000 +0200 +--- src/misc1.c 2011-05-10 11:35:09.000000000 +0200 +*************** +*** 4983,4989 **** + } + + /* +! * Return TRUE if there there is no code at *s. White space and comments are + * not considered code. + */ + static int +--- 4983,4989 ---- + } + + /* +! * Return TRUE if there is no code at *s. White space and comments are + * not considered code. + */ + static int +*************** +*** 5458,5465 **** + } + + /* +! * 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). + */ +--- 5458,5468 ---- + } + + /* +! * Recognize a line that starts with '{' or '}', or ends with ';', ',', '{' or +! * '}'. + * Don't consider "} else" a terminated line. ++ * Don't consider a line where there are unmatched opening braces before '}', ++ * ';' or ',' a terminated line. + * Return the character terminating the line (ending char's have precedence if + * both apply in order to determine initializations). + */ +*************** +*** 5470,5475 **** +--- 5473,5479 ---- + int incl_comma; /* recognize a trailing comma */ + { + char_u found_start = 0; ++ unsigned n_open = 0; + + s = cin_skipcomment(s); + +*************** +*** 5480,5489 **** + { + /* 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++; +--- 5484,5502 ---- + { + /* skip over comments, "" strings and 'c'haracters */ + s = skip_string(cin_skipcomment(s)); +! if (*s == '}' && n_open > 0) +! --n_open; +! if (n_open == 0 +! && (*s == ';' || *s == '}' || (incl_comma && *s == ',')) + && cin_nocode(s + 1)) + return *s; ++ else if (*s == '{') ++ { ++ if (incl_open && cin_nocode(s + 1)) ++ return *s; ++ else ++ ++n_open; ++ } + + if (*s) + s++; +*** ../vim-7.3.177/src/testdir/test3.in 2011-04-28 13:01:59.000000000 +0200 +--- src/testdir/test3.in 2011-05-10 11:34:13.000000000 +0200 +*************** +*** 1344,1349 **** +--- 1344,1365 ---- + } + + STARTTEST ++ :set cino& ++ 2kdd=][ ++ ENDTEST ++ ++ void func(void) ++ { ++ if(x==y) ++ if(y==z) ++ foo=1; ++ else { bar=1; ++ baz=2; ++ } ++ printf("Foo!\n"); ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../vim-7.3.177/src/testdir/test3.ok 2011-04-28 13:01:59.000000000 +0200 +--- src/testdir/test3.ok 2011-05-10 11:34:13.000000000 +0200 +*************** +*** 1204,1206 **** +--- 1204,1218 ---- + { + } + ++ ++ void func(void) ++ { ++ if(x==y) ++ if(y==z) ++ foo=1; ++ else { bar=1; ++ baz=2; ++ } ++ printf("Foo!\n"); ++ } ++ +*** ../vim-7.3.177/src/version.c 2011-05-05 18:31:54.000000000 +0200 +--- src/version.c 2011-05-10 11:37:43.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 178, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +69. Yahoo welcomes you with your own start page + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5eb1d2f8766d829e1bc0187f7ce306480f280268 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0352/3803] Patchlevel 179 --- 7.3.179 | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 7.3.179 diff --git a/7.3.179 b/7.3.179 new file mode 100644 index 00000000..f175b264 --- /dev/null +++ b/7.3.179 @@ -0,0 +1,95 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.179 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.179 +Problem: C-indent doesn't handle colon in string correctly. +Solution: Skip the string. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.178/src/misc1.c 2011-05-10 11:39:13.000000000 +0200 +--- src/misc1.c 2011-05-10 11:50:14.000000000 +0200 +*************** +*** 5801,5807 **** + continue; + } + +! if (s[0] == ':') + { + if (s[1] == ':') + { +--- 5801,5809 ---- + continue; + } + +! if (s[0] == '"') +! s = skip_string(s) + 1; +! else if (s[0] == ':') + { + if (s[1] == ':') + { +*** ../vim-7.3.178/src/testdir/test3.in 2011-05-10 11:39:13.000000000 +0200 +--- src/testdir/test3.in 2011-05-10 11:53:02.000000000 +0200 +*************** +*** 1360,1365 **** +--- 1360,1378 ---- + } + + STARTTEST ++ :set cino& ++ 2kdd=][ ++ ENDTEST ++ ++ void func(void) ++ { ++ cout << "a" ++ << "b" ++ << ") :" ++ << "c"; ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../vim-7.3.178/src/testdir/test3.ok 2011-05-10 11:39:13.000000000 +0200 +--- src/testdir/test3.ok 2011-05-10 11:50:14.000000000 +0200 +*************** +*** 1216,1218 **** +--- 1216,1227 ---- + printf("Foo!\n"); + } + ++ ++ void func(void) ++ { ++ cout << "a" ++ << "b" ++ << ") :" ++ << "c"; ++ } ++ +*** ../vim-7.3.178/src/version.c 2011-05-10 11:39:13.000000000 +0200 +--- src/version.c 2011-05-10 11:53:36.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 179, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +71. You wonder how people walk + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From cc40d62373c2af266363e4959bfd65a7a21068fb Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0353/3803] Patchlevel 180 --- 7.3.180 | 295 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 295 insertions(+) create mode 100644 7.3.180 diff --git a/7.3.180 b/7.3.180 new file mode 100644 index 00000000..5997bfbe --- /dev/null +++ b/7.3.180 @@ -0,0 +1,295 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.180 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.180 +Problem: When both a middle part of 'comments' matches and an end part, the + middle part was used errornously. +Solution: After finding the middle part match continue looking for a better + end part match. (partly by Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.179/src/misc1.c 2011-05-10 11:56:26.000000000 +0200 +--- src/misc1.c 2011-05-10 13:24:38.000000000 +0200 +*************** +*** 1561,1566 **** +--- 1561,1569 ---- + char_u part_buf[COM_MAX_LEN]; /* buffer for one option part */ + char_u *string; /* pointer to comment string */ + char_u *list; ++ int middle_match_len = 0; ++ char_u *prev_list; ++ char_u *saved_flags; + + i = 0; + while (vim_iswhite(line[i])) /* leading white space is ignored */ +*************** +*** 1569,1575 **** + /* + * Repeat to match several nested comment strings. + */ +! while (line[i]) + { + /* + * scan through the 'comments' option for a match +--- 1572,1578 ---- + /* + * Repeat to match several nested comment strings. + */ +! while (line[i] != NUL) + { + /* + * scan through the 'comments' option for a match +*************** +*** 1577,1658 **** + found_one = FALSE; + for (list = curbuf->b_p_com; *list; ) + { +! /* +! * Get one option part into part_buf[]. Advance list to next one. +! * put string at start of string. +! */ +! if (!got_com && flags != NULL) /* remember where flags started */ +! *flags = list; + (void)copy_option_part(&list, part_buf, COM_MAX_LEN, ","); + string = vim_strchr(part_buf, ':'); + if (string == NULL) /* missing ':', ignore this part */ + continue; + *string++ = NUL; /* isolate flags from string */ + +! /* +! * When already found a nested comment, only accept further +! * nested comments. +! */ + if (got_com && vim_strchr(part_buf, COM_NEST) == NULL) + continue; + +! /* When 'O' flag used don't use for "O" command */ + if (backward && vim_strchr(part_buf, COM_NOBACK) != NULL) + continue; + +! /* +! * Line contents and string must match. + * When string starts with white space, must have some white space + * (but the amount does not need to match, there might be a mix of +! * TABs and spaces). +! */ + if (vim_iswhite(string[0])) + { + if (i == 0 || !vim_iswhite(line[i - 1])) +! continue; + while (vim_iswhite(string[0])) + ++string; + } + for (j = 0; string[j] != NUL && string[j] == line[i + j]; ++j) + ; + if (string[j] != NUL) +! continue; + +! /* +! * When 'b' flag used, there must be white space or an +! * end-of-line after the string in the line. +! */ + if (vim_strchr(part_buf, COM_BLANK) != NULL + && !vim_iswhite(line[i + j]) && line[i + j] != NUL) + continue; + +! /* +! * We have found a match, stop searching. +! */ +! i += j; +! got_com = TRUE; + found_one = TRUE; + break; + } + +! /* +! * No match found, stop scanning. +! */ + if (!found_one) + break; + +! /* +! * Include any trailing white space. +! */ + while (vim_iswhite(line[i])) + ++i; + +! /* +! * If this comment doesn't nest, stop here. +! */ + if (vim_strchr(part_buf, COM_NEST) == NULL) + break; + } + return (got_com ? i : 0); + } + #endif +--- 1580,1683 ---- + found_one = FALSE; + for (list = curbuf->b_p_com; *list; ) + { +! /* Get one option part into part_buf[]. Advance "list" to next +! * one. Put "string" at start of string. */ +! if (!got_com && flags != NULL) +! *flags = list; /* remember where flags started */ +! prev_list = list; + (void)copy_option_part(&list, part_buf, COM_MAX_LEN, ","); + string = vim_strchr(part_buf, ':'); + if (string == NULL) /* missing ':', ignore this part */ + continue; + *string++ = NUL; /* isolate flags from string */ + +! /* If we found a middle match previously, use that match when this +! * is not a middle or end. */ +! if (middle_match_len != 0 +! && vim_strchr(part_buf, COM_MIDDLE) == NULL +! && vim_strchr(part_buf, COM_END) == NULL) +! break; +! +! /* When we already found a nested comment, only accept further +! * nested comments. */ + if (got_com && vim_strchr(part_buf, COM_NEST) == NULL) + continue; + +! /* When 'O' flag present and using "O" command skip this one. */ + if (backward && vim_strchr(part_buf, COM_NOBACK) != NULL) + continue; + +! /* Line contents and string must match. + * When string starts with white space, must have some white space + * (but the amount does not need to match, there might be a mix of +! * TABs and spaces). */ + if (vim_iswhite(string[0])) + { + if (i == 0 || !vim_iswhite(line[i - 1])) +! continue; /* missing shite space */ + while (vim_iswhite(string[0])) + ++string; + } + for (j = 0; string[j] != NUL && string[j] == line[i + j]; ++j) + ; + if (string[j] != NUL) +! continue; /* string doesn't match */ + +! /* When 'b' flag used, there must be white space or an +! * end-of-line after the string in the line. */ + if (vim_strchr(part_buf, COM_BLANK) != NULL + && !vim_iswhite(line[i + j]) && line[i + j] != NUL) + continue; + +! /* We have found a match, stop searching unless this is a middle +! * comment. The middle comment can be a substring of the end +! * comment in which case it's better to return the length of the +! * end comment and its flags. Thus we keep searching with middle +! * and end matches and use an end match if it matches better. */ +! if (vim_strchr(part_buf, COM_MIDDLE) != NULL) +! { +! if (middle_match_len == 0) +! { +! middle_match_len = j; +! saved_flags = prev_list; +! } +! continue; +! } +! if (middle_match_len != 0 && j > middle_match_len) +! /* Use this match instead of the middle match, since it's a +! * longer thus better match. */ +! middle_match_len = 0; +! +! if (middle_match_len == 0) +! i += j; + found_one = TRUE; + break; + } + +! if (middle_match_len != 0) +! { +! /* Use the previously found middle match after failing to find a +! * match with an end. */ +! if (!got_com && flags != NULL) +! *flags = saved_flags; +! i += middle_match_len; +! found_one = TRUE; +! } +! +! /* No match found, stop scanning. */ + if (!found_one) + break; + +! /* Include any trailing white space. */ + while (vim_iswhite(line[i])) + ++i; + +! /* If this comment doesn't nest, stop here. */ +! got_com = TRUE; + if (vim_strchr(part_buf, COM_NEST) == NULL) + break; + } ++ + return (got_com ? i : 0); + } + #endif +*** ../vim-7.3.179/src/testdir/test3.in 2011-05-10 11:56:26.000000000 +0200 +--- src/testdir/test3.in 2011-05-10 12:05:50.000000000 +0200 +*************** +*** 1373,1378 **** +--- 1373,1390 ---- + } + + STARTTEST ++ :set com=s1:/*,m:*,ex:*/ ++ ]]3jofoo(); ++ ENDTEST ++ ++ void func(void) ++ { ++ /* ++ * This is a comment. ++ */ ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../vim-7.3.179/src/testdir/test3.ok 2011-05-10 11:56:26.000000000 +0200 +--- src/testdir/test3.ok 2011-05-10 12:05:50.000000000 +0200 +*************** +*** 1225,1227 **** +--- 1225,1236 ---- + << "c"; + } + ++ ++ void func(void) ++ { ++ /* ++ * This is a comment. ++ */ ++ foo(); ++ } ++ +*** ../vim-7.3.179/src/version.c 2011-05-10 11:56:26.000000000 +0200 +--- src/version.c 2011-05-10 13:37:28.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 180, + /**/ + +-- +"Thou shalt not follow the Null Pointer, for at its end Chaos and +Madness lie." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 7dee8a73793884b21521a8051678036cc2f68707 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0354/3803] Patchlevel 181 --- 7.3.181 | 171 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 7.3.181 diff --git a/7.3.181 b/7.3.181 new file mode 100644 index 00000000..3151d445 --- /dev/null +++ b/7.3.181 @@ -0,0 +1,171 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.181 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.181 +Problem: When repeating the insert of CTRL-V or a digraph the display may + not be updated correctly. +Solution: Only call edit_unputchar() after edit_putchar(). (Lech Lorens) +Files: src/edit.c + + +*** ../vim-7.3.180/src/edit.c 2010-11-10 17:11:29.000000000 +0100 +--- src/edit.c 2011-05-10 14:16:41.000000000 +0200 +*************** +*** 1553,1564 **** +--- 1553,1568 ---- + ins_ctrl_v() + { + int c; ++ int did_putchar = FALSE; + + /* may need to redraw when no more chars available now */ + ins_redraw(FALSE); + + if (redrawing() && !char_avail()) ++ { + edit_putchar('^', TRUE); ++ did_putchar = TRUE; ++ } + AppendToRedobuff((char_u *)CTRL_V_STR); /* CTRL-V */ + + #ifdef FEAT_CMDL_INFO +*************** +*** 1566,1573 **** + #endif + + c = get_literal(); +! edit_unputchar(); /* when line fits in 'columns' the '^' is at the start +! of the next line and will not be redrawn */ + #ifdef FEAT_CMDL_INFO + clear_showcmd(); + #endif +--- 1570,1579 ---- + #endif + + c = get_literal(); +! if (did_putchar) +! /* when the line fits in 'columns' the '^' is at the start of the next +! * line and will not removed by the redraw */ +! edit_unputchar(); + #ifdef FEAT_CMDL_INFO + clear_showcmd(); + #endif +*************** +*** 9637,9642 **** +--- 9643,9649 ---- + { + int c; + int cc; ++ int did_putchar = FALSE; + + pc_status = PC_STATUS_UNSET; + if (redrawing() && !char_avail()) +*************** +*** 9645,9650 **** +--- 9652,9658 ---- + ins_redraw(FALSE); + + edit_putchar('?', TRUE); ++ did_putchar = TRUE; + #ifdef FEAT_CMDL_INFO + add_to_showcmd_c(Ctrl_K); + #endif +*************** +*** 9661,9668 **** + c = plain_vgetc(); + --no_mapping; + --allow_keys; +! edit_unputchar(); /* when line fits in 'columns' the '?' is at the start +! of the next line and will not be redrawn */ + + if (IS_SPECIAL(c) || mod_mask) /* special key */ + { +--- 9669,9678 ---- + c = plain_vgetc(); + --no_mapping; + --allow_keys; +! if (did_putchar) +! /* when the line fits in 'columns' the '?' is at the start of the next +! * line and will not be removed by the redraw */ +! edit_unputchar(); + + if (IS_SPECIAL(c) || mod_mask) /* special key */ + { +*************** +*** 9674,9679 **** +--- 9684,9690 ---- + } + if (c != ESC) + { ++ did_putchar = FALSE; + if (redrawing() && !char_avail()) + { + /* may need to redraw when no more chars available now */ +*************** +*** 9681,9691 **** + + if (char2cells(c) == 1) + { +- /* first remove the '?', otherwise it's restored when typing +- * an ESC next */ +- edit_unputchar(); + ins_redraw(FALSE); + edit_putchar(c, TRUE); + } + #ifdef FEAT_CMDL_INFO + add_to_showcmd_c(c); +--- 9692,9700 ---- + + if (char2cells(c) == 1) + { + ins_redraw(FALSE); + edit_putchar(c, TRUE); ++ did_putchar = TRUE; + } + #ifdef FEAT_CMDL_INFO + add_to_showcmd_c(c); +*************** +*** 9696,9703 **** + cc = plain_vgetc(); + --no_mapping; + --allow_keys; +! edit_unputchar(); /* when line fits in 'columns' the '?' is at the +! start of the next line and will not be redrawn */ + if (cc != ESC) + { + AppendToRedobuff((char_u *)CTRL_V_STR); +--- 9705,9714 ---- + cc = plain_vgetc(); + --no_mapping; + --allow_keys; +! if (did_putchar) +! /* when the line fits in 'columns' the '?' is at the start of the +! * next line and will not be removed by a redraw */ +! edit_unputchar(); + if (cc != ESC) + { + AppendToRedobuff((char_u *)CTRL_V_STR); +*** ../vim-7.3.180/src/version.c 2011-05-10 13:38:23.000000000 +0200 +--- src/version.c 2011-05-10 14:20:40.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 181, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +74. Your most erotic dreams are about cybersex + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From c05932627e91c6c70ed9621a32e8e9eb78afb510 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0355/3803] Patchlevel 182 --- 7.3.182 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 7.3.182 diff --git a/7.3.182 b/7.3.182 new file mode 100644 index 00000000..509b68b5 --- /dev/null +++ b/7.3.182 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.182 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.182 (after 7.3.180) +Problem: Compiler warning for uninitialized variable. +Solution: Add dummy initializer. +Files: src/misc1.c + + +*** ../vim-7.3.181/src/misc1.c 2011-05-10 13:38:23.000000000 +0200 +--- src/misc1.c 2011-05-10 14:37:39.000000000 +0200 +*************** +*** 1563,1569 **** + char_u *list; + int middle_match_len = 0; + char_u *prev_list; +! char_u *saved_flags; + + i = 0; + while (vim_iswhite(line[i])) /* leading white space is ignored */ +--- 1563,1569 ---- + char_u *list; + int middle_match_len = 0; + char_u *prev_list; +! char_u *saved_flags = NULL; + + i = 0; + while (vim_iswhite(line[i])) /* leading white space is ignored */ +*** ../vim-7.3.181/src/version.c 2011-05-10 14:22:10.000000000 +0200 +--- src/version.c 2011-05-10 14:38:39.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 182, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +75. You start wondering whether you could actually upgrade your brain + with a Pentium Pro microprocessor 80. The upgrade works just fine. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From df22a5c56d27673e500449c84e45210de51f6c7e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0356/3803] Patchlevel 183 --- 7.3.183 | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 7.3.183 diff --git a/7.3.183 b/7.3.183 new file mode 100644 index 00000000..23178c0b --- /dev/null +++ b/7.3.183 @@ -0,0 +1,87 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.183 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.183 (after 7.3.174) +Problem: When Exuberant ctags binary is exuberant-ctags it's not found. +Solution: Add configure check for exuberant-ctags. +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.3.182/src/configure.in 2011-05-05 18:10:11.000000000 +0200 +--- src/configure.in 2011-05-10 15:39:38.000000000 +0200 +*************** +*** 3375,3384 **** + dnl -i+m to test for older Exuberant ctags + AC_MSG_CHECKING(how to create tags) + test -f tags && mv tags tags.save +! if (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then +! TAGPRG="exctags -I INIT+ --fields=+S" +! elif (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" + (eval etags /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags" +--- 3375,3386 ---- + dnl -i+m to test for older Exuberant ctags + AC_MSG_CHECKING(how to create tags) + test -f tags && mv tags tags.save +! if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" ++ elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then ++ TAGPRG="exctags -I INIT+ --fields=+S" ++ elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then ++ TAGPRG="exuberant-ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" + (eval etags /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags" +*** ../vim-7.3.182/src/auto/configure 2011-05-05 18:10:11.000000000 +0200 +--- src/auto/configure 2011-05-10 15:39:41.000000000 +0200 +*************** +*** 12028,12037 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5 + $as_echo_n "checking how to create tags... " >&6; } + test -f tags && mv tags tags.save +! if (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then +! TAGPRG="exctags -I INIT+ --fields=+S" +! elif (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" + (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags" +--- 12028,12039 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5 + $as_echo_n "checking how to create tags... " >&6; } + test -f tags && mv tags tags.save +! if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" ++ elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then ++ TAGPRG="exctags -I INIT+ --fields=+S" ++ elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then ++ TAGPRG="exuberant-ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" + (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags" +*** ../vim-7.3.182/src/version.c 2011-05-10 14:44:07.000000000 +0200 +--- src/version.c 2011-05-10 15:40:48.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 183, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +78. You find yourself dialing IP numbers on the phone. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 6004513be64ff788f6bd0a06e0c16bceec192c4b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0357/3803] Patchlevel 184 --- 7.3.184 | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 7.3.184 diff --git a/7.3.184 b/7.3.184 new file mode 100644 index 00000000..3b0cfc69 --- /dev/null +++ b/7.3.184 @@ -0,0 +1,86 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.184 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.184 +Problem: Static code analysis errors in riscOS. +Solution: Make buffer size bigger. (Dominique Pelle) +Files: src/gui_riscos.c + + +*** ../vim-7.3.183/src/gui_riscos.c 2010-08-15 21:57:28.000000000 +0200 +--- src/gui_riscos.c 2011-05-10 15:49:56.000000000 +0200 +*************** +*** 1756,1762 **** + + if (button & 0x444) + { +! int front_block[10]; + /* Dragging with Select - bring window to front first */ + front_block[0] = gui.window_handle; + swi(Wimp_GetWindowState, 0, front_block); +--- 1756,1762 ---- + + if (button & 0x444) + { +! int front_block[64]; + /* Dragging with Select - bring window to front first */ + front_block[0] = gui.window_handle; + swi(Wimp_GetWindowState, 0, front_block); +*************** +*** 1874,1880 **** + + if (ro_dragging == DRAG_RESIZE_WINDOW) + { +! /* Resizeing the main window. */ + block[2] = y; + block[3] = x; + ro_open_main(block); +--- 1874,1880 ---- + + if (ro_dragging == DRAG_RESIZE_WINDOW) + { +! /* Resizing the main window. */ + block[2] = y; + block[3] = x; + ro_open_main(block); +*************** +*** 2651,2657 **** + long_u length; + + block[0] = 48; /* Size of block. */ +! block[3] = 0; /* Orinial message. */ + block[4] = 0x10; /* Data request. */ + block[5] = gui.window_handle; + block[6] = RO_LOAD_CLIPBOARD; /* Internal handle. */ +--- 2651,2657 ---- + long_u length; + + block[0] = 48; /* Size of block. */ +! block[3] = 0; /* Original message. */ + block[4] = 0x10; /* Data request. */ + block[5] = gui.window_handle; + block[6] = RO_LOAD_CLIPBOARD; /* Internal handle. */ +*** ../vim-7.3.183/src/version.c 2011-05-10 15:41:59.000000000 +0200 +--- src/version.c 2011-05-10 15:51:29.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 184, + /**/ + +-- +If bankers can count, how come they have eight windows and +only four tellers? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d7fc38a4b309164a5b264f7fd7b8d21de8be61c3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0358/3803] Patchlevel 185 --- 7.3.185 | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 7.3.185 diff --git a/7.3.185 b/7.3.185 new file mode 100644 index 00000000..7b3ed189 --- /dev/null +++ b/7.3.185 @@ -0,0 +1,77 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.185 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.185 +Problem: ":windo g/pattern/q" closes windows and reports "N more lines". + (Tim Chase) +Solution: Remember what buffer ":global" started in. (Jean-Rene David) +Files: src/ex_cmds.c + + +*** ../vim-7.3.184/src/ex_cmds.c 2011-04-11 21:35:03.000000000 +0200 +--- src/ex_cmds.c 2011-05-10 15:58:48.000000000 +0200 +*************** +*** 5365,5372 **** + global_exe(cmd) + char_u *cmd; + { +! linenr_T old_lcount; /* b_ml.ml_line_count before the command */ +! linenr_T lnum; /* line number according to old situation */ + + /* + * Set current position only once for a global command. +--- 5365,5373 ---- + global_exe(cmd) + char_u *cmd; + { +! linenr_T old_lcount; /* b_ml.ml_line_count before the command */ +! buf_T *old_buf = curbuf; /* remember what buffer we started in */ +! linenr_T lnum; /* line number according to old situation */ + + /* + * Set current position only once for a global command. +*************** +*** 5410,5417 **** + msg_didout = FALSE; + + /* If substitutes done, report number of substitutes, otherwise report +! * number of extra or deleted lines. */ +! if (!do_sub_msg(FALSE)) + msgmore(curbuf->b_ml.ml_line_count - old_lcount); + } + +--- 5411,5420 ---- + msg_didout = FALSE; + + /* If substitutes done, report number of substitutes, otherwise report +! * number of extra or deleted lines. +! * Don't report extra or deleted lines in the edge case where the buffer +! * we are in after execution is different from the buffer we started in. */ +! if (!do_sub_msg(FALSE) && curbuf == old_buf) + msgmore(curbuf->b_ml.ml_line_count - old_lcount); + } + +*** ../vim-7.3.184/src/version.c 2011-05-10 15:52:10.000000000 +0200 +--- src/version.c 2011-05-10 15:57:40.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 185, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +79. All of your most erotic dreams have a scrollbar at the right side. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a183ffaea5029571bc872df6b3c3c4c4043a69b1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0359/3803] Patchlevel 186 --- 7.3.186 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 7.3.186 diff --git a/7.3.186 b/7.3.186 new file mode 100644 index 00000000..d834c370 --- /dev/null +++ b/7.3.186 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.186 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.186 +Problem: When 'clipboard' contains "unnamed" or "unnamedplus" the value of + v:register is wrong for operators without a specific register. +Solution: Adjust the register according to 'clipboard'. (Ingo Karkat) +Files: src/normal.c + + +*** ../vim-7.3.185/src/normal.c 2010-12-17 18:52:56.000000000 +0100 +--- src/normal.c 2011-05-10 16:07:49.000000000 +0200 +*************** +*** 1202,1208 **** + { + clearop(oap); + #ifdef FEAT_EVAL +! set_reg_var('"'); + #endif + } + +--- 1202,1214 ---- + { + clearop(oap); + #ifdef FEAT_EVAL +! { +! int regname = 0; +! /* Adjust the register according to 'clipboard', so that when +! * "unnamed" is present it becomes '*' or '+' instead of '"'. */ +! adjust_clip_reg(®name); +! set_reg_var(regname); +! } + #endif + } + +*** ../vim-7.3.185/src/version.c 2011-05-10 16:00:43.000000000 +0200 +--- src/version.c 2011-05-10 16:10:10.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 186, + /**/ + +-- +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/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f31852187fde77080dcd45ba04412af228946f23 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0360/3803] Patchlevel 187 --- 7.3.187 | 6621 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 6621 insertions(+) create mode 100644 7.3.187 diff --git a/7.3.187 b/7.3.187 new file mode 100644 index 00000000..7bf82ce4 --- /dev/null +++ b/7.3.187 @@ -0,0 +1,6621 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.187 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.187 +Problem: The RISC OS port has obvious errors and is not being maintained. +Solution: Remove the RISC OS files and code. +Files: src/ascii.h, src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, + src/ex_docmd.c, src/fileio.c, src/globals.h, src/gui.c, src/gui.h, + src/main.c, src/memfile.c, src/memline.c, src/misc1.c, + src/proto.h, src/quickfix.c, src/search.c, src/structs.h, + src/term.c, src/termlib.c, src/version.c, src/vim.h, + src/gui_riscos.h, src/os_riscos.h, src/gui_riscos.c, + src/os_riscos.c, runtime/doc/os_risc.txt + + +*** ../vim-7.3.186/src/ascii.h 2010-08-15 21:57:25.000000000 +0200 +--- src/ascii.h 2011-05-10 16:22:08.000000000 +0200 +*************** +*** 183,193 **** + # define PATHSEP psepc + # define PATHSEPSTR pseps + #else +! # ifdef RISCOS +! # define PATHSEP '.' +! # define PATHSEPSTR "." +! # else +! # define PATHSEP '/' +! # define PATHSEPSTR "/" +! # endif + #endif +--- 183,188 ---- + # define PATHSEP psepc + # define PATHSEPSTR pseps + #else +! # define PATHSEP '/' +! # define PATHSEPSTR "/" + #endif +*** ../vim-7.3.186/src/eval.c 2011-04-21 14:27:21.000000000 +0200 +--- src/eval.c 2011-05-10 16:22:21.000000000 +0200 +*************** +*** 11818,11826 **** + #ifdef __QNX__ + "qnx", + #endif +- #ifdef RISCOS +- "riscos", +- #endif + #ifdef UNIX + "unix", + #endif +--- 11818,11823 ---- +*** ../vim-7.3.186/src/ex_cmds.c 2011-05-10 16:00:43.000000000 +0200 +--- src/ex_cmds.c 2011-05-10 16:23:22.000000000 +0200 +*************** +*** 899,907 **** + * Handle the ":!cmd" command. Also for ":r !cmd" and ":w !cmd" + * Bangs in the argument are replaced with the previously entered command. + * Remember the argument. +- * +- * RISCOS: Bangs only replaced when followed by a space, since many +- * pathnames contain one. + */ + void + do_bang(addr_count, eap, forceit, do_in, do_out) +--- 899,904 ---- +*************** +*** 980,990 **** + trailarg = NULL; + while (*p) + { +! if (*p == '!' +! #ifdef RISCOS +! && (p[1] == ' ' || p[1] == NUL) +! #endif +! ) + { + if (p > newcmd && p[-1] == '\\') + STRMOVE(p - 1, p); +--- 977,983 ---- + trailarg = NULL; + while (*p) + { +! if (*p == '!') + { + if (p > newcmd && p[-1] == '\\') + STRMOVE(p - 1, p); +*************** +*** 1578,1591 **** + if (p != NULL) + *p = NUL; + } +- # ifdef RISCOS +- STRCAT(buf, " { < "); /* Use RISC OS notation for input. */ +- STRCAT(buf, itmp); +- STRCAT(buf, " } "); +- # else + STRCAT(buf, " <"); /* " < " causes problems on Amiga */ + STRCAT(buf, itmp); +- # endif + if (*p_shq == NUL) + { + p = vim_strchr(cmd, '|'); +--- 1571,1578 ---- +*************** +*** 1634,1649 **** + else + vim_snprintf((char *)end, (size_t)(buflen - (end - buf)), + #ifdef FEAT_QUICKFIX +- # ifndef RISCOS +- opt != p_sp ? " %s%s" : +- # endif + " %s %s", + #else +- # ifndef RISCOS + " %s%s", /* " > %s" causes problems on Amiga */ +- # else +- " %s %s", /* But is needed for 'shellpipe' and RISC OS */ +- # endif + #endif + (char *)opt, (char *)fname); + } +--- 1621,1629 ---- +*************** +*** 1844,1854 **** + #ifdef VMS + (char_u *)"-tmp", + #else +- # ifdef RISCOS +- (char_u *)"/tmp", +- # else + (char_u *)".tmp", +- # endif + #endif + FALSE); + if (tempname == NULL) /* out of memory */ +--- 1824,1830 ---- +*** ../vim-7.3.186/src/ex_cmds2.c 2011-04-11 21:35:03.000000000 +0200 +--- src/ex_cmds2.c 2011-05-10 16:23:47.000000000 +0200 +*************** +*** 500,517 **** + /* Expand the file name in the same way as do_source(). This means + * doing it twice, so that $DIR/file gets expanded when $DIR is + * "~/dir". */ +- #ifdef RISCOS +- q = mch_munge_fname(p); +- #else + q = expand_env_save(p); +- #endif + if (q == NULL) + return FAIL; +- #ifdef RISCOS +- p = mch_munge_fname(q); +- #else + p = expand_env_save(q); +- #endif + vim_free(q); + if (p == NULL) + return FAIL; +--- 500,509 ---- +*************** +*** 2940,2950 **** + proftime_T wait_start; + #endif + +- #ifdef RISCOS +- p = mch_munge_fname(fname); +- #else + p = expand_env_save(fname); +- #endif + if (p == NULL) + return retval; + fname_exp = fix_fname(p); +--- 2932,2938 ---- +*** ../vim-7.3.186/src/ex_docmd.c 2011-05-05 14:26:37.000000000 +0200 +--- src/ex_docmd.c 2011-05-10 16:24:18.000000000 +0200 +*************** +*** 9702,9715 **** + valid = 0; /* Must have ":p:h" to be valid */ + } + else +- #ifdef RISCOS +- /* Always use the full path for RISC OS if possible. */ +- result = curbuf->b_ffname; +- if (result == NULL) +- result = curbuf->b_fname; +- #else + result = curbuf->b_fname; +- #endif + break; + + case SPEC_HASH: /* '#' or "#99": alternate file */ +--- 9702,9708 ---- +*************** +*** 9854,9864 **** + if (src[*usedlen] == '<') /* remove the file name extension */ + { + ++*usedlen; +- #ifdef RISCOS +- if ((s = vim_strrchr(result, '/')) != NULL && s >= gettail(result)) +- #else + if ((s = vim_strrchr(result, '.')) != NULL && s >= gettail(result)) +- #endif + resultlen = (int)(s - result); + } + #ifdef FEAT_MODIFY_FNAME +--- 9847,9853 ---- +*************** +*** 10875,10882 **** + else if (vim_ispathsep(*p)) + { + *s++ = '='; +! #if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA) || defined(RISCOS) \ +! || defined(VMS) + if (*p == ':') + *s++ = '-'; + else +--- 10864,10870 ---- + else if (vim_ispathsep(*p)) + { + *s++ = '='; +! #if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA) || defined(VMS) + if (*p == ':') + *s++ = '-'; + else +*** ../vim-7.3.186/src/fileio.c 2011-05-05 16:41:19.000000000 +0200 +--- src/fileio.c 2011-05-10 16:26:06.000000000 +0200 +*************** +*** 504,521 **** + + if (newfile && !read_stdin && !read_buffer) + { +! /* Remember time of file. +! * For RISCOS, also remember the filetype. +! */ + if (mch_stat((char *)fname, &st) >= 0) + { + buf_store_time(curbuf, &st, fname); + curbuf->b_mtime_read = curbuf->b_mtime; +- +- #if defined(RISCOS) && defined(FEAT_OSFILETYPE) +- /* Read the filetype into the buffer local filetype option. */ +- mch_read_filetype(fname); +- #endif + #ifdef UNIX + /* + * Use the protection bits of the original file for the swap file. +--- 504,514 ---- + + if (newfile && !read_stdin && !read_buffer) + { +! /* Remember time of file. */ + if (mch_stat((char *)fname, &st) >= 0) + { + buf_store_time(curbuf, &st, fname); + curbuf->b_mtime_read = curbuf->b_mtime; + #ifdef UNIX + /* + * Use the protection bits of the original file for the swap file. +*************** +*** 557,563 **** + + /* + * for UNIX: check readonly with perm and mch_access() +- * for RISCOS: same as Unix, otherwise file gets re-datestamped! + * for MSDOS and Amiga: check readonly by trying to open the file for writing + */ + file_readonly = FALSE; +--- 550,555 ---- +*************** +*** 3804,3816 **** + + /* make sure we have a valid backup extension to use */ + if (*p_bex == NUL) +- { +- #ifdef RISCOS +- backup_ext = (char_u *)"/bak"; +- #else + backup_ext = (char_u *)".bak"; +- #endif +- } + else + backup_ext = p_bex; + +--- 3796,3802 ---- +*************** +*** 4724,4734 **** + #endif + if (perm >= 0) /* set perm. of new file same as old file */ + (void)mch_setperm(wfname, perm); +- #ifdef RISCOS +- if (!append && !filtering) +- /* Set the filetype after writing the file. */ +- mch_set_filetype(wfname, buf->b_p_oft); +- #endif + #ifdef HAVE_ACL + /* Probably need to set the ACL before changing the user (can't set the + * ACL on a file the user doesn't own). */ +--- 4710,4715 ---- +*************** +*** 6262,6280 **** + */ + for (ptr = retval + fnamelen; ptr > retval; mb_ptr_back(retval, ptr)) + { +- #ifndef RISCOS + if (*ext == '.' +! # ifdef USE_LONG_FNAME + && (!USE_LONG_FNAME || shortname) +! # else +! # ifndef SHORT_FNAME + && shortname +- # endif + # endif + ) + if (*ptr == '.') /* replace '.' by '_' */ + *ptr = '_'; +- #endif + if (vim_ispathsep(*ptr)) + { + ++ptr; +--- 6243,6259 ---- + */ + for (ptr = retval + fnamelen; ptr > retval; mb_ptr_back(retval, ptr)) + { + if (*ext == '.' +! #ifdef USE_LONG_FNAME + && (!USE_LONG_FNAME || shortname) +! #else +! # ifndef SHORT_FNAME + && shortname + # endif ++ #endif + ) + if (*ptr == '.') /* replace '.' by '_' */ + *ptr = '_'; + if (vim_ispathsep(*ptr)) + { + ++ptr; +*************** +*** 6309,6331 **** + if (fname == NULL || *fname == NUL + || vim_ispathsep(fname[STRLEN(fname) - 1])) + { +- #ifdef RISCOS +- if (*ext == '/') +- #else + if (*ext == '.') +- #endif + *s++ = '_'; + } + /* + * If the extension starts with '.', truncate the base name at 8 + * characters + */ +- #ifdef RISCOS +- /* We normally use '/', but swap files are '_' */ +- else if (*ext == '/' || *ext == '_') +- #else + else if (*ext == '.') +- #endif + { + if ((size_t)(s - ptr) > (size_t)8) + { +--- 6288,6301 ---- +*************** +*** 6337,6349 **** + * If the extension doesn't start with '.', and the file name + * doesn't have an extension yet, append a '.' + */ +- #ifdef RISCOS +- else if ((e = vim_strchr(ptr, '/')) == NULL) +- *s++ = '/'; +- #else + else if ((e = vim_strchr(ptr, '.')) == NULL) + *s++ = '.'; +- #endif + /* + * If the extension doesn't start with '.', and there already is an + * extension, it may need to be truncated +--- 6307,6314 ---- +*************** +*** 6371,6393 **** + /* + * Prepend the dot. + */ +! if (prepend_dot && !shortname && *(e = gettail(retval)) != +! #ifdef RISCOS +! '/' +! #else +! '.' +! #endif + #ifdef USE_LONG_FNAME + && USE_LONG_FNAME + #endif + ) + { + STRMOVE(e + 1, e); +- #ifdef RISCOS +- *e = '/'; +- #else + *e = '.'; +- #endif + } + #endif + +--- 6336,6349 ---- + /* + * Prepend the dot. + */ +! if (prepend_dot && !shortname && *(e = gettail(retval)) != '.' + #ifdef USE_LONG_FNAME + && USE_LONG_FNAME + #endif + ) + { + STRMOVE(e + 1, e); + *e = '.'; + } + #endif + +*************** +*** 10205,10223 **** + ++p; + break; + case '.': +- #ifdef RISCOS +- if (allow_dirs != NULL) +- *allow_dirs = TRUE; +- /* FALLTHROUGH */ +- #endif + case '~': + reg_pat[i++] = '\\'; + reg_pat[i++] = *p; + break; + case '?': +- #ifdef RISCOS +- case '#': +- #endif + reg_pat[i++] = '.'; + break; + case '\\': +--- 10161,10171 ---- +*** ../vim-7.3.186/src/globals.h 2011-05-05 14:26:37.000000000 +0200 +--- src/globals.h 2011-05-10 16:26:13.000000000 +0200 +*************** +*** 1513,1519 **** + EXTERN char_u e_sandbox[] INIT(= N_("E48: Not allowed in sandbox")); + #endif + EXTERN char_u e_secure[] INIT(= N_("E523: Not allowed here")); +! #if defined(AMIGA) || defined(MACOS) || defined(MSWIN) || defined(RISCOS) \ + || defined(UNIX) || defined(VMS) || defined(OS2) + EXTERN char_u e_screenmode[] INIT(= N_("E359: Screen mode setting not supported")); + #endif +--- 1513,1519 ---- + EXTERN char_u e_sandbox[] INIT(= N_("E48: Not allowed in sandbox")); + #endif + EXTERN char_u e_secure[] INIT(= N_("E523: Not allowed here")); +! #if defined(AMIGA) || defined(MACOS) || defined(MSWIN) \ + || defined(UNIX) || defined(VMS) || defined(OS2) + EXTERN char_u e_screenmode[] INIT(= N_("E359: Screen mode setting not supported")); + #endif +*** ../vim-7.3.186/src/gui.c 2011-01-17 20:08:03.000000000 +0100 +--- src/gui.c 2011-05-10 16:26:53.000000000 +0200 +*************** +*** 2156,2162 **** + + if (highlight_mask & (HL_INVERSE | HL_STANDOUT)) + { +! #if defined(AMIGA) || defined(RISCOS) + gui_mch_set_colors(bg_color, fg_color); + #else + gui_mch_set_fg_color(bg_color); +--- 2156,2162 ---- + + if (highlight_mask & (HL_INVERSE | HL_STANDOUT)) + { +! #if defined(AMIGA) + gui_mch_set_colors(bg_color, fg_color); + #else + gui_mch_set_fg_color(bg_color); +*************** +*** 2165,2171 **** + } + else + { +! #if defined(AMIGA) || defined(RISCOS) + gui_mch_set_colors(fg_color, bg_color); + #else + gui_mch_set_fg_color(fg_color); +--- 2165,2171 ---- + } + else + { +! #if defined(AMIGA) + gui_mch_set_colors(fg_color, bg_color); + #else + gui_mch_set_fg_color(fg_color); +*************** +*** 2193,2199 **** + if (back != 0 && ((draw_flags & DRAW_BOLD) || (highlight_mask & HL_ITALIC))) + return FAIL; + +! #if defined(RISCOS) || defined(FEAT_GUI_GTK) + /* If there's no italic font, then fake it. + * For GTK2, we don't need a different font for italic style. */ + if (hl_mask_todo & HL_ITALIC) +--- 2193,2199 ---- + if (back != 0 && ((draw_flags & DRAW_BOLD) || (highlight_mask & HL_ITALIC))) + return FAIL; + +! #if defined(FEAT_GUI_GTK) + /* If there's no italic font, then fake it. + * For GTK2, we don't need a different font for italic style. */ + if (hl_mask_todo & HL_ITALIC) +*************** +*** 2985,3010 **** + did_clip = TRUE; + } + /* Allow the left button to start the selection */ +- else if (button == +- # ifdef RISCOS +- /* Only start a drag on a drag event. Otherwise +- * we don't get a release event. */ +- MOUSE_DRAG +- # else +- MOUSE_LEFT +- # endif +- ) +- { +- clip_start_selection(X_2_COL(x), Y_2_ROW(y), repeated_click); +- did_clip = TRUE; +- } +- # ifdef RISCOS + else if (button == MOUSE_LEFT) + { +! clip_clear_selection(); + did_clip = TRUE; + } +- # endif + + /* Always allow pasting */ + if (button != MOUSE_MIDDLE) +--- 2985,2995 ---- + did_clip = TRUE; + } + /* Allow the left button to start the selection */ + else if (button == MOUSE_LEFT) + { +! clip_start_selection(X_2_COL(x), Y_2_ROW(y), repeated_click); + did_clip = TRUE; + } + + /* Always allow pasting */ + if (button != MOUSE_MIDDLE) +*** ../vim-7.3.186/src/gui.h 2010-08-15 21:57:25.000000000 +0200 +--- src/gui.h 2011-05-10 16:27:19.000000000 +0200 +*************** +*** 52,61 **** + # include */ + #endif + +- #ifdef RISCOS +- # include "gui_riscos.h" +- #endif +- + #ifdef FEAT_GUI_PHOTON + # include + # include +--- 52,57 ---- +*************** +*** 151,157 **** + #define DRAW_BOLD 0x02 /* draw bold text */ + #define DRAW_UNDERL 0x04 /* draw underline text */ + #define DRAW_UNDERC 0x08 /* draw undercurl text */ +! #if defined(RISCOS) || defined(FEAT_GUI_GTK) + # define DRAW_ITALIC 0x10 /* draw italic text */ + #endif + #define DRAW_CURSOR 0x20 /* drawing block cursor (win32) */ +--- 147,153 ---- + #define DRAW_BOLD 0x02 /* draw bold text */ + #define DRAW_UNDERL 0x04 /* draw underline text */ + #define DRAW_UNDERC 0x08 /* draw undercurl text */ +! #if defined(FEAT_GUI_GTK) + # define DRAW_ITALIC 0x10 /* draw italic text */ + #endif + #define DRAW_CURSOR 0x20 /* drawing block cursor (win32) */ +*************** +*** 219,227 **** + #ifdef FEAT_GUI_MAC + ControlHandle id; /* A handle to the scrollbar */ + #endif +- #ifdef RISCOS +- int id; /* Window handle of scrollbar window */ +- #endif + #ifdef FEAT_GUI_PHOTON + PtWidget_t *id; + #endif +--- 215,220 ---- +*************** +*** 450,463 **** + int visibility; /* Is window partially/fully obscured? */ + #endif + +- #ifdef RISCOS +- int window_handle; +- char_u *window_title; +- int window_title_size; +- int fg_colour; /* in 0xBBGGRR format */ +- int bg_colour; +- #endif +- + #ifdef FEAT_GUI_PHOTON + PtWidget_t *vimWindow; /* PtWindow */ + PtWidget_t *vimTextArea; /* PtRaw */ +--- 443,448 ---- +*** ../vim-7.3.186/src/main.c 2011-04-11 21:35:03.000000000 +0200 +--- src/main.c 2011-05-10 16:27:33.000000000 +0200 +*************** +*** 3276,3286 **** + main_msg(_("+reverse\t\tDon't use reverse video (also: +rv)")); + main_msg(_("-xrm \tSet the specified resource")); + #endif /* FEAT_GUI_X11 */ +- #if defined(FEAT_GUI) && defined(RISCOS) +- mch_msg(_("\nArguments recognised by gvim (RISC OS version):\n")); +- main_msg(_("--columns \tInitial width of window in columns")); +- main_msg(_("--rows \tInitial height of window in rows")); +- #endif + #ifdef FEAT_GUI_GTK + mch_msg(_("\nArguments recognised by gvim (GTK+ version):\n")); + main_msg(_("-font \t\tUse for normal text (also: -fn)")); +--- 3276,3281 ---- +*** ../vim-7.3.186/src/memfile.c 2011-03-22 18:10:34.000000000 +0100 +--- src/memfile.c 2011-05-10 16:27:38.000000000 +0200 +*************** +*** 1307,1313 **** + * fname cannot be NameBuff, because it must have been allocated. + */ + mf_set_ffname(mfp); +! #if defined(MSDOS) || defined(MSWIN) || defined(RISCOS) + /* + * A ":!cd e:xxx" may change the directory without us knowning, use the + * full pathname always. Careful: This frees fname! +--- 1307,1313 ---- + * fname cannot be NameBuff, because it must have been allocated. + */ + mf_set_ffname(mfp); +! #if defined(MSDOS) || defined(MSWIN) + /* + * A ":!cd e:xxx" may change the directory without us knowning, use the + * full pathname always. Careful: This frees fname! +*** ../vim-7.3.186/src/memline.c 2011-02-15 11:56:56.000000000 +0100 +--- src/memline.c 2011-05-10 16:28:40.000000000 +0200 +*************** +*** 748,754 **** + continue; + if (mf_open_file(mfp, fname) == OK) /* consumes fname! */ + { +! #if defined(MSDOS) || defined(MSWIN) || defined(RISCOS) + /* + * set full pathname for swap file now, because a ":!cd dir" may + * change directory without us knowing it. +--- 748,754 ---- + continue; + if (mf_open_file(mfp, fname) == OK) /* consumes fname! */ + { +! #if defined(MSDOS) || defined(MSWIN) + /* + * set full pathname for swap file now, because a ":!cd dir" may + * change directory without us knowing it. +*************** +*** 933,939 **** + b0p->b0_fname[0] = NUL; + else + { +! #if defined(MSDOS) || defined(MSWIN) || defined(AMIGA) || defined(RISCOS) + /* Systems that cannot translate "~user" back into a path: copy the + * file name unmodified. Do use slashes instead of backslashes for + * portability. */ +--- 933,939 ---- + b0p->b0_fname[0] = NUL; + else + { +! #if defined(MSDOS) || defined(MSWIN) || defined(AMIGA) + /* Systems that cannot translate "~user" back into a path: copy the + * file name unmodified. Do use slashes instead of backslashes for + * portability. */ +*************** +*** 1103,1109 **** + fname = (char_u *)""; + len = (int)STRLEN(fname); + if (len >= 4 && +! #if defined(VMS) || defined(RISCOS) + STRNICMP(fname + len - 4, "_s" , 2) + #else + STRNICMP(fname + len - 4, ".s" , 2) +--- 1103,1109 ---- + fname = (char_u *)""; + len = (int)STRLEN(fname); + if (len >= 4 && +! #if defined(VMS) + STRNICMP(fname + len - 4, "_s" , 2) + #else + STRNICMP(fname + len - 4, ".s" , 2) +*************** +*** 1773,1783 **** + #ifdef VMS + names[0] = vim_strsave((char_u *)"*_sw%"); + #else +- # ifdef RISCOS +- names[0] = vim_strsave((char_u *)"*_sw#"); +- # else + names[0] = vim_strsave((char_u *)"*.sw?"); +- # endif + #endif + #if defined(UNIX) || defined(WIN3264) + /* For Unix names starting with a dot are special. MS-Windows +--- 1773,1779 ---- +*************** +*** 1804,1814 **** + #ifdef VMS + names[0] = concat_fnames(dir_name, (char_u *)"*_sw%", TRUE); + #else +- # ifdef RISCOS +- names[0] = concat_fnames(dir_name, (char_u *)"*_sw#", TRUE); +- # else + names[0] = concat_fnames(dir_name, (char_u *)"*.sw?", TRUE); +- # endif + #endif + #if defined(UNIX) || defined(WIN3264) + /* For Unix names starting with a dot are special. MS-Windows +--- 1800,1806 ---- +*************** +*** 1877,1883 **** + char_u *swapname; + + swapname = modname(fname_res, +! #if defined(VMS) || defined(RISCOS) + (char_u *)"_swp", FALSE + #else + (char_u *)".swp", TRUE +--- 1869,1875 ---- + char_u *swapname; + + swapname = modname(fname_res, +! #if defined(VMS) + (char_u *)"_swp", FALSE + #else + (char_u *)".swp", TRUE +*************** +*** 2176,2186 **** + #ifdef VMS + names[num_names] = concat_fnames(path, (char_u *)"_sw%", FALSE); + #else +- # ifdef RISCOS +- names[num_names] = concat_fnames(path, (char_u *)"_sw#", FALSE); +- # else + names[num_names] = concat_fnames(path, (char_u *)".sw?", FALSE); +- # endif + #endif + if (names[num_names] == NULL) + goto end; +--- 2168,2174 ---- +*************** +*** 2207,2217 **** + #ifdef VMS + names[num_names] = modname(path, (char_u *)"_sw%", FALSE); + #else +- # ifdef RISCOS +- names[num_names] = modname(path, (char_u *)"_sw#", FALSE); +- # else + names[num_names] = modname(path, (char_u *)".sw?", FALSE); +- # endif + #endif + if (names[num_names] == NULL) + goto end; +--- 2195,2201 ---- +*************** +*** 3205,3211 **** + mf_free(mfp, hp); /* free the data block */ + buf->b_ml.ml_locked = NULL; + +! for (stack_idx = buf->b_ml.ml_stack_top - 1; stack_idx >= 0; --stack_idx) + { + buf->b_ml.ml_stack_top = 0; /* stack is invalid when failing */ + ip = &(buf->b_ml.ml_stack[stack_idx]); +--- 3189,3196 ---- + mf_free(mfp, hp); /* free the data block */ + buf->b_ml.ml_locked = NULL; + +! for (stack_idx = buf->b_ml.ml_stack_top - 1; stack_idx >= 0; +! --stack_idx) + { + buf->b_ml.ml_stack_top = 0; /* stack is invalid when failing */ + ip = &(buf->b_ml.ml_stack[stack_idx]); +*************** +*** 3956,3969 **** + #else + (buf->b_p_sn || buf->b_shortname), + #endif +- #ifdef RISCOS +- /* Avoid problems if fname has special chars, eg */ +- ffname, +- #else + fname_res, +- #endif + (char_u *) +! #if defined(VMS) || defined(RISCOS) + "_swp", + #else + ".swp", +--- 3941,3949 ---- + #else + (buf->b_p_sn || buf->b_shortname), + #endif + fname_res, + (char_u *) +! #if defined(VMS) + "_swp", + #else + ".swp", +*************** +*** 4427,4440 **** + } + close(fd); + } +- #ifdef RISCOS +- else +- /* Can't open swap file, though it does exist. +- * Assume that the user is editing two files with +- * the same name in different directories. No error. +- */ +- differ = TRUE; +- #endif + + /* give the ATTENTION message when there is an old swap file + * for the current file, and the buffer was not recovered. */ +--- 4407,4412 ---- +*** ../vim-7.3.186/src/misc1.c 2011-05-10 14:44:07.000000000 +0200 +--- src/misc1.c 2011-05-10 16:29:29.000000000 +0200 +*************** +*** 4589,4613 **** + vim_ispathsep(c) + int c; + { +! #ifdef RISCOS +! return (c == '.' || c == ':'); +! #else +! # ifdef UNIX + return (c == '/'); /* UNIX has ':' inside file names */ +! # else +! # ifdef BACKSLASH_IN_FILENAME + return (c == ':' || c == '/' || c == '\\'); +! # else +! # ifdef VMS + /* server"user passwd"::device:[full.path.name]fname.extension;version" */ + return (c == ':' || c == '[' || c == ']' || c == '/' + || c == '<' || c == '>' || c == '"' ); +! # else /* Amiga */ + return (c == ':' || c == '/'); +! # endif /* VMS */ +! # endif + # endif +! #endif /* RISC OS */ + } + + #if defined(FEAT_SEARCHPATH) || defined(PROTO) +--- 4589,4609 ---- + vim_ispathsep(c) + int c; + { +! #ifdef UNIX + return (c == '/'); /* UNIX has ':' inside file names */ +! #else +! # ifdef BACKSLASH_IN_FILENAME + return (c == ':' || c == '/' || c == '\\'); +! # else +! # ifdef VMS + /* server"user passwd"::device:[full.path.name]fname.extension;version" */ + return (c == ':' || c == '[' || c == ']' || c == '/' + || c == '<' || c == '>' || c == '"' ); +! # else + return (c == ':' || c == '/'); +! # endif /* VMS */ + # endif +! #endif + } + + #if defined(FEAT_SEARCHPATH) || defined(PROTO) +*** ../vim-7.3.186/src/proto.h 2010-08-15 21:57:29.000000000 +0200 +--- src/proto.h 2011-05-10 16:29:45.000000000 +0200 +*************** +*** 62,70 **** + # ifdef __BEOS__ + # include "os_beos.pro" + # endif +- # ifdef RISCOS +- # include "os_riscos.pro" +- # endif + # ifdef __QNX__ + # include "os_qnx.pro" + # endif +--- 62,67 ---- +*************** +*** 245,253 **** + # ifdef FEAT_GUI_X11 + # include "gui_x11.pro" + # endif +- # ifdef RISCOS +- # include "gui_riscos.pro" +- # endif + # ifdef FEAT_GUI_PHOTON + # include "gui_photon.pro" + # endif +--- 242,247 ---- +*** ../vim-7.3.186/src/quickfix.c 2011-05-05 17:14:07.000000000 +0200 +--- src/quickfix.c 2011-05-10 16:30:18.000000000 +0200 +*************** +*** 1182,1202 **** + if (fname == NULL || *fname == NUL) /* no file name */ + return 0; + { +- #ifdef RISCOS +- /* Name is reported as `main.c', but file is `c.main' */ +- return ro_buflist_add(fname); +- #else + char_u *ptr; + int fnum; + +! # ifdef VMS + vms_remove_version(fname); +! # endif +! # ifdef BACKSLASH_IN_FILENAME + if (directory != NULL) + slash_adjust(directory); + slash_adjust(fname); +! # endif + if (directory != NULL && !vim_isAbsName(fname) + && (ptr = concat_fnames(directory, fname, TRUE)) != NULL) + { +--- 1182,1198 ---- + if (fname == NULL || *fname == NUL) /* no file name */ + return 0; + { + char_u *ptr; + int fnum; + +! #ifdef VMS + vms_remove_version(fname); +! #endif +! #ifdef BACKSLASH_IN_FILENAME + if (directory != NULL) + slash_adjust(directory); + slash_adjust(fname); +! #endif + if (directory != NULL && !vim_isAbsName(fname) + && (ptr = concat_fnames(directory, fname, TRUE)) != NULL) + { +*************** +*** 1221,1227 **** + return fnum; + } + return buflist_add(fname, 0); +- #endif + } + } + +--- 1217,1222 ---- +*** ../vim-7.3.186/src/search.c 2011-02-25 18:38:29.000000000 +0100 +--- src/search.c 2011-05-10 16:30:38.000000000 +0200 +*************** +*** 4581,4589 **** + char_u *already = NULL; + char_u *startp = NULL; + char_u *inc_opt = NULL; +- #ifdef RISCOS +- int previous_munging = __riscosify_control; +- #endif + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) + win_T *curwin_save = NULL; + #endif +--- 4581,4586 ---- +*************** +*** 4596,4606 **** + if (file_line == NULL) + return; + +- #ifdef RISCOS +- /* UnixLib knows best how to munge c file names - turn munging back on. */ +- int __riscosify_control = 0; +- #endif +- + if (type != CHECK_PATH && type != FIND_DEFINE + #ifdef FEAT_INS_EXPAND + /* when CONT_SOL is set compare "ptr" with the beginning of the line +--- 4593,4598 ---- +*************** +*** 5228,5238 **** + vim_free(regmatch.regprog); + vim_free(incl_regmatch.regprog); + vim_free(def_regmatch.regprog); +- +- #ifdef RISCOS +- /* Restore previous file munging state. */ +- __riscosify_control = previous_munging; +- #endif + } + + static void +--- 5220,5225 ---- +*** ../vim-7.3.186/src/structs.h 2011-03-22 18:10:34.000000000 +0100 +--- src/structs.h 2011-05-10 16:30:49.000000000 +0200 +*************** +*** 2366,2376 **** + MenuHandle menu_handle; + MenuHandle submenu_handle; + #endif +- #ifdef RISCOS +- int *id; /* Not used, but gui.c needs it */ +- int greyed_out; /* Flag */ +- int hidden; +- #endif + #ifdef FEAT_GUI_PHOTON + PtWidget_t *id; + PtWidget_t *submenu_id; +--- 2366,2371 ---- +*** ../vim-7.3.186/src/term.c 2010-12-30 14:47:32.000000000 +0100 +--- src/term.c 2011-05-10 16:31:41.000000000 +0200 +*************** +*** 52,58 **** + + /* + * Here are the builtin termcap entries. They are not stored as complete +! * Tcarr structures, as such a structure is too big. + * + * The entries are compact, therefore they normally are included even when + * HAVE_TGETENT is defined. When HAVE_TGETENT is defined, the builtin entries +--- 52,58 ---- + + /* + * Here are the builtin termcap entries. They are not stored as complete +! * structures with all entries, as such a structure is too big. + * + * The entries are compact, therefore they normally are included even when + * HAVE_TGETENT is defined. When HAVE_TGETENT is defined, the builtin entries +*************** +*** 199,269 **** + #endif + + #ifndef NO_BUILTIN_TCAPS +- # if defined(RISCOS) || defined(ALL_BUILTIN_TCAPS) +- /* +- * Default for the Acorn. +- */ +- {(int)KS_NAME, "riscos"}, +- {(int)KS_CL, "\014"}, /* Cls and Home Cursor */ +- {(int)KS_CM, "\001%d\001%d\002"}, /* Position cursor */ +- +- {(int)KS_CCO, "16"}, /* Allow 16 colors */ +- +- {(int)KS_CAF, "\001%d\021"}, /* Set foreground colour */ +- {(int)KS_CAB, "\001%d\022"}, /* Set background colour */ +- +- +- {(int)KS_ME, "\004"}, /* Normal mode */ +- {(int)KS_MR, "\005"}, /* Reverse */ +- +- {(int)KS_VI, "\016"}, /* Cursor invisible */ +- {(int)KS_VE, "\017"}, /* Cursor visible */ +- {(int)KS_VS, "\020"}, /* Cursor very visible */ +- +- {(int)KS_CS, "\001%d\001%d\003"}, /* Set scroll region */ +- {(int)KS_SR, "\023"}, /* Scroll text down */ +- {K_UP, "\217"}, +- {K_DOWN, "\216"}, +- {K_LEFT, "\214"}, +- {K_RIGHT, "\215"}, +- {K_S_UP, "\237"}, +- {K_S_DOWN, "\236"}, +- {K_S_LEFT, "\234"}, +- {K_S_RIGHT, "\235"}, +- +- {K_F1, "\201"}, +- {K_F2, "\202"}, +- {K_F3, "\203"}, +- {K_F4, "\204"}, +- {K_F5, "\205"}, +- {K_F6, "\206"}, +- {K_F7, "\207"}, +- {K_F8, "\210"}, +- {K_F9, "\211"}, +- {K_F10, "\312"}, +- {K_F11, "\313"}, +- {K_F12, "\314"}, +- {K_S_F1, "\221"}, +- {K_S_F2, "\222"}, +- {K_S_F3, "\223"}, +- {K_S_F4, "\224"}, +- {K_S_F5, "\225"}, +- {K_S_F6, "\226"}, +- {K_S_F7, "\227"}, +- {K_S_F8, "\230"}, +- {K_S_F9, "\231"}, +- {K_S_F10, "\332"}, +- {K_S_F11, "\333"}, +- {K_S_F12, "\334"}, +- {K_BS, "\010"}, +- {K_INS, "\315"}, +- {K_DEL, "\177"}, +- {K_HOME, "\036"}, +- {K_END, "\213"}, +- {K_PAGEUP, "\237"}, +- {K_PAGEDOWN, "\236"}, +- # endif /* Acorn terminal */ +- + + # if defined(AMIGA) || defined(ALL_BUILTIN_TCAPS) + /* +--- 199,204 ---- +*************** +*** 1399,1408 **** + /* + * DEFAULT_TERM is used, when no terminal is specified with -T option or $TERM. + */ +- #ifdef RISCOS +- # define DEFAULT_TERM (char_u *)"riscos" +- #endif +- + #ifdef AMIGA + # define DEFAULT_TERM (char_u *)"amiga" + #endif +--- 1334,1339 ---- +*** ../vim-7.3.186/src/termlib.c 2010-08-15 21:57:30.000000000 +0200 +--- src/termlib.c 2011-05-10 16:31:58.000000000 +0200 +*************** +*** 13,19 **** + #include "vim.h" + #include "termlib.pro" + +! #if !defined(AMIGA) && !defined(VMS) && !defined(MACOS) && !defined(RISCOS) + # include + #endif + +--- 13,19 ---- + #include "vim.h" + #include "termlib.pro" + +! #if !defined(AMIGA) && !defined(VMS) && !defined(MACOS) + # include + #endif + +*** ../vim-7.3.186/src/version.c 2011-05-10 16:12:40.000000000 +0200 +--- src/version.c 2011-05-10 16:37:20.000000000 +0200 +*************** +*** 1205,1213 **** + # endif + #endif + +- #ifdef RISCOS +- MSG_PUTS(_("\nRISC OS version")); +- #endif + #ifdef VMS + MSG_PUTS(_("\nOpenVMS version")); + # ifdef HAVE_PATHDEF +--- 1207,1212 ---- +*** ../vim-7.3.186/src/vim.h 2011-05-05 16:41:19.000000000 +0200 +--- src/vim.h 2011-05-10 16:32:40.000000000 +0200 +*************** +*** 184,192 **** + # define SIZEOF_INT 2 + # endif + #endif +- #ifdef RISCOS +- # define SIZEOF_INT 4 +- #endif + + + #include "feature.h" /* #defines for optionals and features */ +--- 184,189 ---- +*************** +*** 340,349 **** + # include "os_mac.h" + #endif + +- #ifdef RISCOS +- # include "os_riscos.h" +- #endif +- + #ifdef __QNX__ + # include "os_qnx.h" + #endif +--- 337,342 ---- +*** ../vim-7.3.186/src/gui_riscos.h 2010-08-15 21:57:28.000000000 +0200 +--- src/gui_riscos.h 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,32 **** +- /* vi:set ts=8 sts=4 sw=4: +- * +- * VIM - Vi IMproved by Bram Moolenaar +- * +- * Do ":help uganda" in Vim to read copying and usage conditions. +- * Do ":help credits" in Vim to see a list of people who contributed. +- */ +- +- #define FEAT_BROWSE +- +- #define TASK 0x4b534154 +- +- /* Nested wimp flags: */ +- #define CHILD_FIX_TO_WORKAREA 0 +- #define CHILD_FIX_TO_LEFT 1 +- #define CHILD_FIX_TO_BOTTOM 1 +- #define CHILD_FIX_TO_RIGHT 2 +- #define CHILD_FIX_TO_TOP 2 +- +- #define CHILD_SELF_SCROLL 0 +- #define CHILD_PARENT_SCROLL 1 +- +- #define CHILD_LEFT 16 +- #define CHILD_BOTTOM 18 +- #define CHILD_RIGHT 20 +- #define CHILD_TOP 22 +- #define CHILD_SCROLL_X 24 +- #define CHILD_SCROLL_Y 26 +- +- int wimp_poll(int mask, int *block); +- int wimp_poll_idle(int mask, int *block, int end_time); +- void ro_open_main(int *block); +--- 0 ---- +*** ../vim-7.3.186/src/os_riscos.h 2010-08-15 21:57:30.000000000 +0200 +--- src/os_riscos.h 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,166 **** +- /* vi:set ts=8 sts=4 sw=4: +- * +- * VIM - Vi IMproved by Bram Moolenaar +- * +- * Do ":help uganda" in Vim to read copying and usage conditions. +- * Do ":help credits" in Vim to see a list of people who contributed. +- */ +- +- #include +- #include +- #include +- #include +- #include +- #include +- #include +- #include +- +- #define CASE_INSENSITIVE_FILENAME +- #define FEAT_MODIFY_FNAME +- #define FEAT_OSFILETYPE +- #define DFLT_OFT "Text" +- #define USE_TERM_CONSOLE +- #define HAVE_AVAIL_MEM +- +- /* Longer filenames now accessible to all */ +- #ifndef BASENAMELEN +- # define BASENAMELEN 64 /* Same length as unzip */ +- #endif +- +- #ifndef TEMNAME +- # define TEMPNAME ".v?XXXXXX" +- # define TEMPNAMELEN 25 +- #endif +- +- #ifndef DFLT_HELPFILE +- # define DFLT_HELPFILE "Vim:doc.help" +- #endif +- +- #ifndef DFLT_BDIR +- # define DFLT_BDIR ".,." /* default for 'backupdir' */ +- #endif +- +- /* Paths to try putting swap file in. */ +- #ifndef DFLT_DIR +- # define DFLT_DIR ".,." /* default for 'directory' */ +- #endif +- +- #ifndef DFLT_VDIR +- # define DFLT_VDIR "Choices:Vim.view" /* default for 'viewdir' */ +- #endif +- +- #ifndef TERMCAPFILE +- # define TERMCAPFILE "Vim:TermCap" +- #endif +- #define HAVE_TGETENT +- +- #ifndef SYNTAX_FNAME +- # define SYNTAX_FNAME "Vim:Syntax.%s" +- #endif +- +- #ifndef EVIM_FILE +- # define EVIM_FILE "Vim:Evim" +- #endif +- +- #define FEAT_VIMINFO +- +- #ifndef VIMINFO_FILE +- # define VIMINFO_FILE ".Vim.VimInfo" +- #endif +- #ifndef VIMINFO_FILE2 +- # define VIMINFO_FILE2 "Choices:Vim.VimInfo" +- #endif +- +- #ifndef VIMRC_FILE +- # define VIMRC_FILE "/vimrc" +- #endif +- #ifndef EXRC_FILE +- # define EXRC_FILE "/exrc" +- #endif +- #ifndef GVIMRC_FILE +- # define GVIMRC_FILE "/gvimrc" +- #endif +- #ifndef USR_VIMRC_FILE +- # define USR_VIMRC_FILE "Vim:Evim" +- #endif +- #ifndef SESSION_FILE +- # define SESSION_FILE "/Session.vim" +- #endif +- #ifndef USR_VIMRC_FILE +- # define USR_VIMRC_FILE "Choices:Vim.VimRC" +- #endif +- #ifndef USR_GVIMRC_FILE +- # define USR_GVIMRC_FILE "Choices:Vim.GVimRC" +- #endif +- #ifndef USR_EXRC_FILE +- # define USR_EXRC_FILE "Choices:Vim.ExRC" +- #endif +- #ifndef SYS_VIMRC_FILE +- # define SYS_VIMRC_FILE "Vim:VimRC" +- #endif +- #ifndef SYS_GVIMRC_FILE +- # define SYS_GVIMRC_FILE "Vim:GVimRC" +- #endif +- #ifndef SYS_MENU_FILE +- # define SYS_MENU_FILE "Vim:Menu" +- #endif +- #ifndef SYS_OPTWIN_FILE +- # define SYS_OPTWIN_FILE "Vim:Optwin" +- #endif +- #ifndef FILETYPE_FILE +- # define FILETYPE_FILE "Vim:Filetype" +- #endif +- #ifndef FTPLUGIN_FILE +- # define FTPLUGIN_FILE "Vim:Ftplugin/vim" +- #endif +- #ifndef INDENT_FILE +- # define INDENT_FILE "Vim:Indent/vim" +- #endif +- #ifndef FTOFF_FILE +- # define FTOFF_FILE "Vim:Ftoff" +- #endif +- #ifndef FTPLUGOF_FILE +- # define FTPLUGOF_FILE "Vim:Ftplugof" +- #endif +- #ifndef INDOFF_FILE +- # define INDOFF_FILE "Vim:Indoff" +- #endif +- +- #define DFLT_ERRORFILE "errors/vim" +- #define DFLT_RUNTIMEPATH "Choices:Vim,Vim:,Choices:Vim.after" +- +- /* +- * RISC PCs have plenty of memory, use large buffers +- */ +- #define CMDBUFFSIZE 1024 /* size of the command processing buffer */ +- #define MAXPATHL 256 /* paths are always quite short though */ +- +- #ifndef DFLT_MAXMEM +- # define DFLT_MAXMEM (5*1024) /* use up to 5 Mbyte for a buffer */ +- #endif +- +- #ifndef DFLT_MAXMEMTOT +- # define DFLT_MAXMEMTOT (10*1024) /* use up to 10 Mbyte for Vim */ +- #endif +- +- #ifdef HAVE_SIGSET +- # define signal sigset +- #endif +- +- #define n_flag (1<<31) +- #define z_flag (1<<30) +- #define c_flag (1<<29) +- #define v_flag (1<<28) +- +- /* These take r0-r7 as inputs, returns r0-r7 in global variables. */ +- void swi(int swinum, ...); /* Handles errors itself */ +- int xswi(int swinum, ...); /* Returns errors using v flag */ +- extern int r0, r1, r2, r3, r4, r5, r6, r7; /* For return values */ +- +- #include +- #include +- +- #define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len) +- #define mch_rename(src, dst) rename(src, dst) +- #define mch_getenv(x) (char_u *)getenv((char *)x) +- #define mch_setenv(name, val, x) setenv(name, val, x) +--- 0 ---- +*** ../vim-7.3.186/src/gui_riscos.c 2011-05-10 15:52:10.000000000 +0200 +--- src/gui_riscos.c 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,3558 **** +- /* vi:set ts=8 sts=4 sw=4: +- * +- * VIM - Vi IMproved by Bram Moolenaar +- * +- * Do ":help uganda" in Vim to read copying and usage conditions. +- * Do ":help credits" in Vim to see a list of people who contributed. +- * See README.txt for an overview of the Vim source code. +- */ +- +- #include "vim.h" +- #include +- +- /* +- * gui_riscos.c +- * +- * Thomas Leonard +- * Updated by Andy Wingate +- */ +- +- extern int time_of_last_poll; +- +- int task_handle = 0; /* Zero means we are not yet a Wimp task */ +- int child_handle = 0; /* Task handle of our child process (zero if none). */ +- int *wimp_menu = (int *) -1; /* Pointer to a Wimp menu structure (or -1) */ +- int save_window = -1; /* Save As window handle */ +- +- int *redraw_block = NULL; /* NULL means not in a redraw loop. */ +- int ro_return_early = FALSE; /* Break out of gui_mch_wait_for_chars() */ +- +- int leaf_ref = 0; /* Wimp message number - send via Wimp$Scrap */ +- char_u *leaf_name = NULL; /* Leaf name from DataSave */ +- +- int default_columns = 120; /* These values are used if the --rows and --columns */ +- int default_rows = 32; /* options aren't used on startup. */ +- +- #define DRAG_FALSE 0 +- #define DRAG_SELECTION 1 +- #define DRAG_RESIZE_WINDOW 2 +- int ro_dragging = DRAG_FALSE; +- int drag_button; +- int drag_modifiers; +- int drag_x_offset; +- int drag_y_offset; +- +- int nested_wimp = FALSE; /* Bool - can we use the new wimp? */ +- +- int changed_mode = FALSE; +- int x_eigen_factor; +- int y_eigen_factor; +- +- /* If ro_current_font is non-zero then use the outline font with that handle, +- * otherwise, if zap_redraw is TRUE then use ZapRedraw, otherwise use the +- * system font. +- * +- * If zap_redraw is TRUE then zap_file[] contains valid Zap font file +- * pointers (or NULLs). +- */ +- int ro_current_font = 0; /* 0 is system font, or ZapRedraw */ +- int font_x_offset = 0; /* Where to position each char in its box */ +- int font_y_offset = 0; +- +- int zap_redraw = FALSE; +- int double_height = FALSE; /* Plot each line twice? */ +- +- #define grgb(r,g,b) ((b<<16) + (g<<8) + (r)) +- #define UNUSED_COLOUR (gui.back_pixel) +- +- #define RO_LOAD_CLIPBOARD -2 /* Internal handle for DataSave message. */ +- +- /* Changes by John Kortink, 22-23 July 1998 +- * +- * Stuff to make redraw a lot faster. Almost all of it is right here below, +- * elsewhere changes are marked with 'JK230798'. Apart from a small change in +- * 'gui.c' all changes are limited to this file, 'gui_riscos.c'. The change in +- * 'gui.c' is to make Vim stop being 'smart' not redrawing characters that are +- * 'already there' (i.e. from the previous line, by coincidence). This caused a +- * lot more calls to the redraw code, which we want to avoid because a few nice +- * big strings at a time is a lot faster than a truckload of small ones. ('Dear +- * Bram ...'). +- */ +- +- /* The ZapRedraw structure */ +- +- static struct +- { +- int r_flags; +- int r_minx; +- int r_miny; +- int r_maxx; +- int r_maxy; +- int r_screen; +- int r_bpl; +- int r_bpp; +- int r_charw; +- int r_charh; +- char *r_caddr; +- int r_cbpl; +- int r_cbpc; +- int r_linesp; +- int r_data; +- int r_scrollx; +- int r_scrolly; +- int *r_palette; +- int r_for; +- int r_bac; +- char *r_workarea; +- int r_magx; +- int r_magy; +- int r_xsize; +- int r_ysize; +- int r_mode; +- } +- zap_redraw_block; +- +- /* Other globals */ +- +- static int zap_redraw_initialised = FALSE; +- static int zap_redraw_update_colours; +- static int zap_redraw_colours[2]; +- static int zap_redraw_palette[16]; +- +- /* Holds the current Zap font file(s). +- * The font is recreated from this block on a mode change. +- * When using zap, element ZAP_NORMAL is always valid, but +- * the others can be NULL. +- */ +- +- #define ZAP_NORMAL 0 +- #define ZAP_BOLD 1 +- #define ZAP_ITALIC 2 +- #define ZAP_BITALIC 3 +- #define ZAP_STYLES 4 +- +- /* Zap font file format data */ +- static char *zap_file[ZAP_STYLES] = {NULL, NULL, NULL, NULL}; +- +- /* r_caddr format for current mode */ +- static char *zap_caddr[ZAP_STYLES] = {NULL, NULL, NULL, NULL}; +- +- static void ro_remove_menu(int *menu); +- +- /* +- * Initialise all the ZapRedraw stuff. +- * Call this when changing font and after each mode change. +- * zap_redraw_bitmap must contain a valid Zap font file (possibly +- * created from the system font). +- * +- * Return FAIL to revert to system font (if we can't use ZapRedraw). +- */ +- int +- ro_zap_redraw_initialise() +- { +- int bytes_per_bitmap_char; +- int first, last; +- int i; +- +- /* Can't have initialisers for struct members :-(, ok, this way then ... */ +- if (!zap_redraw_initialised) +- { +- zap_redraw_block.r_workarea = NULL; +- zap_redraw_initialised = TRUE; +- } +- +- /* We redraw in DSA mode */ +- zap_redraw_block.r_flags = 0x0; +- +- /* Let ZapRedraw get the screen address for us */ +- zap_redraw_block.r_screen = 0; +- +- /* Read the font width and height from the font file header. +- * Assume that all styles are the same size. +- * ZAP_NORMAL is always present. +- */ +- zap_redraw_block.r_charw = ((int *) zap_file[ZAP_NORMAL])[2]; +- zap_redraw_block.r_charh = ((int *) zap_file[ZAP_NORMAL])[3]; +- +- /* We have no linespacing */ +- zap_redraw_block.r_linesp = 0; +- +- /* Fix foreground = colour 1 */ +- zap_redraw_block.r_for = 1; +- +- /* Fix background = colour 0 */ +- zap_redraw_block.r_bac = 0; +- +- /* Colour mask buffer */ +- zap_redraw_block.r_palette = zap_redraw_palette; +- +- /* Allocate local workspace (for the few calls following here) */ +- if (zap_redraw_block.r_workarea != NULL) +- free(zap_redraw_block.r_workarea); +- zap_redraw_block.r_workarea = (char*) malloc(128); +- if (!zap_redraw_block.r_workarea) +- return FAIL; /* Out of memory */ +- +- /* Fill in VDU variables */ +- if (xswi(ZapRedraw_ReadVduVars, 0, &zap_redraw_block) & v_flag) +- return FAIL; /* Can't find ZapRedraw module - use VDU instead */ +- +- /* Determine cbpl and cbpc */ +- swi(ZapRedraw_CachedCharSize, zap_redraw_block.r_bpp, 0, +- zap_redraw_block.r_charw, zap_redraw_block.r_charh); +- zap_redraw_block.r_cbpl = r2; +- zap_redraw_block.r_cbpc = r3; +- +- /* Allocate general workspace (for the calls outside) */ +- if (zap_redraw_block.r_workarea != NULL) +- free(zap_redraw_block.r_workarea); +- zap_redraw_block.r_workarea = (char*) malloc(128 + zap_redraw_block.r_cbpl); +- if (!zap_redraw_block.r_workarea) +- return FAIL; /* Out of memory */ +- +- /* Now convert the 1 bpp character data ready for the current mode */ +- +- bytes_per_bitmap_char = (zap_redraw_block.r_charw * zap_redraw_block.r_charh + 7) / 8; +- +- /* Convert the fonts from 1bpp to a format suitable for the +- * current mode. +- */ +- for (i = 0; i < ZAP_STYLES; i++) +- { +- first = ((int *) zap_file[i])[4]; +- last = ((int *) zap_file[i])[5]; +- +- if (last > 255) +- last = 255; /* Don't convert cursors (overwrites memory!) */ +- +- /* Allocate the font cache */ +- vim_free(zap_caddr[i]); +- if (zap_file[i]) +- zap_caddr[i] = (char*) malloc(zap_redraw_block.r_cbpc * 256); +- else +- zap_caddr[i] = NULL; /* No file for this style */ +- +- if (zap_caddr[i]) +- { +- zap_redraw_block.r_caddr = zap_caddr[i]; +- +- swi(ZapRedraw_ConvertBitmap, 0, &zap_redraw_block, +- first, last, /* Range of characters to convert */ +- zap_file[i] + 0x20 /* Addr of first char provided by font */ +- - first * bytes_per_bitmap_char); +- } +- } +- +- if (!zap_caddr[ZAP_NORMAL]) +- { +- zap_redraw = FALSE; /* Out of memory */ +- return FAIL; +- } +- +- /* Next time we need them, we have to update the colour masks */ +- zap_redraw_update_colours = TRUE; +- +- return OK; +- } +- +- /* +- * Redraw a string at OS coordinates (top-left, x inclusive, y exclusive). +- * Graphics clip window is window[0..3] as in R1+28..40 of Wimp_RedrawWindow. +- * Returns (possibly modified) flags. +- */ +- int +- ro_zap_redraw_draw_string(x, y, string, length, flags, clip) +- int x; +- int y; +- char *string; +- int length; +- int flags; /* DRAW_TRANSP, DRAW_BOLD, DRAW_UNDERL, DRAW_ITALIC */ +- int *clip; +- { +- char redraw_data[1024]; +- int clip_minx; +- int clip_miny; +- int clip_maxx; +- int clip_maxy; +- int os_xshift = zap_redraw_block.r_magx; +- int os_yshift = zap_redraw_block.r_magy; +- +- if (flags & DRAW_TRANSP) +- return flags; /* We don't do transparent plotting yet. */ +- +- if (flags & DRAW_BOLD) +- { +- if (flags & DRAW_ITALIC && zap_caddr[ZAP_BITALIC]) +- zap_redraw_block.r_caddr = zap_caddr[ZAP_BITALIC]; +- else +- zap_redraw_block.r_caddr = zap_caddr[ZAP_BOLD]; +- } +- else +- { +- if (flags & DRAW_ITALIC) +- zap_redraw_block.r_caddr = zap_caddr[ZAP_ITALIC]; +- else +- zap_redraw_block.r_caddr = zap_caddr[ZAP_NORMAL]; +- } +- if (!zap_redraw_block.r_caddr) +- { +- zap_redraw_block.r_caddr = zap_caddr[ZAP_NORMAL]; +- flags |= DRAW_UNDERL; /* Style missing - we can always underline */ +- } +- +- /* Set the vertical scaling flag */ +- if (double_height) +- zap_redraw_block.r_flags = 1 << 1; +- else +- zap_redraw_block.r_flags = 0; +- +- /* Update the colour masks (if needed) */ +- if (zap_redraw_update_colours) +- { +- swi(ZapRedraw_CreatePalette, 2, +- &zap_redraw_block, +- zap_redraw_colours, +- zap_redraw_block.r_palette, 2); +- zap_redraw_update_colours = FALSE; +- } +- +- /* Target rectangle in ZapRedraw rectangle coordinates (pixels, Y-min/max reversed !!!) */ +- zap_redraw_block.r_minx = x >> os_xshift; /* inclusive */ +- zap_redraw_block.r_miny = zap_redraw_block.r_ysize - (y >> os_yshift); /* inclusive */ +- zap_redraw_block.r_maxx = (x + length * gui.char_width) >> os_xshift; /* exclusive */ +- zap_redraw_block.r_maxy = zap_redraw_block.r_ysize - ((y - gui.char_height) >> os_yshift); +- /* exclusive */ +- +- /* Clip rectangle in ZapRedraw rectangle coordinates (pixels, Y-min/max reversed !!!) */ +- clip_minx = clip[0] >> os_xshift; /* inclusive */ +- clip_miny = zap_redraw_block.r_ysize - (clip[3] >> os_yshift); /* inclusive */ +- clip_maxx = clip[2] >> os_xshift; /* exclusive */ +- clip_maxy = zap_redraw_block.r_ysize - (clip[1] >> os_yshift); /* exclusive */ +- +- /* Clip target rectangle against the current graphics window */ +- if (zap_redraw_block.r_minx < clip_minx) +- { +- zap_redraw_block.r_scrollx = clip_minx - zap_redraw_block.r_minx; +- zap_redraw_block.r_minx = clip_minx; +- } +- else +- zap_redraw_block.r_scrollx = 0; +- if (zap_redraw_block.r_miny < clip_miny) +- { +- zap_redraw_block.r_scrolly = clip_miny - zap_redraw_block.r_miny; +- zap_redraw_block.r_miny = clip_miny; +- } +- else +- zap_redraw_block.r_scrolly = 0; +- if (zap_redraw_block.r_maxx > clip_maxx) +- zap_redraw_block.r_maxx = clip_maxx; +- if (zap_redraw_block.r_maxy > clip_maxy) +- zap_redraw_block.r_maxy = clip_maxy; +- +- /* Fill in the character data structure */ +- if (length > (sizeof(redraw_data) - 2 * 4 - 2)) +- length = sizeof(redraw_data) - 2 * 4 - 2; +- ((int*) redraw_data)[0] = 2 * 4; +- ((int*) redraw_data)[1] = 0; +- strncpy(redraw_data + 2 * 4, string, length); +- redraw_data[2 * 4 + length + 0] = '\0'; +- redraw_data[2 * 4 + length + 1] = '\x2'; +- zap_redraw_block.r_data = (int) redraw_data; +- +- /* Perform the draw */ +- swi(ZapRedraw_RedrawArea, 0, &zap_redraw_block); +- +- return flags; +- } +- +- /* +- * Okay that was it from me, back to Thomas ... +- */ +- +- /* +- * Parse the GUI related command-line arguments. Any arguments used are +- * deleted from argv, and *argc is decremented accordingly. This is called +- * when vim is started, whether or not the GUI has been started. +- */ +- void +- gui_mch_prepare(int *argc, char **argv) +- { +- int arg = 1; +- +- while (arg < *argc - 1) +- { +- if (strcmp(argv[arg], "--rows") == 0 || strcmp(argv[arg], "--columns") == 0) +- { +- int value; +- +- value = atoi(argv[arg + 1]); +- +- if (argv[arg][2] == 'r') +- default_rows = value; +- else +- default_columns = value; +- +- /* Delete argument from argv[]. (hope this is read/write!) */ +- +- *argc -= 2; +- if (*argc > arg) +- mch_memmove(&argv[arg], &argv[arg + 2], (*argc - arg) +- * sizeof(char *)); +- } +- else +- arg++; +- } +- } +- +- /* Fatal error on initialisation - report it and die. */ +- void +- ro_die(error) +- char_u *error; /* RISC OS error block */ +- { +- swi(Wimp_ReportError, error, 5, "GVim"); +- exit(EXIT_FAILURE); +- } +- +- /* Find the sizes of the window tools: +- * +- * Create a test window. +- * Find inner and outer sizes. +- * Find the difference. +- * Delete window. +- * +- * While we're here, find the eigen values too. +- */ +- void +- ro_measure_tools() +- { +- int block[10]; +- int vdu[] = { 4, 5, -1}; +- int test_window[] = +- { +- -100, -100, /* Visible area : min X,Y */ +- -50, -50, /* max X,Y */ +- 0, 0, /* Scroll offsets */ +- -1, /* Window in front */ +- 0xd0800150, /* Window flags */ +- 0xff070207, /* Colours */ +- 0x000c0103, /* More colours */ +- 0, -0x4000, /* Workarea extent */ +- 0x4000, 0, /* max X,Y */ +- 0x00000000, /* No title */ +- 0 << 12, /* No workarea button type */ +- 1, /* Wimp sprite area */ +- 0x00010001, /* Minimum width, height */ +- 0, 0, 0, /* Title data (none) */ +- 0 /* No icons */ +- }; +- int inner_max_x, inner_min_y; +- +- swi(Wimp_CreateWindow, 0, test_window); +- +- block[0] = r0; +- /* Open the window (and read state). +- * GetWindowOutline needs it too if the wimp isn't nested. +- */ +- swi(Wimp_OpenWindow, 0, block); +- inner_max_x = block[3]; +- inner_min_y = block[2]; +- +- swi(Wimp_GetWindowOutline, 0, block); +- +- gui.scrollbar_width = block[3] - inner_max_x; +- gui.scrollbar_height = inner_min_y - block[2]; +- +- swi(Wimp_DeleteWindow, 0, block); +- +- /* Read the size of one pixel. */ +- swi(OS_ReadVduVariables, vdu, vdu); +- x_eigen_factor = vdu[0]; +- y_eigen_factor = vdu[1]; +- } +- +- /* Load a template from the current templates file. +- * Create the window and return its handle. +- */ +- int +- ro_load_template(str_name, title, title_size) +- char_u *str_name; /* Identifier of window in file (max 12 chars) */ +- char_u **title; /* If not NULL then return pointer to title here */ +- int *title_size; /* If not NULL then return the title length here */ +- { +- int *window; +- char *data; +- int name[4]; +- +- strcpy( (char *) name, str_name); +- +- /* Find how big we must make the buffers */ +- +- if (xswi(Wimp_LoadTemplate, 0, 0, 0, 0, -1, name, 0) & v_flag) +- ro_die( (char *) r0); +- +- window = malloc(r1); /* Don't print text messages from alloc() */ +- data = malloc(r2); +- if (window == NULL || data == NULL) +- ro_die("\0\0\0\0Out of memory - Can't load templates"); +- +- /* Load the template into the buffers */ +- +- swi(Wimp_LoadTemplate, 0, +- window, /* Temp block */ +- data, /* Icon data */ +- data + r2 + 1, /* End of icon data */ +- -1, /* No fonts */ +- name, 0); /* First match */ +- if (r6 == 0) +- ro_die("\0\0\0\0Can't find window in Templates file"); +- +- /* Create the window */ +- +- if (xswi(Wimp_CreateWindow, 0, window) & v_flag) +- ro_die( (char *) r0); +- +- if (title) +- *title = (char_u *) window[18]; +- if (title_size) +- *title_size = window[20]; +- +- free(window); /* Free temp block */ +- return r0; /* Return the window handle */ +- } +- +- /* +- * Check if the GUI can be started. Called before gvimrc is sourced. +- * Return OK or FAIL. +- */ +- int +- gui_mch_init_check() +- { +- return OK; /* TODO: GUI can always be started? */ +- } +- +- /* +- * Initialise the RISC OS GUI. +- * Create all the windows. +- * Returns OK for success, FAIL when the GUI can't be started. +- */ +- int +- gui_mch_init() +- { +- int messages[] = { +- 1, 2, 3, 4, /* DataSave, DataSaveAck, DataLoad, DataLoadAck */ +- 8, /* PreQuit */ +- 0xf, /* ClaimEntity (for clipboard) */ +- 0x10, /* DataRequest (for clipboard) */ +- 0x400c1, /* Mode change */ +- 0x400c3, /* TaskCloseDown */ +- 0x400c9, /* MenusDeleted */ +- 0x808c1, /* TW_Output */ +- 0x808c2, /* TW_Ego */ +- 0x808c3, /* TW_Morio */ +- 0x808c4, /* TW_Morite */ +- 0}; /* End-of-list. */ +- +- +- /* There may have been some errors reported in the +- * command window before we get here. Wait if so. +- */ +- swi(Wimp_ReadSysInfo, 3); +- if (r0 == 0) +- swi(Wimp_CommandWindow, 0); /* Window opened - close with prompt */ +- +- if (xswi(Wimp_Initialise, 310, 0x4b534154, "GVim", messages) & v_flag) +- return FAIL; +- nested_wimp = r0 >= 397; +- task_handle = r1; +- +- /* Load the templates. */ +- +- if (xswi(Wimp_OpenTemplate, 0, "Vim:Templates") & v_flag) +- ro_die( (char *) r0); +- +- gui.window_handle = ro_load_template("editor", +- &gui.window_title, +- &gui.window_title_size); +- +- save_window = ro_load_template("save", NULL, NULL); +- +- swi(Wimp_CloseTemplate); +- +- /* Set default foreground and background colours. */ +- +- gui.norm_pixel = gui.def_norm_pixel; +- gui.back_pixel = gui.def_back_pixel; +- +- /* Get the colours from the "Normal" and "Menu" group (set in syntax.c or +- * in a vimrc file) */ +- +- set_normal_colors(); +- +- /* +- * Check that none of the colors are the same as the background color +- */ +- +- gui_check_colors(); +- +- /* Get the colours for the highlight groups (gui_check_colors() might have +- * changed them) */ +- +- highlight_gui_started(); /* re-init colours and fonts */ +- +- /* Set geometry based on values read on initialisation. */ +- +- gui.num_cols = Columns = default_columns; +- gui.num_rows = Rows = default_rows; +- +- /* Get some information about our environment. */ +- +- ro_measure_tools(); +- +- return OK; +- } +- +- /* +- * Called when the foreground or background colour has been changed. +- */ +- void +- gui_mch_new_colors() +- { +- } +- +- /* +- * Open the GUI window which was created by a call to gui_mch_init(). +- */ +- int +- gui_mch_open(void) +- { +- int block[10]; +- +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- block[7] = -1; /* Open at the top of the stack */ +- swi(Wimp_OpenWindow, 0, block); +- +- /* Give the new window the input focus */ +- swi(Wimp_SetCaretPosition, gui.window_handle, -1, 0, 0, -1, -1); +- +- if (gui_win_x != -1 && gui_win_y != -1) +- gui_mch_set_winpos(gui_win_x, gui_win_y); +- +- return OK; +- } +- +- void +- gui_mch_exit(int rc) +- { +- int block[64]; +- +- /* Close window. Stops us from getting troublesome events +- * if we take a while to die. +- */ +- block[0] = gui.window_handle; +- swi(Wimp_CloseWindow, 0, block); +- +- if (child_handle) +- { +- /* We still have a sub-task running - kill it */ +- block[0] = 20; +- block[3] = 0; +- block[4] = 0; /* Quit */ +- if ((xswi(Wimp_SendMessage, 17, block, child_handle) & v_flag) == 0) +- { +- /* Idle until child dies. */ +- while (child_handle) +- { +- process_event(wimp_poll(1, block), block); +- } +- } +- } +- +- exit(rc); +- } +- +- /* +- * Get the position of the top left corner of the window. +- */ +- int +- gui_mch_get_winpos(int *x, int *y) +- { +- /* TODO */ +- return FAIL; +- } +- +- /* +- * Set the position of the top left corner of the window to the given +- * coordinates. +- */ +- void +- gui_mch_set_winpos(int x, int y) +- { +- /* TODO */ +- } +- +- void +- gui_mch_set_shellsize(width, height, min_width, min_height, base_width, base_height, direction) +- int width; /* In OS units */ +- int height; +- int min_width; /* Smallest permissible window size (ignored) */ +- int min_height; +- int base_width; /* Space for scroll bars, etc */ +- int base_height; +- int direction; +- { +- int s_width, s_height; +- int block[] = { +- gui.window_handle, +- 0, +- -height + 1, +- width, +- 1}; +- +- gui_mch_get_screen_dimensions(&s_width, &s_height); +- s_width -= base_width; +- s_height -= base_height; /* Underestimate - ignores titlebar */ +- +- swi(Wimp_GetWindowState, 0, block); +- block[3] = block[1] + width; +- block[2] = block[4] - height; +- if (block[3] > s_width) +- { +- block[3] = s_width; +- block[1] = block[3] - width; +- } +- if (block[2] < gui.scrollbar_height) +- { +- block[2] = gui.scrollbar_height; +- block[4] = block[2] + height; +- } +- swi(Wimp_OpenWindow, 0, block); +- swi(Wimp_ForceRedraw, gui.window_handle, 0, -height, width, 0); +- } +- +- void +- gui_mch_get_screen_dimensions(int *screen_w, int *screen_h) +- { +- int block[] = {4, 5, 11, 12, -1}; +- +- swi(OS_ReadVduVariables, block, block); +- *screen_w = (block[2] + 1) << block[0]; +- *screen_h = (block[3] + 1) << block[1]; +- } +- +- /* Take a font name with options and return a font handle, or +- * zero for failure. +- * Replace extension with 'Bold' or 'Italic' depending on modifiers. +- */ +- int +- ro_get_font(fullname, weight) +- char_u *fullname; +- int weight; /* Initial weights: +- * BIT MEANING +- * 0 bold +- * 1 italic +- */ +- { +- char_u *arg; +- char_u font[41]; +- int width = -1; +- int height = -1; +- int name_len; +- int i; +- char_u c; +- +- for (i = 0; i < 39;) +- { +- c = fullname[i]; +- if (c == ':' || c == NUL || c == '.') +- break; +- font[i++] = c; +- } +- +- /* find the first modifier, NULL if none */ +- arg = strchr(fullname + i, ':'); +- +- while (arg) +- { +- switch (*++arg) +- { +- case 'h': +- height = strtol(arg + 1, (char **) &arg, 10); +- break; +- case 'w': +- width = strtol(arg + 1, (char **) &arg, 10); +- break; +- case 'b': +- weight |= 1; +- break; +- case 'i': +- weight |= 2; +- break; +- default: +- return 0; +- } +- arg = strchr(arg, ':'); +- } +- +- if ((weight & 1) && i < 35) +- { +- /* Bold goes instead of given suffix */ +- strncpy(font + i, ".Bold", 5); +- i += 5; +- } +- else +- { +- /* Copy rest of name unless we are using Bold */ +- while (i < 39) +- { +- c = fullname[i]; +- if (c == ':' || c == NUL) +- break; +- font[i++] = c; +- } +- } +- if ((weight & 2) && i < 32) +- { +- strncpy(font + i, ".Oblique", 8); +- i += 8; +- } +- +- font[i] = 0; +- +- if (height < 1 && width < 1) +- height = width = 10; /* Default to 10pt */ +- else if (height < 1) +- height = width; +- else if (width < 1) +- width = height; +- +- if (xswi(Font_FindFont, 0, font, width << 4, height << 4, 0, 0) & v_flag) +- return NOFONT; /* Can't find font */ +- +- return r0; +- } +- +- /* Load a file into allocated memory and check it is valid. +- * Return a pointer to the allocated block on success. +- */ +- char * +- zap_load_file(name, style) +- char_u *name; /* Name of directory containing styles */ +- char_u *style; /* Name of style within directory */ +- { +- char_u fname[256]; +- char_u *file; +- +- if (strlen(name) + strlen(style) > 254) +- return NULL; /* Names too long */ +- +- sprintf(fname, "%s.%s", name, style); +- +- /* Load the named font in 1bpp format. */ +- if (xswi(OS_File, 13, fname, 0, 0, "VimFonts:") & v_flag || r0 != 1) +- return NULL; /* Error reading file info, or not a file */ +- +- /* Allocate enough memory to load the whole file */ +- file = (char *) alloc(r4); +- if (!file) +- return NULL; /* Out of memory */ +- +- if (xswi(OS_File, 12, fname, file, 0, "VimFonts:") & v_flag) +- return NULL; /* Unable to load file */ +- +- if (strncmp(file, "ZapFont\015", 8) == 0) +- return file; /* Loaded OK! */ +- +- vim_free(file); +- return NULL; /* Not a valid font file */ +- } +- +- /* Load and convert the named font. +- * If name is NULL or a null string then convert the system font. +- * Return OK on success; FAIL and we revert to using the VDU drivers. +- * +- * 'name' is the name of a directory. +- * Tries to load 'name.0', 'name.B', 'name.I' and 'name.IB'. +- */ +- int +- zap_load_font(name) +- char_u *name; +- { +- int i; +- +- /* Free the existing font files, if any */ +- for (i = 0; i < ZAP_STYLES; i++) +- { +- vim_free(zap_file[i]); +- zap_file[i] = NULL; +- } +- +- if (name && *name == '!') +- { +- name++; +- double_height = TRUE; +- } +- else +- double_height = FALSE; +- +- if (name && *name) +- { +- zap_file[ZAP_NORMAL] = zap_load_file(name, "0"); +- if (!zap_file[ZAP_NORMAL]) +- return FAIL; /* Can't load the 'normal' style - error */ +- +- zap_file[ZAP_BOLD] = zap_load_file(name, "B"); +- zap_file[ZAP_ITALIC] = zap_load_file(name, "I"); +- zap_file[ZAP_BITALIC] = zap_load_file(name, "IB"); +- } +- else +- { +- int *header; +- char workarea[16]; +- char *old_wa; +- +- /* Allocate memory for system font (8 x 8 x 256 bits, plus header) */ +- header = (int *) alloc(0x20 + 8 * 256); +- if (header == NULL) +- return FAIL; +- zap_file[ZAP_NORMAL] = (char *) header; +- +- /* Store details about the system font */ +- header[2] = 8; /* Width */ +- header[3] = 8; /* Height */ +- header[4] = 0; /* First char */ +- header[5] = 255; /* Last char */ +- header[6] = header[7] = 0; /* Reserved */ +- +- /* Get system font bitmap */ +- old_wa = zap_redraw_block.r_workarea; +- zap_redraw_block.r_workarea = workarea; +- swi(ZapRedraw_ReadSystemChars, zap_file[ZAP_NORMAL] + 0x20, &zap_redraw_block); +- zap_redraw_block.r_workarea = old_wa; +- } +- +- return ro_zap_redraw_initialise(); +- } +- +- /* +- * Initialise vim to use the font with the given name. +- * Return FAIL if the font could not be loaded, OK otherwise. +- */ +- int +- gui_mch_init_font(char_u *font_name, int fontset) +- { +- int new_handle = 0; /* Use the system font by default */ +- +- if (font_name[0] == '!') +- { +- /* Select a ZapRedraw font */ +- if (zap_load_font(font_name + 1)) +- zap_redraw = TRUE; +- else +- { +- EMSG2(_("E610: Can't load Zap font '%s'"), font_name); +- font_name = "System"; /* Error - use system font */ +- zap_redraw = FALSE; +- } +- } +- else +- { +- zap_redraw = FALSE; +- +- if (font_name) +- { +- /* Extract any extra details about the font */ +- new_handle = ro_get_font(font_name, 0); +- if (!new_handle) +- return FAIL; +- } +- else +- font_name = "System"; +- } +- +- /* Free the previous font, if any */ +- gui_mch_free_font(gui.norm_font); +- gui.norm_font = new_handle; +- gui.char_ascent = 0; +- +- if (new_handle) +- { +- /* Read details about the chosen font */ +- swi(Font_ReadInfo, new_handle); +- +- gui.char_width = r3 - r1; +- gui.char_height = r4 - r2; +- +- font_x_offset = -r1; /* Where to position each char in its box */ +- font_y_offset = -r4; +- +- /* Try to load other fonts for bold, italic, and bold-italic */ +- gui_mch_free_font(gui.bold_font); +- gui.bold_font = ro_get_font(font_name, 1); +- gui_mch_free_font(gui.ital_font); +- gui.ital_font = ro_get_font(font_name, 2); +- gui_mch_free_font(gui.boldital_font); +- gui.boldital_font = ro_get_font(font_name, 3); +- } +- else +- { +- /* Use the system font or ZapRedraw. */ +- if (zap_redraw) +- { +- gui.char_width = zap_redraw_block.r_charw << zap_redraw_block.r_magx; +- gui.char_height = zap_redraw_block.r_charh << zap_redraw_block.r_magy; +- if (double_height) +- gui.char_height <<= 1; +- } +- else +- { +- gui.char_width = 16; +- gui.char_height = 32; +- } +- +- gui_mch_free_font(gui.bold_font); +- gui.bold_font = 0; +- gui_mch_free_font(gui.ital_font); +- gui.ital_font = 0; +- gui_mch_free_font(gui.boldital_font); +- gui.boldital_font = 0; +- } +- hl_set_font_name(font_name); +- +- must_redraw = CLEAR; +- return OK; +- } +- +- /* +- * Adjust gui.char_height (after 'linespace' was changed). +- */ +- int +- gui_mch_adjust_charheight() +- { +- return FAIL; +- } +- +- /* +- * Get a font structure for highlighting. +- */ +- GuiFont +- gui_mch_get_font(name, giveErrorIfMissing) +- char_u *name; +- int giveErrorIfMissing; +- { +- int handle; +- +- if (!name) +- return NOFONT; /* System font if no name */ +- +- handle = ro_get_font(name, 0); +- if (!handle) +- { +- if (giveErrorIfMissing) +- EMSG2(_("E611: Can't use font %s"), name); +- return NOFONT; +- } +- +- return handle; +- } +- +- #if defined(FEAT_EVAL) || defined(PROTO) +- /* +- * Return the name of font "font" in allocated memory. +- * Don't know how to get the actual name, thus use the provided name. +- */ +- char_u * +- gui_mch_get_fontname(font, name) +- GuiFont font; +- char_u *name; +- { +- if (name == NULL) +- return NULL; +- return vim_strsave(name); +- } +- #endif +- +- /* +- * Set the current text font. +- */ +- void +- gui_mch_set_font(GuiFont font) +- { +- ro_current_font = font; +- +- if (font) +- { +- /* Not the system font or ZapRedraw font - select it */ +- swi(Font_SetFont, font); +- } +- } +- +- /* +- * If a font is not going to be used, free its structure. +- */ +- void +- gui_mch_free_font(GuiFont font) +- { +- if (font) +- swi(Font_LoseFont, font); +- } +- +- /* +- * Return the Pixel value (colour) for the given colour name. +- * Return INVALCOLOR for error. +- * NB: I've changed Green for now, since it looked really sick +- */ +- guicolor_T +- gui_mch_get_color(char_u *name) +- { +- int i; +- struct colour +- { +- char_u *name; +- guicolor_T value; +- } colours[] = +- { +- { "Red", grgb(255, 0, 0) }, +- { "LightRed", grgb(255, 0, 0) }, +- { "DarkRed", grgb(139, 0, 0) }, +- +- { "Green", grgb(50, 200, 50) }, +- { "LightGreen", grgb(144, 238, 144) }, +- { "DarkGreen", grgb(0, 100, 0) }, +- { "SeaGreen", grgb(46, 139, 87) }, +- +- { "Blue", grgb(0, 0, 255) }, +- { "LightBlue", grgb(173, 216, 230) }, +- { "DarkBlue", grgb(0, 0, 139) }, +- { "SlateBlue", grgb(160, 90, 205) }, +- +- { "Cyan", grgb(0, 255, 255) }, +- { "LightCyan", grgb(224, 255, 255) }, +- { "DarkCyan", grgb(0, 139, 139) }, +- +- { "Magenta", grgb(255, 0, 255) }, +- { "LightMagenta", grgb(255, 224, 255) }, +- { "DarkMagenta", grgb(139, 0, 139) }, +- +- { "Yellow", grgb(255, 255, 0) }, +- { "LightYellow", grgb(255, 255, 224) }, +- { "DarkYellow", grgb(139, 139, 0) }, +- { "Brown", grgb(165, 42, 42) }, +- +- { "Gray", grgb(190, 190, 190) }, +- { "Grey", grgb(190, 190, 190) }, +- { "LightGray", grgb(211, 211, 211) }, +- { "LightGrey", grgb(211, 211, 211) }, +- { "DarkGray", grgb(169, 169, 169) }, +- { "DarkGrey", grgb(169, 169, 169) }, +- { "Gray10", grgb(26, 26, 26) }, +- { "Grey10", grgb(26, 26, 26) }, +- { "Gray20", grgb(51, 51, 51) }, +- { "Grey20", grgb(51, 51, 51) }, +- { "Gray30", grgb(77, 77, 77) }, +- { "Grey30", grgb(77, 77, 77) }, +- { "Gray40", grgb(102, 102, 102) }, +- { "Grey40", grgb(102, 102, 102) }, +- { "Gray50", grgb(127, 127, 127) }, +- { "Grey50", grgb(127, 127, 127) }, +- { "Gray60", grgb(153, 153, 153) }, +- { "Grey60", grgb(153, 153, 153) }, +- { "Gray70", grgb(179, 179, 179) }, +- { "Grey70", grgb(179, 179, 179) }, +- { "Gray80", grgb(204, 204, 204) }, +- { "Grey80", grgb(204, 204, 204) }, +- { "Gray90", grgb(229, 229, 229) }, +- { "Grey90", grgb(229, 229, 229) }, +- +- { "Black", grgb(0, 0, 0) }, +- { "White", grgb(255, 255, 255) }, +- +- { "Orange", grgb(255, 165, 0) }, +- { "Purple", grgb(160, 32, 240) }, +- { "Violet", grgb(238, 130, 238) }, +- {NULL, 0} +- }; +- +- if (name[0] == '#') +- { +- char *end; +- int c; +- +- c = strtol(name + 1, &end, 16); +- return (guicolor_T) ((c >> 16) & 0xff) | (c & 0xff00) | ((c & 0xff) << 16); +- } +- +- for (i = 0; colours[i].name != NULL; i++) +- { +- if (STRICMP(name, colours[i].name) == 0) +- return colours[i].value; +- } +- if (strnicmp(name, "grey", 4) == 0 || strnicmp(name, "gray", 4) == 0) +- { +- int level = (255 * atoi(name + 4)) / 100; +- return (guicolor_T) grgb(level, level, level); +- } +- return INVALCOLOR; +- } +- +- /* +- * Set the current text colours. +- * If we are using fonts then set the antialiasing colours too. +- */ +- void +- gui_mch_set_colors(guicolor_T fg, guicolor_T bg) +- { +- zap_redraw_colours[0] = bg << 8; /* JK230798, register new background colour */ +- zap_redraw_colours[1] = fg << 8; /* JK230798, register new foreground colour */ +- zap_redraw_update_colours = TRUE; /* JK230798, need update of colour masks */ +- +- swi(ColourTrans_ReturnGCOL, fg << 8); +- gui.fg_colour = r0; +- swi(ColourTrans_ReturnGCOL, bg << 8); +- gui.bg_colour = r0; +- +- if (ro_current_font) +- swi(ColourTrans_SetFontColours, 0, bg << 8, fg << 8, 14); +- } +- +- void +- ro_draw_string(x, y, s, len, flags, clip) +- int x; /* Top-left coord to plot at (x incl, y excl) */ +- int y; /* (screen coords) */ +- char_u *s; /* String to plot */ +- int len; /* Length of string */ +- int flags; /* DRAW_TRANSP, DRAW_BOLD, DRAW_UNDERL */ +- int* clip; /* JK230798, added clip window */ +- { +- if (ro_current_font) +- { +- int fx; +- int flen = len; /* Preserve for underline */ +- +- /* Use the Font manager to paint the string. +- * Must do one char at a time to get monospacing. +- */ +- +- if (flags & DRAW_ITALIC && !gui.ital_font) +- flags |= DRAW_UNDERL; /* No italic - underline instead */ +- +- if ((flags & DRAW_TRANSP) == 0) +- { +- swi(ColourTrans_SetColour, gui.bg_colour, 0, 0, 0, 0); +- swi(OS_Plot, 4, x, y - gui.char_height); +- swi(OS_Plot, 96 + 5, x + len * gui.char_width - 1, y - 1); +- } +- +- fx = x + font_x_offset; +- while (flen--) +- { +- swi(Font_Paint, 0, s++, 0x90, fx, y + font_y_offset, 0, 0, 1); +- fx += gui.char_width; +- } +- } +- else +- { +- if (zap_redraw) +- { +- /* Using fast Zap redraw. */ +- flags = ro_zap_redraw_draw_string(x, y, s, len, flags, clip); +- } +- else +- { +- /* Using the system font */ +- if (flags & DRAW_ITALIC) +- flags |= DRAW_UNDERL; +- +- if ((flags & DRAW_TRANSP) == 0) +- { +- swi(ColourTrans_SetColour, gui.bg_colour, 0, 0, 0, 0); +- swi(OS_Plot, 4, x, y - gui.char_height); +- swi(OS_Plot, 96 + 5, x + len * gui.char_width - 1, y - 1); +- } +- swi(OS_Plot, 4, /* Move the drawing cursor */ +- x, +- y - 1); +- swi(ColourTrans_SetColour, gui.fg_colour, 0, 0, 0, 0); +- swi(OS_WriteN, s, len); +- +- if (flags & DRAW_BOLD) +- { +- swi(OS_Plot, 4, x + (1 << x_eigen_factor), y - 1); +- swi(OS_WriteN, s, len); +- } +- } +- } +- +- if (flags & DRAW_UNDERL) +- { +- if (ro_current_font || zap_redraw) +- swi(ColourTrans_SetColour, gui.fg_colour, 0, 0, 0, 0); +- /* Underlined is the same with all plotting methods */ +- swi(OS_Plot, 4, x, y - gui.char_height); +- swi(OS_Plot, 1, gui.char_width * len, 0); +- } +- } +- +- void +- gui_mch_draw_string(int row, int col, char_u *s, int len, int flags) +- { +- int x, y; /* Workarea x,y */ +- x = col * gui.char_width; +- y = -row * gui.char_height; +- +- if (redraw_block) +- { +- ro_draw_string(x + redraw_block[1], y + redraw_block[4], +- s, len, flags, &redraw_block[7]); /* JK230798, added clip window */ +- } +- else +- { +- int block[44]; +- block[0] = gui.window_handle; +- block[1] = x; +- block[2] = y - gui.char_height; +- block[3] = (col + len) * gui.char_width; +- block[4] = y; +- swi(Wimp_UpdateWindow, 0, block); +- while (r0) +- { +- ro_draw_string(x + block[1], y + block[4], +- s, len, flags, &block[7]); /* JK230798, added clip window */ +- swi(Wimp_GetRectangle, 0, block); +- } +- } +- } +- +- /* +- * Return OK if the key with the termcap name "name" is supported. +- */ +- int +- gui_mch_haskey(char_u *name) +- { +- return FAIL; +- } +- +- void +- gui_mch_beep(void) +- { +- swi(OS_WriteI + 7); +- } +- +- /* +- * Visual bell. +- */ +- void +- gui_mch_flash(int msec) +- { +- /* TODO */ +- } +- +- +- /* +- * Plot a solid rectangle using the given plot action and colour. +- * Coordinates are inclusive and window-relative. +- */ +- void +- plot_rectangle(plot, colour, minx, miny, maxx, maxy) +- int plot; /* OS_Plot action */ +- int colour; +- int minx; +- int miny; +- int maxx; +- int maxy; +- { +- if (redraw_block) +- { +- swi(ColourTrans_SetColour, colour, 0, 0, 0, 0); +- swi(OS_Plot, 4, minx + redraw_block[1], miny + redraw_block[4]); +- swi(OS_Plot, plot, maxx + redraw_block[1], maxy + redraw_block[4]); +- } +- else +- { +- int block[44]; +- block[0] = gui.window_handle; +- block[1] = minx; +- block[2] = miny; +- block[3] = maxx + 1; +- block[4] = maxy + 1; +- swi(Wimp_UpdateWindow, 0, block); +- while (r0) +- { +- swi(ColourTrans_SetColour, colour, 0, 0, 0, 0); +- swi(OS_Plot, 4, minx + block[1], miny + block[4]); +- swi(OS_Plot, plot, maxx + block[1], maxy + block[4]); +- swi(Wimp_GetRectangle, 0, block); +- } +- } +- } +- +- /* +- * Invert a rectangle from row r, column c, for nr rows and nc columns. +- */ +- void +- gui_mch_invert_rectangle(int r, int c, int nr, int nc) +- { +- plot_rectangle(96 + 6, 0, FILL_X(c), -FILL_Y(r + nr), FILL_X(c + nc), -FILL_Y(r)); +- } +- +- /* +- * Iconify the GUI window. +- */ +- void +- gui_mch_iconify(void) +- { +- } +- +- #if defined(FEAT_EVAL) || defined(PROTO) +- /* +- * Bring the Vim window to the foreground. +- */ +- void +- gui_mch_set_foreground() +- { +- /* TODO */ +- } +- #endif +- +- /* Draw a hollow rectangle relative to the current +- * graphics cursor position, with the given width +- * and height. Start position is top-left. +- */ +- void +- draw_hollow(w, h) +- int w; +- int h; +- { +- swi(OS_Plot, 1, w - 1, 0); +- swi(OS_Plot, 1, 0, 1 - h); +- swi(OS_Plot, 1, 1 - w, 0); +- swi(OS_Plot, 1, 0, h - 1); +- } +- +- /* +- * Draw a cursor without focus. +- */ +- void +- gui_mch_draw_hollow_cursor(guicolor_T colour) +- { +- int x = FILL_X(gui.cursor_col); /* Window relative, top-left */ +- int y = -FILL_Y(gui.cursor_row); +- if (redraw_block == NULL) +- { +- int block[11]; +- +- block[0] = gui.window_handle; +- block[1] = x; +- block[2] = y - gui.char_height; +- block[3] = x + gui.char_width; +- block[4] = y; +- swi(Wimp_UpdateWindow, 0, block); +- while (r0) +- { +- swi(ColourTrans_SetGCOL, colour << 8, 0, 0, 0, 0); +- +- swi(OS_Plot, 4, x + block[1], y + block[4] - 1); +- draw_hollow(gui.char_width, gui.char_height); +- +- swi(Wimp_GetRectangle, 0, block); +- } +- } +- else +- { +- swi(ColourTrans_SetGCOL, colour << 8, 0, 0, 0, 0); +- +- swi(OS_Plot, 4, x + redraw_block[1], y + redraw_block[4] - 1); +- draw_hollow(gui.char_width, gui.char_height); +- } +- } +- +- /* +- * Draw part of a cursor, "w" pixels wide, and "h" pixels high, using +- * color "color". +- */ +- void +- gui_mch_draw_part_cursor(w, h, colour) +- int w; +- int h; +- guicolor_T colour; +- { +- int x = FILL_X(gui.cursor_col); +- int y = -FILL_Y(gui.cursor_row); +- swi(ColourTrans_ReturnGCOL, colour << 8); +- plot_rectangle(96 + 5, r0, x, y - h, x + w - 1, y - 1); +- } +- +- /* +- * Catch up with any queued events. This may put keyboard input into the +- * input buffer, call resize call-backs, trigger timers etc. +- * If there is nothing in the event queue(& no timers pending), then we return +- * immediately (well, after a Wimp_Poll). +- */ +- void +- gui_mch_update(void) +- { +- int block[64]; +- int reason; +- +- swi(OS_ReadMonotonicTime); +- if ((r0 - time_of_last_poll) < 50) +- return; /* Don't return too often */ +- +- reason = wimp_poll(0, block); +- if (reason) +- process_event(reason, block); +- ro_return_early = FALSE; /* We're returning anyway. */ +- } +- +- void +- redraw_window(block) +- int *block; +- { +- int x, y; /* Vim workarea coords */ +- int width, height; +- int blank_col; +- +- swi(ColourTrans_ReturnGCOL, UNUSED_COLOUR << 8, 0, 0, 1<<7, 0); +- blank_col = r0; +- +- swi(Wimp_RedrawWindow, 0, block); +- redraw_block = block; +- while (r0) +- { +- x = block[7] - block[1]; +- y = block[4] - block[10]; +- width = block[9] - block[7]; +- height = block[10] - block[8]; +- +- if (height + y > Rows * gui.char_height) +- { +- /* Blank everything off the bottom. */ +- plot_rectangle(96 + 5, blank_col, +- 0, block[8] - block[4], +- block[9] - block[1], -FILL_Y(Rows) - 1); +- height = Rows * gui.char_height; +- } +- if (width + x> Columns * gui.char_width) +- { +- /* Blank everything off to the right. */ +- plot_rectangle(96 + 5, blank_col, +- FILL_X(Columns), block[8] - block[4], +- block[9] - block[1], 0); +- width = Columns * gui.char_width; +- } +- gui_redraw(x , y, width, height); +- swi(Wimp_GetRectangle, 0, block); +- } +- redraw_block = NULL; +- } +- +- /* Check if we have modified data. +- * If we do then ack the message to stop the shutdown. +- * Otherwise, ignore the message. +- */ +- void +- ro_prequit(block) +- int *block; +- { +- if (!ro_ok_to_quit()) +- { +- /* Not OK to quit - stop shutdown */ +- block[3] = block[2]; +- swi(Wimp_SendMessage, 19, block, block[1]); +- } +- /* Do nothing. We may get a Message_Quit later. */ +- } +- +- /* If there is unsaved data then ask the user if they mind losing it. +- * Return TRUE if we can quit without saving, FALSE to halt the +- * shutdown. +- */ +- int +- ro_ok_to_quit() +- { +- int old_confirm = cmdmod.confirm; +- +- cmdmod.confirm = FALSE; /* Use our own, single tasking, box */ +- +- if (check_changed_any(FALSE)) +- { +- swi(Wimp_ReportError, +- "\0\0\0\0Vim contains unsaved data - quit anyway?", +- 0x17, +- "Vim"); +- cmdmod.confirm = old_confirm; +- if (r1 != 1) +- return FALSE; +- } +- cmdmod.confirm = old_confirm; +- return TRUE; +- } +- +- /* Quit without checking for unsaved data. */ +- void +- ro_quit() +- { +- exiting = TRUE; +- getout(0); +- +- exiting = FALSE; /* probably can't get here */ +- setcursor(); /* position cursor */ +- out_flush(); +- } +- +- /* Insent the given vim special code into the input buffer */ +- void +- ro_press(a, b, modifier) +- char a; +- char b; +- int modifier; /* % 0000 0000 */ +- { +- char_u buf[6]; +- int vim_mod; +- int key; +- +- +- /* Convert RISC OS modifier to Vim modifier. */ +- vim_mod = ((modifier & 0x10) ? MOD_MASK_SHIFT : 0) +- | ((modifier & 0x20) ? MOD_MASK_CTRL : 0); +- key = simplify_key(TERMCAP2KEY(a, b), &vim_mod); +- +- buf[3] = CSI; +- buf[4] = KEY2TERMCAP0(key); +- buf[5] = KEY2TERMCAP1(key); +- if (vim_mod) +- { +- buf[0] = CSI; +- buf[1] = KS_MODIFIER; +- buf[2] = vim_mod; +- add_to_input_buf(buf, 6); +- } +- else +- add_to_input_buf(buf + 3, 3); +- } +- +- /* Take a wimp key code and insert the vim equivalent +- * into vim's input buffer. +- * CTRL-C also sets got_int. +- */ +- void +- ro_insert_key(code) +- char_u *code; /* Wimp_ProcessKey code (4 bytes) */ +- { +- char a = code[0]; +- char b = code[1]; +- int base, modifier; +- +- if (a == 3 && ctrl_c_interrupts) +- got_int = TRUE; +- +- /* Is it a normal key? */ +- if (a > 31 && a < 127) +- { +- add_to_input_buf(code, 1); +- return; +- } +- +- /* We should pass any unrecognised keys on, but +- * for now just pass on F12 combinations. +- */ +- switch (b) +- { +- case 0: +- /* Home and Delete are the only special cases */ +- switch (a) +- { +- case 0x1e: +- ro_press('k','h', 0); /* Home */ +- return; +- case 0x7f: +- ro_press('k','D', 0); /* Delete */ +- return; +- case CSI: +- { +- /* Turn CSI into K_CSI. Untested! */ +- char_u string[3] = {CSI, KS_EXTRA, KE_CSI}; +- +- add_to_input_buf(string, 3); +- return; +- } +- default: +- add_to_input_buf(code, 1); +- return; +- } +- case 1: +- if ((a & 0xcf) == 0xcc) +- { +- /* F12 pressed - pass it on (quick hack) */ +- swi(Wimp_ProcessKey, a | 0x100); +- return; +- } +- base = a & 0xcf; +- modifier = a & 0x30; +- switch (base) +- { +- case 0x8a: /* Tab */ +- add_to_input_buf("\011", 1); +- return; +- case 0x8b: /* Copy (End) */ +- return ro_press('@', '7', modifier); +- case 0x8c: /* Left */ +- return ro_press('k', 'l', modifier); +- case 0x8d: /* Right */ +- return ro_press('k', 'r', modifier); +- case 0x8e: /* Down */ +- if (modifier & 0x10) +- return ro_press('k', 'N', modifier ^ 0x10); +- else +- return ro_press('k', 'd', modifier); +- case 0x8f: /* Up */ +- if (modifier & 0x10) +- return ro_press('k', 'P', modifier ^ 0x10); +- else +- return ro_press('k', 'u', modifier); +- case 0xca: /* F10 */ +- return ro_press('k', ';', modifier); +- case 0xcb: /* F11 */ +- return ro_press('F', '1', modifier); +- case 0xcd: /* Insert */ +- return ro_press('k', 'I', modifier); +- default: +- if (base > 0x80 && base < 0x18a) +- { +- /* One of the other function keys */ +- return ro_press('k', '0' + (base & 15), modifier); +- } +- } +- } +- } +- +- /* Process a mouse event. */ +- void +- ro_mouse(block) +- int *block; +- { +- int x, y, button, vim_button; +- int modifiers = 0; +- int min_x, min_y; /* Visible area of editor window */ +- int max_x, max_y; +- +- if (block[3] != gui.window_handle || ro_dragging) +- return; /* Not our window or ignoring clicks*/ +- +- x = block[0]; /* Click position - screen coords */ +- y = block[1]; +- button = block[2]; +- +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- min_x = block[1]; +- min_y = block[2]; +- max_x = block[3]; +- max_y = block[4]; +- +- if (block[3] - x < gui.scrollbar_width) +- { +- /* Click in that blank area under the scrollbars */ +- +- if (button & 0x444) +- { +- int front_block[64]; +- /* Dragging with Select - bring window to front first */ +- front_block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, front_block); +- front_block[7] = -1; +- ro_open_main(front_block); +- } +- +- block[0] = gui.window_handle; +- block[1] = 7; /* Drag point */ +- block[2] = block[4] = 0; /* Coords of point. */ +- block[3] = block[5] = 0; +- drag_x_offset = max_x - x; +- drag_y_offset = min_y - y; +- +- /* Parent box. */ +- block[6] = min_x + +- gui.scrollbar_width * 2 + +- MIN_COLUMNS * gui.char_width; +- block[7] = 0; +- gui_mch_get_screen_dimensions(&block[8], &block[9]); +- block[9] = max_y - +- 4 * gui.char_height - +- gui.scrollbar_height; +- +- swi(Wimp_DragBox, 0, block); +- ro_dragging = DRAG_RESIZE_WINDOW; +- drag_button = vim_button; +- drag_modifiers = modifiers; +- return; +- } +- +- if (button & 0x111) +- vim_button = MOUSE_RIGHT; +- else if (button & 0x222) +- vim_button = MOUSE_MIDDLE; +- else +- vim_button = MOUSE_LEFT; +- +- swi(OS_Byte, 121, 0x80); +- if (r1 == 0xff) +- modifiers |= MOUSE_SHIFT; +- swi(OS_Byte, 121, 0x81); +- if (r1 == 0xff) +- modifiers |= MOUSE_CTRL; +- swi(OS_Byte, 121, 0x82); +- if (r1 == 0xff) +- modifiers |= MOUSE_ALT; +- +- if (button == 2) +- { +- /* Menu click: +- * If shift was pressed then do the paste action. +- * If not, then open the pop-up menu. +- */ +- modifiers ^= MOUSE_SHIFT; +- if (modifiers && MOUSE_SHIFT) +- { +- vimmenu_T main; +- /* Shift was NOT pressed - show menu */ +- main.dname = (char_u *) "Vim"; +- main.children = root_menu; +- gui_mch_show_popupmenu(&main); +- return; +- } +- } +- +- /* Gain the input focus */ +- swi(Wimp_SetCaretPosition, gui.window_handle, -1, 0, 0, -1, -1); +- +- if (button & 0xf0) +- { +- /* Drag operation: +- * +- * Tell the Wimp to start a drag. +- * Monitor null events. +- */ +- block[1] = 7; /* Drag a point. */ +- block[2] = block[4] = x; /* Coords of point. */ +- block[3] = block[5] = y; +- block[6] = 0; /* Coords of bounding box. */ +- block[7] = 0; +- gui_mch_get_screen_dimensions(&block[8], &block[9]); +- +- drag_x_offset = drag_y_offset = 0; +- +- swi(Wimp_DragBox, 0, block); +- ro_dragging = DRAG_SELECTION; +- drag_button = vim_button; +- drag_modifiers = modifiers; +- +- vim_button |= MOUSE_DRAG; +- } +- +- gui_send_mouse_event( +- vim_button, +- x - min_x, +- max_y - y, +- button & 0xf ? TRUE : FALSE, /* dclick */ +- modifiers); +- } +- +- void +- ro_continue_drag(block) +- int *block; /* Just used as scrap. */ +- { +- int x, y; +- +- /* Get screen coords of pointer. */ +- swi(Wimp_GetPointerInfo, 0, block); +- x = block[0] + drag_x_offset; +- y = block[1] + drag_y_offset; +- +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- +- if (ro_dragging == DRAG_RESIZE_WINDOW) +- { +- /* Resizing the main window. */ +- block[2] = y; +- block[3] = x; +- ro_open_main(block); +- } +- else +- { +- /* Selecting some text. */ +- gui_send_mouse_event( +- drag_button | MOUSE_DRAG, /* Always report the same button */ +- x - block[1], +- block[4] - y, +- FALSE, /* Not a double click. */ +- drag_modifiers); +- } +- } +- +- /* User has released all mouse buttons, marking the end of a drag. */ +- void +- ro_drag_finished(block) +- int *block; +- { +- int x; +- int y; +- int width, height; +- +- /* I don't trust the box returned by Wimp_Poll; look at the pointer +- * ourselves. +- */ +- swi(Wimp_GetPointerInfo, 0, block); +- x = block[0] + drag_x_offset; +- y = block[1] + drag_y_offset; +- +- if (ro_dragging == DRAG_RESIZE_WINDOW) +- { +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- block[2] = y; +- block[3] = x; +- ro_open_main(block); +- +- width = (block[3] - block[1]); +- height = (block[4] - block[2]); +- +- swi(Wimp_ForceRedraw, gui.window_handle, 0, -height, width, 0); +- gui_resize_shell(width, height); +- } +- else +- { +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- gui_send_mouse_event( +- MOUSE_RELEASE, +- x - block[1], +- block[4] - y, +- FALSE, /* not a double click */ +- drag_modifiers); +- } +- ro_dragging = DRAG_FALSE; +- } +- +- /* Load the file/pathname given in block into a [new] buffer. +- * +- * Modifier Action +- * +- * None :confirm e +- * Ctrl :sp +- * Shift +- * +- * Insert into typebuf, at the start. +- * If loading from !Scrap then use saved leafname instead, and +- * delete the scrap file. Also, ignore shift key. +- * +- * NB: Doesn't send DataLoadAck (other app might delete temp file?). +- */ +- void +- ro_dataload(block) +- int *block; +- { +- char_u new_path[MAXPATHL]; +- char_u *path = ((char_u *) block) + 44; +- int scrap = FALSE; +- +- if (block[3] == leaf_ref && leaf_name) +- scrap = TRUE; +- +- switch (get_real_state() & 0xff) +- { +- case INSERT: +- case CMDLINE: +- case CMDLINE+LANGMAP: +- /* For insert mode we can only insert the pathname (currently) +- * Make sure Shift is pressed. +- */ +- swi(OS_Byte, 121, 0x80); /* Is Shift pressed? */ +- if (r1 == 0xff) +- { +- ins_typebuf(" ", REMAP_NONE, 0, TRUE, FALSE); +- ins_typebuf(path, REMAP_NONE, 0, TRUE, FALSE); +- ro_return_early = TRUE; /* Return even though nothing was typed. */ +- } +- else +- swi(Wimp_ReportError, +- "\0\0\0\0Sorry, you can only load text in normal mode", 5, "Vim"); +- break; +- +- case NORMAL: +- ro_return_early = TRUE; /* Return even though nothing was typed. */ +- +- if (scrap) /* Remove . Later. */ +- ins_typebuf(":!~remove \r", REMAP_NONE, 0, TRUE, FALSE); +- +- /* Insert {:sp ,:confirm e }[+f\ ] */ +- ins_typebuf("\r", REMAP_NONE, 0, TRUE, FALSE); +- ins_typebuf(path, REMAP_NONE, 0, TRUE, FALSE); +- ins_typebuf(" ", REMAP_NONE, 0, TRUE, FALSE); +- +- if (scrap) +- { +- /* Loading via !Scrap - change pathname to stored leafname */ +- ins_typebuf(leaf_name, REMAP_NONE, 0, TRUE, FALSE); +- ins_typebuf(" +f\\ ", REMAP_NONE, 0, TRUE, FALSE); +- leaf_ref = 0; +- vim_free(leaf_name); +- leaf_name = NULL; +- } +- +- swi(OS_Byte, 121, 0x81); /* Is Ctrl pressed? */ +- if (r1 == 0xff) +- /* Yes, split window */ +- ins_typebuf(":sp", REMAP_NONE, 0, TRUE, FALSE); +- else +- ins_typebuf(":confirm e", REMAP_NONE, 0, TRUE, FALSE); +- break; +- +- default: +- swi(Wimp_ReportError, "\0\0\0\0You can only load text in normal mode.", 5, "Vim"); +- } +- /* Send DataSaveAck so other program doesn't think we died +- * and delete . +- */ +- block[3] = block[2]; +- block[4] = 4; +- swi(Wimp_SendMessage, 17, block, block[1]); +- } +- +- void +- ro_datasave(block) +- int *block; +- { +- char_u *path = ((char_u *) block) + 44; +- +- /* Preserve the name given so we can use it, not */ +- if (leaf_name) +- vim_free(leaf_name); +- leaf_name = vim_strsave(path); +- +- block[9] = -1; /* File is unsafe. */ +- strcpy(path, ""); +- block[0] = 60; +- block[3] = block[2]; +- block[4] = 2; +- swi(Wimp_SendMessage, 17, block, block[1]); +- +- leaf_ref = block[2]; +- } +- +- void +- ro_message(block) +- int *block; +- { +- char_u *buffer; +- long_u len; +- +- if (block[1] == task_handle) +- return; /* Don't talk to ourself! */ +- switch (block[4]) +- { +- case 0: /* Quit. */ +- if (block[4] == 0) +- ro_quit(); +- break; +- case 1: /* DataSave */ +- ro_datasave(block); +- break; +- case 2: /* DataSaveAck. */ +- if (clip_convert_selection(&buffer, &len, &clip_star) == -1) +- return; +- +- /* Save the clipboard contents to a file. */ +- swi(OS_File, 10, ((char_u *) block) + 44, 0xfff, 0, buffer, buffer + len); +- +- /* Ack with DataLoad message. */ +- block[3] = block[2]; +- block[4] = 3; +- block[9] = len; +- swi(Wimp_SendMessage, 17, block, block[1]); +- +- vim_free(buffer); +- break; +- case 3: /* DataLoad */ +- ro_dataload(block); +- break; +- case 8: /* PreQuit */ +- ro_prequit(block); +- break; +- case 0xf: /* Lose clipboard. */ +- if (block[5] & 4) +- { +- clip_free_selection(&clip_star); +- clip_star.owned = FALSE; +- } +- break; +- case 0x10: /* DataRequest (clip_star) */ +- if (clip_star.owned) +- { +- int rows; +- +- /* Tell other program that we have the clipboard. */ +- block[0] = 52; +- block[3] = block[2]; /* Copy myref to yourref. */ +- block[4] = 1; /* DataSave message. */ +- /* Create an estimate for the size (larger or same as true +- * value) */ +- rows = clip_star.end.lnum - clip_star.start.lnum; +- if (rows < 0) +- rows = -rows; +- block[9] = (rows + 1) * Columns + 1; /* Add one for possible +- final newline. */ +- block[10] = 0xfff; /* Clipboard is text. */ +- strcpy( ((char_u *) block) + 44, "VimClip"); +- swi(Wimp_SendMessage, 17, block, block[1]); +- } +- break; +- case 0x400c1: /* Mode change */ +- changed_mode = TRUE; /* Flag - update on next OpenWindow */ +- if (zap_redraw) +- { +- /* JK230798, re-initialise ZapRedraw stuff */ +- if (ro_zap_redraw_initialise() == FAIL) +- zap_redraw = FALSE; +- } +- break; +- case 0x400c3: /* TaskCloseDown */ +- if (block[1] == child_handle) +- child_handle = 0; +- break; +- } +- } +- +- /* +- * Converts a scrollbar's window handle into a scrollbar pointer. +- * NULL on failure. +- */ +- scrollbar_T * +- ro_find_sbar(id) +- int id; +- { +- win_T *wp; +- +- if (gui.bottom_sbar.id == id) +- return &gui.bottom_sbar; +- FOR_ALL_WINDOWS(wp) +- { +- if (wp->w_scrollbars[SBAR_LEFT].id == id) +- return &wp->w_scrollbars[SBAR_LEFT]; +- if (wp->w_scrollbars[SBAR_RIGHT].id == id) +- return &wp->w_scrollbars[SBAR_RIGHT]; +- } +- return NULL; +- } +- +- void +- scroll_to(line, sb) +- int sb; /* Scrollbar number */ +- int line; +- { +- char_u code[8]; +- +- /* Don't put events in the input queue now. */ +- if (hold_gui_events) +- return; +- +- /* Send a scroll event: +- * +- * A scrollbar event is CSI (NOT K_SPECIAL), KS_VER_SCROLLBAR, +- * KE_FILLER followed by: +- * one byte representing the scrollbar number, and then four bytes +- * representing a long_u which is the new value of the scrollbar. +- */ +- code[0] = CSI; +- code[1] = KS_VER_SCROLLBAR; +- code[2] = KE_FILLER; +- code[3] = sb; +- code[4] = line >> 24; +- code[5] = line >> 16; +- code[6] = line >> 8; +- code[7] = line; +- add_to_input_buf(code, 8); +- } +- +- void +- h_scroll_to(col) +- int col; +- { +- char_u code[8]; +- +- /* Don't put events in the input queue now. */ +- if (hold_gui_events) +- return; +- +- /* Send a scroll event: +- * +- * A scrollbar event is CSI (NOT K_SPECIAL) +- * +- * A horizontal scrollbar event is K_SPECIAL, KS_HOR_SCROLLBAR, +- * KE_FILLER followed by four bytes representing a long_u which is the +- * new value of the scrollbar. +- */ +- code[0] = CSI; +- code[1] = KS_HOR_SCROLLBAR; +- code[2] = KE_FILLER; +- code[4] = col >> 24; +- code[5] = col >> 16; +- code[6] = col >> 8; +- code[7] = col; +- add_to_input_buf(code, 8); +- } +- +- void +- ro_scroll(block) +- int *block; +- { +- scrollbar_T *sb; +- int offset; +- win_T *wp; +- +- /* Block is ready for Wimp_OpenWindow, and also contains: +- * +- * +32 = scroll X direction (-2 .. +2) +- * +36 = scroll Y direction (-2 .. +2) +- */ +- +- sb = ro_find_sbar(block[0]); +- if (!sb) +- return; /* Window not found (error). */ +- +- wp = sb-> wp; +- +- if (wp == NULL) +- { +- /* Horizontal bar. */ +- offset = block[8]; +- if (offset == -2) +- offset = (block[1] - block[3]) / gui.char_width; +- else if (offset == 2) +- offset = (block[3] - block[1]) / gui.char_width; +- +- block[5] += offset * gui.char_width; +- +- gui_drag_scrollbar(sb, block[5] / gui.char_width, FALSE); +- +- swi(Wimp_OpenWindow, 0, block); +- } +- else +- { +- offset = -block[9]; +- if (offset == -2) +- offset = -(wp -> w_height - 1); +- else if (offset == 2) +- offset = wp -> w_height - 1; +- +- /* Possibly we should reposition the scrollbar? +- * Vim seems to update the bar anyway... +- */ +- gui_drag_scrollbar(sb, offset - (block[6] / gui.char_height), FALSE); +- } +- } +- +- /* Move a window by a given offset. Used to simulate the function of the +- * nested wimp. +- */ +- void +- ro_move_child(window, x, y, pos_wanted, pos_got) +- int window; +- int x,y; /* offset to move by */ +- int pos_wanted, pos_got; +- { +- int block[10]; +- +- block[0] = window; +- swi(Wimp_GetWindowState, 0, block); +- block[1] += x; +- block[2] += y; +- block[3] += x; +- block[4] += y; +- if (pos_wanted == -1) +- block[7] = -1; +- else if (pos_wanted == -2) +- block[7] = pos_got; +- swi(Wimp_OpenWindow, 0, block); +- } +- +- /* Open the main window. Also updates scrollbars if we are not +- * using the nested Wimp. +- * If we have just changed mode then re-read all values. +- */ +- void +- ro_open_main(block) +- int *block; +- { +- int toggle_size; +- +- /* Find out if the user clicked on the toggle size icon. */ +- block[20] = block[0]; +- swi(Wimp_GetWindowState, 0, block + 20); +- toggle_size = block[28] & (1 << 19); +- +- if (nested_wimp) +- { +- swi(Wimp_OpenWindow, 0, block); +- } +- else +- { +- int old[10]; +- int x_offset, y_offset; /* Move children same as parent. */ +- int pos_wanted, pos_got; +- int left_bar = gui.which_scrollbars[SBAR_LEFT]; +- int right_bar = gui.which_scrollbars[SBAR_RIGHT]; +- win_T *wp; +- +- /* Three cases to think about: +- * 1) Move to top. Open each window at the top. +- * 2) Same stack position. Open each with same position. +- * 3) Open at bottom. Open children with parent's new position. +- */ +- +- old[0] = block[0]; +- swi(Wimp_GetWindowState, 0, old); +- pos_wanted = block[7]; +- swi(Wimp_OpenWindow, 0, block); +- /* Block updated by OpenWindow? I don't think so! */ +- swi(Wimp_GetWindowState, 0, block); +- pos_got = block[7]; +- +- x_offset = block[1] - old[1]; +- y_offset = block[4] - old[4]; +- if (x_offset || y_offset || pos_wanted == -1 || pos_wanted == -2) +- { +- /* If parent has moved, re-open all the child windows. */ +- FOR_ALL_WINDOWS(wp) +- { +- /* Reopen scrollbars for this window. */ +- if (left_bar) +- ro_move_child(wp -> w_scrollbars[SBAR_LEFT].id, +- x_offset, y_offset, +- pos_wanted, pos_got); +- if (right_bar) +- ro_move_child(wp -> w_scrollbars[SBAR_RIGHT].id, +- x_offset, y_offset, +- pos_wanted, pos_got); +- } +- } +- } +- if (changed_mode || toggle_size) +- { +- int width, height; +- +- if (changed_mode) +- ro_measure_tools(); +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- +- width = block[3] - block[1]; +- height = block[4] - block[2]; +- swi(Wimp_ForceRedraw, gui.window_handle, 0, -height, width, 0); +- gui_resize_shell(width, height); +- changed_mode = FALSE; +- } +- } +- +- void +- ro_open_window(block) +- int *block; +- { +- int pos; +- scrollbar_T *sb; +- +- if (block[0] == gui.window_handle) +- ro_open_main(block); +- else +- { +- swi(Wimp_OpenWindow, 0, block); +- if (block[0] != gui.window_handle) +- { +- sb = ro_find_sbar(block[0]); +- if (sb) +- { +- if (sb-> wp != NULL) +- gui_drag_scrollbar(sb, -block[6] / gui.char_height, FALSE); +- else +- gui_drag_scrollbar(sb, block[5] / gui.char_width, FALSE); +- } +- } +- } +- } +- +- void +- ro_menu_selection(block) +- int *block; +- { +- int *item = wimp_menu + 7; +- vimmenu_T *menu; +- /* wimp_menu points to a wimp menu structure */ +- +- for (;;) +- { +- while (block[0]--) +- item += 6; +- if (block[1] == -1) +- break; +- item = ((int *) item[1]) + 7; +- block++; +- } +- /* item points to the wimp menu item structure chosen */ +- menu = (vimmenu_T *) item[5]; +- +- swi(Wimp_GetPointerInfo, 0, block); +- if (block[2] == 1) +- /* Adjust used - keep menu open */ +- swi(Wimp_CreateMenu, 0, wimp_menu); +- +- if (menu-> cb) +- menu-> cb(menu); +- } +- +- void +- ro_open_parent() +- { +- int head; +- char_u *i = curbuf-> b_ffname; +- char_u buffer[256]; +- +- head = 0; +- for (; *i; i++) +- { +- if (*i == '.') +- head = i - curbuf-> b_ffname; +- } +- +- /* Append head chars to buffer */ +- if (head < 240 && curbuf-> b_ffname && head) +- { +- strcpy(buffer, "%filer_opendir "); +- strncpy(buffer + 15, curbuf-> b_ffname, head); +- buffer[15 + head] = '\0'; +- swi(OS_CLI, buffer); +- } +- } +- +- void +- process_event(event, block) +- int event; +- int *block; +- { +- switch (event) +- { +- case 0: /* Nothing - update drag state. */ +- if (ro_dragging) +- ro_continue_drag(block); +- break; +- case 1: /* Redraw window. */ +- redraw_window(block); +- break; +- case 2: /* Open window. */ +- ro_open_window(block); +- break; +- case 3: /* Close window. */ +- swi(Wimp_GetPointerInfo, 0, block + 1); +- if (block[3] == 1) +- ro_open_parent(); +- else +- if (ro_ok_to_quit()) +- ro_quit(); +- break; +- case 6: /* Mouse click. */ +- ro_mouse(block); +- break; +- case 7: /* Finished drag. */ +- ro_drag_finished(block); +- break; +- case 8: /* Key pressed. */ +- ro_insert_key((char_u *) &block[6]); +- break; +- case 9: +- ro_menu_selection(block); +- break; +- case 10: /* Scroll request. */ +- ro_scroll(block); +- break; +- case 11: /* Lose caret. */ +- if (block[0] == gui.window_handle) +- gui_focus_change(FALSE); +- break; +- case 12: /* Gain caret. */ +- if (block[0] == gui.window_handle) +- gui_focus_change(TRUE); +- break; +- case 17: /* User message. */ +- case 18: /* User message recorded. */ +- ro_message(block); +- break; +- } +- } +- +- /* +- * GUI input routine called by gui_wait_for_chars(). Waits for a character +- * from the keyboard. +- * wtime == -1 Wait forever. +- * wtime == 0 This should never happen. +- * wtime > 0 Wait wtime milliseconds for a character. +- * Returns OK if a character was found to be available within the given time, +- * or FAIL otherwise. +- */ +- int +- gui_mch_wait_for_chars(long wtime) +- { +- int block[64]; +- int reason; +- int start_time = -1; +- int ctime = wtime / 10; /* delay in cs */ +- +- if (wtime != -1) +- { +- swi(OS_ReadMonotonicTime); +- start_time = r0; +- } +- +- for (;;) +- { +- if (ro_dragging) +- reason = wimp_poll(0, block); /* Always return immediately */ +- else if (wtime == -1) +- reason = wimp_poll(1, block); +- else +- reason = wimp_pollidle(0, block, start_time + ctime); +- +- process_event(reason, block); +- +- if (input_available() || ro_return_early) +- { +- ro_return_early = FALSE; +- return OK; /* There is something to process (key / menu event) */ +- } +- +- if (wtime != -1) +- { +- swi(OS_ReadMonotonicTime); +- if (r0 - start_time > ctime) +- return FAIL; /* We've been waiting too long - return failure */ +- } +- } +- } +- +- /* Flush any output to the screen */ +- void +- gui_mch_flush(void) +- { +- } +- +- /* +- * Clear a rectangular region of the screen from text pos(row1, col1) to +- * (row2, col2) inclusive. +- */ +- void +- gui_mch_clear_block(int row1, int col1, int row2, int col2) +- { +- swi(ColourTrans_ReturnGCOL, gui.back_pixel << 8, 0, 0, 1<<7, 0); +- plot_rectangle(96 + 5, r0, +- FILL_X(col1), -FILL_Y(row2 + 1), +- FILL_X(col2 + 1), -FILL_Y(row1)); +- } +- +- void +- gui_mch_clear_all(void) +- { +- if (redraw_block) +- { +- swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 1<<7, 0); +- swi(OS_WriteI + 16); +- } +- else +- { +- int block[44]; +- block[0] = gui.window_handle; +- block[1] = 0; +- block[2] = -gui.num_rows * gui.char_height; +- block[3] = gui.num_cols * gui.char_width; +- block[4] = 0; +- swi(Wimp_UpdateWindow, 0, block); +- while (r0) +- { +- swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 1<<7, 0); +- swi(OS_WriteI + 16); +- swi(Wimp_GetRectangle, 0, block); +- } +- } +- } +- +- /* +- * Delete the given number of lines from the given row, scrolling up any +- * text further down within the scroll region. +- */ +- void +- gui_mch_delete_lines(int row, int num_lines) +- { +- int top_from = -row - num_lines; +- int bot_from = -gui.scroll_region_bot - 1; +- int bot_to = bot_from + num_lines; +- +- swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 0x80, 0); +- +- /* Changed without checking! */ +- swi(Wimp_BlockCopy, gui.window_handle, +- gui.scroll_region_left * gui.char_width, +- bot_from * gui.char_height, +- (gui.scroll_region_right - gui.scroll_region_left +- + 1) * gui.char_width, +- top_from * gui.char_height, +- +- gui.scroll_region_left * gui.char_width, +- bot_to * gui.char_height); +- +- gui_clear_block(gui.scroll_region_bot - num_lines + 1, +- gui.scroll_region_left, +- gui.scroll_region_bot, gui.scroll_region_right); +- } +- +- /* +- * Insert the given number of lines before the given row, scrolling down any +- * following text within the scroll region. +- */ +- void +- gui_mch_insert_lines(int row, int num_lines) +- { +- int top_from = -row; +- int bot_to = -gui.scroll_region_bot - 1; +- int bot_from = bot_to + num_lines; +- +- swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 0x80, 0); +- +- swi(Wimp_BlockCopy, gui.window_handle, +- gui.scroll_region_left * gui.char_width, +- bot_from * gui.char_height, +- (gui.scroll_region_right - gui.scroll_region_left +- + 1) * gui.char_width, +- top_from * gui.char_height, +- +- gui.scroll_region_left * gui.char_width, +- bot_to * gui.char_height); +- +- gui_clear_block(row, gui.scroll_region_left, +- row + num_lines - 1, gui.scroll_region_right); +- } +- +- /* Put selection in clipboard buffer. +- * Should we become the new owner? +- */ +- void +- clip_mch_request_selection(VimClipboard *cbd) +- { +- int block[64]; /* Will be used in Wimp_Poll. */ +- int reason; +- char_u *buffer; +- long_u length; +- +- block[0] = 48; /* Size of block. */ +- block[3] = 0; /* Original message. */ +- block[4] = 0x10; /* Data request. */ +- block[5] = gui.window_handle; +- block[6] = RO_LOAD_CLIPBOARD; /* Internal handle. */ +- block[7] = block[8] = 0; /* (x,y) not used. */ +- block[9] = 4; +- block[10] = 0xfff; /* We want text files if possible, I think. */ +- block[11] = -1; /* End of list. */ +- swi(Wimp_SendMessage, 17, block, 0); /* Broadcast request. */ +- +- /* OK, we've sent the request. Poll until we get a null poll (failure) or +- * we load the clipboard. +- * If we receive a DataSave event with icon handle = -2 then put it on the +- * clipboard. RISC OS should ensure that key events will not be delivered +- * until the clipboard operation completes (unless the owner starts idling +- * - we can't wait forever!). +- */ +- for (;;) +- { +- reason = wimp_poll(0, block); +- if (reason == 0) +- return; /* Failed to get clipboard. */ +- if ((reason == 17 || reason == 18) && +- block[4] == 1 && block[6] == RO_LOAD_CLIPBOARD) +- break; /* Got it - stop waiting. */ +- process_event(reason, block); +- if (ro_return_early) +- return; +- } +- /* Tell owner to save data in . */ +- block[0] = 60; +- block[3] = block[2]; /* Copy myref -> yourref */ +- block[4] = 2; /* DataSaveAck. */ +- block[9] = -1; /* Data is unsafe. */ +- strcpy( ((char_u *) block) + 44, ""); +- swi(Wimp_SendMessage, 17, block, block[1]); +- +- /* Wait again for reply. */ +- for (;;) +- { +- reason = wimp_poll(0, block); +- if (reason == 0) +- return; /* Other program has given up! */ +- if ((reason == 17 || reason == 18) && block[4] == 3 && block[6] == RO_LOAD_CLIPBOARD) +- break; /* Clipboard data saved to */ +- process_event(reason, block); +- if (ro_return_early) +- return; +- } +- +- /* contains clipboard - load it. */ +- if (xswi(OS_File, 17, "") & v_flag) +- return; /* Error! */ +- if (r0 != 1 && r0 != 3) +- return; +- length = r4; +- +- buffer = lalloc(length, TRUE); /* Claim memory (and report errors). */ +- if (buffer == NULL) +- return; +- +- if (xswi(OS_File, 16, "", buffer, 0) & v_flag) +- return; +- +- clip_yank_selection(MCHAR, buffer, length, cbd); +- +- vim_free(buffer); +- +- swi(OS_FSControl, 27, "", 0, 0); /* Delete temp file. */ +- +- block[4] = 4; /* Send DataLoadAck. */ +- block[3] = block[2]; /* Copy myref -> yourref. */ +- swi(Wimp_SendMessage, 17, block, block[1]); +- } +- +- /* Not sure what this means under RISC OS. */ +- void +- clip_mch_lose_selection(VimClipboard *cbd) +- { +- } +- +- /* Tell everyone that we now own the clipboard. +- * Return OK if our claim is accepted (always, under RISC OS) +- */ +- int +- clip_mch_own_selection(VimClipboard *cbd) +- { +- int block[6]; +- block[0] = 24; /* Length of block. */ +- block[3] = 0; /* Original message. */ +- block[4] = 0xf; /* ClaimEntity. */ +- block[5] = 0x4; /* Claim clipboard only. */ +- swi(Wimp_SendMessage, 17, block, 0); +- return OK; +- } +- +- /* +- * Send the current selection to the clipboard. Do nothing for X because we +- * will fill in the selection only when requested by another app. Sounds good +- * for RISC OS too. +- */ +- void +- clip_mch_set_selection(VimClipboard *cbd) +- { +- clip_get_selection(cbd); +- } +- +- /* +- * Make a menu either grey or not grey. +- */ +- void +- gui_mch_menu_grey(vimmenu_T *menu, int grey) +- { +- menu-> greyed_out = grey; +- } +- +- /* +- * Make menu item hidden or not hidden +- */ +- void +- gui_mch_menu_hidden(vimmenu_T *menu, int hidden) +- { +- menu-> hidden = hidden; +- } +- +- /* +- * This is called after setting all the menus to grey/hidden or not. +- */ +- void +- gui_mch_draw_menubar(void) +- { +- swi(Wimp_CreateMenu, 0, -1); +- if (wimp_menu != (int *) -1) +- { +- ro_remove_menu(wimp_menu); +- wimp_menu = (int *) -1; +- } +- } +- +- /* Add or remove a scrollbar. Note that this is only called when +- * the scrollbar state is changing. +- * The scroll bar window has already been created. +- * We can't do anything except remove the scroll bar +- * until we know what size to use. +- */ +- void +- gui_mch_enable_scrollbar(sb, flag) +- scrollbar_T *sb; +- int flag; +- { +- if (!flag) +- swi(Wimp_CloseWindow, 0, & (sb->id) ); +- return; +- } +- +- void +- gui_mch_set_blinking(long waittime, long on, long off) +- { +- } +- +- /* +- * Stop the cursor blinking. Show the cursor if it wasn't shown. +- */ +- void +- gui_mch_stop_blink(void) +- { +- } +- +- /* +- * Start the cursor blinking. If it was already blinking, this restarts the +- * waiting time and shows the cursor. +- */ +- void +- gui_mch_start_blink(void) +- { +- } +- +- /* +- * Return the RGB value of a pixel as a long. +- */ +- long_u +- gui_mch_get_rgb(guicolor_T pixel) +- { +- return (long_u)pixel; +- } +- +- void +- gui_mch_set_text_area_pos(int x, int y, int w, int h) +- { +- } +- +- void +- gui_mch_enable_menu(int flag) +- { +- } +- +- void +- gui_mch_set_menu_pos(int x, int y, int w, int h) +- { +- } +- +- void +- gui_mch_add_menu(vimmenu_T *menu, int idx) +- { +- } +- +- void +- gui_mch_add_menu_item(vimmenu_T *menu, int idx) +- { +- } +- +- void +- gui_mch_new_menu_colors(void) +- { +- } +- +- void +- gui_mch_destroy_menu(vimmenu_T *menu) +- { +- } +- +- /* Size of buffer has changed. +- * Add one to max since gui.c subtracts one more than it should! +- */ +- void +- gui_mch_set_scrollbar_thumb(sb, val, size, max) +- scrollbar_T *sb; +- long val; +- long size; +- long max; +- { +- int block[10], width, height; +- +- width = (max + 1) * gui.char_width; +- height = (max + 1 + W_STATUS_HEIGHT(sb->wp)) * gui.char_height; +- +- block[0] = block[3] = 0; +- block[1] = -height + (1 << y_eigen_factor); +- block[2] = width; +- +- swi(Wimp_SetExtent, sb -> id, block); +- +- block[0] = sb -> id; +- swi(Wimp_GetWindowState, 0, block); +- block[5] = val * gui.char_width; +- block[6] = -val * gui.char_height; +- swi(Wimp_OpenWindow, 0, block, 0x4b534154, +- gui.window_handle, /* Parent window handle. */ +- (CHILD_FIX_TO_RIGHT << CHILD_LEFT ) | +- (CHILD_FIX_TO_RIGHT << CHILD_RIGHT ) | +- (CHILD_FIX_TO_BOTTOM << CHILD_TOP ) | +- (CHILD_FIX_TO_BOTTOM << CHILD_BOTTOM) | +- (CHILD_SELF_SCROLL << CHILD_SCROLL_X) | +- (CHILD_SELF_SCROLL << CHILD_SCROLL_Y) +- ); +- } +- +- /* Set the position of the scrollbar within the editor +- * window. Note that, for vertical scrollbars, x and w +- * are ignored. For horizontal bars y and h are ignored. +- */ +- void +- gui_mch_set_scrollbar_pos(sb, x, y, w, h) +- scrollbar_T *sb; +- int x; /* Horizontal sb position */ +- int y; /* Top of scroll bar */ +- int w; /* Width */ +- int h; /* Height */ +- { +- int block[24]; +- int px1, py1; /* Parent window min coords */ +- int px2, py2; /* Parent window max coords */ +- +- /* Find where the parent window is. */ +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- px1 = block[1]; +- py1 = block[2]; +- px2 = block[3]; +- py2 = block[4]; +- +- block[0] = sb -> id; +- +- /* Find out how big the scroll window is at the moment. */ +- swi(Wimp_GetWindowInfo, 0, ((char_u *)block) + 1); +- +- if (block[13] < w || block[12] > -h) +- { +- /* Current window is too small! */ +- if (block[12] > -h) +- block[12] = -h; +- if (block[13] < w) +- block[13] = w; +- swi(Wimp_SetExtent, block[0], block + 11); +- } +- +- /* This works better on the nested_wimp. */ +- if (sb-> wp) +- { +- /* This is a vertical scrollbar. */ +- block[1] = block[3] = px2 - gui.scrollbar_width + (1 << x_eigen_factor); +- block[2] = 1 + py2 - (y + h) + (1 << y_eigen_factor); +- block[4] = 1 + py2 - y; +- } +- else +- { +- /* This is a horizontal scrollbar. */ +- block[2] = block[4] = py1 + gui.scrollbar_height; +- block[1] = px1; +- block[3] = px2 - gui.scrollbar_width; +- } +- +- block[5] = 0; +- block[6] = 0; +- block[7] = -1; +- +- swi(Wimp_OpenWindow, 0, block, 0x4b534154, +- gui.window_handle, /* Parent window handle. */ +- (CHILD_FIX_TO_RIGHT << CHILD_LEFT ) | +- (CHILD_FIX_TO_RIGHT << CHILD_RIGHT ) | +- (CHILD_FIX_TO_BOTTOM << CHILD_TOP ) | +- (CHILD_FIX_TO_BOTTOM << CHILD_BOTTOM) | +- (CHILD_SELF_SCROLL << CHILD_SCROLL_X) | +- (CHILD_SELF_SCROLL << CHILD_SCROLL_Y) +- ); +- } +- +- /* Create a window with no workarea to place inside editor window. +- * (what happens without the nested wimp?) +- * Data for scrollbar is invalid. +- */ +- void +- gui_mch_create_scrollbar(sb, orient) +- scrollbar_T *sb; +- int orient; /* orient is SBAR_HORIZ or SBAR_VERT */ +- { +- int bar[] = +- { +- 0, 0, /* Visible area : min X,Y */ +- 100, 100, /* max X,Y */ +- 0, 0, /* Scroll offsets */ +- -1, /* Window in front */ +- 0x80800150 | (orient == SBAR_HORIZ ? (1 << 30) : (1 << 28)), +- 0xff070207, /* Colours */ +- 0x000c0103, /* More colours */ +- 0, -0x4000, /* Workarea extent */ +- 0x4000, 0, /* max X,Y */ +- 0x00000000, /* No title */ +- 0 << 12, /* No workarea button type */ +- 1, /* Wimp sprite area */ +- 0x00010001, /* Minimum width, height */ +- 0, 0, 0, /* Title data (none) */ +- 0 /* No icons */ +- }; +- swi(Wimp_CreateWindow, 0, bar); +- sb -> id = r0; +- } +- +- #if defined(FEAT_WINDOWS) || defined(PROTO) +- void +- gui_mch_destroy_scrollbar(scrollbar_T *sb) +- { +- swi(Wimp_DeleteWindow, 0, & (sb->id)); +- sb -> id = -1; +- } +- #endif +- +- void +- gui_mch_set_scrollbar_colors(scrollbar_T *sb) +- { +- /* Always use default RO colour scheme. */ +- } +- +- /* +- * Get current mouse coordinates in text window. +- * Note: (0,0) is the bottom left corner, positive y is UP. +- */ +- void +- gui_mch_getmouse(x, y) +- int *x; +- int *y; +- { +- int left; +- int top; +- int block[10]; +- +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- left = block[1]; +- top = block[4]; +- +- swi(Wimp_GetPointerInfo, 0, block); +- *x = block[0] - left; +- *y = top - block[1]; +- } +- +- /* MouseTo(x, y) */ +- void +- gui_mch_setmouse(x, y) +- int x; +- int y; +- { +- } +- +- void +- gui_mch_toggle_tearoffs(enable) +- int enable; +- { +- /* no tearoff menus */ +- } +- +- /* Redraw a window's title. +- * For the nested wimp we use the new 'redraw-title-bar' reason code. +- * For older wimps we mark the area of the screen where the title bar +- * is as invalid. +- */ +- void +- ro_redraw_title(window) +- int window; +- { +- if (nested_wimp) +- { +- swi(Wimp_ForceRedraw, window, 0x4b534154, 3); +- } +- else +- { +- int block[10]; +- int miny; +- +- block[0] = window; +- swi(Wimp_GetWindowState, 0, block); +- miny = block[4]; +- swi(Wimp_GetWindowOutline, 0, block); +- swi(Wimp_ForceRedraw, -1, +- block[1], miny, +- block[3], block[4]); +- } +- } +- +- /* Turn a vimmenu_T structure into a wimp menu structure. +- * -1 if resulting menu is empty. +- * Only the children and dname items in the root menu are used. +- */ +- int * +- ro_build_menu(menu) +- vimmenu_T *menu; +- { +- int *wimp_menu; +- int width = 4; +- int w; +- int size = 28; +- vimmenu_T *item; +- int *wimp_item; +- +- /* Find out how big the menu is so we can allocate memory for it */ +- for (item = menu-> children; item; item = item-> next) +- { +- if (item-> hidden == FALSE && !menu_is_separator(item->name)) +- size += 24; +- } +- +- if (size <= 28) +- return (int *) -1; /* No children - shouldn't happen */ +- +- wimp_menu = (int *) alloc(size); +- +- wimp_menu[0] = (int) menu-> dname; +- wimp_menu[1] = -1; +- wimp_menu[2] = 0; +- wimp_menu[3] = 0x00070207; +- wimp_menu[5] = 44; +- wimp_menu[6] = 0; +- +- wimp_item = wimp_menu + 7; +- +- for (item = menu-> children; item; item = item-> next) +- { +- if (menu_is_separator(item-> name)) +- { +- /* This menu entry is actually a separator. If it is not the first +- * menu entry then mark the previous menu item as needing a dotted +- * line after it. +- */ +- if (wimp_item > wimp_menu + 7) +- wimp_item[-6] |= 0x2; +- } +- else if (item-> hidden == FALSE) +- { +- wimp_item[0] = 0; +- wimp_item[1] = item-> children ? (int) ro_build_menu(item) : -1; +- wimp_item[2] = 0x07009131 | (item-> greyed_out << 22); +- wimp_item[3] = (int) item-> dname; +- wimp_item[4] = -1; +- wimp_item[5] = (int) item; /* Stuff the menu address in this unused space */ +- +- w = strlen(item-> dname) + 1; +- if (w > width) +- width = w; +- wimp_item += 6; +- } +- } +- +- wimp_menu[4] = (width + 2) * 16; +- wimp_menu[7] |= 0x100; /* Menu title is indirected */ +- wimp_item[-6] |= 0x080; /* Last entry in menu */ +- return wimp_menu; +- } +- +- static void +- ro_remove_menu(menu) +- int *menu; +- { +- int *item = menu + 7; +- +- if (menu == NULL || menu == (int *) -1) +- return; +- +- for (;;) +- { +- if (item[1] != -1) +- ro_remove_menu((int *) item[1]); /* Remove sub-menu */ +- if (item[0] & 0x80) +- break; /* This was the last entry */ +- item += 6; +- } +- vim_free(menu); +- } +- +- void +- gui_mch_show_popupmenu(menu) +- vimmenu_T *menu; +- { +- int block[10]; +- +- /* Remove the existing menu, if any */ +- if (wimp_menu != (int *) -1) +- { +- swi(Wimp_CreateMenu, 0, -1); +- ro_remove_menu(wimp_menu); +- wimp_menu = (int *) -1; +- } +- +- wimp_menu = ro_build_menu(menu); +- if (wimp_menu != (int *) -1) +- { +- swi(Wimp_GetPointerInfo, 0, block); +- swi(Wimp_CreateMenu, 0, wimp_menu, block[0] - 64, block[1] + 64); +- } +- } +- +- /* Run a command using the TaskWindow module. +- * If SHELL_FILTER is set then output is not echoed to the screen, +- * If it is not set, then \r is not sent to the output file. +- */ +- int +- gui_mch_call_shell(cmd, options) +- char_u *cmd; +- int options; /* SHELL_FILTER if called by do_filter() */ +- /* SHELL_COOKED if term needs cooked mode */ +- { +- char_u task_cmd[256]; /* Contains *TaskWindow command. */ +- int block[64]; +- int reason; +- char_u *out; +- char_u c; +- int old_msg_col; +- char_u *out_redir; +- int length; +- FILE *out_file = NULL; +- +- out_redir = strstr(cmd, " > "); +- if (out_redir == NULL) +- length = strlen(cmd); /* No redirection. */ +- else +- { +- length = out_redir - cmd; +- out_file = fopen(out_redir + 3, "wb"); +- if (out_file == NULL) +- smsg("WARNING : Can't open file %s for writing\n", out_redir + 3); +- } +- +- if (length > 180) +- { +- if (out_file) +- fclose(out_file); +- return FAIL; /* Command too long. */ +- } +- +- strcpy(task_cmd, "TaskWindow \""); +- strncpy(task_cmd + 12, cmd, length); +- sprintf(task_cmd + 12 + length, +- "\" -task &%08x -ctrl -quit -name \"Vim command\"", +- task_handle); +- +- if (options & SHELL_COOKED) +- settmode(TMODE_COOK); +- +- if (xswi(Wimp_StartTask, task_cmd) & v_flag) +- { +- /* Failed to even start a new task (out of memory?) */ +- settmode(TMODE_RAW); +- if (out_file) +- fclose(out_file); +- return FAIL; +- } +- +- /* Wait for the child process to initialise. */ +- child_handle = 0; +- while (!child_handle) +- { +- reason = wimp_poll(0, block); +- if ((reason == 17 || reason == 18) && block[4] == 0x808c2) +- child_handle = block[1]; +- else +- process_event(reason, block); +- } +- +- /* Block until finished */ +- while (child_handle) +- { +- reason = wimp_poll(1, block); +- if (reason == 3 || (reason == 8 && block[6] == 3)) +- { +- /* Close window request or CTRL-C - kill child task. */ +- block[0] = 20; +- block[3] = 0; +- block[4] = 0x808c4; /* Morite */ +- swi(Wimp_SendMessage, 17, block, child_handle); +- MSG_PUTS(_("\nSending message to terminate child process.\n")); +- continue; +- } +- else if (reason == 8) +- { +- block[0] = 28; +- block[3] = 0; +- block[4] = 0x808c0; /* Input */ +- block[5] = 1; +- /* Block[6] is OK as it is! */ +- swi(Wimp_SendMessage, 17, block, child_handle); +- continue; +- } +- else if (reason == 17 || reason == 18) +- { +- if (block[4] == 0x808c1) +- { +- /* Ack message. */ +- block[3] = block[2]; +- swi(Wimp_SendMessage, 19, block, block[1]); +- out = (char_u *)block + 24; +- old_msg_col = msg_col; +- while (block[5]--) +- { +- c = *out++; +- if (out_file && (c != '\r' || (options & SHELL_FILTER))) +- fputc(c, out_file); +- if ((options & SHELL_FILTER) == 0) +- { +- if (c == 127) +- msg_puts("\b \b"); +- else if (c > 31) +- msg_putchar(c); +- else if (c == 10) +- { +- lines_left = 8; /* Don't do More prompt! */ +- msg_putchar(10); +- } +- } +- } +- /* Flush output to the screen. */ +- windgoto(msg_row, msg_col); +- out_flush(); +- continue; +- } +- } +- process_event(reason, block); +- } +- msg_putchar('\n'); +- settmode(TMODE_RAW); +- if (out_file) +- fclose(out_file); +- return OK; +- } +- +- /* Like strsave(), but stops at any control char */ +- char_u * +- wimp_strsave(str) +- char *str; +- { +- int strlen = 0; +- char_u *retval; +- while (str[strlen] > 31) +- strlen++; +- retval = alloc(strlen + 1); +- if (retval) +- { +- memcpy(retval, str, strlen); +- retval[strlen] = '\0'; +- } +- return retval; +- } +- +- /* If we are saving then pop up a standard RISC OS save box. +- * Otherwise, open a directory viewer on the given directory (and return NULL) +- * The string we return will be freed later. +- */ +- char_u * +- gui_mch_browse(saving, title, dflt, ext, initdir, filter) +- int saving; /* write action */ +- char_u *title; /* title for the window */ +- char_u *dflt; /* default file name */ +- char_u *ext; /* extension added */ +- char_u *initdir; /* initial directory, NULL for current dir */ +- char_u *filter; /* file name filter */ +- { +- char command[256]; +- int length; +- +- if (saving) +- { +- int block[64]; +- int reason; +- int done_save = FALSE; +- char_u *retval = NULL; +- char_u *sprname; +- char_u *fname; +- int dragging_icon = FALSE; +- int filetype; +- +- if (!dflt) +- dflt = "TextFile"; +- +- block[0] = save_window; +- block[1] = 0; +- swi(Wimp_GetIconState, 0, block); +- sprname = ((char_u *) block[7]); +- block[1] = 1; +- swi(Wimp_GetIconState, 0, block); +- fname = ((char *) block[7]); +- strncpy(fname, dflt, 255); +- +- if (xswi(OS_FSControl, 31, curbuf->b_p_oft) & v_flag) +- { +- filetype = 0xfff; +- strcpy(sprname + 5, "xxx"); +- } +- else +- { +- filetype = r2; +- sprintf(sprname + 5, "%03x", filetype); +- } +- +- /* Open the save box */ +- +- swi(Wimp_GetPointerInfo, 0, block); +- swi(Wimp_CreateMenu, 0, save_window, block[0] - 64, block[1] + 64); +- swi(Wimp_SetCaretPosition, save_window, 1, 0, 0, -1, -1); +- +- while (!done_save) +- { +- reason = wimp_poll(1, block); +- switch (reason) +- { +- case 1: +- redraw_window(block); +- break; +- case 2: +- if (block[0] == save_window) +- swi(Wimp_OpenWindow, 0, block); +- else +- ro_open_window(block); +- break; +- case 3: +- done_save = TRUE; +- break; +- case 6: +- if (block[3] != save_window) +- done_save = TRUE; +- else +- { +- int drag_box[4]; +- int min_x, max_y; +- +- switch (block[4]) +- { +- case 0: /* Start drag */ +- block[0] = save_window; +- swi(Wimp_GetWindowState, 0, block); +- min_x = block[1]; +- max_y = block[4]; +- block[1] = 0; +- swi(Wimp_GetIconState, 0, block); +- drag_box[0] = block[2] + min_x; +- drag_box[1] = block[3] + max_y; +- drag_box[2] = block[4] + min_x; +- drag_box[3] = block[5] + max_y; +- +- swi(DragASprite_Start, +- 0x45, +- 1, +- sprname, +- drag_box); +- dragging_icon = TRUE; +- break; +- case 2: /* OK */ +- retval = wimp_strsave(fname); +- done_save = TRUE; +- break; +- case 3: /* Cancel */ +- done_save = TRUE; +- break; +- } +- } +- break; +- case 7: +- if (dragging_icon) +- { +- int len = 0; +- +- dragging_icon = FALSE; +- swi(Wimp_GetPointerInfo, 0, block); +- block[5] = block[3]; +- block[6] = block[4]; +- block[7] = block[0]; +- block[8] = block[1]; +- block[9] = 0; /* Don't know the size */ +- block[10] = filetype; +- +- while (fname[len] > 31) +- { +- if (fname[len] == '.') +- { +- fname += len + 1; +- len = 0; +- } +- else +- len++; +- } +- if (len > 211) +- len = 211; +- +- memcpy(((char_u *) block) + 44, fname, len); +- ((char_u *)block)[44 + len] = '\0'; +- +- block[0] = (len + 48) & 0xfc; +- block[3] = 0; +- block[4] = 1; /* DataSave */ +- +- swi(Wimp_SendMessage, 17, block, block[5], block[6]); +- } +- else +- ro_drag_finished(block); +- break; +- case 8: +- if (block[6] == 13) +- { +- retval = wimp_strsave(fname); +- done_save = TRUE; +- } +- else if (block[6] == 0x1b) +- done_save = TRUE; +- else +- swi(Wimp_ProcessKey, block[6]); +- break; +- case 17: +- case 18: +- if (block[4] == 2 && block[9] != -1) +- { +- /* DataSaveAck from dragging icon. */ +- retval = wimp_strsave(((char_u *) block) + 44); +- done_save = TRUE; +- } +- else if (block[4] == 0x400c9) +- { +- /* MenusDeleted */ +- done_save = TRUE; +- } +- else +- ro_message(block); +- break; +- } +- } +- block[0] = save_window; +- swi(Wimp_CloseWindow, 0, block); +- swi(Wimp_GetCaretPosition, 0, block); +- if (block[0] == -1) +- swi(Wimp_SetCaretPosition, gui.window_handle, -1, 0, 0, -1, -1); +- +- return retval; +- } +- else if (initdir) +- { +- /* Open a directory viewer */ +- length = strlen(initdir); +- +- if (length > 240) +- return NULL; /* Path too long! */ +- +- length = sprintf(command, "Filer_OpenDir %s", initdir); +- while (command[length - 1] == '.') +- length--; +- command[length] = '\0'; +- swi(OS_CLI, command); +- } +- return NULL; +- } +--- 0 ---- +*** ../vim-7.3.186/src/os_riscos.c 2010-08-15 21:57:27.000000000 +0200 +--- src/os_riscos.c 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,1292 **** +- /* vi:set ts=8 sts=4 sw=4: +- * +- * VIM - Vi IMproved by Bram Moolenaar +- * +- * Do ":help uganda" in Vim to read copying and usage conditions. +- * Do ":help credits" in Vim to see a list of people who contributed. +- * See README.txt for an overview of the Vim source code. +- */ +- +- #include "vim.h" +- +- /* +- * os_riscos.c +- * +- * Thomas Leonard +- */ +- +- const char *__dynamic_da_name = "Vim heap"; /* Enable and name our dynamic area */ +- int ro_line_mode = TRUE; /* For Ex mode we much echo chars to the screen ourselves */ +- int windowed; /* Flag - are we running inside a text window? */ +- int WinLeft, WinTop; /* We might be started inside a text window */ +- int ScrollTop; /* Make cursor movements relative to ScrollTop. */ +- +- int old_escape_state = -1; +- int old_cursor_state = -1; +- +- #define rgb(r,g,b) ((b<<24) + (g<<16) + (r<<8)) +- #define NORMAL_FG 0x00000000 +- #define NORMAL_BG 0xffffffff +- +- /* Convert a DOS colour number to an RGB palette entry. +- * Mappings from X11 rgb/txt file. +- */ +- static int +- map_colour(dos) +- int dos; /* Standard DOS colour number. */ +- { +- switch (dos) +- { +- case 0: return 0; /* Black */ +- case 1: return rgb(0,0,139); /* DarkBlue */ +- case 2: return rgb(0,100,0); /* DarkGreen */ +- case 3: return rgb(0,139,139); /* DarkCyan */ +- case 4: return rgb(139,0,0); /* DarkRed */ +- case 5: return rgb(139,0,139); /* DarkMagenta */ +- case 6: return rgb(165,42,42); /* Brown, DarkYellow */ +- case 7: return rgb(211,211,211); /* LightGray, LightGrey, Gray, Grey */ +- case 8: return rgb(169,169,169); /* DarkGray, DarkGrey */ +- case 9: return rgb(173,216,230); /* Blue, LightBlue */ +- case 10: return rgb(144,238,144); /* Green, LightGreen */ +- case 11: return rgb(224,255,255); /* Cyan, LightCyan */ +- case 12: return rgb(255,0,0); /* Red, LightRed */ +- case 13: return rgb(255,0,255); /* Magenta, LightMagenta */ +- case 14: return rgb(255,255,0); /* Yellow, LightYellow */ +- case 15: return rgb(255,255,255); /* White */ +- } +- return rgb(100,100,100); +- } +- +- static void +- text_fg(fg) +- int fg; /* Foregound colour in the form &BBGGRR00 */ +- { +- xswi(ColourTrans_SetTextColour, fg, 0, 0, 0); +- } +- +- static void +- text_bg(bg) +- int bg; /* Backgound colour in the form &BBGGRR00 */ +- { +- xswi(ColourTrans_SetTextColour, bg, 0, 0, 1 << 7); +- } +- +- #define OUT_NORMAL 0 +- #define OUT_NUMBER 1 /* Reading in a number */ +- +- void +- mch_write(s, len) +- char_u *s; +- int len; +- { +- static int mode = OUT_NORMAL; +- static int x, y; /* For reading numbers in. */ +- +- if (!term_console) +- { +- /* Maybe we are running Vim remotely - don't interpret chars */ +- while (len--) +- { +- char_u c = *s++; +- swi(OS_WriteC, c); +- /* We might need to send a CR too. This shouldn't +- * hurt if we don't need it, should it? +- */ +- if (c == 10) +- swi(OS_WriteI + 13); +- } +- return; +- } +- +- while (len--) +- { +- char_u c = *s++; +- switch (mode) +- { +- case OUT_NUMBER: +- if (c < '0' || c > '9') +- { +- mode = OUT_NORMAL; +- } +- else +- { +- x = (x * 10) + c - '0'; +- continue; +- } +- /* note: no break here! */ +- +- case OUT_NORMAL: +- switch (c) +- { +- case 1: +- /* Number (in decimal) follows. */ +- mode = OUT_NUMBER; +- y = x; +- x = 0; +- break; +- case 2: +- /* Position cursor. */ +- swi(OS_WriteI + 31); +- swi(OS_WriteC, x); +- swi(OS_WriteC, y - ScrollTop); +- break; +- case 3: +- /* Set scroll region. */ +- if (x == Rows -1 && y == 0 && !windowed) +- { +- /* Whole screen - remove text window. +- * This is MUCH faster. +- */ +- swi(OS_WriteI + 26); +- } +- else +- { +- /* Create a text window. */ +- swi(OS_WriteI + 28); +- swi(OS_WriteC, WinLeft); +- swi(OS_WriteC, WinTop + x); +- swi(OS_WriteC, WinLeft + Columns - 1); +- swi(OS_WriteC, WinTop + y); +- } +- ScrollTop = y; +- break; +- case 4: +- /* Normal mode. */ +- text_fg(NORMAL_FG); +- text_bg(NORMAL_BG); +- break; +- case 5: +- /* Reverse mode. */ +- text_fg(NORMAL_BG); +- text_bg(NORMAL_FG); +- break; +- case 10: +- swi(OS_NewLine); +- break; +- case 14: +- /* Cursor invisible. */ +- swi(OS_WriteN, +- "\027\001\000\000\000\000\000\000\000\000", +- 10); +- break; +- case 15: +- /* Cursor visible. */ +- swi(OS_WriteN, +- "\027\001\002\000\000\000\000\000\000\000", +- 10); +- break; +- case 16: +- /* Cursor very visible (flash) */ +- swi(OS_WriteN, +- "\027\001\003\000\000\000\000\000\000\000", +- 10); +- case 17: +- /* Set foreground colour. */ +- text_fg(map_colour(x)); +- break; +- case 18: +- /* Set background colour. */ +- text_bg(map_colour(x)); +- break; +- case 19: +- /* Scroll text down. */ +- swi(OS_WriteN, +- "\027\007\000\002\000\000\000\000\000\000", +- 10); +- break; +- default: +- swi(OS_WriteC, c); +- } +- continue; +- +- default: +- printf("[output error]"); +- mode = OUT_NORMAL; +- } +- } +- } +- +- /* +- * mch_inchar(): low level input funcion. +- * Get a characters from the keyboard. +- * Return the number of characters that are available. +- * If wtime == 0 do not wait for characters. +- * If wtime == n wait n msecs for characters. +- * If wtime == -1 wait forever for characters. +- * +- * TODO: call convert_input() for 'fileencoding' to 'encoding' conversion. +- */ +- int +- mch_inchar(buf, maxlen, wtime, tb_change_cnt) +- char_u *buf; +- int maxlen; +- long wtime; +- int tb_change_cnt; +- { +- int got=0; +- unsigned int start_time = clock(); +- +- if (ro_line_mode) +- { +- /* We're probably in Ex mode - get whole lines at a time. */ +- +- static char_u line_buffer[256]; +- static int remaining_chars = 0; +- static int buf_pos = 0; +- +- /* Do we need to fetch another line? */ +- if (remaining_chars == 0) +- { +- int old_esc_state; +- swi(OS_Byte, 200, 1, 0xfe); +- old_esc_state = r1; +- +- buf_pos = 0; +- if (xswi(OS_ReadLine, line_buffer, 255, 0, 255) & (c_flag | v_flag)) +- { +- got_int = TRUE; /* ESC pressed */ +- r1 = 0; +- } +- line_buffer[r1] = 13; +- remaining_chars = r1 + 1; /* Count CR as part of input */ +- +- swi(OS_Byte, 200, old_esc_state, 0); +- } +- +- /* Can we send the rest of the buffer back in one go? */ +- if (remaining_chars <= maxlen) +- { +- int got = remaining_chars; +- +- memcpy(buf, line_buffer + buf_pos, got); +- remaining_chars = 0; +- return got; +- } +- +- /* Send as much as we can */ +- memcpy(buf, line_buffer + buf_pos, maxlen); +- buf_pos += maxlen; +- remaining_chars -= maxlen; +- +- return maxlen; +- } +- +- if (!term_console) +- { +- /* Use OS_ReadC for all input. +- * Avoids problems with remote access getting interference from +- * the keyboard. +- */ +- if (wtime == 0) +- return 0; /* Ignore quick key checks */ +- +- if (xswi(OS_ReadC) & c_flag) +- { +- got_int = TRUE; /* ESC pressed - can this happen? */ +- swi(OS_Byte, 124); /* Clear Escape state */ +- r0 = 0x1b; /* It *might* not have been Escape! */ +- } +- buf[0] = r0; +- return 1; +- } +- +- /* +- * OK, here's the plan: +- * +- * 1) Wait until wtime expires or we get a key +- * 2) Get keys until the keyboard buffer is empty or buf is full +- */ +- +- while (xswi(OS_Byte,145,0) & c_flag) +- { +- /* Nothing at all in the keyboard buffer. +- * Has our time expired yet? +- */ +- if ( (wtime != -1) && (clock() - start_time) >= wtime ) +- return 0; /* Nothing read - giving up */ +- } +- +- /* We've got one char (in r2) - are there any more? */ +- +- while (got < maxlen) +- { +- buf[got++] = r2; +- +- if (xswi(OS_Byte,145,0) & c_flag) +- return got; /* Keyboard buffer empty */ +- } +- return got; /* buf is full */ +- } +- +- /* +- * return non-zero if a character is available +- */ +- int +- mch_char_avail() +- { +- if (!term_console) +- return 0; /* Can't tell */ +- if (xswi(OS_Byte, 152, 0) & c_flag) +- return 0; +- return 1; +- } +- +- /* Find out how much free memory we have. +- * I don't know how to work this out exactly but, since we can claim +- * more memory from the OS, let's just report the free pool size. +- * Dynamic area 6 doesn't exist pre 3.6 according to StrongHelp, so +- * we'll use Wimp_SlotSize. If that fails (outside the desktop?) +- * then just return a big number and hope. +- */ +- long_u +- mch_avail_mem(special) +- int special; +- { +- if (xswi(Wimp_SlotSize, -1, -1) & v_flag) +- return 0x7fffffff; +- return r2; +- } +- +- void +- mch_delay(msec, ignoreinput) +- long msec; +- int ignoreinput; +- { +- int start_time, time_now; +- int csec = msec / 10; +- +- swi(OS_ReadMonotonicTime); +- start_time = r0; +- +- for (;;) +- { +- swi(OS_ReadMonotonicTime); +- time_now = r0; +- if (time_now - start_time > csec) +- return; +- #ifdef FEAT_GUI +- /* In the GUI, allow other programs to run while waiting. */ +- if (gui.in_use) +- gui_mch_wait_for_chars(start_time + csec); +- #endif +- } +- } +- +- /* +- * If the machine has job control, use it to suspend the program, +- * otherwise fake it by starting a new shell. +- */ +- void +- mch_suspend() +- { +- suspend_shell(); +- } +- +- void +- mch_init() +- { +- /* +- * Read window size first. Calls to mch_get_shellsize() will +- * simply return these values in future so that setting the +- * text window (used for scrolling) won't give strange results. +- */ +- +- int buf[7] = {132, 135, 256, 257, 1, 2, -1}; +- +- /* Command windows are no longer forced open, since if we are +- * in the desktop then we'll use the GUI version. +- * Opening a command window here messes up the GUI version startup +- */ +- #ifndef FEAT_GUI +- swi(OS_WriteI); +- #endif +- swi(OS_ReadVduVariables, buf, buf); +- WinLeft = buf[0]; +- WinTop = buf[1]; +- Columns = buf[2]; +- Rows = buf[3] + 1; /* Seems to be one off (VduVars wrong?) */ +- ScrollTop = 0; +- +- /* Are we running in a textwindow? */ +- if (Rows == buf[5] + 1 && Columns == buf[4] + 1) +- windowed = 0; +- else +- windowed = 1; +- +- /* Choose a nice colour scheme. */ +- text_fg(NORMAL_FG); +- text_bg(NORMAL_BG); +- } +- +- /* +- * Check_win checks whether we have an interactive stdout. +- */ +- /* ARGSUSED */ +- int +- mch_check_win(argc, argv) +- int argc; +- char **argv; +- { +- return OK; +- } +- +- /* +- * Return TRUE if the input comes from a terminal, FALSE otherwise. +- */ +- int +- mch_input_isatty() +- { +- if (xswi(OS_ChangeRedirection, -1, -1) & v_flag) +- return TRUE; /* Error - TRUE is probably correct though */ +- if (r0 == 0) +- return TRUE; +- return FALSE; +- } +- +- #ifdef FEAT_TITLE +- int +- mch_can_restore_title() +- { +- return FALSE; +- } +- +- int +- mch_can_restore_icon() +- { +- return FALSE; +- } +- +- +- /* +- * Set the window title and icon. +- */ +- void +- mch_settitle(title, icon) +- char_u *title; +- char_u *icon; +- { +- if (title == NULL) +- title = (char_u *) ""; +- #ifdef FEAT_GUI +- if (gui.in_use && strcmp(title, gui.window_title)) +- { +- int length; +- length = strlen(title); +- if (length >= gui.window_title_size) +- length = gui.window_title_size - 1; +- strncpy(gui.window_title, title, length); +- gui.window_title[length] = 0; +- ro_redraw_title(gui.window_handle); +- } +- #endif +- return; +- } +- +- /* +- * Restore the window/icon title. +- * "which" is one of: +- * 1 only restore title +- * 2 only restore icon +- * 3 restore title and icon +- */ +- void +- mch_restore_title(which) +- int which; +- { +- return; +- } +- #endif +- +- /* +- * Insert user name in s[len]. +- * Return OK if a name found. +- */ +- int +- mch_get_user_name(s, len) +- char_u *s; +- int len; +- { +- /* RISC OS doesn't support user names. */ +- *s = NUL; +- return FAIL; +- } +- +- /* +- * Insert host name in s[len]. +- */ +- +- void +- mch_get_host_name(s, len) +- char_u *s; +- int len; +- { +- if (xswi(OS_ReadVarVal, "Machine$Name", s, len, 0, 3) & v_flag) +- { +- /* Variable does not exist (normal operation) */ +- vim_strncpy(s, "(unknown)", len - 1); +- } +- } +- +- /* +- * return process ID +- */ +- long +- mch_get_pid() +- { +- if (xswi(Wimp_ReadSysInfo, 5) & v_flag) +- return 0; +- return r0; +- } +- +- /* +- * Get name of current directory into buffer 'buf' of length 'len' bytes. +- * Return OK for success, FAIL for failure. +- */ +- int +- mch_dirname(buf, len) +- char_u *buf; +- int len; +- { +- if (xswi(OS_FSControl, 37, "@", buf, 0, 0, len) & v_flag) +- return FAIL; +- return OK; +- } +- +- /* +- * Get absolute file name into buffer 'buf' of length 'len' bytes. +- * +- * return FAIL for failure, OK for success +- */ +- int +- mch_FullName(fname, buf, len, force) +- char_u *fname, *buf; +- int len; +- int force; /* Also expand when already absolute path name. +- * Not used under RISC OS. +- */ +- { +- if (xswi(OS_FSControl, 37, fname, buf, 0, 0, len) & v_flag) +- return FAIL; +- return OK; +- } +- +- /* +- * Return TRUE if "fname" does not depend on the current directory. +- */ +- int +- mch_isFullName(fname) +- char_u *fname; +- { +- if (strstr(fname, "::") && strstr(fname,".$.")) +- return TRUE; +- return FALSE; +- } +- +- /* +- * Get file permissions for 'name'. +- * Returns -1 when it doesn't exist. +- */ +- long +- mch_getperm(name) +- char_u *name; +- { +- struct stat statb; +- +- if (stat((char *)name, &statb)) +- return -1; +- return statb.st_mode; +- } +- +- /* +- * set file permission for 'name' to 'perm' +- * +- * return FAIL for failure, OK otherwise +- */ +- int +- mch_setperm(name, perm) +- char_u *name; +- long perm; +- { +- return (chmod((char *)name, (mode_t)perm) == 0 ? OK : FAIL); +- } +- +- /* +- * Set hidden flag for "name". +- */ +- /* ARGSUSED */ +- void +- mch_hide(name) +- char_u *name; +- { +- /* can't hide a file */ +- } +- +- /* +- * return TRUE if "name" is a directory +- * return FALSE if "name" is not a directory +- * return FALSE for error +- */ +- int +- mch_isdir(name) +- char_u *name; +- { +- if (xswi(OS_File, 17, name) & v_flag) +- return FALSE; +- if (r0 == 2 || r0 == 3) +- return TRUE; /* Count image files as directories. */ +- return FALSE; +- } +- +- /* +- * Return 1 if "name" can be executed, 0 if not. +- * Return -1 if unknown. Requires which to work. +- */ +- int +- mch_can_exe(name) +- char_u *name; +- { +- char_u *buf; +- char_u *p; +- int retval; +- +- buf = alloc((unsigned)STRLEN(name) + 7); +- if (buf == NULL) +- return -1; +- sprintf((char *)buf, "which %s", name); +- p = get_cmd_output(buf, NULL, SHELL_SILENT); +- vim_free(buf); +- if (p == NULL) +- return -1; +- /* result can be: "name: Command not found" */ +- retval = (*p != NUL && strstr((char *)p, "not found") == NULL); +- vim_free(p); +- return retval; +- } +- +- /* +- * Check what "name" is: +- * NODE_NORMAL: file or directory (or doesn't exist) +- * NODE_WRITABLE: writable device, socket, fifo, etc. +- * NODE_OTHER: non-writable things +- */ +- int +- mch_nodetype(name) +- char_u *name; +- { +- /* TODO */ +- return NODE_NORMAL; +- } +- +- void +- mch_early_init() +- { +- /* Turn off all the horrible filename munging in UnixLib. */ +- int __riscosify_control = __RISCOSIFY_NO_PROCESS; +- } +- +- void +- mch_exit(r) +- int r; +- { +- settmode(TMODE_COOK); +- exiting = TRUE; +- out_flush(); +- ml_close_all(TRUE); /* remove all memfiles */ +- +- #ifdef FEAT_GUI +- if (gui.in_use) +- gui_exit(r); +- #endif +- swi(OS_NewLine); +- if (old_escape_state != -1) +- swi(OS_Byte, 229, old_escape_state, 0); +- if (old_cursor_state != -1) +- swi(OS_Byte, 4, old_cursor_state); +- exit(r); +- } +- +- void +- mch_settmode(tmode) +- int tmode; /* TMODE_RAW or TMODE_COOK */ +- { +- if (tmode == TMODE_COOK) +- { +- ro_line_mode = TRUE; +- return; +- } +- +- ro_line_mode = FALSE; +- +- if (term_console) +- { +- /* Block cursor. */ +- swi(OS_WriteN, +- "\027\000\012\000\000\000\000\000\000\000", +- 10); +- +- /* Disable the standard cursor key actions. */ +- swi(OS_Byte, 4, 1); +- if (old_cursor_state == -1) +- old_cursor_state = r1; +- } +- +- /* Stop Escape from quitting Vim! */ +- swi(OS_Byte, 229, 1, 0); +- if (old_escape_state == -1) +- old_escape_state = r1; +- } +- +- /* +- * set mouse clicks on or off (only works for xterms) +- */ +- void +- mch_setmouse(on) +- int on; +- { +- } +- +- /* +- * set screen mode, always fails. +- */ +- /* ARGSUSED */ +- int +- mch_screenmode(arg) +- char_u *arg; +- { +- EMSG(_(e_screenmode)); +- return FAIL; +- } +- +- /* +- * Try to get the current window size. +- * Return OK when size could be determined, FAIL otherwise. +- * Simply return results stored by mch_init() if we are the +- * machine's console. If not, we don't know how big the screen is. +- */ +- int +- mch_get_shellsize() +- { +- /* if size changed: screenalloc will allocate new screen buffers */ +- return term_console ? OK : FAIL; +- } +- +- /* +- * Can't change the size. +- * Assume the user knows what he's doing and use the new values. +- */ +- void +- mch_set_shellsize() +- { +- /* Assume the user knows what he's doing and use the new values. */ +- } +- +- /* +- * Rows and/or Columns has changed. +- */ +- void +- mch_new_shellsize() +- { +- /* Nothing to do. */ +- } +- +- int +- mch_call_shell(cmd, options) +- char_u *cmd; +- int options; /* SHELL_*, see vim.h */ +- { +- int retval; +- int tmode = cur_tmode; +- +- if (cmd == NULL) +- cmd = (char_u *) "GOS"; +- +- #ifdef FEAT_GUI +- if (gui.in_use) +- return gui_mch_call_shell(cmd, options); +- #endif +- if (options & SHELL_COOKED) +- settmode(TMODE_COOK); /* set to normal mode */ +- MSG_PUTS("\n"); +- +- /* I don't even want to think about what UnixLib must +- * be doing to allow this to work... +- */ +- retval = system(cmd); +- if (retval && !(options & SHELL_SILENT)) +- EMSG(strerror(EOPSYS)); /* Doesn't seem to set errno? */ +- +- swi(OS_Byte, 229, 1, 0); /* Re-disable escape */ +- if (tmode == TMODE_RAW) +- settmode(TMODE_RAW); /* set to raw mode */ +- return retval ? FAIL : OK; +- } +- +- /* +- * Check for Escape being pressed right now. +- * [ different if !term_console? ] +- */ +- void +- mch_breakcheck() +- { +- if (xswi(OS_Byte, 121, 0xf0) & v_flag) +- return; +- if (r1 == 0xff) +- { +- got_int = TRUE; +- swi(OS_Byte, 15, 1); /* Flush input buffer */ +- } +- } +- +- /* +- * Recursively expand one path component into all matching files and/or +- * directories. +- * "path" has backslashes before chars that are not to be expanded. +- * Return the number of matches found. +- */ +- int +- mch_expandpath(gap, path, flags) +- garray_T *gap; /* Grow array for results. */ +- char_u *path; +- int flags; /* EW_* flags */ +- { +- int got; /* Number of matches. */ +- char_u *pattern; +- +- /* Plan: +- * +- * 1) Get first part of path - no wildcards +- * 2) Get next path element (wildcarded) +- * 3) Get rest of path +- * +- * If (3) is nothing then only the leaf is wildcarded - add to gap +- * Otherwise call recursively for each path in (2), passing (3) +- * +- * This is just the header function. +- */ +- +- /* We must be able to modifiy path, so make a copy */ +- pattern = vim_strsave(path); +- if (pattern == NULL) +- return 0; +- got = expand_section(gap, (char_u *)"", pattern, flags); +- vim_free(pattern); +- return got; +- } +- +- /* +- * expand_section(gap, "$.Dir1.Dir2", "ABBA*.myleaf##") +- * +- * calls expand_section(gap, "$.Dir1.Dir2.ABBA_Gold", "myleaf##") +- * and expand_section(gap, "$.Dir1.Dir2.ABBA_Live", "myleaf##") +- * +- * If rest is just a leaf then all matches are added to gap. +- * +- * Returns number of items added to gap. +- */ +- int +- expand_section(gap, root, rest, flags) +- garray_T *gap; +- char_u *root; /* Non-wildcarded path to search */ +- char_u *rest; /* Wildcarded remainder of path */ +- int flags; /* Add dirs/files/missing objects. */ +- { +- static char_u buf[MAXPATHL]; /* Temporary buffer. */ +- char_u dir[MAXPATHL]; +- int start_element = -1; /* Start of wildcarded element */ +- char_u c; +- int i; +- int got, dir_pos; +- int buflen; /* Chars used in buf[] */ +- int colon = 0; /* Dir ends in ':' */ +- +- buflen = strlen(root); +- STRNCPY(buf, root, buflen); /* Copy root into buffer. */ +- +- /* +- * Find end of nonwildcarded section. +- * Count ':' as a path sep since Vim:Bug* is a valid pathname. +- */ +- +- for (i = 0; c = rest[i]; i++) +- { +- if (c == PATHSEP) +- { +- start_element = i; +- colon = 0; +- } +- if (c == ':') +- { +- start_element = i + 1; +- colon = 1; +- } +- if (c == '#' || c == '*') +- break; +- } +- if (c == 0) +- start_element = i; +- +- /* +- * start_element +> terminator for non-wildcarded section. +- * Transfer this bit into buf. +- */ +- if (buflen + start_element + 4 >= MAXPATHL) +- return 0; /* Buffer full */ +- if (start_element >= 0) +- { +- if (*root && !colon) +- buf[buflen++] = PATHSEP; +- strncpy(buf + buflen, rest, start_element); +- buflen += start_element; +- } +- buf[buflen] = 0; +- +- /* +- * Did we reach the end of the string without hitting any wildcards? +- */ +- if (c == 0) +- { +- /* Yes - add combined path to grow array and return. */ +- addfile(gap, buf, flags); +- return 1; +- } +- +- if (start_element < 0 || !colon) +- start_element++; +- rest += start_element; +- +- /* +- * rest does contain wildcards if we get here. +- * +- * Now : have we reached the leaf names part yet? +- * If so, add all matches (files and dirs) to gap. +- * If not, get next path element and scan all matching directories. +- */ +- +- start_element = -1; +- for (i = 0; rest[i]; i++) +- { +- if (rest[i] == '.') +- { +- start_element = i; +- rest[i] = 0; /* Break string here. */ +- break; +- } +- } +- +- /* If start_element is -1 then we are matching leaf names */ +- +- r3 = 0; /* Number of objs read. */ +- dir_pos = 0; /* Position through directory. */ +- got = 0; /* Files added so far. */ +- while (dir_pos != -1) +- { +- buf[buflen] = 0; +- if (xswi(OS_GBPB, 9, +- buf, /* Directory to scan. */ +- buf + buflen + (1 - colon), /* Buffer for result. */ +- 1, /* Number of objects to read. */ +- dir_pos, /* Search position. */ +- MAXPATHL - 2 - buflen, /* Size of result buffer. */ +- rest) /* Wildcarded leafname. */ +- & v_flag) +- { +- EMSG(r0 + 4); +- r4 = -1; +- } +- dir_pos = r4; /* r4 corrupted by addfile() */ +- if (r3 > 0) +- { +- char_u *path = buf; +- if (buflen == 0) +- path++; /* Don't do '.File' */ +- else if (!colon) +- buf[buflen] = '.'; /* Join path and leaf */ +- +- /* Path -> full path of object found */ +- if (start_element == -1) +- { +- addfile(gap, path, flags); +- got++; +- } +- else +- { +- /* Scan into subdirectories and images; ignore files */ +- swi(OS_File, 17, path); +- if (r0 == 2 || r0 == 3) +- got += expand_section(gap, +- path, +- rest + start_element + 1, +- flags); +- } +- } +- } +- +- /* Restore the dot if we removed it. */ +- if (start_element >= 0) +- rest[start_element] = '.'; +- return got; +- } +- +- /* +- * mch_expand_wildcards() - this code does wild-card pattern matching using +- * the shell. It isn't used under RISC OS. +- * +- * return OK for success, FAIL for error (you may lose some memory) and put +- * an error message in *file. +- * +- * num_pat is number of input patterns +- * pat is array of pointers to input patterns +- * num_file is pointer to number of matched file names +- * file is pointer to array of pointers to matched file names +- */ +- int +- mch_expand_wildcards(num_pat, pat, num_file, file, flags) +- int num_pat; +- char_u **pat; +- int *num_file; +- char_u ***file; +- int flags; /* EW_* flags */ +- { +- /* This doesn't get called unless SPECIAL_WILDCHAR is defined. */ +- return FAIL; +- } +- +- /* +- * Return TRUE if "p" contains wildcards which can be expanded by +- * mch_expandpath(). +- */ +- int +- mch_has_exp_wildcard(p) +- char_u *p; +- { +- if (vim_strpbrk((char_u *)"*#", p)) +- return TRUE; +- return FALSE; +- } +- +- /* Return TRUE if "p" contains wildcards. */ +- int +- mch_has_wildcard(p) +- char_u *p; +- { +- if (vim_strpbrk((char_u *)"*#`", p)) +- return TRUE; +- return FALSE; +- } +- +- int /* see Unix unlink(2) */ +- mch_remove(file) +- char_u *file; /* Name of file to delete. */ +- { +- if (xswi(OS_FSControl, 27, file, 0, 0) & v_flag) +- return EXIT_FAILURE; +- return EXIT_SUCCESS; +- } +- +- /* Try to make existing scripts work without modification. +- * Return a pointer to the new string (freed by caller), or NULL +- * +- * Two main cases: +- * - Absolute : $VIM/syntax/help.vim +- * - Relative : Adfs::4.$.!Vim.Resources.Syntax/help.vim +- */ +- char_u * +- mch_munge_fname(fname) +- char_u *fname; +- { +- char_u c; +- int len; +- char_u *retval; +- +- retval = fname = vim_strsave(fname); +- if (fname == NULL) +- return NULL; +- +- if (strncmp(fname, "$VIM/", 5) == 0) +- { +- strncpy(fname, "Vim:", 4); +- for (fname += 5; c = *fname; fname++) +- { +- if (c == '.') +- break; +- if (c == '/') +- fname[-1] = '.'; +- else +- fname[-1] = c; +- } +- fname[-1] = '\0'; +- } +- else +- { +- /* Check to see if the file exists without modification. */ +- if (xswi(OS_File, 17, fname) & v_flag) +- r0 == 0; /* Invalid filename? */ +- if (r0) +- return retval; +- +- len = strlen(fname); +- if (strcmp(fname + len - 4, ".vim") == 0) +- { +- fname[len - 4] = '\0'; +- for (; c = *fname; fname++) +- { +- if (c == '/') +- *fname = '.'; +- } +- } +- } +- return retval; +- } +- +- /* QuickFix reads munged names from the error file. +- * Correct them. +- */ +- int +- ro_buflist_add(old_name) +- char_u *old_name; /* Name of file found by quickfix */ +- { +- char_u *fname; +- char_u *leaf; /* Pointer to start of leaf in old_name */ +- char_u *ptr; +- char_u c; +- int retval; +- +- if (old_name == NULL) +- return buflist_add(NULL, 0); +- +- /* Copy the name so we can mess around with it. */ +- fname = vim_strsave(old_name); +- if (fname == NULL) +- /* Out of memory - can't modify name */ +- return buflist_add(old_name, 0); +- +- /* Change `dir/main.c' into `dir.c.main' */ +- leaf = fname; +- for (ptr = fname; c = *ptr; ptr++) +- { +- if (c == '/') +- { +- leaf = ptr + 1; +- *ptr = '.'; +- } +- else if (c == '.') +- break; +- } +- if (c == '.') +- { +- /* Change `main.c' into `c.main' +- * | | +- * leaf ptr +- */ +- ptr += old_name - fname; +- *ptr = '\0'; +- sprintf(leaf, +- "%s.%s", +- ptr + 1, +- leaf - fname + old_name); +- } +- +- retval = buflist_add(fname, 0); +- free(fname); +- return retval; +- } +- +- /* Change the current directory. +- * Strip trailing dots to make it easier to use with filename completion. +- * Return 0 for success, -1 for failure. +- */ +- int +- mch_chdir(dir) +- char_u *dir; +- { +- int length; +- int retval; +- char_u *new_dir; +- +- if (p_verbose >= 5) +- { +- verbose_enter(); +- smsg((char_u *)"chdir(%s)", dir); +- verbose_leave(); +- } +- length = strlen(dir); +- if (dir[length - 1] != '.') +- return chdir(dir); /* No trailing dots - nothing to do. */ +- new_dir = vim_strsave(dir); +- if (new_dir == NULL) +- return chdir(dir); /* Can't allocate memory. */ +- +- while (new_dir[--length] == '.') +- new_dir[length] = '\0'; +- +- retval = chdir(new_dir); +- vim_free(new_dir); +- return retval; +- } +- +- /* Examine the named file, and set the 'osfiletype' option +- * (in curbuf) to the file's type. +- */ +- void +- mch_read_filetype(file) +- char_u *file; +- { +- int type; +- char_u type_string[9]; +- int i; +- +- if (xswi(OS_File, 23, file) & v_flag) +- type = 0xfff; /* Default to Text */ +- else +- type = r6; +- +- /* Type is the numerical value - see if we have a textual equivalent */ +- swi(OS_FSControl, 18, 0, type); +- ((int *) type_string)[0] = r2; +- ((int *) type_string)[1] = r3; +- type_string[8] = 0; +- for (i = 0; type_string[i] > ' '; i++) +- ; +- type_string[i] = 0; +- +- set_string_option_direct("osfiletype", -1, type_string, OPT_FREE, 0); +- return; +- } +- +- void +- mch_set_filetype(file, type) +- char_u *file; +- char_u *type; +- { +- if (xswi(OS_FSControl, 31, type) & v_flag) +- { +- EMSG(_("E366: Invalid 'osfiletype' option - using Text")); +- r2 = 0xfff; +- } +- +- swi(OS_File, 18, file, r2); +- } +- +- /* Return TRUE if the file's type matches 'type' +- * RISC OS types always start with '&' +- */ +- int +- mch_check_filetype(fname, type) +- char_u *fname; +- char_u *type; +- { +- int value; +- char *end; +- +- if (*type != '&') +- return FALSE; +- +- value = strtol(type + 1, &end, 16); +- if (*end) +- return FALSE; /* Invalid type (report error?) */ +- +- if (xswi(OS_File, 23, fname) & v_flag) +- return FALSE; /* Invalid filename? */ +- +- return (r0 && r6 == value); +- } +--- 0 ---- +*** ../vim-7.3.186/runtime/doc/os_risc.txt 2010-08-15 21:57:16.000000000 +0200 +--- runtime/doc/os_risc.txt 2011-05-10 16:19:25.000000000 +0200 +*************** +*** 1,322 **** +! *os_risc.txt* For Vim version 7.3. Last change: 2010 Aug 07 + + + VIM REFERENCE MANUAL by Thomas Leonard + + + *riscos* *RISCOS* *RISC-OS* +! This file contains the particularities for the RISC OS version of Vim. + +- The RISC OS port is a completely new port and is not based on the old "archi" +- port. + +- 1. File locations |riscos-locations| +- 2. Filename munging |riscos-munging| +- 3. Command-line use |riscos-commandline| +- 4. Desktop (GUI) use |riscos-gui| +- 5. Remote use (telnet) |riscos-remote| +- 6. Temporary files |riscos-temp-files| +- 7. Interrupting |riscos-interrupt| +- 8. Memory usage |riscos-memory| +- 9. Filetypes |riscos-filetypes| +- 10. The shell |riscos-shell| +- 11. Porting new releases |riscos-porting| +- +- If I've missed anything, email me and I'll try to fix it. In fact, even if I +- haven't missed anything then email me anyway to give me some confidence that it +- actually works! +- +- Thomas Leonard +- +- [these URLs no longer work...] +- Port homepage: http://www.ecs.soton.ac.uk/~tal197/ +- or try: http://www.soton.ac.uk/~tal197/ +- +- ============================================================================== +- *riscos-locations* +- 1. File locations +- +- The Vim executable and shared resource files are all stored inside the !Vim +- application directory. +- +- When !Vim is first seen by the filer, it aliases the *vi and *ex commands to +- run the command-line versions of Vim (see |riscos-commandline|). +- +- !Vim.Resources and !Vim.Resources2 contain the files from the standard Vim +- distribution, but modified slightly to work within the limits of ADFS, plus +- some extra files such as the window templates. +- +- User choices are read from "Choices:*" and are saved to ".*". +- If you have the new !Boot structure then these should be set up already. If +- not, set Choices$Path to a list of directories to search when looking for +- user configuration files. Set Choices$Write to the directory you want files +- to be saved into (so your search patterns and marks can be remembered between +- sessions). +- +- ============================================================================== +- *riscos-munging* +- 2. Filename munging +- +- All pathname munging is disabled by default, so Vim should behave like a +- normal RISC OS application now. So, if you want to edit "doc/html" then you +- actually type "*vi doc/html". +- +- The only times munging is done is when: +- +- - Searching included files from C programs, since these are always munged. +- See |[I|. +- Note: make sure you are in the right directory when you use this +- command (i.e. the one with subdirectories "c" and "h"). +- +- - Sourcing files using |:so|. +- Paths starting "$VIM/" are munged like this: +- +- $VIM/syntax/help.vim -> Vim:syntax.help +- +- Also, files ending in ".vim" have their extensions removed, and slashes +- replaced with dots. +- +- Some tag files and script files may have to be edited to work under this port. +- +- ============================================================================== +- *riscos-commandline* +- 3. Command-line use +- +- To use Vim from the command-line use the "*vi" command (or "*ex" for +- |Ex-mode|). +- +- Type "*vi -h" for a list of options. +- +- Running the command-line version of Vim in a large high-color mode may cause +- the scrolling to be very slow. Either change to a mode with fewer colors or +- use the GUI version. +- +- Also, holding down Ctrl will slow it down even more, and Ctrl-Shift will +- freeze it, as usual for text programs. +- +- ============================================================================== +- *riscos-gui* +- 4. Desktop use +- +- Limitations: +- +- - Left scrollbars don't work properly (right and bottom are fine). +- - Doesn't increase scroll speed if it gets behind. +- +- You can resize the window by dragging the lower-right corner, even though +- there is no icon shown there. +- +- You can use the --rows and --columns arguments to specify the initial size of +- the Vim window, like this: > +- +- *Vi -g --rows 20 --columns 80 +- +- The global clipboard is supported, so you can select some text and then +- paste it directly into another application (provided it supports the +- clipboard too). +- +- Clicking Menu now opens a menu like a normal RISC OS program. Hold down Shift +- when clicking Menu to paste (from the global clipboard). +- +- Dragging a file to the window replaces the CURRENT buffer (the one with the +- cursor, NOT the one you dragged to) with the file. +- +- Dragging with Ctrl held down causes a new Vim window to be opened for the +- file (see |:sp|). +- +- Dragging a file in with Shift held down in insert mode inserts the pathname of +- the file. +- +- :browse :w opens a standard RISC OS save box. +- :browse :e opens a directory viewer. +- +- For fonts, you have the choice of the system font, an outline font, the system +- font via ZapRedraw and any of the Zap fonts via ZapRedraw: > +- +- :set guifont= +- < To use the system font via the VDU drivers. Supports +- bold and underline. +- > +- :set guifont=Corpus.Medium +- < Use the named outline font. You can use any font, but +- only monospaced ones like Corpus look right. +- > +- :set guifont=Corpus.Medium:w8:h12:b:i +- < As before, but with size of 8 point by 12 point, and +- in bold italic. +- If only one of width and height is given then that +- value is used for both. If neither is given then 10 +- point is used. +- +- Thanks to John Kortink, Vim can use the ZapRedraw module. Start the font name +- with "!" (or "!!" for double height), like this: > +- +- :set guifont=!! +- < Use the system font, but via ZapRedraw. This gives a +- faster redraw on StrongARM processors, but you can't +- get bold or italic text. Double height. +- > +- :set guifont=!script +- < Uses the named Zap font (a directory in VimFont$Path). +- The redraw is the same speed as for "!!", but you get +- a nicer looking font. +- Only the "man+" and "script" fonts are supplied +- currently, but you can use any of the Zap fonts if +- they are in VimFont$Path. +- Vim will try to load font files "0", "B", "I" and "IB" +- from the named directory. Only "0" (normal style) MUST +- be present. Link files are not currently supported. +- +- Note that when using ZapRedraw the edit bar is drawn in front of the character +- you are on rather than behind it. Also redraw is incorrect for screen modes +- with eigen values of 0. If the font includes control characters then you can +- get Vim to display them by changing the 'isprint' option. +- +- If you find the scrolling is too slow on your machine, try experimenting +- with the 'scrolljump' and 'ttyscroll' options. +- +- In particular, StrongARM users may find that: > +- +- :set ttyscroll=0 +- +- makes scrolling faster in high-color modes. +- +- ============================================================================= +- *riscos-remote* +- 5. Remote use (telnet) +- +- I have included a built-in termcap entry, but you can edit the termcap file to +- allow other codes to be used if you want to use Vim from a remote terminal. +- +- Although I do not have an internet connection to my Acorn, I have managed to +- run Vim in a FreeTerm window using the loopback connection. +- +- It seems to work pretty well now, using "*vi -T ansi". +- +- ============================================================================== +- *riscos-temp-files* +- 6. Temporary files +- +- If Vim crashes then the swap and backup files (if any) will be in the +- directories set with the 'directory' and 'bdir' options. By default the swap +- files are in (i.e. inside !Scrap) and backups are in the +- directory you were saving to. Vim will allow you to try and recover the file +- when you next try to edit it. +- +- To see a list of swap files, press and type "*vi -r". +- +- Vim no longer brings up ATTENTION warnings if you try to edit two files with +- the same name in different directories. +- +- However, it also no longer warns if you try to edit the same file twice (with +- two copies of Vim), though you will still be warned when you save that the +- datestamp has changed. +- +- ============================================================================== +- *riscos-interrupt* +- 7. Interrupting +- +- To break out of a looping macro, or similar, hold down Escape in the +- command-line version, or press CTRL-C in the GUI version. +- +- ============================================================================== +- *riscos-memory* +- 8. Memory usage +- +- Vim will use dynamic areas on RISC OS 3.5 or later. If you can use them on +- older machines then edit the !RunTxt and GVim files. I don't know what UnixLib +- does by default on these machines so I'm playing safe. +- +- It doesn't work at all well without dynamic areas, since it can't change its +- memory allocation once running. Hence you should edit "!Vim.GVim" and +- "!Vim.!RunTxt" to choose the best size for you. You probably need at least +- about 1400K. +- +- ============================================================================== +- *riscos-filetypes* +- 9. Filetypes +- +- You can now specify that autocommands are only executed for files of certain +- types. The filetype is given in the form &xxx, when xxx is the filetype. +- +- Filetypes must be specified by number (e.g. &fff for Text). +- +- The system has changed from version 5.3. The new sequence of events is: +- +- - A file is loaded. |'osfiletype'| is set to the RISC OS filetype. +- - Based on the filetype and pathname, Vim will try to set |'filetype'| to the +- Vim-type of the file. +- - Setting this option may load syntax files and perform other actions. +- - Saving the file will give it a filetype of |'osfiletype'|. +- +- Some examples may make this clearer: +- +- Kind of file loaded osfiletype filetype ~ +- C code "c.hellow" Text (&fff) C +- LaTeX document LaTeX (&2a8) TeX +- Draw document DrawFile (&aff) (not changed) +- +- ============================================================================== +- *riscos-shell* +- 10. The shell +- +- - Bangs (!s) are only replaced if they are followed by a space or end-of-line, +- since many pathnames contain them. +- +- - You can prefix the command with "~", which stops any output from being +- displayed. This also means that you don't have to press afterwards, +- and stops the screen from being redrawn. {only in the GUI version} +- +- ============================================================================== +- *riscos-porting* +- 11. Porting new releases to RISC OS +- +- Downloading everything you need: +- +- - Get the latest source distribution (see www.vim.org) +- - Get the runtime environment files (e.g. these help files) +- - Get the RISC OS binary distribution (if possible) +- +- +- Unarchiving: +- +- - Create a raFS disk and put the archives on it +- - Un-gzip them +- - Un-tar them (*tar xELf 50 archive/tar) +- +- +- Recompiling the sources: +- +- - Create c, s, and h directories. +- - Put all the header files in "h". \ +- - Put all the C files in "c". | And lose the extensions +- - Put the assembler file ("swis/s") in "s". / +- - Rename all the files in "proto" to "h", like this: +- raFS::VimSrc.source.proto.file/pro +- becomes +- raFS::VimSrc.source.h.file_pro +- - In the files "h.proto" and "c.termlib", search and replace +- .pro" +- with +- _pro.h" +- - Create a simple Makefile if desired and do "*make -k". +- Use "CC = gcc -DRISCOS -DUSE_GUI -O2 -x c" in the Makefile. +- - Save the binary as !Vim.Vim in the binary distribution. +- +- +- Updating the run-time environment: +- +- - Replace old or missing files inside !Vim.Resources with the +- new files. +- - Remove files in "doc" not ending in "/txt", except for "tags". +- - Lose the extensions from the files in "doc". +- - Edit the "doc.tags" file. Remove extensions from the second column: > +- :%s/^\(.[^\t]*\t.*\)\.txt\t/\1\t/ +- - Remove extensions from the syntax files. Split them into two directories +- to avoid the 77 entry limit on old ADFS filesystems. +- - Edit "Vim:FileType" to match "*.c.*" as well as "*/c" and so on. +- Add filetype checking too. +- - Edit "Vim:Menu" and remove all the keys from the menus: > +- :%s/[^ \t]*// +- < + vim:tw=78:ts=8:ft=help:norl: +--- 1,12 ---- +! *os_risc.txt* For Vim version 7.3. Last change: 2011 May 10 + + + VIM REFERENCE MANUAL by Thomas Leonard + + + *riscos* *RISCOS* *RISC-OS* +! The RISC OS support has been removed from Vim with patch 7.3.187. +! If you would like to use Vim on RISC OS get the files from before that patch. + + + vim:tw=78:ts=8:ft=help:norl: +*** ../vim-7.3.186/src/version.c 2011-05-10 16:12:40.000000000 +0200 +--- src/version.c 2011-05-10 16:37:20.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 187, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +81. At social functions you introduce your husband as "my domain server." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 18132dbd738e9f63aef0b970784014fe56956c2c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0361/3803] Patchlevel 188 --- 7.3.188 | 184 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 7.3.188 diff --git a/7.3.188 b/7.3.188 new file mode 100644 index 00000000..f5845430 --- /dev/null +++ b/7.3.188 @@ -0,0 +1,184 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.188 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.188 +Problem: More RISC OS files to remove. +Solution: Remove them. Update the file list. +Files: src/proto/gui_riscos.pro, src/proto/os_riscos.pro, Filelist + + +*** ../vim-7.3.187/src/proto/gui_riscos.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_riscos.pro 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,66 **** +- /* Prototypes for gui_riscos.c +- * Based on gui_x11_pro.h (10 March 2002 version) +- */ +- void gui_mch_prepare __ARGS((int *argc, char **argv)); +- int gui_mch_init_check __ARGS((void)); +- int gui_mch_init __ARGS((void)); +- void gui_mch_uninit __ARGS((void)); +- void gui_mch_new_colors __ARGS((void)); +- int gui_mch_open __ARGS((void)); +- void gui_init_tooltip_font __ARGS((void)); +- void gui_init_menu_font __ARGS((void));void gui_mch_exit __ARGS((int rc)); +- int gui_mch_get_winpos __ARGS((int *x, int *y)); +- void gui_mch_set_winpos __ARGS((int x, int y)); +- void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height)); +- void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h)); +- int gui_mch_init_font __ARGS((char_u *font_name, int do_fontset)); +- GuiFont gui_mch_get_font __ARGS((char_u *name, int giveErrorIfMissing)); +- int gui_mch_adjust_charheight __ARGS((void)); +- void gui_mch_set_font __ARGS((GuiFont font)); +- void gui_mch_set_fontset __ARGS((GuiFontset fontset)); +- void gui_mch_free_font __ARGS((GuiFont font)); +- void gui_mch_free_fontset __ARGS((GuiFontset fontset)); +- GuiFontset gui_mch_get_fontset __ARGS((char_u *name, int giveErrorIfMissing, int fixed_width)); +- guicolor_T gui_mch_get_color __ARGS((char_u *reqname)); +- void gui_mch_set_fg_color __ARGS((guicolor_T color)); +- void gui_mch_set_bg_color __ARGS((guicolor_T color)); +- void gui_mch_draw_string __ARGS((int row, int col, char_u *s, int len, int flags)); +- int gui_mch_haskey __ARGS((char_u *name)); +- void gui_mch_beep __ARGS((void)); +- void gui_mch_flash __ARGS((int msec)); +- void gui_mch_invert_rectangle __ARGS((int r, int c, int nr, int nc)); +- void gui_mch_iconify __ARGS((void)); +- void gui_mch_set_foreground __ARGS((void)); +- void gui_mch_draw_hollow_cursor __ARGS((guicolor_T color)); +- void gui_mch_draw_part_cursor __ARGS((int w, int h, guicolor_T color)); +- void gui_mch_update __ARGS((void)); +- int gui_mch_wait_for_chars __ARGS((long wtime)); +- void gui_mch_flush __ARGS((void)); +- void gui_mch_clear_block __ARGS((int row1, int col1, int row2, int col2)); +- void gui_mch_clear_all __ARGS((void)); +- void gui_mch_delete_lines __ARGS((int row, int num_lines)); +- void gui_mch_insert_lines __ARGS((int row, int num_lines)); +- void clip_mch_lose_selection __ARGS((VimClipboard *cbd)); +- int clip_mch_own_selection __ARGS((VimClipboard *cbd)); +- void clip_mch_request_selection __ARGS((VimClipboard *cbd)); +- void clip_mch_set_selection __ARGS((VimClipboard *cbd)); +- void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); +- void gui_mch_menu_hidden __ARGS((vimmenu_T *menu, int hidden)); +- void gui_mch_draw_menubar __ARGS((void)); +- void gui_mch_set_blinking __ARGS((long waittime, long on, long off)); +- void gui_mch_stop_blink __ARGS((void)); +- void gui_mch_start_blink __ARGS((void)); +- void process_event __ARGS((int event, int *block)); +- void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); +- long_u gui_mch_get_rgb __ARGS((guicolor_T pixel)); +- void gui_mch_getmouse __ARGS((int *x, int *y)); +- void gui_mch_setmouse __ARGS((int x, int y)); +- void gui_mch_drawsign __ARGS((int row, int col, int typenr)); +- void gui_mch_destroy_sign __ARGS((XImage *sign)); +- void gui_mch_mousehide __ARGS((int hide)); +- void mch_set_mouse_shape __ARGS((int shape)); +- void gui_mch_menu_set_tip __ARGS((vimmenu_T *menu)); +- +- void ro_redraw_title __ARGS((int window)); +- int ro_ok_to_quit __ARGS((void)); +- /* vim: set ft=c : */ +--- 0 ---- +*** ../vim-7.3.187/src/proto/os_riscos.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/os_riscos.pro 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,49 **** +- /* os_riscos.c */ +- void mch_write __ARGS((char_u *s, int len)); +- int mch_inchar __ARGS((char_u *buf, int maxlen, long wtime, int tb_change_cnt)); +- int mch_char_avail __ARGS((void)); +- long_u mch_avail_mem __ARGS((int special)); +- void mch_delay __ARGS((long msec, int ignoreinput)); +- void mch_suspend __ARGS((void)); +- void mch_init __ARGS((void)); +- int mch_check_win __ARGS((int argc, char **argv)); +- int mch_input_isatty __ARGS((void)); +- int mch_can_restore_title __ARGS((void)); +- int mch_can_restore_icon __ARGS((void)); +- void mch_settitle __ARGS((char_u *title, char_u *icon)); +- void mch_restore_title __ARGS((int which)); +- int mch_get_user_name __ARGS((char_u *s, int len)); +- void mch_get_host_name __ARGS((char_u *s, int len)); +- long mch_get_pid __ARGS((void)); +- int mch_dirname __ARGS((char_u *buf, int len)); +- int mch_FullName __ARGS((char_u *fname, char_u *buf, int len, int force)); +- int mch_isFullName __ARGS((char_u *fname)); +- long mch_getperm __ARGS((char_u *name)); +- int mch_setperm __ARGS((char_u *name, long perm)); +- void mch_hide __ARGS((char_u *name)); +- int mch_isdir __ARGS((char_u *name)); +- int mch_can_exe __ARGS((char_u *name)); +- int mch_nodetype __ARGS((char_u *name)); +- void mch_early_init __ARGS((void)); +- void mch_exit __ARGS((int r)); +- void mch_settmode __ARGS((int tmode)); +- void mch_setmouse __ARGS((int on)); +- int mch_screenmode __ARGS((char_u *arg)); +- int mch_get_shellsize __ARGS((void)); +- void mch_set_shellsize __ARGS((void)); +- void mch_new_shellsize __ARGS((void)); +- int mch_call_shell __ARGS((char_u *cmd, int options)); +- void mch_breakcheck __ARGS((void)); +- int mch_expandpath __ARGS((garray_T *gap, char_u *path, int flags)); +- int expand_section __ARGS((garray_T *gap, char_u *root, char_u *rest, int flags)); +- int mch_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags)); +- int mch_has_exp_wildcard __ARGS((char_u *p)); +- int mch_has_wildcard __ARGS((char_u *p)); +- int mch_remove __ARGS((char_u *file)); +- char_u *mch_munge_fname __ARGS((char_u *fname)); +- int ro_buflist_add __ARGS((char_u *old_name)); +- int mch_chdir __ARGS((char_u *dir)); +- void mch_read_filetype __ARGS((char_u *file)); +- void mch_set_filetype __ARGS((char_u *file, char_u *type)); +- int mch_check_filetype __ARGS((char_u *fname, char_u *type)); +- /* vim: set ft=c : */ +--- 0 ---- +*** ../vim-7.3.187/Filelist 2011-03-22 18:10:34.000000000 +0100 +--- Filelist 2011-05-10 17:19:21.000000000 +0200 +*************** +*** 428,435 **** + README_os390.txt \ + src/Make_mint.mak \ + src/Make_ro.mak \ +- src/gui_riscos.c \ +- src/gui_riscos.h \ + src/if_sniff.c \ + src/infplist.xml \ + src/link.390 \ +--- 428,433 ---- +*************** +*** 437,446 **** + src/os_beos.h \ + src/os_beos.rsrc \ + src/os_mint.h \ +- src/os_riscos.c \ +- src/os_riscos.h \ +- src/proto/gui_riscos.pro \ +- src/proto/os_riscos.pro \ + src/os_vms_fix.com \ + src/toolbar.phi \ + +--- 435,440 ---- +*** ../vim-7.3.187/src/version.c 2011-05-10 16:41:13.000000000 +0200 +--- src/version.c 2011-05-10 17:20:50.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 188, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +83. Batteries in the TV remote now last for months. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 700c2575c8c6327d6f908c5a9e561f5880fe0ed3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0362/3803] Patchlevel 189 --- 7.3.189 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 7.3.189 diff --git a/7.3.189 b/7.3.189 new file mode 100644 index 00000000..f7a9667c --- /dev/null +++ b/7.3.189 @@ -0,0 +1,49 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.189 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.189 (after 7.3.186) +Problem: Can't build without +clipboard feature. (Christian Ebert) +Solution: Add the missing #ifdef. +Files: src/normal.c + + +*** ../vim-7.3.188/src/normal.c 2011-05-10 16:12:40.000000000 +0200 +--- src/normal.c 2011-05-10 17:25:26.000000000 +0200 +*************** +*** 1204,1212 **** +--- 1204,1215 ---- + #ifdef FEAT_EVAL + { + int regname = 0; ++ + /* Adjust the register according to 'clipboard', so that when + * "unnamed" is present it becomes '*' or '+' instead of '"'. */ ++ # ifdef FEAT_CLIPBOARD + adjust_clip_reg(®name); ++ # endif + set_reg_var(regname); + } + #endif +*** ../vim-7.3.188/src/version.c 2011-05-10 17:21:34.000000000 +0200 +--- src/version.c 2011-05-10 17:29:21.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 189, + /**/ + +-- +If your nose runs, and your feet smell, you might be upside down. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 1b0b621b8139625191719e20e3e0521c68dcd48c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0363/3803] Patchlevel 190 --- 7.3.190 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 7.3.190 diff --git a/7.3.190 b/7.3.190 new file mode 100644 index 00000000..4adef8ab --- /dev/null +++ b/7.3.190 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.190 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.190 +Problem: When there is a "containedin" syntax argument highlighting may be + wrong. (Radek) +Solution: Reset current_next_list. (Ben Schmidt) +Files: src/syntax.c + + +*** ../vim-7.3.189/src/syntax.c 2011-04-11 16:56:29.000000000 +0200 +--- src/syntax.c 2011-05-19 12:02:43.000000000 +0200 +*************** +*** 2566,2571 **** +--- 2566,2574 ---- + #endif + update_si_attr(current_state.ga_len - 1); + ++ /* nextgroup= should not match in the end pattern */ ++ current_next_list = NULL; ++ + /* what matches next may be different now, clear it */ + next_match_idx = 0; + next_match_col = MAXCOL; +*** ../vim-7.3.189/src/version.c 2011-05-10 17:29:28.000000000 +0200 +--- src/version.c 2011-05-19 12:13:28.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 190, + /**/ + +-- +From "know your smileys": + :'-D Laughing so much that they're crying + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 162facd953ff7a8d82554a560550d7ce983618b3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0364/3803] Patchlevel 191 --- 7.3.191 | 526 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 526 insertions(+) create mode 100644 7.3.191 diff --git a/7.3.191 b/7.3.191 new file mode 100644 index 00000000..14b63cea --- /dev/null +++ b/7.3.191 @@ -0,0 +1,526 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.191 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.191 +Problem: Still some RISC OS stuff to remove. +Solution: Remove files and lines. (Hong Xu) + Remove the 'osfiletype' option code. +Files: README_extra.txt, src/Make_ro.mak, src/INSTALL, src/Makefile, + src/buffer.c, src/eval.c, src/feature.h, src/option.c, + src/option.h, src/structs.h, src/version.c, src/pty.c, Filelist + + +*** ../vim-7.3.190/README_extra.txt 2010-08-15 21:57:32.000000000 +0200 +--- README_extra.txt 2011-05-19 12:35:16.000000000 +0200 +*************** +*** 13,21 **** + + src/os_amiga.* Files for the Amiga port. + +- src/gui_riscos.* +- src/os_riscos.* Files for the RISC OS port. +- + src/gui_beos.* + src/os_beos.* Files for the BeOS port. + +--- 13,18 ---- +*** ../vim-7.3.190/src/Make_ro.mak 2010-08-15 21:57:27.000000000 +0200 +--- src/Make_ro.mak 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,135 **** +- # +- # Makefile for Vim on RISC OS - Andy Wingate +- # +- +- GCC = gcc -mthrowback +- CFLAGS = -DRISCOS -DFEAT_GUI +- CC = $(GCC) $(CFLAGS) -O2 +- # -DUP_BC_PC_EXTERN for term.c needed as BC defined in termlib.c and term.c +- +- TERMFLAG = -DUP_BC_PC_EXTERN +- +- ASMFLAGS = -throwback -objasm -gcc +- +- OBJS = o.buffer o.charset o.diff o.digraph o.edit o.eval o.ex_cmds o.ex_cmds2 \ +- o.ex_docmd o.ex_eval o.ex_getln o.fileio o.fold o.getchar \ +- o.hardcopy o.hashtab o.main o.mark o.mbyte \ +- o.memfile o.memline o.menu o.message o.misc1 o.misc2 o.move \ +- o.normal o.ops o.option o.popupmnu o.quickfix o.regexp o.screen \ +- o.search \ +- o.spell o.syntax o.tag o.term o.termlib o.ui o.undo o.version \ +- o.window o.os_riscos o.swis o.gui o.gui_riscos +- +- Vim: $(OBJS) +- $(GCC) -o Vim $(OBJS) +- +- install: Vim +- squeeze -v Vim @.!Vim.Vim +- +- clean: +- create o.!fake! 0 +- wipe o.* ~cf +- remove Vim +- +- o.swis: s.swis +- as $(ASMFLAGS) -o o.swis s.swis +- +- # Rules for object files +- +- o.%: c.% +- $(CC) -c $< -o $@ +- +- o.buffer: c.buffer +- +- o.charset: c.charset +- +- o.digraph: c.digraph +- +- o.diff: c.diff +- +- o.edit: c.edit +- +- o.eval: c.eval +- +- o.ex_cmds: c.ex_cmds +- +- o.ex_cmds2: c.ex_cmds2 +- +- o.ex_docmd: c.ex_docmd +- +- o.ex_eval: c.ex_eval +- +- o.ex_getln: c.ex_getln +- +- o.fileio: c.fileio +- +- o.fold: c.fold +- +- o.getchar: c.getchar +- +- o.hardcopy: c.hardcopy +- +- o.hashtab: c.hashtab +- +- o.gui: c.gui +- +- o.gui_riscos: c.gui_riscos +- +- o.main: c.main +- +- o.mark: c.mark +- +- o.mbyte: c.mbyte +- +- o.memfile: c.memfile +- +- o.memline: c.memline +- +- o.menu: c.menu +- +- o.message: c.message +- +- o.misc1: c.misc1 +- +- o.misc2: c.misc2 +- +- o.move: c.move +- +- o.normal: c.normal +- +- o.ops: c.ops +- +- o.option: c.option +- +- o.os_riscos: c.os_riscos +- +- o.pty: c.pty +- +- o.popupmnu: c.popupmnu +- +- o.quickfix: c.quickfix +- +- o.regexp: c.regexp +- +- o.screen: c.screen +- +- o.search: c.search +- +- o.spell: c.spell +- +- o.syntax: c.syntax +- +- o.tag: c.tag +- +- o.term: c.term +- $(CC) $(TERMFLAG) -c c.term -o o.term +- +- o.termlib: c.termlib +- +- o.ui: c.ui +- +- o.undo: c.undo +- +- o.version: c.version +- +- o.window: c.window +--- 0 ---- +*** ../vim-7.3.190/src/INSTALL 2010-08-15 21:57:28.000000000 +0200 +--- src/INSTALL 2011-05-19 12:36:17.000000000 +0200 +*************** +*** 6,14 **** + Contents: + 1. Generic + 2. Unix +! 3. RISC OS +! 4. OS/2 (with EMX 0.9b) +! 5. Atari MiNT + + See INSTALLami.txt for Amiga + See INSTALLmac.txt for Macintosh +--- 6,13 ---- + Contents: + 1. Generic + 2. Unix +! 3. OS/2 (with EMX 0.9b) +! 4. Atari MiNT + + See INSTALLami.txt for Amiga + See INSTALLmac.txt for Macintosh +*************** +*** 174,198 **** + ./configure --without-local-dir + + +! 3. RISC OS +! ============= +! +! Much file renaming is needed before you can compile anything. +! You'll need UnixLib to link against, GCC and GNU make. +! +! I suggest you get the RISC OS binary distribution, which includes the +! Templates file and the loader. +! +! Try here: http://www.ecs.soton.ac.uk/~tal197 +! +! Do +! :help riscos +! +! within the editor for more information, or read the +! ../runtime/doc/os_risc.txt help file. +! +! +! 4. OS/2 + ======= + + Summary: +--- 173,179 ---- + ./configure --without-local-dir + + +! 3. OS/2 + ======= + + Summary: +*************** +*** 237,243 **** + Check ../runtime/doc/os_os2.txt for additional info on running Vim. + + +! 5. Atari MiNT + ============= + + [NOTE: this is quite old, it might not work anymore] +--- 218,224 ---- + Check ../runtime/doc/os_os2.txt for additional info on running Vim. + + +! 4. Atari MiNT + ============= + + [NOTE: this is quite old, it might not work anymore] +*** ../vim-7.3.190/src/Makefile 2011-04-01 13:05:37.000000000 +0200 +--- src/Makefile 2011-05-19 12:37:52.000000000 +0200 +*************** +*** 29,35 **** + # - Uncomment the line "CONF_OPT_X = --without-x" if you have X11 but + # want to disable using X11 libraries. This speeds up starting Vim, + # but the window title will not be set and the X11 selection can not +! # used. + # - Uncomment the line "CONF_OPT_XSMP = --disable-xsmp" if you have the + # X11 Session Management Protocol (XSMP) library (libSM) but do not + # want to use it. +--- 29,35 ---- + # - Uncomment the line "CONF_OPT_X = --without-x" if you have X11 but + # want to disable using X11 libraries. This speeds up starting Vim, + # but the window title will not be set and the X11 selection can not +! # be used. + # - Uncomment the line "CONF_OPT_XSMP = --disable-xsmp" if you have the + # X11 Session Management Protocol (XSMP) library (libSM) but do not + # want to use it. +*************** +*** 730,741 **** + ### USL for Unix Systems Laboratories (SYSV 4.2) + #EXTRA_DEFS = -DUSL + +- ### RISCos on MIPS without X11 +- #EXTRA_DEFS = -DMIPS +- +- ### RISCos on MIPS with X11 +- #EXTRA_LIBS = -lsun +- + ### (6) A/UX 3.1.1 with gcc (Jim Jagielski) + #CC= gcc -D_POSIX_SOURCE + #CFLAGS= -O2 +--- 730,735 ---- +*************** +*** 1633,1639 **** + RSRC_DIR = os_mac_rsrc + + PRO_MANUAL = os_amiga.pro os_msdos.pro os_win16.pro os_win32.pro \ +! os_mswin.pro os_beos.pro os_vms.pro os_riscos.pro $(PERL_PRO) + + # Default target is making the executable and tools + all: $(VIMTARGET) $(TOOLS) languages $(GUI_BUNDLE) +--- 1627,1633 ---- + RSRC_DIR = os_mac_rsrc + + PRO_MANUAL = os_amiga.pro os_msdos.pro os_win16.pro os_win32.pro \ +! os_mswin.pro os_beos.pro os_vms.pro $(PERL_PRO) + + # Default target is making the executable and tools + all: $(VIMTARGET) $(TOOLS) languages $(GUI_BUNDLE) +*** ../vim-7.3.190/src/buffer.c 2011-05-05 17:32:40.000000000 +0200 +--- src/buffer.c 2011-05-19 13:09:25.000000000 +0200 +*************** +*** 1808,1816 **** + #ifdef FEAT_AUTOCMD + clear_string_option(&buf->b_p_ft); + #endif +- #ifdef FEAT_OSFILETYPE +- clear_string_option(&buf->b_p_oft); +- #endif + #ifdef FEAT_CINDENT + clear_string_option(&buf->b_p_cink); + clear_string_option(&buf->b_p_cino); +--- 1808,1813 ---- +*** ../vim-7.3.190/src/eval.c 2011-05-10 16:41:13.000000000 +0200 +--- src/eval.c 2011-05-19 13:09:43.000000000 +0200 +*************** +*** 12076,12084 **** + #ifdef FEAT_OLE + "ole", + #endif +- #ifdef FEAT_OSFILETYPE +- "osfiletype", +- #endif + #ifdef FEAT_PATH_EXTRA + "path_extra", + #endif +--- 12076,12081 ---- +*** ../vim-7.3.190/src/feature.h 2010-08-15 21:57:31.000000000 +0200 +--- src/feature.h 2011-05-19 13:09:56.000000000 +0200 +*************** +*** 506,520 **** + #endif + + /* +- * +osfiletype filetype checking in autocommand patterns. +- * Only on systems that support filetypes (RISC OS). +- */ +- #if 0 +- # define FEAT_OSFILETYPE +- # define DFLT_OFT "Text" +- #endif +- +- /* + * +viminfo reading/writing the viminfo file. Takes about 8Kbyte + * of code. + * VIMINFO_FILE Location of user .viminfo file (should start with $). +--- 506,511 ---- +*** ../vim-7.3.190/src/option.c 2011-04-28 17:24:54.000000000 +0200 +--- src/option.c 2011-05-19 13:11:42.000000000 +0200 +*************** +*** 140,148 **** + #define PV_MOD OPT_BUF(BV_MOD) + #define PV_MPS OPT_BUF(BV_MPS) + #define PV_NF OPT_BUF(BV_NF) +- #ifdef FEAT_OSFILETYPE +- # define PV_OFT OPT_BUF(BV_OFT) +- #endif + #ifdef FEAT_COMPL_FUNC + # define PV_OFU OPT_BUF(BV_OFU) + #endif +--- 140,145 ---- +*************** +*** 337,345 **** + static int p_mod; + static char_u *p_mps; + static char_u *p_nf; +- #ifdef FEAT_OSFILETYPE +- static char_u *p_oft; +- #endif + static int p_pi; + #ifdef FEAT_TEXTOBJ + static char_u *p_qe; +--- 334,339 ---- +*************** +*** 1901,1914 **** + (char_u *)NULL, PV_NONE, + {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"osfiletype", "oft", P_STRING|P_ALLOCED|P_VI_DEF, +- #ifdef FEAT_OSFILETYPE +- (char_u *)&p_oft, PV_OFT, +- {(char_u *)DFLT_OFT, (char_u *)0L} +- #else + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} +! #endif +! SCRIPTID_INIT}, + {"paragraphs", "para", P_STRING|P_VI_DEF, + (char_u *)&p_para, PV_NONE, + {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp", +--- 1895,1902 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"osfiletype", "oft", P_STRING|P_ALLOCED|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"paragraphs", "para", P_STRING|P_VI_DEF, + (char_u *)&p_para, PV_NONE, + {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp", +*************** +*** 5282,5290 **** + #ifdef FEAT_AUTOCMD + check_string_option(&buf->b_p_ft); + #endif +- #ifdef FEAT_OSFILETYPE +- check_string_option(&buf->b_p_oft); +- #endif + #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT) + check_string_option(&buf->b_p_cinw); + #endif +--- 5270,5275 ---- +*************** +*** 9665,9673 **** + case PV_MA: return (char_u *)&(curbuf->b_p_ma); + case PV_MOD: return (char_u *)&(curbuf->b_changed); + case PV_NF: return (char_u *)&(curbuf->b_p_nf); +- #ifdef FEAT_OSFILETYPE +- case PV_OFT: return (char_u *)&(curbuf->b_p_oft); +- #endif + case PV_PI: return (char_u *)&(curbuf->b_p_pi); + #ifdef FEAT_TEXTOBJ + case PV_QE: return (char_u *)&(curbuf->b_p_qe); +--- 9650,9655 ---- +*************** +*** 10018,10026 **** + /* Don't copy 'filetype', it must be detected */ + buf->b_p_ft = empty_option; + #endif +- #ifdef FEAT_OSFILETYPE +- buf->b_p_oft = vim_strsave(p_oft); +- #endif + buf->b_p_pi = p_pi; + #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT) + buf->b_p_cinw = vim_strsave(p_cinw); +--- 10000,10005 ---- +*** ../vim-7.3.190/src/option.h 2011-02-12 13:59:55.000000000 +0100 +--- src/option.h 2011-05-19 13:11:46.000000000 +0200 +*************** +*** 984,992 **** + , BV_MOD + , BV_MPS + , BV_NF +- #ifdef FEAT_OSFILETYPE +- , BV_OFT +- #endif + #ifdef FEAT_COMPL_FUNC + , BV_OFU + #endif +--- 984,989 ---- +*** ../vim-7.3.190/src/structs.h 2011-05-10 16:41:13.000000000 +0200 +--- src/structs.h 2011-05-19 13:11:58.000000000 +0200 +*************** +*** 1530,1538 **** + int b_p_ml_nobin; /* b_p_ml saved for binary mode */ + int b_p_ma; /* 'modifiable' */ + char_u *b_p_nf; /* 'nrformats' */ +- #ifdef FEAT_OSFILETYPE +- char_u *b_p_oft; /* 'osfiletype' */ +- #endif + int b_p_pi; /* 'preserveindent' */ + #ifdef FEAT_TEXTOBJ + char_u *b_p_qe; /* 'quoteescape' */ +--- 1530,1535 ---- +*** ../vim-7.3.190/src/version.c 2011-05-19 12:14:03.000000000 +0200 +--- src/version.c 2011-05-19 13:26:42.000000000 +0200 +*************** +*** 426,436 **** + "-ole", + # endif + #endif +- #ifdef FEAT_OSFILETYPE +- "+osfiletype", +- #else +- "-osfiletype", +- #endif + #ifdef FEAT_PATH_EXTRA + "+path_extra", + #else +--- 426,431 ---- +*** ../vim-7.3.190/src/pty.c 2011-04-11 14:24:33.000000000 +0200 +--- src/pty.c 2011-05-19 12:43:26.000000000 +0200 +*************** +*** 123,130 **** + static void initmaster __ARGS((int)); + + /* +! * Open all ptys with O_NOCTTY, just to be on the safe side +! * (RISCos mips breaks otherwise) + */ + #ifndef O_NOCTTY + # define O_NOCTTY 0 +--- 123,129 ---- + static void initmaster __ARGS((int)); + + /* +! * Open all ptys with O_NOCTTY, just to be on the safe side. + */ + #ifndef O_NOCTTY + # define O_NOCTTY 0 +*** ../vim-7.3.190/Filelist 2011-05-10 17:21:34.000000000 +0200 +--- Filelist 2011-05-19 13:37:25.000000000 +0200 +*************** +*** 427,433 **** + $(SRC_VMS) \ + README_os390.txt \ + src/Make_mint.mak \ +- src/Make_ro.mak \ + src/if_sniff.c \ + src/infplist.xml \ + src/link.390 \ +--- 427,432 ---- +*** ../vim-7.3.190/src/version.c 2011-05-19 12:14:03.000000000 +0200 +--- src/version.c 2011-05-19 13:26:42.000000000 +0200 +*************** +*** 716,717 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 191, + /**/ + +-- +From "know your smileys": + :-& Eating spaghetti + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d996f19d387c0fad09cf3814f1768b389ba47aec Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0365/3803] Patchlevel 192 --- 7.3.192 | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 7.3.192 diff --git a/7.3.192 b/7.3.192 new file mode 100644 index 00000000..5dab19b4 --- /dev/null +++ b/7.3.192 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.192 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.192 +Problem: Ex command ":s/ \?/ /g" splits multi-byte characters into bytes. + (Dominique Pelle) +Solution: Advance over whole character instead of one byte. +Files: src/ex_cmds.c + + +*** ../vim-7.3.191/src/ex_cmds.c 2011-05-10 16:41:13.000000000 +0200 +--- src/ex_cmds.c 2011-05-19 14:23:33.000000000 +0200 +*************** +*** 4625,4631 **** + * for a match in this line again. */ + skip_match = TRUE; + else +! ++matchcol; /* search for a match at next column */ + goto skip; + } + +--- 4625,4639 ---- + * for a match in this line again. */ + skip_match = TRUE; + else +! { +! /* search for a match at next column */ +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! matchcol += mb_ptr2len(sub_firstline + matchcol); +! else +! #endif +! ++matchcol; +! } + goto skip; + } + +*** ../vim-7.3.191/src/version.c 2011-05-19 13:40:47.000000000 +0200 +--- src/version.c 2011-05-19 14:28:44.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 192, + /**/ + +-- +From "know your smileys": + :-F Bucktoothed vampire with one tooth missing + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 2d0b081c525445896cba09101f6000efbbff38d3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0366/3803] Patchlevel 193 --- 7.3.193 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 7.3.193 diff --git a/7.3.193 b/7.3.193 new file mode 100644 index 00000000..acee9ec0 --- /dev/null +++ b/7.3.193 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.193 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.193 +Problem: In the command line window ":close" doesn't work properly. (Tony + Mechelynck) +Solution: Use Ctrl_C instead of K_IGNORE for cmdwin_result. (Jean-Rene + David) +Files: src/ex_docmd.c, src/ex_getln.c + + +*** ../vim-7.3.192/src/ex_docmd.c 2011-05-10 16:41:13.000000000 +0200 +--- src/ex_docmd.c 2011-05-19 14:42:56.000000000 +0200 +*************** +*** 6472,6478 **** + { + # ifdef FEAT_CMDWIN + if (cmdwin_type != 0) +! cmdwin_result = K_IGNORE; + else + # endif + if (!text_locked() +--- 6472,6478 ---- + { + # ifdef FEAT_CMDWIN + if (cmdwin_type != 0) +! cmdwin_result = Ctrl_C; + else + # endif + if (!text_locked() +*** ../vim-7.3.192/src/ex_getln.c 2011-04-28 17:21:49.000000000 +0200 +--- src/ex_getln.c 2011-05-19 14:42:56.000000000 +0200 +*************** +*** 6324,6329 **** +--- 6324,6335 ---- + ccline.cmdbuff = vim_strsave((char_u *)"qa"); + cmdwin_result = CAR; + } ++ else if (cmdwin_result == Ctrl_C) ++ { ++ /* :q or :close, don't execute any command ++ * and don't modify the cmd window. */ ++ ccline.cmdbuff = NULL; ++ } + else + ccline.cmdbuff = vim_strsave(ml_get_curline()); + if (ccline.cmdbuff == NULL) +*** ../vim-7.3.192/src/version.c 2011-05-19 14:30:07.000000000 +0200 +--- src/version.c 2011-05-19 14:48:12.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 193, + /**/ + +-- +There's no place like $(HOME)! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 131b8d611d4fccd22e613589ca07f43f8153518a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0367/3803] Patchlevel 194 --- 7.3.194 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 7.3.194 diff --git a/7.3.194 b/7.3.194 new file mode 100644 index 00000000..5a73c009 --- /dev/null +++ b/7.3.194 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.194 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.194 +Problem: When "b" is a symlink to directory "a", resolve("b/") doesn't + result in "a/". (ZyX) +Solution: Remove the trailing slash. (Jean-Rene David) +Files: src/eval.c + + +*** ../vim-7.3.193/src/eval.c 2011-05-19 13:40:47.000000000 +0200 +--- src/eval.c 2011-05-19 14:55:27.000000000 +0200 +*************** +*** 14980,14986 **** +--- 14980,14989 ---- + + len = STRLEN(p); + if (len > 0 && after_pathsep(p, p + len)) ++ { + has_trailing_pathsep = TRUE; ++ p[len - 1] = NUL; /* the trailing slash breaks readlink() */ ++ } + + q = getnextcomp(p); + if (*q != NUL) +*** ../vim-7.3.193/src/version.c 2011-05-19 14:50:49.000000000 +0200 +--- src/version.c 2011-05-19 14:54:40.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 194, + /**/ + +-- +Momento mori, ergo carpe diem + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b40f31760f9aa05ce970a47aa419f0af7cb42aa5 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0368/3803] Patchlevel 195 --- 7.3.195 | 199 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 7.3.195 diff --git a/7.3.195 b/7.3.195 new file mode 100644 index 00000000..ba1fc219 --- /dev/null +++ b/7.3.195 @@ -0,0 +1,199 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.195 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.195 +Problem: "} else" causes following lines to be indented too much. (Rouben + Rostamian) +Solution: Better detection for the "else". (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.194/src/misc1.c 2011-05-10 16:41:13.000000000 +0200 +--- src/misc1.c 2011-05-19 16:30:28.000000000 +0200 +*************** +*** 5482,5489 **** + * Recognize a line that starts with '{' or '}', or ends with ';', ',', '{' or + * '}'. + * Don't consider "} else" a terminated line. +! * Don't consider a line where there are unmatched opening braces before '}', +! * ';' or ',' a terminated line. + * Return the character terminating the line (ending char's have precedence if + * both apply in order to determine initializations). + */ +--- 5482,5489 ---- + * Recognize a line that starts with '{' or '}', or ends with ';', ',', '{' or + * '}'. + * Don't consider "} else" a terminated line. +! * If a line begins with an "else", only consider it terminated if no unmatched +! * opening braces follow (handle "else { foo();" correctly). + * Return the character terminating the line (ending char's have precedence if + * both apply in order to determine initializations). + */ +*************** +*** 5493,5513 **** + int incl_open; /* include '{' at the end as terminator */ + int incl_comma; /* recognize a trailing comma */ + { +! char_u found_start = 0; +! unsigned n_open = 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 == '}' && n_open > 0) + --n_open; +! if (n_open == 0 + && (*s == ';' || *s == '}' || (incl_comma && *s == ',')) + && cin_nocode(s + 1)) + return *s; +--- 5493,5517 ---- + int incl_open; /* include '{' at the end as terminator */ + int incl_comma; /* recognize a trailing comma */ + { +! char_u found_start = 0; +! unsigned n_open = 0; +! int is_else = FALSE; + + s = cin_skipcomment(s); + + if (*s == '{' || (*s == '}' && !cin_iselse(s))) + found_start = *s; + ++ if (!found_start) ++ is_else = cin_iselse(s); ++ + while (*s) + { + /* skip over comments, "" strings and 'c'haracters */ + s = skip_string(cin_skipcomment(s)); + if (*s == '}' && n_open > 0) + --n_open; +! if ((!is_else || n_open == 0) + && (*s == ';' || *s == '}' || (incl_comma && *s == ',')) + && cin_nocode(s + 1)) + return *s; +*** ../vim-7.3.194/src/testdir/test3.in 2011-05-10 13:38:23.000000000 +0200 +--- src/testdir/test3.in 2011-05-19 16:29:01.000000000 +0200 +*************** +*** 1345,1351 **** + + STARTTEST + :set cino& +! 2kdd=][ + ENDTEST + + void func(void) +--- 1345,1351 ---- + + STARTTEST + :set cino& +! 2kdd=4][ + ENDTEST + + void func(void) +*************** +*** 1359,1364 **** +--- 1359,1392 ---- + printf("Foo!\n"); + } + ++ void func1(void) ++ { ++ char* tab[] = {"foo", "bar", ++ "baz", "quux", ++ "this line used", "to be indented incorrectly"}; ++ foo(); ++ } ++ ++ void func2(void) ++ { ++ int tab[] = ++ {1, 2, ++ 3, 4, ++ 5, 6}; ++ ++ printf("This line used to be indented incorrectly.\n"); ++ } ++ ++ void func3(void) ++ { ++ int tab[] = { ++ 1, 2, ++ 3, 4, ++ 5, 6}; ++ ++ printf("Don't you dare indent this line incorrectly!\n); ++ } ++ + STARTTEST + :set cino& + 2kdd=][ +*** ../vim-7.3.194/src/testdir/test3.ok 2011-05-10 13:38:23.000000000 +0200 +--- src/testdir/test3.ok 2011-05-19 16:29:01.000000000 +0200 +*************** +*** 1216,1221 **** +--- 1216,1249 ---- + printf("Foo!\n"); + } + ++ void func1(void) ++ { ++ char* tab[] = {"foo", "bar", ++ "baz", "quux", ++ "this line used", "to be indented incorrectly"}; ++ foo(); ++ } ++ ++ void func2(void) ++ { ++ int tab[] = ++ {1, 2, ++ 3, 4, ++ 5, 6}; ++ ++ printf("This line used to be indented incorrectly.\n"); ++ } ++ ++ void func3(void) ++ { ++ int tab[] = { ++ 1, 2, ++ 3, 4, ++ 5, 6}; ++ ++ printf("Don't you dare indent this line incorrectly!\n); ++ } ++ + + void func(void) + { +*** ../vim-7.3.194/src/version.c 2011-05-19 14:59:07.000000000 +0200 +--- src/version.c 2011-05-19 16:34:16.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 195, + /**/ + +-- +I AM THANKFUL... +...for the taxes that I pay because it means that I am employed. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b959a2d70974faf614df4727bc4ea57d208c66fc Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0369/3803] Patchlevel 196 --- 7.3.196 | 224 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 7.3.196 diff --git a/7.3.196 b/7.3.196 new file mode 100644 index 00000000..0d6be8c9 --- /dev/null +++ b/7.3.196 @@ -0,0 +1,224 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.196 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.196 +Problem: Can't intercept a character that is going to be inserted. +Solution: Add the InsertCharPre autocommand event. (Jakson A. Aquino) +Files: runtime/doc/autocmd.txt, runtime/doc/eval.txt, + runtime/doc/map.txt, src/edit.c, src/eval.c, src/fileio.c, + src/vim.h + + +*** ../mercurial/vim73/runtime/doc/autocmd.txt 2011-04-28 19:01:26.000000000 +0200 +--- runtime/doc/autocmd.txt 2011-05-19 17:12:17.000000000 +0200 +*************** +*** 299,304 **** +--- 299,306 ---- + |InsertEnter| starting Insert mode + |InsertChange| when typing while in Insert or Replace mode + |InsertLeave| when leaving Insert mode ++ |InsertCharPre| when a character was typed in Insert mode, before ++ inserting it + + |ColorScheme| after loading a color scheme + +*************** +*** 657,662 **** +--- 659,675 ---- + indicates the new mode. + Be careful not to move the cursor or do + anything else that the user does not expect. ++ *InsertCharPre* ++ InsertCharPre When a character is typed in Insert mode, ++ before inserting the char. ++ The |v:char| variable indicates the char typed ++ and can be changed during the event to insert ++ a different character. When |v:char| is set ++ to more than one character this text is ++ inserted literally. ++ It is not allowed to change the text |textlock|. ++ The event is not triggered when 'paste' is ++ set. + *InsertEnter* + InsertEnter Just before starting Insert mode. Also for + Replace mode and Virtual Replace mode. The +*** ../mercurial/vim73/runtime/doc/eval.txt 2011-05-19 12:22:41.000000000 +0200 +--- runtime/doc/eval.txt 2011-05-19 16:55:58.000000000 +0200 +*************** +*** 1293,1298 **** +--- 1293,1299 ---- + *v:char* *char-variable* + v:char Argument for evaluating 'formatexpr' and used for the typed + character when using in an abbreviation |:map-|. ++ It is also used by the |InsertPreChar| event. + + *v:charconvert_from* *charconvert_from-variable* + v:charconvert_from +*** ../mercurial/vim73/runtime/doc/map.txt 2011-05-10 17:17:38.000000000 +0200 +--- runtime/doc/map.txt 2011-05-19 16:40:34.000000000 +0200 +*************** +*** 226,232 **** + + For abbreviations |v:char| is set to the character that was typed to trigger + the abbreviation. You can use this to decide how to expand the {lhs}. You +! can't change v:char and you should not insert it. + + Be very careful about side effects! The expression is evaluated while + obtaining characters, you may very well make the command dysfunctional. +--- 226,232 ---- + + For abbreviations |v:char| is set to the character that was typed to trigger + the abbreviation. You can use this to decide how to expand the {lhs}. You +! you should not either insert or change the v:char. + + Be very careful about side effects! The expression is evaluated while + obtaining characters, you may very well make the command dysfunctional. +*** ../mercurial/vim73/src/edit.c 2011-05-10 14:22:10.000000000 +0200 +--- src/edit.c 2011-05-19 17:20:53.000000000 +0200 +*************** +*** 1381,1390 **** + goto do_intr; + #endif + + /* + * Insert a nomal character. + */ +! normalchar: + #ifdef FEAT_SMARTINDENT + /* Try to perform smart-indenting. */ + ins_try_si(c); +--- 1381,1425 ---- + goto do_intr; + #endif + ++ normalchar: + /* + * Insert a nomal character. + */ +! #ifdef FEAT_AUTOCMD +! if (!p_paste) +! { +! /* Trigger the InsertCharPre event. Lock the text to avoid +! * weird things from happening. */ +! set_vim_var_char(c); +! ++textlock; +! if (apply_autocmds(EVENT_INSERTCHARPRE, NULL, NULL, +! FALSE, curbuf)) +! { +! /* Get the new value of v:char. If it is more than one +! * character insert it literally. */ +! char_u *s = get_vim_var_str(VV_CHAR); +! if (MB_CHARLEN(s) > 1) +! { +! if (stop_arrow() != FAIL) +! { +! ins_str(s); +! AppendToRedobuffLit(s, -1); +! } +! c = NUL; +! } +! else +! c = PTR2CHAR(s); +! } +! +! set_vim_var_string(VV_CHAR, NULL, -1); +! --textlock; +! +! /* If the new value is an empty string then don't insert a +! * char. */ +! if (c == NUL) +! break; +! } +! #endif + #ifdef FEAT_SMARTINDENT + /* Try to perform smart-indenting. */ + ins_try_si(c); +*************** +*** 3491,3501 **** + return; + } + p += len; +! #ifdef FEAT_MBYTE +! c = mb_ptr2char(p); +! #else +! c = *p; +! #endif + ins_compl_addleader(c); + } + +--- 3526,3532 ---- + return; + } + p += len; +! c = PTR2CHAR(p); + ins_compl_addleader(c); + } + +*** ../mercurial/vim73/src/eval.c 2011-05-19 14:59:07.000000000 +0200 +--- src/eval.c 2011-05-19 16:40:39.000000000 +0200 +*************** +*** 352,358 **** + {VV_NAME("swapname", VAR_STRING), VV_RO}, + {VV_NAME("swapchoice", VAR_STRING), 0}, + {VV_NAME("swapcommand", VAR_STRING), VV_RO}, +! {VV_NAME("char", VAR_STRING), VV_RO}, + {VV_NAME("mouse_win", VAR_NUMBER), 0}, + {VV_NAME("mouse_lnum", VAR_NUMBER), 0}, + {VV_NAME("mouse_col", VAR_NUMBER), 0}, +--- 352,358 ---- + {VV_NAME("swapname", VAR_STRING), VV_RO}, + {VV_NAME("swapchoice", VAR_STRING), 0}, + {VV_NAME("swapcommand", VAR_STRING), VV_RO}, +! {VV_NAME("char", VAR_STRING), 0}, + {VV_NAME("mouse_win", VAR_NUMBER), 0}, + {VV_NAME("mouse_lnum", VAR_NUMBER), 0}, + {VV_NAME("mouse_col", VAR_NUMBER), 0}, +*** ../mercurial/vim73/src/fileio.c 2011-05-10 16:41:13.000000000 +0200 +--- src/fileio.c 2011-05-19 16:40:39.000000000 +0200 +*************** +*** 7662,7667 **** +--- 7662,7668 ---- + {"InsertChange", EVENT_INSERTCHANGE}, + {"InsertEnter", EVENT_INSERTENTER}, + {"InsertLeave", EVENT_INSERTLEAVE}, ++ {"InsertCharPre", EVENT_INSERTCHARPRE}, + {"MenuPopup", EVENT_MENUPOPUP}, + {"QuickFixCmdPost", EVENT_QUICKFIXCMDPOST}, + {"QuickFixCmdPre", EVENT_QUICKFIXCMDPRE}, +*** ../mercurial/vim73/src/vim.h 2011-05-10 16:41:13.000000000 +0200 +--- src/vim.h 2011-05-19 16:40:39.000000000 +0200 +*************** +*** 1274,1279 **** +--- 1274,1280 ---- + EVENT_WINENTER, /* after entering a window */ + EVENT_WINLEAVE, /* before leaving a window */ + EVENT_ENCODINGCHANGED, /* after changing the 'encoding' option */ ++ EVENT_INSERTCHARPRE, /* before inserting a char */ + EVENT_CURSORHOLD, /* cursor in same position for a while */ + EVENT_CURSORHOLDI, /* idem, in Insert mode */ + EVENT_FUNCUNDEFINED, /* if calling a function which doesn't exist */ +*** ../vim-7.3.195/src/version.c 2011-05-19 16:35:05.000000000 +0200 +--- src/version.c 2011-05-19 17:15:41.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 196, + /**/ + +-- +I AM THANKFUL... +...for the mess to clean after a party because it means I have +been surrounded by friends. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 800059e7f967dd2fe99c21a46ce9ac46da2f2acd Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0370/3803] Patchlevel 197 --- 7.3.197 | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 7.3.197 diff --git a/7.3.197 b/7.3.197 new file mode 100644 index 00000000..c33a2cb2 --- /dev/null +++ b/7.3.197 @@ -0,0 +1,78 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.197 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.197 +Problem: When a QuickfixCmdPost event removes all errors, Vim still tries + to jump to the first error, resulting in E42. +Solution: Get the number of error after the autocmd event. (Mike Lundy) +Files: src/quickfix.c + + +*** ../mercurial/vim73/src/quickfix.c 2011-05-10 16:41:13.000000000 +0200 +--- src/quickfix.c 2011-05-19 17:34:11.000000000 +0200 +*************** +*** 2813,2829 **** + (eap->cmdidx != CMD_grepadd + && eap->cmdidx != CMD_lgrepadd), + *eap->cmdlinep); + #ifdef FEAT_AUTOCMD + if (au_name != NULL) + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, + curbuf->b_fname, TRUE, curbuf); + #endif + if (res > 0 && !eap->forceit) +- { +- if (wp != NULL) +- qi = GET_LOC_LIST(wp); + qf_jump(qi, 0, 0, FALSE); /* display first error */ +- } + + mch_remove(fname); + vim_free(fname); +--- 2813,2833 ---- + (eap->cmdidx != CMD_grepadd + && eap->cmdidx != CMD_lgrepadd), + *eap->cmdlinep); ++ if (wp != NULL) ++ qi = GET_LOC_LIST(wp); + #ifdef FEAT_AUTOCMD + if (au_name != NULL) ++ { + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, + curbuf->b_fname, TRUE, curbuf); ++ if (qi->qf_curlist < qi->qf_listcount) ++ res = qi->qf_lists[qi->qf_curlist].qf_count; ++ else ++ res = 0; ++ } + #endif + if (res > 0 && !eap->forceit) + qf_jump(qi, 0, 0, FALSE); /* display first error */ + + mch_remove(fname); + vim_free(fname); +*** ../vim-7.3.196/src/version.c 2011-05-19 17:25:36.000000000 +0200 +--- src/version.c 2011-05-19 17:41:50.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 197, + /**/ + +-- +I AM THANKFUL... +...for the clothes that fit a little too snug because it +means I have more than enough to eat. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From c8dfdac0a52cc17ab9339d8785aaca554399e850 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0371/3803] Patchlevel 198 --- 7.3.198 | 403 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 403 insertions(+) create mode 100644 7.3.198 diff --git a/7.3.198 b/7.3.198 new file mode 100644 index 00000000..5ef4a8aa --- /dev/null +++ b/7.3.198 @@ -0,0 +1,403 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.198 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.198 +Problem: No completion for ":lang". +Solution: Get locales to complete from. (Dominique Pelle) +Files: src/eval.c, src/ex_cmds2.c, src/ex_getln.c, + src/proto/ex_cmds2.pro, src/proto/ex_getln.pro, src/vim.h + + +*** ../mercurial/vim73/src/eval.c 2011-05-19 17:25:36.000000000 +0200 +--- src/eval.c 2011-05-19 17:52:02.000000000 +0200 +*************** +*** 911,916 **** +--- 911,917 ---- + hash_clear(&compat_hashtab); + + free_scriptnames(); ++ free_locales(); + + /* global variables */ + vars_clear(&globvarht); +*** ../mercurial/vim73/src/ex_cmds2.c 2011-05-10 16:41:13.000000000 +0200 +--- src/ex_cmds2.c 2011-05-19 18:16:54.000000000 +0200 +*************** +*** 1476,1482 **** + #endif + + /* +! * Ask the user what to do when abondoning a changed buffer. + * Must check 'write' option first! + */ + void +--- 1476,1482 ---- + #endif + + /* +! * Ask the user what to do when abandoning a changed buffer. + * Must check 'write' option first! + */ + void +*************** +*** 4153,4158 **** +--- 4153,4234 ---- + } + + # if defined(FEAT_CMDL_COMPL) || defined(PROTO) ++ ++ static char_u **locales = NULL; /* Array of all available locales */ ++ static int did_init_locales = FALSE; ++ ++ static void init_locales __ARGS((void)); ++ static char_u **find_locales __ARGS((void)); ++ ++ /* ++ * Lazy initialization of all available locales. ++ */ ++ static void ++ init_locales() ++ { ++ if (!did_init_locales) ++ { ++ did_init_locales = TRUE; ++ locales = find_locales(); ++ } ++ } ++ ++ /* Return an array of strings for all available locales + NULL for the ++ * last element. Return NULL in case of error. */ ++ static char_u ** ++ find_locales() ++ { ++ garray_T locales_ga; ++ char_u *loc; ++ ++ /* Find all available locales by running command "locale -a". If this ++ * doesn't work we won't have completion. */ ++ char_u *locale_a = get_cmd_output((char_u *)"locale -a", ++ NULL, SHELL_SILENT); ++ if (locale_a == NULL) ++ return NULL; ++ ga_init2(&locales_ga, sizeof(char_u *), 20); ++ ++ /* Transform locale_a string where each locale is separated by "\n" ++ * into an array of locale strings. */ ++ loc = (char_u *)strtok((char *)locale_a, "\n"); ++ ++ while (loc != NULL) ++ { ++ if (ga_grow(&locales_ga, 1) == FAIL) ++ break; ++ loc = vim_strsave(loc); ++ if (loc == NULL) ++ break; ++ ++ ((char_u **)locales_ga.ga_data)[locales_ga.ga_len++] = loc; ++ loc = (char_u *)strtok(NULL, "\n"); ++ } ++ vim_free(locale_a); ++ if (ga_grow(&locales_ga, 1) == FAIL) ++ { ++ ga_clear(&locales_ga); ++ return NULL; ++ } ++ ((char_u **)locales_ga.ga_data)[locales_ga.ga_len] = NULL; ++ return (char_u **)locales_ga.ga_data; ++ } ++ ++ # if defined(EXITFREE) || defined(PROTO) ++ void ++ free_locales() ++ { ++ int i; ++ if (locales != NULL) ++ { ++ for (i = 0; locales[i] != NULL; i++) ++ vim_free(locales[i]); ++ vim_free(locales); ++ locales = NULL; ++ } ++ } ++ # endif ++ + /* + * Function given to ExpandGeneric() to obtain the possible arguments of the + * ":language" command. +*************** +*** 4168,4174 **** + return (char_u *)"ctype"; + if (idx == 2) + return (char_u *)"time"; +! return NULL; + } + # endif + +--- 4244,4268 ---- + return (char_u *)"ctype"; + if (idx == 2) + return (char_u *)"time"; +! +! init_locales(); +! if (locales == NULL) +! return NULL; +! return locales[idx - 3]; +! } +! +! /* +! * Function given to ExpandGeneric() to obtain the available locales. +! */ +! char_u * +! get_locales(xp, idx) +! expand_T *xp UNUSED; +! int idx; +! { +! init_locales(); +! if (locales == NULL) +! return NULL; +! return locales[idx]; + } + # endif + +*** ../mercurial/vim73/src/ex_getln.c 2011-05-19 14:50:49.000000000 +0200 +--- src/ex_getln.c 2011-05-19 18:18:49.000000000 +0200 +*************** +*** 4571,4618 **** + int context; + char_u *((*func)__ARGS((expand_T *, int))); + int ic; + } tab[] = + { +! {EXPAND_COMMANDS, get_command_name, FALSE}, +! {EXPAND_BEHAVE, get_behave_arg, TRUE}, + #ifdef FEAT_USR_CMDS +! {EXPAND_USER_COMMANDS, get_user_commands, FALSE}, +! {EXPAND_USER_CMD_FLAGS, get_user_cmd_flags, FALSE}, +! {EXPAND_USER_NARGS, get_user_cmd_nargs, FALSE}, +! {EXPAND_USER_COMPLETE, get_user_cmd_complete, FALSE}, + #endif + #ifdef FEAT_EVAL +! {EXPAND_USER_VARS, get_user_var_name, FALSE}, +! {EXPAND_FUNCTIONS, get_function_name, FALSE}, +! {EXPAND_USER_FUNC, get_user_func_name, FALSE}, +! {EXPAND_EXPRESSION, get_expr_name, FALSE}, + #endif + #ifdef FEAT_MENU +! {EXPAND_MENUS, get_menu_name, FALSE}, +! {EXPAND_MENUNAMES, get_menu_names, FALSE}, + #endif + #ifdef FEAT_SYN_HL +! {EXPAND_SYNTAX, get_syntax_name, TRUE}, + #endif +! {EXPAND_HIGHLIGHT, get_highlight_name, TRUE}, + #ifdef FEAT_AUTOCMD +! {EXPAND_EVENTS, get_event_name, TRUE}, +! {EXPAND_AUGROUP, get_augroup_name, TRUE}, + #endif + #ifdef FEAT_CSCOPE +! {EXPAND_CSCOPE, get_cscope_name, TRUE}, + #endif + #ifdef FEAT_SIGNS +! {EXPAND_SIGN, get_sign_name, TRUE}, + #endif + #ifdef FEAT_PROFILE +! {EXPAND_PROFILE, get_profile_name, TRUE}, + #endif + #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ + && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) +! {EXPAND_LANGUAGE, get_lang_arg, TRUE}, + #endif +! {EXPAND_ENV_VARS, get_env_name, TRUE}, + }; + int i; + +--- 4571,4620 ---- + int context; + char_u *((*func)__ARGS((expand_T *, int))); + int ic; ++ int escaped; + } tab[] = + { +! {EXPAND_COMMANDS, get_command_name, FALSE, TRUE}, +! {EXPAND_BEHAVE, get_behave_arg, TRUE, TRUE}, + #ifdef FEAT_USR_CMDS +! {EXPAND_USER_COMMANDS, get_user_commands, FALSE, TRUE}, +! {EXPAND_USER_CMD_FLAGS, get_user_cmd_flags, FALSE, TRUE}, +! {EXPAND_USER_NARGS, get_user_cmd_nargs, FALSE, TRUE}, +! {EXPAND_USER_COMPLETE, get_user_cmd_complete, FALSE, TRUE}, + #endif + #ifdef FEAT_EVAL +! {EXPAND_USER_VARS, get_user_var_name, FALSE, TRUE}, +! {EXPAND_FUNCTIONS, get_function_name, FALSE, TRUE}, +! {EXPAND_USER_FUNC, get_user_func_name, FALSE, TRUE}, +! {EXPAND_EXPRESSION, get_expr_name, FALSE, TRUE}, + #endif + #ifdef FEAT_MENU +! {EXPAND_MENUS, get_menu_name, FALSE, TRUE}, +! {EXPAND_MENUNAMES, get_menu_names, FALSE, TRUE}, + #endif + #ifdef FEAT_SYN_HL +! {EXPAND_SYNTAX, get_syntax_name, TRUE, TRUE}, + #endif +! {EXPAND_HIGHLIGHT, get_highlight_name, TRUE, TRUE}, + #ifdef FEAT_AUTOCMD +! {EXPAND_EVENTS, get_event_name, TRUE, TRUE}, +! {EXPAND_AUGROUP, get_augroup_name, TRUE, TRUE}, + #endif + #ifdef FEAT_CSCOPE +! {EXPAND_CSCOPE, get_cscope_name, TRUE, TRUE}, + #endif + #ifdef FEAT_SIGNS +! {EXPAND_SIGN, get_sign_name, TRUE, TRUE}, + #endif + #ifdef FEAT_PROFILE +! {EXPAND_PROFILE, get_profile_name, TRUE, TRUE}, + #endif + #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ + && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) +! {EXPAND_LANGUAGE, get_lang_arg, TRUE, FALSE}, +! {EXPAND_LOCALES, get_locales, TRUE, FALSE}, + #endif +! {EXPAND_ENV_VARS, get_env_name, TRUE, TRUE}, + }; + int i; + +*************** +*** 4626,4632 **** + { + if (tab[i].ic) + regmatch.rm_ic = TRUE; +! ret = ExpandGeneric(xp, ®match, num_file, file, tab[i].func); + break; + } + } +--- 4628,4635 ---- + { + if (tab[i].ic) + regmatch.rm_ic = TRUE; +! ret = ExpandGeneric(xp, ®match, num_file, file, +! tab[i].func, tab[i].escaped); + break; + } + } +*************** +*** 4648,4660 **** + * Returns OK when no problems encountered, FAIL for error (out of memory). + */ + int +! ExpandGeneric(xp, regmatch, num_file, file, func) + expand_T *xp; + regmatch_T *regmatch; + int *num_file; + char_u ***file; + char_u *((*func)__ARGS((expand_T *, int))); + /* returns a string from the list */ + { + int i; + int count = 0; +--- 4651,4664 ---- + * Returns OK when no problems encountered, FAIL for error (out of memory). + */ + int +! ExpandGeneric(xp, regmatch, num_file, file, func, escaped) + expand_T *xp; + regmatch_T *regmatch; + int *num_file; + char_u ***file; + char_u *((*func)__ARGS((expand_T *, int))); + /* returns a string from the list */ ++ int escaped; + { + int i; + int count = 0; +*************** +*** 4679,4685 **** + { + if (round) + { +! str = vim_strsave_escaped(str, (char_u *)" \t\\."); + (*file)[count] = str; + #ifdef FEAT_MENU + if (func == get_menu_names && str != NULL) +--- 4683,4692 ---- + { + if (round) + { +! if (escaped) +! str = vim_strsave_escaped(str, (char_u *)" \t\\."); +! else +! str = vim_strsave(str); + (*file)[count] = str; + #ifdef FEAT_MENU + if (func == get_menu_names && str != NULL) +*** ../mercurial/vim73/src/proto/ex_cmds2.pro 2010-05-15 21:22:11.000000000 +0200 +--- src/proto/ex_cmds2.pro 2011-05-19 17:53:52.000000000 +0200 +*************** +*** 83,87 **** +--- 83,89 ---- + char_u *get_mess_lang __ARGS((void)); + void set_lang_var __ARGS((void)); + void ex_language __ARGS((exarg_T *eap)); ++ void free_locales __ARGS((void)); + char_u *get_lang_arg __ARGS((expand_T *xp, int idx)); ++ char_u *get_locales __ARGS((expand_T *xp, int idx)); + /* vim: set ft=c : */ +*** ../mercurial/vim73/src/proto/ex_getln.pro 2010-08-16 21:23:30.000000000 +0200 +--- src/proto/ex_getln.pro 2011-05-19 17:54:00.000000000 +0200 +*************** +*** 31,37 **** + char_u *addstar __ARGS((char_u *fname, int len, int context)); + void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); + int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches)); +! int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)))); + char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options)); + void init_history __ARGS((void)); + int get_histtype __ARGS((char_u *name)); +--- 31,37 ---- + char_u *addstar __ARGS((char_u *fname, int len, int context)); + void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); + int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches)); +! int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)), int escaped)); + char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options)); + void init_history __ARGS((void)); + int get_histtype __ARGS((char_u *name)); +*** ../mercurial/vim73/src/vim.h 2011-05-19 17:25:36.000000000 +0200 +--- src/vim.h 2011-05-19 17:52:02.000000000 +0200 +*************** +*** 779,784 **** +--- 779,785 ---- + #define EXPAND_FILETYPE 37 + #define EXPAND_FILES_IN_PATH 38 + #define EXPAND_OWNSYNTAX 39 ++ #define EXPAND_LOCALES 40 + + /* Values for exmode_active (0 is no exmode) */ + #define EXMODE_NORMAL 1 +*** ../vim-7.3.197/src/version.c 2011-05-19 17:42:54.000000000 +0200 +--- src/version.c 2011-05-19 18:24:58.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 198, + /**/ + +-- +The primary purpose of the DATA statement is to give names to constants; +instead of referring to pi as 3.141592653589793 at every appearance, the +variable PI can be given that value with a DATA statement and used instead +of the longer form of the constant. This also simplifies modifying the +program, should the value of pi change. + -- FORTRAN manual for Xerox Computers + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From bc8ae9c166f59dc8f9e8d1ce61d19bf9991610fd Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0372/3803] Patchlevel 199 --- 7.3.199 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 7.3.199 diff --git a/7.3.199 b/7.3.199 new file mode 100644 index 00000000..8bdd97ab --- /dev/null +++ b/7.3.199 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.199 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.199 +Problem: MS-Windows: Compilation problem of OLE with MingW compiler. +Solution: Put #ifdef around declarations. (Guopeng Wen) +Files: src/if_ole.h + + +*** ../mercurial/vim73/src/if_ole.h 2010-05-15 21:22:11.000000000 +0200 +--- src/if_ole.h 2011-05-25 12:05:50.000000000 +0200 +*************** +*** 46,53 **** + /* header files for imported files */ + #include "oaidl.h" + +! void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +! void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + + #ifndef __IVim_INTERFACE_DEFINED__ + #define __IVim_INTERFACE_DEFINED__ +--- 46,56 ---- + /* header files for imported files */ + #include "oaidl.h" + +! #ifndef __MIDL_user_allocate_free_DEFINED__ +! #define __MIDL_user_allocate_free_DEFINED__ +! void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +! void __RPC_USER MIDL_user_free( void __RPC_FAR * ); +! #endif + + #ifndef __IVim_INTERFACE_DEFINED__ + #define __IVim_INTERFACE_DEFINED__ +*** ../vim-7.3.198/src/version.c 2011-05-19 18:26:34.000000000 +0200 +--- src/version.c 2011-05-25 12:08:54.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 199, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +104. When people ask about the Presidential Election you ask "Which country?" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a6915916af146fa61f1f3a57051c28846c7bcac9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0373/3803] Patchlevel 200 --- 7.3.200 | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 7.3.200 diff --git a/7.3.200 b/7.3.200 new file mode 100644 index 00000000..60194711 --- /dev/null +++ b/7.3.200 @@ -0,0 +1,75 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.200 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.200 (after 7.3.198) +Problem: CTRL-D doesn't complete :lang. +Solution: Add the missing part of the change. (Dominique Pelle) +Files: src/ex_docmd.c + + +*** ../mercurial/vim73/src/ex_docmd.c 2011-05-19 14:50:49.000000000 +0200 +--- src/ex_docmd.c 2011-05-25 12:45:02.000000000 +0200 +*************** +*** 3861,3873 **** + #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ + && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) + case CMD_language: +! if (*skiptowhite(arg) == NUL) + { + xp->xp_context = EXPAND_LANGUAGE; + xp->xp_pattern = arg; + } + else +! xp->xp_context = EXPAND_NOTHING; + break; + #endif + #if defined(FEAT_PROFILE) +--- 3861,3884 ---- + #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ + && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) + case CMD_language: +! p = skiptowhite(arg); +! if (*p == NUL) + { + xp->xp_context = EXPAND_LANGUAGE; + xp->xp_pattern = arg; + } + else +! { +! if ( STRNCMP(arg, "messages", p - arg) == 0 +! || STRNCMP(arg, "ctype", p - arg) == 0 +! || STRNCMP(arg, "time", p - arg) == 0) +! { +! xp->xp_context = EXPAND_LOCALES; +! xp->xp_pattern = skipwhite(p); +! } +! else +! xp->xp_context = EXPAND_NOTHING; +! } + break; + #endif + #if defined(FEAT_PROFILE) +*** ../vim-7.3.199/src/version.c 2011-05-25 12:09:46.000000000 +0200 +--- src/version.c 2011-05-25 12:49:49.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 200, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +105. When someone asks you for your address, you tell them your URL. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ace2dcc32b13acd3d9af0a8052934d9dd681abf5 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0374/3803] Patchlevel 201 --- 7.3.201 | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 7.3.201 diff --git a/7.3.201 b/7.3.201 new file mode 100644 index 00000000..0481afd8 --- /dev/null +++ b/7.3.201 @@ -0,0 +1,124 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.201 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.201 (after 7.3.195) +Problem: "} else" still causes following lines to be indented too much. +Solution: Better detection for the "else" block. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../mercurial/vim73/src/misc1.c 2011-05-19 16:35:05.000000000 +0200 +--- src/misc1.c 2011-05-25 13:29:45.000000000 +0200 +*************** +*** 7541,7557 **** + + /* + * When searching for a terminated line, don't use the +! * one between the "if" and the "else". + * Need to use the scope of this "else". XXX + * If whilelevel != 0 continue looking for a "do {". + */ +! if (cin_iselse(l) +! && whilelevel == 0 +! && ((trypos = find_start_brace(ind_maxcomment)) +! == NULL + || find_match(LOOKFOR_IF, trypos->lnum, +! ind_maxparen, ind_maxcomment) == FAIL)) +! break; + } + + /* +--- 7541,7565 ---- + + /* + * When searching for a terminated line, don't use the +! * one between the "if" and the matching "else". + * Need to use the scope of this "else". XXX + * If whilelevel != 0 continue looking for a "do {". + */ +! if (cin_iselse(l) && whilelevel == 0) +! { +! /* If we're looking at "} else", let's make sure we +! * find the opening brace of the enclosing scope, +! * not the one from "if () {". */ +! if (*l == '}') +! curwin->w_cursor.col = +! (l - ml_get_curline()) + 1; +! +! if ((trypos = find_start_brace(ind_maxcomment)) +! == NULL + || find_match(LOOKFOR_IF, trypos->lnum, +! ind_maxparen, ind_maxcomment) == FAIL) +! break; +! } + } + + /* +*** ../mercurial/vim73/src/testdir/test3.in 2011-05-19 16:35:05.000000000 +0200 +--- src/testdir/test3.in 2011-05-25 13:23:51.000000000 +0200 +*************** +*** 1413,1418 **** +--- 1413,1433 ---- + } + + STARTTEST ++ :set cino& ++ 2kdd=][ ++ ENDTEST ++ ++ void func(void) ++ { ++ for (int i = 0; i < 10; ++i) ++ if (i & 1) { ++ foo(1); ++ } else ++ foo(0); ++ baz(); ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../mercurial/vim73/src/testdir/test3.ok 2011-05-19 16:35:05.000000000 +0200 +--- src/testdir/test3.ok 2011-05-25 13:23:51.000000000 +0200 +*************** +*** 1262,1264 **** +--- 1262,1275 ---- + foo(); + } + ++ ++ void func(void) ++ { ++ for (int i = 0; i < 10; ++i) ++ if (i & 1) { ++ foo(1); ++ } else ++ foo(0); ++ baz(); ++ } ++ +*** ../vim-7.3.200/src/version.c 2011-05-25 12:51:17.000000000 +0200 +--- src/version.c 2011-05-25 13:33:16.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 201, + /**/ + +-- +Laughing helps. It's like jogging on the inside. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 3b552b01c35fe845a5a2d884cd4ab605a116e04a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0375/3803] Patchlevel 202 --- 7.3.202 | 858 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 858 insertions(+) create mode 100644 7.3.202 diff --git a/7.3.202 b/7.3.202 new file mode 100644 index 00000000..087cb4b6 --- /dev/null +++ b/7.3.202 @@ -0,0 +1,858 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.202 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.202 +Problem: Cannot influence the indent inside a namespace. +Solution: Add the "N" 'cino' parameter. (Konstantin Lepa) +Files: runtime/doc/indent.txt, src/misc1.c, src/testdir/test3.in, + src/testdir/test3.ok + + +*** ../mercurial/vim73/runtime/doc/indent.txt 2011-04-28 19:01:26.000000000 +0200 +--- runtime/doc/indent.txt 2011-05-25 14:35:37.000000000 +0200 +*************** +*** 128,140 **** + used CTRL-T or CTRL-D. + + *cinoptions-values* +! The 'cinoptions' option sets how Vim performs indentation. In the list below, + "N" represents a number of your choice (the number can be negative). When + there is an 's' after the number, Vim multiplies the number by 'shiftwidth': + "1s" is 'shiftwidth', "2s" is two times 'shiftwidth', etc. You can use a +! decimal point, too: "-0.5s" is minus half a 'shiftwidth'. The examples below +! assume a 'shiftwidth' of 4. +! + >N Amount added for "normal" indent. Used after a line that should + increase the indent (lines starting with "if", an opening brace, + etc.). (default 'shiftwidth'). +--- 128,147 ---- + used CTRL-T or CTRL-D. + + *cinoptions-values* +! The 'cinoptions' option sets how Vim performs indentation. The value after +! the option character can be one of these (N is any number): +! N indent N spaces +! -N indent N spaces to the left +! Ns N times 'shiftwidth spaces +! -Ns N times 'shiftwidth spaces to the left +! +! In the list below, + "N" represents a number of your choice (the number can be negative). When + there is an 's' after the number, Vim multiplies the number by 'shiftwidth': + "1s" is 'shiftwidth', "2s" is two times 'shiftwidth', etc. You can use a +! decimal point, too: "-0.5s" is minus half a 'shiftwidth'. +! The examples below assume a 'shiftwidth' of 4. +! *cino->* + >N Amount added for "normal" indent. Used after a line that should + increase the indent (lines starting with "if", an opening brace, + etc.). (default 'shiftwidth'). +*************** +*** 145,150 **** +--- 152,158 ---- + foo; foo; foo; + } } } + < ++ *cino-e* + eN Add N to the prevailing indent inside a set of braces if the + opening brace at the End of the line (more precise: is not the + first character in a line). This is useful if you want a +*************** +*** 160,165 **** +--- 168,174 ---- + bar; bar; bar; + } } } + < ++ *cino-n* + nN Add N to the prevailing indent for a statement after an "if", + "while", etc., if it is NOT inside a set of braces. This is + useful if you want a different indent when there is no '{' +*************** +*** 174,179 **** +--- 183,189 ---- + bar; bar; bar; + } } } + < ++ *cino-f* + fN Place the first opening brace of a function or other block in + column N. This applies only for an opening brace that is not + inside other braces and is at the start of the line. What comes +*************** +*** 184,189 **** +--- 194,200 ---- + { { { + int foo; int foo; int foo; + < ++ *cino-{* + {N Place opening braces N characters from the prevailing indent. + This applies only for opening braces that are inside other + braces. (default 0). +*************** +*** 193,198 **** +--- 204,210 ---- + { { { + foo; foo; foo; + < ++ *cino-}* + }N Place closing braces N characters from the matching opening + brace. (default 0). + +*************** +*** 202,207 **** +--- 214,220 ---- + foo; foo; foo; + } } } + < ++ *cino-^* + ^N Add N to the prevailing indent inside a set of braces if the + opening brace is in column 0. This can specify a different + indent for whole of a function (some may like to set it to a +*************** +*** 216,221 **** +--- 229,235 ---- + } } } + } } } + < ++ *cino-L* + LN Controls placement of jump labels. If N is negative, the label + will be placed at column 1. If N is non-negative, the indent of + the label will be the prevailing indent minus N. (default -1). +*************** +*** 229,234 **** +--- 243,249 ---- + } } } + } } } + < ++ *cino-:* + :N Place case labels N characters from the indent of the switch(). + (default 'shiftwidth'). + +*************** +*** 240,245 **** +--- 255,261 ---- + default: default: + } } + < ++ *cino-=* + =N Place statements occurring after a case label N characters from + the indent of the label. (default 'shiftwidth'). + +*************** +*** 247,252 **** +--- 263,269 ---- + case 11: case 11: a = a + 1; + a = a + 1; b = b + 1; + < ++ *cino-l* + lN If N != 0 Vim will align with a case label instead of the + statement after it in the same line. + +*************** +*** 272,277 **** +--- 290,296 ---- + break; break; + } } + < ++ *cino-g* + 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:". +*************** +*** 283,288 **** +--- 302,308 ---- + private: private: + } } + < ++ *cino-h* + hN Place statements occurring after a C++ scope declaration N + characters from the indent of the label. (default + 'shiftwidth'). +*************** +*** 291,296 **** +--- 311,331 ---- + public: public: a = a + 1; + a = a + 1; b = b + 1; + < ++ *cino-N* ++ NN Indent inside C++ namespace N characters extra compared to a ++ normal block. (default 0). ++ ++ cino= cino=N-s > ++ namespace { namespace { ++ void function(); void function(); ++ } } ++ ++ namespace my namespace my ++ { { ++ void function(); void function(); ++ } } ++ < ++ *cino-p* + pN Parameter declarations for K&R-style function declarations will + be indented N characters from the margin. (default + 'shiftwidth'). +*************** +*** 300,305 **** +--- 335,341 ---- + int a; int a; int a; + char b; char b; char b; + < ++ *cino-t* + tN Indent a function return type declaration N characters from the + margin. (default 'shiftwidth'). + +*************** +*** 307,312 **** +--- 343,349 ---- + int int int + func() func() func() + < ++ *cino-i* + iN Indent C++ base class declarations and constructor + initializations, if they start in a new line (otherwise they + are aligned at the right side of the ':'). +*************** +*** 330,335 **** +--- 368,374 ---- + a = b + 9 * a = b + 9 * + c; c; + < ++ *cino-c* + cN Indent comment lines after the comment opener, when there is no + other text with which to align, N characters from the comment + opener. (default 3). See also |format-comments|. +*************** +*** 339,344 **** +--- 378,384 ---- + text. text. + */ */ + < ++ *cino-C* + CN When N is non-zero, indent comment lines by the amount specified + with the c flag above even if there is other text behind the + comment opener. (default 0). +*************** +*** 349,360 **** +--- 389,402 ---- + ********/ ********/ + < (Example uses ":set comments& comments-=s1:/* comments^=s0:/*") + ++ *cino-/* + /N Indent comment lines N characters extra. (default 0). + cino= cino=/4 > + a = b; a = b; + /* comment */ /* comment */ + c = d; c = d; + < ++ *cino-(* + (N When in unclosed parentheses, indent N characters from the line + with the unclosed parentheses. Add a 'shiftwidth' for every + unclosed parentheses. When N is 0 or the unclosed parentheses +*************** +*** 370,375 **** +--- 412,418 ---- + (c2 || c3)) (c2 || c3)) + { { + < ++ *cino-u* + uN Same as (N, but for one level deeper. (default 'shiftwidth'). + + cino= cino=u2 > +*************** +*** 377,382 **** +--- 420,426 ---- + && (c22345 && (c22345 + || c3)) || c3)) + < ++ *cino-U* + UN When N is non-zero, do not ignore the indenting specified by + ( or u in case that the unclosed parentheses is the first + non-white character in its line. (default 0). +*************** +*** 388,393 **** +--- 432,438 ---- + c3 c3 + ) && c4; ) && c4; + < ++ *cino-2* + wN When in unclosed parentheses and N is non-zero and either + using "(0" or "u0", respectively, or using "U0" and the unclosed + parentheses is the first non-white character in its line, line +*************** +*** 400,405 **** +--- 445,451 ---- + || c3)) || c3)) + foo; foo; + < ++ *cino-W* + 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 +*************** +*** 414,419 **** +--- 460,466 ---- + a_short_line(argument, a_short_line(argument, + argument); argument); + < ++ *cino-m* + mN When N is non-zero, line up a line starting with a closing + parentheses with the first character of the line with the + matching opening parentheses. (default 0). +*************** +*** 428,433 **** +--- 475,481 ---- + ) ) + foo; foo; + < ++ *cino-M* + MN When N is non-zero, line up a line starting with a closing + parentheses with the first character of the previous line. + (default 0). +*************** +*** 437,443 **** + cond2 cond2 + ) ) + < +! *java-cinoptions* *java-indenting* + jN Indent java anonymous classes correctly. The value 'N' is + currently unused but must be non-zero (e.g. 'j1'). 'j1' will + indent for example the following code snippet correctly: > +--- 485,491 ---- + cond2 cond2 + ) ) + < +! *java-cinoptions* *java-indenting* *cino-j* + jN Indent java anonymous classes correctly. The value 'N' is + currently unused but must be non-zero (e.g. 'j1'). 'j1' will + indent for example the following code snippet correctly: > +*************** +*** 448,454 **** + } + }); + < +! *javascript-cinoptions* *javascript-indenting* + JN Indent JavaScript object declarations correctly by not confusing + them with labels. The value 'N' is currently unused but must be + non-zero (e.g. 'J1'). > +--- 496,502 ---- + } + }); + < +! *javascript-cinoptions* *javascript-indenting* *cino-J* + JN Indent JavaScript object declarations correctly by not confusing + them with labels. The value 'N' is currently unused but must be + non-zero (e.g. 'J1'). > +*************** +*** 483,489 **** + + + The defaults, spelled out in full, are: +! cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,ps,ts,is,+s, + c3,C0,/0,(2s,us,U0,w0,W0,m0,j0,J0,)20,*70,#0 + + Vim puts a line in column 1 if: +--- 534,540 ---- + + + The defaults, spelled out in full, are: +! cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,ps,ts,is,+s, + c3,C0,/0,(2s,us,U0,w0,W0,m0,j0,J0,)20,*70,#0 + + Vim puts a line in column 1 if: +*** ../mercurial/vim73/src/misc1.c 2011-05-25 13:33:59.000000000 +0200 +--- src/misc1.c 2011-05-25 14:57:31.000000000 +0200 +*************** +*** 4959,4964 **** +--- 4959,4965 ---- + 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)); ++ static int cin_is_cpp_namespace __ARGS((char_u *)); + + static int ind_hash_comment = 0; /* # starts a comment */ + +*************** +*** 5221,5226 **** +--- 5222,5271 ---- + return (*(s = cin_skipcomment(s + i)) == ':' && s[1] != ':'); + } + ++ /* Maximum number of lines to search back for a "namespace" line. */ ++ #define FIND_NAMESPACE_LIM 20 ++ ++ /* ++ * Recognize a "namespace" scope declaration. ++ */ ++ static int ++ cin_is_cpp_namespace(s) ++ char_u *s; ++ { ++ char_u *p; ++ int has_name = FALSE; ++ ++ s = cin_skipcomment(s); ++ if (STRNCMP(s, "namespace", 9) == 0 && (s[9] == NUL || !vim_iswordc(s[9]))) ++ { ++ p = cin_skipcomment(skipwhite(s + 9)); ++ while (*p != NUL) ++ { ++ if (vim_iswhite(*p)) ++ { ++ has_name = TRUE; /* found end of a name */ ++ p = cin_skipcomment(skipwhite(p)); ++ } ++ else if (*p == '{') ++ { ++ break; ++ } ++ else if (vim_iswordc(*p)) ++ { ++ if (has_name) ++ return FALSE; /* word character after skipping past name */ ++ ++p; ++ } ++ else ++ { ++ return FALSE; ++ } ++ } ++ return TRUE; ++ } ++ return FALSE; ++ } ++ + /* + * Return a pointer to the first non-empty non-comment character after a ':'. + * Return NULL if not found. +*************** +*** 6296,6301 **** +--- 6341,6351 ---- + */ + int ind_keep_case_label = 0; + ++ /* ++ * handle C++ namespace ++ */ ++ int ind_cpp_namespace = 0; ++ + pos_T cur_curpos; + int amount; + int scope_amount; +*************** +*** 6336,6341 **** +--- 6386,6392 ---- + int n; + int iscase; + int lookfor_break; ++ int lookfor_cpp_namespace = FALSE; + int cont_amount = 0; /* amount for continuation line */ + int original_line_islabel; + +*************** +*** 6409,6414 **** +--- 6460,6466 ---- + case 'J': ind_js = n; break; + case 'l': ind_keep_case_label = n; break; + case '#': ind_hash_comment = n; break; ++ case 'N': ind_cpp_namespace = n; break; + } + if (*options == ',') + ++options; +*************** +*** 6976,6986 **** +--- 7028,7051 ---- + if (start_brace == BRACE_IN_COL0) /* '{' is in column 0 */ + { + amount = ind_open_left_imag; ++ lookfor_cpp_namespace = TRUE; ++ } ++ else if (start_brace == BRACE_AT_START && ++ lookfor_cpp_namespace) /* '{' is at start */ ++ { ++ ++ lookfor_cpp_namespace = TRUE; + } + else + { + if (start_brace == BRACE_AT_END) /* '{' is at end of line */ ++ { + amount += ind_open_imag; ++ ++ l = skipwhite(ml_get_curline()); ++ if (cin_is_cpp_namespace(l)) ++ amount += ind_cpp_namespace; ++ } + else + { + /* Compensate for adding ind_open_extra later. */ +*************** +*** 7151,7156 **** +--- 7216,7261 ---- + else + amount += ind_continuation; + } ++ else if (lookfor_cpp_namespace) ++ { ++ if (curwin->w_cursor.lnum == ourscope) ++ continue; ++ ++ if (curwin->w_cursor.lnum == 0 ++ || curwin->w_cursor.lnum ++ < ourscope - FIND_NAMESPACE_LIM) ++ 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; ++ curwin->w_cursor.col = 0; ++ continue; ++ } ++ ++ /* ++ * Skip preprocessor directives and blank lines. ++ */ ++ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum)) ++ continue; ++ ++ if (cin_is_cpp_namespace(l)) ++ { ++ amount += ind_cpp_namespace; ++ break; ++ } ++ ++ if (cin_nocode(l)) ++ continue; ++ ++ } + else if (lookfor != LOOKFOR_TERM + && lookfor != LOOKFOR_CPP_BASECLASS) + { +*** ../mercurial/vim73/src/testdir/test3.in 2011-05-25 13:33:59.000000000 +0200 +--- src/testdir/test3.in 2011-05-25 14:47:31.000000000 +0200 +*************** +*** 799,804 **** +--- 799,867 ---- + df */ + hello + } ++ ++ /* valid namespaces with normal indent */ ++ namespace ++ { ++ { ++ 111111111111; ++ } ++ } ++ namespace /* test */ ++ { ++ 11111111111111111; ++ } ++ namespace // test ++ { ++ 111111111111111111; ++ } ++ namespace ++ { ++ 111111111111111111; ++ } ++ namespace test ++ { ++ 111111111111111111; ++ } ++ namespace{ ++ 111111111111111111; ++ } ++ namespace test{ ++ 111111111111111111; ++ } ++ namespace { ++ 111111111111111111; ++ } ++ namespace test { ++ 111111111111111111; ++ namespace test2 { ++ 22222222222222222; ++ } ++ } ++ ++ /* invalid namespaces use block indent */ ++ namespace test test2 { ++ 111111111111111111111; ++ } ++ namespace11111111111 { ++ 111111111111; ++ } ++ namespace() { ++ 1111111111111; ++ } ++ namespace() ++ { ++ 111111111111111111; ++ } ++ namespace test test2 ++ { ++ 1111111111111111111; ++ } ++ namespace111111111 ++ { ++ 111111111111111111; ++ } ++ + /* end of AUTO */ + + STARTTEST +*************** +*** 1428,1433 **** +--- 1491,1566 ---- + } + + STARTTEST ++ :set cino=N-s ++ /namespaces ++ =/^NAMESPACEEND ++ ENDTEST ++ ++ /* valid namespaces with normal indent */ ++ namespace ++ { ++ { ++ 111111111111; ++ } ++ } ++ namespace /* test */ ++ { ++ 11111111111111111; ++ } ++ namespace // test ++ { ++ 111111111111111111; ++ } ++ namespace ++ { ++ 111111111111111111; ++ } ++ namespace test ++ { ++ 111111111111111111; ++ } ++ namespace{ ++ 111111111111111111; ++ } ++ namespace test{ ++ 111111111111111111; ++ } ++ namespace { ++ 111111111111111111; ++ } ++ namespace test { ++ 111111111111111111; ++ namespace test2 { ++ 22222222222222222; ++ } ++ } ++ ++ /* invalid namespaces use block indent */ ++ namespace test test2 { ++ 111111111111111111111; ++ } ++ namespace11111111111 { ++ 111111111111; ++ } ++ namespace() { ++ 1111111111111; ++ } ++ namespace() ++ { ++ 111111111111111111; ++ } ++ namespace test test2 ++ { ++ 1111111111111111111; ++ } ++ namespace111111111 ++ { ++ 111111111111111111; ++ } ++ NAMESPACEEND ++ ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../mercurial/vim73/src/testdir/test3.ok 2011-05-25 13:33:59.000000000 +0200 +--- src/testdir/test3.ok 2011-05-25 14:48:02.000000000 +0200 +*************** +*** 787,792 **** +--- 787,855 ---- + df */ + hello + } ++ ++ /* valid namespaces with normal indent */ ++ namespace ++ { ++ { ++ 111111111111; ++ } ++ } ++ namespace /* test */ ++ { ++ 11111111111111111; ++ } ++ namespace // test ++ { ++ 111111111111111111; ++ } ++ namespace ++ { ++ 111111111111111111; ++ } ++ namespace test ++ { ++ 111111111111111111; ++ } ++ namespace{ ++ 111111111111111111; ++ } ++ namespace test{ ++ 111111111111111111; ++ } ++ namespace { ++ 111111111111111111; ++ } ++ namespace test { ++ 111111111111111111; ++ namespace test2 { ++ 22222222222222222; ++ } ++ } ++ ++ /* invalid namespaces use block indent */ ++ namespace test test2 { ++ 111111111111111111111; ++ } ++ namespace11111111111 { ++ 111111111111; ++ } ++ namespace() { ++ 1111111111111; ++ } ++ namespace() ++ { ++ 111111111111111111; ++ } ++ namespace test test2 ++ { ++ 1111111111111111111; ++ } ++ namespace111111111 ++ { ++ 111111111111111111; ++ } ++ + /* end of AUTO */ + + +*************** +*** 1273,1275 **** +--- 1336,1403 ---- + baz(); + } + ++ ++ /* valid namespaces with normal indent */ ++ namespace ++ { ++ { ++ 111111111111; ++ } ++ } ++ namespace /* test */ ++ { ++ 11111111111111111; ++ } ++ namespace // test ++ { ++ 111111111111111111; ++ } ++ namespace ++ { ++ 111111111111111111; ++ } ++ namespace test ++ { ++ 111111111111111111; ++ } ++ namespace{ ++ 111111111111111111; ++ } ++ namespace test{ ++ 111111111111111111; ++ } ++ namespace { ++ 111111111111111111; ++ } ++ namespace test { ++ 111111111111111111; ++ namespace test2 { ++ 22222222222222222; ++ } ++ } ++ ++ /* invalid namespaces use block indent */ ++ namespace test test2 { ++ 111111111111111111111; ++ } ++ namespace11111111111 { ++ 111111111111; ++ } ++ namespace() { ++ 1111111111111; ++ } ++ namespace() ++ { ++ 111111111111111111; ++ } ++ namespace test test2 ++ { ++ 1111111111111111111; ++ } ++ namespace111111111 ++ { ++ 111111111111111111; ++ } ++ NAMESPACEEND ++ ++ +*** ../vim-7.3.201/src/version.c 2011-05-25 13:33:59.000000000 +0200 +--- src/version.c 2011-05-25 15:14:20.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 202, + /**/ + +-- +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/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 6c4a9f008a38805f1ef41ba8ad76c019481eaf95 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0376/3803] Patchlevel 203 --- 7.3.203 | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 7.3.203 diff --git a/7.3.203 b/7.3.203 new file mode 100644 index 00000000..a724cf7e --- /dev/null +++ b/7.3.203 @@ -0,0 +1,102 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.203 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.203 +Problem: MS-Windows: Can't run an external command without a console window. +Solution: Support ":!start /b cmd". (Xaizek) +Files: src/os_win32.c + + +*** ../mercurial/vim73/src/os_win32.c 2011-05-05 18:31:54.000000000 +0200 +--- src/os_win32.c 2011-05-25 16:45:31.000000000 +0200 +*************** +*** 3401,3406 **** +--- 3401,3407 ---- + { + STARTUPINFO si; + PROCESS_INFORMATION pi; ++ DWORD flags = CREATE_NEW_CONSOLE; + + si.cb = sizeof(si); + si.lpReserved = NULL; +*************** +*** 3418,3423 **** +--- 3419,3440 ---- + si.dwFlags = STARTF_USESHOWWINDOW; + si.wShowWindow = SW_SHOWMINNOACTIVE; + } ++ else if ((STRNICMP(cmdbase, "/b", 2) == 0) ++ && vim_iswhite(cmdbase[2])) ++ { ++ cmdbase = skipwhite(cmdbase + 2); ++ flags = CREATE_NO_WINDOW; ++ si.dwFlags = STARTF_USESTDHANDLES; ++ si.hStdInput = CreateFile("\\\\.\\NUL", // File name ++ GENERIC_READ, // Access flags ++ 0, // Share flags ++ NULL, // Security att. ++ OPEN_EXISTING, // Open flags ++ FILE_ATTRIBUTE_NORMAL, // File att. ++ NULL); // Temp file ++ si.hStdOutput = si.hStdInput; ++ si.hStdError = si.hStdInput; ++ } + + /* When the command is in double quotes, but 'shellxquote' is + * empty, keep the double quotes around the command. +*************** +*** 3445,3451 **** + NULL, // Process security attributes + NULL, // Thread security attributes + FALSE, // Inherit handles +! CREATE_NEW_CONSOLE, // Creation flags + NULL, // Environment + NULL, // Current directory + &si, // Startup information +--- 3462,3468 ---- + NULL, // Process security attributes + NULL, // Thread security attributes + FALSE, // Inherit handles +! flags, // Creation flags + NULL, // Environment + NULL, // Current directory + &si, // Startup information +*************** +*** 3458,3463 **** +--- 3475,3485 ---- + EMSG(_("E371: Command not found")); + #endif + } ++ if (si.hStdInput != NULL) ++ { ++ /* Close the handle to \\.\NUL */ ++ CloseHandle(si.hStdInput); ++ } + /* Close the handles to the subprocess, so that it goes away */ + CloseHandle(pi.hThread); + CloseHandle(pi.hProcess); +*** ../vim-7.3.202/src/version.c 2011-05-25 15:16:06.000000000 +0200 +--- src/version.c 2011-05-25 17:05:59.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 203, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +108. While reading a magazine, you look for the Zoom icon for a better + look at a photograph. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d80763bff4ea6aafbe3f2e10fb4da2944f5c9d79 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0377/3803] Patchlevel 204 --- 7.3.204 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 7.3.204 diff --git a/7.3.204 b/7.3.204 new file mode 100644 index 00000000..b2b63602 --- /dev/null +++ b/7.3.204 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.204 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.204 (after 7.3.201) +Problem: Compiler warning. +Solution: Add type cast. (Mike Williams) +Files: src/misc1.c + + +*** ../mercurial/vim73/src/misc1.c 2011-05-25 15:16:06.000000000 +0200 +--- src/misc1.c 2011-05-25 17:25:10.000000000 +0200 +*************** +*** 7657,7663 **** + * not the one from "if () {". */ + if (*l == '}') + curwin->w_cursor.col = +! (l - ml_get_curline()) + 1; + + if ((trypos = find_start_brace(ind_maxcomment)) + == NULL +--- 7657,7663 ---- + * not the one from "if () {". */ + if (*l == '}') + curwin->w_cursor.col = +! (colnr_T)(l - ml_get_curline()) + 1; + + if ((trypos = find_start_brace(ind_maxcomment)) + == NULL +*** ../vim-7.3.203/src/version.c 2011-05-25 17:06:16.000000000 +0200 +--- src/version.c 2011-05-25 17:29:32.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 204, + /**/ + +-- +In a world without walls and borders, who needs windows and gates? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 14908b588c01c7533e8ede7a9140fbd645bceeeb Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:44:17 +0200 Subject: [PATCH 0378/3803] Patchlevel 205 --- 7.3.205 | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 7.3.205 diff --git a/7.3.205 b/7.3.205 new file mode 100644 index 00000000..b49a040e --- /dev/null +++ b/7.3.205 @@ -0,0 +1,93 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.205 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.205 +Problem: Syntax "extend" doesn't work correctly. +Solution: Avoid calling check_state_ends() recursively (Ben Schmidt) +Files: src/syntax.c + + +*** ../mercurial/vim73/src/syntax.c 2011-05-19 12:14:03.000000000 +0200 +--- src/syntax.c 2011-05-25 17:47:46.000000000 +0200 +*************** +*** 990,996 **** +--- 990,999 ---- + * previous line and regions that have "keepend". + */ + if (current_state.ga_len > 0) ++ { + syn_update_ends(TRUE); ++ check_state_ends(); ++ } + + next_match_idx = -1; + ++current_line_id; +*************** +*** 1064,1070 **** + } + } + check_keepend(); +- check_state_ends(); + } + + /**************************************** +--- 1067,1072 ---- +*************** +*** 2533,2539 **** + check_state_ends() + { + stateitem_T *cur_si; +! int had_extend = FALSE; + + cur_si = &CUR_STATE(current_state.ga_len - 1); + for (;;) +--- 2535,2541 ---- + check_state_ends() + { + stateitem_T *cur_si; +! int had_extend; + + cur_si = &CUR_STATE(current_state.ga_len - 1); + for (;;) +*************** +*** 2586,2593 **** + + /* When the ended item has "extend", another item with + * "keepend" now needs to check for its end. */ +! if (cur_si->si_flags & HL_EXTEND) +! had_extend = TRUE; + + pop_current_state(); + +--- 2588,2594 ---- + + /* When the ended item has "extend", another item with + * "keepend" now needs to check for its end. */ +! had_extend = (cur_si->si_flags & HL_EXTEND); + + pop_current_state(); + +*** ../vim-7.3.204/src/version.c 2011-05-25 17:29:40.000000000 +0200 +--- src/version.c 2011-05-25 17:52:57.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 205, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +110. You actually volunteer to become your employer's webmaster. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 3ed97903427989c3ad543d41ae2f1e5d7dd27160 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 7 Jun 2011 11:45:58 +0200 Subject: [PATCH 0379/3803] drop opsolete patches update to patchlevel 206 --- 7.2.360 | 96 ------ 7.2.361 | 763 ----------------------------------------------- 7.2.362 | 95 ------ 7.2.363 | 70 ----- 7.2.364 | 91 ------ 7.2.365 | 71 ----- 7.2.366 | 134 --------- 7.2.367 | 77 ----- 7.2.368 | 52 ---- 7.2.369 | 55 ---- 7.2.370 | 156 ---------- 7.2.371 | 322 -------------------- 7.2.372 | 303 ------------------- 7.2.373 | 54 ---- 7.2.374 | 168 ----------- 7.2.375 | 64 ---- 7.2.376 | 50 ---- 7.2.377 | 66 ---- 7.2.378 | 69 ----- 7.2.379 | 55 ---- 7.2.380 | 104 ------- 7.2.381 | 218 -------------- 7.2.382 | 58 ---- 7.2.383 | 101 ------- 7.2.384 | 59 ---- 7.2.385 | 63 ---- 7.2.386 | 61 ---- 7.2.387 | 238 --------------- 7.2.388 | 86 ------ 7.2.389 | 161 ---------- 7.2.390 | 72 ----- 7.2.391 | 121 -------- 7.2.392 | 184 ------------ 7.2.393 | 281 ----------------- 7.2.394 | 99 ------ 7.2.395 | 60 ---- 7.2.396 | 51 ---- 7.2.397 | 67 ----- 7.2.398 | 152 ---------- 7.2.399 | 63 ---- 7.2.400 | 454 ---------------------------- 7.2.401 | 61 ---- 7.2.402 | 91 ------ 7.2.403 | 53 ---- 7.2.404 | 54 ---- 7.2.405 | 48 --- 7.2.406 | 123 -------- 7.2.407 | 69 ----- 7.2.408 | 73 ----- 7.2.409 | 60 ---- 7.2.410 | 78 ----- 7.2.411 | 47 --- README.patches | 152 ++++++++++ vim.spec | 309 ++++++++++++++++++- xxd-locale.patch | 32 -- 55 files changed, 458 insertions(+), 6356 deletions(-) delete mode 100644 7.2.360 delete mode 100644 7.2.361 delete mode 100644 7.2.362 delete mode 100644 7.2.363 delete mode 100644 7.2.364 delete mode 100644 7.2.365 delete mode 100644 7.2.366 delete mode 100644 7.2.367 delete mode 100644 7.2.368 delete mode 100644 7.2.369 delete mode 100644 7.2.370 delete mode 100644 7.2.371 delete mode 100644 7.2.372 delete mode 100644 7.2.373 delete mode 100644 7.2.374 delete mode 100644 7.2.375 delete mode 100644 7.2.376 delete mode 100644 7.2.377 delete mode 100644 7.2.378 delete mode 100644 7.2.379 delete mode 100644 7.2.380 delete mode 100644 7.2.381 delete mode 100644 7.2.382 delete mode 100644 7.2.383 delete mode 100644 7.2.384 delete mode 100644 7.2.385 delete mode 100644 7.2.386 delete mode 100644 7.2.387 delete mode 100644 7.2.388 delete mode 100644 7.2.389 delete mode 100644 7.2.390 delete mode 100644 7.2.391 delete mode 100644 7.2.392 delete mode 100644 7.2.393 delete mode 100644 7.2.394 delete mode 100644 7.2.395 delete mode 100644 7.2.396 delete mode 100644 7.2.397 delete mode 100644 7.2.398 delete mode 100644 7.2.399 delete mode 100644 7.2.400 delete mode 100644 7.2.401 delete mode 100644 7.2.402 delete mode 100644 7.2.403 delete mode 100644 7.2.404 delete mode 100644 7.2.405 delete mode 100644 7.2.406 delete mode 100644 7.2.407 delete mode 100644 7.2.408 delete mode 100644 7.2.409 delete mode 100644 7.2.410 delete mode 100644 7.2.411 delete mode 100644 xxd-locale.patch diff --git a/7.2.360 b/7.2.360 deleted file mode 100644 index 7cf46205..00000000 --- a/7.2.360 +++ /dev/null @@ -1,96 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.360 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.360 -Problem: Ruby on MS-Windows: can't use sockets. -Solution: Call NtInitialize() during initialization. (Ariya Mizutani) -Files: src/if_ruby.c - - -*** ../vim-7.2.359/src/if_ruby.c 2009-05-22 18:20:23.000000000 +0200 ---- src/if_ruby.c 2010-02-17 15:04:00.000000000 +0100 -*************** -*** 48,53 **** ---- 48,58 ---- - # endif - #endif - -+ /* suggested by Ariya Mizutani */ -+ #if (_MSC_VER == 1200) -+ # undef _WIN32_WINNT -+ #endif -+ - #include - - #undef EXTERN -*************** -*** 132,137 **** ---- 137,143 ---- - #define ruby_errinfo (*dll_ruby_errinfo) - #define ruby_init dll_ruby_init - #define ruby_init_loadpath dll_ruby_init_loadpath -+ #define NtInitialize dll_NtInitialize - #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 - # define rb_w32_snprintf dll_rb_w32_snprintf - #endif -*************** -*** 186,191 **** ---- 192,198 ---- - static VALUE *dll_ruby_errinfo; - static void (*dll_ruby_init) (void); - static void (*dll_ruby_init_loadpath) (void); -+ static void (*dll_NtInitialize) (int*, char***); - #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 - static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...); - #endif -*************** -*** 248,253 **** ---- 255,261 ---- - {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo}, - {"ruby_init", (RUBY_PROC*)&dll_ruby_init}, - {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath}, -+ {"NtInitialize", (RUBY_PROC*)&dll_NtInitialize}, - #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 - {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf}, - #endif -*************** -*** 414,419 **** ---- 422,433 ---- - if (ruby_enabled(TRUE)) - { - #endif -+ #ifdef _WIN32 -+ /* suggested by Ariya Mizutani */ -+ int argc = 1; -+ char *argv[] = {"gvim.exe"}; -+ NtInitialize(&argc, &argv); -+ #endif - ruby_init(); - ruby_init_loadpath(); - ruby_io_init(); -*** ../vim-7.2.359/src/version.c 2010-02-11 18:54:38.000000000 +0100 ---- src/version.c 2010-02-17 15:10:22.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 360, - /**/ - --- -"After a few years of marriage a man can look right at a woman -without seeing her and a woman can see right through a man -without looking at him." - - Helen Rowland - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.361 b/7.2.361 deleted file mode 100644 index ddc58579..00000000 --- a/7.2.361 +++ /dev/null @@ -1,763 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.361 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.361 -Problem: Ruby 1.9 is not supported. -Solution: Add Ruby 1.9 support. (Msaki Suketa) -Files: src/Makefile, src/auto/configure, src/configure.in, src/if_ruby.c - - -*** ../vim-7.2.360/src/Makefile 2010-02-17 15:12:22.000000000 +0100 ---- src/Makefile 2010-02-17 16:21:01.000000000 +0100 -*************** -*** 395,401 **** - - # RUBY - # Uncomment this when you want to include the Ruby interface. -! #CONF_OPT_RUBY = --enable-rubyinterp - - # MZSCHEME - # Uncomment this when you want to include the MzScheme interface. ---- 395,403 ---- - - # RUBY - # Uncomment this when you want to include the Ruby interface. -! # Note: you need the development package (e.g., ruby1.9.1-dev on Ubuntu). -! # CONF_OPT_RUBY = --enable-rubyinterp -! # CONF_OPT_RUBY = --enable-rubyinterp --with-ruby-command=ruby1.9.1 - - # MZSCHEME - # Uncomment this when you want to include the MzScheme interface. -*** ../vim-7.2.360/src/auto/configure 2009-12-16 17:14:08.000000000 +0100 ---- src/auto/configure 2010-02-17 16:08:59.000000000 +0100 -*************** -*** 793,798 **** ---- 793,799 ---- - enable_tclinterp - with_tclsh - enable_rubyinterp -+ with_ruby_command - enable_cscope - enable_workshop - enable_netbeans -*************** -*** 1503,1508 **** ---- 1504,1510 ---- - --with-plthome=PLTHOME Use PLTHOME. - --with-python-config-dir=PATH Python's config directory - --with-tclsh=PATH which tclsh to use (default: tclsh8.0) -+ --with-ruby-command=RUBY name of the Ruby command (default: ruby) - --with-x use the X Window System - --with-gtk-prefix=PFX Prefix where GTK is installed (optional) - --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) -*************** -*** 5703,5711 **** - { $as_echo "$as_me:$LINENO: result: $enable_rubyinterp" >&5 - $as_echo "$enable_rubyinterp" >&6; } - if test "$enable_rubyinterp" = "yes"; then - -! # Extract the first word of "ruby", so it can be a program name with args. -! set dummy ruby; ac_word=$2 - { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_path_vi_cv_path_ruby+set}" = set; then ---- 5705,5725 ---- - { $as_echo "$as_me:$LINENO: result: $enable_rubyinterp" >&5 - $as_echo "$enable_rubyinterp" >&6; } - if test "$enable_rubyinterp" = "yes"; then -+ { $as_echo "$as_me:$LINENO: checking --with-ruby-command argument" >&5 -+ $as_echo_n "checking --with-ruby-command argument... " >&6; } - -! # Check whether --with-ruby-command was given. -! if test "${with_ruby_command+set}" = set; then -! withval=$with_ruby_command; RUBY_CMD="$withval"; { $as_echo "$as_me:$LINENO: result: $RUBY_CMD" >&5 -! $as_echo "$RUBY_CMD" >&6; } -! else -! RUBY_CMD="ruby"; { $as_echo "$as_me:$LINENO: result: defaulting to $RUBY_CMD" >&5 -! $as_echo "defaulting to $RUBY_CMD" >&6; } -! fi -! -! -! # Extract the first word of "$RUBY_CMD", so it can be a program name with args. -! set dummy $RUBY_CMD; ac_word=$2 - { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_path_vi_cv_path_ruby+set}" = set; then -*************** -*** 5752,5762 **** - $as_echo "OK" >&6; } - { $as_echo "$as_me:$LINENO: checking Ruby header files" >&5 - $as_echo_n "checking Ruby header files... " >&6; } -! rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null` - if test "X$rubyhdrdir" != "X"; then - { $as_echo "$as_me:$LINENO: result: $rubyhdrdir" >&5 - $as_echo "$rubyhdrdir" >&6; } - RUBY_CFLAGS="-I$rubyhdrdir" - rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'` - if test "X$rubylibs" != "X"; then - RUBY_LIBS="$rubylibs" ---- 5766,5782 ---- - $as_echo "OK" >&6; } - { $as_echo "$as_me:$LINENO: checking Ruby header files" >&5 - $as_echo_n "checking Ruby header files... " >&6; } -! rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["rubyhdrdir"] || Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null` - if test "X$rubyhdrdir" != "X"; then - { $as_echo "$as_me:$LINENO: result: $rubyhdrdir" >&5 - $as_echo "$rubyhdrdir" >&6; } - RUBY_CFLAGS="-I$rubyhdrdir" -+ rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["arch"]'` -+ if test -d "$rubyhdrdir/$rubyarch"; then -+ RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch" -+ fi -+ rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["ruby_version"].gsub(/\./, "")[0,2]'` -+ RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion" - rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'` - if test "X$rubylibs" != "X"; then - RUBY_LIBS="$rubylibs" -*************** -*** 5793,5800 **** - _ACEOF - - else -! { $as_echo "$as_me:$LINENO: result: not found" >&5 -! $as_echo "not found" >&6; } - fi - else - { $as_echo "$as_me:$LINENO: result: too old; need Ruby version 1.6.0 or later" >&5 ---- 5813,5820 ---- - _ACEOF - - else -! { $as_echo "$as_me:$LINENO: result: not found; disabling Ruby" >&5 -! $as_echo "not found; disabling Ruby" >&6; } - fi - else - { $as_echo "$as_me:$LINENO: result: too old; need Ruby version 1.6.0 or later" >&5 -*** ../vim-7.2.360/src/configure.in 2009-12-16 17:14:08.000000000 +0100 ---- src/configure.in 2010-02-17 16:00:58.000000000 +0100 -*************** -*** 949,965 **** - [enable_rubyinterp="no"]) - AC_MSG_RESULT($enable_rubyinterp) - if test "$enable_rubyinterp" = "yes"; then - AC_SUBST(vi_cv_path_ruby) -! AC_PATH_PROG(vi_cv_path_ruby, ruby) - if test "X$vi_cv_path_ruby" != "X"; then - AC_MSG_CHECKING(Ruby version) - if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then - AC_MSG_RESULT(OK) - AC_MSG_CHECKING(Ruby header files) -! rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null` - if test "X$rubyhdrdir" != "X"; then - AC_MSG_RESULT($rubyhdrdir) - RUBY_CFLAGS="-I$rubyhdrdir" - rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'` - if test "X$rubylibs" != "X"; then - RUBY_LIBS="$rubylibs" ---- 949,975 ---- - [enable_rubyinterp="no"]) - AC_MSG_RESULT($enable_rubyinterp) - if test "$enable_rubyinterp" = "yes"; then -+ AC_MSG_CHECKING(--with-ruby-command argument) -+ AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)], -+ RUBY_CMD="$withval"; AC_MSG_RESULT($RUBY_CMD), -+ RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD)) - AC_SUBST(vi_cv_path_ruby) -! AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD) - if test "X$vi_cv_path_ruby" != "X"; then - AC_MSG_CHECKING(Ruby version) - if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then - AC_MSG_RESULT(OK) - AC_MSG_CHECKING(Ruby header files) -! rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG[["rubyhdrdir"]] || Config::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null` - if test "X$rubyhdrdir" != "X"; then - AC_MSG_RESULT($rubyhdrdir) - RUBY_CFLAGS="-I$rubyhdrdir" -+ rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["arch"]]'` -+ if test -d "$rubyhdrdir/$rubyarch"; then -+ RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch" -+ fi -+ rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["ruby_version"]].gsub(/\./, "")[[0,2]]'` -+ RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion" - rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'` - if test "X$rubylibs" != "X"; then - RUBY_LIBS="$rubylibs" -*************** -*** 997,1003 **** - RUBY_PRO="if_ruby.pro" - AC_DEFINE(FEAT_RUBY) - else -! AC_MSG_RESULT(not found, disabling Ruby) - fi - else - AC_MSG_RESULT(too old; need Ruby version 1.6.0 or later) ---- 1007,1013 ---- - RUBY_PRO="if_ruby.pro" - AC_DEFINE(FEAT_RUBY) - else -! AC_MSG_RESULT(not found; disabling Ruby) - fi - else - AC_MSG_RESULT(too old; need Ruby version 1.6.0 or later) -*** ../vim-7.2.360/src/if_ruby.c 2010-02-17 15:11:35.000000000 +0100 ---- src/if_ruby.c 2010-02-17 16:08:47.000000000 +0100 -*************** -*** 54,59 **** ---- 54,62 ---- - #endif - - #include -+ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 -+ # include -+ #endif - - #undef EXTERN - #undef _ -*************** -*** 65,70 **** ---- 68,95 ---- - # define __OPENTRANSPORTPROVIDERS__ - #endif - -+ /* -+ * Backward compatiblity for Ruby 1.8 and earlier. -+ * Ruby 1.9 does not provide STR2CSTR, instead StringValuePtr is provided. -+ * Ruby 1.9 does not provide RXXX(s)->len and RXXX(s)->ptr, instead -+ * RXXX_LEN(s) and RXXX_PTR(s) are provided. -+ */ -+ #ifndef StringValuePtr -+ # define StringValuePtr(s) STR2CSTR(s) -+ #endif -+ #ifndef RARRAY_LEN -+ # define RARRAY_LEN(s) RARRAY(s)->len -+ #endif -+ #ifndef RARRAY_PTR -+ # define RARRAY_PTR(s) RARRAY(s)->ptr -+ #endif -+ #ifndef RSTRING_LEN -+ # define RSTRING_LEN(s) RSTRING(s)->len -+ #endif -+ #ifndef RSTRING_PTR -+ # define RSTRING_PTR(s) RSTRING(s)->ptr -+ #endif -+ - #include "vim.h" - #include "version.h" - -*************** -*** 134,140 **** - #define rb_str_concat dll_rb_str_concat - #define rb_str_new dll_rb_str_new - #define rb_str_new2 dll_rb_str_new2 -! #define ruby_errinfo (*dll_ruby_errinfo) - #define ruby_init dll_ruby_init - #define ruby_init_loadpath dll_ruby_init_loadpath - #define NtInitialize dll_NtInitialize ---- 159,169 ---- - #define rb_str_concat dll_rb_str_concat - #define rb_str_new dll_rb_str_new - #define rb_str_new2 dll_rb_str_new2 -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 -! # define rb_errinfo dll_rb_errinfo -! #else -! # define ruby_errinfo (*dll_ruby_errinfo) -! #endif - #define ruby_init dll_ruby_init - #define ruby_init_loadpath dll_ruby_init_loadpath - #define NtInitialize dll_NtInitialize -*************** -*** 142,147 **** ---- 171,184 ---- - # define rb_w32_snprintf dll_rb_w32_snprintf - #endif - -+ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 -+ # define ruby_script dll_ruby_script -+ # define rb_enc_find_index dll_rb_enc_find_index -+ # define rb_enc_find dll_rb_enc_find -+ # define rb_enc_str_new dll_rb_enc_str_new -+ # define rb_sprintf dll_rb_sprintf -+ #endif -+ - /* - * Pointers for dynamic link - */ -*************** -*** 189,195 **** ---- 226,236 ---- - static VALUE (*dll_rb_str_concat) (VALUE, VALUE); - static VALUE (*dll_rb_str_new) (const char*, long); - static VALUE (*dll_rb_str_new2) (const char*); -+ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 -+ static VALUE (*dll_rb_errinfo) (void); -+ #else - static VALUE *dll_ruby_errinfo; -+ #endif - static void (*dll_ruby_init) (void); - static void (*dll_ruby_init_loadpath) (void); - static void (*dll_NtInitialize) (int*, char***); -*************** -*** 197,202 **** ---- 238,251 ---- - static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...); - #endif - -+ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 -+ static void (*dll_ruby_script) (const char*); -+ static int (*dll_rb_enc_find_index) (const char*); -+ static rb_encoding* (*dll_rb_enc_find) (const char*); -+ static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*); -+ static VALUE (*dll_rb_sprintf) (const char*, ...); -+ #endif -+ - static HINSTANCE hinstRuby = 0; /* Instance of ruby.dll */ - - /* -*************** -*** 252,264 **** ---- 301,324 ---- - {"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat}, - {"rb_str_new", (RUBY_PROC*)&dll_rb_str_new}, - {"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2}, -+ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 -+ {"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo}, -+ #else - {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo}, -+ #endif - {"ruby_init", (RUBY_PROC*)&dll_ruby_init}, - {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath}, - {"NtInitialize", (RUBY_PROC*)&dll_NtInitialize}, - #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 - {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf}, - #endif -+ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 -+ {"ruby_script", (RUBY_PROC*)&dll_ruby_script}, -+ {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, -+ {"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find}, -+ {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new}, -+ {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf}, -+ #endif - {"", NULL}, - }; - -*************** -*** 348,353 **** ---- 408,465 ---- - vim_free(script); - } - -+ /* -+ * In Ruby 1.9 or later, ruby String object has encoding. -+ * conversion buffer string of vim to ruby String object using -+ * VIM encoding option. -+ */ -+ static VALUE -+ vim_str2rb_enc_str(const char *s) -+ { -+ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 -+ int isnum; -+ long lval; -+ char_u *sval; -+ rb_encoding *enc; -+ -+ isnum = get_option_value((char_u *)"enc", &lval, &sval, 0); -+ if (isnum == 0) -+ { -+ enc = rb_enc_find((char *)sval); -+ vim_free(sval); -+ if (enc) { -+ return rb_enc_str_new(s, strlen(s), enc); -+ } -+ } -+ #endif -+ return rb_str_new2(s); -+ } -+ -+ static VALUE -+ eval_enc_string_protect(const char *str, int *state) -+ { -+ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 -+ int isnum; -+ long lval; -+ char_u *sval; -+ rb_encoding *enc; -+ VALUE v; -+ -+ isnum = get_option_value((char_u *)"enc", &lval, &sval, 0); -+ if (isnum == 0) -+ { -+ enc = rb_enc_find((char *)sval); -+ vim_free(sval); -+ if (enc) -+ { -+ v = rb_sprintf("#-*- coding:%s -*-\n%s", rb_enc_name(enc), str); -+ return rb_eval_string_protect(StringValuePtr(v), state); -+ } -+ } -+ #endif -+ return rb_eval_string_protect(str, state); -+ } -+ - void ex_rubydo(exarg_T *eap) - { - int state; -*************** -*** 360,368 **** - for (i = eap->line1; i <= eap->line2; i++) { - VALUE line, oldline; - -! line = oldline = rb_str_new2((char *)ml_get(i)); - rb_lastline_set(line); -! rb_eval_string_protect((char *) eap->arg, &state); - if (state) { - error_print(state); - break; ---- 472,480 ---- - for (i = eap->line1; i <= eap->line2; i++) { - VALUE line, oldline; - -! line = oldline = vim_str2rb_enc_str((char *)ml_get(i)); - rb_lastline_set(line); -! eval_enc_string_protect((char *) eap->arg, &state); - if (state) { - error_print(state); - break; -*************** -*** 373,379 **** - EMSG(_("E265: $_ must be an instance of String")); - return; - } -! ml_replace(i, (char_u *) STR2CSTR(line), 1); - changed(); - #ifdef SYNTAX_HL - syn_changed(i); /* recompute syntax hl. for this line */ ---- 485,491 ---- - EMSG(_("E265: $_ must be an instance of String")); - return; - } -! ml_replace(i, (char_u *) StringValuePtr(line), 1); - changed(); - #ifdef SYNTAX_HL - syn_changed(i); /* recompute syntax hl. for this line */ -*************** -*** 428,436 **** ---- 540,557 ---- - char *argv[] = {"gvim.exe"}; - NtInitialize(&argc, &argv); - #endif -+ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 -+ RUBY_INIT_STACK; -+ #endif - ruby_init(); -+ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 -+ ruby_script("vim-ruby"); -+ #endif - ruby_init_loadpath(); - ruby_io_init(); -+ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 -+ rb_enc_find_index("encdb"); -+ #endif - ruby_vim_init(); - ruby_initialized = 1; - #ifdef DYNAMIC_RUBY -*************** -*** 448,455 **** ---- 569,578 ---- - static void error_print(int state) - { - #ifndef DYNAMIC_RUBY -+ #if !(defined(RUBY_VERSION) && RUBY_VERSION >= 19) - RUBYEXTERN VALUE ruby_errinfo; - #endif -+ #endif - VALUE eclass; - VALUE einfo; - char buff[BUFSIZ]; -*************** -*** 482,490 **** - break; - case TAG_RAISE: - case TAG_FATAL: - eclass = CLASS_OF(ruby_errinfo); - einfo = rb_obj_as_string(ruby_errinfo); -! if (eclass == rb_eRuntimeError && RSTRING(einfo)->len == 0) { - EMSG(_("E272: unhandled exception")); - } - else { ---- 605,618 ---- - break; - case TAG_RAISE: - case TAG_FATAL: -+ #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 -+ eclass = CLASS_OF(rb_errinfo()); -+ einfo = rb_obj_as_string(rb_errinfo()); -+ #else - eclass = CLASS_OF(ruby_errinfo); - einfo = rb_obj_as_string(ruby_errinfo); -! #endif -! if (eclass == rb_eRuntimeError && RSTRING_LEN(einfo) == 0) { - EMSG(_("E272: unhandled exception")); - } - else { -*************** -*** 493,499 **** - - epath = rb_class_path(eclass); - vim_snprintf(buff, BUFSIZ, "%s: %s", -! RSTRING(epath)->ptr, RSTRING(einfo)->ptr); - p = strchr(buff, '\n'); - if (p) *p = '\0'; - EMSG(buff); ---- 621,627 ---- - - epath = rb_class_path(eclass); - vim_snprintf(buff, BUFSIZ, "%s: %s", -! RSTRING_PTR(epath), RSTRING_PTR(einfo)); - p = strchr(buff, '\n'); - if (p) *p = '\0'; - EMSG(buff); -*************** -*** 511,518 **** - char *buff, *p; - - str = rb_obj_as_string(str); -! buff = ALLOCA_N(char, RSTRING(str)->len); -! strcpy(buff, RSTRING(str)->ptr); - p = strchr(buff, '\n'); - if (p) *p = '\0'; - MSG(buff); ---- 639,646 ---- - char *buff, *p; - - str = rb_obj_as_string(str); -! buff = ALLOCA_N(char, RSTRING_LEN(str)); -! strcpy(buff, RSTRING_PTR(str)); - p = strchr(buff, '\n'); - if (p) *p = '\0'; - MSG(buff); -*************** -*** 521,541 **** - - static VALUE vim_set_option(VALUE self UNUSED, VALUE str) - { -! do_set((char_u *)STR2CSTR(str), 0); - update_screen(NOT_VALID); - return Qnil; - } - - static VALUE vim_command(VALUE self UNUSED, VALUE str) - { -! do_cmdline_cmd((char_u *)STR2CSTR(str)); - return Qnil; - } - - static VALUE vim_evaluate(VALUE self UNUSED, VALUE str) - { - #ifdef FEAT_EVAL -! char_u *value = eval_to_string((char_u *)STR2CSTR(str), NULL, TRUE); - - if (value != NULL) - { ---- 649,669 ---- - - static VALUE vim_set_option(VALUE self UNUSED, VALUE str) - { -! do_set((char_u *)StringValuePtr(str), 0); - update_screen(NOT_VALID); - return Qnil; - } - - static VALUE vim_command(VALUE self UNUSED, VALUE str) - { -! do_cmdline_cmd((char_u *)StringValuePtr(str)); - return Qnil; - } - - static VALUE vim_evaluate(VALUE self UNUSED, VALUE str) - { - #ifdef FEAT_EVAL -! char_u *value = eval_to_string((char_u *)StringValuePtr(str), NULL, TRUE); - - if (value != NULL) - { -*************** -*** 640,648 **** - if (n > 0 && n <= buf->b_ml.ml_line_count) - { - char *line = (char *)ml_get_buf(buf, n, FALSE); -! return line ? rb_str_new2(line) : Qnil; - } -! rb_raise(rb_eIndexError, "index %d out of buffer", n); - #ifndef __GNUC__ - return Qnil; /* For stop warning */ - #endif ---- 768,776 ---- - if (n > 0 && n <= buf->b_ml.ml_line_count) - { - char *line = (char *)ml_get_buf(buf, n, FALSE); -! return line ? vim_str2rb_enc_str(line) : Qnil; - } -! rb_raise(rb_eIndexError, "line number %ld out of range", (long)n); - #ifndef __GNUC__ - return Qnil; /* For stop warning */ - #endif -*************** -*** 659,665 **** - - static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str) - { -! char *line = STR2CSTR(str); - aco_save_T aco; - - if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) ---- 787,793 ---- - - static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str) - { -! char *line = StringValuePtr(str); - aco_save_T aco; - - if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) -*************** -*** 683,689 **** - } - else - { -! rb_raise(rb_eIndexError, "index %d out of buffer", n); - #ifndef __GNUC__ - return Qnil; /* For stop warning */ - #endif ---- 811,817 ---- - } - else - { -! rb_raise(rb_eIndexError, "line number %ld out of range", (long)n); - #ifndef __GNUC__ - return Qnil; /* For stop warning */ - #endif -*************** -*** 729,735 **** - } - else - { -! rb_raise(rb_eIndexError, "index %d out of buffer", n); - } - return Qnil; - } ---- 857,863 ---- - } - else - { -! rb_raise(rb_eIndexError, "line number %ld out of range", n); - } - return Qnil; - } -*************** -*** 737,747 **** - static VALUE buffer_append(VALUE self, VALUE num, VALUE str) - { - buf_T *buf = get_buf(self); -! char *line = STR2CSTR(str); - long n = NUM2LONG(num); - aco_save_T aco; - -! if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL) - { - /* set curwin/curbuf for "buf" and save some things */ - aucmd_prepbuf(&aco, buf); ---- 865,878 ---- - static VALUE buffer_append(VALUE self, VALUE num, VALUE str) - { - buf_T *buf = get_buf(self); -! char *line = StringValuePtr(str); - long n = NUM2LONG(num); - aco_save_T aco; - -! if (line != NULL) { -! rb_raise(rb_eIndexError, "NULL line"); -! } -! else if (n >= 0 && n <= buf->b_ml.ml_line_count) - { - /* set curwin/curbuf for "buf" and save some things */ - aucmd_prepbuf(&aco, buf); -*************** -*** 763,769 **** - update_curbuf(NOT_VALID); - } - else { -! rb_raise(rb_eIndexError, "index %d out of buffer", n); - } - return str; - } ---- 894,900 ---- - update_curbuf(NOT_VALID); - } - else { -! rb_raise(rb_eIndexError, "line number %ld out of range", n); - } - return str; - } -*************** -*** 904,913 **** - win_T *win = get_win(self); - - Check_Type(pos, T_ARRAY); -! if (RARRAY(pos)->len != 2) - rb_raise(rb_eArgError, "array length must be 2"); -! lnum = RARRAY(pos)->ptr[0]; -! col = RARRAY(pos)->ptr[1]; - win->w_cursor.lnum = NUM2LONG(lnum); - win->w_cursor.col = NUM2UINT(col); - check_cursor(); /* put cursor on an existing line */ ---- 1035,1044 ---- - win_T *win = get_win(self); - - Check_Type(pos, T_ARRAY); -! if (RARRAY_LEN(pos) != 2) - rb_raise(rb_eArgError, "array length must be 2"); -! lnum = RARRAY_PTR(pos)[0]; -! col = RARRAY_PTR(pos)[1]; - win->w_cursor.lnum = NUM2LONG(lnum); - win->w_cursor.col = NUM2UINT(col); - check_cursor(); /* put cursor on an existing line */ -*************** -*** 924,930 **** - if (i > 0) rb_str_cat(str, ", ", 2); - rb_str_concat(str, rb_inspect(argv[i])); - } -! MSG(RSTRING(str)->ptr); - return Qnil; - } - ---- 1055,1061 ---- - if (i > 0) rb_str_cat(str, ", ", 2); - rb_str_concat(str, rb_inspect(argv[i])); - } -! MSG(RSTRING_PTR(str)); - return Qnil; - } - -*** ../vim-7.2.360/src/version.c 2010-02-17 15:11:35.000000000 +0100 ---- src/version.c 2010-02-17 15:59:12.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 361, - /**/ - --- -"Marriage is when a man and woman become as one; the trouble starts -when they try to decide which one" - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.362 b/7.2.362 deleted file mode 100644 index 2f62cf62..00000000 --- a/7.2.362 +++ /dev/null @@ -1,95 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.362 (extra) -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.362 (extra, after 7.2.352) -Problem: Win64: Vim doesn't work when cross-compiled with MingW libraries. -Solution: Instead of handling WM_NCCREATE, create wide text area window - class if the parent window iw side. (Sergey Khorev) -Files: src/gui_w32.c, src/gui_w48.c - - -*** ../vim-7.2.361/src/gui_w32.c 2009-12-24 16:11:24.000000000 +0100 ---- src/gui_w32.c 2010-02-17 16:26:58.000000000 +0100 -*************** -*** 1329,1334 **** ---- 1329,1335 ---- - WNDCLASS wndclass; - #ifdef FEAT_MBYTE - const WCHAR szVimWndClassW[] = VIM_CLASSW; -+ const WCHAR szTextAreaClassW[] = L"VimTextArea"; - WNDCLASSW wndclassw; - #endif - #ifdef GLOBAL_IME -*************** -*** 1479,1484 **** ---- 1480,1507 ---- - #endif - - /* Create the text area window */ -+ #ifdef FEAT_MBYTE -+ if (wide_WindowProc) -+ { -+ if (GetClassInfoW(s_hinst, szTextAreaClassW, &wndclassw) == 0) -+ { -+ wndclassw.style = CS_OWNDC; -+ wndclassw.lpfnWndProc = _TextAreaWndProc; -+ wndclassw.cbClsExtra = 0; -+ wndclassw.cbWndExtra = 0; -+ wndclassw.hInstance = s_hinst; -+ wndclassw.hIcon = NULL; -+ wndclassw.hCursor = LoadCursor(NULL, IDC_ARROW); -+ wndclassw.hbrBackground = NULL; -+ wndclassw.lpszMenuName = NULL; -+ wndclassw.lpszClassName = szTextAreaClassW; -+ -+ if (RegisterClassW(&wndclassw) == 0) -+ return FAIL; -+ } -+ } -+ else -+ #endif - if (GetClassInfo(s_hinst, szTextAreaClass, &wndclass) == 0) - { - wndclass.style = CS_OWNDC; -*** ../vim-7.2.361/src/gui_w48.c 2010-02-03 12:23:16.000000000 +0100 ---- src/gui_w48.c 2010-02-17 16:27:21.000000000 +0100 -*************** -*** 1084,1096 **** - case WM_NOTIFY: Handle_WM_Notify(hwnd, (LPNMHDR)lParam); - return TRUE; - #endif -- /* Workaround for the problem that MyWindowProc() returns FALSE on 64 -- * bit windows when cross-compiled using Mingw libraries. (Andy -- * Kittner) */ -- case WM_NCCREATE: -- MyWindowProc(hwnd, uMsg, wParam, lParam); -- return TRUE; -- - default: - return MyWindowProc(hwnd, uMsg, wParam, lParam); - } ---- 1084,1089 ---- -*** ../vim-7.2.361/src/version.c 2010-02-17 16:23:03.000000000 +0100 ---- src/version.c 2010-02-17 16:30:52.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 362, - /**/ - --- -"Marriage is the process of finding out what kind of man your wife -would have preferred" - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.363 b/7.2.363 deleted file mode 100644 index 2447103b..00000000 --- a/7.2.363 +++ /dev/null @@ -1,70 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.363 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.363 -Problem: Can't dynamically load Perl 5.10. -Solution: Add the function Perl_croak_xs_usage. (Sergey Khorev) -Files: src/if_perl.xs - - -*** ../vim-7.2.362/src/if_perl.xs 2009-11-11 14:45:36.000000000 +0100 ---- src/if_perl.xs 2010-02-17 16:33:16.000000000 +0100 -*************** -*** 93,98 **** ---- 93,101 ---- - # define perl_free dll_perl_free - # define Perl_get_context dll_Perl_get_context - # define Perl_croak dll_Perl_croak -+ # if (PERL_REVISION == 5) && (PERL_VERSION >= 10) -+ # define Perl_croak_xs_usage dll_Perl_croak_xs_usage -+ # endif - # ifndef PROTO - # define Perl_croak_nocontext dll_Perl_croak_nocontext - # define Perl_call_argv dll_Perl_call_argv -*************** -*** 202,207 **** ---- 205,213 ---- - static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**); - static void* (*Perl_get_context)(void); - static void (*Perl_croak)(pTHX_ const char*, ...); -+ #if (PERL_REVISION == 5) && (PERL_VERSION >= 10) -+ static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params); -+ #endif - static void (*Perl_croak_nocontext)(const char*, ...); - static I32 (*Perl_dowantarray)(pTHX); - static void (*Perl_free_tmps)(pTHX); -*************** -*** 306,311 **** ---- 312,320 ---- - {"perl_parse", (PERL_PROC*)&perl_parse}, - {"Perl_get_context", (PERL_PROC*)&Perl_get_context}, - {"Perl_croak", (PERL_PROC*)&Perl_croak}, -+ #if (PERL_REVISION == 5) && (PERL_VERSION >= 10) -+ {"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage}, -+ #endif - {"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext}, - {"Perl_dowantarray", (PERL_PROC*)&Perl_dowantarray}, - {"Perl_free_tmps", (PERL_PROC*)&Perl_free_tmps}, -*** ../vim-7.2.362/src/version.c 2010-02-17 16:31:27.000000000 +0100 ---- src/version.c 2010-02-17 16:35:39.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 363, - /**/ - --- -If you're sending someone Styrofoam, what do you pack it in? - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.364 b/7.2.364 deleted file mode 100644 index c3c6e8b6..00000000 --- a/7.2.364 +++ /dev/null @@ -1,91 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.364 (extra) -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.364 (extra) -Problem: Can't build gvimext.dll on Win 7 x64 using MinGW (John Marriott) -Solution: Check if _MSC_VER is defined. (Andy Kittner) -Files: src/GvimExt/gvimext.h - - -*** ../vim-7.2.363/src/GvimExt/gvimext.h 2006-04-24 21:23:03.000000000 +0200 ---- src/GvimExt/gvimext.h 2010-02-17 17:20:00.000000000 +0100 -*************** -*** 14,22 **** - #if !defined(AFX_STDAFX_H__3389658B_AD83_11D3_9C1E_0090278BBD99__INCLUDED_) - #define AFX_STDAFX_H__3389658B_AD83_11D3_9C1E_0090278BBD99__INCLUDED_ - -! #if _MSC_VER > 1000 - #pragma once -! #endif // _MSC_VER > 1000 - - // Insert your headers here - // #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers ---- 14,22 ---- - #if !defined(AFX_STDAFX_H__3389658B_AD83_11D3_9C1E_0090278BBD99__INCLUDED_) - #define AFX_STDAFX_H__3389658B_AD83_11D3_9C1E_0090278BBD99__INCLUDED_ - -! #if defined(_MSC_VER) && _MSC_VER > 1000 - #pragma once -! #endif - - // Insert your headers here - // #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -*************** -*** 34,40 **** - #define INC_OLE2 // WIN32, get ole2 from windows.h - - /* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */ -! #if _MSC_VER >= 1400 - # define _CRT_SECURE_NO_DEPRECATE - # define _CRT_NONSTDC_NO_DEPRECATE - #endif ---- 34,40 ---- - #define INC_OLE2 // WIN32, get ole2 from windows.h - - /* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */ -! #if defined(_MSC_VER) && _MSC_VER >= 1400 - # define _CRT_SECURE_NO_DEPRECATE - # define _CRT_NONSTDC_NO_DEPRECATE - #endif -*************** -*** 44,50 **** - #include - - /* Accommodate old versions of VC that don't have a modern Platform SDK */ -! #if _MSC_VER < 1300 - # undef UINT_PTR - # define UINT_PTR UINT - #endif ---- 44,50 ---- - #include - - /* Accommodate old versions of VC that don't have a modern Platform SDK */ -! #if defined(_MSC_VER) && _MSC_VER < 1300 - # undef UINT_PTR - # define UINT_PTR UINT - #endif -*** ../vim-7.2.363/src/version.c 2010-02-17 16:40:47.000000000 +0100 ---- src/version.c 2010-02-17 17:23:15.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 364, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -245. You use Real Audio to listen to a radio station from a distant - city rather than turn on your stereo system. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.365 b/7.2.365 deleted file mode 100644 index e48990b9..00000000 --- a/7.2.365 +++ /dev/null @@ -1,71 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.365 (extra) -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.365 (extra) -Problem: MS-Windows with MingW: "File->Save As" does not work. (John - Marriott) -Solution: Correctly fill in structure size. (Andy Kittner) -Files: src/gui_w48.c - - -*** ../vim-7.2.364/src/gui_w48.c 2010-02-17 16:31:27.000000000 +0100 ---- src/gui_w48.c 2010-02-17 17:30:15.000000000 +0100 -*************** -*** 3345,3351 **** - #ifdef OPENFILENAME_SIZE_VERSION_400 - /* be compatible with Windows NT 4.0 */ - /* TODO: what to use for OPENFILENAMEW??? */ -! fileStruct.lStructSize = sizeof(OPENFILENAME_SIZE_VERSION_400); - #else - fileStruct.lStructSize = sizeof(fileStruct); - #endif ---- 3345,3351 ---- - #ifdef OPENFILENAME_SIZE_VERSION_400 - /* be compatible with Windows NT 4.0 */ - /* TODO: what to use for OPENFILENAMEW??? */ -! fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400; - #else - fileStruct.lStructSize = sizeof(fileStruct); - #endif -*************** -*** 3506,3512 **** - memset(&fileStruct, 0, sizeof(OPENFILENAME)); - #ifdef OPENFILENAME_SIZE_VERSION_400 - /* be compatible with Windows NT 4.0 */ -! fileStruct.lStructSize = sizeof(OPENFILENAME_SIZE_VERSION_400); - #else - fileStruct.lStructSize = sizeof(fileStruct); - #endif ---- 3506,3512 ---- - memset(&fileStruct, 0, sizeof(OPENFILENAME)); - #ifdef OPENFILENAME_SIZE_VERSION_400 - /* be compatible with Windows NT 4.0 */ -! fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400; - #else - fileStruct.lStructSize = sizeof(fileStruct); - #endif -*** ../vim-7.2.364/src/version.c 2010-02-17 17:24:23.000000000 +0100 ---- src/version.c 2010-02-17 17:31:54.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 365, - /**/ - - --- -hundred-and-one symptoms of being an internet addict: -246. You use up your free 100 hours in less than a week. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.366 b/7.2.366 deleted file mode 100644 index 952a0f2f..00000000 --- a/7.2.366 +++ /dev/null @@ -1,134 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.366 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.366 -Problem: CTRL-B doesn't go back to the first line of the buffer. -Solution: Avoid an overflow when adding MAXCOL. -Files: src/move.c - - -*** ../vim-7.2.365/src/move.c 2010-02-03 17:42:59.000000000 +0100 ---- src/move.c 2010-02-17 17:49:34.000000000 +0100 -*************** -*** 1610,1616 **** - * Add one line above "lp->lnum". This can be a filler line, a closed fold or - * a (wrapped) text line. Uses and sets "lp->fill". - * Returns the height of the added line in "lp->height". -! * Lines above the first one are incredibly high. - */ - static void - topline_back(lp) ---- 1610,1616 ---- - * Add one line above "lp->lnum". This can be a filler line, a closed fold or - * a (wrapped) text line. Uses and sets "lp->fill". - * Returns the height of the added line in "lp->height". -! * Lines above the first one are incredibly high: MAXCOL. - */ - static void - topline_back(lp) -*************** -*** 1942,1948 **** - { - loff.lnum = curwin->w_topline; - topline_back(&loff); -! if (used + loff.height > curwin->w_height) - break; - used += loff.height; - #ifdef FEAT_DIFF ---- 1942,1948 ---- - { - loff.lnum = curwin->w_topline; - topline_back(&loff); -! if (loff.height == MAXCOL || used + loff.height > curwin->w_height) - break; - used += loff.height; - #ifdef FEAT_DIFF -*************** -*** 2021,2027 **** - - /* Add one line above */ - topline_back(&loff); -! used += loff.height; - if (used > curwin->w_height) - break; - if (loff.lnum >= curwin->w_botline ---- 2021,2030 ---- - - /* Add one line above */ - topline_back(&loff); -! if (loff.height == MAXCOL) -! used = MAXCOL; -! else -! used += loff.height; - if (used > curwin->w_height) - break; - if (loff.lnum >= curwin->w_botline -*************** -*** 2175,2181 **** - if (below > above) /* add a line above the cursor */ - { - topline_back(&loff); -! used += loff.height; - if (used > curwin->w_height) - break; - above += loff.height; ---- 2178,2187 ---- - if (below > above) /* add a line above the cursor */ - { - topline_back(&loff); -! if (loff.height == MAXCOL) -! used = MAXCOL; -! else -! used += loff.height; - if (used > curwin->w_height) - break; - above += loff.height; -*************** -*** 2472,2480 **** - while (n <= curwin->w_height && loff.lnum >= 1) - { - topline_back(&loff); -! n += loff.height; - } -! if (n <= curwin->w_height) /* at begin of file */ - { - curwin->w_topline = 1; - #ifdef FEAT_DIFF ---- 2478,2489 ---- - while (n <= curwin->w_height && loff.lnum >= 1) - { - topline_back(&loff); -! if (loff.height == MAXCOL) -! n = MAXCOL; -! else -! n += loff.height; - } -! if (loff.lnum < 1) /* at begin of file */ - { - curwin->w_topline = 1; - #ifdef FEAT_DIFF -*** ../vim-7.2.365/src/version.c 2010-02-17 17:34:38.000000000 +0100 ---- src/version.c 2010-02-17 18:13:22.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 366, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -247. You use www.switchboard.com instead of dialing 411 and 555-12-12 - for directory assistance. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.367 b/7.2.367 deleted file mode 100644 index 6d461c98..00000000 --- a/7.2.367 +++ /dev/null @@ -1,77 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.367 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.367 -Problem: "xxd -r -p" doesn't work as documented. -Solution: Skip white space. (James Vega) -Files: src/xxd/xxd.c - - -*** ../vim-7.2.366/src/xxd/xxd.c 2009-06-16 18:29:37.000000000 +0200 ---- src/xxd/xxd.c 2010-02-17 18:25:11.000000000 +0100 -*************** -*** 231,237 **** - fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname); - fprintf(stderr, "Options:\n"); - fprintf(stderr, " -a toggle autoskip: A single '*' replaces nul-lines. Default off.\n"); -! fprintf(stderr, " -b binary digit dump (incompatible with -p,-i,-r). Default hex.\n"); - fprintf(stderr, " -c cols format octets per line. Default 16 (-i: 12, -ps: 30).\n"); - fprintf(stderr, " -E show characters in EBCDIC. Default ASCII.\n"); - fprintf(stderr, " -g number of octets per group in normal output. Default 2.\n"); ---- 231,237 ---- - fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname); - fprintf(stderr, "Options:\n"); - fprintf(stderr, " -a toggle autoskip: A single '*' replaces nul-lines. Default off.\n"); -! fprintf(stderr, " -b binary digit dump (incompatible with -ps,-i,-r). Default hex.\n"); - fprintf(stderr, " -c cols format octets per line. Default 16 (-i: 12, -ps: 30).\n"); - fprintf(stderr, " -E show characters in EBCDIC. Default ASCII.\n"); - fprintf(stderr, " -g number of octets per group in normal output. Default 2.\n"); -*************** -*** 276,286 **** - if (c == '\r') /* Doze style input file? */ - continue; - -! #if 0 /* this doesn't work when there is normal text after the hex codes in -! the last line that looks like hex */ -! if (c == ' ' || c == '\n' || c == '\t') /* allow multiple spaces */ - continue; -- #endif - - n3 = n2; - n2 = n1; ---- 276,286 ---- - if (c == '\r') /* Doze style input file? */ - continue; - -! /* Allow multiple spaces. This doesn't work when there is normal text -! * after the hex codes in the last line that looks like hex, thus only -! * use it for PostScript format. */ -! if (hextype == HEX_POSTSCRIPT && (c == ' ' || c == '\n' || c == '\t')) - continue; - - n3 = n2; - n2 = n1; -*** ../vim-7.2.366/src/version.c 2010-02-17 18:20:23.000000000 +0100 ---- src/version.c 2010-02-17 18:26:35.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 367, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -248. You sign your letters with your e-mail address instead of your name. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.368 b/7.2.368 deleted file mode 100644 index 43107699..00000000 --- a/7.2.368 +++ /dev/null @@ -1,52 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.368 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.368 (after 7.2.361) -Problem: Ruby interface: Appending line doesn't work. (Michael Henry) -Solution: Reverse check for NULL line. (James Vega) -Files: src/if_ruby.c - - -*** ../vim-7.2.367/src/if_ruby.c 2010-02-17 16:23:03.000000000 +0100 ---- src/if_ruby.c 2010-02-18 15:47:42.000000000 +0100 -*************** -*** 869,875 **** - long n = NUM2LONG(num); - aco_save_T aco; - -! if (line != NULL) { - rb_raise(rb_eIndexError, "NULL line"); - } - else if (n >= 0 && n <= buf->b_ml.ml_line_count) ---- 869,875 ---- - long n = NUM2LONG(num); - aco_save_T aco; - -! if (line == NULL) { - rb_raise(rb_eIndexError, "NULL line"); - } - else if (n >= 0 && n <= buf->b_ml.ml_line_count) -*** ../vim-7.2.367/src/version.c 2010-02-17 18:28:06.000000000 +0100 ---- src/version.c 2010-02-18 15:48:09.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 368, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -251. You've never seen your closest friends who usually live WAY too far away. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.369 b/7.2.369 deleted file mode 100644 index adcab24e..00000000 --- a/7.2.369 +++ /dev/null @@ -1,55 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.369 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.369 -Problem: Error message is not easy to understand. -Solution: Add quotes. (SungHyun Nam) -Files: src/ex_cmds2.c - - -*** ../vim-7.2.368/src/ex_cmds2.c 2010-02-03 15:14:15.000000000 +0100 ---- src/ex_cmds2.c 2010-02-18 21:16:20.000000000 +0100 -*************** -*** 1092,1098 **** - set_vim_var_nr(VV_PROFILING, 1L); - } - else if (do_profiling == PROF_NONE) -! EMSG(_("E750: First use :profile start ")); - else if (STRCMP(eap->arg, "pause") == 0) - { - if (do_profiling == PROF_YES) ---- 1092,1098 ---- - set_vim_var_nr(VV_PROFILING, 1L); - } - else if (do_profiling == PROF_NONE) -! EMSG(_("E750: First use \":profile start {fname}\"")); - else if (STRCMP(eap->arg, "pause") == 0) - { - if (do_profiling == PROF_YES) -*** ../vim-7.2.368/src/version.c 2010-02-18 15:51:25.000000000 +0100 ---- src/version.c 2010-02-24 13:58:28.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 369, - /**/ - --- -MAN: You don't frighten us, English pig-dog! Go and boil your bottoms, - son of a silly person. I blow my nose on you, so-called Arthur-king, - you and your silly English K...kaniggets. - He puts hands to his ears and blows a raspberry. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.370 b/7.2.370 deleted file mode 100644 index 3e8457e0..00000000 --- a/7.2.370 +++ /dev/null @@ -1,156 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.370 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.370 (after 7.2.356) -Problem: A redraw may cause folds to be closed. -Solution: Revert part of the previous patch. Add a test. (Lech Lorens) -Files: src/diff.c, src/fold.c, src/option.c, src/testdir/test45.in, - src/testdir/test45.ok - - -*** ../vim-7.2.369/src/diff.c 2009-07-22 16:22:33.000000000 +0200 ---- src/diff.c 2010-02-24 14:31:12.000000000 +0100 -*************** -*** 1117,1142 **** - win_T *wp; - int addbuf; /* Add buffer to diff. */ - { - wp->w_p_diff = TRUE; - wp->w_p_scb = TRUE; - wp->w_p_wrap = FALSE; - # ifdef FEAT_FOLDING -! { -! win_T *old_curwin = curwin; -! -! curwin = wp; -! curbuf = curwin->w_buffer; -! set_string_option_direct((char_u *)"fdm", -1, (char_u *)"diff", - OPT_LOCAL|OPT_FREE, 0); -! curwin = old_curwin; -! curbuf = curwin->w_buffer; -! wp->w_p_fdc = diff_foldcolumn; -! wp->w_p_fen = TRUE; -! wp->w_p_fdl = 0; -! foldUpdateAll(wp); -! /* make sure topline is not halfway a fold */ -! changed_window_setting_win(wp); -! } - # endif - #ifdef FEAT_SCROLLBIND - if (vim_strchr(p_sbo, 'h') == NULL) ---- 1117,1147 ---- - win_T *wp; - int addbuf; /* Add buffer to diff. */ - { -+ # ifdef FEAT_FOLDING -+ win_T *old_curwin = curwin; -+ -+ /* close the manually opened folds */ -+ curwin = wp; -+ newFoldLevel(); -+ curwin = old_curwin; -+ # endif -+ - wp->w_p_diff = TRUE; - wp->w_p_scb = TRUE; - wp->w_p_wrap = FALSE; - # ifdef FEAT_FOLDING -! curwin = wp; -! curbuf = curwin->w_buffer; -! set_string_option_direct((char_u *)"fdm", -1, (char_u *)"diff", - OPT_LOCAL|OPT_FREE, 0); -! curwin = old_curwin; -! curbuf = curwin->w_buffer; -! wp->w_p_fdc = diff_foldcolumn; -! wp->w_p_fen = TRUE; -! wp->w_p_fdl = 0; -! foldUpdateAll(wp); -! /* make sure topline is not halfway a fold */ -! changed_window_setting_win(wp); - # endif - #ifdef FEAT_SCROLLBIND - if (vim_strchr(p_sbo, 'h') == NULL) -*** ../vim-7.2.369/src/fold.c 2010-02-03 18:14:41.000000000 +0100 ---- src/fold.c 2010-02-24 13:09:04.000000000 +0100 -*************** -*** 854,865 **** - && fp->fd_top < bot) - { - fp->fd_small = MAYBE; -- -- /* Not sure if this is the right place to reset fd_flags (suggested by -- * Lech Lorens). */ -- if (wp->w_foldinvalid) -- fp->fd_flags = FD_LEVEL; -- - ++fp; - } - ---- 854,859 ---- -*** ../vim-7.2.369/src/option.c 2010-02-11 17:02:04.000000000 +0100 ---- src/option.c 2010-02-24 13:09:44.000000000 +0100 -*************** -*** 6586,6592 **** ---- 6586,6596 ---- - || *curwin->w_p_fdm == NUL) - errmsg = e_invarg; - else -+ { - foldUpdateAll(curwin); -+ if (foldmethodIsDiff(curwin)) -+ newFoldLevel(); -+ } - } - # ifdef FEAT_EVAL - /* 'foldexpr' */ -*** ../vim-7.2.369/src/testdir/test45.in 2009-11-03 14:46:35.000000000 +0100 ---- src/testdir/test45.in 2010-02-24 13:02:39.000000000 +0100 -*************** -*** 36,41 **** ---- 36,43 ---- - k:call append("$", getline(".")) - jAcommentstart Acommentend:set fdl=1 - 3j:call append("$", getline(".")) -+ :set fdl=0 -+ zO j:call append("$", getline(".")) - :" test expression folding - :fun Flvl() - let l = getline(v:lnum) -*** ../vim-7.2.369/src/testdir/test45.ok 2009-11-03 14:46:35.000000000 +0100 ---- src/testdir/test45.ok 2010-02-24 12:58:55.000000000 +0100 -*************** -*** 11,16 **** ---- 11,17 ---- - folding 9 ii - 3 cc - 7 gg -+ 8 hh - expr 2 - 1 - 2 -*** ../vim-7.2.369/src/version.c 2010-02-24 13:59:09.000000000 +0100 ---- src/version.c 2010-02-24 14:28:20.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 370, - /**/ - --- -MAN: Fetchez la vache! -GUARD: Quoi? -MAN: Fetchez la vache! - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.371 b/7.2.371 deleted file mode 100644 index db875b62..00000000 --- a/7.2.371 +++ /dev/null @@ -1,322 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.371 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.371 -Problem: Build problems on Tandem NonStop. -Solution: A few changes to #ifdefs (Joachim Schmitz) -Files: src/auto/configure, src/configure.in, src/config.h.in, src/vim.h, - src/if_cscope.c, src/osdef1.h.in, src/tag.c - - -*** ../vim-7.2.370/src/auto/configure 2010-02-17 16:23:03.000000000 +0100 ---- src/auto/configure 2010-02-24 14:27:00.000000000 +0100 -*************** -*** 14038,14046 **** - - - -! -! -! for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \ - getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ - memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ - setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ ---- 14038,14044 ---- - - - -! for ac_func in bcmp fchdir fchown fsync getcwd getpseudotty \ - getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ - memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ - setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ -*************** -*** 14146,14151 **** ---- 14144,14281 ---- - fi - done - -+ { $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -+ $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -+ if test "${ac_cv_sys_largefile_source+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+ else -+ while :; do -+ cat >conftest.$ac_ext <<_ACEOF -+ /* confdefs.h. */ -+ _ACEOF -+ cat confdefs.h >>conftest.$ac_ext -+ cat >>conftest.$ac_ext <<_ACEOF -+ /* end confdefs.h. */ -+ #include /* for off_t */ -+ #include -+ int -+ main () -+ { -+ int (*fp) (FILE *, off_t, int) = fseeko; -+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); -+ ; -+ return 0; -+ } -+ _ACEOF -+ rm -f conftest.$ac_objext conftest$ac_exeext -+ if { (ac_try="$ac_link" -+ case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+ esac -+ eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+ $as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest$ac_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_sys_largefile_source=no; break -+ else -+ $as_echo "$as_me: failed program was:" >&5 -+ sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+ fi -+ -+ rm -rf conftest.dSYM -+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+ /* confdefs.h. */ -+ _ACEOF -+ cat confdefs.h >>conftest.$ac_ext -+ cat >>conftest.$ac_ext <<_ACEOF -+ /* end confdefs.h. */ -+ #define _LARGEFILE_SOURCE 1 -+ #include /* for off_t */ -+ #include -+ int -+ main () -+ { -+ int (*fp) (FILE *, off_t, int) = fseeko; -+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); -+ ; -+ return 0; -+ } -+ _ACEOF -+ rm -f conftest.$ac_objext conftest$ac_exeext -+ if { (ac_try="$ac_link" -+ case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+ esac -+ eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+ $as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest$ac_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_sys_largefile_source=1; break -+ else -+ $as_echo "$as_me: failed program was:" >&5 -+ sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+ fi -+ -+ rm -rf conftest.dSYM -+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+ ac_cv_sys_largefile_source=unknown -+ break -+ done -+ fi -+ { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5 -+ $as_echo "$ac_cv_sys_largefile_source" >&6; } -+ case $ac_cv_sys_largefile_source in #( -+ no | unknown) ;; -+ *) -+ cat >>confdefs.h <<_ACEOF -+ #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source -+ _ACEOF -+ ;; -+ esac -+ rm -rf conftest* -+ -+ # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug -+ # in glibc 2.1.3, but that breaks too many other things. -+ # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. -+ if test $ac_cv_sys_largefile_source != unknown; then -+ -+ cat >>confdefs.h <<\_ACEOF -+ #define HAVE_FSEEKO 1 -+ _ACEOF -+ -+ fi -+ - - { $as_echo "$as_me:$LINENO: checking for st_blksize" >&5 - $as_echo_n "checking for st_blksize... " >&6; } -*** ../vim-7.2.370/src/configure.in 2010-02-17 16:23:03.000000000 +0100 ---- src/configure.in 2010-02-24 14:18:49.000000000 +0100 -*************** -*** 2642,2655 **** - AC_DEFINE(BAD_GETCWD) - fi - -! dnl Check for functions in one big call, to reduce the size of configure -! AC_CHECK_FUNCS(bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \ - getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ - memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ - setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ - sigvec strcasecmp strerror strftime stricmp strncasecmp \ - strnicmp strpbrk strtol tgetent towlower towupper iswupper \ - usleep utime utimes) - - dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible - AC_MSG_CHECKING(for st_blksize) ---- 2642,2657 ---- - AC_DEFINE(BAD_GETCWD) - fi - -! dnl Check for functions in one big call, to reduce the size of configure. -! dnl Can only be used for functions that do not require any include. -! AC_CHECK_FUNCS(bcmp fchdir fchown fsync getcwd getpseudotty \ - getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ - memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ - setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ - sigvec strcasecmp strerror strftime stricmp strncasecmp \ - strnicmp strpbrk strtol tgetent towlower towupper iswupper \ - usleep utime utimes) -+ AC_FUNC_FSEEKO - - dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible - AC_MSG_CHECKING(for st_blksize) -*** ../vim-7.2.370/src/config.h.in 2009-11-17 17:13:03.000000000 +0100 ---- src/config.h.in 2010-02-24 14:20:26.000000000 +0100 -*************** -*** 144,150 **** - #undef HAVE_FCHOWN - #undef HAVE_FSEEKO - #undef HAVE_FSYNC -- #undef HAVE_FTELLO - #undef HAVE_GETCWD - #undef HAVE_GETPSEUDOTTY - #undef HAVE_GETPWNAM ---- 144,149 ---- -*** ../vim-7.2.370/src/vim.h 2010-02-03 15:14:15.000000000 +0100 ---- src/vim.h 2010-02-24 14:08:14.000000000 +0100 -*************** -*** 52,58 **** - - /* user ID of root is usually zero, but not for everybody */ - #ifdef __TANDEM -! # define _TANDEM_SOURCE - # include - # define ROOT_UID 65535 - #else ---- 52,60 ---- - - /* user ID of root is usually zero, but not for everybody */ - #ifdef __TANDEM -! # ifndef _TANDEM_SOURCE -! # define _TANDEM_SOURCE -! # endif - # include - # define ROOT_UID 65535 - #else -*** ../vim-7.2.370/src/if_cscope.c 2010-01-19 14:59:14.000000000 +0100 ---- src/if_cscope.c 2010-02-24 14:10:21.000000000 +0100 -*************** -*** 2278,2284 **** ---- 2278,2288 ---- - /* Use sigaction() to limit the waiting time to two seconds. */ - sigemptyset(&sa.sa_mask); - sa.sa_handler = sig_handler; -+ # ifdef SA_NODEFER - sa.sa_flags = SA_NODEFER; -+ # else -+ sa.sa_flags = 0; -+ # endif - sigaction(SIGALRM, &sa, &old); - alarm(2); /* 2 sec timeout */ - -*** ../vim-7.2.370/src/osdef1.h.in 2007-02-27 16:47:59.000000000 +0100 ---- src/osdef1.h.in 2010-02-24 14:20:50.000000000 +0100 -*************** -*** 25,31 **** - extern int fseeko __ARGS((FILE *, off_t, int)); - #endif - extern long ftell __ARGS((FILE *)); -! #ifdef HAVE_FTELLO - extern off_t ftello __ARGS((FILE *)); - #endif - extern void rewind __ARGS((FILE *)); ---- 25,31 ---- - extern int fseeko __ARGS((FILE *, off_t, int)); - #endif - extern long ftell __ARGS((FILE *)); -! #ifdef HAVE_FSEEKO - extern off_t ftello __ARGS((FILE *)); - #endif - extern void rewind __ARGS((FILE *)); -*** ../vim-7.2.370/src/tag.c 2009-05-17 13:30:58.000000000 +0200 ---- src/tag.c 2010-02-24 14:20:12.000000000 +0100 -*************** -*** 90,97 **** - /* - * We use ftello() here, if available. It returns off_t instead of long, - * which helps if long is 32 bit and off_t is 64 bit. - */ -! #ifdef HAVE_FTELLO - # define ftell ftello - #endif - ---- 90,98 ---- - /* - * We use ftello() here, if available. It returns off_t instead of long, - * which helps if long is 32 bit and off_t is 64 bit. -+ * We assume that when fseeko() is available then ftello() is too. - */ -! #ifdef HAVE_FSEEKO - # define ftell ftello - #endif - -*** ../vim-7.2.370/src/version.c 2010-02-24 14:34:10.000000000 +0100 ---- src/version.c 2010-02-24 14:45:37.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 371, - /**/ - --- - A cow comes flying over the battlements, lowing aggressively. The cow - lands on GALAHAD'S PAGE, squashing him completely. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.372 b/7.2.372 deleted file mode 100644 index 064893c8..00000000 --- a/7.2.372 +++ /dev/null @@ -1,303 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.372 (extra) -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.372 (extra) -Problem: Cross-compiling GvimExt and xxd doesn't work. -Solution: Change the build files. (Markus Heidelberg) -Files: src/INSTALLpc.txt, src/GvimExt/Make_ming.mak, src/Make_cyg.mak, - src/Make_ming.mak, src/xxd/Make_cyg.mak - - -*** ../vim-7.2.371/src/INSTALLpc.txt 2008-07-13 19:20:53.000000000 +0200 ---- src/INSTALLpc.txt 2010-01-19 12:37:03.000000000 +0100 -*************** -*** 215,222 **** - - You should not need to do *any* editing of any files to get vim compiled this - way. If, for some reason, you want the console-mode-only version of vim (this -! is NOT recommended on Win32, especially on '95/'98!!!), you need only change -! the 'gvim.exe' to 'vim.exe' in the 'make' commands given above. - - If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX' - (also free!) and compress the file (typical compression is 50%). UPX can be ---- 215,223 ---- - - You should not need to do *any* editing of any files to get vim compiled this - way. If, for some reason, you want the console-mode-only version of vim (this -! is NOT recommended on Win32, especially on '95/'98!!!), you can use: -! -! make -f Make_ming.mak GUI=no vim.exe - - If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX' - (also free!) and compress the file (typical compression is 50%). UPX can be -*************** -*** 240,246 **** - The Cygnus one many not fully work yet. - With Cygnus gcc you can use the Unix Makefile instead (you need to get the - Unix archive then). Then you get a Cygwin application (feels like Vim is -! runnin on Unix), while with Make_cyg.mak you get a Windows application (like - with the other makefiles). - - ---- 241,247 ---- - The Cygnus one many not fully work yet. - With Cygnus gcc you can use the Unix Makefile instead (you need to get the - Unix archive then). Then you get a Cygwin application (feels like Vim is -! running on Unix), while with Make_cyg.mak you get a Windows application (like - with the other makefiles). - - -*************** -*** 259,268 **** ---- 260,272 ---- - If you like, you can compile the 'mingw' Win32 version from the comfort of - your Linux (or other unix) box. To do this, you need to follow a few steps: - 1) Install the mingw32 cross-compiler. See -+ http://www.mingw.org/wiki/LinuxCrossMinGW - http://www.libsdl.org/extras/win32/cross/README.txt - 2) Get and unpack both the Unix sources and the extra archive - 3) in 'Make_ming.mak', set 'CROSS' to 'yes' instead of 'no'. - Make further changes to 'Make_ming.mak' as you wish. -+ If your cross-compiler prefix differs from the predefined value, -+ set 'CROSS_COMPILE' corresponding. - 4) make -f Make_ming.mak gvim.exe - - Now you have created the Windows binary from your Linux box! Have fun... -*** ../vim-7.2.371/src/GvimExt/Make_ming.mak 2005-01-09 22:15:44.000000000 +0100 ---- src/GvimExt/Make_ming.mak 2010-02-24 14:56:37.000000000 +0100 -*************** -*** 20,36 **** - ifeq ($(CROSS),yes) - DEL = rm - ifeq ($(MINGWOLD),yes) -- CXX = i586-mingw32msvc-g++ - CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks -- WINDRES = i586-mingw32msvc-windres - else -- CXX = i386-mingw32msvc-g++ - CXXFLAGS := -O2 -mno-cygwin -- WINDRES = i386-mingw32msvc-windres - endif - else -- CXX := g++ -- WINDRES := windres - CXXFLAGS := -O2 -mno-cygwin - ifneq (sh.exe, $(SHELL)) - DEL = rm ---- 20,30 ---- -*************** -*** 38,43 **** ---- 32,39 ---- - DEL = del - endif - endif -+ CXX := $(CROSS_COMPILE)g++ -+ WINDRES := $(CROSS_COMPILE)windres - LIBS := -luuid - RES := gvimext.res - DEFFILE = gvimext_ming.def -*** ../vim-7.2.371/src/Make_cyg.mak 2009-09-11 12:48:56.000000000 +0200 ---- src/Make_cyg.mak 2010-02-24 14:59:02.000000000 +0100 -*************** -*** 1,6 **** - # - # Makefile for VIM on Win32, using Cygnus gcc -! # Last updated by Dan Sharp. Last Change: 2007 Sep 29 - # - # Also read INSTALLpc.txt! - # ---- 1,6 ---- - # - # Makefile for VIM on Win32, using Cygnus gcc -! # Last updated by Dan Sharp. Last Change: 2010 Feb 24 - # - # Also read INSTALLpc.txt! - # -*************** -*** 32,40 **** - # OLE no or yes: set to yes to make OLE gvim (no) - # DEBUG no or yes: set to yes if you wish a DEBUGging build (no) - # CPUNR No longer supported, use ARCH. -! # ARCH i386 through pentium4: select -march argument to compile with (i386) - # USEDLL no or yes: set to yes to use the Runtime library DLL (no) - # For USEDLL=yes the cygwin1.dll is required to run Vim. - # POSTSCRIPT no or yes: set to yes for PostScript printing (no) - # FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG) - # WINVER Lowest Win32 version to support. (0x0400) ---- 32,43 ---- - # OLE no or yes: set to yes to make OLE gvim (no) - # DEBUG no or yes: set to yes if you wish a DEBUGging build (no) - # CPUNR No longer supported, use ARCH. -! # ARCH i386 through pentium4: select -march argument to compile with -! # (i386) - # USEDLL no or yes: set to yes to use the Runtime library DLL (no) - # For USEDLL=yes the cygwin1.dll is required to run Vim. -+ # "no" does not work with latest version of Cygwin, use -+ # Make_ming.mak instead. Or set CC to gcc-3. - # POSTSCRIPT no or yes: set to yes for PostScript printing (no) - # FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG) - # WINVER Lowest Win32 version to support. (0x0400) -*************** -*** 99,104 **** ---- 102,108 ---- - INCLUDES = -march=$(ARCH) -Iproto - - #>>>>> name of the compiler and linker, name of lib directory -+ CROSS_COMPILE = - CC = gcc - RC = windres - -*************** -*** 467,476 **** - $(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(LIBS) -luuid -lole32 $(EXTRA_LIBS) - - xxd/xxd.exe: xxd/xxd.c -! $(MAKE) -C xxd -f Make_cyg.mak USEDLL=$(USEDLL) - - GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h -! $(MAKE) -C GvimExt -f Make_ming.mak - - vimrun.exe: vimrun.c - $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIBS) ---- 471,480 ---- - $(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(LIBS) -luuid -lole32 $(EXTRA_LIBS) - - xxd/xxd.exe: xxd/xxd.c -! $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) USEDLL=$(USEDLL) - - GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h -! $(MAKE) -C GvimExt -f Make_ming.mak CROSS_COMPILE=$(CROSS_COMPILE) - - vimrun.exe: vimrun.c - $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIBS) -*** ../vim-7.2.371/src/Make_ming.mak 2009-09-11 12:48:56.000000000 +0200 ---- src/Make_ming.mak 2010-02-24 15:01:31.000000000 +0100 -*************** -*** 241,255 **** - DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \ - -DHAVE_PATHDEF -DFEAT_$(FEATURES) - ifeq ($(CROSS),yes) -! # cross-compiler: -! CC = i586-pc-mingw32msvc-gcc - DEL = rm - MKDIR = mkdir -p -! WINDRES = i586-pc-mingw32msvc-windres - else - # normal (Windows) compilation: -- CC = gcc - ifneq (sh.exe, $(SHELL)) - DEL = rm - MKDIR = mkdir -p - DIRSLASH = / ---- 241,255 ---- - DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \ - -DHAVE_PATHDEF -DFEAT_$(FEATURES) - ifeq ($(CROSS),yes) -! # cross-compiler prefix: -! CROSS_COMPILE = i586-pc-mingw32msvc- - DEL = rm - MKDIR = mkdir -p -! DIRSLASH = / - else - # normal (Windows) compilation: - ifneq (sh.exe, $(SHELL)) -+ CROSS_COMPILE = - DEL = rm - MKDIR = mkdir -p - DIRSLASH = / -*************** -*** 258,265 **** - MKDIR = mkdir - DIRSLASH = \\ - endif -- WINDRES = windres - endif - - #>>>>> end of choices - ########################################################################### ---- 258,266 ---- - MKDIR = mkdir - DIRSLASH = \\ - endif - endif -+ CC := $(CROSS_COMPILE)gcc -+ WINDRES := $(CROSS_COMPILE)windres - - #>>>>> end of choices - ########################################################################### -*************** -*** 549,558 **** - upx vim.exe - - xxd/xxd.exe: xxd/xxd.c -! $(MAKE) -C xxd -f Make_cyg.mak - - GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h - $(MAKE) -C GvimExt -f Make_ming.mak - - clean: - -$(DEL) $(OUTDIR)$(DIRSLASH)*.o ---- 550,560 ---- - upx vim.exe - - xxd/xxd.exe: xxd/xxd.c -! $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) - - GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h - $(MAKE) -C GvimExt -f Make_ming.mak -+ $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) - - clean: - -$(DEL) $(OUTDIR)$(DIRSLASH)*.o -*** ../vim-7.2.371/src/xxd/Make_cyg.mak 2004-06-13 17:48:52.000000000 +0200 ---- src/xxd/Make_cyg.mak 2010-02-24 15:05:24.000000000 +0100 -*************** -*** 12,17 **** ---- 12,18 ---- - LIBS = - endif - -+ CC = gcc - CFLAGS = -O2 -Wall -DWIN32 $(DEFINES) - - ifneq (sh.exe, $(SHELL)) -*************** -*** 21,27 **** - endif - - xxd.exe: xxd.c -! gcc $(CFLAGS) -s -o xxd.exe xxd.c $(LIBS) - - clean: - -$(DEL) xxd.exe ---- 22,28 ---- - endif - - xxd.exe: xxd.c -! $(CC) $(CFLAGS) -s -o xxd.exe xxd.c $(LIBS) - - clean: - -$(DEL) xxd.exe -*** ../vim-7.2.371/src/version.c 2010-02-24 14:46:58.000000000 +0100 ---- src/version.c 2010-02-24 15:05:48.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 372, - /**/ - --- -Ten bugs in the hand is better than one as yet undetected. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.373 b/7.2.373 deleted file mode 100644 index 1bb4773d..00000000 --- a/7.2.373 +++ /dev/null @@ -1,54 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.373 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.373 -Problem: Gcc 4.5 adds more error messages. (Chris Indy) -Solution: Update default 'errorformat'. -Files: src/option.h - - -*** ../vim-7.2.372/src/option.h 2008-06-24 23:59:49.000000000 +0200 ---- src/option.h 2010-02-24 15:20:03.000000000 +0100 -*************** -*** 33,39 **** - # ifdef EBCDIC - #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" - # else -! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" - # endif - # endif - # endif ---- 33,39 ---- - # ifdef EBCDIC - #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" - # else -! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-Gfrom %f:%l:%c,%-Gfrom %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" - # endif - # endif - # endif -*** ../vim-7.2.372/src/version.c 2010-02-24 15:07:45.000000000 +0100 ---- src/version.c 2010-02-24 15:24:43.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 373, - /**/ - --- -ARTHUR: Right! Knights! Forward! - ARTHUR leads a charge toward the castle. Various shots of them battling on, - despite being hit by a variety of farm animals. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.374 b/7.2.374 deleted file mode 100644 index 50d3e74d..00000000 --- a/7.2.374 +++ /dev/null @@ -1,168 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.374 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.374 -Problem: Ruby eval() doesn't understand Vim types. -Solution: Add the vim_to_ruby() function. (George Gensure) -Files: src/eval.c, src/if_ruby.c - - -*** ../vim-7.2.373/src/eval.c 2010-01-19 15:51:29.000000000 +0100 ---- src/eval.c 2010-02-24 15:36:40.000000000 +0100 -*************** -*** 5872,5878 **** - return item1 == NULL && item2 == NULL; - } - -! #if defined(FEAT_PYTHON) || defined(FEAT_MZSCHEME) || defined(PROTO) - /* - * Return the dictitem that an entry in a hashtable points to. - */ ---- 5872,5879 ---- - return item1 == NULL && item2 == NULL; - } - -! #if defined(FEAT_RUBY) || defined(FEAT_PYTHON) || defined(FEAT_MZSCHEME) \ -! || defined(PROTO) - /* - * Return the dictitem that an entry in a hashtable points to. - */ -*** ../vim-7.2.373/src/if_ruby.c 2010-02-18 15:51:25.000000000 +0100 ---- src/if_ruby.c 2010-02-24 15:45:15.000000000 +0100 -*************** -*** 660,679 **** - return Qnil; - } - - static VALUE vim_evaluate(VALUE self UNUSED, VALUE str) - { - #ifdef FEAT_EVAL -! char_u *value = eval_to_string((char_u *)StringValuePtr(str), NULL, TRUE); - -! if (value != NULL) - { -! VALUE val = rb_str_new2((char *)value); -! vim_free(value); -! return val; - } -! else - #endif -- return Qnil; - } - - static VALUE buffer_new(buf_T *buf) ---- 660,747 ---- - return Qnil; - } - -+ #ifdef FEAT_EVAL -+ static VALUE vim_to_ruby(typval_T *tv) -+ { -+ VALUE result = Qnil; -+ -+ if (tv->v_type == VAR_STRING) -+ { -+ result = rb_str_new2((char *)tv->vval.v_string); -+ } -+ else if (tv->v_type == VAR_NUMBER) -+ { -+ result = INT2NUM(tv->vval.v_number); -+ } -+ # ifdef FEAT_FLOAT -+ else if (tv->v_type == VAR_FLOAT) -+ { -+ result = rb_float_new(tv->vval.v_float); -+ } -+ # endif -+ else if (tv->v_type == VAR_LIST) -+ { -+ list_T *list = tv->vval.v_list; -+ listitem_T *curr; -+ -+ result = rb_ary_new(); -+ -+ if (list != NULL) -+ { -+ for (curr = list->lv_first; curr != NULL; curr = curr->li_next) -+ { -+ rb_ary_push(result, vim_to_ruby(&curr->li_tv)); -+ } -+ } -+ } -+ else if (tv->v_type == VAR_DICT) -+ { -+ result = rb_hash_new(); -+ -+ if (tv->vval.v_dict != NULL) -+ { -+ hashtab_T *ht = &tv->vval.v_dict->dv_hashtab; -+ long_u todo = ht->ht_used; -+ hashitem_T *hi; -+ dictitem_T *di; -+ -+ for (hi = ht->ht_array; todo > 0; ++hi) -+ { -+ if (!HASHITEM_EMPTY(hi)) -+ { -+ --todo; -+ -+ di = dict_lookup(hi); -+ rb_hash_aset(result, rb_str_new2((char *)hi->hi_key), -+ vim_to_ruby(&di->di_tv)); -+ } -+ } -+ } -+ } /* else return Qnil; */ -+ -+ return result; -+ } -+ #endif -+ - static VALUE vim_evaluate(VALUE self UNUSED, VALUE str) - { - #ifdef FEAT_EVAL -! typval_T *tv; -! VALUE result; - -! tv = eval_expr((char_u *)StringValuePtr(str), NULL); -! if (tv == NULL) - { -! return Qnil; - } -! result = vim_to_ruby(tv); -! -! free_tv(tv); -! -! return result; -! #else -! return Qnil; - #endif - } - - static VALUE buffer_new(buf_T *buf) -*** ../vim-7.2.373/src/version.c 2010-02-24 15:25:13.000000000 +0100 ---- src/version.c 2010-02-24 15:46:57.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 374, - /**/ - --- -ARTHUR: (as the MAN next to him is squashed by a sheep) Knights! Run away! - Midst echoing shouts of "run away" the KNIGHTS retreat to cover with the odd - cow or goose hitting them still. The KNIGHTS crouch down under cover. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.375 b/7.2.375 deleted file mode 100644 index 3374cd1b..00000000 --- a/7.2.375 +++ /dev/null @@ -1,64 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.375 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.375 -Problem: ml_get errors when using ":bprevious" in a BufEnter autocmd. - (Dominique Pelle) -Solution: Clear w_valid when entering another buffer. -Files: src/buffer.c - - -*** ../vim-7.2.374/src/buffer.c 2010-01-19 14:59:14.000000000 +0100 ---- src/buffer.c 2010-02-24 16:29:22.000000000 +0100 -*************** -*** 115,121 **** - #endif - - /* mark cursor position as being invalid */ -! changed_line_abv_curs(); - - if (curbuf->b_ffname != NULL - #ifdef FEAT_NETBEANS_INTG ---- 115,121 ---- - #endif - - /* mark cursor position as being invalid */ -! curwin->w_valid = 0; - - if (curbuf->b_ffname != NULL - #ifdef FEAT_NETBEANS_INTG -*************** -*** 1399,1404 **** ---- 1399,1407 ---- - curwin->w_topline_was_set = FALSE; - #endif - -+ /* mark cursor position as being invalid */ -+ curwin->w_valid = 0; -+ - /* Make sure the buffer is loaded. */ - if (curbuf->b_ml.ml_mfp == NULL) /* need to load the file */ - { -*** ../vim-7.2.374/src/version.c 2010-02-24 15:47:58.000000000 +0100 ---- src/version.c 2010-02-24 16:30:03.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 375, - /**/ - --- -Error:015 - Unable to exit Windows. Try the door. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.376 b/7.2.376 deleted file mode 100644 index 718875b2..00000000 --- a/7.2.376 +++ /dev/null @@ -1,50 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.376 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.376 -Problem: ml_get error when using SiSU syntax. (Nathan Thomas) -Solution: If the match ends below the last line move it to the end of the - last line. -Files: src/syntax.c - - -*** ../vim-7.2.375/src/syntax.c 2010-01-19 14:59:14.000000000 +0100 ---- src/syntax.c 2010-02-24 17:14:13.000000000 +0100 -*************** -*** 3086,3091 **** ---- 3086,3097 ---- - col = regmatch->startpos[0].col; - off = spp->sp_offsets[idx]; - } -+ if (result->lnum > syn_buf->b_ml.ml_line_count) -+ { -+ /* a "\n" at the end of the pattern may take us below the last line */ -+ result->lnum = syn_buf->b_ml.ml_line_count; -+ col = STRLEN(ml_get_buf(syn_buf, result->lnum, FALSE)); -+ } - if (off != 0) - { - base = ml_get_buf(syn_buf, result->lnum, FALSE); -*** ../vim-7.2.375/src/version.c 2010-02-24 16:58:30.000000000 +0100 ---- src/version.c 2010-02-24 17:15:48.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 376, - /**/ - --- -press CTRL-ALT-DEL for more information - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.377 b/7.2.377 deleted file mode 100644 index e854ce71..00000000 --- a/7.2.377 +++ /dev/null @@ -1,66 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.377 (extra) -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.377 (extra, after 7.2.372) -Problem: Misplaced assignment. Duplicate build line for gvimext.dll. -Solution: Move setting CROSS_COMPILE to before ifneq. Remove the wrong - build line. (Markus Heidelberg) -Files: src/Make_ming.mak - - -*** ../vim-7.2.376/src/Make_ming.mak 2010-02-24 15:07:45.000000000 +0100 ---- src/Make_ming.mak 2010-02-26 22:01:07.000000000 +0100 -*************** -*** 248,255 **** - DIRSLASH = / - else - # normal (Windows) compilation: -- ifneq (sh.exe, $(SHELL)) - CROSS_COMPILE = - DEL = rm - MKDIR = mkdir -p - DIRSLASH = / ---- 248,255 ---- - DIRSLASH = / - else - # normal (Windows) compilation: - CROSS_COMPILE = -+ ifneq (sh.exe, $(SHELL)) - DEL = rm - MKDIR = mkdir -p - DIRSLASH = / -*************** -*** 553,559 **** - $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) - - GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h -- $(MAKE) -C GvimExt -f Make_ming.mak - $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) - - clean: ---- 553,558 ---- -*** ../vim-7.2.376/src/version.c 2010-02-24 17:22:14.000000000 +0100 ---- src/version.c 2010-02-26 22:01:45.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 377, - /**/ - --- -FIRST HEAD: All right! All right! We'll kill him first and then have tea and - biscuits. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.378 b/7.2.378 deleted file mode 100644 index de2251f4..00000000 --- a/7.2.378 +++ /dev/null @@ -1,69 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.378 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.378 -Problem: C function declaration indented too much. (Rui) -Solution: Don't see a line containing { or } as a type. (Matt Wozniski) -Files: src/misc1.c - - -*** ../vim-7.2.377/src/misc1.c 2010-01-06 17:46:03.000000000 +0100 ---- src/misc1.c 2010-02-26 22:36:50.000000000 +0100 -*************** -*** 7727,7737 **** - /* - * If the NEXT line is a function declaration, the current - * line needs to be indented as a function type spec. -! * Don't do this if the current line looks like a comment -! * or if the current line is terminated, ie. ends in ';'. - */ - 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) ---- 7727,7740 ---- - /* - * If the NEXT line is a function declaration, the current - * line needs to be indented as a function type spec. -! * Don't do this if the current line looks like a comment or if the -! * current line is terminated, ie. ends in ';', or if the current line -! * contains { or }: "void f() {\n if (1)" - */ - else if (cur_curpos.lnum < curbuf->b_ml.ml_line_count - && !cin_nocode(theline) -+ && vim_strchr(theline, '{') == NULL -+ && vim_strchr(theline, '}') == NULL - && !cin_ends_in(theline, (char_u *)":", NULL) - && !cin_ends_in(theline, (char_u *)",", NULL) - && cin_isfuncdecl(NULL, cur_curpos.lnum + 1) -*** ../vim-7.2.377/src/version.c 2010-02-26 22:05:17.000000000 +0100 ---- src/version.c 2010-03-02 12:30:30.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 378, - /**/ - --- - An extraordinary TALL KNIGHT in all black (possibly John with Mike on his - shoulders) walks out from the dark trees. He is extremely fierce and - gruesome countenance. He walks towards KING ARTHUR and PATSY, who are - wazzing like mad. (Salopian slang, meaning very scared. almost to the - point of wetting oneself, e.g. before an important football match or - prior to a postering. Salopian slang meaning a beating by the school - praeposters. Sorry about the Salopian slant to this stage direction - Ed.) - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.379 b/7.2.379 deleted file mode 100644 index 8a600e9e..00000000 --- a/7.2.379 +++ /dev/null @@ -1,55 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.379 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.379 -Problem: 'eventignore' is set to an invalid value inside ":doau". (Antony - Scriven) -Solution: Don't include the leading comma when the option was empty. -Files: src/fileio.c - - -*** ../vim-7.2.378/src/fileio.c 2010-01-19 14:59:14.000000000 +0100 ---- src/fileio.c 2010-03-01 21:01:04.000000000 +0100 -*************** -*** 7925,7931 **** - new_ei = vim_strnsave(p_ei, (int)(STRLEN(p_ei) + STRLEN(what))); - if (new_ei != NULL) - { -! STRCAT(new_ei, what); - set_string_option_direct((char_u *)"ei", -1, new_ei, - OPT_FREE, SID_NONE); - vim_free(new_ei); ---- 7925,7934 ---- - new_ei = vim_strnsave(p_ei, (int)(STRLEN(p_ei) + STRLEN(what))); - if (new_ei != NULL) - { -! if (*what == ',' && *p_ei == NUL) -! STRCPY(new_ei, what + 1); -! else -! STRCAT(new_ei, what); - set_string_option_direct((char_u *)"ei", -1, new_ei, - OPT_FREE, SID_NONE); - vim_free(new_ei); -*** ../vim-7.2.378/src/version.c 2010-03-02 12:37:01.000000000 +0100 ---- src/version.c 2010-03-02 12:46:45.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 379, - /**/ - --- -Back up my hard drive? I can't find the reverse switch! - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.380 b/7.2.380 deleted file mode 100644 index 2cdd8318..00000000 --- a/7.2.380 +++ /dev/null @@ -1,104 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.380 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.380 (after 7.2.363) -Problem: Perl interface builds with 5.10.1 but not with 5.10.0. -Solution: Change the #ifdefs. (Sergey Khorev) -Files: src/if_perl.xs - - -*** ../vim-7.2.379/src/if_perl.xs 2010-02-17 16:40:47.000000000 +0100 ---- src/if_perl.xs 2010-03-02 15:07:01.000000000 +0100 -*************** -*** 62,67 **** ---- 62,72 ---- - # define PERL589_OR_LATER - #endif - -+ #if (PERL_REVISION == 5) && ((PERL_VERSION > 10) || \ -+ (PERL_VERSION == 10) && (PERL_SUBVERSION >= 1)) -+ # define PERL5101_OR_LATER -+ #endif -+ - #ifndef pTHX - # define pTHX void - # define pTHX_ -*************** -*** 93,99 **** - # define perl_free dll_perl_free - # define Perl_get_context dll_Perl_get_context - # define Perl_croak dll_Perl_croak -! # if (PERL_REVISION == 5) && (PERL_VERSION >= 10) - # define Perl_croak_xs_usage dll_Perl_croak_xs_usage - # endif - # ifndef PROTO ---- 98,104 ---- - # define perl_free dll_perl_free - # define Perl_get_context dll_Perl_get_context - # define Perl_croak dll_Perl_croak -! # ifdef PERL5101_OR_LATER - # define Perl_croak_xs_usage dll_Perl_croak_xs_usage - # endif - # ifndef PROTO -*************** -*** 205,211 **** - static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**); - static void* (*Perl_get_context)(void); - static void (*Perl_croak)(pTHX_ const char*, ...); -! #if (PERL_REVISION == 5) && (PERL_VERSION >= 10) - static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params); - #endif - static void (*Perl_croak_nocontext)(const char*, ...); ---- 210,216 ---- - static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**); - static void* (*Perl_get_context)(void); - static void (*Perl_croak)(pTHX_ const char*, ...); -! #ifdef PERL5101_OR_LATER - static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params); - #endif - static void (*Perl_croak_nocontext)(const char*, ...); -*************** -*** 312,318 **** - {"perl_parse", (PERL_PROC*)&perl_parse}, - {"Perl_get_context", (PERL_PROC*)&Perl_get_context}, - {"Perl_croak", (PERL_PROC*)&Perl_croak}, -! #if (PERL_REVISION == 5) && (PERL_VERSION >= 10) - {"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage}, - #endif - {"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext}, ---- 317,323 ---- - {"perl_parse", (PERL_PROC*)&perl_parse}, - {"Perl_get_context", (PERL_PROC*)&Perl_get_context}, - {"Perl_croak", (PERL_PROC*)&Perl_croak}, -! #ifdef PERL5101_OR_LATER - {"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage}, - #endif - {"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext}, -*** ../vim-7.2.379/src/version.c 2010-03-02 12:47:58.000000000 +0100 ---- src/version.c 2010-03-02 15:13:21.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 380, - /**/ - --- -FATHER: Make sure the Prince doesn't leave this room until I come and - get him. -FIRST GUARD: Not ... to leave the room ... even if you come and get him. -FATHER: No. Until I come and get him. -SECOND GUARD: Hic. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.381 b/7.2.381 deleted file mode 100644 index 977a8ecd..00000000 --- a/7.2.381 +++ /dev/null @@ -1,218 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.381 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.381 -Problem: No completion for :behave. -Solution: Add :behave completion. Minor related fixes. (Dominique Pelle) -Files: src/ex_docmd.c, src/ex_getln.c, src/proto/ex_docmd.pro, src/vim.h - - -*** ../vim-7.2.380/src/ex_docmd.c 2010-02-03 15:14:15.000000000 +0100 ---- src/ex_docmd.c 2010-03-02 15:55:05.000000000 +0100 -*************** -*** 26,35 **** - long_u uc_argt; /* The argument type */ - char_u *uc_rep; /* The command's replacement string */ - long uc_def; /* The default value for a range/count */ -- scid_T uc_scriptID; /* SID where the command was defined */ - int uc_compl; /* completion type */ -! # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL) - char_u *uc_compl_arg; /* completion argument if any */ - # endif - } ucmd_T; - ---- 26,37 ---- - long_u uc_argt; /* The argument type */ - char_u *uc_rep; /* The command's replacement string */ - long uc_def; /* The default value for a range/count */ - int uc_compl; /* completion type */ -! # ifdef FEAT_EVAL -! scid_T uc_scriptID; /* SID where the command was defined */ -! # ifdef FEAT_CMDL_COMPL - char_u *uc_compl_arg; /* completion argument if any */ -+ # endif - # endif - } ucmd_T; - -*************** -*** 3156,3172 **** - return NULL; - } - for (ea.cmdidx = (cmdidx_T)0; (int)ea.cmdidx < (int)CMD_SIZE; -! ea.cmdidx = (cmdidx_T)((int)ea.cmdidx + 1)) -! if (STRNCMP(cmdnames[(int)ea.cmdidx].cmd_name, cmd, (size_t)len) == 0) - break; - - #ifdef FEAT_USR_CMDS - if (cmd[0] >= 'A' && cmd[0] <= 'Z') -- { - while (ASCII_ISALNUM(*p) || *p == '*') /* Allow * wild card */ - ++p; -- len = (int)(p - cmd); -- } - #endif - } - ---- 3158,3172 ---- - return NULL; - } - for (ea.cmdidx = (cmdidx_T)0; (int)ea.cmdidx < (int)CMD_SIZE; -! ea.cmdidx = (cmdidx_T)((int)ea.cmdidx + 1)) -! if (STRNCMP(cmdnames[(int)ea.cmdidx].cmd_name, cmd, -! (size_t)len) == 0) - break; - - #ifdef FEAT_USR_CMDS - if (cmd[0] >= 'A' && cmd[0] <= 'Z') - while (ASCII_ISALNUM(*p) || *p == '*') /* Allow * wild card */ - ++p; - #endif - } - -*************** -*** 3809,3814 **** ---- 3809,3817 ---- - set_context_in_profile_cmd(xp, arg); - break; - #endif -+ case CMD_behave: -+ xp->xp_context = EXPAND_BEHAVE; -+ break; - - #endif /* FEAT_CMDL_COMPL */ - -*************** -*** 10847,10852 **** ---- 10850,10873 ---- - EMSG2(_(e_invarg2), eap->arg); - } - -+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO) -+ /* -+ * Function given to ExpandGeneric() to obtain the possible arguments of the -+ * ":behave {mswin,xterm}" command. -+ */ -+ char_u * -+ get_behave_arg(xp, idx) -+ expand_T *xp UNUSED; -+ int idx; -+ { -+ if (idx == 0) -+ return (char_u *)"mswin"; -+ if (idx == 1) -+ return (char_u *)"xterm"; -+ return NULL; -+ } -+ #endif -+ - #ifdef FEAT_AUTOCMD - static int filetype_detect = FALSE; - static int filetype_plugin = FALSE; -*** ../vim-7.2.380/src/ex_getln.c 2010-02-03 15:14:15.000000000 +0100 ---- src/ex_getln.c 2010-03-02 15:28:13.000000000 +0100 -*************** -*** 4492,4497 **** ---- 4492,4498 ---- - } tab[] = - { - {EXPAND_COMMANDS, get_command_name, FALSE}, -+ {EXPAND_BEHAVE, get_behave_arg, TRUE}, - #ifdef FEAT_USR_CMDS - {EXPAND_USER_COMMANDS, get_user_commands, FALSE}, - {EXPAND_USER_CMD_FLAGS, get_user_cmd_flags, FALSE}, -*** ../vim-7.2.380/src/proto/ex_docmd.pro 2008-07-04 11:43:13.000000000 +0200 ---- src/proto/ex_docmd.pro 2010-03-02 15:37:37.000000000 +0100 -*************** -*** 52,55 **** ---- 52,56 ---- - int put_eol __ARGS((FILE *fd)); - int put_line __ARGS((FILE *fd, char *s)); - void dialog_msg __ARGS((char_u *buff, char *format, char_u *fname)); -+ char_u *get_behave_arg __ARGS((expand_T *xp, int idx)); - /* vim: set ft=c : */ -*** ../vim-7.2.380/src/vim.h 2010-02-24 14:46:58.000000000 +0100 ---- src/vim.h 2010-03-02 15:30:13.000000000 +0100 -*************** -*** 595,601 **** - - /* - * Terminal highlighting attribute bits. -! * Attibutes above HL_ALL are used for syntax highlighting. - */ - #define HL_NORMAL 0x00 - #define HL_INVERSE 0x01 ---- 595,601 ---- - - /* - * Terminal highlighting attribute bits. -! * Attributes above HL_ALL are used for syntax highlighting. - */ - #define HL_NORMAL 0x00 - #define HL_INVERSE 0x01 -*************** -*** 721,726 **** ---- 721,727 ---- - #define EXPAND_CSCOPE 33 - #define EXPAND_SIGN 34 - #define EXPAND_PROFILE 35 -+ #define EXPAND_BEHAVE 36 - - /* Values for exmode_active (0 is no exmode) */ - #define EXMODE_NORMAL 1 -*************** -*** 1262,1268 **** - } hlf_T; - - /* The HL_FLAGS must be in the same order as the HLF_ enums! -! * When chainging this also adjust the default for 'highlight'. */ - #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', '>', \ ---- 1263,1269 ---- - } hlf_T; - - /* The HL_FLAGS must be in the same order as the HLF_ enums! -! * When changing this also adjust the default for 'highlight'. */ - #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', '>', \ -*************** -*** 1430,1436 **** - #ifdef FEAT_MBYTE - /* We need to call mb_stricmp() even when we aren't dealing with a multi-byte - * encoding because mb_stricmp() takes care of all ascii and non-ascii -! * encodings, including characters with umluats in latin1, etc., while - * STRICMP() only handles the system locale version, which often does not - * handle non-ascii properly. */ - ---- 1431,1437 ---- - #ifdef FEAT_MBYTE - /* We need to call mb_stricmp() even when we aren't dealing with a multi-byte - * encoding because mb_stricmp() takes care of all ascii and non-ascii -! * encodings, including characters with umlauts in latin1, etc., while - * STRICMP() only handles the system locale version, which often does not - * handle non-ascii properly. */ - -*** ../vim-7.2.380/src/version.c 2010-03-02 15:14:22.000000000 +0100 ---- src/version.c 2010-03-02 15:51:24.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 381, - /**/ - --- -I'd like to meet the man who invented sex and see what he's working on now. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.382 b/7.2.382 deleted file mode 100644 index 56fcfa44..00000000 --- a/7.2.382 +++ /dev/null @@ -1,58 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.382 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.382 -Problem: Accessing freed memory when closing the cmdline window when - 'bufhide' is set to "wipe". -Solution: Check if the buffer still exists before invoking close_buffer() - (Dominique Pelle) -Files: src/ex_getln.c - - -*** ../vim-7.2.381/src/ex_getln.c 2010-03-02 15:55:51.000000000 +0100 ---- src/ex_getln.c 2010-03-02 16:29:38.000000000 +0100 -*************** -*** 6252,6258 **** - bp = curbuf; - win_goto(old_curwin); - win_close(wp, TRUE); -! close_buffer(NULL, bp, DOBUF_WIPE); - - /* Restore window sizes. */ - win_size_restore(&winsizes); ---- 6252,6262 ---- - bp = curbuf; - win_goto(old_curwin); - win_close(wp, TRUE); -! -! /* win_close() may have already wiped the buffer when 'bh' is -! * set to 'wipe' */ -! if (buf_valid(bp)) -! close_buffer(NULL, bp, DOBUF_WIPE); - - /* Restore window sizes. */ - win_size_restore(&winsizes); -*** ../vim-7.2.381/src/version.c 2010-03-02 15:55:51.000000000 +0100 ---- src/version.c 2010-03-02 17:22:11.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 382, - /**/ - --- -You had connectors? Eeee, when I were a lad we 'ad to carry the -bits between the computer and the terminal with a spoon... - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.383 b/7.2.383 deleted file mode 100644 index 25fa7142..00000000 --- a/7.2.383 +++ /dev/null @@ -1,101 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.383 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.383 -Problem: Vim doesn't build cleanly with MSVC 2010. -Solution: Change a few types. (George Reilly) -Files: src/ex_cmds2.c, src/if_python.c, src/syntax.c - - -*** ../vim-7.2.382/src/ex_cmds2.c 2010-02-24 13:59:08.000000000 +0100 ---- src/ex_cmds2.c 2010-03-02 17:42:54.000000000 +0100 -*************** -*** 1165,1171 **** - char_u *arg; - { - char_u *end_subcmd; -- int len; - - /* Default: expand subcommands. */ - xp->xp_context = EXPAND_PROFILE; ---- 1165,1170 ---- -*************** -*** 1176,1183 **** - if (*end_subcmd == NUL) - return; - -! len = end_subcmd - arg; -! if (len == 5 && STRNCMP(arg, "start", 5) == 0) - { - xp->xp_context = EXPAND_FILES; - xp->xp_pattern = skipwhite(end_subcmd); ---- 1175,1181 ---- - if (*end_subcmd == NUL) - return; - -! if (end_subcmd - arg == 5 && STRNCMP(arg, "start", 5) == 0) - { - xp->xp_context = EXPAND_FILES; - xp->xp_pattern = skipwhite(end_subcmd); -*** ../vim-7.2.382/src/if_python.c 2009-11-11 15:06:59.000000000 +0100 ---- src/if_python.c 2010-03-02 17:43:39.000000000 +0100 -*************** -*** 2080,2086 **** - return -1; - - /* When column is out of range silently correct it. */ -! len = STRLEN(ml_get_buf(this->win->w_buffer, lnum, FALSE)); - if (col > len) - col = len; - ---- 2080,2086 ---- - return -1; - - /* When column is out of range silently correct it. */ -! len = (long)STRLEN(ml_get_buf(this->win->w_buffer, lnum, FALSE)); - if (col > len) - col = len; - -*** ../vim-7.2.382/src/syntax.c 2010-02-24 17:22:14.000000000 +0100 ---- src/syntax.c 2010-03-02 17:45:25.000000000 +0100 -*************** -*** 3090,3096 **** - { - /* a "\n" at the end of the pattern may take us below the last line */ - result->lnum = syn_buf->b_ml.ml_line_count; -! col = STRLEN(ml_get_buf(syn_buf, result->lnum, FALSE)); - } - if (off != 0) - { ---- 3090,3096 ---- - { - /* a "\n" at the end of the pattern may take us below the last line */ - result->lnum = syn_buf->b_ml.ml_line_count; -! col = (int)STRLEN(ml_get_buf(syn_buf, result->lnum, FALSE)); - } - if (off != 0) - { -*** ../vim-7.2.382/src/version.c 2010-03-02 17:23:10.000000000 +0100 ---- src/version.c 2010-03-02 17:48:50.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 383, - /**/ - --- -You were lucky to have a LAKE! There were a hundred and sixty of -us living in a small shoebox in the middle of the road. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.384 b/7.2.384 deleted file mode 100644 index 24fc6807..00000000 --- a/7.2.384 +++ /dev/null @@ -1,59 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.384 (extra) -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.384 (extra) -Problem: Vim doesn't build properly with MSVC 2010. -Solution: Add the nmake version to the build file. (George Reilly) -Files: src/Make_mvc.mak, src/testdir/Make_dos.mak - - -*** ../vim-7.2.383/src/Make_mvc.mak 2009-09-11 12:48:56.000000000 +0200 ---- src/Make_mvc.mak 2010-03-02 17:44:22.000000000 +0100 -*************** -*** 361,366 **** ---- 361,369 ---- - !if "$(_NMAKE_VER)" == "10.00.20506.01" - MSVCVER = 10.0 - !endif -+ !if "$(_NMAKE_VER)" == "10.00.30128.01" -+ MSVCVER = 10.0 -+ !endif - !endif - - # Abort bulding VIM if version of VC is unrecognised. -*** ../vim-7.2.383/src/testdir/Make_dos.mak 2010-01-19 15:51:29.000000000 +0100 ---- src/testdir/Make_dos.mak 2010-03-02 17:45:48.000000000 +0100 -*************** -*** 56,61 **** ---- 56,62 ---- - -if exist small.vim del small.vim - -if exist tiny.vim del tiny.vim - -if exist mbyte.vim del mbyte.vim -+ -if exist mzscheme.vim del mzscheme.vim - -del X* - -if exist viminfo del viminfo - -*** ../vim-7.2.383/src/version.c 2010-03-02 17:50:30.000000000 +0100 ---- src/version.c 2010-03-02 17:59:09.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 384, - /**/ - --- -Yah, well, we had to carve our electrons out of driftwood we'd -find. In the winter. Uphill. Both ways. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.385 b/7.2.385 deleted file mode 100644 index 9f9a9178..00000000 --- a/7.2.385 +++ /dev/null @@ -1,63 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.385 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.385 -Problem: When in the command line window dragging status line only works - for last-but-one window. (Jean Johner) -Solution: Remove the code that disallows this. -Files: src/ui.c - - -*** ../vim-7.2.384/src/ui.c 2010-01-19 14:59:14.000000000 +0100 ---- src/ui.c 2010-03-02 18:06:30.000000000 +0100 -*************** -*** 2598,2611 **** - if (cmdwin_type != 0 && wp != curwin) - { - /* A click outside the command-line window: Use modeless -! * selection if possible. Allow dragging the status line of -! * windows just above the command-line window. */ -! if (wp->w_winrow + wp->w_height -! != curwin->w_prev->w_winrow + curwin->w_prev->w_height) -! { -! on_status_line = 0; -! dragwin = NULL; -! } - # ifdef FEAT_VERTSPLIT - on_sep_line = 0; - # endif ---- 2598,2604 ---- - if (cmdwin_type != 0 && wp != curwin) - { - /* A click outside the command-line window: Use modeless -! * selection if possible. Allow dragging the status lines. */ - # ifdef FEAT_VERTSPLIT - on_sep_line = 0; - # endif -*** ../vim-7.2.384/src/version.c 2010-03-02 17:59:39.000000000 +0100 ---- src/version.c 2010-03-02 18:14:29.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 385, - /**/ - --- -You were lucky. We lived for three months in a brown paper bag in a -septic tank. We used to have to get up at six o'clock in the morning, -clean the bag, eat a crust of stale bread, go to work down mill for -fourteen hours a day week in-week out. When we got home, our Dad -would thrash us to sleep with his belt! - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.386 b/7.2.386 deleted file mode 100644 index 7212b27c..00000000 --- a/7.2.386 +++ /dev/null @@ -1,61 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.386 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.386 -Problem: Focus hack for KDE 3.1 causes problems for other window managers. -Solution: Remove the hack. (forwarded by Joel Bradshaw) -Files: src/gui_gtk.c - - -*** ../vim-7.2.385/src/gui_gtk.c 2009-05-17 16:23:20.000000000 +0200 ---- src/gui_gtk.c 2010-03-10 12:07:59.000000000 +0100 -*************** -*** 2313,2331 **** - gtk_widget_destroy(dialog); - } - -- /* Terrible hack: When the text area still has focus when we remove the -- * dialog, somehow gvim loses window focus. This is with "point to type" -- * in the KDE 3.1 window manager. Warp the mouse pointer to outside the -- * window and back to avoid that. */ -- if (!gui.in_focus) -- { -- int x, y; -- -- gdk_window_get_pointer(gui.drawarea->window, &x, &y, NULL); -- gui_mch_setmouse(-100, -100); -- gui_mch_setmouse(x, y); -- } -- - return response > 0 ? response : 0; - } - ---- 2313,2318 ---- -*** ../vim-7.2.385/src/version.c 2010-03-02 18:15:47.000000000 +0100 ---- src/version.c 2010-03-10 12:09:00.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 386, - /**/ - --- -ARTHUR: Well, I AM king... -DENNIS: Oh king, eh, very nice. An' how'd you get that, eh? By exploitin' - the workers -- by 'angin' on to outdated imperialist dogma which - perpetuates the economic an' social differences in our society! If - there's ever going to be any progress-- - The Quest for the Holy Grail (Monty Python) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.387 b/7.2.387 deleted file mode 100644 index ccbd6e4c..00000000 --- a/7.2.387 +++ /dev/null @@ -1,238 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.387 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.387 -Problem: Ruby with MingW still doesn't build all versions. -Solution: More #ifdefs for the Ruby code. (Sergey Khorev) -Files: src/if_ruby.c - - -*** ../vim-7.2.386/src/if_ruby.c 2010-02-24 15:47:58.000000000 +0100 ---- src/if_ruby.c 2010-03-10 12:40:30.000000000 +0100 -*************** -*** 39,46 **** - # define rb_cTrueClass (*dll_rb_cTrueClass) - # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 - /* -! * On ver 1.8, all Ruby functions are exported with "__declspce(dllimport)" -! * in ruby.h. But it cause trouble for these variables, because it is - * defined in this file. When defined this RUBY_EXPORT it modified to - * "extern" and be able to avoid this problem. - */ ---- 39,46 ---- - # define rb_cTrueClass (*dll_rb_cTrueClass) - # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 - /* -! * On ver 1.8, all Ruby functions are exported with "__declspec(dllimport)" -! * in ruby.h. But it causes trouble for these variables, because it is - * defined in this file. When defined this RUBY_EXPORT it modified to - * "extern" and be able to avoid this problem. - */ -*************** -*** 53,58 **** ---- 53,65 ---- - # undef _WIN32_WINNT - #endif - -+ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 -+ /* Ruby 1.9 defines a number of static functions which use rb_num2long and -+ * rb_int2big */ -+ # define rb_num2long rb_num2long_stub -+ # define rb_int2big rb_int2big_stub -+ #endif -+ - #include - #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - # include -*************** -*** 159,165 **** - #define rb_str_concat dll_rb_str_concat - #define rb_str_new dll_rb_str_new - #define rb_str_new2 dll_rb_str_new2 -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - # define rb_errinfo dll_rb_errinfo - #else - # define ruby_errinfo (*dll_ruby_errinfo) ---- 166,179 ---- - #define rb_str_concat dll_rb_str_concat - #define rb_str_new dll_rb_str_new - #define rb_str_new2 dll_rb_str_new2 -! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 -! # define rb_string_value_ptr dll_rb_string_value_ptr -! # define rb_float_new dll_rb_float_new -! # define rb_ary_new dll_rb_ary_new -! # define rb_ary_push dll_rb_ary_push -! #endif -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ -! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 - # define rb_errinfo dll_rb_errinfo - #else - # define ruby_errinfo (*dll_ruby_errinfo) -*************** -*** 226,232 **** - static VALUE (*dll_rb_str_concat) (VALUE, VALUE); - static VALUE (*dll_rb_str_new) (const char*, long); - static VALUE (*dll_rb_str_new2) (const char*); -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - static VALUE (*dll_rb_errinfo) (void); - #else - static VALUE *dll_ruby_errinfo; ---- 240,247 ---- - static VALUE (*dll_rb_str_concat) (VALUE, VALUE); - static VALUE (*dll_rb_str_new) (const char*, long); - static VALUE (*dll_rb_str_new2) (const char*); -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ -! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 - static VALUE (*dll_rb_errinfo) (void); - #else - static VALUE *dll_ruby_errinfo; -*************** -*** 235,240 **** ---- 250,264 ---- - static void (*dll_ruby_init_loadpath) (void); - static void (*dll_NtInitialize) (int*, char***); - #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 -+ static char * (*dll_rb_string_value_ptr) (volatile VALUE*); -+ static VALUE (*dll_rb_float_new) (double); -+ static VALUE (*dll_rb_ary_new) (void); -+ static VALUE (*dll_rb_ary_push) (VALUE, VALUE); -+ #endif -+ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 -+ static VALUE (*dll_rb_int2big)(SIGNED_VALUE); -+ #endif -+ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 - static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...); - #endif - -*************** -*** 246,251 **** ---- 270,286 ---- - static VALUE (*dll_rb_sprintf) (const char*, ...); - #endif - -+ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 -+ static SIGNED_VALUE rb_num2long_stub(VALUE x) -+ { -+ return dll_rb_num2long(x); -+ } -+ static VALUE rb_int2big_stub(SIGNED_VALUE x) -+ { -+ return dll_rb_int2big(x); -+ } -+ #endif -+ - static HINSTANCE hinstRuby = 0; /* Instance of ruby.dll */ - - /* -*************** -*** 301,317 **** - {"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat}, - {"rb_str_new", (RUBY_PROC*)&dll_rb_str_new}, - {"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2}, -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - {"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo}, - #else - {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo}, - #endif - {"ruby_init", (RUBY_PROC*)&dll_ruby_init}, - {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath}, -! {"NtInitialize", (RUBY_PROC*)&dll_NtInitialize}, - #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 - {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf}, - #endif - #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - {"ruby_script", (RUBY_PROC*)&dll_ruby_script}, - {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, ---- 336,368 ---- - {"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat}, - {"rb_str_new", (RUBY_PROC*)&dll_rb_str_new}, - {"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2}, -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ -! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 - {"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo}, - #else - {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo}, - #endif - {"ruby_init", (RUBY_PROC*)&dll_ruby_init}, - {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath}, -! { -! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER < 19 -! "NtInitialize", -! #else -! "ruby_sysinit", -! #endif -! (RUBY_PROC*)&dll_NtInitialize}, - #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 - {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf}, - #endif -+ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 -+ {"rb_string_value_ptr", (RUBY_PROC*)&dll_rb_string_value_ptr}, -+ {"rb_float_new", (RUBY_PROC*)&dll_rb_float_new}, -+ {"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new}, -+ {"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push}, -+ #endif -+ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 -+ {"rb_int2big", (RUBY_PROC*)&dll_rb_int2big}, -+ #endif - #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - {"ruby_script", (RUBY_PROC*)&dll_ruby_script}, - {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, -*************** -*** 569,575 **** - static void error_print(int state) - { - #ifndef DYNAMIC_RUBY -! #if !(defined(RUBY_VERSION) && RUBY_VERSION >= 19) - RUBYEXTERN VALUE ruby_errinfo; - #endif - #endif ---- 620,627 ---- - static void error_print(int state) - { - #ifndef DYNAMIC_RUBY -! #if !(defined(RUBY_VERSION) && RUBY_VERSION >= 19) \ -! && !(defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19) - RUBYEXTERN VALUE ruby_errinfo; - #endif - #endif -*************** -*** 605,611 **** - break; - case TAG_RAISE: - case TAG_FATAL: -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - eclass = CLASS_OF(rb_errinfo()); - einfo = rb_obj_as_string(rb_errinfo()); - #else ---- 657,664 ---- - break; - case TAG_RAISE: - case TAG_FATAL: -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ -! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 - eclass = CLASS_OF(rb_errinfo()); - einfo = rb_obj_as_string(rb_errinfo()); - #else -*** ../vim-7.2.386/src/version.c 2010-03-10 12:24:44.000000000 +0100 ---- src/version.c 2010-03-10 12:45:55.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 387, - /**/ - --- -Vim is like Emacs without all the typing. (John "Johann" Spetz) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.388 b/7.2.388 deleted file mode 100644 index 1a8a7a88..00000000 --- a/7.2.388 +++ /dev/null @@ -1,86 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.388 (extra) -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.388 (extra part of 7.2.387) -Problem: Ruby with MingW still doesn't build all versions. -Solution: Different approach to build file. (Sergey Khorev) -Files: src/Make_ming.mak - - -*** ../vim-7.2.387/src/Make_ming.mak 2010-02-26 22:05:17.000000000 +0100 ---- src/Make_ming.mak 2010-03-10 12:34:25.000000000 +0100 -*************** -*** 212,234 **** - RUBY_VER_LONG = 1.6 - endif - -- ifeq ($(RUBY_VER), 16) - ifndef RUBY_PLATFORM - RUBY_PLATFORM = i586-mswin32 -! endif -! ifndef RUBY_INSTALL_NAME -! RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER) -! endif - else -- ifndef RUBY_PLATFORM - RUBY_PLATFORM = i386-mswin32 - endif - ifndef RUBY_INSTALL_NAME - RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER) - endif - endif - -! RUBYINC =-I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM) - ifeq (no, $(DYNAMIC_RUBY)) - RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME) - endif ---- 212,236 ---- - RUBY_VER_LONG = 1.6 - endif - - ifndef RUBY_PLATFORM -+ ifeq ($(RUBY_VER), 16) - RUBY_PLATFORM = i586-mswin32 -! else ifneq ("X$(wildcard, $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32)", X) -! RUBY_PLATFORM = i386-mingw32 - else - RUBY_PLATFORM = i386-mswin32 - endif -+ endif -+ - ifndef RUBY_INSTALL_NAME -+ ifeq ($(RUBY_VER), 16) -+ RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER) -+ else - RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER) - endif - endif - -! RUBYINC =-I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM) -I $(RUBY)/include/ruby-$(RUBY_VER_LONG) -I $(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM) - ifeq (no, $(DYNAMIC_RUBY)) - RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME) - endif -*** ../vim-7.2.387/src/version.c 2010-03-10 12:46:38.000000000 +0100 ---- src/version.c 2010-03-10 13:18:38.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 388, - /**/ - --- -Q: Is selling software the same as selling hardware? -A: No, good hardware is sold new, good software has already been used by many. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.389 b/7.2.389 deleted file mode 100644 index a4af355f..00000000 --- a/7.2.389 +++ /dev/null @@ -1,161 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.389 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.389 -Problem: synIDattr() cannot return the font. -Solution: Support the "font" argument. (Christian Brabandt) -Files: runtime/doc/eval.txt, src/eval.c, src/syntax.c - - -*** ../vim-7.2.388/runtime/doc/eval.txt 2010-01-19 15:51:29.000000000 +0100 ---- runtime/doc/eval.txt 2010-03-10 12:52:12.000000000 +0100 -*************** -*** 5370,5375 **** ---- 5388,5395 ---- - the color, cterm: color number as a string, - term: empty string) - "bg" background color (as with "fg") -+ "font" font name (only available in the GUI) -+ |highlight-font| - "sp" special color (as with "fg") |highlight-guisp| - "fg#" like "fg", but for the GUI and the GUI is - running the name in "#RRGGBB" form -*************** -*** 5379,5384 **** ---- 5399,5405 ---- - "italic" "1" if italic - "reverse" "1" if reverse - "inverse" "1" if inverse (= reverse) -+ "standout" "1" if standout - "underline" "1" if underlined - "undercurl" "1" if undercurled - -*** ../vim-7.2.388/src/eval.c 2010-02-24 15:47:58.000000000 +0100 ---- src/eval.c 2010-03-10 12:54:27.000000000 +0100 -*************** -*** 16627,16633 **** - p = highlight_has_attr(id, HL_BOLD, modec); - break; - -! case 'f': /* fg[#] */ - p = highlight_color(id, what, modec); - break; - ---- 16627,16633 ---- - p = highlight_has_attr(id, HL_BOLD, modec); - break; - -! case 'f': /* fg[#] or font */ - p = highlight_color(id, what, modec); - break; - -*** ../vim-7.2.388/src/syntax.c 2010-03-02 17:50:30.000000000 +0100 ---- src/syntax.c 2010-03-10 13:05:39.000000000 +0100 -*************** -*** 8326,8332 **** - char_u * - highlight_color(id, what, modec) - int id; -! char_u *what; /* "fg", "bg", "sp", "fg#", "bg#" or "sp#" */ - int modec; /* 'g' for GUI, 'c' for cterm, 't' for term */ - { - static char_u name[20]; ---- 8326,8332 ---- - char_u * - highlight_color(id, what, modec) - int id; -! char_u *what; /* "font", "fg", "bg", "sp", "fg#", "bg#" or "sp#" */ - int modec; /* 'g' for GUI, 'c' for cterm, 't' for term */ - { - static char_u name[20]; -*************** -*** 8334,8353 **** - int fg = FALSE; - # ifdef FEAT_GUI - int sp = FALSE; - # endif - - if (id <= 0 || id > highlight_ga.ga_len) - return NULL; - -! if (TOLOWER_ASC(what[0]) == 'f') - fg = TRUE; - # ifdef FEAT_GUI -! else if (TOLOWER_ASC(what[0]) == 's') - sp = TRUE; - if (modec == 'g') - { - /* return #RRGGBB form (only possible when GUI is running) */ -! if (gui.in_use && what[1] && what[2] == '#') - { - guicolor_T color; - long_u rgb; ---- 8334,8363 ---- - int fg = FALSE; - # ifdef FEAT_GUI - int sp = FALSE; -+ int font = FALSE; - # endif - - if (id <= 0 || id > highlight_ga.ga_len) - return NULL; - -! if (TOLOWER_ASC(what[0]) == 'f' && TOLOWER_ASC(what[1]) == 'g') - fg = TRUE; - # ifdef FEAT_GUI -! else if (TOLOWER_ASC(what[0]) == 'f' && TOLOWER_ASC(what[1]) == 'o' -! && TOLOWER_ASC(what[2]) == 'n' && TOLOWER_ASC(what[3]) == 't') -! font = TRUE; -! else if (TOLOWER_ASC(what[0]) == 's' && TOLOWER_ASC(what[1]) == 'p') - sp = TRUE; -+ else if (!(TOLOWER_ASC(what[0]) == 'b' && TOLOWER_ASC(what[1]) == 'g')) -+ return NULL; - if (modec == 'g') - { -+ /* return font name */ -+ if (font) -+ return HL_TABLE()[id - 1].sg_font_name; -+ - /* return #RRGGBB form (only possible when GUI is running) */ -! if (gui.in_use && what[2] == '#') - { - guicolor_T color; - long_u rgb; -*************** -*** 8374,8379 **** ---- 8384,8391 ---- - return (HL_TABLE()[id - 1].sg_gui_sp_name); - return (HL_TABLE()[id - 1].sg_gui_bg_name); - } -+ if (font || sp) -+ return NULL; - # endif - if (modec == 'c') - { -*** ../vim-7.2.388/src/version.c 2010-03-10 13:19:28.000000000 +0100 ---- src/version.c 2010-03-10 13:33:25.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 389, - /**/ - --- -WOMAN: Dennis, there's some lovely filth down here. Oh -- how d'you do? -ARTHUR: How do you do, good lady. I am Arthur, King of the Britons. - Who's castle is that? -WOMAN: King of the who? - The Quest for the Holy Grail (Monty Python) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.390 b/7.2.390 deleted file mode 100644 index d10ed2a4..00000000 --- a/7.2.390 +++ /dev/null @@ -1,72 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.390 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.390 -Problem: In some situations the popup menu can be displayed wrong. -Solution: Remove the popup menu if the cursor moved. (Lech Lorens) -Files: src/edit.c - - -*** ../vim-7.2.389/src/edit.c 2010-01-19 14:59:14.000000000 +0100 ---- src/edit.c 2010-03-10 14:09:56.000000000 +0100 -*************** -*** 4684,4689 **** ---- 4684,4690 ---- - int startcol = 0; /* column where searched text starts */ - colnr_T curs_col; /* cursor column */ - int n; -+ int save_w_wrow; - - compl_direction = ins_compl_key2dir(c); - if (!compl_started) -*************** -*** 5067,5072 **** ---- 5068,5074 ---- - /* - * Find next match (and following matches). - */ -+ save_w_wrow = curwin->w_wrow; - n = ins_compl_next(TRUE, ins_compl_key2count(c), ins_compl_use_match(c)); - - /* may undisplay the popup menu */ -*************** -*** 5220,5225 **** ---- 5222,5233 ---- - /* RedrawingDisabled may be set when invoked through complete(). */ - n = RedrawingDisabled; - RedrawingDisabled = 0; -+ -+ /* If the cursor moved we need to remove the pum first. */ -+ setcursor(); -+ if (save_w_wrow != curwin->w_wrow) -+ ins_compl_del_pum(); -+ - ins_compl_show_pum(); - setcursor(); - RedrawingDisabled = n; -*** ../vim-7.2.389/src/version.c 2010-03-10 13:43:22.000000000 +0100 ---- src/version.c 2010-03-10 14:13:55.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 390, - /**/ - --- -`When any government, or any church for that matter, undertakes to say to - its subjects, "This you may not read, this you must not see, this you are - forbidden to know," the end result is tyranny and oppression no matter how - holy the motives' -- Robert A Heinlein, "If this goes on --" - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.391 b/7.2.391 deleted file mode 100644 index 731408de..00000000 --- a/7.2.391 +++ /dev/null @@ -1,121 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.391 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.391 -Problem: Internal alloc(0) error when doing "CTRL-V $ c". (Martti Kuparinen) -Solution: Fix computations in getvcol(). (partly by Lech Lorens) -Files: src/charset.c, src/memline.c - - -*** ../vim-7.2.390/src/charset.c 2009-11-03 16:03:59.000000000 +0100 ---- src/charset.c 2010-03-10 14:38:14.000000000 +0100 -*************** -*** 1255,1261 **** - - vcol = 0; - ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE); -! posptr = ptr + pos->col; - - /* - * This function is used very often, do some speed optimizations. ---- 1255,1264 ---- - - vcol = 0; - ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE); -! if (pos->col == MAXCOL) -! posptr = NULL; /* continue until the NUL */ -! else -! posptr = ptr + pos->col; - - /* - * This function is used very often, do some speed optimizations. -*************** -*** 1313,1319 **** - incr = CHARSIZE(c); - } - -! if (ptr >= posptr) /* character at pos->col */ - break; - - vcol += incr; ---- 1316,1322 ---- - incr = CHARSIZE(c); - } - -! if (posptr != NULL && ptr >= posptr) /* character at pos->col */ - break; - - vcol += incr; -*************** -*** 1334,1340 **** - break; - } - -! if (ptr >= posptr) /* character at pos->col */ - break; - - vcol += incr; ---- 1337,1343 ---- - break; - } - -! if (posptr != NULL && ptr >= posptr) /* character at pos->col */ - break; - - vcol += incr; -*** ../vim-7.2.390/src/memline.c 2010-02-11 18:54:38.000000000 +0100 ---- src/memline.c 2010-03-10 14:38:25.000000000 +0100 -*************** -*** 2113,2124 **** - if (buf->b_ml.ml_mfp == NULL) /* there are no lines */ - return (char_u *)""; - -! /* -! * See if it is the same line as requested last time. -! * Otherwise may need to flush last used line. -! * Don't use the last used line when 'swapfile' is reset, need to load all -! * blocks. -! */ - if (buf->b_ml.ml_line_lnum != lnum || mf_dont_release) - { - ml_flush_line(buf); ---- 2113,2124 ---- - if (buf->b_ml.ml_mfp == NULL) /* there are no lines */ - return (char_u *)""; - -! /* -! * See if it is the same line as requested last time. -! * Otherwise may need to flush last used line. -! * Don't use the last used line when 'swapfile' is reset, need to load all -! * blocks. -! */ - if (buf->b_ml.ml_line_lnum != lnum || mf_dont_release) - { - ml_flush_line(buf); -*** ../vim-7.2.390/src/version.c 2010-03-10 14:15:28.000000000 +0100 ---- src/version.c 2010-03-10 14:31:02.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 391, - /**/ - --- -WOMAN: King of the who? -ARTHUR: The Britons. -WOMAN: Who are the Britons? -ARTHUR: Well, we all are. we're all Britons and I am your king. - The Quest for the Holy Grail (Monty Python) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.392 b/7.2.392 deleted file mode 100644 index c253d91b..00000000 --- a/7.2.392 +++ /dev/null @@ -1,184 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.392 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.392 -Problem: Netbeans hangs reading from a socket at the maximum block size. -Solution: Use select() or poll(). (Xavier de Gaye) -Files: src/vim.h, src/os_unixx.h, src/if_xcmdsrv.c, src/netbeans.c - - -*** ../vim-7.2.391/src/vim.h 2010-03-02 15:55:51.000000000 +0100 ---- src/vim.h 2010-03-10 15:14:03.000000000 +0100 -*************** -*** 477,482 **** ---- 477,499 ---- - # include - #endif - -+ # if defined(HAVE_SYS_SELECT_H) && \ -+ (!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME)) -+ # include -+ # endif -+ -+ # ifndef HAVE_SELECT -+ # ifdef HAVE_SYS_POLL_H -+ # include -+ # define HAVE_POLL -+ # else -+ # ifdef HAVE_POLL_H -+ # include -+ # define HAVE_POLL -+ # endif -+ # endif -+ # endif -+ - /* ================ end of the header file puzzle =============== */ - - /* -*** ../vim-7.2.391/src/os_unixx.h 2006-03-25 22:48:00.000000000 +0100 ---- src/os_unixx.h 2010-03-10 15:14:49.000000000 +0100 -*************** -*** 28,38 **** - # include - # endif - -- # if defined(HAVE_SYS_SELECT_H) && \ -- (!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME)) -- # include -- # endif -- - # ifndef WEXITSTATUS - # ifdef HAVE_UNION_WAIT - # define WEXITSTATUS(stat_val) ((stat_val).w_T.w_Retcode) ---- 28,33 ---- -*************** -*** 65,80 **** - # include - #endif - -- #ifndef HAVE_SELECT -- # ifdef HAVE_SYS_POLL_H -- # include -- # else -- # ifdef HAVE_POLL_H -- # include -- # endif -- # endif -- #endif -- - #ifdef HAVE_SYS_STREAM_H - # include - #endif ---- 60,65 ---- -*** ../vim-7.2.391/src/if_xcmdsrv.c 2009-05-16 17:29:37.000000000 +0200 ---- src/if_xcmdsrv.c 2010-03-10 15:14:09.000000000 +0100 -*************** -*** 21,41 **** - # include - # endif - -- # if defined(HAVE_SYS_SELECT_H) && \ -- (!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME)) -- # include -- # endif -- -- # ifndef HAVE_SELECT -- # ifdef HAVE_SYS_POLL_H -- # include -- # else -- # ifdef HAVE_POLL_H -- # include -- # endif -- # endif -- # endif -- - /* - * This file provides procedures that implement the command server - * functionality of Vim when in contact with an X11 server. ---- 21,26 ---- -*** ../vim-7.2.391/src/netbeans.c 2010-01-19 15:12:33.000000000 +0100 ---- src/netbeans.c 2010-03-10 15:21:37.000000000 +0100 -*************** -*** 736,741 **** ---- 736,749 ---- - #ifndef FEAT_GUI_GTK - static int level = 0; - #endif -+ #ifdef HAVE_SELECT -+ struct timeval tval; -+ fd_set rfds; -+ #else -+ # ifdef HAVE_POLL -+ struct pollfd fds; -+ # endif -+ #endif - - if (sd < 0) - { -*************** -*** 755,763 **** - return; /* out of memory! */ - } - -! /* Keep on reading for as long as there is something to read. */ - for (;;) - { - len = sock_read(sd, buf, MAXMSGSIZE); - if (len <= 0) - break; /* error or nothing more to read */ ---- 763,788 ---- - return; /* out of memory! */ - } - -! /* Keep on reading for as long as there is something to read. -! * Use select() or poll() to avoid blocking on a message that is exactly -! * MAXMSGSIZE long. */ - for (;;) - { -+ #ifdef HAVE_SELECT -+ FD_ZERO(&rfds); -+ FD_SET(sd, &rfds); -+ tval.tv_sec = 0; -+ tval.tv_usec = 0; -+ if (select(sd + 1, &rfds, NULL, NULL, &tval) <= 0) -+ break; -+ #else -+ # ifdef HAVE_POLL -+ fds.fd = sd; -+ fds.events = POLLIN; -+ if (poll(&fds, 1, 0) <= 0) -+ break; -+ # endif -+ #endif - len = sock_read(sd, buf, MAXMSGSIZE); - if (len <= 0) - break; /* error or nothing more to read */ -*** ../vim-7.2.391/src/version.c 2010-03-10 14:46:21.000000000 +0100 ---- src/version.c 2010-03-10 16:10:48.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 392, - /**/ - --- -WOMAN: I didn't know we had a king. I thought we were an autonomous - collective. -DENNIS: You're fooling yourself. We're living in a dictatorship. A - self-perpetuating autocracy in which the working classes-- -WOMAN: Oh there you go, bringing class into it again. -DENNIS: That's what it's all about if only people would-- - The Quest for the Holy Grail (Monty Python) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.393 b/7.2.393 deleted file mode 100644 index 796f6548..00000000 --- a/7.2.393 +++ /dev/null @@ -1,281 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.393 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.393 -Problem: Mac: Can't build with different Xcode developer tools directory. -Solution: make "Developer" directory name configurable. (Rainer Muller) -Files: src/configure.in, src/auto/configure - - -*** ../vim-7.2.392/src/configure.in 2010-02-24 14:46:58.000000000 +0100 ---- src/configure.in 2010-03-10 16:16:48.000000000 +0100 -*************** -*** 116,121 **** ---- 116,137 ---- - MACARCH="$withval"; AC_MSG_RESULT($MACARCH), - MACARCH="current"; AC_MSG_RESULT(defaulting to $MACARCH)) - -+ AC_MSG_CHECKING(--with-developer-dir argument) -+ AC_ARG_WITH(developer-dir, [ --with-developer-dir=PATH use PATH as location for Xcode developer tools], -+ DEVELOPER_DIR="$withval"; AC_MSG_RESULT($DEVELOPER_DIR), -+ DEVELOPER_DIR=""; AC_MSG_RESULT(not present)) -+ -+ if test "x$DEVELOPER_DIR" = "x"; then -+ AC_PATH_PROG(XCODE_SELECT, xcode-select) -+ if test "x$XCODE_SELECT" != "x"; then -+ AC_MSG_CHECKING(for developer dir using xcode-select) -+ DEVELOPER_DIR=`$XCODE_SELECT -print-path` -+ AC_MSG_RESULT([$DEVELOPER_DIR]) -+ else -+ DEVELOPER_DIR=/Developer -+ fi -+ fi -+ - if test "x$MACARCH" = "xboth"; then - AC_MSG_CHECKING(for 10.4 universal SDK) - dnl There is a terrible inconsistency (but we appear to get away with it): -*************** -*** 127,133 **** - save_cppflags="$CPPFLAGS" - save_cflags="$CFLAGS" - save_ldflags="$LDFLAGS" -! CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" - AC_TRY_LINK([ ], [ ], - AC_MSG_RESULT(found, will make universal binary), - ---- 143,149 ---- - save_cppflags="$CPPFLAGS" - save_cflags="$CFLAGS" - save_ldflags="$LDFLAGS" -! CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" - AC_TRY_LINK([ ], [ ], - AC_MSG_RESULT(found, will make universal binary), - -*************** -*** 157,165 **** - dnl TODO: use -arch i386 on Intel machines - CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" - if test "x$MACARCH" = "xboth"; then -! CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon" - else -! CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon" - fi - - dnl If Carbon is found, assume we don't want X11 ---- 173,181 ---- - dnl TODO: use -arch i386 on Intel machines - CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" - if test "x$MACARCH" = "xboth"; then -! CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon" - else -! CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon" - fi - - dnl If Carbon is found, assume we don't want X11 -*************** -*** 3233,3239 **** - fi - fi - if test "x$MACARCH" = "xboth"; then -! LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" - fi - - dnl gcc 3.1 changed the meaning of -MM. The only solution appears to be to ---- 3249,3255 ---- - fi - fi - if test "x$MACARCH" = "xboth"; then -! LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" - fi - - dnl gcc 3.1 changed the meaning of -MM. The only solution appears to be to -*** ../vim-7.2.392/src/auto/configure 2010-02-24 14:46:58.000000000 +0100 ---- src/auto/configure 2010-03-10 16:19:47.000000000 +0100 -*************** -*** 718,723 **** ---- 718,724 ---- - VIMNAME - OS_EXTRA_OBJ - OS_EXTRA_SRC -+ XCODE_SELECT - CPP_MM - STRIP - AWK -*************** -*** 774,779 **** ---- 775,781 ---- - enable_option_checking - enable_darwin - with_mac_arch -+ with_developer_dir - with_local_dir - with_vim_name - with_ex_name -*************** -*** 1492,1497 **** ---- 1494,1500 ---- - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-mac-arch=ARCH current, intel, ppc or both -+ --with-developer-dir=PATH use PATH as location for Xcode developer tools - --with-local-dir=PATH search PATH instead of /usr/local for local libraries. - --without-local-dir do not search /usr/local for local libraries. - --with-vim-name=NAME what to call the Vim executable -*************** -*** 3833,3845 **** - fi - - - if test "x$MACARCH" = "xboth"; then - { $as_echo "$as_me:$LINENO: checking for 10.4 universal SDK" >&5 - $as_echo_n "checking for 10.4 universal SDK... " >&6; } - save_cppflags="$CPPFLAGS" - save_cflags="$CFLAGS" - save_ldflags="$LDFLAGS" -! CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF ---- 3836,3913 ---- - fi - - -+ { $as_echo "$as_me:$LINENO: checking --with-developer-dir argument" >&5 -+ $as_echo_n "checking --with-developer-dir argument... " >&6; } -+ -+ # Check whether --with-developer-dir was given. -+ if test "${with_developer_dir+set}" = set; then -+ withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { $as_echo "$as_me:$LINENO: result: $DEVELOPER_DIR" >&5 -+ $as_echo "$DEVELOPER_DIR" >&6; } -+ else -+ DEVELOPER_DIR=""; { $as_echo "$as_me:$LINENO: result: not present" >&5 -+ $as_echo "not present" >&6; } -+ fi -+ -+ -+ if test "x$DEVELOPER_DIR" = "x"; then -+ # Extract the first word of "xcode-select", so it can be a program name with args. -+ set dummy xcode-select; ac_word=$2 -+ { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -+ $as_echo_n "checking for $ac_word... " >&6; } -+ if test "${ac_cv_path_XCODE_SELECT+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+ else -+ case $XCODE_SELECT in -+ [\\/]* | ?:[\\/]*) -+ ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path. -+ ;; -+ *) -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+ for as_dir in $PATH -+ do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_path_XCODE_SELECT="$as_dir/$ac_word$ac_exec_ext" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+ done -+ done -+ IFS=$as_save_IFS -+ -+ ;; -+ esac -+ fi -+ XCODE_SELECT=$ac_cv_path_XCODE_SELECT -+ if test -n "$XCODE_SELECT"; then -+ { $as_echo "$as_me:$LINENO: result: $XCODE_SELECT" >&5 -+ $as_echo "$XCODE_SELECT" >&6; } -+ else -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+ $as_echo "no" >&6; } -+ fi -+ -+ -+ if test "x$XCODE_SELECT" != "x"; then -+ { $as_echo "$as_me:$LINENO: checking for developer dir using xcode-select" >&5 -+ $as_echo_n "checking for developer dir using xcode-select... " >&6; } -+ DEVELOPER_DIR=`$XCODE_SELECT -print-path` -+ { $as_echo "$as_me:$LINENO: result: $DEVELOPER_DIR" >&5 -+ $as_echo "$DEVELOPER_DIR" >&6; } -+ else -+ DEVELOPER_DIR=/Developer -+ fi -+ fi -+ - if test "x$MACARCH" = "xboth"; then - { $as_echo "$as_me:$LINENO: checking for 10.4 universal SDK" >&5 - $as_echo_n "checking for 10.4 universal SDK... " >&6; } - save_cppflags="$CPPFLAGS" - save_cflags="$CFLAGS" - save_ldflags="$LDFLAGS" -! CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -*************** -*** 3960,3968 **** - OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" - CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" - if test "x$MACARCH" = "xboth"; then -! CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon" - else -! CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon" - fi - - # On IRIX 5.3, sys/types and inttypes.h are conflicting. ---- 4028,4036 ---- - OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" - CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" - if test "x$MACARCH" = "xboth"; then -! CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon" - else -! CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon" - fi - - # On IRIX 5.3, sys/types and inttypes.h are conflicting. -*************** -*** 17319,17325 **** - fi - fi - if test "x$MACARCH" = "xboth"; then -! LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" - fi - - DEPEND_CFLAGS_FILTER= ---- 17387,17393 ---- - fi - fi - if test "x$MACARCH" = "xboth"; then -! LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" - fi - - DEPEND_CFLAGS_FILTER= -*** ../vim-7.2.392/src/version.c 2010-03-10 16:11:57.000000000 +0100 ---- src/version.c 2010-03-10 16:26:00.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 393, - /**/ - --- -There are 2 kinds of people in my world: those who know Unix, Perl, Vim, GNU, -Linux, etc, and those who know COBOL. It gets very difficult for me at -parties, not knowing which group to socialise with :-) - Sitaram Chamarty - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.394 b/7.2.394 deleted file mode 100644 index 50235e04..00000000 --- a/7.2.394 +++ /dev/null @@ -1,99 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.394 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.394 -Problem: .lzma and .xz files are not supported. -Solution: Recognize .lzma and .xz files so that they can be edited. -Files: runtime/plugin/gzip.vim - - -*** ../vim-7.2.393/runtime/plugin/gzip.vim 2005-07-27 23:12:49.000000000 +0200 ---- runtime/plugin/gzip.vim 2010-03-10 17:07:22.000000000 +0100 -*************** -*** 1,6 **** - " Vim plugin for editing compressed files. - " Maintainer: Bram Moolenaar -! " Last Change: 2005 Jul 26 - - " Exit quickly when: - " - this plugin was already loaded ---- 1,6 ---- - " Vim plugin for editing compressed files. - " Maintainer: Bram Moolenaar -! " Last Change: 2010 Mar 10 - - " Exit quickly when: - " - this plugin was already loaded -*************** -*** 20,36 **** - " - " Set binary mode before reading the file. - " Use "gzip -d", gunzip isn't always available. -! autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z setlocal bin - autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn") - autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d") - autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress") - autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip") - autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2") - autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f") - autocmd FileAppendPre *.gz call gzip#appre("gzip -dn") - autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d") - autocmd FileAppendPre *.Z call gzip#appre("uncompress") - autocmd FileAppendPost *.gz call gzip#write("gzip") - autocmd FileAppendPost *.bz2 call gzip#write("bzip2") - autocmd FileAppendPost *.Z call gzip#write("compress -f") - augroup END ---- 20,44 ---- - " - " Set binary mode before reading the file. - " Use "gzip -d", gunzip isn't always available. -! autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz setlocal bin - autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn") - autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d") - autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress") -+ autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d") -+ autocmd BufReadPost,FileReadPost *.xz call gzip#read("xz -d") - autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip") - autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2") - autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f") -+ autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma -z") -+ autocmd BufWritePost,FileWritePost *.xz call gzip#write("xz -z") - autocmd FileAppendPre *.gz call gzip#appre("gzip -dn") - autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d") - autocmd FileAppendPre *.Z call gzip#appre("uncompress") -+ autocmd FileAppendPre *.lzma call gzip#appre("lzma -d") -+ autocmd FileAppendPre *.xz call gzip#appre("xz -d") - autocmd FileAppendPost *.gz call gzip#write("gzip") - autocmd FileAppendPost *.bz2 call gzip#write("bzip2") - autocmd FileAppendPost *.Z call gzip#write("compress -f") -+ autocmd FileAppendPost *.lzma call gzip#write("lzma -z") -+ autocmd FileAppendPost *.xz call gzip#write("xz -z") - augroup END -*** ../vim-7.2.393/src/version.c 2010-03-10 16:27:27.000000000 +0100 ---- src/version.c 2010-03-10 17:12:43.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 394, - /**/ - --- -ARTHUR: Be quiet! -DENNIS: --but by a two-thirds majority in the case of more-- -ARTHUR: Be quiet! I order you to be quiet! -WOMAN: Order, eh -- who does he think he is? -ARTHUR: I am your king! - The Quest for the Holy Grail (Monty Python) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.395 b/7.2.395 deleted file mode 100644 index 1b5b1bae..00000000 --- a/7.2.395 +++ /dev/null @@ -1,60 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.395 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.395 -Problem: In help CTRL=] on g?g? escapes the ?, causing it to fail. (Tony - Mechelynck) -Solution: Don't escape ? for a help command. (Sergey Khorev) -Files: src/normal.c - - -*** ../vim-7.2.394/src/normal.c 2010-01-19 15:23:38.000000000 +0100 ---- src/normal.c 2010-03-13 13:04:46.000000000 +0100 -*************** -*** 5526,5536 **** - break; - - default: - if (curbuf->b_help) - STRCPY(buf, "he! "); - else - { -- tag_cmd = TRUE; - if (g_cmd) - STRCPY(buf, "tj "); - else ---- 5526,5536 ---- - break; - - default: -+ tag_cmd = TRUE; - if (curbuf->b_help) - STRCPY(buf, "he! "); - else - { - if (g_cmd) - STRCPY(buf, "tj "); - else -*** ../vim-7.2.394/src/version.c 2010-03-10 17:14:07.000000000 +0100 ---- src/version.c 2010-03-17 13:05:11.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 395, - /**/ - --- -There are three kinds of people: Those who can count & those who can't. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.396 b/7.2.396 deleted file mode 100644 index f1269231..00000000 --- a/7.2.396 +++ /dev/null @@ -1,51 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.396 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.396 -Problem: Get E38 errors. (Dasn) -Solution: Set cursor to line 1 instead of 0. (Dominique Pelle) -Files: src/popupmnu.c - - -*** ../vim-7.2.395/src/popupmnu.c 2010-01-19 18:05:05.000000000 +0100 ---- src/popupmnu.c 2010-03-17 12:59:01.000000000 +0100 -*************** -*** 640,646 **** - - curbuf->b_changed = 0; - curbuf->b_p_ma = FALSE; -! curwin->w_cursor.lnum = 0; - curwin->w_cursor.col = 0; - - if (curwin != curwin_save && win_valid(curwin_save)) ---- 640,646 ---- - - curbuf->b_changed = 0; - curbuf->b_p_ma = FALSE; -! curwin->w_cursor.lnum = 1; - curwin->w_cursor.col = 0; - - if (curwin != curwin_save && win_valid(curwin_save)) -*** ../vim-7.2.395/src/version.c 2010-03-17 13:07:01.000000000 +0100 ---- src/version.c 2010-03-17 14:47:30.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 396, - /**/ - --- -There are 10 kinds of people: Those who understand binary and those who don't. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.397 b/7.2.397 deleted file mode 100644 index 218a069a..00000000 --- a/7.2.397 +++ /dev/null @@ -1,67 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.397 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.397 -Problem: Redundant check for w_lines_valid. -Solution: Remove the if. (Lech Lorens) -Files: src/fold.c - - -*** ../vim-7.2.396/src/fold.c 2010-02-24 14:34:10.000000000 +0100 ---- src/fold.c 2010-03-17 13:03:00.000000000 +0100 -*************** -*** 1053,1067 **** - { - int i; - -! if (win->w_lines_valid > 0) -! for (i = 0; i < win->w_lines_valid; ++i) -! if (win->w_lines[i].wl_valid) -! { -! if (lnum < win->w_lines[i].wl_lnum) -! return -1; -! if (lnum <= win->w_lines[i].wl_lastlnum) -! return i; -! } - return -1; - } - ---- 1053,1066 ---- - { - int i; - -! for (i = 0; i < win->w_lines_valid; ++i) -! if (win->w_lines[i].wl_valid) -! { -! if (lnum < win->w_lines[i].wl_lnum) -! return -1; -! if (lnum <= win->w_lines[i].wl_lastlnum) -! return i; -! } - return -1; - } - -*** ../vim-7.2.396/src/version.c 2010-03-17 14:47:56.000000000 +0100 ---- src/version.c 2010-03-17 16:43:34.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 397, - /**/ - --- -Did you ever stop to think... and forget to start again? - -- Steven Wright - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.398 b/7.2.398 deleted file mode 100644 index a0ccc96c..00000000 --- a/7.2.398 +++ /dev/null @@ -1,152 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.398 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.398 -Problem: When moving windows the cursor ends up in the wrong line. -Solution: Set the window width and height properly. (Lech Lorens) -Files: src/window.c - - -*** ../vim-7.2.397/src/window.c 2010-01-27 20:26:41.000000000 +0100 ---- src/window.c 2010-03-17 16:40:06.000000000 +0100 -*************** -*** 991,1018 **** - wp->w_p_scr = curwin->w_p_scr; - if (need_status) - { -! --oldwin->w_height; - oldwin->w_status_height = need_status; - } - if (flags & (WSP_TOP | WSP_BOT)) - { - /* set height and row of new window to full height */ - wp->w_winrow = tabline_height(); -! wp->w_height = curfrp->fr_height - (p_ls > 0); - wp->w_status_height = (p_ls > 0); - } - else - { - /* height and row of new window is same as current window */ - wp->w_winrow = oldwin->w_winrow; -! wp->w_height = oldwin->w_height; - wp->w_status_height = oldwin->w_status_height; - } - frp->fr_height = curfrp->fr_height; - - /* "new_size" of the current window goes to the new window, use - * one column for the vertical separator */ -! wp->w_width = new_size; - if (before) - wp->w_vsep_width = 1; - else ---- 991,1018 ---- - wp->w_p_scr = curwin->w_p_scr; - if (need_status) - { -! win_new_height(oldwin, oldwin->w_height - 1); - oldwin->w_status_height = need_status; - } - if (flags & (WSP_TOP | WSP_BOT)) - { - /* set height and row of new window to full height */ - wp->w_winrow = tabline_height(); -! win_new_height(wp, curfrp->fr_height - (p_ls > 0)); - wp->w_status_height = (p_ls > 0); - } - else - { - /* height and row of new window is same as current window */ - wp->w_winrow = oldwin->w_winrow; -! win_new_height(wp, oldwin->w_height); - wp->w_status_height = oldwin->w_status_height; - } - frp->fr_height = curfrp->fr_height; - - /* "new_size" of the current window goes to the new window, use - * one column for the vertical separator */ -! win_new_width(wp, new_size); - if (before) - wp->w_vsep_width = 1; - else -*************** -*** 1049,1061 **** - if (flags & (WSP_TOP | WSP_BOT)) - { - wp->w_wincol = 0; -! wp->w_width = Columns; - wp->w_vsep_width = 0; - } - else - { - wp->w_wincol = oldwin->w_wincol; -! wp->w_width = oldwin->w_width; - wp->w_vsep_width = oldwin->w_vsep_width; - } - frp->fr_width = curfrp->fr_width; ---- 1049,1061 ---- - if (flags & (WSP_TOP | WSP_BOT)) - { - wp->w_wincol = 0; -! win_new_width(wp, Columns); - wp->w_vsep_width = 0; - } - else - { - wp->w_wincol = oldwin->w_wincol; -! win_new_width(wp, oldwin->w_width); - wp->w_vsep_width = oldwin->w_vsep_width; - } - frp->fr_width = curfrp->fr_width; -*************** -*** 1111,1117 **** - } - - /* -! * make the new window the current window and redraw - */ - if (do_equal || dir != 0) - win_equal(wp, TRUE, ---- 1111,1117 ---- - } - - /* -! * equalize the window sizes. - */ - if (do_equal || dir != 0) - win_equal(wp, TRUE, -*************** -*** 1143,1148 **** ---- 1143,1152 ---- - if (size != 0) - p_wh = size; - } -+ -+ /* -+ * make the new window the current window -+ */ - win_enter(wp, FALSE); - #ifdef FEAT_VERTSPLIT - if (flags & WSP_VERT) -*** ../vim-7.2.397/src/version.c 2010-03-17 16:45:04.000000000 +0100 ---- src/version.c 2010-03-17 16:53:51.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 398, - /**/ - --- -It's not hard to meet expenses, they're everywhere. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.399 b/7.2.399 deleted file mode 100644 index 16ffa0f4..00000000 --- a/7.2.399 +++ /dev/null @@ -1,63 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.399 (extra) -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.399 (extra, after 7.2.388) -Problem: Cannot compile on MingW. -Solution: Move ifneq to separate line. (Vlad Sandrini, Dominique Pelle) -Files: src/Make_ming.mak - - -*** ../vim-7.2.398/src/Make_ming.mak 2010-03-10 13:19:28.000000000 +0100 ---- src/Make_ming.mak 2010-03-17 17:23:31.000000000 +0100 -*************** -*** 215,226 **** - ifndef RUBY_PLATFORM - ifeq ($(RUBY_VER), 16) - RUBY_PLATFORM = i586-mswin32 -! else ifneq ("X$(wildcard, $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32)", X) - RUBY_PLATFORM = i386-mingw32 - else - RUBY_PLATFORM = i386-mswin32 - endif - endif - - ifndef RUBY_INSTALL_NAME - ifeq ($(RUBY_VER), 16) ---- 215,228 ---- - ifndef RUBY_PLATFORM - ifeq ($(RUBY_VER), 16) - RUBY_PLATFORM = i586-mswin32 -! else -! ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),) - RUBY_PLATFORM = i386-mingw32 - else - RUBY_PLATFORM = i386-mswin32 - endif - endif -+ endif - - ifndef RUBY_INSTALL_NAME - ifeq ($(RUBY_VER), 16) -*** ../vim-7.2.398/src/version.c 2010-03-17 16:54:51.000000000 +0100 ---- src/version.c 2010-03-17 17:23:40.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 399, - /**/ - --- -Life is a gift, living is an art. (Bram Moolenaar) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.400 b/7.2.400 deleted file mode 100644 index 0c3c5487..00000000 --- a/7.2.400 +++ /dev/null @@ -1,454 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.400 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.400 (after 7.2.387) -Problem: Dynamic Ruby is not initialised properly for version 1.9.1. - Ruby cannot create strings from NULL. -Solution: Cleanup #ifdefs. Handle NULL like an empty string. Add - ruby_init_stack. (Sergey Khorev) -Files: src/if_ruby.c - - -*** ../vim-7.2.399/src/if_ruby.c 2010-03-10 12:46:38.000000000 +0100 ---- src/if_ruby.c 2010-03-17 17:37:53.000000000 +0100 -*************** -*** 53,58 **** ---- 53,63 ---- - # undef _WIN32_WINNT - #endif - -+ #if (defined(RUBY_VERSION) && RUBY_VERSION >= 19) \ -+ || (defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19) -+ # define RUBY19_OR_LATER 1 -+ #endif -+ - #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 - /* Ruby 1.9 defines a number of static functions which use rb_num2long and - * rb_int2big */ -*************** -*** 61,67 **** - #endif - - #include -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - # include - #endif - ---- 66,72 ---- - #endif - - #include -! #ifdef RUBY19_OR_LATER - # include - #endif - -*************** -*** 172,179 **** - # define rb_ary_new dll_rb_ary_new - # define rb_ary_push dll_rb_ary_push - #endif -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ -! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 - # define rb_errinfo dll_rb_errinfo - #else - # define ruby_errinfo (*dll_ruby_errinfo) ---- 177,183 ---- - # define rb_ary_new dll_rb_ary_new - # define rb_ary_push dll_rb_ary_push - #endif -! #ifdef RUBY19_OR_LATER - # define rb_errinfo dll_rb_errinfo - #else - # define ruby_errinfo (*dll_ruby_errinfo) -*************** -*** 185,196 **** - # define rb_w32_snprintf dll_rb_w32_snprintf - #endif - -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - # define ruby_script dll_ruby_script - # define rb_enc_find_index dll_rb_enc_find_index - # define rb_enc_find dll_rb_enc_find - # define rb_enc_str_new dll_rb_enc_str_new - # define rb_sprintf dll_rb_sprintf - #endif - - /* ---- 189,201 ---- - # define rb_w32_snprintf dll_rb_w32_snprintf - #endif - -! #ifdef RUBY19_OR_LATER - # define ruby_script dll_ruby_script - # define rb_enc_find_index dll_rb_enc_find_index - # define rb_enc_find dll_rb_enc_find - # define rb_enc_str_new dll_rb_enc_str_new - # define rb_sprintf dll_rb_sprintf -+ # define ruby_init_stack dll_ruby_init_stack - #endif - - /* -*************** -*** 240,247 **** - static VALUE (*dll_rb_str_concat) (VALUE, VALUE); - static VALUE (*dll_rb_str_new) (const char*, long); - static VALUE (*dll_rb_str_new2) (const char*); -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ -! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 - static VALUE (*dll_rb_errinfo) (void); - #else - static VALUE *dll_ruby_errinfo; ---- 245,251 ---- - static VALUE (*dll_rb_str_concat) (VALUE, VALUE); - static VALUE (*dll_rb_str_new) (const char*, long); - static VALUE (*dll_rb_str_new2) (const char*); -! #ifdef RUBY19_OR_LATER - static VALUE (*dll_rb_errinfo) (void); - #else - static VALUE *dll_ruby_errinfo; -*************** -*** 255,276 **** - static VALUE (*dll_rb_ary_new) (void); - static VALUE (*dll_rb_ary_push) (VALUE, VALUE); - #endif -! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 - static VALUE (*dll_rb_int2big)(SIGNED_VALUE); - #endif - #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 - static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...); - #endif - -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - static void (*dll_ruby_script) (const char*); - static int (*dll_rb_enc_find_index) (const char*); - static rb_encoding* (*dll_rb_enc_find) (const char*); - static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*); - static VALUE (*dll_rb_sprintf) (const char*, ...); - #endif - -! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 - static SIGNED_VALUE rb_num2long_stub(VALUE x) - { - return dll_rb_num2long(x); ---- 259,281 ---- - static VALUE (*dll_rb_ary_new) (void); - static VALUE (*dll_rb_ary_push) (VALUE, VALUE); - #endif -! #ifdef RUBY19_OR_LATER - static VALUE (*dll_rb_int2big)(SIGNED_VALUE); - #endif - #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 - static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...); - #endif - -! #ifdef RUBY19_OR_LATER - static void (*dll_ruby_script) (const char*); - static int (*dll_rb_enc_find_index) (const char*); - static rb_encoding* (*dll_rb_enc_find) (const char*); - static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*); - static VALUE (*dll_rb_sprintf) (const char*, ...); -+ static void (*ruby_init_stack)(VALUE*); - #endif - -! #ifdef RUBY19_OR_LATER - static SIGNED_VALUE rb_num2long_stub(VALUE x) - { - return dll_rb_num2long(x); -*************** -*** 336,343 **** - {"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat}, - {"rb_str_new", (RUBY_PROC*)&dll_rb_str_new}, - {"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2}, -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ -! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 - {"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo}, - #else - {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo}, ---- 341,347 ---- - {"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat}, - {"rb_str_new", (RUBY_PROC*)&dll_rb_str_new}, - {"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2}, -! #ifdef RUBY19_OR_LATER - {"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo}, - #else - {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo}, -*************** -*** 360,374 **** - {"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new}, - {"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push}, - #endif -! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 - {"rb_int2big", (RUBY_PROC*)&dll_rb_int2big}, -- #endif -- #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - {"ruby_script", (RUBY_PROC*)&dll_ruby_script}, - {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, - {"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find}, - {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new}, - {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf}, - #endif - {"", NULL}, - }; ---- 364,377 ---- - {"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new}, - {"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push}, - #endif -! #ifdef RUBY19_OR_LATER - {"rb_int2big", (RUBY_PROC*)&dll_rb_int2big}, - {"ruby_script", (RUBY_PROC*)&dll_ruby_script}, - {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index}, - {"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find}, - {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new}, - {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf}, -+ {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack}, - #endif - {"", NULL}, - }; -*************** -*** 467,473 **** - static VALUE - vim_str2rb_enc_str(const char *s) - { -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - int isnum; - long lval; - char_u *sval; ---- 470,476 ---- - static VALUE - vim_str2rb_enc_str(const char *s) - { -! #ifdef RUBY19_OR_LATER - int isnum; - long lval; - char_u *sval; -*************** -*** 489,495 **** - static VALUE - eval_enc_string_protect(const char *str, int *state) - { -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - int isnum; - long lval; - char_u *sval; ---- 492,498 ---- - static VALUE - eval_enc_string_protect(const char *str, int *state) - { -! #ifdef RUBY19_OR_LATER - int isnum; - long lval; - char_u *sval; -*************** -*** 591,606 **** - char *argv[] = {"gvim.exe"}; - NtInitialize(&argc, &argv); - #endif -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - RUBY_INIT_STACK; - #endif - ruby_init(); -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - ruby_script("vim-ruby"); - #endif - ruby_init_loadpath(); - ruby_io_init(); -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 - rb_enc_find_index("encdb"); - #endif - ruby_vim_init(); ---- 594,609 ---- - char *argv[] = {"gvim.exe"}; - NtInitialize(&argc, &argv); - #endif -! #ifdef RUBY19_OR_LATER - RUBY_INIT_STACK; - #endif - ruby_init(); -! #ifdef RUBY19_OR_LATER - ruby_script("vim-ruby"); - #endif - ruby_init_loadpath(); - ruby_io_init(); -! #ifdef RUBY19_OR_LATER - rb_enc_find_index("encdb"); - #endif - ruby_vim_init(); -*************** -*** 657,664 **** - break; - case TAG_RAISE: - case TAG_FATAL: -! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \ -! || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 - eclass = CLASS_OF(rb_errinfo()); - einfo = rb_obj_as_string(rb_errinfo()); - #else ---- 660,666 ---- - break; - case TAG_RAISE: - case TAG_FATAL: -! #ifdef RUBY19_OR_LATER - eclass = CLASS_OF(rb_errinfo()); - einfo = rb_obj_as_string(rb_errinfo()); - #else -*************** -*** 720,775 **** - - if (tv->v_type == VAR_STRING) - { -! result = rb_str_new2((char *)tv->vval.v_string); - } - else if (tv->v_type == VAR_NUMBER) - { -! result = INT2NUM(tv->vval.v_number); - } - # ifdef FEAT_FLOAT - else if (tv->v_type == VAR_FLOAT) - { -! result = rb_float_new(tv->vval.v_float); - } - # endif - else if (tv->v_type == VAR_LIST) - { -! list_T *list = tv->vval.v_list; -! listitem_T *curr; - -! result = rb_ary_new(); - -! if (list != NULL) -! { -! for (curr = list->lv_first; curr != NULL; curr = curr->li_next) -! { -! rb_ary_push(result, vim_to_ruby(&curr->li_tv)); -! } -! } - } - else if (tv->v_type == VAR_DICT) - { -! result = rb_hash_new(); - -! if (tv->vval.v_dict != NULL) -! { -! hashtab_T *ht = &tv->vval.v_dict->dv_hashtab; -! long_u todo = ht->ht_used; -! hashitem_T *hi; -! dictitem_T *di; -! -! for (hi = ht->ht_array; todo > 0; ++hi) -! { -! if (!HASHITEM_EMPTY(hi)) -! { -! --todo; - -! di = dict_lookup(hi); -! rb_hash_aset(result, rb_str_new2((char *)hi->hi_key), - vim_to_ruby(&di->di_tv)); -! } -! } -! } - } /* else return Qnil; */ - - return result; ---- 722,778 ---- - - if (tv->v_type == VAR_STRING) - { -! result = rb_str_new2((char *)(tv->vval.v_string == NULL -! ? "" : tv->vval.v_string)); - } - else if (tv->v_type == VAR_NUMBER) - { -! result = INT2NUM(tv->vval.v_number); - } - # ifdef FEAT_FLOAT - else if (tv->v_type == VAR_FLOAT) - { -! result = rb_float_new(tv->vval.v_float); - } - # endif - else if (tv->v_type == VAR_LIST) - { -! list_T *list = tv->vval.v_list; -! listitem_T *curr; - -! result = rb_ary_new(); - -! if (list != NULL) -! { -! for (curr = list->lv_first; curr != NULL; curr = curr->li_next) -! { -! rb_ary_push(result, vim_to_ruby(&curr->li_tv)); -! } -! } - } - else if (tv->v_type == VAR_DICT) - { -! result = rb_hash_new(); - -! if (tv->vval.v_dict != NULL) -! { -! hashtab_T *ht = &tv->vval.v_dict->dv_hashtab; -! long_u todo = ht->ht_used; -! hashitem_T *hi; -! dictitem_T *di; -! -! for (hi = ht->ht_array; todo > 0; ++hi) -! { -! if (!HASHITEM_EMPTY(hi)) -! { -! --todo; - -! di = dict_lookup(hi); -! rb_hash_aset(result, rb_str_new2((char *)hi->hi_key), - vim_to_ruby(&di->di_tv)); -! } -! } -! } - } /* else return Qnil; */ - - return result; -*************** -*** 785,791 **** - tv = eval_expr((char_u *)StringValuePtr(str), NULL); - if (tv == NULL) - { -! return Qnil; - } - result = vim_to_ruby(tv); - ---- 788,794 ---- - tv = eval_expr((char_u *)StringValuePtr(str), NULL); - if (tv == NULL) - { -! return Qnil; - } - result = vim_to_ruby(tv); - -*** ../vim-7.2.399/src/version.c 2010-03-17 17:24:58.000000000 +0100 ---- src/version.c 2010-03-17 18:14:31.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 400, - /**/ - --- -Q: What do you call a fish without an eye? -A: fsh! -Q: What do you call a deer with no eyes? -A: no eye deer. -Q: What do you call a deer with no eyes and no legs? -A: still no eye deer. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.401 b/7.2.401 deleted file mode 100644 index 032076ab..00000000 --- a/7.2.401 +++ /dev/null @@ -1,61 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.401 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.401 -Problem: ":e dir" with 'wildmode' set to "list" doesn't highlight - directory names with a space. (Alexandre Provencio) -Solution: Remove the backslash before checking if the name is a directory. - (Dominique Pelle) -Files: src/ex_getln.c - - -*** ../vim-7.2.400/src/ex_getln.c 2010-03-02 17:23:10.000000000 +0100 ---- src/ex_getln.c 2010-03-17 19:00:54.000000000 +0100 -*************** -*** 3948,3955 **** - || xp->xp_context == EXPAND_SHELLCMD - || xp->xp_context == EXPAND_BUFFERS) - { -! /* highlight directories */ -! j = (mch_isdir(files_found[k])); - if (showtail) - p = L_SHOWFILE(k); - else ---- 3948,3959 ---- - || xp->xp_context == EXPAND_SHELLCMD - || xp->xp_context == EXPAND_BUFFERS) - { -! char_u *halved_slash; -! -! /* highlight directories */ -! halved_slash = backslash_halve_save(files_found[k]); -! j = mch_isdir(halved_slash); -! vim_free(halved_slash); - if (showtail) - p = L_SHOWFILE(k); - else -*** ../vim-7.2.400/src/version.c 2010-03-17 18:15:17.000000000 +0100 ---- src/version.c 2010-03-17 19:12:22.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 401, - /**/ - --- -Two cows are standing together in a field. One asks the other: -"So what do you think about this Mad Cow Disease?" -The other replies: "That doesn't concern me. I'm a helicopter." - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.402 b/7.2.402 deleted file mode 100644 index 7c256bb1..00000000 --- a/7.2.402 +++ /dev/null @@ -1,91 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.402 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.402 -Problem: This gives a #705 error: let X = function('haslocaldir') - let X = function('getcwd') -Solution: Don't give E705 when the name is found in the hashtab. (Sergey - Khorev) -Files: src/eval.c - - -*** ../vim-7.2.401/src/eval.c 2010-03-10 13:43:22.000000000 +0100 ---- src/eval.c 2010-03-17 19:35:01.000000000 +0100 -*************** -*** 19103,19108 **** ---- 19103,19116 ---- - hashtab_T *ht; - char_u *p; - -+ ht = find_var_ht(name, &varname); -+ if (ht == NULL || *varname == NUL) -+ { -+ EMSG2(_(e_illvar), name); -+ return; -+ } -+ v = find_var_in_ht(ht, varname, TRUE); -+ - if (tv->v_type == VAR_FUNC) - { - if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':') -*************** -*** 19112,19118 **** - EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name); - return; - } -! if (function_exists(name)) - { - EMSG2(_("E705: Variable name conflicts with existing function: %s"), - name); ---- 19120,19129 ---- - EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name); - return; - } -! /* Don't allow hiding a function. When "v" is not NULL we migth be -! * assigning another function to the same var, the type is checked -! * below. */ -! if (v == NULL && function_exists(name)) - { - EMSG2(_("E705: Variable name conflicts with existing function: %s"), - name); -*************** -*** 19120,19133 **** - } - } - -- ht = find_var_ht(name, &varname); -- if (ht == NULL || *varname == NUL) -- { -- EMSG2(_(e_illvar), name); -- return; -- } -- -- v = find_var_in_ht(ht, varname, TRUE); - if (v != NULL) - { - /* existing variable, need to clear the value */ ---- 19131,19136 ---- -*** ../vim-7.2.401/src/version.c 2010-03-17 19:13:19.000000000 +0100 ---- src/version.c 2010-03-17 19:36:09.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 402, - /**/ - --- -Michael: There is no such thing as a dump question. -Bernard: Sure there is. For example "what is a core dump?" - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.403 b/7.2.403 deleted file mode 100644 index d2949dbc..00000000 --- a/7.2.403 +++ /dev/null @@ -1,53 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.403 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.403 (after 7.2.400) -Problem: Compiler warning for pointer type. (Tony Mechelynck) -Solution: Move type cast to the right place. -Files: src/if_ruby.c - - -*** ../vim-7.2.402/src/if_ruby.c 2010-03-17 18:15:17.000000000 +0100 ---- src/if_ruby.c 2010-03-19 23:08:06.000000000 +0100 -*************** -*** 722,729 **** - - if (tv->v_type == VAR_STRING) - { -! result = rb_str_new2((char *)(tv->vval.v_string == NULL -! ? "" : tv->vval.v_string)); - } - else if (tv->v_type == VAR_NUMBER) - { ---- 722,729 ---- - - if (tv->v_type == VAR_STRING) - { -! result = rb_str_new2(tv->vval.v_string == NULL -! ? "" : (char *)(tv->vval.v_string)); - } - else if (tv->v_type == VAR_NUMBER) - { -*** ../vim-7.2.402/src/version.c 2010-03-17 19:53:44.000000000 +0100 ---- src/version.c 2010-03-19 23:07:13.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 403, - /**/ - --- -If "R" is Reverse, how come "D" is FORWARD? - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.404 b/7.2.404 deleted file mode 100644 index fa1a0b6b..00000000 --- a/7.2.404 +++ /dev/null @@ -1,54 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.404 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.404 -Problem: Pointers for composing characters are not properly initialized. -Solution: Compute the size of the pointer, not what it points to. (Yukihiro - Nakadaira) -Files: src/screen.c - - -*** ../vim-7.2.403/src/screen.c 2010-02-03 15:47:59.000000000 +0100 ---- src/screen.c 2010-03-23 13:48:05.000000000 +0100 -*************** -*** 7536,7542 **** - new_ScreenLines = (schar_T *)lalloc((long_u)( - (Rows + 1) * Columns * sizeof(schar_T)), FALSE); - #ifdef FEAT_MBYTE -! vim_memset(new_ScreenLinesC, 0, sizeof(u8char_T) * MAX_MCO); - if (enc_utf8) - { - new_ScreenLinesUC = (u8char_T *)lalloc((long_u)( ---- 7536,7542 ---- - new_ScreenLines = (schar_T *)lalloc((long_u)( - (Rows + 1) * Columns * sizeof(schar_T)), FALSE); - #ifdef FEAT_MBYTE -! vim_memset(new_ScreenLinesC, 0, sizeof(u8char_T *) * MAX_MCO); - if (enc_utf8) - { - new_ScreenLinesUC = (u8char_T *)lalloc((long_u)( -*** ../vim-7.2.403/src/version.c 2010-03-19 23:08:22.000000000 +0100 ---- src/version.c 2010-03-23 13:54:47.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 404, - /**/ - --- -LAUNCELOT: Isn't there a St. Aaaaarrrrrrggghhh's in Cornwall? -ARTHUR: No, that's Saint Ives. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.405 b/7.2.405 deleted file mode 100644 index b79a19aa..00000000 --- a/7.2.405 +++ /dev/null @@ -1,48 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.405 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.405 -Problem: When built with small features the matching text is not - highlighted for ":s/pat/repl/c". -Solution: Remove the #ifdef for IncSearch. (James Vega) -Files: src/syntax.c - - -*** ../vim-7.2.404/src/syntax.c 2010-03-10 13:43:22.000000000 +0100 ---- src/syntax.c 2010-03-23 14:36:10.000000000 +0100 -*************** -*** 6205,6214 **** - { - CENT("ErrorMsg term=standout ctermbg=DarkRed ctermfg=White", - "ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White"), -- #ifdef FEAT_SEARCH_EXTRA - CENT("IncSearch term=reverse cterm=reverse", - "IncSearch term=reverse cterm=reverse gui=reverse"), -- #endif - CENT("ModeMsg term=bold cterm=bold", - "ModeMsg term=bold cterm=bold gui=bold"), - CENT("NonText term=bold ctermfg=Blue", ---- 6205,6212 ---- -*** ../vim-7.2.404/src/version.c 2010-03-23 13:56:53.000000000 +0100 ---- src/version.c 2010-03-23 14:37:08.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 405, - /**/ - --- -Dreams are free, but there's a small charge for alterations. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.406 b/7.2.406 deleted file mode 100644 index cff265f5..00000000 --- a/7.2.406 +++ /dev/null @@ -1,123 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.406 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.406 -Problem: Patch 7.2.119 introduces uninit mem read. (Dominique Pelle) -Solution: Only used ScreeenLinesC when ScreeenLinesUC is not zero. (Yukihiro - Nakadaira) Also clear ScreeenLinesC when allocating. -Files: src/screen.c - - -*** ../vim-7.2.405/src/screen.c 2010-03-23 13:56:53.000000000 +0100 ---- src/screen.c 2010-03-23 15:26:44.000000000 +0100 -*************** -*** 25,34 **** - * one character which occupies two display cells. - * For UTF-8 a multi-byte character is converted to Unicode and stored in - * ScreenLinesUC[]. ScreenLines[] contains the first byte only. For an ASCII -! * character without composing chars ScreenLinesUC[] will be 0. When the -! * character occupies two display cells the next byte in ScreenLines[] is 0. - * ScreenLinesC[][] contain up to 'maxcombine' composing characters -! * (drawn on top of the first character). They are 0 when not used. - * ScreenLines2[] is only used for euc-jp to store the second byte if the - * first byte is 0x8e (single-width character). - * ---- 25,35 ---- - * one character which occupies two display cells. - * For UTF-8 a multi-byte character is converted to Unicode and stored in - * ScreenLinesUC[]. ScreenLines[] contains the first byte only. For an ASCII -! * character without composing chars ScreenLinesUC[] will be 0 and -! * ScreenLinesC[][] is not used. When the character occupies two display -! * cells the next byte in ScreenLines[] is 0. - * ScreenLinesC[][] contain up to 'maxcombine' composing characters -! * (drawn on top of the first character). There is 0 after the last one used. - * ScreenLines2[] is only used for euc-jp to store the second byte if the - * first byte is 0x8e (single-width character). - * -*************** -*** 4893,4898 **** ---- 4894,4900 ---- - - /* - * Return if the composing characters at "off_from" and "off_to" differ. -+ * Only to be used when ScreenLinesUC[off_from] != 0. - */ - static int - comp_char_differs(off_from, off_to) -*************** -*** 6281,6286 **** ---- 6283,6289 ---- - /* - * Return TRUE if composing characters for screen posn "off" differs from - * composing characters in "u8cc". -+ * Only to be used when ScreenLinesUC[off] != 0. - */ - static int - screen_comp_differs(off, u8cc) -*************** -*** 6461,6468 **** - && c == 0x8e - && ScreenLines2[off] != ptr[1]) - || (enc_utf8 -! && (ScreenLinesUC[off] != (u8char_T)(c >= 0x80 ? u8c : 0) -! || screen_comp_differs(off, u8cc))) - #endif - || ScreenAttrs[off] != attr - || exmode_active; ---- 6464,6473 ---- - && c == 0x8e - && ScreenLines2[off] != ptr[1]) - || (enc_utf8 -! && (ScreenLinesUC[off] != -! (u8char_T)(c < 0x80 && u8cc[0] == 0 ? 0 : u8c) -! || (ScreenLinesUC[off] != 0 -! && screen_comp_differs(off, u8cc)))) - #endif - || ScreenAttrs[off] != attr - || exmode_active; -*************** -*** 7542,7548 **** - new_ScreenLinesUC = (u8char_T *)lalloc((long_u)( - (Rows + 1) * Columns * sizeof(u8char_T)), FALSE); - for (i = 0; i < p_mco; ++i) -! new_ScreenLinesC[i] = (u8char_T *)lalloc((long_u)( - (Rows + 1) * Columns * sizeof(u8char_T)), FALSE); - } - if (enc_dbcs == DBCS_JPNU) ---- 7547,7553 ---- - new_ScreenLinesUC = (u8char_T *)lalloc((long_u)( - (Rows + 1) * Columns * sizeof(u8char_T)), FALSE); - for (i = 0; i < p_mco; ++i) -! new_ScreenLinesC[i] = (u8char_T *)lalloc_clear((long_u)( - (Rows + 1) * Columns * sizeof(u8char_T)), FALSE); - } - if (enc_dbcs == DBCS_JPNU) -*** ../vim-7.2.405/src/version.c 2010-03-23 14:39:07.000000000 +0100 ---- src/version.c 2010-03-23 15:34:11.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 406, - /**/ - --- -VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur - and his knights seemed hopeless, when, suddenly ... the animator - suffered a fatal heart attack. -ANIMATOR: Aaaaagh! -VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could - continue. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.407 b/7.2.407 deleted file mode 100644 index 0237a9d1..00000000 --- a/7.2.407 +++ /dev/null @@ -1,69 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.407 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.407 -Problem: When using an expression in ":s" backslashes in the result are - dropped. (Sergey Goldgaber, Christian Brabandt) -Solution: Double backslashes. -Files: src/regexp.c - - -*** ../vim-7.2.406/src/regexp.c 2009-11-26 20:41:19.000000000 +0100 ---- src/regexp.c 2010-03-23 16:22:35.000000000 +0100 -*************** -*** 6963,6968 **** ---- 6963,6970 ---- - eval_result = eval_to_string(source + 2, NULL, TRUE); - if (eval_result != NULL) - { -+ int had_backslash = FALSE; -+ - for (s = eval_result; *s != NUL; mb_ptr_adv(s)) - { - /* Change NL to CR, so that it becomes a line break. -*************** -*** 6970,6976 **** ---- 6972,6991 ---- - if (*s == NL) - *s = CAR; - else if (*s == '\\' && s[1] != NUL) -+ { - ++s; -+ had_backslash = TRUE; -+ } -+ } -+ if (had_backslash && backslash) -+ { -+ /* Backslashes will be consumed, need to double them. */ -+ s = vim_strsave_escaped(eval_result, (char_u *)"\\"); -+ if (s != NULL) -+ { -+ vim_free(eval_result); -+ eval_result = s; -+ } - } - - dst += STRLEN(eval_result); -*** ../vim-7.2.406/src/version.c 2010-03-23 15:36:29.000000000 +0100 ---- src/version.c 2010-03-23 16:26:22.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 407, - /**/ - --- -Sorry, no fortune today. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.408 b/7.2.408 deleted file mode 100644 index 25ac3a9c..00000000 --- a/7.2.408 +++ /dev/null @@ -1,73 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.408 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.408 -Problem: With ":g/the/s/foo/bar/" the '[ and '] marks can be set to a line - that was not changed. -Solution: Only set '[ and '] marks when a substitution was done. -Files: src/ex_cmds.c - - -*** ../vim-7.2.407/src/ex_cmds.c 2009-07-09 20:06:30.000000000 +0200 ---- src/ex_cmds.c 2010-03-23 17:31:17.000000000 +0100 -*************** -*** 4238,4243 **** ---- 4238,4244 ---- - char_u *sub_firstline; /* allocated copy of first sub line */ - int endcolumn = FALSE; /* cursor in last column when done */ - pos_T old_cursor = curwin->w_cursor; -+ int start_nsubs; - - cmd = eap->arg; - if (!global_busy) -*************** -*** 4245,4250 **** ---- 4246,4252 ---- - sub_nsubs = 0; - sub_nlines = 0; - } -+ start_nsubs = sub_nsubs; - - if (eap->cmdidx == CMD_tilde) - which_pat = RE_LAST; /* use last used regexp */ -*************** -*** 5106,5112 **** - if (do_count) - curwin->w_cursor = old_cursor; - -! if (sub_nsubs) - { - /* Set the '[ and '] marks. */ - curbuf->b_op_start.lnum = eap->line1; ---- 5108,5114 ---- - if (do_count) - curwin->w_cursor = old_cursor; - -! if (sub_nsubs > start_nsubs) - { - /* Set the '[ and '] marks. */ - curbuf->b_op_start.lnum = eap->line1; -*** ../vim-7.2.407/src/version.c 2010-03-23 16:27:15.000000000 +0100 ---- src/version.c 2010-03-23 17:35:40.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 408, - /**/ - --- -Permission is granted to read this message out aloud on Kings Cross Road, -London, under the condition that the orator is properly dressed. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.409 b/7.2.409 deleted file mode 100644 index fdda4a00..00000000 --- a/7.2.409 +++ /dev/null @@ -1,60 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.409 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.409 -Problem: Summary of number of substitutes is incorrect for ":folddo". (Jean - Johner) -Solution: Reset sub_nsubs and sub_nlines in global_exe(). -Files: src/ex_cmds.c - - -*** ../vim-7.2.408/src/ex_cmds.c 2010-03-23 17:36:24.000000000 +0100 ---- src/ex_cmds.c 2010-03-23 17:42:49.000000000 +0100 -*************** -*** 5238,5245 **** - type = *eap->cmd; - cmd = eap->arg; - which_pat = RE_LAST; /* default: use last used regexp */ -- sub_nsubs = 0; -- sub_nlines = 0; - - /* - * undocumented vi feature: ---- 5238,5243 ---- -*************** -*** 5343,5348 **** ---- 5341,5348 ---- - /* When the command writes a message, don't overwrite the command. */ - msg_didout = TRUE; - -+ sub_nsubs = 0; -+ sub_nlines = 0; - global_need_beginline = FALSE; - global_busy = 1; - old_lcount = curbuf->b_ml.ml_line_count; -*** ../vim-7.2.408/src/version.c 2010-03-23 17:36:24.000000000 +0100 ---- src/version.c 2010-03-23 17:47:53.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 409, - /**/ - --- -BRIDGEKEEPER: What is your favorite colour? -LAUNCELOT: Blue. -BRIDGEKEEPER: Right. Off you go. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.410 b/7.2.410 deleted file mode 100644 index 660b0681..00000000 --- a/7.2.410 +++ /dev/null @@ -1,78 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.410 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.410 -Problem: Highlighting directories for completion doesn't work properly. -Solution: Don't halve backslashes when not needed, expaned "~/". - (Dominique Pelle) -Files: src/ex_getln.c - - -*** ../vim-7.2.409/src/ex_getln.c 2010-03-17 19:13:19.000000000 +0100 ---- src/ex_getln.c 2010-03-23 18:00:56.000000000 +0100 -*************** -*** 3948,3959 **** - || xp->xp_context == EXPAND_SHELLCMD - || xp->xp_context == EXPAND_BUFFERS) - { -- char_u *halved_slash; -- - /* highlight directories */ -! halved_slash = backslash_halve_save(files_found[k]); -! j = mch_isdir(halved_slash); -! vim_free(halved_slash); - if (showtail) - p = L_SHOWFILE(k); - else ---- 3948,3973 ---- - || xp->xp_context == EXPAND_SHELLCMD - || xp->xp_context == EXPAND_BUFFERS) - { - /* highlight directories */ -! if (xp->xp_numfiles != -1) -! { -! char_u *halved_slash; -! char_u *exp_path; -! -! /* Expansion was done before and special characters -! * were escaped, need to halve backslashes. Also -! * $HOME has been replaced with ~/. */ -! exp_path = expand_env_save_opt(files_found[k], TRUE); -! halved_slash = backslash_halve_save( -! exp_path != NULL ? exp_path : files_found[k]); -! j = mch_isdir(halved_slash != NULL ? halved_slash -! : files_found[k]); -! vim_free(exp_path); -! vim_free(halved_slash); -! } -! else -! /* Expansion was done here, file names are literal. */ -! j = mch_isdir(files_found[k]); - if (showtail) - p = L_SHOWFILE(k); - else -*** ../vim-7.2.409/src/version.c 2010-03-23 17:49:19.000000000 +0100 ---- src/version.c 2010-03-23 18:04:25.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 410, - /**/ - --- -BRIDGEKEEPER: What is your favorite colour? -GAWAIN: Blue ... No yelloooooww! - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.2.411 b/7.2.411 deleted file mode 100644 index 4a619ee7..00000000 --- a/7.2.411 +++ /dev/null @@ -1,47 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.411 -Fcc: outbox -From: Bram Moolenaar -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.411 -Problem: When parsing 'cino' a comma isn't skipped properly. -Solution: Skip the comma. (Lech Lorens) -Files: src/misc1.c - - -*** ../vim-7.2.410/src/misc1.c 2010-03-02 12:37:01.000000000 +0100 ---- src/misc1.c 2010-03-23 18:18:15.000000000 +0100 -*************** -*** 6270,6275 **** ---- 6270,6277 ---- - case 'l': ind_keep_case_label = n; break; - case '#': ind_hash_comment = n; break; - } -+ if (*options == ',') -+ ++options; - } - - /* remember where the cursor was when we started */ -*** ../vim-7.2.410/src/version.c 2010-03-23 18:06:47.000000000 +0100 ---- src/version.c 2010-03-23 18:22:13.000000000 +0100 -*************** -*** 683,684 **** ---- 683,686 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 411, - /**/ - --- -BRIDGEKEEPER: What is your favorite editor? -GAWAIN: Emacs ... No, Viiiiiiiiiiimmmmmmm! - "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/README.patches b/README.patches index c3f0414f..678dad30 100644 --- a/README.patches +++ b/README.patches @@ -22,6 +22,7 @@ patches for binaries. Checksums for the patch files can be found in the file MD5. + Individual patches for Vim 7.3: SIZE NAME FIXES @@ -80,3 +81,154 @@ Individual patches for Vim 7.3: 2948 7.3.053 complete() function doesn't reset complete direction 3354 7.3.054 can define a user command for :Print, but it doesn't work 10470 7.3.055 endless loop when recursively comparing lists and dicts + 17935 7.3.056 "getline" argument in do_cmdline() shadows global + 1980 7.3.057 segfault with command line abbreviation + 4735 7.3.058 error "code converter not found" when loading Ruby script + 3226 7.3.059 Netbeans: Problem with recursive messages for Athena/Motif + 5326 7.3.060 Netbeans: crash when socket is disconnected unexpectedly + 3307 7.3.061 remote ":drop" does not respect 'autochdir' + 23639 7.3.062 Python has problems when installed in an unusual directory + 2250 7.3.063 Win32: Running a filter command makes Vim lose focus + 2493 7.3.064 Win32: ":dis +" shows nothing, but "+p does insert text + 3389 7.3.065 can't get current line number in a source file + 2852 7.3.066 crash when changing to another window during :vimgrep command + 2315 7.3.067 Ruby: Init_prelude is not always available + 1550 7.3.068 using freed memory on ":saveas" if autocommand sets 'acd' + 1618 7.3.069 GTK: pressing Enter in inputdialog() doesn't work like OK + 1604 7.3.070 can set environment variables in the sandbox + 2095 7.3.071 cursor binding not reset when editing another file + 9432 7.3.072 can't complete file names while ignoring case + 2466 7.3.073 double free memory when netbeans command follows DETACH + 7659 7.3.074 can't use the "+ register like "* for yank and put + 3872 7.3.075 (after 7.3.072) also use 'wildignorecase' in expand() + 5538 7.3.076 Clang warnings for dead code + 3099 7.3.077 when updating swapfile crypt fails there is no error message + 1565 7.3.078 warning for unused variable + 1377 7.3.079 duplicate lines in MSVC makefile + 6011 7.3.080 spelling doesn't work on VMS + 2257 7.3.081 non-printable characters in 'statusline' cause trouble + 1634 7.3.082 leaking file descriptor when netbeans hostname doesn't exist + 9996 7.3.083 when a read() or write() is interrupted by a signal it fails + 3508 7.3.084 after window split the new one scrolls with cursor at top + 8843 7.3.085 (after 7.3.083) inconsistency with preproc symbols + 4005 7.3.086 v:count has value of previous command in expression mapping + 4349 7.3.087 (after 7.3.083) missing include for errno.h + 4868 7.3.088 Ruby can't load Gems sometimes, may cause a crash + 1550 7.3.089 compiler warning on 64 bit MS-Windows + 2377 7.3.090 wrong help text for Cscope + 9421 7.3.091 "vim -w foo" writes key codes for removed escape sequences + 1678 7.3.092 resizing the window when exiting + 5483 7.3.093 new DLL dependencies in MingW with gcc 4.5.0 + 2167 7.3.094 using abs() requires type cast to int + 1999 7.3.095 Win32: In Chinese tear-off menu doesn't work + 2767 7.3.096 can't interrupt "gvim -nb", leak file descriptor on errro + 1760 7.3.097 ":call" inside "if 0" gives error for dict function + 1712 7.3.098 ignored error may still cause status line to be disabled + 1628 7.3.099 crash when splitting a window with zero height + 1497 7.3.100 when using ":normal" v:count isn't set + 2449 7.3.101 ino_t defined with wrong size in Ruby and Lua interfaces + 23045 7.3.102 Ex command typed at reload prompt is ignored + 4500 7.3.103 changing 'ff', then using ":w" in empty file sets 'mod' + 1428 7.3.104 conceal: using Tab for cchar causes problems + 1539 7.3.105 can't get the value of "b:changedtick" with getbufvar() + 1650 7.3.106 other window scrolls if both 'scrollbind' and 'cursorbind' set + 1986 7.3.107 year in :undolist can be confusing + 3425 7.3.108 useless check for NULL when calling vim_free() + 7203 7.3.109 processing new Esperanto spell file fails and crashes Vim + 2122 7.3.110 the "nbsp" item in 'listchars' isn't used for ":list" + 4010 7.3.111 :normal command in 'statusline' causes the cursor to move + 1978 7.3.112 setting 'statusline' to "%!'asdf%' reads uninitialized memory + 1838 7.3.113 Windows: Fall back directory for creating temp file is wrong + 1568 7.3.114 potential problem using 'verbosefile' uninitialized + 1645 7.3.115 Vim can crash when tmpnam() returns NULL + 1788 7.3.116 'cursorline' too short with concealed chars and 'list' set + 3835 7.3.117 build failed when --as-needed excludes ncurses + 2283 7.3.118 Ruby uses SIGVTALARM which makes Vim exit + 1637 7.3.119 (after 7.3.114) build problem on Mac + 2597 7.3.120 message for existing swap file does not fit in 25 lines + 1721 7.3.121 crash when using complicated 'statusline' + 3936 7.3.122 having src/auto/config.mk in the distribution causes problems + 1954 7.3.123 ml_get error when 'conceallevel' is set + 6777 7.3.124 EOL may be missing from written file + 2672 7.3.125 MSVC: quote in link argument causes trouble + 1652 7.3.126 compiler warning for signed pointer + 1747 7.3.127 compiler complains about comma after last enum item + 1706 7.3.128 another compiler warning for signed pointer + 6608 7.3.129 using integer like a boolean + 1908 7.3.130 clipboard_event_time misplaced in #ifdef + 1280 7.3.131 including errno.h too often + 2648 7.3.132 C++ style comments + 3169 7.3.133 when using encryption it's not clear what method was used + 1470 7.3.134 drag-n-drop doesn't work in KDE Dolphin + 2678 7.3.135 inconsistency: last substitute pattern isn't used for search + 1653 7.3.136 duplicate include of assert.h + 2881 7.3.137 when 'lazyredraw' is set the screen may not be updated + 2399 7.3.138 ":com" changes the multi-byte text of :echo + 3685 7.3.139 (after 7.3.137) can't read ":ver" output when 'lazyredraw' set + 1797 7.3.140 crash when 'cursorline' and 'list' both set + 2968 7.3.141 when a key code is not set get a confusing error message + 2593 7.3.142 Python stdout doesn't have flush(), causing an import to fail + 45956 7.3.143 memfile insufficiently tested; inefficient with many blocks + 2387 7.3.144 crash with ":python help(dir)" + 2400 7.3.145 (after 7.3.144) can't build with Python dynamically loading + 6571 7.3.146 can assign to dict member with invalid name + 1575 7.3.147 (after 7.3.143) can't build on HP-UX + 7615 7.3.148 huge number of syntax items or clusters causes hang or crash + 2205 7.3.149 the cursor disappears after the 'setDot' netbeans command + 2960 7.3.150 readline() does not return the last line when NL is missing + 2077 7.3.151 with "unnamedplus" in 'clipboard' selection also copied to "* + 14784 7.3.152 xxd does not check for errors of library functions + 1775 7.3.153 compiler warning for ambiguous else, missing prototype in xxd + 3570 7.3.154 (after 7.3.148) can't compile with tiny features + 8459 7.3.155 crash when using map(), filter(), remove(), extend() on v: + 2727 7.3.156 Tty names possibly left unterminated + 1583 7.3.157 superfluous assignment + 1497 7.3.158 might use uninitialized memory in C indenting + 1587 7.3.159 using uninitialized pointer when out of memory + 13647 7.3.160 unsafe string copying + 43528 7.3.161 items on the stack may be too big + 2564 7.3.162 no error message assigning to a list with index out of range + 2016 7.3.163 the default 'shellpipe' doesn't recognize "mksh" and "pdksh" + 4014 7.3.164 C-indenting doesn't recognize some function declarations + 1558 7.3.165 ":find" completion does not escape spaces in directory name + 1765 7.3.166 buffer on the stack may be too big + 2932 7.3.167 when using internal grep QuickFixCmdPost is not triggered + 2019 7.3.168 CR in second argument of input() causes problems + 3659 7.3.169 freeing memory already freed, warning from code analyzer + 2429 7.3.170 VMS: test77 missing from Makefile + 4511 7.3.171 confusing message from ":yank" when no clipboard support + 8382 7.3.172 MS-Windows: rename() might delete a file + 2429 7.3.173 ":cwindow" may open a window when the quickfix list is empty + 4618 7.3.174 when Exuberant ctags binary is exctags it's not found + 1482 7.3.175 ":new" may result in wrong 'colorcolumn' highlighting + 6968 7.3.176 Ruby linking doesn't work properly on Mac OS X + 2814 7.3.177 MS-Windows: mkdir() works wrong when 'encoding' is "utf-8" + 4019 7.3.178 C-indent doesn't handle code right after { correctly + 2144 7.3.179 C-indent doesn't handle colon in string correctly + 8439 7.3.180 better matching end part of 'comments' not used after middle + 4509 7.3.181 display update error when repeating insert of CTRL-V / digraph + 1684 7.3.182 (after 7.3.180) unused variable compiler warning + 3761 7.3.183 when Exuberant ctags binary is exuberant-ctags it's not found + 2532 7.3.184 static code analysis errors in riscOS + 2570 7.3.185 ":windo g/pattern/q" reports wrong number of lines + 1713 7.3.186 v:register wrong when 'clipboard' contains "unnamed" +173872 7.3.187 the RISC OS port is not being maintained, remove it + 7901 7.3.188 some more RISC OS files to be removed + 1476 7.3.189 (after 7.3.186) build fails without +clipboard + 1462 7.3.190 "containedin" syntax argument may make highlighting be wrong + 13294 7.3.191 still some RISC OS stuff to remove + 1701 7.3.192 command ":s/ \?/ /g" splits multi-byte characters into bytes + 1998 7.3.193 in the command line window ":close" doesn't work properly + 1397 7.3.194 "!mkdir a | ln -s a b", resolve("b/") doesn't result in "a/" + 4951 7.3.195 "} else" causes following lines to be indented too much + 7478 7.3.196 can't intercept a character that is going to be inserted + 2367 7.3.197 get E42 error when a QuickfixCmdPost event removes all errors + 12240 7.3.198 there is no completion for ":lang" + 1857 7.3.199 MS-Windows: Compilation problem of OLE with MingW compiler + 2213 7.3.200 (after 7.3.198) CTRL-D doesn't complete :lang + 3303 7.3.201 (after 7.3.195) still bad indenting after "} else" + 22565 7.3.202 cannot influence the indent inside a namespace + 5725 7.3.203 MS-Windows: Can't run external command without console window + 1588 7.3.204 (after 7.3.201) compiler warning + 2430 7.3.205 syntax "extend" doesn't work correctly + 1617 7.3.206 64bit MS-Windows compiler warning diff --git a/vim.spec b/vim.spec index 5cf689c2..7dfd1140 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 055 +%define patchlevel 206 Summary: The VIM editor URL: http://www.vim.org/ @@ -56,7 +56,6 @@ Source23: ftp://ftp.vim.org/vol/2/vim/runtime/autoload/netrwSettings.vim Patch2002: vim-7.0-fixkeys.patch Patch2003: vim-6.2-specsyntax.patch Patch2004: vim-7.0-crv.patch -Patch2010: xxd-locale.patch %if %{withhunspell} Patch2011: vim-7.0-hunspell.patch BuildRequires: hunspell-devel @@ -119,6 +118,157 @@ Patch052: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.052 Patch053: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.053 Patch054: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.054 Patch055: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.055 +Patch056: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.056 +Patch057: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.057 +Patch058: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.058 +Patch059: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.059 +Patch060: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.060 +Patch061: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.061 +Patch062: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.062 +Patch063: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.063 +Patch064: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.064 +Patch065: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.065 +Patch066: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.066 +Patch067: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.067 +Patch068: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.068 +Patch069: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.069 +Patch070: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.070 +Patch071: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.071 +Patch072: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.072 +Patch073: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.073 +Patch074: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.074 +Patch075: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.075 +Patch076: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.076 +Patch077: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.077 +Patch078: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.078 +Patch079: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.079 +Patch080: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.080 +Patch081: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.081 +Patch082: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.082 +Patch083: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.083 +Patch084: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.084 +Patch085: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.085 +Patch086: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.086 +Patch087: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.087 +Patch088: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.088 +Patch089: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.089 +Patch090: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.090 +Patch091: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.091 +Patch092: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.092 +Patch093: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.093 +Patch094: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.094 +Patch095: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.095 +Patch096: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.096 +Patch097: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.097 +Patch098: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.098 +Patch099: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.099 +Patch100: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.100 +Patch101: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.101 +Patch102: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.102 +Patch103: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.103 +Patch104: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.104 +Patch105: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.105 +Patch106: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.106 +Patch107: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.107 +Patch108: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.108 +Patch109: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.109 +Patch110: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.110 +Patch111: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.111 +Patch112: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.112 +Patch113: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.113 +Patch114: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.114 +Patch115: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.115 +Patch116: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.116 +Patch117: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.117 +Patch118: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.118 +Patch119: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.119 +Patch120: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.120 +Patch121: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.121 +Patch122: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.122 +Patch123: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.123 +Patch124: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.124 +Patch125: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.125 +Patch126: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.126 +Patch127: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.127 +Patch128: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.128 +Patch129: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.129 +Patch130: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.130 +Patch131: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.131 +Patch132: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.132 +Patch133: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.133 +Patch134: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.134 +Patch135: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.135 +Patch136: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.136 +Patch137: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.137 +Patch138: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.138 +Patch139: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.139 +Patch140: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.140 +Patch141: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.141 +Patch142: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.142 +Patch143: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.143 +Patch144: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.144 +Patch145: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.145 +Patch146: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.146 +Patch147: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.147 +Patch148: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.148 +Patch149: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.149 +Patch150: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.150 +Patch151: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.151 +Patch152: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.152 +Patch153: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.153 +Patch154: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.154 +Patch155: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.155 +Patch156: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.156 +Patch157: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.157 +Patch158: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.158 +Patch159: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.159 +Patch160: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.160 +Patch161: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.161 +Patch162: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.162 +Patch163: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.163 +Patch164: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.164 +Patch165: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.165 +Patch166: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.166 +Patch167: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.167 +Patch168: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.168 +Patch169: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.169 +Patch170: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.170 +Patch171: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.171 +Patch172: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.172 +Patch173: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.173 +Patch174: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.174 +Patch175: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.175 +Patch176: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.176 +Patch177: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.177 +Patch178: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.178 +Patch179: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.179 +Patch180: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.180 +Patch181: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.181 +Patch182: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.182 +Patch183: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.183 +Patch184: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.184 +Patch185: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.185 +Patch186: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.186 +Patch187: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.187 +Patch188: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.188 +Patch189: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.189 +Patch190: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.190 +Patch191: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.191 +Patch192: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.192 +Patch193: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.193 +Patch194: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.194 +Patch195: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.195 +Patch196: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.196 +Patch197: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.197 +Patch198: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.198 +Patch199: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.199 +Patch200: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.200 +Patch201: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.201 +Patch202: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.202 +Patch203: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.203 +Patch204: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.204 +Patch205: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.205 +Patch206: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.206 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -255,7 +405,6 @@ chmod -x runtime/tools/mve.awk %patch2002 -p1 %patch2003 -p1 %patch2004 -p1 -%patch2010 -p1 %if %{withhunspell} %patch2011 -p1 %endif @@ -318,6 +467,157 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch053 -p0 %patch054 -p0 %patch055 -p0 +%patch056 -p0 +%patch057 -p0 +%patch058 -p0 +%patch059 -p0 +%patch060 -p0 +%patch061 -p0 +%patch062 -p0 +%patch063 -p0 +%patch064 -p0 +%patch065 -p0 +%patch066 -p0 +%patch067 -p0 +%patch068 -p0 +%patch069 -p0 +%patch070 -p0 +%patch071 -p0 +%patch072 -p0 +%patch073 -p0 +%patch074 -p0 +%patch075 -p0 +%patch076 -p0 +%patch077 -p0 +%patch078 -p0 +%patch079 -p0 +%patch080 -p0 +%patch081 -p0 +%patch082 -p0 +%patch083 -p0 +%patch084 -p0 +%patch085 -p0 +%patch086 -p0 +%patch087 -p0 +%patch088 -p0 +%patch089 -p0 +%patch090 -p0 +%patch091 -p0 +%patch092 -p0 +%patch093 -p0 +%patch094 -p0 +%patch095 -p0 +%patch096 -p0 +%patch097 -p0 +%patch098 -p0 +%patch099 -p0 +%patch100 -p0 +%patch101 -p0 +%patch102 -p0 +%patch103 -p0 +%patch104 -p0 +%patch105 -p0 +%patch106 -p0 +%patch107 -p0 +%patch108 -p0 +%patch109 -p0 +%patch110 -p0 +%patch111 -p0 +%patch112 -p0 +%patch113 -p0 +%patch114 -p0 +%patch115 -p0 +%patch116 -p0 +%patch117 -p0 +%patch118 -p0 +%patch119 -p0 +%patch120 -p0 +%patch121 -p0 +%patch122 -p0 +%patch123 -p0 +%patch124 -p0 +%patch125 -p0 +%patch126 -p0 +%patch127 -p0 +%patch128 -p0 +%patch129 -p0 +%patch130 -p0 +%patch131 -p0 +%patch132 -p0 +%patch133 -p0 +%patch134 -p0 +%patch135 -p0 +%patch136 -p0 +%patch137 -p0 +%patch138 -p0 +%patch139 -p0 +%patch140 -p0 +%patch141 -p0 +%patch142 -p0 +%patch143 -p0 +%patch144 -p0 +%patch145 -p0 +%patch146 -p0 +%patch147 -p0 +%patch148 -p0 +%patch149 -p0 +%patch150 -p0 +%patch151 -p0 +%patch152 -p0 +%patch153 -p0 +%patch154 -p0 +%patch155 -p0 +%patch156 -p0 +%patch157 -p0 +%patch158 -p0 +%patch159 -p0 +%patch160 -p0 +%patch161 -p0 +%patch162 -p0 +%patch163 -p0 +%patch164 -p0 +%patch165 -p0 +%patch166 -p0 +%patch167 -p0 +%patch168 -p0 +%patch169 -p0 +%patch170 -p0 +%patch171 -p0 +%patch172 -p0 +%patch173 -p0 +%patch174 -p0 +%patch175 -p0 +%patch176 -p0 +%patch177 -p0 +%patch178 -p0 +%patch179 -p0 +%patch180 -p0 +%patch181 -p0 +%patch182 -p0 +%patch183 -p0 +%patch184 -p0 +%patch185 -p0 +%patch186 -p0 +%patch187 -p0 +%patch188 -p0 +%patch189 -p0 +%patch190 -p0 +%patch191 -p0 +%patch192 -p0 +%patch193 -p0 +%patch194 -p0 +%patch195 -p0 +%patch196 -p0 +%patch197 -p0 +%patch198 -p0 +%patch199 -p0 +%patch200 -p0 +%patch201 -p0 +%patch202 -p0 +%patch203 -p0 +%patch204 -p0 +%patch205 -p0 +%patch206 -p0 # install spell files %if %{withvimspell} @@ -784,6 +1084,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Tue Jun 07 2011 Karsten Hopp 7.3.206-1 +- patchlevel 206 + * Thu Nov 11 2010 Karsten Hopp 7.3.055-1 - patchlevel 055 diff --git a/xxd-locale.patch b/xxd-locale.patch deleted file mode 100644 index 615fbee9..00000000 --- a/xxd-locale.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -up vim71/src/xxd/xxd.c.xxd vim71/src/xxd/xxd.c ---- vim71/src/xxd/xxd.c.xxd 2008-07-18 14:21:03.000000000 +0200 -+++ vim71/src/xxd/xxd.c 2008-07-18 14:23:48.000000000 +0200 -@@ -90,6 +90,7 @@ - #if __MWERKS__ && !defined(BEBOX) - # include /* for fdopen() on MAC */ - #endif -+#include - - #if defined(__BORLANDC__) && __BORLANDC__ <= 0x0410 && !defined(fileno) - /* Missing define and prototype grabbed from the BC 4.0 */ -@@ -452,6 +453,11 @@ char *argv[]; - long length = -1, n = 0, seekoff = 0; - char l[LLEN+1]; - char *pname, *pp; -+ char *lang=getenv("LANG"); -+ if(!lang) lang=getenv("LC_ALL"); -+ if(!lang) lang=getenv("LC_CTYPE"); -+ if(lang) -+ setlocale(LC_ALL, lang); - - #ifdef AMIGA - /* This program doesn't work when started from the Workbench */ -@@ -756,7 +762,7 @@ char *argv[]; - #else - (e > 31 && e < 127) - #endif -- ? e : '.'; -+ ? e : isalnum(e) ? e : '.'; - if (e) - nonzero++; - n++; From 7fe059e02afc679f061bcf399bc45ac0c0654787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Tue, 14 Jun 2011 15:44:04 +0200 Subject: [PATCH 0380/3803] Perl mass rebuild --- vim.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vim.spec b/vim.spec index 94354557..b0564a76 100644 --- a/vim.spec +++ b/vim.spec @@ -24,7 +24,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{beta}%{patchlevel} -Release: 2%{?dist} +Release: 3%{?dist} License: Vim Group: Applications/Editors Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}%{?beta}%{?CVSDATE}.tar.bz2 @@ -1088,6 +1088,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Tue Jun 14 2011 Marcela MaÅ¡láňová - 2:7.3.206-3 +- Perl mass rebuild + * Tue May 31 2011 Ville Skyttä - 2:7.3.206-2 - Own the /usr/share/vim/vim73 dir. From edee625f0cf5dc1043decc113bce63da4477336a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:21 +0200 Subject: [PATCH 0381/3803] - patchlevel 207 --- 7.3.207 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 7.3.207 diff --git a/7.3.207 b/7.3.207 new file mode 100644 index 00000000..95b335ec --- /dev/null +++ b/7.3.207 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.207 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.207 +Problem: Can't compile with MSVC with pentium4 and 64 bit. +Solution: Only use SSE2 for 32 bit. (Mike Williams) +Files: src/Make_mvc.mak + + +*** ../mercurial/vim73/src/Make_mvc.mak 2011-02-15 18:06:11.000000000 +0100 +--- src/Make_mvc.mak 2011-06-04 11:59:38.000000000 +0200 +*************** +*** 409,416 **** + CPUARG = + !endif + !else +! # VC8/9 only allows specifying SSE architecture +! !if "$(CPUNR)" == "pentium4" + CPUARG = /arch:SSE2 + !endif + !endif +--- 409,416 ---- + CPUARG = + !endif + !else +! # VC8/9/10 only allows specifying SSE architecture but only for 32bit +! !if "$(ASSEMBLY_ARCHITECTURE)" == "x86" && "$(CPUNR)" == "pentium4" + CPUARG = /arch:SSE2 + !endif + !endif +*** ../vim-7.3.206/src/version.c 2011-05-25 21:18:02.000000000 +0200 +--- src/version.c 2011-06-12 20:30:30.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 207, + /**/ + +-- +"The question of whether computers can think is just like the question +of whether submarines can swim." -- Edsger W. Dijkstra + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 2282dd10315dab8a6ad93b9c70d723875c284f36 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:22 +0200 Subject: [PATCH 0382/3803] - patchlevel 208 --- 7.3.208 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 7.3.208 diff --git a/7.3.208 b/7.3.208 new file mode 100644 index 00000000..c5a79295 --- /dev/null +++ b/7.3.208 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.208 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.208 +Problem: Early terminated if statement. +Solution: Remove the semicolon. (Lech Lorens) +Files: src/gui_mac.c + + +*** ../mercurial/vim73/src/gui_mac.c 2011-01-17 20:08:04.000000000 +0100 +--- src/gui_mac.c 2011-06-06 05:35:46.000000000 +0200 +*************** +*** 1840,1846 **** + p.v -= gui.scrollbar_height; + p.v -= p.v % gui.char_height; + p.v += 2 * gui.border_width; +! if (gui.which_scrollbars[SBAR_BOTTOM]); + p.v += gui.scrollbar_height; + + ZoomWindowIdeal(whichWindow, thePart, &p); +--- 1840,1846 ---- + p.v -= gui.scrollbar_height; + p.v -= p.v % gui.char_height; + p.v += 2 * gui.border_width; +! if (gui.which_scrollbars[SBAR_BOTTOM]) + p.v += gui.scrollbar_height; + + ZoomWindowIdeal(whichWindow, thePart, &p); +*** ../vim-7.3.207/src/version.c 2011-06-12 20:31:25.000000000 +0200 +--- src/version.c 2011-06-12 20:33:00.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 208, + /**/ + +-- +Keep America beautiful. Swallow your beer cans. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 02828efa5377f0ed37297a8db87e5b0dcaa900b0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:22 +0200 Subject: [PATCH 0383/3803] - patchlevel 209 --- 7.3.209 | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 7.3.209 diff --git a/7.3.209 b/7.3.209 new file mode 100644 index 00000000..afd4ab82 --- /dev/null +++ b/7.3.209 @@ -0,0 +1,95 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.209 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.209 +Problem: MSVC Install instructions point to wrong batch file. +Solution: Add a batch file for use with MSVC 10. +Files: src/msvc2010.bat, src/INSTALLpc.txt, Filelist + + +*** ../mercurial/vim73/src/msvc2010.bat 2011-06-12 20:35:31.000000000 +0200 +--- src/msvc2010.bat 2011-06-09 05:08:35.000000000 +0200 +*************** +*** 0 **** +--- 1,7 ---- ++ @echo off ++ rem To be used on MS-Windows for Visual C++ 2010 Express Edition ++ rem aka Microsoft Visual Studio 10.0. ++ rem See INSTALLpc.txt for information. ++ @echo on ++ ++ call "%VS100COMNTOOLS%%vsvars32.bat" +*** ../mercurial/vim73/src/INSTALLpc.txt 2010-08-16 21:23:30.000000000 +0200 +--- src/INSTALLpc.txt 2011-06-08 06:47:46.000000000 +0200 +*************** +*** 28,35 **** + 9. MS-DOS + + The currently preferred method is using the free Visual C++ Toolkit 2008 +! |msvc-2008-express|. If you need the executable to run on Windows 98 or ME, +! use the 2003 one |msvc-2003-toolkit|. + + + 1. Microsoft Visual C++ +--- 28,36 ---- + 9. MS-DOS + + The currently preferred method is using the free Visual C++ Toolkit 2008 +! |msvc-2008-express|, the produced binary runs on most MS-Windows systems. If +! you need the executable to run on Windows 98 or ME, use the 2003 one +! |msvc-2003-toolkit|. + + + 1. Microsoft Visual C++ +*************** +*** 176,182 **** + http://www.microsoft.com/express/vc/Default.aspx + This includes the IDE and the debugger. + +! To set the environment execute the msvc2008.bat script. You can then build + Vim with Make_mvc.mak. + + +--- 177,183 ---- + http://www.microsoft.com/express/vc/Default.aspx + This includes the IDE and the debugger. + +! To set the environment execute the msvc2010.bat script. You can then build + Vim with Make_mvc.mak. + + +*** ../mercurial/vim73/Filelist 2011-05-19 13:40:47.000000000 +0200 +--- Filelist 2011-06-09 05:17:25.000000000 +0200 +*************** +*** 262,267 **** +--- 262,268 ---- + src/bigvim.bat \ + src/msvcsetup.bat \ + src/msvc2008.bat \ ++ src/msvc2010.bat \ + src/dimm.idl \ + src/dlldata.c \ + src/dosinst.c \ +*** ../vim-7.3.208/src/version.c 2011-06-12 20:33:30.000000000 +0200 +--- src/version.c 2011-06-12 20:34:44.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 209, + /**/ + +-- +"Hit any key to continue" is a lie. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 642e85ac7fc79a9f970e5607d588936022ae7ba3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:22 +0200 Subject: [PATCH 0384/3803] - patchlevel 210 --- 7.3.210 | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 7.3.210 diff --git a/7.3.210 b/7.3.210 new file mode 100644 index 00000000..f02fe6fe --- /dev/null +++ b/7.3.210 @@ -0,0 +1,182 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.210 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.210 +Problem: Can't always find the file when using cscope. +Solution: Add the 'cscoperelative' option. (Raghavendra D Prabhu) +Files: runtime/doc/if_cscop.txt, runtime/doc/options.txt, + src/if_cscope.c, src/options.c, src/options.h + + +*** ../mercurial/vim73/runtime/doc/if_cscop.txt 2010-09-30 21:38:08.000000000 +0200 +--- runtime/doc/if_cscop.txt 2011-06-12 19:54:26.000000000 +0200 +*************** +*** 271,276 **** +--- 271,285 ---- + :set cst + :set nocst + < ++ *cscoperelative* *csre* ++ If 'cscoperelative' set, then in absence of a prefix given to cscope (prefx ++ is the argument to -P option of cscope), basename of cscope.out location ++ (usually the project root directory) will be used as the prefix to construt ++ absolute path.The default is off. Note: This option is only effective when ++ cscope (cscopeprg) is initialized without a prefix path (-P). Examples: > ++ :set csre ++ :set nocsre ++ < + *cscopetagorder* *csto* + The value of 'csto' determines the order in which |:cstag| performs a search. + If 'csto' is set to zero, cscope database(s) are searched first, followed +*** ../mercurial/vim73/runtime/doc/options.txt 2011-05-19 12:22:41.000000000 +0200 +--- runtime/doc/options.txt 2011-06-12 20:00:10.000000000 +0200 +*************** +*** 2209,2214 **** +--- 2209,2224 ---- + Specifies whether to use quickfix window to show cscope results. + See |cscopequickfix|. + ++ *'cscoperelative'* *'csre'* ++ 'cscoperelative' 'csre' boolean (default off) ++ global ++ {not available when compiled without the |+cscope| ++ feature} ++ {not in Vi} ++ In the absence of a prefix (-P) for cscope. setting this option enables ++ to use the basename of cscope.out path as the prefix. ++ See |cscoperelative|. ++ + *'cscopetag'* *'cst'* *'nocscopetag'* *'nocst'* + 'cscopetag' 'cst' boolean (default off) + global +*** ../mercurial/vim73/src/if_cscope.c 2011-05-05 16:41:19.000000000 +0200 +--- src/if_cscope.c 2011-06-12 20:25:17.000000000 +0200 +*************** +*** 2471,2512 **** + */ + static char * + cs_resolve_file(i, name) +! int i; + char *name; + { +! char *fullname; +! int len; + + /* +! * ppath is freed when we destroy the cscope connection. +! * fullname is freed after cs_make_vim_style_matches, after it's been +! * copied into the tag buffer used by vim + */ + len = (int)(strlen(name) + 2); + if (csinfo[i].ppath != NULL) + len += (int)strlen(csinfo[i].ppath); + + if ((fullname = (char *)alloc(len)) == NULL) + return NULL; + +! /* +! * note/example: this won't work if the cscope output already starts + * "../.." and the prefix path is also "../..". if something like this +! * happens, you are screwed up and need to fix how you're using cscope. +! */ +! if (csinfo[i].ppath != NULL && +! (strncmp(name, csinfo[i].ppath, strlen(csinfo[i].ppath)) != 0) && +! (name[0] != '/') + #ifdef WIN32 +! && name[0] != '\\' && name[1] != ':' + #endif +! ) + (void)sprintf(fullname, "%s/%s", csinfo[i].ppath, name); + else + (void)sprintf(fullname, "%s", name); + + return fullname; +! } /* cs_resolve_file */ + + + /* +--- 2471,2531 ---- + */ + static char * + cs_resolve_file(i, name) +! int i; + char *name; + { +! char *fullname; +! int len; +! char_u *csdir = NULL; + + /* +! * Ppath is freed when we destroy the cscope connection. +! * Fullname is freed after cs_make_vim_style_matches, after it's been +! * copied into the tag buffer used by Vim. + */ + len = (int)(strlen(name) + 2); + if (csinfo[i].ppath != NULL) + len += (int)strlen(csinfo[i].ppath); ++ else if (p_csre && csinfo[i].fname != NULL) ++ { ++ /* If 'cscoperelative' is set and ppath is not set, use cscope.out ++ * path in path resolution. */ ++ csdir = alloc(MAXPATHL); ++ if (csdir != NULL) ++ { ++ vim_strncpy(csdir, (char_u *)csinfo[i].fname, ++ gettail((char_u *)csinfo[i].fname) - 1 - (char_u *)csinfo[i].fname); ++ len += (int)STRLEN(csdir); ++ } ++ } + + if ((fullname = (char *)alloc(len)) == NULL) + return NULL; + +! /* Note/example: this won't work if the cscope output already starts + * "../.." and the prefix path is also "../..". if something like this +! * happens, you are screwed up and need to fix how you're using cscope. */ +! if (csinfo[i].ppath != NULL +! && (strncmp(name, csinfo[i].ppath, strlen(csinfo[i].ppath)) != 0) +! && (name[0] != '/') + #ifdef WIN32 +! && name[0] != '\\' && name[1] != ':' + #endif +! ) + (void)sprintf(fullname, "%s/%s", csinfo[i].ppath, name); ++ else if (csdir != NULL && csinfo[i].fname != NULL && STRLEN(csdir) > 0) ++ { ++ /* Check for csdir to be non empty to avoid empty path concatenated to ++ * cscope output. TODO: avoid the unnecessary alloc/free of fullname. */ ++ vim_free(fullname); ++ fullname = concat_fnames(csdir, (char_u *)name, TRUE); ++ } + else + (void)sprintf(fullname, "%s", name); + ++ vim_free(csdir); + return fullname; +! } + + + /* +*** ../vim-7.3.209/src/version.c 2011-06-12 20:36:00.000000000 +0200 +--- src/version.c 2011-06-12 20:37:48.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 210, + /**/ + +-- +Apathy Error: Don't bother striking any key. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b5e4d73cf514527d8a43cc45bc3c3143c4702f09 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:23 +0200 Subject: [PATCH 0385/3803] - patchlevel 211 --- 7.3.211 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 7.3.211 diff --git a/7.3.211 b/7.3.211 new file mode 100644 index 00000000..4760c106 --- /dev/null +++ b/7.3.211 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.211 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.211 (after 7.3.210) +Problem: Compiler warning. +Solution: Add type cast. +Files: src/if_cscope.c + + +*** ../mercurial/vim73/src/if_cscope.c 2011-06-12 20:42:17.000000000 +0200 +--- src/if_cscope.c 2011-06-12 21:22:53.000000000 +0200 +*************** +*** 2518,2524 **** + /* Check for csdir to be non empty to avoid empty path concatenated to + * cscope output. TODO: avoid the unnecessary alloc/free of fullname. */ + vim_free(fullname); +! fullname = concat_fnames(csdir, (char_u *)name, TRUE); + } + else + (void)sprintf(fullname, "%s", name); +--- 2518,2524 ---- + /* Check for csdir to be non empty to avoid empty path concatenated to + * cscope output. TODO: avoid the unnecessary alloc/free of fullname. */ + vim_free(fullname); +! fullname = (char *)concat_fnames(csdir, (char_u *)name, TRUE); + } + else + (void)sprintf(fullname, "%s", name); +*** ../vim-7.3.210/src/version.c 2011-06-12 20:42:17.000000000 +0200 +--- src/version.c 2011-06-12 21:24:03.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 211, + /**/ + +-- +Did you ever see a "Hit any key to continue" message in a music piece? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 758ac3ba126eb3691ee9187e129cc094aa9c6580 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:23 +0200 Subject: [PATCH 0386/3803] - patchlevel 212 --- 7.3.212 | 243 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 7.3.212 diff --git a/7.3.212 b/7.3.212 new file mode 100644 index 00000000..d5086db0 --- /dev/null +++ b/7.3.212 @@ -0,0 +1,243 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.212 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.212 +Problem: With Python 3.2 ":py3" fails. +Solution: Move PyEval_InitThreads() to after Py_Initialize(). (Roland + Puntaier) Check abiflags in configure. (Andreas Behr) +Files: src/if_python3.c, src/auto/configure, src/configure.in + + +*** ../mercurial/vim73/src/if_python3.c 2011-02-25 15:18:46.000000000 +0100 +--- src/if_python3.c 2011-06-11 04:24:49.000000000 +0200 +*************** +*** 547,560 **** + Py_SetPythonHome(PYTHON3_HOME); + #endif + +- /* initialise threads */ +- PyEval_InitThreads(); +- + #if !defined(MACOS) || defined(MACOS_X_UNIX) + Py_Initialize(); + #else + PyMac_Initialize(); + #endif + + #ifdef DYNAMIC_PYTHON3 + get_py3_exceptions(); +--- 547,559 ---- + Py_SetPythonHome(PYTHON3_HOME); + #endif + + #if !defined(MACOS) || defined(MACOS_X_UNIX) + Py_Initialize(); + #else + PyMac_Initialize(); + #endif ++ /* initialise threads, must be after Py_Initialize() */ ++ PyEval_InitThreads(); + + #ifdef DYNAMIC_PYTHON3 + get_py3_exceptions(); +*** ../mercurial/vim73/src/auto/configure 2011-05-10 15:41:59.000000000 +0200 +--- src/auto/configure 2011-06-12 21:33:16.000000000 +0200 +*************** +*** 5505,5510 **** +--- 5505,5527 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5 + $as_echo "$vi_cv_var_python3_version" >&6; } + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5 ++ $as_echo_n "checking Python's abiflags... " >&6; } ++ if test "${vi_cv_var_python3_abiflags+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++ else ++ ++ vi_cv_var_python3_abiflags= ++ if ${vi_cv_path_python3} -c \ ++ "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)" ++ then ++ vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \ ++ "import sys; print(sys.abiflags)"` ++ fi ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5 ++ $as_echo "$vi_cv_var_python3_abiflags" >&6; } ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5 + $as_echo_n "checking Python's install prefix... " >&6; } + if test "${vi_cv_path_python3_pfx+set}" = set; then : +*************** +*** 5555,5563 **** + else + + vi_cv_path_python3_conf= + for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do + for subdir in lib64 lib share; do +! d="${path}/${subdir}/python${vi_cv_var_python3_version}/config" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python3_conf="$d" + fi +--- 5572,5584 ---- + else + + vi_cv_path_python3_conf= ++ config_dir="config" ++ if test "${vi_cv_var_python3_abiflags}" != ""; then ++ config_dir="${config_dir}-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" ++ fi + for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do + for subdir in lib64 lib share; do +! d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python3_conf="$d" + fi +*************** +*** 5592,5598 **** + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" + vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}" +! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS} ${python3_LINKFORSHARED}" + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` + +--- 5613,5619 ---- + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" + vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}" +! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` + +*************** +*** 5601,5609 **** + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + if test "x$MACOSX" = "xyes"; then +--- 5622,5630 ---- + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + if test "x$MACOSX" = "xyes"; then +*** ../mercurial/vim73/src/configure.in 2011-05-10 15:41:59.000000000 +0200 +--- src/configure.in 2011-06-12 21:31:18.000000000 +0200 +*************** +*** 992,997 **** +--- 992,1008 ---- + ${vi_cv_path_python3} -c 'import sys; print(sys.version[:3])'` + ]]) + ++ dnl -- get abiflags for python 3.2 or higher (PEP 3149) ++ AC_CACHE_CHECK(Python's abiflags,vi_cv_var_python3_abiflags, ++ [ ++ vi_cv_var_python3_abiflags= ++ if ${vi_cv_path_python3} -c \ ++ "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)" ++ then ++ vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \ ++ "import sys; print(sys.abiflags)"` ++ fi ]) ++ + dnl -- find where python3 thinks it was installed + AC_CACHE_CHECK(Python's install prefix,vi_cv_path_python3_pfx, + [ vi_cv_path_python3_pfx=` +*************** +*** 1021,1029 **** + AC_CACHE_CHECK(Python's configuration directory,vi_cv_path_python3_conf, + [ + vi_cv_path_python3_conf= + for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do + for subdir in lib64 lib share; do +! d="${path}/${subdir}/python${vi_cv_var_python3_version}/config" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python3_conf="$d" + fi +--- 1032,1044 ---- + AC_CACHE_CHECK(Python's configuration directory,vi_cv_path_python3_conf, + [ + vi_cv_path_python3_conf= ++ config_dir="config" ++ if test "${vi_cv_var_python3_abiflags}" != ""; then ++ config_dir="${config_dir}-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" ++ fi + for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do + for subdir in lib64 lib share; do +! d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python3_conf="$d" + fi +*************** +*** 1055,1061 **** + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" + vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}" +! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS} ${python3_LINKFORSHARED}" + dnl remove -ltermcap, it can conflict with an earlier -lncurses + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` +--- 1070,1076 ---- + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" + vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}" +! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" + dnl remove -ltermcap, it can conflict with an earlier -lncurses + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` +*************** +*** 1063,1071 **** + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +--- 1078,1086 ---- + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +*** ../vim-7.3.211/src/version.c 2011-06-12 21:24:56.000000000 +0200 +--- src/version.c 2011-06-12 21:35:31.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 212, + /**/ + +-- +In Joseph Heller's novel "Catch-22", the main character tries to get out of a +war by proving he is crazy. But the mere fact he wants to get out of the war +only shows he isn't crazy -- creating the original "Catch-22". + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b167e30bedbf2a46e034993417a24ecab4a957dc Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:23 +0200 Subject: [PATCH 0387/3803] - patchlevel 213 --- 7.3.213 | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 7.3.213 diff --git a/7.3.213 b/7.3.213 new file mode 100644 index 00000000..d3ef325e --- /dev/null +++ b/7.3.213 @@ -0,0 +1,142 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.213 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.213 +Problem: Javascript object literal is not indented correctly. +Solution: Make a special case for when "J1" is in 'cino'. (Luc Deschenaux) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../mercurial/vim73/src/misc1.c 2011-05-25 17:29:40.000000000 +0200 +--- src/misc1.c 2011-06-10 04:58:10.000000000 +0200 +*************** +*** 6965,6971 **** + * ldfd) { + * } + */ +! if ((ind_keep_case_label + && cin_iscase(skipwhite(ml_get_curline()), FALSE))) + amount = get_indent(); + else +--- 6965,6971 ---- + * ldfd) { + * } + */ +! if (ind_js || (ind_keep_case_label + && cin_iscase(skipwhite(ml_get_curline()), FALSE))) + amount = get_indent(); + else +*** ../mercurial/vim73/src/testdir/test3.in 2011-05-25 15:16:06.000000000 +0200 +--- src/testdir/test3.in 2011-06-12 21:44:12.000000000 +0200 +*************** +*** 1492,1501 **** + + STARTTEST + :set cino=N-s +! /namespaces + =/^NAMESPACEEND + ENDTEST + + /* valid namespaces with normal indent */ + namespace + { +--- 1492,1502 ---- + + STARTTEST + :set cino=N-s +! /^NAMESPACESTART + =/^NAMESPACEEND + ENDTEST + ++ NAMESPACESTART + /* valid namespaces with normal indent */ + namespace + { +*************** +*** 1561,1566 **** +--- 1562,1588 ---- + + + STARTTEST ++ :set cino=J1 ++ /^JSSTART ++ =/^JSEND ++ ENDTEST ++ ++ JSSTART ++ var bar = { ++ foo: { ++ that: this, ++ some: ok, ++ }, ++ "bar":{ ++ a : 2, ++ b: "123abc", ++ x: 4, ++ "y": 5 ++ } ++ } ++ JSEND ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../mercurial/vim73/src/testdir/test3.ok 2011-05-25 15:16:06.000000000 +0200 +--- src/testdir/test3.ok 2011-06-12 21:44:26.000000000 +0200 +*************** +*** 1337,1342 **** +--- 1337,1343 ---- + } + + ++ NAMESPACESTART + /* valid namespaces with normal indent */ + namespace + { +*************** +*** 1401,1403 **** +--- 1402,1420 ---- + NAMESPACEEND + + ++ ++ JSSTART ++ var bar = { ++ foo: { ++ that: this, ++ some: ok, ++ }, ++ "bar":{ ++ a : 2, ++ b: "123abc", ++ x: 4, ++ "y": 5 ++ } ++ } ++ JSEND ++ +*** ../vim-7.3.212/src/version.c 2011-06-12 21:37:06.000000000 +0200 +--- src/version.c 2011-06-12 21:48:34.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 213, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +169. You hire a housekeeper for your home page. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 65ccf3ba7d085d3ca9a8918469dea419d929aa6c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:23 +0200 Subject: [PATCH 0388/3803] - patchlevel 214 --- 7.3.214 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 7.3.214 diff --git a/7.3.214 b/7.3.214 new file mode 100644 index 00000000..a095bbc4 --- /dev/null +++ b/7.3.214 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.214 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.214 +Problem: The text displayed by ":z-" isn't exactly like old Vi. +Solution: Add one to the start line number. (ChangZhuo Chen) +Files: src/ex_cmds.c + + +*** ../mercurial/vim73/src/ex_cmds.c 2011-05-19 14:30:07.000000000 +0200 +--- src/ex_cmds.c 2011-05-19 14:23:33.000000000 +0200 +*************** +*** 4097,4104 **** + switch (*kind) + { + case '-': +! start = lnum - bigness * (linenr_T)(x - kind); +! end = start + bigness; + curs = end; + break; + +--- 4097,4104 ---- + switch (*kind) + { + case '-': +! start = lnum - bigness * (linenr_T)(x - kind) + 1; +! end = start + bigness - 1; + curs = end; + break; + +*** ../vim-7.3.213/src/version.c 2011-06-12 21:51:01.000000000 +0200 +--- src/version.c 2011-06-12 22:02:20.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 214, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +170. You introduce your wife as "my_lady@home.wife" and refer to your + children as "forked processes." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5f48de8547ccb20c18c5d9afcc958c939ed1c6f8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:24 +0200 Subject: [PATCH 0389/3803] - patchlevel 215 --- 7.3.215 | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 7.3.215 diff --git a/7.3.215 b/7.3.215 new file mode 100644 index 00000000..24d37fbf --- /dev/null +++ b/7.3.215 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.215 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.215 (after 7.3.210) +Problem: Wrong file names in previous patch. (Toothpik) +Solution: Include the option changes. +Files: src/option.c, src/option.h + + +*** ../mercurial/vim73/src/option.c 2011-05-19 13:40:47.000000000 +0200 +--- src/option.c 2011-06-12 19:58:17.000000000 +0200 +*************** +*** 901,906 **** +--- 901,913 ---- + {(char_u *)0L, (char_u *)0L} + #endif + SCRIPTID_INIT}, ++ {"cscoperelative", "csre", P_BOOL|P_VI_DEF|P_VIM, ++ #ifdef FEAT_CSCOPE ++ (char_u *)&p_csre, PV_NONE, ++ #else ++ (char_u *)NULL, PV_NONE, ++ #endif ++ {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"cscopetag", "cst", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_CSCOPE + (char_u *)&p_cst, PV_NONE, +*** ../mercurial/vim73/src/option.h 2011-05-19 13:40:47.000000000 +0200 +--- src/option.h 2011-06-12 19:58:49.000000000 +0200 +*************** +*** 391,396 **** +--- 391,397 ---- + EXTERN char_u *p_cpo; /* 'cpoptions' */ + #ifdef FEAT_CSCOPE + EXTERN char_u *p_csprg; /* 'cscopeprg' */ ++ EXTERN int p_csre; /* 'cscoperelative' */ + # ifdef FEAT_QUICKFIX + EXTERN char_u *p_csqf; /* 'cscopequickfix' */ + # define CSQF_CMDS "sgdctefi" +*** ../vim-7.3.214/src/version.c 2011-06-12 22:03:15.000000000 +0200 +--- src/version.c 2011-06-12 22:12:34.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 215, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +171. You invent another person and chat with yourself in empty chat rooms. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f723aae97249d6e1cbbf27bac5704a39c93e989a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:24 +0200 Subject: [PATCH 0390/3803] - patchlevel 216 --- 7.3.216 | 263 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 263 insertions(+) create mode 100644 7.3.216 diff --git a/7.3.216 b/7.3.216 new file mode 100644 index 00000000..a52bc936 --- /dev/null +++ b/7.3.216 @@ -0,0 +1,263 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.216 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.216 +Problem: When recovering a file a range of lines is missing. (Charles Jie) +Solution: Reset the index when advancing to the next pointer block. Add a + test to verify recovery works. +Files: src/memline.c, src/testdir/test78.in, src/testdir/test78.ok, + src/testdir/Makefile, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + + +*** ../mercurial/vim73/src/memline.c 2011-05-10 16:41:13.000000000 +0200 +--- src/memline.c 2011-06-13 00:56:09.000000000 +0200 +*************** +*** 1507,1512 **** +--- 1507,1513 ---- + bnum = pp->pb_pointer[idx].pe_bnum; + line_count = pp->pb_pointer[idx].pe_line_count; + page_count = pp->pb_pointer[idx].pe_page_count; ++ idx = 0; + continue; + } + } +*** ../mercurial/vim73/src/testdir/test78.in 2011-06-13 01:05:54.000000000 +0200 +--- src/testdir/test78.in 2011-06-13 00:54:48.000000000 +0200 +*************** +*** 0 **** +--- 1,46 ---- ++ Inserts 10000 lines with text to fill the swap file with two levels of pointer ++ blocks. Then recovers from the swap file and checks all text is restored. ++ ++ We need about 10000 lines of 100 characters to get two levels of pointer ++ blocks. ++ ++ STARTTEST ++ :so small.vim ++ :set nocp fileformat=unix undolevels=-1 ++ :e! Xtest ++ ggdG ++ :let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789" ++ :let i = 1 ++ :let linecount = 10000 ++ :while i <= linecount | call append(i - 1, i . text) | let i += 1 | endwhile ++ :preserve ++ :" get the name of the swap file ++ :redir => swapname ++ :swapname ++ :redir END ++ :let swapname = substitute(swapname, '[[:blank:][:cntrl:]]*\(.\{-}\)[[:blank:][:cntrl:]]*$', '\1', '') ++ :" make a copy of the swap file in Xswap ++ :set bin ++ :exe 'sp ' . swapname ++ :w! Xswap ++ :echo swapname ++ :set nobin ++ :new ++ :only! ++ :bwipe! Xtest ++ :call rename('Xswap', swapname) ++ :recover Xtest ++ :call delete(swapname) ++ :new ++ :call append(0, 'recovery start') ++ :wincmd w ++ :let linedollar = line('$') ++ :if linedollar < linecount | exe 'wincmd w' | call append(line('$'), "expected " . linecount . " lines but found only " . linedollar) | exe 'wincmd w' | let linecount = linedollar | endif ++ :let i = 1 ++ :while i <= linecount | if getline(i) != i . text | exe 'wincmd w' | call append(line('$'), i . ' differs') | exe 'wincmd w' | endif | let i += 1 | endwhile ++ :q! ++ :call append(line('$'), 'recovery end') ++ :w! test.out ++ :qa! ++ ENDTEST ++ +*** ../mercurial/vim73/src/testdir/test78.ok 2011-06-13 01:05:54.000000000 +0200 +--- src/testdir/test78.ok 2011-06-13 00:25:05.000000000 +0200 +*************** +*** 0 **** +--- 1,3 ---- ++ recovery start ++ ++ recovery end +*** ../mercurial/vim73/src/testdir/Makefile 2011-03-22 18:10:34.000000000 +0100 +--- src/testdir/Makefile 2011-06-13 00:35:46.000000000 +0200 +*************** +*** 25,31 **** + test59.out test60.out test61.out test62.out test63.out \ + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out + + SCRIPTS_GUI = test16.out + +--- 25,31 ---- + test59.out test60.out test61.out test62.out test63.out \ + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out test78.out + + SCRIPTS_GUI = test16.out + +*************** +*** 71,77 **** + fi \ + else echo $* NO OUTPUT >>test.log; \ + fi" +! # -rm -rf X* test.ok viminfo + + test49.out: test49.vim + +--- 71,77 ---- + fi \ + else echo $* NO OUTPUT >>test.log; \ + fi" +! -rm -rf X* test.ok viminfo + + test49.out: test49.vim + +*** ../mercurial/vim73/src/testdir/Make_amiga.mak 2011-03-22 18:10:34.000000000 +0100 +--- src/testdir/Make_amiga.mak 2011-06-13 01:00:42.000000000 +0200 +*************** +*** 28,34 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out + + .SUFFIXES: .in .out + +--- 28,34 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out test78.out + + .SUFFIXES: .in .out + +*************** +*** 125,127 **** +--- 125,128 ---- + test75.out: test75.in + test76.out: test76.in + test77.out: test77.in ++ test78.out: test78.in +*** ../mercurial/vim73/src/testdir/Make_dos.mak 2011-03-22 18:10:34.000000000 +0100 +--- src/testdir/Make_dos.mak 2011-06-13 01:00:55.000000000 +0200 +*************** +*** 28,34 **** + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out + + SCRIPTS32 = test50.out test70.out + +--- 28,34 ---- + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out test78.out + + SCRIPTS32 = test50.out test70.out + +*** ../mercurial/vim73/src/testdir/Make_ming.mak 2011-03-22 18:10:34.000000000 +0100 +--- src/testdir/Make_ming.mak 2011-06-13 01:01:02.000000000 +0200 +*************** +*** 48,54 **** + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out + + SCRIPTS32 = test50.out test70.out + +--- 48,54 ---- + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out test78.out + + SCRIPTS32 = test50.out test70.out + +*** ../mercurial/vim73/src/testdir/Make_os2.mak 2011-03-22 18:10:34.000000000 +0100 +--- src/testdir/Make_os2.mak 2011-06-13 01:01:08.000000000 +0200 +*************** +*** 28,34 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out + + .SUFFIXES: .in .out + +--- 28,34 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out test78.out + + .SUFFIXES: .in .out + +*** ../mercurial/vim73/src/testdir/Make_vms.mms 2011-04-28 19:05:01.000000000 +0200 +--- src/testdir/Make_vms.mms 2011-06-13 01:01:29.000000000 +0200 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Mar 03 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Jun 13 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +*************** +*** 75,81 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ + test71.out test72.out test74.out test75.out test76.out \ +! test77.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 75,81 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ + test71.out test72.out test74.out test75.out test76.out \ +! test77.out test78.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.3.215/src/version.c 2011-06-12 22:13:37.000000000 +0200 +--- src/version.c 2011-06-13 00:59:02.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 216, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +172. You join listservers just for the extra e-mail. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 3421fa6342e36d734b7344b810f27a38e6012a5f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:24 +0200 Subject: [PATCH 0391/3803] - patchlevel 217 --- 7.3.217 | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 7.3.217 diff --git a/7.3.217 b/7.3.217 new file mode 100644 index 00000000..be04b863 --- /dev/null +++ b/7.3.217 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.217 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.217 +Problem: Inside an "if" a ":wincmd" causes problems. +Solution: When skipping commands let ":wincmd" skip over its argument. +Files: src/ex_docmd.c + + +*** ../mercurial/vim73/src/ex_docmd.c 2011-05-25 12:51:17.000000000 +0200 +--- src/ex_docmd.c 2011-06-13 01:15:17.000000000 +0200 +*************** +*** 2595,2600 **** +--- 2595,2601 ---- + case CMD_unlet: + case CMD_verbose: + case CMD_vertical: ++ case CMD_wincmd: + break; + + default: goto doend; +*************** +*** 8237,8243 **** + p = skipwhite(p); + if (*p != NUL && *p != '"' && eap->nextcmd == NULL) + EMSG(_(e_invarg)); +! else + { + /* Pass flags on for ":vertical wincmd ]". */ + postponed_split_flags = cmdmod.split; +--- 8238,8244 ---- + p = skipwhite(p); + if (*p != NUL && *p != '"' && eap->nextcmd == NULL) + EMSG(_(e_invarg)); +! else if (!eap->skip) + { + /* Pass flags on for ":vertical wincmd ]". */ + postponed_split_flags = cmdmod.split; +*** ../vim-7.3.216/src/version.c 2011-06-13 01:07:22.000000000 +0200 +--- src/version.c 2011-06-13 01:18:48.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 217, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +173. You keep tracking down the email addresses of all your friends + (even childhood friends). + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a54646418513150d2ffa15a5428e5ede0bfc080d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:25 +0200 Subject: [PATCH 0392/3803] - patchlevel 218 --- 7.3.218 | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 7.3.218 diff --git a/7.3.218 b/7.3.218 new file mode 100644 index 00000000..1da18d81 --- /dev/null +++ b/7.3.218 @@ -0,0 +1,91 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.218 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.218 (after 7.3.212) +Problem: Tiny configuration problem with Python 3. +Solution: Add abiflags in one more place. (Andreas Behr) +Files: src/auto/configure, src/configure.in + + +*** ../mercurial/vim73/src/auto/configure 2011-06-12 21:37:06.000000000 +0200 +--- src/auto/configure 2011-06-13 01:26:50.000000000 +0200 +*************** +*** 5607,5613 **** + @echo "python3_BASEMODLIBS='$(BASEMODLIBS)'" + @echo "python3_LIBS='$(LIBS)'" + @echo "python3_SYSLIBS='$(SYSLIBS)'" +- @echo "python3_LINKFORSHARED='$(LINKFORSHARED)'" + @echo "python3_INSTSONAME='$(INSTSONAME)'" + eof + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" +--- 5607,5612 ---- +*************** +*** 5624,5630 **** + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then + PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + if test "x$MACOSX" = "xyes"; then +--- 5623,5629 ---- + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then + PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + if test "x$MACOSX" = "xyes"; then +*** ../mercurial/vim73/src/configure.in 2011-06-12 21:37:06.000000000 +0200 +--- src/configure.in 2011-06-13 01:26:35.000000000 +0200 +*************** +*** 1063,1069 **** + @echo "python3_BASEMODLIBS='$(BASEMODLIBS)'" + @echo "python3_LIBS='$(LIBS)'" + @echo "python3_SYSLIBS='$(SYSLIBS)'" +- @echo "python3_LINKFORSHARED='$(LINKFORSHARED)'" + @echo "python3_INSTSONAME='$(INSTSONAME)'" + eof + dnl -- delete the lines from make about Entering/Leaving directory +--- 1063,1068 ---- +*************** +*** 1080,1086 **** + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then + PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +--- 1079,1085 ---- + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then + PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +*** ../vim-7.3.217/src/version.c 2011-06-13 01:19:48.000000000 +0200 +--- src/version.c 2011-06-13 01:29:42.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 218, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +174. You know what a listserv is. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e76941173f92f2ebbb474d2bbc5d293b73375d9b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:25 +0200 Subject: [PATCH 0393/3803] - patchlevel 219 --- 7.3.219 | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 7.3.219 diff --git a/7.3.219 b/7.3.219 new file mode 100644 index 00000000..2ec11179 --- /dev/null +++ b/7.3.219 @@ -0,0 +1,92 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.219 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.219 +Problem: Can't compile with GTK on Mac. +Solution: Add some #ifdef trickery. (Ben Schmidt) +Files: src/os_mac_conv.c, src/os_macosx.m, src/vim.h + + +*** ../mercurial/vim73/src/os_mac_conv.c 2010-08-16 21:23:30.000000000 +0200 +--- src/os_mac_conv.c 2011-06-13 01:55:17.000000000 +0200 +*************** +*** 14,19 **** +--- 14,21 ---- + */ + + #define NO_X11_INCLUDES ++ #define BalloonEval int /* used in header files */ ++ + #include "vim.h" + #ifndef FEAT_GUI_MAC + # include +*** ../mercurial/vim73/src/os_macosx.m 2010-10-10 17:08:28.000000000 +0200 +--- src/os_macosx.m 2011-06-13 01:58:47.000000000 +0200 +*************** +*** 18,23 **** +--- 18,24 ---- + /* Avoid a conflict for the definition of Boolean between Mac header files and + * X11 header files. */ + #define NO_X11_INCLUDES ++ #define BalloonEval int /* used in header files */ + + #include "vim.h" + #import +*************** +*** 27,35 **** + * Clipboard support for the console. + * Don't include this when building the GUI version, the functions in + * gui_mac.c are used then. TODO: remove those instead? +! * But for MacVim we need these ones. + */ +! #if defined(FEAT_CLIPBOARD) && (!defined(FEAT_GUI) || defined(FEAT_GUI_MACVIM)) + + /* Used to identify clipboard data copied from Vim. */ + +--- 28,36 ---- + * Clipboard support for the console. + * Don't include this when building the GUI version, the functions in + * gui_mac.c are used then. TODO: remove those instead? +! * But for MacVim we do need these ones. + */ +! #if defined(FEAT_CLIPBOARD) && (!defined(FEAT_GUI_ENABLED) || defined(FEAT_GUI_MACVIM)) + + /* Used to identify clipboard data copied from Vim. */ + +*** ../mercurial/vim73/src/vim.h 2011-05-19 18:26:34.000000000 +0200 +--- src/vim.h 2011-06-13 01:57:17.000000000 +0200 +*************** +*** 121,126 **** +--- 121,127 ---- + || defined(FEAT_GUI_W32) \ + || defined(FEAT_GUI_W16) \ + || defined(FEAT_GUI_PHOTON) ++ # define FEAT_GUI_ENABLED /* also defined with NO_X11_INCLUDES */ + # if !defined(FEAT_GUI) && !defined(NO_X11_INCLUDES) + # define FEAT_GUI + # endif +*** ../vim-7.3.218/src/version.c 2011-06-13 01:32:42.000000000 +0200 +--- src/version.c 2011-06-13 02:03:02.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 219, + /**/ + +-- +If Microsoft would build a car... +... the oil, water temperature, and alternator warning lights would +all be replaced by a single "General Protection Fault" warning light. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 52178955b720e485518e798b22a2855eefc6ece2 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:25 +0200 Subject: [PATCH 0394/3803] - patchlevel 220 --- 7.3.220 | 1230 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1230 insertions(+) create mode 100644 7.3.220 diff --git a/7.3.220 b/7.3.220 new file mode 100644 index 00000000..0122e7fc --- /dev/null +++ b/7.3.220 @@ -0,0 +1,1230 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.220 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.220 +Problem: Python 3: vim.error is a 'str' instead of an 'Exception' object, + so 'except' or 'raise' it causes a 'SystemError' exception. + Buffer objects do not support slice assignment. + When exchanging text between Vim and Python, multibyte texts become + gabage or cause Unicode Expceptions, etc. + 'py3file' tries to read in the file as Unicode, sometimes causes + UnicodeDecodeException +Solution: Fix the problems. (lilydjwg) +Files: src/if_py_both.h, src/if_python.c, src/if_python3.c + + +*** ../mercurial/vim73/src/if_py_both.h 2011-03-22 15:47:18.000000000 +0100 +--- src/if_py_both.h 2011-06-18 23:54:25.000000000 +0200 +*************** +*** 65,74 **** + OutputWrite(PyObject *self, PyObject *args) + { + int len; +! char *str; + int error = ((OutputObject *)(self))->error; + +! if (!PyArg_ParseTuple(args, "s#", &str, &len)) + return NULL; + + Py_BEGIN_ALLOW_THREADS +--- 65,74 ---- + OutputWrite(PyObject *self, PyObject *args) + { + int len; +! char *str = NULL; + int error = ((OutputObject *)(self))->error; + +! if (!PyArg_ParseTuple(args, "es#", p_enc, &str, &len)) + return NULL; + + Py_BEGIN_ALLOW_THREADS +*************** +*** 76,81 **** +--- 76,82 ---- + writer((writefn)(error ? emsg : msg), (char_u *)str, len); + Python_Release_Vim(); + Py_END_ALLOW_THREADS ++ PyMem_Free(str); + + Py_INCREF(Py_None); + return Py_None; +*************** +*** 104,113 **** + for (i = 0; i < n; ++i) + { + PyObject *line = PyList_GetItem(list, i); +! char *str; + PyInt len; + +! if (!PyArg_Parse(line, "s#", &str, &len)) { + PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings")); + Py_DECREF(list); + return NULL; +--- 105,114 ---- + for (i = 0; i < n; ++i) + { + PyObject *line = PyList_GetItem(list, i); +! char *str = NULL; + PyInt len; + +! if (!PyArg_Parse(line, "es#", p_enc, &str, &len)) { + PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings")); + Py_DECREF(list); + return NULL; +*************** +*** 118,123 **** +--- 119,125 ---- + writer((writefn)(error ? emsg : msg), (char_u *)str, len); + Python_Release_Vim(); + Py_END_ALLOW_THREADS ++ PyMem_Free(str); + } + + Py_DECREF(list); +*************** +*** 681,686 **** +--- 683,689 ---- + { + const char *str; + char *save; ++ PyObject *bytes; + PyInt len; + PyInt i; + char *p; +*************** +*** 691,698 **** + return NULL; + } + +! str = PyString_AsString(obj); +! len = PyString_Size(obj); + + /* + * Error checking: String must not contain newlines, as we +--- 694,702 ---- + return NULL; + } + +! bytes = PyString_AsBytes(obj); /* for Python 2 this does nothing */ +! str = PyString_AsString(bytes); +! len = PyString_Size(bytes); + + /* + * Error checking: String must not contain newlines, as we +*************** +*** 731,736 **** +--- 735,741 ---- + } + + save[i] = '\0'; ++ PyString_FreeBytes(bytes); /* Python 2 does nothing here */ + + return save; + } +*************** +*** 817,823 **** + invalidate_botline(); + } + +! /* Replace a line in the specified buffer. The line number is + * in Vim format (1-based). The replacement line is given as + * a Python string object. The object is checked for validity + * and correct format. Errors are returned as a value of FAIL. +--- 822,829 ---- + invalidate_botline(); + } + +! /* +! * Replace a line in the specified buffer. The line number is + * in Vim format (1-based). The replacement line is given as + * a Python string object. The object is checked for validity + * and correct format. Errors are returned as a value of FAIL. +*************** +*** 908,913 **** +--- 914,1106 ---- + } + } + ++ /* Replace a range of lines in the specified buffer. The line numbers are in ++ * Vim format (1-based). The range is from lo up to, but not including, hi. ++ * The replacement lines are given as a Python list of string objects. The ++ * list is checked for validity and correct format. Errors are returned as a ++ * value of FAIL. The return value is OK on success. ++ * If OK is returned and len_change is not NULL, *len_change ++ * is set to the change in the buffer length. ++ */ ++ static int ++ SetBufferLineList(buf_T *buf, PyInt lo, PyInt hi, PyObject *list, PyInt *len_change) ++ { ++ /* First of all, we check the thpe of the supplied Python object. ++ * There are three cases: ++ * 1. NULL, or None - this is a deletion. ++ * 2. A list - this is a replacement. ++ * 3. Anything else - this is an error. ++ */ ++ if (list == Py_None || list == NULL) ++ { ++ PyInt i; ++ PyInt n = (int)(hi - lo); ++ buf_T *savebuf = curbuf; ++ ++ PyErr_Clear(); ++ curbuf = buf; ++ ++ if (u_savedel((linenr_T)lo, (long)n) == FAIL) ++ PyErr_SetVim(_("cannot save undo information")); ++ else ++ { ++ for (i = 0; i < n; ++i) ++ { ++ if (ml_delete((linenr_T)lo, FALSE) == FAIL) ++ { ++ PyErr_SetVim(_("cannot delete line")); ++ break; ++ } ++ } ++ if (buf == curwin->w_buffer) ++ py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)-n); ++ deleted_lines_mark((linenr_T)lo, (long)i); ++ } ++ ++ curbuf = savebuf; ++ ++ if (PyErr_Occurred() || VimErrorCheck()) ++ return FAIL; ++ ++ if (len_change) ++ *len_change = -n; ++ ++ return OK; ++ } ++ else if (PyList_Check(list)) ++ { ++ PyInt i; ++ PyInt new_len = PyList_Size(list); ++ PyInt old_len = hi - lo; ++ PyInt extra = 0; /* lines added to text, can be negative */ ++ char **array; ++ buf_T *savebuf; ++ ++ if (new_len == 0) /* avoid allocating zero bytes */ ++ array = NULL; ++ else ++ { ++ array = (char **)alloc((unsigned)(new_len * sizeof(char *))); ++ if (array == NULL) ++ { ++ PyErr_NoMemory(); ++ return FAIL; ++ } ++ } ++ ++ for (i = 0; i < new_len; ++i) ++ { ++ PyObject *line = PyList_GetItem(list, i); ++ ++ array[i] = StringToLine(line); ++ if (array[i] == NULL) ++ { ++ while (i) ++ vim_free(array[--i]); ++ vim_free(array); ++ return FAIL; ++ } ++ } ++ ++ savebuf = curbuf; ++ ++ PyErr_Clear(); ++ curbuf = buf; ++ ++ if (u_save((linenr_T)(lo-1), (linenr_T)hi) == FAIL) ++ PyErr_SetVim(_("cannot save undo information")); ++ ++ /* If the size of the range is reducing (ie, new_len < old_len) we ++ * need to delete some old_len. We do this at the start, by ++ * repeatedly deleting line "lo". ++ */ ++ if (!PyErr_Occurred()) ++ { ++ for (i = 0; i < old_len - new_len; ++i) ++ if (ml_delete((linenr_T)lo, FALSE) == FAIL) ++ { ++ PyErr_SetVim(_("cannot delete line")); ++ break; ++ } ++ extra -= i; ++ } ++ ++ /* For as long as possible, replace the existing old_len with the ++ * new old_len. This is a more efficient operation, as it requires ++ * less memory allocation and freeing. ++ */ ++ if (!PyErr_Occurred()) ++ { ++ for (i = 0; i < old_len && i < new_len; ++i) ++ if (ml_replace((linenr_T)(lo+i), (char_u *)array[i], FALSE) ++ == FAIL) ++ { ++ PyErr_SetVim(_("cannot replace line")); ++ break; ++ } ++ } ++ else ++ i = 0; ++ ++ /* Now we may need to insert the remaining new old_len. If we do, we ++ * must free the strings as we finish with them (we can't pass the ++ * responsibility to vim in this case). ++ */ ++ if (!PyErr_Occurred()) ++ { ++ while (i < new_len) ++ { ++ if (ml_append((linenr_T)(lo + i - 1), ++ (char_u *)array[i], 0, FALSE) == FAIL) ++ { ++ PyErr_SetVim(_("cannot insert line")); ++ break; ++ } ++ vim_free(array[i]); ++ ++i; ++ ++extra; ++ } ++ } ++ ++ /* Free any left-over old_len, as a result of an error */ ++ while (i < new_len) ++ { ++ vim_free(array[i]); ++ ++i; ++ } ++ ++ /* Free the array of old_len. All of its contents have now ++ * been dealt with (either freed, or the responsibility passed ++ * to vim. ++ */ ++ vim_free(array); ++ ++ /* Adjust marks. Invalidate any which lie in the ++ * changed range, and move any in the remainder of the buffer. ++ */ ++ mark_adjust((linenr_T)lo, (linenr_T)(hi - 1), ++ (long)MAXLNUM, (long)extra); ++ changed_lines((linenr_T)lo, 0, (linenr_T)hi, (long)extra); ++ ++ if (buf == curwin->w_buffer) ++ py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)extra); ++ ++ curbuf = savebuf; ++ ++ if (PyErr_Occurred() || VimErrorCheck()) ++ return FAIL; ++ ++ if (len_change) ++ *len_change = new_len - old_len; ++ ++ return OK; ++ } ++ else ++ { ++ PyErr_BadArgument(); ++ return FAIL; ++ } ++ } + + /* Insert a number of lines into the specified buffer after the specifed line. + * The line number is in Vim format (1-based). The lines to be inserted are +*************** +*** 1108,1113 **** +--- 1301,1340 ---- + return -1; + + if (new_end) ++ *new_end = end + len_change; ++ ++ return 0; ++ } ++ ++ static PyInt ++ RBAsSlice(BufferObject *self, PyInt lo, PyInt hi, PyObject *val, PyInt start, PyInt end, PyInt *new_end) ++ { ++ PyInt size; ++ PyInt len_change; ++ ++ /* Self must be a valid buffer */ ++ if (CheckBuffer(self)) ++ return -1; ++ ++ /* Sort out the slice range */ ++ size = end - start + 1; ++ ++ if (lo < 0) ++ lo = 0; ++ else if (lo > size) ++ lo = size; ++ if (hi < 0) ++ hi = 0; ++ if (hi < lo) ++ hi = lo; ++ else if (hi > size) ++ hi = size; ++ ++ if (SetBufferLineList(self->buf, lo + start, hi + start, ++ val, &len_change) == FAIL) ++ return -1; ++ ++ if (new_end) + *new_end = end + len_change; + + return 0; +*** ../mercurial/vim73/src/if_python.c 2011-03-26 18:32:00.000000000 +0100 +--- src/if_python.c 2011-06-19 00:02:15.000000000 +0200 +*************** +*** 56,61 **** +--- 56,65 ---- + + static void init_structs(void); + ++ /* No-op conversion functions, use with care! */ ++ #define PyString_AsBytes(obj) (obj) ++ #define PyString_FreeBytes(obj) ++ + #if !defined(FEAT_PYTHON) && defined(PROTO) + /* Use this to be able to generate prototypes without python being used. */ + # define PyObject Py_ssize_t +*************** +*** 129,134 **** +--- 133,139 ---- + */ + # define PyArg_Parse dll_PyArg_Parse + # define PyArg_ParseTuple dll_PyArg_ParseTuple ++ # define PyMem_Free dll_PyMem_Free + # define PyDict_SetItemString dll_PyDict_SetItemString + # define PyErr_BadArgument dll_PyErr_BadArgument + # define PyErr_Clear dll_PyErr_Clear +*************** +*** 189,194 **** +--- 194,200 ---- + */ + static int(*dll_PyArg_Parse)(PyObject *, char *, ...); + static int(*dll_PyArg_ParseTuple)(PyObject *, char *, ...); ++ static int(*dll_PyMem_Free)(void *); + static int(*dll_PyDict_SetItemString)(PyObject *dp, char *key, PyObject *item); + static int(*dll_PyErr_BadArgument)(void); + static void(*dll_PyErr_Clear)(void); +*************** +*** 271,276 **** +--- 277,283 ---- + { + {"PyArg_Parse", (PYTHON_PROC*)&dll_PyArg_Parse}, + {"PyArg_ParseTuple", (PYTHON_PROC*)&dll_PyArg_ParseTuple}, ++ {"PyMem_Free", (PYTHON_PROC*)&dll_PyMem_Free}, + {"PyDict_SetItemString", (PYTHON_PROC*)&dll_PyDict_SetItemString}, + {"PyErr_BadArgument", (PYTHON_PROC*)&dll_PyErr_BadArgument}, + {"PyErr_Clear", (PYTHON_PROC*)&dll_PyErr_Clear}, +*************** +*** 833,876 **** + static PyObject *CurrentGetattr(PyObject *, char *); + static int CurrentSetattr(PyObject *, char *, PyObject *); + +- /* Common routines for buffers and line ranges +- * ------------------------------------------- +- */ +- +- static PyInt +- RBAssSlice(BufferObject *self, PyInt lo, PyInt hi, PyObject *val, PyInt start, PyInt end, PyInt *new_end) +- { +- PyInt size; +- PyInt len_change; +- +- /* Self must be a valid buffer */ +- if (CheckBuffer(self)) +- return -1; +- +- /* Sort out the slice range */ +- size = end - start + 1; +- +- if (lo < 0) +- lo = 0; +- else if (lo > size) +- lo = size; +- if (hi < 0) +- hi = 0; +- if (hi < lo) +- hi = lo; +- else if (hi > size) +- hi = size; +- +- if (SetBufferLineList(self->buf, lo + start, hi + start, +- val, &len_change) == FAIL) +- return -1; +- +- if (new_end) +- *new_end = end + len_change; +- +- return 0; +- } +- + static PySequenceMethods BufferAsSeq = { + (PyInquiry) BufferLength, /* sq_length, len(x) */ + (binaryfunc) 0, /* BufferConcat, */ /* sq_concat, x+y */ +--- 840,845 ---- +*************** +*** 1038,1044 **** + static PyInt + BufferAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val) + { +! return RBAssSlice((BufferObject *)(self), lo, hi, val, 1, + (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count, + NULL); + } +--- 1007,1013 ---- + static PyInt + BufferAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val) + { +! return RBAsSlice((BufferObject *)(self), lo, hi, val, 1, + (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count, + NULL); + } +*************** +*** 1088,1094 **** + static PyInt + RangeAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val) + { +! return RBAssSlice(((RangeObject *)(self))->buf, lo, hi, val, + ((RangeObject *)(self))->start, + ((RangeObject *)(self))->end, + &((RangeObject *)(self))->end); +--- 1057,1063 ---- + static PyInt + RangeAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val) + { +! return RBAsSlice(((RangeObject *)(self))->buf, lo, hi, val, + ((RangeObject *)(self))->start, + ((RangeObject *)(self))->end, + &((RangeObject *)(self))->end); +*************** +*** 1435,1628 **** + * 4. Utility functions for handling the interface between Vim and Python. + */ + +- /* Replace a range of lines in the specified buffer. The line numbers are in +- * Vim format (1-based). The range is from lo up to, but not including, hi. +- * The replacement lines are given as a Python list of string objects. The +- * list is checked for validity and correct format. Errors are returned as a +- * value of FAIL. The return value is OK on success. +- * If OK is returned and len_change is not NULL, *len_change +- * is set to the change in the buffer length. +- */ +- static int +- SetBufferLineList(buf_T *buf, PyInt lo, PyInt hi, PyObject *list, PyInt *len_change) +- { +- /* First of all, we check the thpe of the supplied Python object. +- * There are three cases: +- * 1. NULL, or None - this is a deletion. +- * 2. A list - this is a replacement. +- * 3. Anything else - this is an error. +- */ +- if (list == Py_None || list == NULL) +- { +- PyInt i; +- PyInt n = (int)(hi - lo); +- buf_T *savebuf = curbuf; +- +- PyErr_Clear(); +- curbuf = buf; +- +- if (u_savedel((linenr_T)lo, (long)n) == FAIL) +- PyErr_SetVim(_("cannot save undo information")); +- else +- { +- for (i = 0; i < n; ++i) +- { +- if (ml_delete((linenr_T)lo, FALSE) == FAIL) +- { +- PyErr_SetVim(_("cannot delete line")); +- break; +- } +- } +- if (buf == curwin->w_buffer) +- py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)-n); +- deleted_lines_mark((linenr_T)lo, (long)i); +- } +- +- curbuf = savebuf; +- +- if (PyErr_Occurred() || VimErrorCheck()) +- return FAIL; +- +- if (len_change) +- *len_change = -n; +- +- return OK; +- } +- else if (PyList_Check(list)) +- { +- PyInt i; +- PyInt new_len = PyList_Size(list); +- PyInt old_len = hi - lo; +- PyInt extra = 0; /* lines added to text, can be negative */ +- char **array; +- buf_T *savebuf; +- +- if (new_len == 0) /* avoid allocating zero bytes */ +- array = NULL; +- else +- { +- array = (char **)alloc((unsigned)(new_len * sizeof(char *))); +- if (array == NULL) +- { +- PyErr_NoMemory(); +- return FAIL; +- } +- } +- +- for (i = 0; i < new_len; ++i) +- { +- PyObject *line = PyList_GetItem(list, i); +- +- array[i] = StringToLine(line); +- if (array[i] == NULL) +- { +- while (i) +- vim_free(array[--i]); +- vim_free(array); +- return FAIL; +- } +- } +- +- savebuf = curbuf; +- +- PyErr_Clear(); +- curbuf = buf; +- +- if (u_save((linenr_T)(lo-1), (linenr_T)hi) == FAIL) +- PyErr_SetVim(_("cannot save undo information")); +- +- /* If the size of the range is reducing (ie, new_len < old_len) we +- * need to delete some old_len. We do this at the start, by +- * repeatedly deleting line "lo". +- */ +- if (!PyErr_Occurred()) +- { +- for (i = 0; i < old_len - new_len; ++i) +- if (ml_delete((linenr_T)lo, FALSE) == FAIL) +- { +- PyErr_SetVim(_("cannot delete line")); +- break; +- } +- extra -= i; +- } +- +- /* For as long as possible, replace the existing old_len with the +- * new old_len. This is a more efficient operation, as it requires +- * less memory allocation and freeing. +- */ +- if (!PyErr_Occurred()) +- { +- for (i = 0; i < old_len && i < new_len; ++i) +- if (ml_replace((linenr_T)(lo+i), (char_u *)array[i], FALSE) +- == FAIL) +- { +- PyErr_SetVim(_("cannot replace line")); +- break; +- } +- } +- else +- i = 0; +- +- /* Now we may need to insert the remaining new old_len. If we do, we +- * must free the strings as we finish with them (we can't pass the +- * responsibility to vim in this case). +- */ +- if (!PyErr_Occurred()) +- { +- while (i < new_len) +- { +- if (ml_append((linenr_T)(lo + i - 1), +- (char_u *)array[i], 0, FALSE) == FAIL) +- { +- PyErr_SetVim(_("cannot insert line")); +- break; +- } +- vim_free(array[i]); +- ++i; +- ++extra; +- } +- } +- +- /* Free any left-over old_len, as a result of an error */ +- while (i < new_len) +- { +- vim_free(array[i]); +- ++i; +- } +- +- /* Free the array of old_len. All of its contents have now +- * been dealt with (either freed, or the responsibility passed +- * to vim. +- */ +- vim_free(array); +- +- /* Adjust marks. Invalidate any which lie in the +- * changed range, and move any in the remainder of the buffer. +- */ +- mark_adjust((linenr_T)lo, (linenr_T)(hi - 1), +- (long)MAXLNUM, (long)extra); +- changed_lines((linenr_T)lo, 0, (linenr_T)hi, (long)extra); +- +- if (buf == curwin->w_buffer) +- py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)extra); +- +- curbuf = savebuf; +- +- if (PyErr_Occurred() || VimErrorCheck()) +- return FAIL; +- +- if (len_change) +- *len_change = new_len - old_len; +- +- return OK; +- } +- else +- { +- PyErr_BadArgument(); +- return FAIL; +- } +- } +- + /* Convert a Vim line into a Python string. + * All internal newlines are replaced by null characters. + * +--- 1404,1409 ---- +*** ../mercurial/vim73/src/if_python3.c 2011-06-12 21:37:06.000000000 +0200 +--- src/if_python3.c 2011-06-19 00:10:42.000000000 +0200 +*************** +*** 70,77 **** + + #define PyInt Py_ssize_t + #define PyString_Check(obj) PyUnicode_Check(obj) +! #define PyString_AsString(obj) _PyUnicode_AsString(obj) +! #define PyString_Size(obj) PyUnicode_GET_SIZE(obj) + #define PyString_FromString(repr) PyUnicode_FromString(repr) + + #if defined(DYNAMIC_PYTHON3) || defined(PROTO) +--- 70,79 ---- + + #define PyInt Py_ssize_t + #define PyString_Check(obj) PyUnicode_Check(obj) +! #define PyString_AsBytes(obj) PyUnicode_AsEncodedString(obj, (char *)p_enc, NULL); +! #define PyString_FreeBytes(obj) Py_XDECREF(bytes) +! #define PyString_AsString(obj) PyBytes_AsString(obj) +! #define PyString_Size(obj) PyBytes_GET_SIZE(bytes) + #define PyString_FromString(repr) PyUnicode_FromString(repr) + + #if defined(DYNAMIC_PYTHON3) || defined(PROTO) +*************** +*** 99,104 **** +--- 101,107 ---- + # define PyArg_Parse py3_PyArg_Parse + # undef PyArg_ParseTuple + # define PyArg_ParseTuple py3_PyArg_ParseTuple ++ # define PyMem_Free py3_PyMem_Free + # define PyDict_SetItemString py3_PyDict_SetItemString + # define PyErr_BadArgument py3_PyErr_BadArgument + # define PyErr_Clear py3_PyErr_Clear +*************** +*** 140,147 **** +--- 143,155 ---- + # define PyModule_AddObject py3_PyModule_AddObject + # define PyImport_AppendInittab py3_PyImport_AppendInittab + # define _PyUnicode_AsString py3__PyUnicode_AsString ++ # undef PyUnicode_AsEncodedString ++ # define PyUnicode_AsEncodedString py3_PyUnicode_AsEncodedString ++ # undef PyBytes_AsString ++ # define PyBytes_AsString py3_PyBytes_AsString + # define PyObject_GenericGetAttr py3_PyObject_GenericGetAttr + # define PySlice_Type (*py3_PySlice_Type) ++ # define PyErr_NewException py3_PyErr_NewException + # ifdef Py_DEBUG + # define _Py_NegativeRefcount py3__Py_NegativeRefcount + # define _Py_RefTotal (*py3__Py_RefTotal) +*************** +*** 157,164 **** + # define PyModule_Create2 py3_PyModule_Create2 + # undef PyUnicode_FromString + # define PyUnicode_FromString py3_PyUnicode_FromString +! # undef PyUnicode_FromStringAndSize +! # define PyUnicode_FromStringAndSize py3_PyUnicode_FromStringAndSize + + # ifdef Py_DEBUG + # undef PyObject_NEW +--- 165,172 ---- + # define PyModule_Create2 py3_PyModule_Create2 + # undef PyUnicode_FromString + # define PyUnicode_FromString py3_PyUnicode_FromString +! # undef PyUnicode_Decode +! # define PyUnicode_Decode py3_PyUnicode_Decode + + # ifdef Py_DEBUG + # undef PyObject_NEW +*************** +*** 199,205 **** + static int (*py3_PyType_Ready)(PyTypeObject *type); + static int (*py3_PyDict_SetItemString)(PyObject *dp, char *key, PyObject *item); + static PyObject* (*py3_PyUnicode_FromString)(const char *u); +! static PyObject* (*py3_PyUnicode_FromStringAndSize)(const char *u, Py_ssize_t size); + static long (*py3_PyLong_AsLong)(PyObject *); + static void (*py3_PyErr_SetNone)(PyObject *); + static void (*py3_PyEval_InitThreads)(void); +--- 207,214 ---- + static int (*py3_PyType_Ready)(PyTypeObject *type); + static int (*py3_PyDict_SetItemString)(PyObject *dp, char *key, PyObject *item); + static PyObject* (*py3_PyUnicode_FromString)(const char *u); +! static PyObject* (*py3_PyUnicode_Decode)(const char *u, Py_ssize_t size, +! const char *encoding, const char *errors); + static long (*py3_PyLong_AsLong)(PyObject *); + static void (*py3_PyErr_SetNone)(PyObject *); + static void (*py3_PyEval_InitThreads)(void); +*************** +*** 207,212 **** +--- 216,222 ---- + static PyThreadState*(*py3_PyEval_SaveThread)(void); + static int (*py3_PyArg_Parse)(PyObject *, char *, ...); + static int (*py3_PyArg_ParseTuple)(PyObject *, char *, ...); ++ static int (*py3_PyMem_Free)(void *); + static int (*py3_Py_IsInitialized)(void); + static void (*py3_PyErr_Clear)(void); + static PyObject*(*py3__PyObject_Init)(PyObject *, PyTypeObject *); +*************** +*** 214,224 **** +--- 224,237 ---- + static int (*py3_PyModule_AddObject)(PyObject *m, const char *name, PyObject *o); + static int (*py3_PyImport_AppendInittab)(const char *name, PyObject* (*initfunc)(void)); + static char* (*py3__PyUnicode_AsString)(PyObject *unicode); ++ static PyObject* (*py3_PyUnicode_AsEncodedString)(PyObject *unicode, const char* encoding, const char* errors); ++ static char* (*py3_PyBytes_AsString)(PyObject *bytes); + static PyObject* (*py3_PyObject_GenericGetAttr)(PyObject *obj, PyObject *name); + static PyObject* (*py3_PyModule_Create2)(struct PyModuleDef* module, int module_api_version); + static PyObject* (*py3_PyType_GenericAlloc)(PyTypeObject *type, Py_ssize_t nitems); + static PyObject* (*py3_PyType_GenericNew)(PyTypeObject *type, PyObject *args, PyObject *kwds); + static PyTypeObject* py3_PySlice_Type; ++ static PyObject* (*py3_PyErr_NewException)(char *name, PyObject *base, PyObject *dict); + # ifdef Py_DEBUG + static void (*py3__Py_NegativeRefcount)(const char *fname, int lineno, PyObject *op); + static Py_ssize_t* py3__Py_RefTotal; +*************** +*** 259,264 **** +--- 272,278 ---- + {"Py_SetPythonHome", (PYTHON_PROC*)&py3_Py_SetPythonHome}, + {"Py_Initialize", (PYTHON_PROC*)&py3_Py_Initialize}, + {"PyArg_ParseTuple", (PYTHON_PROC*)&py3_PyArg_ParseTuple}, ++ {"PyMem_Free", (PYTHON_PROC*)&py3_PyMem_Free}, + {"PyList_New", (PYTHON_PROC*)&py3_PyList_New}, + {"PyGILState_Ensure", (PYTHON_PROC*)&py3_PyGILState_Ensure}, + {"PyGILState_Release", (PYTHON_PROC*)&py3_PyGILState_Release}, +*************** +*** 289,295 **** + {"PyEval_RestoreThread", (PYTHON_PROC*)&py3_PyEval_RestoreThread}, + {"PyEval_SaveThread", (PYTHON_PROC*)&py3_PyEval_SaveThread}, + {"PyArg_Parse", (PYTHON_PROC*)&py3_PyArg_Parse}, +- {"PyArg_ParseTuple", (PYTHON_PROC*)&py3_PyArg_ParseTuple}, + {"Py_IsInitialized", (PYTHON_PROC*)&py3_Py_IsInitialized}, + {"_Py_NoneStruct", (PYTHON_PROC*)&py3__Py_NoneStruct}, + {"PyErr_Clear", (PYTHON_PROC*)&py3_PyErr_Clear}, +--- 303,308 ---- +*************** +*** 297,307 **** +--- 310,322 ---- + {"PyModule_AddObject", (PYTHON_PROC*)&py3_PyModule_AddObject}, + {"PyImport_AppendInittab", (PYTHON_PROC*)&py3_PyImport_AppendInittab}, + {"_PyUnicode_AsString", (PYTHON_PROC*)&py3__PyUnicode_AsString}, ++ {"PyBytes_AsString", (PYTHON_PROC*)&py3_PyBytes_AsString}, + {"PyObject_GenericGetAttr", (PYTHON_PROC*)&py3_PyObject_GenericGetAttr}, + {"PyModule_Create2", (PYTHON_PROC*)&py3_PyModule_Create2}, + {"PyType_GenericAlloc", (PYTHON_PROC*)&py3_PyType_GenericAlloc}, + {"PyType_GenericNew", (PYTHON_PROC*)&py3_PyType_GenericNew}, + {"PySlice_Type", (PYTHON_PROC*)&py3_PySlice_Type}, ++ {"PyErr_NewException", (PYTHON_PROC*)&py3_PyErr_NewException}, + # ifdef Py_DEBUG + {"_Py_NegativeRefcount", (PYTHON_PROC*)&py3__Py_NegativeRefcount}, + {"_Py_RefTotal", (PYTHON_PROC*)&py3__Py_RefTotal}, +*************** +*** 337,343 **** + py3_runtime_link_init(char *libname, int verbose) + { + int i; +! void *ucs_from_string, *ucs_from_string_and_size; + + # if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON) + /* Can't have Python and Python3 loaded at the same time. +--- 352,358 ---- + py3_runtime_link_init(char *libname, int verbose) + { + int i; +! void *ucs_from_string, *ucs_decode, *ucs_as_encoded_string; + + # if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON) + /* Can't have Python and Python3 loaded at the same time. +*************** +*** 377,395 **** + /* Load unicode functions separately as only the ucs2 or the ucs4 functions + * will be present in the library. */ + ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_FromString"); +! ucs_from_string_and_size = symbol_from_dll(hinstPy3, +! "PyUnicodeUCS2_FromStringAndSize"); +! if (!ucs_from_string || !ucs_from_string_and_size) + { + ucs_from_string = symbol_from_dll(hinstPy3, + "PyUnicodeUCS4_FromString"); +! ucs_from_string_and_size = symbol_from_dll(hinstPy3, +! "PyUnicodeUCS4_FromStringAndSize"); + } +! if (ucs_from_string && ucs_from_string_and_size) + { + py3_PyUnicode_FromString = ucs_from_string; +! py3_PyUnicode_FromStringAndSize = ucs_from_string_and_size; + } + else + { +--- 392,415 ---- + /* Load unicode functions separately as only the ucs2 or the ucs4 functions + * will be present in the library. */ + ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_FromString"); +! ucs_decode = symbol_from_dll(hinstPy3, +! "PyUnicodeUCS2_Decode"); +! ucs_as_encoded_string = symbol_from_dll(hinstPy3, +! "PyUnicodeUCS2_AsEncodedString"); +! if (!ucs_from_string || !ucs_decode || !ucs_as_encoded_string) + { + ucs_from_string = symbol_from_dll(hinstPy3, + "PyUnicodeUCS4_FromString"); +! ucs_decode = symbol_from_dll(hinstPy3, +! "PyUnicodeUCS4_Decode"); +! ucs_as_encoded_string = symbol_from_dll(hinstPy3, +! "PyUnicodeUCS4_AsEncodedString"); + } +! if (ucs_from_string && ucs_decode && ucs_as_encoded_string) + { + py3_PyUnicode_FromString = ucs_from_string; +! py3_PyUnicode_Decode = ucs_decode; +! py3_PyUnicode_AsEncodedString = ucs_as_encoded_string; + } + else + { +*************** +*** 567,574 **** + /* Remove the element from sys.path that was added because of our + * argv[0] value in Py3Init_vim(). Previously we used an empty + * string, but dependinding on the OS we then get an empty entry or +! * the current directory in sys.path. */ +! PyRun_SimpleString("import sys; sys.path = list(filter(lambda x: x != '/must>not&exist', sys.path))"); + + // lock is created and acquired in PyEval_InitThreads() and thread + // state is created in Py_Initialize() +--- 587,597 ---- + /* Remove the element from sys.path that was added because of our + * argv[0] value in Py3Init_vim(). Previously we used an empty + * string, but dependinding on the OS we then get an empty entry or +! * the current directory in sys.path. +! * Only after vim has been imported, the element does exist in +! * sys.path. +! */ +! PyRun_SimpleString("import vim; import sys; sys.path = list(filter(lambda x: not x.endswith('must>not&exist'), sys.path))"); + + // lock is created and acquired in PyEval_InitThreads() and thread + // state is created in Py_Initialize() +*************** +*** 605,610 **** +--- 628,635 ---- + #if defined(HAVE_LOCALE_H) || defined(X_LOCALE) + char *saved_locale; + #endif ++ PyObject *cmdstr; ++ PyObject *cmdbytes; + + #if defined(MACOS) && !defined(MACOS_X_UNIX) + GetPort(&oldPort); +*************** +*** 634,640 **** + + pygilstate = PyGILState_Ensure(); + +! PyRun_SimpleString((char *)(cmd)); + + PyGILState_Release(pygilstate); + +--- 659,671 ---- + + pygilstate = PyGILState_Ensure(); + +! /* PyRun_SimpleString expects a UTF-8 string. Wrong encoding may cause +! * SyntaxError (unicode error). */ +! cmdstr = PyUnicode_Decode(cmd, strlen(cmd), (char *)p_enc, NULL); +! cmdbytes = PyUnicode_AsEncodedString(cmdstr, "utf-8", NULL); +! Py_XDECREF(cmdstr); +! PyRun_SimpleString(PyBytes_AsString(cmdbytes)); +! Py_XDECREF(cmdbytes); + + PyGILState_Release(pygilstate); + +*************** +*** 693,699 **** + * different options under Windows, meaning that stdio pointers aren't + * compatible between the two. Yuk. + * +! * construct: exec(compile(open('a_filename').read(), 'a_filename', 'exec')) + * + * We need to escape any backslashes or single quotes in the file name, so that + * Python won't mangle the file name. +--- 724,733 ---- + * different options under Windows, meaning that stdio pointers aren't + * compatible between the two. Yuk. + * +! * construct: exec(compile(open('a_filename', 'rb').read(), 'a_filename', 'exec')) +! * +! * Using bytes so that Python can detect the source encoding as it normally +! * does. The doc does not say "compile" accept bytes, though. + * + * We need to escape any backslashes or single quotes in the file name, so that + * Python won't mangle the file name. +*************** +*** 716,723 **** + return; + if (i==0) + { +! strcpy(p,"').read(),'"); +! p += 11; + } + else + { +--- 750,757 ---- + return; + if (i==0) + { +! strcpy(p,"','rb').read(),'"); +! p += 16; + } + else + { +*************** +*** 812,819 **** + + static Py_ssize_t BufferLength(PyObject *); + static PyObject *BufferItem(PyObject *, Py_ssize_t); +- static Py_ssize_t BufferAsItem(PyObject *, Py_ssize_t, PyObject *); + static PyObject* BufferSubscript(PyObject *self, PyObject* idx); + + + /* Line range type - Implementation functions +--- 846,853 ---- + + static Py_ssize_t BufferLength(PyObject *); + static PyObject *BufferItem(PyObject *, Py_ssize_t); + static PyObject* BufferSubscript(PyObject *self, PyObject* idx); ++ static Py_ssize_t BufferAsSubscript(PyObject *self, PyObject* idx, PyObject* val); + + + /* Line range type - Implementation functions +*************** +*** 835,841 **** + (ssizeargfunc) 0, /* sq_repeat, x*n */ + (ssizeargfunc) BufferItem, /* sq_item, x[i] */ + 0, /* was_sq_slice, x[i:j] */ +! (ssizeobjargproc) BufferAsItem, /* sq_ass_item, x[i]=v */ + 0, /* sq_ass_slice, x[i:j]=v */ + 0, /* sq_contains */ + 0, /* sq_inplace_concat */ +--- 869,875 ---- + (ssizeargfunc) 0, /* sq_repeat, x*n */ + (ssizeargfunc) BufferItem, /* sq_item, x[i] */ + 0, /* was_sq_slice, x[i:j] */ +! 0, /* sq_ass_item, x[i]=v */ + 0, /* sq_ass_slice, x[i:j]=v */ + 0, /* sq_contains */ + 0, /* sq_inplace_concat */ +*************** +*** 845,851 **** + PyMappingMethods BufferAsMapping = { + /* mp_length */ (lenfunc)BufferLength, + /* mp_subscript */ (binaryfunc)BufferSubscript, +! /* mp_ass_subscript */ (objobjargproc)0, + }; + + +--- 879,885 ---- + PyMappingMethods BufferAsMapping = { + /* mp_length */ (lenfunc)BufferLength, + /* mp_subscript */ (binaryfunc)BufferSubscript, +! /* mp_ass_subscript */ (objobjargproc)BufferAsSubscript, + }; + + +*************** +*** 897,902 **** +--- 931,938 ---- + + if (this->buf && this->buf != INVALID_BUFFER_VALUE) + this->buf->b_python3_ref = NULL; ++ ++ Py_TYPE(self)->tp_free((PyObject*)self); + } + + static PyObject * +*************** +*** 975,989 **** + (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count); + } + +- static Py_ssize_t +- BufferAsItem(PyObject *self, Py_ssize_t n, PyObject *val) +- { +- return RBAsItem((BufferObject *)(self), n, val, 1, +- (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count, +- NULL); +- } +- +- + static PyObject * + BufferSubscript(PyObject *self, PyObject* idx) + { +--- 1011,1016 ---- +*************** +*** 999,1011 **** + &step, &slicelen) < 0) { + return NULL; + } +! return BufferSlice(self,start,stop+1); + } else { + PyErr_SetString(PyExc_IndexError, "Index must be int or slice"); + return NULL; + } + } + + static PySequenceMethods RangeAsSeq = { + (lenfunc) RangeLength, /* sq_length, len(x) */ + (binaryfunc) 0, /* RangeConcat, sq_concat, x+y */ +--- 1026,1064 ---- + &step, &slicelen) < 0) { + return NULL; + } +! return BufferSlice(self,start,stop); + } else { + PyErr_SetString(PyExc_IndexError, "Index must be int or slice"); + return NULL; + } + } + ++ static Py_ssize_t ++ BufferAsSubscript(PyObject *self, PyObject* idx, PyObject* val) ++ { ++ if (PyLong_Check(idx)) { ++ long n = PyLong_AsLong(idx); ++ return RBAsItem((BufferObject *)(self), n, val, 1, ++ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count, ++ NULL); ++ } else if (PySlice_Check(idx)) { ++ Py_ssize_t start, stop, step, slicelen; ++ ++ if (PySlice_GetIndicesEx((PySliceObject *)idx, ++ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count+1, ++ &start, &stop, ++ &step, &slicelen) < 0) { ++ return -1; ++ } ++ return RBAsSlice((BufferObject *)(self), start, stop, val, 1, ++ (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count, ++ NULL); ++ } else { ++ PyErr_SetString(PyExc_IndexError, "Index must be int or slice"); ++ return -1; ++ } ++ } ++ + static PySequenceMethods RangeAsSeq = { + (lenfunc) RangeLength, /* sq_length, len(x) */ + (binaryfunc) 0, /* RangeConcat, sq_concat, x+y */ +*************** +*** 1032,1037 **** +--- 1085,1091 ---- + RangeDestructor(PyObject *self) + { + Py_DECREF(((RangeObject *)(self))->buf); ++ Py_TYPE(self)->tp_free((PyObject*)self); + } + + static PyObject * +*************** +*** 1159,1164 **** +--- 1213,1220 ---- + + if (this->win && this->win != INVALID_WINDOW_VALUE) + this->win->w_python3_ref = NULL; ++ ++ Py_TYPE(self)->tp_free((PyObject*)self); + } + + static PyObject * +*************** +*** 1350,1357 **** + PySys_SetArgv(1, argv); + + mod = PyModule_Create(&vimmodule); + +! VimError = Py_BuildValue("s", "vim.error"); + + PyModule_AddObject(mod, "error", VimError); + Py_INCREF((PyObject *)(void *)&TheBufferList); +--- 1406,1416 ---- + PySys_SetArgv(1, argv); + + mod = PyModule_Create(&vimmodule); ++ if (mod == NULL) ++ return NULL; + +! VimError = PyErr_NewException("vim.error", NULL, NULL); +! Py_INCREF(VimError); + + PyModule_AddObject(mod, "error", VimError); + Py_INCREF((PyObject *)(void *)&TheBufferList); +*************** +*** 1404,1410 **** + } + *p = '\0'; + +! result = PyUnicode_FromStringAndSize(tmp, len); + + vim_free(tmp); + return result; +--- 1463,1469 ---- + } + *p = '\0'; + +! result = PyUnicode_Decode(tmp, len, (char *)p_enc, NULL); + + vim_free(tmp); + return result; +*** ../vim-7.3.219/src/version.c 2011-06-13 02:03:55.000000000 +0200 +--- src/version.c 2011-06-19 00:25:38.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 220, + /**/ + +-- +I'm in shape. Round IS a shape. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9aaaf6ce47cdede9993c53a38acfcdfae4be1654 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:26 +0200 Subject: [PATCH 0395/3803] - patchlevel 221 --- 7.3.221 | 287 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) create mode 100644 7.3.221 diff --git a/7.3.221 b/7.3.221 new file mode 100644 index 00000000..7211a4a6 --- /dev/null +++ b/7.3.221 @@ -0,0 +1,287 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.221 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.221 +Problem: Text from the clipboard is sometimes handled as linewise, but not + consistently. +Solution: Assume the text is linewise when it ends in a CR or NL. +Files: src/gui_gtk_x11.c, src/gui_mac.c, src/ops.c, src/os_msdos.c, + src/os_mswin.c, src/os_qnx.c, src/ui.c + + +*** ../mercurial/vim73/src/gui_gtk_x11.c 2011-02-25 17:10:22.000000000 +0100 +--- src/gui_gtk_x11.c 2011-06-19 00:58:31.000000000 +0200 +*************** +*** 1173,1179 **** + char_u *tmpbuf = NULL; + guchar *tmpbuf_utf8 = NULL; + int len; +! int motion_type; + + if (data->selection == clip_plus.gtk_sel_atom) + cbd = &clip_plus; +--- 1173,1179 ---- + char_u *tmpbuf = NULL; + guchar *tmpbuf_utf8 = NULL; + int len; +! int motion_type = MAUTO; + + if (data->selection == clip_plus.gtk_sel_atom) + cbd = &clip_plus; +*************** +*** 1182,1188 **** + + text = (char_u *)data->data; + len = data->length; +- motion_type = MCHAR; + + if (text == NULL || len <= 0) + { +--- 1182,1187 ---- +*** ../mercurial/vim73/src/gui_mac.c 2011-06-12 20:33:30.000000000 +0200 +--- src/gui_mac.c 2011-06-19 00:59:07.000000000 +0200 +*************** +*** 4671,4677 **** + if (flavor) + type = **textOfClip; + else +! type = (strchr(*textOfClip, '\r') != NULL) ? MLINE : MCHAR; + + tempclip = lalloc(scrapSize + 1, TRUE); + mch_memmove(tempclip, *textOfClip + flavor, scrapSize); +--- 4671,4677 ---- + if (flavor) + type = **textOfClip; + else +! type = MAUTO; + + tempclip = lalloc(scrapSize + 1, TRUE); + mch_memmove(tempclip, *textOfClip + flavor, scrapSize); +*** ../mercurial/vim73/src/ops.c 2011-04-01 16:28:33.000000000 +0200 +--- src/ops.c 2011-06-19 00:59:39.000000000 +0200 +*************** +*** 5733,5739 **** + } + } + +! /* Convert from the GUI selection string into the '*'/'+' register */ + void + clip_yank_selection(type, str, len, cbd) + int type; +--- 5733,5741 ---- + } + } + +! /* +! * Convert from the GUI selection string into the '*'/'+' register. +! */ + void + clip_yank_selection(type, str, len, cbd) + int type; +*************** +*** 6090,6098 **** + if (yank_type == MBLOCK) + yank_type = MAUTO; + #endif +- if (yank_type == MAUTO) +- yank_type = ((len > 0 && (str[len - 1] == '\n' || str[len - 1] == '\r')) +- ? MLINE : MCHAR); + str_to_reg(y_current, yank_type, str, len, block_len); + + # ifdef FEAT_CLIPBOARD +--- 6092,6097 ---- +*************** +*** 6113,6125 **** + * is appended. + */ + static void +! str_to_reg(y_ptr, type, str, len, blocklen) + struct yankreg *y_ptr; /* pointer to yank register */ +! int type; /* MCHAR, MLINE or MBLOCK */ + char_u *str; /* string to put in register */ + long len; /* length of string */ + long blocklen; /* width of Visual block */ + { + int lnum; + long start; + long i; +--- 6112,6125 ---- + * is appended. + */ + static void +! str_to_reg(y_ptr, yank_type, str, len, blocklen) + struct yankreg *y_ptr; /* pointer to yank register */ +! int yank_type; /* MCHAR, MLINE, MBLOCK, MAUTO */ + char_u *str; /* string to put in register */ + long len; /* length of string */ + long blocklen; /* width of Visual block */ + { ++ int type; /* MCHAR, MLINE or MBLOCK */ + int lnum; + long start; + long i; +*************** +*** 6136,6141 **** +--- 6136,6147 ---- + if (y_ptr->y_array == NULL) /* NULL means empty register */ + y_ptr->y_size = 0; + ++ if (yank_type == MAUTO) ++ type = ((len > 0 && (str[len - 1] == NL || str[len - 1] == CAR)) ++ ? MLINE : MCHAR); ++ else ++ type = yank_type; ++ + /* + * Count the number of lines within the string + */ +*** ../mercurial/vim73/src/os_msdos.c 2010-12-17 18:06:00.000000000 +0100 +--- src/os_msdos.c 2011-06-19 01:00:56.000000000 +0200 +*************** +*** 2232,2238 **** + void + clip_mch_request_selection(VimClipboard *cbd) + { +! int type = MCHAR; + char_u *pAllocated = NULL; + char_u *pClipText = NULL; + int clip_data_format = 0; +--- 2232,2238 ---- + void + clip_mch_request_selection(VimClipboard *cbd) + { +! int type = MAUTO; + char_u *pAllocated = NULL; + char_u *pClipText = NULL; + int clip_data_format = 0; +*************** +*** 2280,2293 **** + { + clip_data_format = CF_TEXT; + pClipText = pAllocated; +- type = (vim_strchr((char*)pClipText, '\r') != NULL) ? MLINE : MCHAR; + } + + else if ((pAllocated = Win16GetClipboardData(CF_OEMTEXT)) != NULL) + { + clip_data_format = CF_OEMTEXT; + pClipText = pAllocated; +- type = (vim_strchr((char*)pClipText, '\r') != NULL) ? MLINE : MCHAR; + } + + /* Did we get anything? */ +--- 2280,2291 ---- +*** ../mercurial/vim73/src/os_mswin.c 2011-01-17 20:08:04.000000000 +0100 +--- src/os_mswin.c 2011-06-19 01:01:51.000000000 +0200 +*************** +*** 1410,1418 **** + { + char_u *temp_clipboard; + +! /* If the type is not known guess it. */ + if (metadata.type == -1) +! metadata.type = (vim_strchr(str, '\n') == NULL) ? MCHAR : MLINE; + + /* Translate into . */ + temp_clipboard = crnl_to_nl(str, &str_size); +--- 1410,1418 ---- + { + char_u *temp_clipboard; + +! /* If the type is not known detect it. */ + if (metadata.type == -1) +! metadata.type = MAUTO; + + /* Translate into . */ + temp_clipboard = crnl_to_nl(str, &str_size); +*** ../mercurial/vim73/src/os_qnx.c 2010-05-15 21:22:11.000000000 +0200 +--- src/os_qnx.c 2011-06-19 01:02:26.000000000 +0200 +*************** +*** 93,99 **** + clip_length = clip_header->length - 1; + + if( clip_text != NULL && is_type_set == FALSE ) +! type = (strchr( clip_text, '\r' ) != NULL) ? MLINE : MCHAR; + } + + if( (clip_text != NULL) && (clip_length > 0) ) +--- 93,99 ---- + clip_length = clip_header->length - 1; + + if( clip_text != NULL && is_type_set == FALSE ) +! type = MAUTO; + } + + if( (clip_text != NULL) && (clip_length > 0) ) +*** ../mercurial/vim73/src/ui.c 2010-09-21 22:09:28.000000000 +0200 +--- src/ui.c 2011-06-19 01:03:31.000000000 +0200 +*************** +*** 1609,1615 **** + + #if defined(FEAT_HANGULIN) || defined(PROTO) + void +! push_raw_key (s, len) + char_u *s; + int len; + { +--- 1609,1615 ---- + + #if defined(FEAT_HANGULIN) || defined(PROTO) + void +! push_raw_key(s, len) + char_u *s; + int len; + { +*************** +*** 2016,2022 **** + long_u *length; + int *format; + { +! int motion_type; + long_u len; + char_u *p; + char **text_list = NULL; +--- 2016,2022 ---- + long_u *length; + int *format; + { +! int motion_type = MAUTO; + long_u len; + char_u *p; + char **text_list = NULL; +*************** +*** 2036,2042 **** + *(int *)success = FALSE; + return; + } +- motion_type = MCHAR; + p = (char_u *)value; + len = *length; + if (*type == vim_atom) +--- 2036,2041 ---- +*** ../vim-7.3.220/src/version.c 2011-06-19 00:27:46.000000000 +0200 +--- src/version.c 2011-06-19 01:03:59.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 221, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +190. You quickly hand over your wallet, leather jacket, and car keys + during a mugging, then proceed to beat the crap out of your + assailant when he asks for your laptop. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5a2ea413c0aa5f48ae22473fcd3c420f7516cb5b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:26 +0200 Subject: [PATCH 0396/3803] - patchlevel 222 --- 7.3.222 | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 7.3.222 diff --git a/7.3.222 b/7.3.222 new file mode 100644 index 00000000..87151b5a --- /dev/null +++ b/7.3.222 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.22 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.222 +Problem: Warning for building GvimExt. +Solution: Comment-out the DESCRIPTION line. (Mike Williams) +Files: src/GvimExt/gvimext.def, src/GvimExt/gvimext_ming.def + + +*** ../mercurial/vim73/src/GvimExt/gvimext.def 2010-05-15 21:22:11.000000000 +0200 +--- src/GvimExt/gvimext.def 2011-06-15 03:50:55.000000000 +0200 +*************** +*** 1,7 **** + ;gvimdef.def : Declares the module parameters for the DLL. + + LIBRARY gvimext +! DESCRIPTION 'Vim Shell Extension' + + EXPORTS + DllCanUnloadNow private +--- 1,7 ---- + ;gvimdef.def : Declares the module parameters for the DLL. + + LIBRARY gvimext +! ; DESCRIPTION 'Vim Shell Extension' + + EXPORTS + DllCanUnloadNow private +*** ../mercurial/vim73/src/GvimExt/gvimext_ming.def 2010-05-15 21:22:11.000000000 +0200 +--- src/GvimExt/gvimext_ming.def 2011-06-15 03:51:05.000000000 +0200 +*************** +*** 3,9 **** + ;Hence this is the same file as gvimext.def with private removed + + LIBRARY gvimext +! DESCRIPTION 'Vim Shell Extension build with MinGW' + + EXPORTS + DllCanUnloadNow = DllCanUnloadNow@0 +--- 3,9 ---- + ;Hence this is the same file as gvimext.def with private removed + + LIBRARY gvimext +! ; DESCRIPTION 'Vim Shell Extension build with MinGW' + + EXPORTS + DllCanUnloadNow = DllCanUnloadNow@0 +*** ../vim-7.3.221/src/version.c 2011-06-19 01:14:23.000000000 +0200 +--- src/version.c 2011-06-19 01:26:57.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 222, + /**/ + +-- +What is the difference between a professional and an amateur? +The ark was built by an amateur; professionals gave us the Titanic. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 26431aa59afeb092fa148d01a19254539f1e7297 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:26 +0200 Subject: [PATCH 0397/3803] - patchlevel 223 --- 7.3.223 | 387 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 387 insertions(+) create mode 100644 7.3.223 diff --git a/7.3.223 b/7.3.223 new file mode 100644 index 00000000..e151c5b7 --- /dev/null +++ b/7.3.223 @@ -0,0 +1,387 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.223 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.223 +Problem: MingW cross compilation doesn't work with tiny features. +Solution: Move acp_to_enc(), enc_to_utf16() and utf16_to_enc() outside of + "#ifdef CLIPBOARD". Fix typo in makefile. +Files: src/Make_ming.mak, src/os_mswin.c + + +*** ../mercurial/vim73/src/Make_ming.mak 2010-12-30 14:50:46.000000000 +0100 +--- src/Make_ming.mak 2011-06-19 01:20:16.000000000 +0200 +*************** +*** 87,93 **** + + # If you are using gettext-0.10.35 from http://sourceforge.net/projects/gettext + # or gettext-0.10.37 from http://sourceforge.net/projects/mingwrep/ +! # uncomment the following, but I can't build a static versión with them, ?-(| + #GETTEXT=c:/gettext-0.10.37-20010430 + #STATIC_GETTEXT=USE_STATIC_GETTEXT + #DYNAMIC_GETTEXT=DYNAMIC_GETTEXT +--- 87,93 ---- + + # If you are using gettext-0.10.35 from http://sourceforge.net/projects/gettext + # or gettext-0.10.37 from http://sourceforge.net/projects/mingwrep/ +! # uncomment the following, but I can't build a static version with them, ?-(| + #GETTEXT=c:/gettext-0.10.37-20010430 + #STATIC_GETTEXT=USE_STATIC_GETTEXT + #DYNAMIC_GETTEXT=DYNAMIC_GETTEXT +*** ../mercurial/vim73/src/os_mswin.c 2011-06-19 01:14:23.000000000 +0200 +--- src/os_mswin.c 2011-06-19 01:25:23.000000000 +0200 +*************** +*** 1105,1236 **** + return ret; + } + +- #if defined(FEAT_MBYTE) || defined(PROTO) +- /* +- * Note: the following two functions are only guaranteed to work when using +- * valid MS-Windows codepages or when iconv() is available. +- */ +- +- /* +- * Convert "str" from 'encoding' to UTF-16. +- * Input in "str" with length "*lenp". When "lenp" is NULL, use strlen(). +- * Output is returned as an allocated string. "*lenp" is set to the length of +- * the result. A trailing NUL is always added. +- * Returns NULL when out of memory. +- */ +- short_u * +- enc_to_utf16(char_u *str, int *lenp) +- { +- vimconv_T conv; +- WCHAR *ret; +- char_u *allocbuf = NULL; +- int len_loc; +- int length; +- +- if (lenp == NULL) +- { +- len_loc = (int)STRLEN(str) + 1; +- lenp = &len_loc; +- } +- +- if (enc_codepage > 0) +- { +- /* We can do any CP### -> UTF-16 in one pass, and we can do it +- * without iconv() (convert_* may need iconv). */ +- MultiByteToWideChar_alloc(enc_codepage, 0, str, *lenp, &ret, &length); +- } +- else +- { +- /* Use "latin1" by default, we might be called before we have p_enc +- * set up. Convert to utf-8 first, works better with iconv(). Does +- * nothing if 'encoding' is "utf-8". */ +- conv.vc_type = CONV_NONE; +- if (convert_setup(&conv, p_enc ? p_enc : (char_u *)"latin1", +- (char_u *)"utf-8") == FAIL) +- return NULL; +- if (conv.vc_type != CONV_NONE) +- { +- str = allocbuf = string_convert(&conv, str, lenp); +- if (str == NULL) +- return NULL; +- } +- convert_setup(&conv, NULL, NULL); +- +- length = utf8_to_utf16(str, *lenp, NULL, NULL); +- ret = (WCHAR *)alloc((unsigned)((length + 1) * sizeof(WCHAR))); +- if (ret != NULL) +- { +- utf8_to_utf16(str, *lenp, (short_u *)ret, NULL); +- ret[length] = 0; +- } +- +- vim_free(allocbuf); +- } +- +- *lenp = length; +- return (short_u *)ret; +- } +- +- /* +- * Convert an UTF-16 string to 'encoding'. +- * Input in "str" with length (counted in wide characters) "*lenp". When +- * "lenp" is NULL, use wcslen(). +- * Output is returned as an allocated string. If "*lenp" is not NULL it is +- * set to the length of the result. +- * Returns NULL when out of memory. +- */ +- char_u * +- utf16_to_enc(short_u *str, int *lenp) +- { +- vimconv_T conv; +- char_u *utf8_str = NULL, *enc_str = NULL; +- int len_loc; +- +- if (lenp == NULL) +- { +- len_loc = (int)wcslen(str) + 1; +- lenp = &len_loc; +- } +- +- if (enc_codepage > 0) +- { +- /* We can do any UTF-16 -> CP### in one pass. */ +- int length; +- +- WideCharToMultiByte_alloc(enc_codepage, 0, str, *lenp, +- (LPSTR *)&enc_str, &length, 0, 0); +- *lenp = length; +- return enc_str; +- } +- +- /* Avoid allocating zero bytes, it generates an error message. */ +- utf8_str = alloc(utf16_to_utf8(str, *lenp == 0 ? 1 : *lenp, NULL)); +- if (utf8_str != NULL) +- { +- *lenp = utf16_to_utf8(str, *lenp, utf8_str); +- +- /* We might be called before we have p_enc set up. */ +- conv.vc_type = CONV_NONE; +- convert_setup(&conv, (char_u *)"utf-8", +- p_enc? p_enc: (char_u *)"latin1"); +- if (conv.vc_type == CONV_NONE) +- { +- /* p_enc is utf-8, so we're done. */ +- enc_str = utf8_str; +- } +- else +- { +- enc_str = string_convert(&conv, utf8_str, lenp); +- vim_free(utf8_str); +- } +- +- convert_setup(&conv, NULL, NULL); +- } +- +- return enc_str; +- } +- #endif /* FEAT_MBYTE */ +- + /* + * Wait for another process to Close the Clipboard. + * Returns TRUE for success. +--- 1105,1110 ---- +*************** +*** 1436,1467 **** + #endif + } + +- #if (defined(FEAT_MBYTE) && defined(WIN3264)) || defined(PROTO) +- /* +- * Convert from the active codepage to 'encoding'. +- * Input is "str[str_size]". +- * The result is in allocated memory: "out[outlen]". With terminating NUL. +- */ +- void +- acp_to_enc(str, str_size, out, outlen) +- char_u *str; +- int str_size; +- char_u **out; +- int *outlen; +- +- { +- LPWSTR widestr; +- +- MultiByteToWideChar_alloc(GetACP(), 0, str, str_size, &widestr, outlen); +- if (widestr != NULL) +- { +- ++*outlen; /* Include the 0 after the string */ +- *out = utf16_to_enc((short_u *)widestr, outlen); +- vim_free(widestr); +- } +- } +- #endif +- + /* + * Send the current selection to the clipboard. + */ +--- 1310,1315 ---- +*************** +*** 1626,1631 **** +--- 1474,1631 ---- + + #endif /* FEAT_CLIPBOARD */ + ++ #if defined(FEAT_MBYTE) || defined(PROTO) ++ /* ++ * Note: the following two functions are only guaranteed to work when using ++ * valid MS-Windows codepages or when iconv() is available. ++ */ ++ ++ /* ++ * Convert "str" from 'encoding' to UTF-16. ++ * Input in "str" with length "*lenp". When "lenp" is NULL, use strlen(). ++ * Output is returned as an allocated string. "*lenp" is set to the length of ++ * the result. A trailing NUL is always added. ++ * Returns NULL when out of memory. ++ */ ++ short_u * ++ enc_to_utf16(char_u *str, int *lenp) ++ { ++ vimconv_T conv; ++ WCHAR *ret; ++ char_u *allocbuf = NULL; ++ int len_loc; ++ int length; ++ ++ if (lenp == NULL) ++ { ++ len_loc = (int)STRLEN(str) + 1; ++ lenp = &len_loc; ++ } ++ ++ if (enc_codepage > 0) ++ { ++ /* We can do any CP### -> UTF-16 in one pass, and we can do it ++ * without iconv() (convert_* may need iconv). */ ++ MultiByteToWideChar_alloc(enc_codepage, 0, str, *lenp, &ret, &length); ++ } ++ else ++ { ++ /* Use "latin1" by default, we might be called before we have p_enc ++ * set up. Convert to utf-8 first, works better with iconv(). Does ++ * nothing if 'encoding' is "utf-8". */ ++ conv.vc_type = CONV_NONE; ++ if (convert_setup(&conv, p_enc ? p_enc : (char_u *)"latin1", ++ (char_u *)"utf-8") == FAIL) ++ return NULL; ++ if (conv.vc_type != CONV_NONE) ++ { ++ str = allocbuf = string_convert(&conv, str, lenp); ++ if (str == NULL) ++ return NULL; ++ } ++ convert_setup(&conv, NULL, NULL); ++ ++ length = utf8_to_utf16(str, *lenp, NULL, NULL); ++ ret = (WCHAR *)alloc((unsigned)((length + 1) * sizeof(WCHAR))); ++ if (ret != NULL) ++ { ++ utf8_to_utf16(str, *lenp, (short_u *)ret, NULL); ++ ret[length] = 0; ++ } ++ ++ vim_free(allocbuf); ++ } ++ ++ *lenp = length; ++ return (short_u *)ret; ++ } ++ ++ /* ++ * Convert an UTF-16 string to 'encoding'. ++ * Input in "str" with length (counted in wide characters) "*lenp". When ++ * "lenp" is NULL, use wcslen(). ++ * Output is returned as an allocated string. If "*lenp" is not NULL it is ++ * set to the length of the result. ++ * Returns NULL when out of memory. ++ */ ++ char_u * ++ utf16_to_enc(short_u *str, int *lenp) ++ { ++ vimconv_T conv; ++ char_u *utf8_str = NULL, *enc_str = NULL; ++ int len_loc; ++ ++ if (lenp == NULL) ++ { ++ len_loc = (int)wcslen(str) + 1; ++ lenp = &len_loc; ++ } ++ ++ if (enc_codepage > 0) ++ { ++ /* We can do any UTF-16 -> CP### in one pass. */ ++ int length; ++ ++ WideCharToMultiByte_alloc(enc_codepage, 0, str, *lenp, ++ (LPSTR *)&enc_str, &length, 0, 0); ++ *lenp = length; ++ return enc_str; ++ } ++ ++ /* Avoid allocating zero bytes, it generates an error message. */ ++ utf8_str = alloc(utf16_to_utf8(str, *lenp == 0 ? 1 : *lenp, NULL)); ++ if (utf8_str != NULL) ++ { ++ *lenp = utf16_to_utf8(str, *lenp, utf8_str); ++ ++ /* We might be called before we have p_enc set up. */ ++ conv.vc_type = CONV_NONE; ++ convert_setup(&conv, (char_u *)"utf-8", ++ p_enc? p_enc: (char_u *)"latin1"); ++ if (conv.vc_type == CONV_NONE) ++ { ++ /* p_enc is utf-8, so we're done. */ ++ enc_str = utf8_str; ++ } ++ else ++ { ++ enc_str = string_convert(&conv, utf8_str, lenp); ++ vim_free(utf8_str); ++ } ++ ++ convert_setup(&conv, NULL, NULL); ++ } ++ ++ return enc_str; ++ } ++ #endif /* FEAT_MBYTE */ ++ ++ #if (defined(FEAT_MBYTE) && defined(WIN3264)) || defined(PROTO) ++ /* ++ * Convert from the active codepage to 'encoding'. ++ * Input is "str[str_size]". ++ * The result is in allocated memory: "out[outlen]". With terminating NUL. ++ */ ++ void ++ acp_to_enc(str, str_size, out, outlen) ++ char_u *str; ++ int str_size; ++ char_u **out; ++ int *outlen; ++ ++ { ++ LPWSTR widestr; ++ ++ MultiByteToWideChar_alloc(GetACP(), 0, str, str_size, &widestr, outlen); ++ if (widestr != NULL) ++ { ++ ++*outlen; /* Include the 0 after the string */ ++ *out = utf16_to_enc((short_u *)widestr, outlen); ++ vim_free(widestr); ++ } ++ } ++ #endif ++ + + /* + * Debugging helper: expose the MCH_WRITE_DUMP stuff to other modules +*** ../vim-7.3.222/src/version.c 2011-06-19 01:27:29.000000000 +0200 +--- src/version.c 2011-06-19 01:28:41.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 223, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +191. You rate eating establishments not by the quality of the food, + but by the availability of electrical outlets for your PowerBook. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5889ec31a8a8433784fdc502b38b462597c9d61b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:27 +0200 Subject: [PATCH 0398/3803] - patchlevel 224 --- 7.3.224 | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 7.3.224 diff --git a/7.3.224 b/7.3.224 new file mode 100644 index 00000000..1673f476 --- /dev/null +++ b/7.3.224 @@ -0,0 +1,162 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.224 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.224 +Problem: Can't pass dict to sort function. +Solution: Add the optional {dict} argument to sort(). (ZyX) +Files: runtime/doc/eval.txt, src/eval.c + + +*** ../mercurial/vim73/runtime/doc/eval.txt 2011-05-19 17:25:36.000000000 +0200 +--- runtime/doc/eval.txt 2011-06-19 02:42:52.000000000 +0200 +*************** +*** 1919,1925 **** + simplify( {filename}) String simplify filename as much as possible + sin( {expr}) Float sine of {expr} + sinh( {expr}) Float hyperbolic sine of {expr} +! sort( {list} [, {func}]) List sort {list}, using {func} to compare + soundfold( {word}) String sound-fold {word} + spellbadword() String badly spelled word at cursor + spellsuggest( {word} [, {max} [, {capital}]]) +--- 1922,1929 ---- + simplify( {filename}) String simplify filename as much as possible + sin( {expr}) Float sine of {expr} + sinh( {expr}) Float hyperbolic sine of {expr} +! sort( {list} [, {func} [, {dict}]]) +! List sort {list}, using {func} to compare + soundfold( {word}) String sound-fold {word} + spellbadword() String badly spelled word at cursor + spellsuggest( {word} [, {max} [, {capital}]]) +*************** +*** 5275,5281 **** + {only available when compiled with the |+float| feature} + + +! sort({list} [, {func}]) *sort()* *E702* + Sort the items in {list} in-place. Returns {list}. If you + want a list to remain unmodified make a copy first: > + :let sortedlist = sort(copy(mylist)) +--- 5279,5285 ---- + {only available when compiled with the |+float| feature} + + +! sort({list} [, {func} [, {dict}]]) *sort()* *E702* + Sort the items in {list} in-place. Returns {list}. If you + want a list to remain unmodified make a copy first: > + :let sortedlist = sort(copy(mylist)) +*************** +*** 5283,5288 **** +--- 5287,5294 ---- + Numbers sort after Strings, |Lists| after Numbers. + For sorting text in the current buffer use |:sort|. + When {func} is given and it is one then case is ignored. ++ {dict} is for functions with the "dict" attribute. It will be ++ used to set the local variable "self". |Dictionary-function| + When {func} is a |Funcref| or a function name, this function + is called to compare items. The function is invoked with two + items as argument and must return zero if they are equal, 1 or +*** ../mercurial/vim73/src/eval.c 2011-05-19 18:26:34.000000000 +0200 +--- src/eval.c 2011-06-19 02:51:13.000000000 +0200 +*************** +*** 7930,7936 **** + {"sin", 1, 1, f_sin}, + {"sinh", 1, 1, f_sinh}, + #endif +! {"sort", 1, 2, f_sort}, + {"soundfold", 1, 1, f_soundfold}, + {"spellbadword", 0, 1, f_spellbadword}, + {"spellsuggest", 1, 3, f_spellsuggest}, +--- 7930,7936 ---- + {"sin", 1, 1, f_sin}, + {"sinh", 1, 1, f_sinh}, + #endif +! {"sort", 1, 3, f_sort}, + {"soundfold", 1, 1, f_soundfold}, + {"spellbadword", 0, 1, f_spellbadword}, + {"spellsuggest", 1, 3, f_spellsuggest}, +*************** +*** 16366,16371 **** +--- 16366,16372 ---- + + static int item_compare_ic; + static char_u *item_compare_func; ++ static dict_T *item_compare_selfdict; + static int item_compare_func_err; + #define ITEM_COMPARE_FAIL 999 + +*************** +*** 16425,16431 **** + + rettv.v_type = VAR_UNKNOWN; /* clear_tv() uses this */ + res = call_func(item_compare_func, (int)STRLEN(item_compare_func), +! &rettv, 2, argv, 0L, 0L, &dummy, TRUE, NULL); + clear_tv(&argv[0]); + clear_tv(&argv[1]); + +--- 16426,16433 ---- + + rettv.v_type = VAR_UNKNOWN; /* clear_tv() uses this */ + res = call_func(item_compare_func, (int)STRLEN(item_compare_func), +! &rettv, 2, argv, 0L, 0L, &dummy, TRUE, +! item_compare_selfdict); + clear_tv(&argv[0]); + clear_tv(&argv[1]); + +*************** +*** 16471,16478 **** +--- 16473,16482 ---- + + item_compare_ic = FALSE; + item_compare_func = NULL; ++ item_compare_selfdict = NULL; + if (argvars[1].v_type != VAR_UNKNOWN) + { ++ /* optional second argument: {func} */ + if (argvars[1].v_type == VAR_FUNC) + item_compare_func = argvars[1].vval.v_string; + else +*************** +*** 16487,16492 **** +--- 16491,16507 ---- + else + item_compare_func = get_tv_string(&argvars[1]); + } ++ ++ if (argvars[2].v_type != VAR_UNKNOWN) ++ { ++ /* optional third argument: {dict} */ ++ if (argvars[2].v_type != VAR_DICT) ++ { ++ EMSG(_(e_dictreq)); ++ return; ++ } ++ item_compare_selfdict = argvars[2].vval.v_dict; ++ } + } + + /* Make an array with each entry pointing to an item in the List. */ +*** ../vim-7.3.223/src/version.c 2011-06-19 01:30:01.000000000 +0200 +--- src/version.c 2011-06-19 02:52:46.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 224, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +193. You ask your girlfriend to drive home so you can sit back with + your PDA and download the information to your laptop + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 4e2778c34316865457750913fa5703471516e61f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:27 +0200 Subject: [PATCH 0399/3803] - patchlevel 225 --- 7.3.225 | Bin 0 -> 18841 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 7.3.225 diff --git a/7.3.225 b/7.3.225 new file mode 100644 index 0000000000000000000000000000000000000000..5a32b9a62928c026c7a60882387183aa52dbe0b2 GIT binary patch literal 18841 zcmeG^X>;2~vi`V4mA?9OTi#d)NPwqE(b1Nv%hqW}qP*E%ys$uWNWuaJGyqC+B`?4I zRrg?UkPs*--fZ5+EDN5ayJx1SFElXdx^1|zoZgV#ycxUh*k)tTolSjh;5y3XtpAA( zf;N0GgTVxvT1~4~8_MBe&<1xF^xZq<&~u$O?0TjHXRd2AZkir^kM%c>tZSSFe^bsZ zhm}4u&$nFOhKg2J_FNt?9+bLYrmPJCy9@NGZCd;_3?`=MvtZ|{dsu44aGuHi5%Wq1 zeBcf(K5j#+Zv{#z@l%xaTt9ej-)2r50N~2E_!w3Vz6urx6Z~1<53FDoFtE694H>Mq z{Z$yc%m?lU;4yz@2Ljf%I8%^_{PjI%UTeywYtI5&5y0NW-+`yl0D2JBKe40Ig?+tV!G}Q)0sv(J? z<x&oXWO#&Vi9J;}>LwOlEe%G;$%9V+E^ zqtUL`wX*zyTCSGMC}gP(K%`2kyj7}fL%H5A*V>Imq|Nk?CbQLQR*PG$W)rZJ=*p%R zpd>2*eqaXH06aE!98|qtx3KBY`l2kFUdLc4o80Sl3xx<~WO;sI^O=(m=9qVg{8~}v zkQNUTWU#Ym_dTTYlJTK6QUI`QjbO+|7H7lt!-Gz@clLh&=q zW9Ky0`r+bz_x(mTd$zY*#b&u&OR#5qdmEb?l05}f!f366AFzY$N-!r46fq=(i|V+v zG-${aNib$n8cgyggp<{no_WJi?|Ziv4`FUCp6<4=-x|OUgr%r^VDjFmC)Wr&(7m`i zc%8|yX1R>)se}SW8&oKaTo2ZL*a3E9+C5>)Uc;sjFLvPk>hv`@{oXY2dgkzE-QUL?c1h5VM8+P<{)662Ag^`nl*y;O&@l4;QUm~q<~e}>s$~+h$^#vmVjI{j5T=m z3jBXn{wG|MK*bsSOls9ES1QG3xmuQTLo@u{8B>hb37atEHuHTLn6}M^F!Eey(La10 zMj~@wNCAq(^DD78ZP$chLrx>RBRMP-3a|-nUpM;$!!Y=ejdWvY)ih14_51x*9l+(} z`P;N;ga<(IM0Lo}>JTv@GKCCz!Cg&0fdz8#z0X1R`*xKWRIgJZ=;7Ix-saAds@ zD6+6gxTrA&8e7~*Ugym&Qj{h(Nl><>=n0FPG{8}JY;mc3so6d3oL&mMdtVfhjHDEau)C?pe2mgJQ90Xjl&mGG$(>r?NI|86HrxJpSyU7iF1wwJZuj7_tEkZS zUGN>#wzV6}QB*iM-w%5f6)q?W_rV=e#N4d36?KsS3&1hQ)_|z700vX{m7;?F6B5!D z6+X3ny`#T+CCj_I5ta9hbjsw{A9SNH%RlHwAj=oJVaW2OZVY6(t3Q8+<h3SW>qQd7N zJ}WAC7aqo>m%gGx&<*a{aqd2S&kg6>u0MX)tEhbc;a#UaN9AtkD7vw;W~@mm-lb|> z-^2Rzm8gH8`V$QY0wK|ING)E3@|H+Ei|X$LiMZh?BoVh9Qwxt!PB0iUyj3~NQ>t^S zFX~$jId67MMTP!uUr}MOhsJKWKU7p;2TW06bU0E}7{47WDoox@6cwx^3r*kgCq;$p zlj}(N7VNJypUc@AyMy(}1(Y|6u%@jQVa>qH+J;;bGJXld90qPpKF0Hv^cc8#`53s5 zscGT%E=8Tl10SN{%+5~dWv?CDV$u`gg2r?i#wCt>iAJ1aR( zMs%m8w;-BeM*HGSnlzIY@@>yBrkS6`SpO-CS#_3aNzfgo&pa{{R2ys9W;2Xc#@<#)N-4qs^I>B##qwB27mY;2*C2 zyY!re{w1PI(!mF63_Zbkvc@c8KV4%QVY2Zz-*-#r$<{Y=?z``U`WiRhv0l%c!YEu! z*nNr||2mxouw$$m+~6U)v5G*VL(Vo}>uVj1FzE8?l?XPn;dZf;E=Dd~Y;q9carbtJ zk#$p_H?Mu{q{}c5>;OCI@@pR0A$HQm$c1~0aCE^WLLS9;*hv?WV90|#!cMwi@*xlM z7(3}A5)*l_C)i0Bk+jHzwNGvAKE;cS*0bfoIdc%`3@%y^B!q z2{ep-vx!bWOcCeDaTK$iqL$fG&C znql|VS`kPcMXa4o_2%OZ!hRI6{ao1FzuzM4-vz9Z3w!tD9m4)7V7(YtM3%j3A~YiZ zMJ9uMcb3J;&h{+Yoa#55^UdabvpK)N%?Y|>=DG{|p5gv~cl#9DoLZ*Mp$I+8=49p? z7fntrG&wd4;EQ-X6~0-tzGikz)JF<+FyUvcVs&i;AEt%BUqHl1U(h~h(dh4zs}W%k z(paRjl*V9>9L64wZtSc+UzwlBQVPR;3Uw&xp;^q+SW1B%u*f!r>qygBN?~+3LJA^O zLQZ(|%UDk1)A1*yA;K7>!5>fK`h?;c5#CT57fC*DSCc^x(pa2EYAvAz*E1!UZux$L z1lJ!d!HFO~l>lDVR*Qh*U4+$D3aKM*EZx<#d@mazV~nLEq@_Q9gy$;@YgkG@tsD9D zF}XZ9!czKa%~?i&VT7gh(|WaxJ|=tTHhJj?X{}o}0w#waJ3?9~myD3Hgym~UYwVH{ zGM11UA=Kwaran_rtWk}^;EtX#-j zY=!I#pD>EVcSaZ!XEDgh-*+zm5i#vhw3?axpiEmn zKN1gC7kSgXU$maD2!@Dffv6x-P~v4Tq=JmqU4!q^-QjKyVz{PO=9*fVy`Nvx12Xc2 zH2;Q4wf%^^<6N%2{)qQ|=mqOk*7E6j$8z`v+hV3(-cQTixOj16d8U4OZhVFE^eglp zhse_7yBzo?$31!anWEC)&0lU56>g1NMTNVSyL2L0ykhVlnP0Gi&k?d_naEFMWb;=< zE`Nm{#T&*-B9AYV^(zlf)eB-FEkSApQ}j_L{ytKV%)?{;{oXvhcn(I-Pacqhmq!6& zS*}63(k?gK)#}2#Yx8fuEh29NzD-|i*B-6UxzHiRc>gtY$`vO(}L-hiY;-@}|NnWa{e!5;P5RmsObYd3aW9LUY40qJos^bydmvAt&0thCI4mtby9SE%K zxqM`eXP$|leE^>g=>I;m-CHE=Gn)+pO;~nhQg|cs2Vv6oABss?A$7A+Y{lsu5zWRS z>|)}E!reG=62{6D6^p+3UNZMCHpaLoVvfgHOwQ1)D-Czg{pw3N;qEPmsrVj=kLR6V zinE!uavMz90jB59_z)a(fQL36Gk_Az_%$JW%=BGOq9wQ_Z*u?tb4lRJOzzM$5qfb=|B8cs}20_3$-Yv5-5`yA9`$9 zGWoFNat8hvXBxN;9j)y%{5Fos@dF^t<17GkIJ5>qTd8cU6a{o$pZ`iwsYESrqVERbcY?5W5(Lw>uHW9? zYUw@z!!Q&i75@CG%YD~_kCsz}8#iEd(0RnnVCFG@j@C!Z(Ohq=he$dRGYkW8+3ap$ z1;_$ov*(UI)4`h{uuVRm;bPJg`={mfXGl&?Mb~u&DatzjCd{6K!^Hocqy0;`u?B(V VBxiQCw|7{2=i0W(hms!B`af0-_51(; literal 0 HcmV?d00001 From ffae7beffbd829cf6ff5672254521498015b5a98 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:27 +0200 Subject: [PATCH 0400/3803] - patchlevel 226 --- 7.3.226 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 7.3.226 diff --git a/7.3.226 b/7.3.226 new file mode 100644 index 00000000..0002aa77 --- /dev/null +++ b/7.3.226 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.226 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.226 +Problem: On a 64 bit system "syn sync fromstart" is very slow. (Bjorn + Steinbrink) +Solution: Store the state when starting to parse from the first line. +Files: src/syntax.c + + +*** ../mercurial/vim73/src/syntax.c 2011-05-25 17:56:23.000000000 +0200 +--- src/syntax.c 2011-06-19 04:47:08.000000000 +0200 +*************** +*** 559,565 **** + if (INVALID_STATE(¤t_state)) + { + syn_sync(wp, lnum, last_valid); +! first_stored = current_lnum + syn_block->b_syn_sync_minlines; + } + else + first_stored = current_lnum; +--- 559,571 ---- + if (INVALID_STATE(¤t_state)) + { + syn_sync(wp, lnum, last_valid); +! if (current_lnum == 1) +! /* First line is always valid, no matter "minlines". */ +! first_stored = 1; +! else +! /* Need to parse "minlines" lines before state can be considered +! * valid to store. */ +! first_stored = current_lnum + syn_block->b_syn_sync_minlines; + } + else + first_stored = current_lnum; +*** ../vim-7.3.225/src/version.c 2011-06-19 04:31:54.000000000 +0200 +--- src/version.c 2011-06-19 04:49:53.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 226, + /**/ + +-- +Press any key to continue, press any other key to quit. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From deea3b1c27f8f5ae35b2989ed630b597cf7ed9be Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:28 +0200 Subject: [PATCH 0401/3803] - patchlevel 227 --- 7.3.227 | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 7.3.227 diff --git a/7.3.227 b/7.3.227 new file mode 100644 index 00000000..55d5a9c6 --- /dev/null +++ b/7.3.227 @@ -0,0 +1,109 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.227 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.227 (after 7.3.221) +Problem: Mac OS doesn't have the linewise clipboard fix. +Solution: Also change the Mac OS file. (Bjorn Winckler) +Files: src/os_macosx.m + + +*** ../mercurial/vim73/src/os_macosx.m 2011-06-13 02:03:55.000000000 +0200 +--- src/os_macosx.m 2011-06-20 00:23:57.000000000 +0200 +*************** +*** 65,71 **** + NSString *bestType = [pb availableTypeFromArray:supportedTypes]; + if (!bestType) goto releasepool; + +! int motion_type = MCHAR; + NSString *string = nil; + + if ([bestType isEqual:VimPboardType]) +--- 65,71 ---- + NSString *bestType = [pb availableTypeFromArray:supportedTypes]; + if (!bestType) goto releasepool; + +! int motion_type = MAUTO; + NSString *string = nil; + + if ([bestType isEqual:VimPboardType]) +*************** +*** 89,97 **** + + if (!string) + { +! /* Use NSStringPboardType. The motion type is set to line-wise if the +! * string contains at least one EOL character, otherwise it is set to +! * character-wise (block-wise is never used). + */ + NSMutableString *mstring = + [[pb stringForType:NSStringPboardType] mutableCopy]; +--- 89,95 ---- + + if (!string) + { +! /* Use NSStringPboardType. The motion type is detected automatically. + */ + NSMutableString *mstring = + [[pb stringForType:NSStringPboardType] mutableCopy]; +*************** +*** 108,126 **** + options:0 range:range]; + } + +- /* Scan for newline character to decide whether the string should be +- * pasted line-wise or character-wise. +- */ +- motion_type = MCHAR; +- if (0 < n || NSNotFound != [mstring rangeOfString:@"\n"].location) +- motion_type = MLINE; +- + string = mstring; + } + + if (!(MCHAR == motion_type || MLINE == motion_type || MBLOCK == motion_type + || MAUTO == motion_type)) +! motion_type = MCHAR; + + char_u *str = (char_u*)[string UTF8String]; + int len = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; +--- 106,118 ---- + options:0 range:range]; + } + + string = mstring; + } + ++ /* Default to MAUTO, uses MCHAR or MLINE depending on trailing NL. */ + if (!(MCHAR == motion_type || MLINE == motion_type || MBLOCK == motion_type + || MAUTO == motion_type)) +! motion_type = MAUTO; + + char_u *str = (char_u*)[string UTF8String]; + int len = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; +*** ../vim-7.3.226/src/version.c 2011-06-19 04:54:17.000000000 +0200 +--- src/version.c 2011-06-20 00:21:53.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 227, + /**/ + +-- +Some of the well know MS-Windows errors: + EMULTI Multitasking attempted, system confused + EKEYBOARD Keyboard locked, try getting out of this one! + EXPLAIN Unexplained error, please tell us what happened + EFUTURE Reserved for our future mistakes + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9351dc9f23d5ef1c7299eb5d5c91fc482babd60f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:28 +0200 Subject: [PATCH 0402/3803] - patchlevel 228 --- 7.3.228 | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 7.3.228 diff --git a/7.3.228 b/7.3.228 new file mode 100644 index 00000000..3edede59 --- /dev/null +++ b/7.3.228 @@ -0,0 +1,45 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.228 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.228 +Problem: "2gj" does not always move to the correct position. +Solution: Get length of line after moving to a next line. (James Vega) +Files: src/normal.c + + +*** ../mercurial/vim73/src/normal.c 2011-05-10 17:29:28.000000000 +0200 +--- src/normal.c 2011-06-20 00:41:43.000000000 +0200 +*************** +*** 4533,4538 **** +--- 4533,4539 ---- + } + curwin->w_cursor.lnum++; + curwin->w_curswant %= width2; ++ linelen = linetabsize(ml_get_curline()); + } + } + } +*** ../vim-7.3.227/src/version.c 2011-06-20 00:25:37.000000000 +0200 +--- src/version.c 2011-06-20 00:45:15.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 228, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +197. Your desk collapses under the weight of your computer peripherals. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 921e4a1fe701fd7a9bd2b5d85f42b7a11aee8df4 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:28 +0200 Subject: [PATCH 0403/3803] - patchlevel 229 --- 7.3.229 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 7.3.229 diff --git a/7.3.229 b/7.3.229 new file mode 100644 index 00000000..b133f7a4 --- /dev/null +++ b/7.3.229 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.229 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.229 +Problem: Using fork() makes gvim crash on Mac when build with + CoreFoundation. +Solution: Disallow fork() when __APPLE__ is defined. (Hisashi T Fujinaka) +Files: src/gui.c + + +*** ../mercurial/vim73/src/gui.c 2011-05-10 16:41:13.000000000 +0200 +--- src/gui.c 2011-06-20 00:51:21.000000000 +0200 +*************** +*** 59,65 **** + gui_start() + { + char_u *old_term; +! #if defined(UNIX) && !defined(__BEOS__) && !defined(MACOS_X) + # define MAY_FORK + int dofork = TRUE; + #endif +--- 59,66 ---- + gui_start() + { + char_u *old_term; +! #if defined(UNIX) && !defined(__BEOS__) && !defined(MACOS_X) \ +! && !defined(__APPLE__) + # define MAY_FORK + int dofork = TRUE; + #endif +*** ../vim-7.3.228/src/version.c 2011-06-20 00:45:55.000000000 +0200 +--- src/version.c 2011-06-20 00:50:42.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 229, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +198. You read all the quotes at Netaholics Anonymous and keep thinking + "What's wrong with that?" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 82aa255ca099e7738b8f0ad474d4872029d283b3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:28 +0200 Subject: [PATCH 0404/3803] - patchlevel 230 --- 7.3.230 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 7.3.230 diff --git a/7.3.230 b/7.3.230 new file mode 100644 index 00000000..80fcdf13 --- /dev/null +++ b/7.3.230 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.230 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.230 +Problem: ":wundo" and ":rundo" don't unescape their argument. (Aaron + Thoma) +Solution: Use FILE1 instead of XFILE. +Files: src/ex_cmds.h + + +*** ../mercurial/vim73/src/ex_cmds.h 2010-08-20 11:09:02.000000000 +0200 +--- src/ex_cmds.h 2011-06-20 04:44:13.000000000 +0200 +*************** +*** 788,794 **** + EX(CMD_rubyfile, "rubyfile", ex_rubyfile, + RANGE|FILE1|NEEDARG|CMDWIN), + EX(CMD_rundo, "rundo", ex_rundo, +! NEEDARG|EXTRA|XFILE), + EX(CMD_rviminfo, "rviminfo", ex_viminfo, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_substitute, "substitute", do_sub, +--- 788,794 ---- + EX(CMD_rubyfile, "rubyfile", ex_rubyfile, + RANGE|FILE1|NEEDARG|CMDWIN), + EX(CMD_rundo, "rundo", ex_rundo, +! NEEDARG|FILE1), + EX(CMD_rviminfo, "rviminfo", ex_viminfo, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_substitute, "substitute", do_sub, +*************** +*** 1078,1084 **** + EX(CMD_wsverb, "wsverb", ex_wsverb, + EXTRA|NOTADR|NEEDARG), + EX(CMD_wundo, "wundo", ex_wundo, +! BANG|NEEDARG|EXTRA|XFILE), + EX(CMD_wviminfo, "wviminfo", ex_viminfo, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_xit, "xit", ex_exit, +--- 1078,1084 ---- + EX(CMD_wsverb, "wsverb", ex_wsverb, + EXTRA|NOTADR|NEEDARG), + EX(CMD_wundo, "wundo", ex_wundo, +! BANG|NEEDARG|FILE1), + EX(CMD_wviminfo, "wviminfo", ex_viminfo, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_xit, "xit", ex_exit, +*** ../vim-7.3.229/src/version.c 2011-06-20 00:53:10.000000000 +0200 +--- src/version.c 2011-06-20 05:02:40.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 230, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +201. When somebody asks you where you are, you tell them in which chat room. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5750f2f6f1a52d1185128657cfb6c1d7b19cd8ab Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:29 +0200 Subject: [PATCH 0405/3803] - patchlevel 231 --- 7.3.231 | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 7.3.231 diff --git a/7.3.231 b/7.3.231 new file mode 100644 index 00000000..266d0a2b --- /dev/null +++ b/7.3.231 @@ -0,0 +1,128 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.231 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Note: this is a weird patch, it redoes patches from 7.3.202 and 7.3.203 +that failed when applied as a patch, but the mercurial repository +already had this, thus won't change anything there. + + +Patch 7.3.231 +Problem: Runtime file patches failed. +Solution: Redo the patches made against the patched files instead of the + files in the mercurial repository. +Files: runtime/doc/indent.txt, runtime/doc/os_win32.txt + + +*** ../vim-7.3.230/runtime/doc/indent.txt 2011-05-25 15:16:06.000000000 +0200 +--- runtime/doc/indent.txt 2011-05-31 22:23:39.000000000 +0200 +*************** +*** 356,363 **** + BaseClass(3) BaseClass(3) + {} {} + < +! +N Indent a continuation line (a line that spills onto the next) N +! additional characters. (default 'shiftwidth'). + + cino= cino=+10 > + a = b + 9 * a = b + 9 * +--- 357,368 ---- + BaseClass(3) BaseClass(3) + {} {} + < +! *cino-+* +! +N Indent a continuation line (a line that spills onto the next) +! inside a function N additional characters. (default +! 'shiftwidth'). +! Outside of a function, when the previous line ended in a +! backslash, the 2 * N is used. + + cino= cino=+10 > + a = b + 9 * a = b + 9 * +*************** +*** 509,522 **** +--- 514,532 ---- + } + } + < ++ *cino-)* + )N Vim searches for unclosed parentheses at most N lines away. + This limits the time needed to search for parentheses. (default + 20 lines). + ++ *cino-star* + *N Vim searches for unclosed comments at most N lines away. This + limits the time needed to search for the start of a comment. ++ If your /* */ comments stop indenting afer N lines this is the ++ value you will want to change. + (default 70 lines). + ++ *cino-#* + #N When N is non-zero recognize shell/Perl comments, starting with + '#'. Default N is zero: don't recognizes '#' comments. Note + that lines starting with # will still be seen as preprocessor +*** ../vim-7.3.230/runtime/doc/os_win32.txt 2010-08-15 21:57:16.000000000 +0200 +--- runtime/doc/os_win32.txt 2011-05-28 18:17:58.000000000 +0200 +*************** +*** 313,318 **** +--- 313,349 ---- + with :!start do not get passed Vim's open file handles, which means they do + not have to be closed before Vim. + To avoid this special treatment, use ":! start". ++ There are two optional arguments (see the next Q): ++ /min the window will be minimized. ++ /b" no console window will be opened ++ You can only one of these flags at a time. A second second one will be ++ treated as the start of the command. ++ ++ Q. How do I avoid getting a window for programs that I run asynchronously? ++ A. You have two possible solutions depending on what exactly do you want: ++ 1) You may use the /min flag in order to run program in a minimized state ++ with no other changes. It will work equally for console and GUI ++ applications. ++ 2) You can use the /b flag to run console applications without creating a ++ console window for them (GUI applications are not affected). But you ++ should use this flag only if the application you run doesn't require any ++ input. Otherwise it will get an EOF error because its input stream ++ (stdin) would be redirected to \\.\NUL (stdoud and stderr too). ++ ++ Example for a console application, run Exuberant ctags: > ++ :!start /min ctags -R . ++ < When it has finished you should see file named "tags" in your current ++ directory. You should notice the window title blinking on your taskbar. ++ This is more noticable for commands that take longer. ++ Now delete the "tags" file and run this command: > ++ :!start /b ctags -R . ++ < You should have the same "tags" file, but this time there will be no ++ blinking on the taskbar. ++ Example for a GUI application: > ++ :!start /min notepad ++ :!start /b notepad ++ < The first command runs notepad minimized and the second one runs it ++ normally. + + Q. I'm using Win32s, and when I try to run an external command like "make", + Vim doesn't wait for it to finish! Help! +*** ../vim-7.3.230/src/version.c 2011-06-20 05:02:53.000000000 +0200 +--- src/version.c 2011-06-26 03:14:03.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 231, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +222. You send more than 20 personal e-mails a day. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 595450420863856f08d3b003bae7accc8c6c9d6d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:29 +0200 Subject: [PATCH 0406/3803] - patchlevel 232 --- 7.3.232 | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 7.3.232 diff --git a/7.3.232 b/7.3.232 new file mode 100644 index 00000000..982d7478 --- /dev/null +++ b/7.3.232 @@ -0,0 +1,84 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.232 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.232 +Problem: Python doesn't compile without +multi_byte +Solution: Use "latin1" when MULTI_BYTE is not defined. +Files: src/if_py_both.h + + +*** ../vim-7.3.231/src/if_py_both.h 2011-06-19 00:27:46.000000000 +0200 +--- src/if_py_both.h 2011-06-26 03:58:07.000000000 +0200 +*************** +*** 12,17 **** +--- 12,23 ---- + * Common code for if_python.c and if_python3.c. + */ + ++ #ifdef FEAT_MBYTE ++ # define ENC_OPT p_enc ++ #else ++ # define ENC_OPT "latin1" ++ #endif ++ + /* + * obtain a lock on the Vim data structures + */ +*************** +*** 68,74 **** + char *str = NULL; + int error = ((OutputObject *)(self))->error; + +! if (!PyArg_ParseTuple(args, "es#", p_enc, &str, &len)) + return NULL; + + Py_BEGIN_ALLOW_THREADS +--- 74,80 ---- + char *str = NULL; + int error = ((OutputObject *)(self))->error; + +! if (!PyArg_ParseTuple(args, "es#", ENC_OPT, &str, &len)) + return NULL; + + Py_BEGIN_ALLOW_THREADS +*************** +*** 108,114 **** + char *str = NULL; + PyInt len; + +! if (!PyArg_Parse(line, "es#", p_enc, &str, &len)) { + PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings")); + Py_DECREF(list); + return NULL; +--- 114,120 ---- + char *str = NULL; + PyInt len; + +! if (!PyArg_Parse(line, "es#", ENC_OPT, &str, &len)) { + PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings")); + Py_DECREF(list); + return NULL; +*** ../vim-7.3.231/src/version.c 2011-06-26 03:16:58.000000000 +0200 +--- src/version.c 2011-06-26 04:00:40.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 232, + /**/ + +-- +If evolution theories are correct, humans will soon grow a third +hand for operating the mouse. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d8eb1cf056460cabb071605e180b90a0e0c9bfaa Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:29 +0200 Subject: [PATCH 0407/3803] - patchlevel 233 --- 7.3.233 | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 7.3.233 diff --git a/7.3.233 b/7.3.233 new file mode 100644 index 00000000..2dcbf89a --- /dev/null +++ b/7.3.233 @@ -0,0 +1,81 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.233 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.233 +Problem: ":scriptnames" and ":breaklist" show long file names. +Solution: Shorten to use "~/" when possible. (Jean-Rene David) +Files: src/ex_cmds2.c + + +*** ../vim-7.3.232/src/ex_cmds2.c 2011-05-19 18:26:34.000000000 +0200 +--- src/ex_cmds2.c 2011-06-26 04:20:24.000000000 +0200 +*************** +*** 682,691 **** + for (i = 0; i < dbg_breakp.ga_len; ++i) + { + bp = &BREAKP(i); + smsg((char_u *)_("%3d %s %s line %ld"), + bp->dbg_nr, + bp->dbg_type == DBG_FUNC ? "func" : "file", +! bp->dbg_name, + (long)bp->dbg_lnum); + } + } +--- 682,693 ---- + for (i = 0; i < dbg_breakp.ga_len; ++i) + { + bp = &BREAKP(i); ++ if (bp->dbg_type == DBG_FILE) ++ home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, TRUE); + smsg((char_u *)_("%3d %s %s line %ld"), + bp->dbg_nr, + bp->dbg_type == DBG_FUNC ? "func" : "file", +! bp->dbg_type == DBG_FUNC ? bp->dbg_name : NameBuff, + (long)bp->dbg_lnum); + } + } +*************** +*** 3268,3274 **** + + for (i = 1; i <= script_items.ga_len && !got_int; ++i) + if (SCRIPT_ITEM(i).sn_name != NULL) +! smsg((char_u *)"%3d: %s", i, SCRIPT_ITEM(i).sn_name); + } + + # if defined(BACKSLASH_IN_FILENAME) || defined(PROTO) +--- 3270,3280 ---- + + for (i = 1; i <= script_items.ga_len && !got_int; ++i) + if (SCRIPT_ITEM(i).sn_name != NULL) +! { +! home_replace(NULL, SCRIPT_ITEM(i).sn_name, +! NameBuff, MAXPATHL, TRUE); +! smsg((char_u *)"%3d: %s", i, NameBuff); +! } + } + + # if defined(BACKSLASH_IN_FILENAME) || defined(PROTO) +*** ../vim-7.3.232/src/version.c 2011-06-26 04:01:37.000000000 +0200 +--- src/version.c 2011-06-26 04:23:48.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 233, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +223. You set up a web-cam as your home's security system. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f8aa5585951d348825a66efeaaa5f01018959a33 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:30 +0200 Subject: [PATCH 0408/3803] - patchlevel 234 --- 7.3.234 | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 7.3.234 diff --git a/7.3.234 b/7.3.234 new file mode 100644 index 00000000..a60df3db --- /dev/null +++ b/7.3.234 @@ -0,0 +1,178 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.234 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.234 +Problem: With GTK menu may be popping down. +Solution: Use event time instead of GDK_CURRENT_TIME. (Hong Xu) +Files: src/gui.c, src/gui.h, src/gui_gtk.c, src/gui_gtk_x11.c + + +*** ../vim-7.3.233/src/gui.c 2011-06-20 00:53:10.000000000 +0200 +--- src/gui.c 2011-06-26 04:38:09.000000000 +0200 +*************** +*** 84,89 **** +--- 84,93 ---- + gui.starting = TRUE; + full_screen = FALSE; + ++ #ifdef FEAT_GUI_GTK ++ gui.event_time = GDK_CURRENT_TIME; ++ #endif ++ + #ifdef MAY_FORK + if (!gui.dofork || vim_strchr(p_go, GO_FORG) || recursive) + dofork = FALSE; +*** ../vim-7.3.233/src/gui.h 2011-05-10 16:41:13.000000000 +0200 +--- src/gui.h 2011-06-26 04:41:21.000000000 +0200 +*************** +*** 401,406 **** +--- 401,408 ---- + GtkAccelGroup *accel_group; + GtkWidget *filedlg; /* file selection dialog */ + char_u *browse_fname; /* file name from filedlg */ ++ ++ guint32 event_time; + #endif /* FEAT_GUI_GTK */ + + #if defined(FEAT_GUI_TABLINE) \ +*** ../vim-7.3.233/src/gui_gtk.c 2011-01-17 20:08:03.000000000 +0100 +--- src/gui_gtk.c 2011-06-26 04:38:09.000000000 +0200 +*************** +*** 1391,1397 **** + gtk_menu_popup(GTK_MENU(menu->submenu_id), + NULL, NULL, + (GtkMenuPositionFunc)NULL, NULL, +! 3U, (guint32)GDK_CURRENT_TIME); + } + + /* Ugly global variable to pass "mouse_pos" flag from gui_make_popup() to +--- 1391,1397 ---- + gtk_menu_popup(GTK_MENU(menu->submenu_id), + NULL, NULL, + (GtkMenuPositionFunc)NULL, NULL, +! 3U, gui.event_time); + } + + /* Ugly global variable to pass "mouse_pos" flag from gui_make_popup() to +*** ../vim-7.3.233/src/gui_gtk_x11.c 2011-06-19 01:14:22.000000000 +0200 +--- src/gui_gtk_x11.c 2011-06-26 04:39:57.000000000 +0200 +*************** +*** 88,95 **** + # include + #endif + +- static guint32 clipboard_event_time = CurrentTime; +- + /* + * Easy-to-use macro for multihead support. + */ +--- 88,93 ---- +*************** +*** 934,940 **** + guint state; + char_u *s, *d; + +! clipboard_event_time = event->time; + key_sym = event->keyval; + state = event->state; + +--- 932,938 ---- + guint state; + char_u *s, *d; + +! gui.event_time = event->time; + key_sym = event->keyval; + state = event->state; + +*************** +*** 1129,1135 **** + GdkEventKey *event, + gpointer data UNUSED) + { +! clipboard_event_time = event->time; + /* + * GTK+ 2 input methods may do fancy stuff on key release events too. + * With the default IM for instance, you can enter any UCS code point +--- 1127,1133 ---- + GdkEventKey *event, + gpointer data UNUSED) + { +! gui.event_time = event->time; + /* + * GTK+ 2 input methods may do fancy stuff on key release events too. + * With the default IM for instance, you can enter any UCS code point +*************** +*** 1622,1628 **** + int x, y; + int_u vim_modifiers; + +! clipboard_event_time = event->time; + + /* Make sure we have focus now we've been selected */ + if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget)) +--- 1620,1626 ---- + int x, y; + int_u vim_modifiers; + +! gui.event_time = event->time; + + /* Make sure we have focus now we've been selected */ + if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget)) +*************** +*** 1733,1739 **** + int x, y; + int_u vim_modifiers; + +! clipboard_event_time = event->time; + + /* Remove any motion "machine gun" timers used for automatic further + extension of allocation areas if outside of the applications window +--- 1731,1737 ---- + int x, y; + int_u vim_modifiers; + +! gui.event_time = event->time; + + /* Remove any motion "machine gun" timers used for automatic further + extension of allocation areas if outside of the applications window +*************** +*** 5654,5660 **** + int success; + + success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom, +! clipboard_event_time); + gui_mch_update(); + return (success) ? OK : FAIL; + } +--- 5652,5658 ---- + int success; + + success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom, +! gui.event_time); + gui_mch_update(); + return (success) ? OK : FAIL; + } +*** ../vim-7.3.233/src/version.c 2011-06-26 04:25:24.000000000 +0200 +--- src/version.c 2011-06-26 04:47:02.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 234, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +225. You sign up for free subscriptions for all the computer magazines + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b66587dedb45ed56793817638e2251f57dcd7e3e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:30 +0200 Subject: [PATCH 0409/3803] - patchlevel 235 --- 7.3.235 | 360 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 360 insertions(+) create mode 100644 7.3.235 diff --git a/7.3.235 b/7.3.235 new file mode 100644 index 00000000..a852c852 --- /dev/null +++ b/7.3.235 @@ -0,0 +1,360 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.235 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.235 +Problem: ";" gets stuck on a "t" command, it's not useful. +Solution: Add the ';' flag in 'cpo'. (Christian Brabandt) +Files: runtime/doc/motion.txt, runtime/doc/options.txt, src/option.h, + src/search.c src/testdir/test81.in, src/testdir/test81.ok, + src/testdir/Makefile, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + + +*** ../vim-7.3.234/runtime/doc/motion.txt 2010-08-15 21:57:17.000000000 +0200 +--- runtime/doc/motion.txt 2011-06-26 05:15:58.000000000 +0200 +*************** +*** 269,279 **** + {char} can be entered like with the |f| command. + + *;* +! ; Repeat latest f, t, F or T [count] times. + + *,* + , Repeat latest f, t, F or T in opposite direction +! [count] times. + + ============================================================================== + 3. Up-down motions *up-down-motions* +--- 269,279 ---- + {char} can be entered like with the |f| command. + + *;* +! ; Repeat latest f, t, F or T [count] times. See |cpo-;| + + *,* + , Repeat latest f, t, F or T in opposite direction +! [count] times. See also |cpo-;| + + ============================================================================== + 3. Up-down motions *up-down-motions* +*** ../vim-7.3.234/runtime/doc/options.txt 2011-06-12 20:42:17.000000000 +0200 +--- runtime/doc/options.txt 2011-06-26 05:15:58.000000000 +0200 +*************** +*** 2090,2095 **** +--- 2117,2128 ---- + *cpo->* + > When appending to a register, put a line break before + the appended text. ++ *cpo-;* ++ ; When using |,| or |;| to repeat the last |t| search ++ and the cursor is right in front of the searched ++ character, the cursor won't move. When not included, ++ the cursor would skip over it and jump to the ++ following occurence. + + POSIX flags. These are not included in the Vi default value, except + when $VIM_POSIX was set on startup. |posix| +*** ../vim-7.3.234/src/option.h 2011-06-12 22:13:37.000000000 +0200 +--- src/option.h 2011-06-26 05:17:58.000000000 +0200 +*************** +*** 169,178 **** + #define CPO_SUBPERCENT '/' /* % in :s string uses previous one */ + #define CPO_BACKSL '\\' /* \ is not special in [] */ + #define CPO_CHDIR '.' /* don't chdir if buffer is modified */ + /* default values for Vim, Vi and POSIX */ + #define CPO_VIM "aABceFs" +! #define CPO_VI "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>" +! #define CPO_ALL "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>#{|&/\\." + + /* characters for p_ww option: */ + #define WW_ALL "bshl<>[],~" +--- 169,180 ---- + #define CPO_SUBPERCENT '/' /* % in :s string uses previous one */ + #define CPO_BACKSL '\\' /* \ is not special in [] */ + #define CPO_CHDIR '.' /* don't chdir if buffer is modified */ ++ #define CPO_SCOLON ';' /* using "," and ";" will skip over char if ++ * cursor would not move */ + /* default values for Vim, Vi and POSIX */ + #define CPO_VIM "aABceFs" +! #define CPO_VI "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>;" +! #define CPO_ALL "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>#{|&/\\.;" + + /* characters for p_ww option: */ + #define WW_ALL "bshl<>[],~" +*** ../vim-7.3.234/src/search.c 2011-05-10 16:41:13.000000000 +0200 +--- src/search.c 2011-06-26 05:20:45.000000000 +0200 +*************** +*** 1546,1551 **** +--- 1546,1552 ---- + int col; + char_u *p; + int len; ++ int stop = TRUE; + #ifdef FEAT_MBYTE + static char_u bytes[MB_MAXBYTES]; + static int bytelen = 1; /* >1 for multi-byte char */ +*************** +*** 1580,1585 **** +--- 1581,1592 ---- + t_cmd = last_t_cmd; + c = lastc; + /* For multi-byte re-use last bytes[] and bytelen. */ ++ ++ /* Force a move of at least one char, so ";" and "," will move the ++ * cursor, even if the cursor is right in front of char we are looking ++ * at. */ ++ if (vim_strchr(p_cpo, CPO_SCOLON) == NULL && count == 1) ++ stop = FALSE; + } + + if (dir == BACKWARD) +*************** +*** 1612,1625 **** + } + if (bytelen == 1) + { +! if (p[col] == c) + break; + } + else + { +! if (vim_memcmp(p + col, bytes, bytelen) == 0) + break; + } + } + } + else +--- 1619,1633 ---- + } + if (bytelen == 1) + { +! if (p[col] == c && stop) + break; + } + else + { +! if (vim_memcmp(p + col, bytes, bytelen) == 0 && stop) + break; + } ++ stop = TRUE; + } + } + else +*************** +*** 1629,1636 **** + { + if ((col += dir) < 0 || col >= len) + return FAIL; +! if (p[col] == c) + break; + } + } + } +--- 1637,1645 ---- + { + if ((col += dir) < 0 || col >= len) + return FAIL; +! if (p[col] == c && stop) + break; ++ stop = TRUE; + } + } + } +*** ../vim-7.3.234/src/testdir/test81.in 2011-06-26 05:34:33.000000000 +0200 +--- src/testdir/test81.in 2011-06-26 05:30:31.000000000 +0200 +*************** +*** 0 **** +--- 1,18 ---- ++ Test for t movement command and 'cpo-;' setting ++ ++ STARTTEST ++ :set nocompatible ++ :set cpo-=; ++ /firstline/ ++ j0tt;D ++ $Ty;D:set cpo+=; ++ j0tt;;D ++ $Ty;;D:?firstline?+1,$w! test.out ++ :qa! ++ ENDTEST ++ ++ firstline ++ aaa two three four ++ bbb yee yoo four ++ ccc two three four ++ ddd yee yoo four +*** ../vim-7.3.234/src/testdir/test81.ok 2011-06-26 05:34:33.000000000 +0200 +--- src/testdir/test81.ok 2011-06-26 05:31:33.000000000 +0200 +*************** +*** 0 **** +--- 1,4 ---- ++ aaa two ++ bbb y ++ ccc ++ ddd yee y +*** ../vim-7.3.234/src/testdir/Makefile 2011-06-19 04:31:54.000000000 +0200 +--- src/testdir/Makefile 2011-06-26 05:09:56.000000000 +0200 +*************** +*** 26,32 **** + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out + + SCRIPTS_GUI = test16.out + +--- 26,32 ---- + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.3.234/src/testdir/Make_amiga.mak 2011-06-19 04:31:54.000000000 +0200 +--- src/testdir/Make_amiga.mak 2011-06-26 05:09:07.000000000 +0200 +*************** +*** 28,34 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out test78.out test79.out test80.out + + .SUFFIXES: .in .out + +--- 28,35 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out test78.out test79.out test80.out \ +! test81.out + + .SUFFIXES: .in .out + +*************** +*** 128,130 **** +--- 129,132 ---- + test78.out: test78.in + test79.out: test79.in + test80.out: test80.in ++ test81.out: test81.in +*** ../vim-7.3.234/src/testdir/Make_dos.mak 2011-06-19 04:31:54.000000000 +0200 +--- src/testdir/Make_dos.mak 2011-06-26 05:09:16.000000000 +0200 +*************** +*** 29,35 **** + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out + + SCRIPTS32 = test50.out test70.out + +--- 29,35 ---- + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.234/src/testdir/Make_ming.mak 2011-06-19 04:31:54.000000000 +0200 +--- src/testdir/Make_ming.mak 2011-06-26 05:09:24.000000000 +0200 +*************** +*** 49,55 **** + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out + + SCRIPTS32 = test50.out test70.out + +--- 49,55 ---- + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.234/src/testdir/Make_os2.mak 2011-06-19 04:31:54.000000000 +0200 +--- src/testdir/Make_os2.mak 2011-06-26 05:09:33.000000000 +0200 +*************** +*** 28,34 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out test78.out test79.out test80.out + + .SUFFIXES: .in .out + +--- 28,35 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out test78.out test79.out test80.out \ +! test81.out + + .SUFFIXES: .in .out + +*** ../vim-7.3.234/src/testdir/Make_vms.mms 2011-06-19 04:31:54.000000000 +0200 +--- src/testdir/Make_vms.mms 2011-06-26 05:09:42.000000000 +0200 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Jun 19 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Jun 26 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +*************** +*** 75,81 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ + test71.out test72.out test74.out test75.out test76.out \ +! test77.out test78.out test79.out test80.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 75,81 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ + test71.out test72.out test74.out test75.out test76.out \ +! test77.out test78.out test79.out test80.out test81.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.3.234/src/version.c 2011-06-26 04:48:56.000000000 +0200 +--- src/version.c 2011-06-26 05:33:53.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 235, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +226. You sit down at the computer right after dinner and your spouse + says "See you in the morning." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a72b1a0cf519a21bd6a33d6c5da46178f220ff7a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:30 +0200 Subject: [PATCH 0410/3803] - patchlevel 236 --- 7.3.236 | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 7.3.236 diff --git a/7.3.236 b/7.3.236 new file mode 100644 index 00000000..3be69e30 --- /dev/null +++ b/7.3.236 @@ -0,0 +1,87 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.236 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.236 (after 7.3.232) +Problem: Python 3 doesn't compile without +multi_byte +Solution: Use "latin1" when MULTI_BYTE is not defined. (lilydjwg) +Files: src/if_python3.c + + +*** ../vim-7.3.235/src/if_python3.c 2011-06-19 00:27:46.000000000 +0200 +--- src/if_python3.c 2011-06-26 19:10:57.000000000 +0200 +*************** +*** 70,76 **** + + #define PyInt Py_ssize_t + #define PyString_Check(obj) PyUnicode_Check(obj) +! #define PyString_AsBytes(obj) PyUnicode_AsEncodedString(obj, (char *)p_enc, NULL); + #define PyString_FreeBytes(obj) Py_XDECREF(bytes) + #define PyString_AsString(obj) PyBytes_AsString(obj) + #define PyString_Size(obj) PyBytes_GET_SIZE(bytes) +--- 70,76 ---- + + #define PyInt Py_ssize_t + #define PyString_Check(obj) PyUnicode_Check(obj) +! #define PyString_AsBytes(obj) PyUnicode_AsEncodedString(obj, (char *)ENC_OPT, NULL); + #define PyString_FreeBytes(obj) Py_XDECREF(bytes) + #define PyString_AsString(obj) PyBytes_AsString(obj) + #define PyString_Size(obj) PyBytes_GET_SIZE(bytes) +*************** +*** 661,667 **** + + /* PyRun_SimpleString expects a UTF-8 string. Wrong encoding may cause + * SyntaxError (unicode error). */ +! cmdstr = PyUnicode_Decode(cmd, strlen(cmd), (char *)p_enc, NULL); + cmdbytes = PyUnicode_AsEncodedString(cmdstr, "utf-8", NULL); + Py_XDECREF(cmdstr); + PyRun_SimpleString(PyBytes_AsString(cmdbytes)); +--- 661,667 ---- + + /* PyRun_SimpleString expects a UTF-8 string. Wrong encoding may cause + * SyntaxError (unicode error). */ +! cmdstr = PyUnicode_Decode(cmd, strlen(cmd), (char *)ENC_OPT, NULL); + cmdbytes = PyUnicode_AsEncodedString(cmdstr, "utf-8", NULL); + Py_XDECREF(cmdstr); + PyRun_SimpleString(PyBytes_AsString(cmdbytes)); +*************** +*** 1463,1469 **** + } + *p = '\0'; + +! result = PyUnicode_Decode(tmp, len, (char *)p_enc, NULL); + + vim_free(tmp); + return result; +--- 1463,1469 ---- + } + *p = '\0'; + +! result = PyUnicode_Decode(tmp, len, (char *)ENC_OPT, NULL); + + vim_free(tmp); + return result; +*** ../vim-7.3.235/src/version.c 2011-06-26 05:36:07.000000000 +0200 +--- src/version.c 2011-06-26 19:12:12.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 236, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +228. You spend Saturday night making the counter on your home page + pass that 2000 mark. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 3767eb8d9b625ac25af5b9bfb89fd9a96355acc1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:31 +0200 Subject: [PATCH 0411/3803] - patchlevel 237 --- 7.3.237 | 222 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 222 insertions(+) create mode 100644 7.3.237 diff --git a/7.3.237 b/7.3.237 new file mode 100644 index 00000000..ead50ca6 --- /dev/null +++ b/7.3.237 @@ -0,0 +1,222 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.237 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.237 +Problem: "filetype" completion doesn't work on Windows. (Yue Wu) +Solution: Don't use a glob pattern for the directories, use a list of + directories. (Dominique Pelle) +Files: src/ex_getln.c + + +*** ../vim-7.3.236/src/ex_getln.c 2011-05-19 18:26:34.000000000 +0200 +--- src/ex_getln.c 2011-06-26 19:36:36.000000000 +0200 +*************** +*** 110,116 **** + static int expand_showtail __ARGS((expand_T *xp)); + #ifdef FEAT_CMDL_COMPL + static int expand_shellcmd __ARGS((char_u *filepat, int *num_file, char_u ***file, int flagsarg)); +! static int ExpandRTDir __ARGS((char_u *pat, int *num_file, char_u ***file, char *dirname)); + # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) + static int ExpandUserDefined __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file)); + static int ExpandUserList __ARGS((expand_T *xp, int *num_file, char_u ***file)); +--- 110,116 ---- + static int expand_showtail __ARGS((expand_T *xp)); + #ifdef FEAT_CMDL_COMPL + static int expand_shellcmd __ARGS((char_u *filepat, int *num_file, char_u ***file, int flagsarg)); +! static int ExpandRTDir __ARGS((char_u *pat, int *num_file, char_u ***file, char *dirname[])); + # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) + static int ExpandUserDefined __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file)); + static int ExpandUserList __ARGS((expand_T *xp, int *num_file, char_u ***file)); +*************** +*** 4536,4548 **** + || xp->xp_context == EXPAND_TAGS_LISTFILES) + return expand_tags(xp->xp_context == EXPAND_TAGS, pat, num_file, file); + if (xp->xp_context == EXPAND_COLORS) +! return ExpandRTDir(pat, num_file, file, "colors"); + if (xp->xp_context == EXPAND_COMPILER) +! return ExpandRTDir(pat, num_file, file, "compiler"); + if (xp->xp_context == EXPAND_OWNSYNTAX) +! return ExpandRTDir(pat, num_file, file, "syntax"); + if (xp->xp_context == EXPAND_FILETYPE) +! return ExpandRTDir(pat, num_file, file, "{syntax,indent,ftplugin}"); + # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) + if (xp->xp_context == EXPAND_USER_LIST) + return ExpandUserList(xp, num_file, file); +--- 4536,4560 ---- + || xp->xp_context == EXPAND_TAGS_LISTFILES) + return expand_tags(xp->xp_context == EXPAND_TAGS, pat, num_file, file); + if (xp->xp_context == EXPAND_COLORS) +! { +! char *directories[] = {"colors", NULL}; +! return ExpandRTDir(pat, num_file, file, directories); +! } + if (xp->xp_context == EXPAND_COMPILER) +! { +! char *directories[] = {"colors", NULL}; +! return ExpandRTDir(pat, num_file, file, directories); +! } + if (xp->xp_context == EXPAND_OWNSYNTAX) +! { +! char *directories[] = {"syntax", NULL}; +! return ExpandRTDir(pat, num_file, file, directories); +! } + if (xp->xp_context == EXPAND_FILETYPE) +! { +! char *directories[] = {"syntax", "indent", "ftplugin", NULL}; +! return ExpandRTDir(pat, num_file, file, directories); +! } + # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) + if (xp->xp_context == EXPAND_USER_LIST) + return ExpandUserList(xp, num_file, file); +*************** +*** 4995,5051 **** + /* + * Expand color scheme, compiler or filetype names: + * 'runtimepath'/{dirnames}/{pat}.vim +! * dirnames may contain one directory (ex: "colorscheme") or can be a glob +! * expression matching multiple directories (ex: "{syntax,ftplugin,indent}"). + */ + static int + ExpandRTDir(pat, num_file, file, dirnames) + char_u *pat; + int *num_file; + char_u ***file; +! char *dirnames; + { +! char_u *all; + char_u *s; + char_u *e; + garray_T ga; + + *num_file = 0; + *file = NULL; +! s = alloc((unsigned)(STRLEN(pat) + STRLEN(dirnames) + 7)); +! if (s == NULL) +! return FAIL; +! sprintf((char *)s, "%s/%s*.vim", dirnames, pat); +! all = globpath(p_rtp, s, 0); +! vim_free(s); +! if (all == NULL) +! return FAIL; + +! ga_init2(&ga, (int)sizeof(char *), 3); +! for (s = all; *s != NUL; s = e) + { +! e = vim_strchr(s, '\n'); +! if (e == NULL) +! e = s + STRLEN(s); +! if (ga_grow(&ga, 1) == FAIL) +! break; +! if (e - 4 > s && STRNICMP(e - 4, ".vim", 4) == 0) + { +! for (s = e - 4; s > all; mb_ptr_back(all, s)) +! if (*s == '\n' || vim_ispathsep(*s)) +! break; +! ++s; +! ((char_u **)ga.ga_data)[ga.ga_len] = + vim_strnsave(s, (int)(e - s - 4)); +! ++ga.ga_len; + } +! if (*e != NUL) +! ++e; + } +! vim_free(all); + + /* Sort and remove duplicates which can happen when specifying multiple +! * directories in dirnames such as "{syntax,ftplugin,indent}". */ + remove_duplicates(&ga); + + *file = ga.ga_data; +--- 5007,5074 ---- + /* + * Expand color scheme, compiler or filetype names: + * 'runtimepath'/{dirnames}/{pat}.vim +! * "dirnames" is an array with one or more directory names. + */ + static int + ExpandRTDir(pat, num_file, file, dirnames) + char_u *pat; + int *num_file; + char_u ***file; +! char *dirnames[]; + { +! char_u *matches; + char_u *s; + char_u *e; + garray_T ga; ++ int i; ++ int pat_len; + + *num_file = 0; + *file = NULL; +! pat_len = STRLEN(pat); +! ga_init2(&ga, (int)sizeof(char *), 10); + +! for (i = 0; dirnames[i] != NULL; ++i) + { +! s = alloc((unsigned)(STRLEN(dirnames[i]) + pat_len + 7)); +! if (s == NULL) + { +! ga_clear_strings(&ga); +! return FAIL; +! } +! sprintf((char *)s, "%s/%s*.vim", dirnames[i], pat); +! matches = globpath(p_rtp, s, 0); +! vim_free(s); +! if (matches == NULL) +! continue; +! +! for (s = matches; *s != NUL; s = e) +! { +! e = vim_strchr(s, '\n'); +! if (e == NULL) +! e = s + STRLEN(s); +! if (ga_grow(&ga, 1) == FAIL) +! break; +! if (e - 4 > s && STRNICMP(e - 4, ".vim", 4) == 0) +! { +! for (s = e - 4; s > matches; mb_ptr_back(matches, s)) +! if (*s == '\n' || vim_ispathsep(*s)) +! break; +! ++s; +! ((char_u **)ga.ga_data)[ga.ga_len] = + vim_strnsave(s, (int)(e - s - 4)); +! ++ga.ga_len; +! } +! if (*e != NUL) +! ++e; + } +! vim_free(matches); + } +! if (ga.ga_len == 0) +! return FAIL; + + /* Sort and remove duplicates which can happen when specifying multiple +! * directories in dirnames. */ + remove_duplicates(&ga); + + *file = ga.ga_data; +*** ../vim-7.3.236/src/version.c 2011-06-26 19:13:33.000000000 +0200 +--- src/version.c 2011-06-26 19:39:39.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 237, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +230. You spend your Friday nights typing away at your keyboard + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e4bc04dddbb1e09169fdfa8a68188e13ad067f1b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:31 +0200 Subject: [PATCH 0412/3803] - patchlevel 238 --- 7.3.238 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 7.3.238 diff --git a/7.3.238 b/7.3.238 new file mode 100644 index 00000000..289b1a43 --- /dev/null +++ b/7.3.238 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.238 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.238 +Problem: Compiler warning for conversion. +Solution: Add type cast. (Mike Williams) +Files: src/ex_getln.c + + +*** ../vim-7.3.237/src/ex_getln.c 2011-06-26 19:40:14.000000000 +0200 +--- src/ex_getln.c 2011-07-04 14:23:27.000000000 +0200 +*************** +*** 5025,5031 **** + + *num_file = 0; + *file = NULL; +! pat_len = STRLEN(pat); + ga_init2(&ga, (int)sizeof(char *), 10); + + for (i = 0; dirnames[i] != NULL; ++i) +--- 5025,5031 ---- + + *num_file = 0; + *file = NULL; +! pat_len = (int)STRLEN(pat); + ga_init2(&ga, (int)sizeof(char *), 10); + + for (i = 0; dirnames[i] != NULL; ++i) +*** ../vim-7.3.237/src/version.c 2011-06-26 19:40:14.000000000 +0200 +--- src/version.c 2011-07-07 15:04:00.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 238, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +255. You work for a newspaper and your editor asks you to write an + article about Internet addiction...in the "first person." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From aa9e9961ff240ba0aa69c6fe144c82ec688f9d34 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:31 +0200 Subject: [PATCH 0413/3803] - patchlevel 239 --- 7.3.239 | 321 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 321 insertions(+) create mode 100644 7.3.239 diff --git a/7.3.239 b/7.3.239 new file mode 100644 index 00000000..1c03da3f --- /dev/null +++ b/7.3.239 @@ -0,0 +1,321 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.239 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.239 +Problem: Python corrects the cursor column without taking 'virtualedit' + into account. (lilydjwg) +Solution: Call check_cursor_col_win(). +Files: src/if_py_both.h, src/mbyte.c, src/misc2.c, src/normal.c, + src/proto/mbyte.pro, src/proto/misc2.pro + + +*** ../vim-7.3.238/src/if_py_both.h 2011-06-26 04:01:37.000000000 +0200 +--- src/if_py_both.h 2011-07-07 14:28:19.000000000 +0200 +*************** +*** 534,540 **** + { + long lnum; + long col; +- long len; + + if (!PyArg_Parse(val, "(ll)", &lnum, &col)) + return -1; +--- 534,539 ---- +*************** +*** 549,566 **** + if (VimErrorCheck()) + return -1; + +- /* When column is out of range silently correct it. */ +- len = (long)STRLEN(ml_get_buf(this->win->w_buffer, lnum, FALSE)); +- if (col > len) +- col = len; +- + this->win->w_cursor.lnum = lnum; + this->win->w_cursor.col = col; + #ifdef FEAT_VIRTUALEDIT + this->win->w_cursor.coladd = 0; + #endif +! update_screen(VALID); + + return 0; + } + else if (strcmp(name, "height") == 0) +--- 548,562 ---- + if (VimErrorCheck()) + return -1; + + this->win->w_cursor.lnum = lnum; + this->win->w_cursor.col = col; + #ifdef FEAT_VIRTUALEDIT + this->win->w_cursor.coladd = 0; + #endif +! /* When column is out of range silently correct it. */ +! check_cursor_col_win(this->win); + ++ update_screen(VALID); + return 0; + } + else if (strcmp(name, "height") == 0) +*** ../vim-7.3.238/src/mbyte.c 2011-04-11 14:29:13.000000000 +0200 +--- src/mbyte.c 2011-07-07 14:27:07.000000000 +0200 +*************** +*** 3563,3569 **** + void + mb_adjust_cursor() + { +! mb_adjustpos(&curwin->w_cursor); + } + + /* +--- 3563,3569 ---- + void + mb_adjust_cursor() + { +! mb_adjustpos(curbuf, &curwin->w_cursor); + } + + /* +*************** +*** 3571,3577 **** + * If it points to a tail byte it's moved backwards to the head byte. + */ + void +! mb_adjustpos(lp) + pos_T *lp; + { + char_u *p; +--- 3571,3578 ---- + * If it points to a tail byte it's moved backwards to the head byte. + */ + void +! mb_adjustpos(buf, lp) +! buf_T *buf; + pos_T *lp; + { + char_u *p; +*************** +*** 3582,3588 **** + #endif + ) + { +! p = ml_get(lp->lnum); + lp->col -= (*mb_head_off)(p, p + lp->col); + #ifdef FEAT_VIRTUALEDIT + /* Reset "coladd" when the cursor would be on the right half of a +--- 3583,3589 ---- + #endif + ) + { +! p = ml_get_buf(buf, lp->lnum, FALSE); + lp->col -= (*mb_head_off)(p, p + lp->col); + #ifdef FEAT_VIRTUALEDIT + /* Reset "coladd" when the cursor would be on the right half of a +*** ../vim-7.3.238/src/misc2.c 2011-04-11 16:56:29.000000000 +0200 +--- src/misc2.c 2011-07-07 14:27:50.000000000 +0200 +*************** +*** 333,339 **** + #ifdef FEAT_MBYTE + /* prevent from moving onto a trail byte */ + if (has_mbyte) +! mb_adjustpos(pos); + #endif + + if (col < wcol) +--- 333,339 ---- + #ifdef FEAT_MBYTE + /* prevent from moving onto a trail byte */ + if (has_mbyte) +! mb_adjustpos(curbuf, pos); + #endif + + if (col < wcol) +*************** +*** 544,559 **** + void + check_cursor_col() + { + colnr_T len; + #ifdef FEAT_VIRTUALEDIT +! colnr_T oldcol = curwin->w_cursor.col; +! colnr_T oldcoladd = curwin->w_cursor.col + curwin->w_cursor.coladd; + #endif + +! len = (colnr_T)STRLEN(ml_get_curline()); + if (len == 0) +! curwin->w_cursor.col = 0; +! else if (curwin->w_cursor.col >= len) + { + /* Allow cursor past end-of-line when: + * - in Insert mode or restarting Insert mode +--- 544,569 ---- + void + check_cursor_col() + { ++ check_cursor_col_win(curwin); ++ } ++ ++ /* ++ * Make sure win->w_cursor.col is valid. ++ */ ++ void ++ check_cursor_col_win(win) ++ win_T *win; ++ { + colnr_T len; + #ifdef FEAT_VIRTUALEDIT +! colnr_T oldcol = win->w_cursor.col; +! colnr_T oldcoladd = win->w_cursor.col + win->w_cursor.coladd; + #endif + +! len = (colnr_T)STRLEN(ml_get_buf(win->w_buffer, win->w_cursor.lnum, FALSE)); + if (len == 0) +! win->w_cursor.col = 0; +! else if (win->w_cursor.col >= len) + { + /* Allow cursor past end-of-line when: + * - in Insert mode or restarting Insert mode +*************** +*** 567,599 **** + || (ve_flags & VE_ONEMORE) + #endif + || virtual_active()) +! curwin->w_cursor.col = len; + else + { +! curwin->w_cursor.col = len - 1; + #ifdef FEAT_MBYTE +! /* prevent cursor from moving on the trail byte */ + if (has_mbyte) +! mb_adjust_cursor(); + #endif + } + } +! else if (curwin->w_cursor.col < 0) +! curwin->w_cursor.col = 0; + + #ifdef FEAT_VIRTUALEDIT + /* If virtual editing is on, we can leave the cursor on the old position, + * only we must set it to virtual. But don't do it when at the end of the + * line. */ + if (oldcol == MAXCOL) +! curwin->w_cursor.coladd = 0; + else if (ve_flags == VE_ALL) + { +! if (oldcoladd > curwin->w_cursor.col) +! curwin->w_cursor.coladd = oldcoladd - curwin->w_cursor.col; + else + /* avoid weird number when there is a miscalculation or overflow */ +! curwin->w_cursor.coladd = 0; + } + #endif + } +--- 577,609 ---- + || (ve_flags & VE_ONEMORE) + #endif + || virtual_active()) +! win->w_cursor.col = len; + else + { +! win->w_cursor.col = len - 1; + #ifdef FEAT_MBYTE +! /* Move the cursor to the head byte. */ + if (has_mbyte) +! mb_adjustpos(win->w_buffer, &win->w_cursor); + #endif + } + } +! else if (win->w_cursor.col < 0) +! win->w_cursor.col = 0; + + #ifdef FEAT_VIRTUALEDIT + /* If virtual editing is on, we can leave the cursor on the old position, + * only we must set it to virtual. But don't do it when at the end of the + * line. */ + if (oldcol == MAXCOL) +! win->w_cursor.coladd = 0; + else if (ve_flags == VE_ALL) + { +! if (oldcoladd > win->w_cursor.col) +! win->w_cursor.coladd = oldcoladd - win->w_cursor.col; + else + /* avoid weird number when there is a miscalculation or overflow */ +! win->w_cursor.coladd = 0; + } + #endif + } +*** ../vim-7.3.238/src/normal.c 2011-06-20 00:45:55.000000000 +0200 +--- src/normal.c 2011-07-07 14:27:57.000000000 +0200 +*************** +*** 8774,8780 **** + { + --pp->col; + #ifdef FEAT_MBYTE +! mb_adjustpos(pp); + #endif + } + else if (pp->lnum > 1) +--- 8774,8780 ---- + { + --pp->col; + #ifdef FEAT_MBYTE +! mb_adjustpos(curbuf, pp); + #endif + } + else if (pp->lnum > 1) +*** ../vim-7.3.238/src/proto/mbyte.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/mbyte.pro 2011-07-07 14:27:09.000000000 +0200 +*************** +*** 56,62 **** + int utf_valid_string __ARGS((char_u *s, char_u *end)); + int dbcs_screen_tail_off __ARGS((char_u *base, char_u *p)); + void mb_adjust_cursor __ARGS((void)); +! void mb_adjustpos __ARGS((pos_T *lp)); + char_u *mb_prevptr __ARGS((char_u *line, char_u *p)); + int mb_charlen __ARGS((char_u *str)); + int mb_charlen_len __ARGS((char_u *str, int len)); +--- 56,62 ---- + int utf_valid_string __ARGS((char_u *s, char_u *end)); + int dbcs_screen_tail_off __ARGS((char_u *base, char_u *p)); + void mb_adjust_cursor __ARGS((void)); +! void mb_adjustpos __ARGS((buf_T *buf, pos_T *lp)); + char_u *mb_prevptr __ARGS((char_u *line, char_u *p)); + int mb_charlen __ARGS((char_u *str)); + int mb_charlen_len __ARGS((char_u *str, int len)); +*** ../vim-7.3.238/src/proto/misc2.pro 2011-04-11 16:56:29.000000000 +0200 +--- src/proto/misc2.pro 2011-07-07 14:26:57.000000000 +0200 +*************** +*** 14,19 **** +--- 14,20 ---- + linenr_T get_cursor_rel_lnum __ARGS((win_T *wp, linenr_T lnum)); + void check_cursor_lnum __ARGS((void)); + void check_cursor_col __ARGS((void)); ++ void check_cursor_col_win __ARGS((win_T *win)); + void check_cursor __ARGS((void)); + void adjust_cursor_col __ARGS((void)); + int leftcol_changed __ARGS((void)); +*** ../vim-7.3.238/src/version.c 2011-07-07 15:04:38.000000000 +0200 +--- src/version.c 2011-07-07 15:05:49.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 239, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +256. You are able to write down over 250 symptoms of being an internet + addict, even though they only asked for 101. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 2ea7b0d285d69a7c510b9d30a2fe5b80a90cc927 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:32 +0200 Subject: [PATCH 0414/3803] - patchlevel 240 --- 7.3.240 | 795 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 795 insertions(+) create mode 100644 7.3.240 diff --git a/7.3.240 b/7.3.240 new file mode 100644 index 00000000..7048ac1f --- /dev/null +++ b/7.3.240 @@ -0,0 +1,795 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.240 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Note: I haven't verified this works or even compiles. Please send me a +patch if you see a problem and can fix it. + +Patch 7.3.240 +Problem: External commands can't use pipes on MS-Windows. +Solution: Implement pipes and use them when 'shelltemp' isn't set. (Vincent + Berthoux) +Files: src/eval.c, src/ex_cmds.c, src/misc2.c, src/os_unix.c, + src/os_win32.c, src/proto/misc2.pro, src/ui.c + + +*** ../vim-7.3.239/src/eval.c 2011-06-19 02:55:32.000000000 +0200 +--- src/eval.c 2011-07-07 15:44:56.000000000 +0200 +*************** +*** 11931,11937 **** + #ifdef FEAT_SEARCHPATH + "file_in_path", + #endif +! #if defined(UNIX) && !defined(USE_SYSTEM) + "filterpipe", + #endif + #ifdef FEAT_FIND_ID +--- 11931,11937 ---- + #ifdef FEAT_SEARCHPATH + "file_in_path", + #endif +! #if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264) + "filterpipe", + #endif + #ifdef FEAT_FIND_ID +*** ../vim-7.3.239/src/ex_cmds.c 2011-06-12 22:03:15.000000000 +0200 +--- src/ex_cmds.c 2011-07-07 15:44:56.000000000 +0200 +*************** +*** 1107,1113 **** + if (do_out) + shell_flags |= SHELL_DOOUT; + +! #if !defined(USE_SYSTEM) && defined(UNIX) + if (!do_in && do_out && !p_stmp) + { + /* Use a pipe to fetch stdout of the command, do not use a temp file. */ +--- 1107,1113 ---- + if (do_out) + shell_flags |= SHELL_DOOUT; + +! #if (!defined(USE_SYSTEM) && defined(UNIX)) || defined(WIN3264) + if (!do_in && do_out && !p_stmp) + { + /* Use a pipe to fetch stdout of the command, do not use a temp file. */ +*** ../vim-7.3.239/src/misc2.c 2011-07-07 15:08:53.000000000 +0200 +--- src/misc2.c 2011-07-07 15:55:42.000000000 +0200 +*************** +*** 2146,2151 **** +--- 2146,2170 ---- + } + } + ++ #if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264) ++ /* ++ * Append the text in "gap" below the cursor line and clear "gap". ++ */ ++ void ++ append_ga_line(gap) ++ garray_T *gap; ++ { ++ /* Remove trailing CR. */ ++ if (gap->ga_len > 0 ++ && !curbuf->b_p_bin ++ && ((char_u *)gap->ga_data)[gap->ga_len - 1] == CAR) ++ --gap->ga_len; ++ ga_append(gap, NUL); ++ ml_append(curwin->w_cursor.lnum++, gap->ga_data, 0, FALSE); ++ gap->ga_len = 0; ++ } ++ #endif ++ + /************************************************************************ + * functions that use lookup tables for various things, generally to do with + * special key codes. +*** ../vim-7.3.239/src/os_unix.c 2011-04-11 16:56:29.000000000 +0200 +--- src/os_unix.c 2011-07-07 15:54:58.000000000 +0200 +*************** +*** 3660,3686 **** + /* Nothing to do. */ + } + +- #ifndef USE_SYSTEM +- static void append_ga_line __ARGS((garray_T *gap)); +- +- /* +- * Append the text in "gap" below the cursor line and clear "gap". +- */ +- static void +- append_ga_line(gap) +- garray_T *gap; +- { +- /* Remove trailing CR. */ +- if (gap->ga_len > 0 +- && !curbuf->b_p_bin +- && ((char_u *)gap->ga_data)[gap->ga_len - 1] == CAR) +- --gap->ga_len; +- ga_append(gap, NUL); +- ml_append(curwin->w_cursor.lnum++, gap->ga_data, 0, FALSE); +- gap->ga_len = 0; +- } +- #endif +- + int + mch_call_shell(cmd, options) + char_u *cmd; +--- 3660,3665 ---- +*** ../vim-7.3.239/src/os_win32.c 2011-05-25 17:06:16.000000000 +0200 +--- src/os_win32.c 2011-07-07 16:08:30.000000000 +0200 +*************** +*** 417,422 **** +--- 417,427 ---- + static PGNSECINFO pGetNamedSecurityInfo; + #endif + ++ typedef BOOL (WINAPI *PSETHANDLEINFORMATION)(HANDLE, DWORD, DWORD); ++ ++ static BOOL allowPiping = FALSE; ++ static PSETHANDLEINFORMATION pSetHandleInformation; ++ + /* + * Set g_PlatformId to VER_PLATFORM_WIN32_NT (NT) or + * VER_PLATFORM_WIN32_WINDOWS (Win95). +*************** +*** 467,472 **** +--- 472,489 ---- + } + } + #endif ++ /* ++ * If we are on windows NT, try to load the pipe functions, only ++ * available from Win2K. ++ */ ++ if (g_PlatformId == VER_PLATFORM_WIN32_NT) ++ { ++ HANDLE kernel32 = GetModuleHandle("kernel32"); ++ pSetHandleInformation = (PSETHANDLEINFORMATION)GetProcAddress( ++ kernel32, "SetHandleInformation"); ++ ++ allowPiping = pSetHandleInformation != NULL; ++ } + done = TRUE; + } + } +*************** +*** 1635,1641 **** + } + + #if ((defined(__MINGW32__) || defined (__CYGWIN32__)) && \ +! __MSVCRT_VERSION__ >= 0x800) || (defined(_MSC_VER) && _MSC_VER >= 1400) + /* + * Bad parameter handler. + * +--- 1652,1658 ---- + } + + #if ((defined(__MINGW32__) || defined (__CYGWIN32__)) && \ +! __MSVCRT_VERSION__ >= 0x800) || (defined(_MSC_VER) && _MSC_VER >= 1400) + /* + * Bad parameter handler. + * +*************** +*** 3210,3216 **** + * 4. Prompt the user to press a key to close the console window + */ + static int +! mch_system(char *cmd, int options) + { + STARTUPINFO si; + PROCESS_INFORMATION pi; +--- 3227,3233 ---- + * 4. Prompt the user to press a key to close the console window + */ + static int +! mch_system_classic(char *cmd, int options) + { + STARTUPINFO si; + PROCESS_INFORMATION pi; +*************** +*** 3315,3320 **** +--- 3332,3829 ---- + + return ret; + } ++ ++ /* ++ * Thread launched by the gui to send the current buffer data to the ++ * process. This way avoid to hang up vim totally if the children ++ * process take a long time to process the lines. ++ */ ++ static DWORD WINAPI ++ sub_process_writer(LPVOID param) ++ { ++ HANDLE g_hChildStd_IN_Wr = param; ++ linenr_T lnum = curbuf->b_op_start.lnum; ++ DWORD len = 0; ++ DWORD l; ++ char_u *lp = ml_get(lnum); ++ char_u *s; ++ int written = 0; ++ ++ for (;;) ++ { ++ l = (DWORD)STRLEN(lp + written); ++ if (l == 0) ++ len = 0; ++ else if (lp[written] == NL) ++ { ++ /* NL -> NUL translation */ ++ WriteFile(g_hChildStd_IN_Wr, "", 1, &len, NULL); ++ } ++ else ++ { ++ s = vim_strchr(lp + written, NL); ++ WriteFile(g_hChildStd_IN_Wr, (char *)lp + written, ++ s == NULL ? l : (DWORD)(s - (lp + written)), ++ &len, NULL); ++ } ++ if (len == (int)l) ++ { ++ /* Finished a line, add a NL, unless this line should not have ++ * one. */ ++ if (lnum != curbuf->b_op_end.lnum ++ || !curbuf->b_p_bin ++ || (lnum != curbuf->b_no_eol_lnum ++ && (lnum != curbuf->b_ml.ml_line_count ++ || curbuf->b_p_eol))) ++ { ++ WriteFile(g_hChildStd_IN_Wr, "\n", 1, &ignored, NULL); ++ } ++ ++ ++lnum; ++ if (lnum > curbuf->b_op_end.lnum) ++ break; ++ ++ lp = ml_get(lnum); ++ written = 0; ++ } ++ else if (len > 0) ++ written += len; ++ } ++ ++ /* finished all the lines, close pipe */ ++ CloseHandle(g_hChildStd_IN_Wr); ++ ExitThread(0); ++ } ++ ++ ++ # define BUFLEN 100 /* length for buffer, stolen from unix version */ ++ ++ /* ++ * This function read from the children's stdout and write the ++ * data on screen or in the buffer accordingly. ++ */ ++ static void ++ dump_pipe(int options, ++ HANDLE g_hChildStd_OUT_Rd, ++ garray_T *ga, ++ char_u buffer[], ++ DWORD *buffer_off) ++ { ++ DWORD availableBytes = 0; ++ DWORD i; ++ int c; ++ char_u *p; ++ int ret; ++ DWORD len; ++ DWORD toRead; ++ int repeatCount; ++ ++ /* we query the pipe to see if there is any data to read ++ * to avoid to perform a blocking read */ ++ ret = PeekNamedPipe(g_hChildStd_OUT_Rd, /* pipe to query */ ++ NULL, /* optional buffer */ ++ 0, /* buffe size */ ++ NULL, /* number of read bytes */ ++ &availableBytes, /* available bytes total */ ++ NULL); /* byteLeft */ ++ ++ repeatCount = 0; ++ /* We got real data in the pipe, read it */ ++ while (ret != 0 && availableBytes > 0 && availableBytes > 0) ++ { ++ repeatCount++; ++ toRead = ++ # ifdef FEAT_MBYTE ++ (DWORD)(BUFLEN - *buffer_off); ++ # else ++ (DWORD)BUFLEN; ++ # endif ++ toRead = availableBytes < toRead ? availableBytes : toRead; ++ ReadFile(g_hChildStd_OUT_Rd, buffer ++ # ifdef FEAT_MBYTE ++ + *buffer_off, toRead ++ # else ++ , toRead ++ # endif ++ , &len, NULL); ++ ++ /* If we haven't read anything, there is a problem */ ++ if (len == 0) ++ break; ++ ++ availableBytes -= len; ++ ++ if (options & SHELL_READ) ++ { ++ /* Do NUL -> NL translation, append NL separated ++ * lines to the current buffer. */ ++ for (i = 0; i < len; ++i) ++ { ++ if (buffer[i] == NL) ++ append_ga_line(ga); ++ else if (buffer[i] == NUL) ++ ga_append(ga, NL); ++ else ++ ga_append(ga, buffer[i]); ++ } ++ } ++ # ifdef FEAT_MBYTE ++ else if (has_mbyte) ++ { ++ int l; ++ ++ len += *buffer_off; ++ buffer[len] = NUL; ++ ++ /* Check if the last character in buffer[] is ++ * incomplete, keep these bytes for the next ++ * round. */ ++ for (p = buffer; p < buffer + len; p += l) ++ { ++ l = mb_cptr2len(p); ++ if (l == 0) ++ l = 1; /* NUL byte? */ ++ else if (MB_BYTE2LEN(*p) != l) ++ break; ++ } ++ if (p == buffer) /* no complete character */ ++ { ++ /* avoid getting stuck at an illegal byte */ ++ if (len >= 12) ++ ++p; ++ else ++ { ++ *buffer_off = len; ++ return; ++ } ++ } ++ c = *p; ++ *p = NUL; ++ msg_puts(buffer); ++ if (p < buffer + len) ++ { ++ *p = c; ++ *buffer_off = (DWORD)((buffer + len) - p); ++ mch_memmove(buffer, p, *buffer_off); ++ return; ++ } ++ *buffer_off = 0; ++ } ++ # endif /* FEAT_MBYTE */ ++ else ++ { ++ buffer[len] = NUL; ++ msg_puts(buffer); ++ } ++ ++ windgoto(msg_row, msg_col); ++ cursor_on(); ++ out_flush(); ++ } ++ } ++ ++ /* ++ * Version of system to use for windows NT > 5.0 (Win2K), use pipe ++ * for communication and doesn't open any new window. ++ */ ++ static int ++ mch_system_piped(char *cmd, int options) ++ { ++ STARTUPINFO si; ++ PROCESS_INFORMATION pi; ++ DWORD ret = 0; ++ ++ HANDLE g_hChildStd_IN_Rd = NULL; ++ HANDLE g_hChildStd_IN_Wr = NULL; ++ HANDLE g_hChildStd_OUT_Rd = NULL; ++ HANDLE g_hChildStd_OUT_Wr = NULL; ++ ++ char_u buffer[BUFLEN + 1]; /* reading buffer + size */ ++ DWORD len; ++ ++ /* buffer used to receive keys */ ++ char_u ta_buf[BUFLEN + 1]; /* TypeAHead */ ++ int ta_len = 0; /* valid bytes in ta_buf[] */ ++ ++ DWORD i; ++ int c; ++ int noread_cnt = 0; ++ garray_T ga; ++ int delay = 1; ++ # ifdef FEAT_MBYTE ++ DWORD buffer_off = 0; /* valid bytes in buffer[] */ ++ # endif ++ ++ SECURITY_ATTRIBUTES saAttr; ++ ++ /* Set the bInheritHandle flag so pipe handles are inherited. */ ++ saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); ++ saAttr.bInheritHandle = TRUE; ++ saAttr.lpSecurityDescriptor = NULL; ++ ++ if ( ! CreatePipe(&g_hChildStd_OUT_Rd, &g_hChildStd_OUT_Wr, &saAttr, 0) ++ /* Ensure the read handle to the pipe for STDOUT is not inherited. */ ++ || ! pSetHandleInformation(g_hChildStd_OUT_Rd, HANDLE_FLAG_INHERIT, 0) ++ /* Create a pipe for the child process's STDIN. */ ++ || ! CreatePipe(&g_hChildStd_IN_Rd, &g_hChildStd_IN_Wr, &saAttr, 0) ++ /* Ensure the write handle to the pipe for STDIN is not inherited. */ ++ || ! pSetHandleInformation(g_hChildStd_IN_Wr, HANDLE_FLAG_INHERIT, 0) ) ++ { ++ CloseHandle(g_hChildStd_IN_Rd); ++ CloseHandle(g_hChildStd_IN_Wr); ++ CloseHandle(g_hChildStd_OUT_Rd); ++ CloseHandle(g_hChildStd_OUT_Wr); ++ MSG_PUTS(_("\nCannot create pipes\n")); ++ } ++ ++ si.cb = sizeof(si); ++ si.lpReserved = NULL; ++ si.lpDesktop = NULL; ++ si.lpTitle = NULL; ++ si.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES; ++ ++ /* set-up our file redirection */ ++ si.hStdError = g_hChildStd_OUT_Wr; ++ si.hStdOutput = g_hChildStd_OUT_Wr; ++ si.hStdInput = g_hChildStd_IN_Rd; ++ si.wShowWindow = SW_HIDE; ++ si.cbReserved2 = 0; ++ si.lpReserved2 = NULL; ++ ++ if (options & SHELL_READ) ++ ga_init2(&ga, 1, BUFLEN); ++ ++ /* Now, run the command */ ++ CreateProcess(NULL, /* Executable name */ ++ cmd, /* Command to execute */ ++ NULL, /* Process security attributes */ ++ NULL, /* Thread security attributes */ ++ ++ // this command can be litigeous, handle inheritence was ++ // deactivated for pending temp file, but, if we deactivate ++ // it, the pipes don't work for some reason. ++ TRUE, /* Inherit handles, first deactivated, ++ * but needed */ ++ CREATE_DEFAULT_ERROR_MODE, /* Creation flags */ ++ NULL, /* Environment */ ++ NULL, /* Current directory */ ++ &si, /* Startup information */ ++ &pi); /* Process information */ ++ ++ ++ /* Close our unused side of the pipes */ ++ CloseHandle(g_hChildStd_IN_Rd); ++ CloseHandle(g_hChildStd_OUT_Wr); ++ ++ if (options & SHELL_WRITE) ++ { ++ HANDLE thread = ++ CreateThread(NULL, /* security attributes */ ++ 0, /* default stack size */ ++ sub_process_writer, /* function to be executed */ ++ g_hChildStd_IN_Wr, /* parameter */ ++ 0, /* creation flag, start immediately */ ++ NULL); /* we don't care about thread id */ ++ CloseHandle(thread); ++ g_hChildStd_IN_Wr = NULL; ++ } ++ ++ /* Keep updating the window while waiting for the shell to finish. */ ++ for (;;) ++ { ++ MSG msg; ++ ++ if (PeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE)) ++ { ++ TranslateMessage(&msg); ++ DispatchMessage(&msg); ++ } ++ ++ /* write pipe information in the window */ ++ if ((options & (SHELL_READ|SHELL_WRITE)) ++ # ifdef FEAT_GUI ++ || gui.in_use ++ # endif ++ ) ++ { ++ len = 0; ++ if (!(options & SHELL_EXPAND) ++ && ((options & ++ (SHELL_READ|SHELL_WRITE|SHELL_COOKED)) ++ != (SHELL_READ|SHELL_WRITE|SHELL_COOKED) ++ # ifdef FEAT_GUI ++ || gui.in_use ++ # endif ++ ) ++ && (ta_len > 0 || noread_cnt > 4)) ++ { ++ if (ta_len == 0) ++ { ++ /* Get extra characters when we don't have any. Reset the ++ * counter and timer. */ ++ noread_cnt = 0; ++ # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) ++ gettimeofday(&start_tv, NULL); ++ # endif ++ len = ui_inchar(ta_buf, BUFLEN, 10L, 0); ++ } ++ if (ta_len > 0 || len > 0) ++ { ++ /* ++ * For pipes: Check for CTRL-C: send interrupt signal to ++ * child. Check for CTRL-D: EOF, close pipe to child. ++ */ ++ if (len == 1 && cmd != NULL) ++ { ++ if (ta_buf[ta_len] == Ctrl_C) ++ { ++ /* Learn what exit code is expected, for ++ * now put 9 as SIGKILL */ ++ TerminateProcess(pi.hProcess, 9); ++ } ++ if (ta_buf[ta_len] == Ctrl_D) ++ { ++ CloseHandle(g_hChildStd_IN_Wr); ++ g_hChildStd_IN_Wr = NULL; ++ } ++ } ++ ++ /* replace K_BS by and K_DEL by */ ++ for (i = ta_len; i < ta_len + len; ++i) ++ { ++ if (ta_buf[i] == CSI && len - i > 2) ++ { ++ c = TERMCAP2KEY(ta_buf[i + 1], ta_buf[i + 2]); ++ if (c == K_DEL || c == K_KDEL || c == K_BS) ++ { ++ mch_memmove(ta_buf + i + 1, ta_buf + i + 3, ++ (size_t)(len - i - 2)); ++ if (c == K_DEL || c == K_KDEL) ++ ta_buf[i] = DEL; ++ else ++ ta_buf[i] = Ctrl_H; ++ len -= 2; ++ } ++ } ++ else if (ta_buf[i] == '\r') ++ ta_buf[i] = '\n'; ++ # ifdef FEAT_MBYTE ++ if (has_mbyte) ++ i += (*mb_ptr2len_len)(ta_buf + i, ++ ta_len + len - i) - 1; ++ # endif ++ } ++ ++ /* ++ * For pipes: echo the typed characters. For a pty this ++ * does not seem to work. ++ */ ++ for (i = ta_len; i < ta_len + len; ++i) ++ { ++ if (ta_buf[i] == '\n' || ta_buf[i] == '\b') ++ msg_putchar(ta_buf[i]); ++ # ifdef FEAT_MBYTE ++ else if (has_mbyte) ++ { ++ int l = (*mb_ptr2len)(ta_buf + i); ++ ++ msg_outtrans_len(ta_buf + i, l); ++ i += l - 1; ++ } ++ # endif ++ else ++ msg_outtrans_len(ta_buf + i, 1); ++ } ++ windgoto(msg_row, msg_col); ++ out_flush(); ++ ++ ta_len += len; ++ ++ /* ++ * Write the characters to the child, unless EOF has been ++ * typed for pipes. Write one character at a time, to ++ * avoid losing too much typeahead. When writing buffer ++ * lines, drop the typed characters (only check for ++ * CTRL-C). ++ */ ++ if (options & SHELL_WRITE) ++ ta_len = 0; ++ else if (g_hChildStd_IN_Wr != NULL) ++ { ++ WriteFile(g_hChildStd_IN_Wr, (char*)ta_buf, ++ 1, &len, NULL); ++ // if we are typing in, we want to keep things reactive ++ delay = 1; ++ if (len > 0) ++ { ++ ta_len -= len; ++ mch_memmove(ta_buf, ta_buf + len, ta_len); ++ } ++ } ++ } ++ } ++ } ++ ++ if (ta_len) ++ ui_inchar_undo(ta_buf, ta_len); ++ ++ if (WaitForSingleObject(pi.hProcess, delay) != WAIT_TIMEOUT) ++ { ++ dump_pipe(options, g_hChildStd_OUT_Rd, ++ &ga, buffer, &buffer_off); ++ break; ++ } ++ ++ ++noread_cnt; ++ dump_pipe(options, g_hChildStd_OUT_Rd, ++ &ga, buffer, &buffer_off); ++ ++ /* We start waiting for a very short time and then increase it, so ++ * that we respond quickly when the process is quick, and don't ++ * consume too much overhead when it's slow. */ ++ if (delay < 50) ++ delay += 10; ++ } ++ ++ /* Close the pipe */ ++ CloseHandle(g_hChildStd_OUT_Rd); ++ if (g_hChildStd_IN_Wr != NULL) ++ CloseHandle(g_hChildStd_IN_Wr); ++ ++ WaitForSingleObject(pi.hProcess, INFINITE); ++ ++ /* Get the command exit code */ ++ GetExitCodeProcess(pi.hProcess, &ret); ++ ++ if (options & SHELL_READ) ++ { ++ if (ga.ga_len > 0) ++ { ++ append_ga_line(&ga); ++ /* remember that the NL was missing */ ++ curbuf->b_no_eol_lnum = curwin->w_cursor.lnum; ++ } ++ else ++ curbuf->b_no_eol_lnum = 0; ++ ga_clear(&ga); ++ } ++ ++ /* Close the handles to the subprocess, so that it goes away */ ++ CloseHandle(pi.hThread); ++ CloseHandle(pi.hProcess); ++ ++ return ret; ++ } ++ ++ static int ++ mch_system(char *cmd, int options) ++ { ++ /* if we can pipe and the shelltemp option is off */ ++ if (allowPiping && !p_stmp) ++ return mch_system_piped(cmd, options); ++ else ++ return mch_system_classic(cmd, options); ++ } + #else + + # define mch_system(c, o) system(c) +*************** +*** 3388,3394 **** + char_u *newcmd; + long_u cmdlen = ( + #ifdef FEAT_GUI_W32 +! STRLEN(vimrun_path) + + #endif + STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10); + +--- 3897,3903 ---- + char_u *newcmd; + long_u cmdlen = ( + #ifdef FEAT_GUI_W32 +! (allowPiping && !p_stmp ? 0 : STRLEN(vimrun_path)) + + #endif + STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10); + +*************** +*** 3497,3503 **** + MB_ICONWARNING); + need_vimrun_warning = FALSE; + } +! if (!s_dont_use_vimrun) + /* Use vimrun to execute the command. It opens a console + * window, which can be closed without killing Vim. */ + vim_snprintf((char *)newcmd, cmdlen, "%s%s%s %s %s", +--- 4006,4012 ---- + MB_ICONWARNING); + need_vimrun_warning = FALSE; + } +! if (!s_dont_use_vimrun && (!allowPiping || p_stmp)) + /* Use vimrun to execute the command. It opens a console + * window, which can be closed without killing Vim. */ + vim_snprintf((char *)newcmd, cmdlen, "%s%s%s %s %s", +*************** +*** 3521,3527 **** + /* Print the return value, unless "vimrun" was used. */ + if (x != 0 && !(options & SHELL_SILENT) && !emsg_silent + #if defined(FEAT_GUI_W32) +! && ((options & SHELL_DOOUT) || s_dont_use_vimrun) + #endif + ) + { +--- 4030,4037 ---- + /* Print the return value, unless "vimrun" was used. */ + if (x != 0 && !(options & SHELL_SILENT) && !emsg_silent + #if defined(FEAT_GUI_W32) +! && ((options & SHELL_DOOUT) || s_dont_use_vimrun +! || (allowPiping && !p_stmp)) + #endif + ) + { +*** ../vim-7.3.239/src/proto/misc2.pro 2011-07-07 15:08:53.000000000 +0200 +--- src/proto/misc2.pro 2011-07-07 15:56:16.000000000 +0200 +*************** +*** 58,63 **** +--- 58,64 ---- + char_u *ga_concat_strings __ARGS((garray_T *gap)); + void ga_concat __ARGS((garray_T *gap, char_u *s)); + void ga_append __ARGS((garray_T *gap, int c)); ++ void append_ga_line __ARGS((garray_T *gap)); + int name_to_mod_mask __ARGS((int c)); + int simplify_key __ARGS((int key, int *modifiers)); + int handle_x_keys __ARGS((int key)); +*** ../vim-7.3.239/src/ui.c 2011-06-19 01:14:23.000000000 +0200 +--- src/ui.c 2011-07-07 15:44:56.000000000 +0200 +*************** +*** 58,64 **** + #endif + } + +! #if defined(UNIX) || defined(VMS) || defined(PROTO) + /* + * When executing an external program, there may be some typed characters that + * are not consumed by it. Give them back to ui_inchar() and they are stored +--- 58,64 ---- + #endif + } + +! #if defined(UNIX) || defined(VMS) || defined(PROTO) || defined(WIN3264) + /* + * When executing an external program, there may be some typed characters that + * are not consumed by it. Give them back to ui_inchar() and they are stored +*** ../vim-7.3.239/src/version.c 2011-07-07 15:08:53.000000000 +0200 +--- src/version.c 2011-07-07 16:14:20.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 240, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +257. Your "hundred-and-one" lists include well over 101 items, since you + automatically interpret all numbers in hexadecimal notation. + (hex 101 = decimal 257) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 23d22eafbc3159f7e3dc182ef2b13827c4cc8104 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:32 +0200 Subject: [PATCH 0415/3803] - patchlevel 241 --- 7.3.241 | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 7.3.241 diff --git a/7.3.241 b/7.3.241 new file mode 100644 index 00000000..3b73c4de --- /dev/null +++ b/7.3.241 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.241 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.241 +Problem: Using CTRL-R CTRL-W on the command line may insert only part of + the word. +Solution: Use the cursor position instead of assuming it is at the end of + the command. (Tyru) +Files: src/ex_getln.c + + +*** ../vim-7.3.240/src/ex_getln.c 2011-07-07 15:04:38.000000000 +0200 +--- src/ex_getln.c 2011-07-07 16:38:50.000000000 +0200 +*************** +*** 3046,3052 **** + int len; + + /* Locate start of last word in the cmd buffer. */ +! for (w = ccline.cmdbuff + ccline.cmdlen; w > ccline.cmdbuff; ) + { + #ifdef FEAT_MBYTE + if (has_mbyte) +--- 3046,3052 ---- + int len; + + /* Locate start of last word in the cmd buffer. */ +! for (w = ccline.cmdbuff + ccline.cmdpos; w > ccline.cmdbuff; ) + { + #ifdef FEAT_MBYTE + if (has_mbyte) +*************** +*** 3064,3070 **** + --w; + } + } +! len = (int)((ccline.cmdbuff + ccline.cmdlen) - w); + if (p_ic ? STRNICMP(w, arg, len) == 0 : STRNCMP(w, arg, len) == 0) + p += len; + } +--- 3064,3070 ---- + --w; + } + } +! len = (int)((ccline.cmdbuff + ccline.cmdpos) - w); + if (p_ic ? STRNICMP(w, arg, len) == 0 : STRNCMP(w, arg, len) == 0) + p += len; + } +*** ../vim-7.3.240/src/version.c 2011-07-07 16:20:45.000000000 +0200 +--- src/version.c 2011-07-07 16:41:29.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 241, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +258. When you want to see your girlfriend, you surf to her homepage. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 8be7ca47b462380ad48bcf386ea9a12ce195e753 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:33 +0200 Subject: [PATCH 0416/3803] - patchlevel 242 --- 7.3.242 | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 7.3.242 diff --git a/7.3.242 b/7.3.242 new file mode 100644 index 00000000..0cf4db92 --- /dev/null +++ b/7.3.242 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.242 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.242 +Problem: Illegal memory access in after_pathsep(). +Solution: Check that the pointer is not at the start of the file name. + (Dominique Pelle) +Files: src/misc2.c + + +*** ../vim-7.3.241/src/misc2.c 2011-07-07 16:20:45.000000000 +0200 +--- src/misc2.c 2011-07-07 17:05:41.000000000 +0200 +*************** +*** 3247,3253 **** + #if defined(FEAT_MBYTE) || defined(PROTO) + /* + * Return TRUE if "p" points to just after a path separator. +! * Take care of multi-byte characters. + * "b" must point to the start of the file name + */ + int +--- 3247,3253 ---- + #if defined(FEAT_MBYTE) || defined(PROTO) + /* + * Return TRUE if "p" points to just after a path separator. +! * Takes care of multi-byte characters. + * "b" must point to the start of the file name + */ + int +*************** +*** 3255,3261 **** + char_u *b; + char_u *p; + { +! return vim_ispathsep(p[-1]) + && (!has_mbyte || (*mb_head_off)(b, p - 1) == 0); + } + #endif +--- 3255,3261 ---- + char_u *b; + char_u *p; + { +! return p > b && vim_ispathsep(p[-1]) + && (!has_mbyte || (*mb_head_off)(b, p - 1) == 0); + } + #endif +*** ../vim-7.3.241/src/version.c 2011-07-07 16:44:33.000000000 +0200 +--- src/version.c 2011-07-07 17:05:49.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 242, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +260. Co-workers have to E-mail you about the fire alarm to get + you out of the building. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 67a9cf64feae7d780562efd9276c9e320a2706d3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:33 +0200 Subject: [PATCH 0417/3803] - patchlevel 243 --- 7.3.243 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 7.3.243 diff --git a/7.3.243 b/7.3.243 new file mode 100644 index 00000000..f1f913d4 --- /dev/null +++ b/7.3.243 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.243 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.243 +Problem: Illegal memory access in readline(). +Solution: Swap the conditions. (Dominique Pelle) +Files: src/eval.c + + +*** ../vim-7.3.242/src/eval.c 2011-07-07 16:20:45.000000000 +0200 +--- src/eval.c 2011-07-07 17:32:16.000000000 +0200 +*************** +*** 14318,14324 **** + tolist = 0; + for ( ; filtd < buflen || readlen <= 0; ++filtd) + { +! if (buf[filtd] == '\n' || readlen <= 0) + { + /* In binary mode add an empty list item when the last + * non-empty line ends in a '\n'. */ +--- 14318,14324 ---- + tolist = 0; + for ( ; filtd < buflen || readlen <= 0; ++filtd) + { +! if (readlen <= 0 || buf[filtd] == '\n') + { + /* In binary mode add an empty list item when the last + * non-empty line ends in a '\n'. */ +*** ../vim-7.3.242/src/version.c 2011-07-07 17:15:29.000000000 +0200 +--- src/version.c 2011-07-07 17:32:30.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 243, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +261. You find diskettes in your pockets when doing laundry. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a91375fe61283294d48fe7bd8dd46e09e501ae17 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:33 +0200 Subject: [PATCH 0418/3803] - patchlevel 244 --- 7.3.244 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 7.3.244 diff --git a/7.3.244 b/7.3.244 new file mode 100644 index 00000000..4cff94f2 --- /dev/null +++ b/7.3.244 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.244 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.244 +Problem: MS-Windows: Build problem with old compiler. (John Beckett) +Solution: Only use HandleToLong() when available. (Mike Williams) +Files: src/gui_w32.c + + +*** ../vim-7.3.243/src/gui_w32.c 2011-05-25 21:18:02.000000000 +0200 +--- src/gui_w32.c 2011-07-07 17:42:36.000000000 +0200 +*************** +*** 1574,1579 **** +--- 1574,1583 ---- + #endif + + #ifdef FEAT_EVAL ++ # if _MSC_VER < 1400 ++ /* HandleToLong() only exists in compilers that can do 64 bit builds */ ++ # define HandleToLong(h) ((long)(h)) ++ # endif + /* set the v:windowid variable */ + set_vim_var_nr(VV_WINDOWID, HandleToLong(s_hwnd)); + #endif +*** ../vim-7.3.243/src/version.c 2011-07-07 17:36:52.000000000 +0200 +--- src/version.c 2011-07-07 17:43:21.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 244, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +262. Your computer has it's own phone line - but your daughter doesn't. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ae9d9fa09fef33983b14fc4a978821e7ad4822b3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Jul 2011 16:20:34 +0200 Subject: [PATCH 0419/3803] - patchlevel 244 --- README.patches | 48 +++++++++++++++++++++++++++-- vim.spec | 83 ++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 127 insertions(+), 4 deletions(-) diff --git a/README.patches b/README.patches index 678dad30..3a63fdc7 100644 --- a/README.patches +++ b/README.patches @@ -22,6 +22,12 @@ patches for binaries. Checksums for the patch files can be found in the file MD5. +These patches were edited after their original submission to avoid patch to +fail. The original files are available with "orig." prepended: + 22565 7.3.202 cannot influence the indent inside a namespace + 5725 7.3.203 MS-Windows: Can't run external command without console window + 10891 7.3.223 MingW cross compilation doesn't work with tiny feat. + Individual patches for Vim 7.3: @@ -227,8 +233,46 @@ Individual patches for Vim 7.3: 1857 7.3.199 MS-Windows: Compilation problem of OLE with MingW compiler 2213 7.3.200 (after 7.3.198) CTRL-D doesn't complete :lang 3303 7.3.201 (after 7.3.195) still bad indenting after "} else" - 22565 7.3.202 cannot influence the indent inside a namespace - 5725 7.3.203 MS-Windows: Can't run external command without console window + 21467 7.3.202 (fixed) cannot influence the indent inside a namespace + 3199 7.3.203 (fixed) MS-Windows: Can't run ext. cmd without console window 1588 7.3.204 (after 7.3.201) compiler warning 2430 7.3.205 syntax "extend" doesn't work correctly 1617 7.3.206 64bit MS-Windows compiler warning + 1603 7.3.207 can't compile with MSVC with pentium4 and 64 bit + 1597 7.3.208 early terminated if statement in Mac code + 2886 7.3.209 MSVC Install instructions point to wrong batch file + 5906 7.3.210 can't always find the file when using cscope + 1730 7.3.211 (after 7.3.210) compiler warning + 11261 7.3.212 with Python 3.2 ":py3" fails + 2985 7.3.213 javascript object literal is not indented correctly + 1615 7.3.214 the text displayed by ":z-" isn't exactly like old Vi + 2079 7.3.215 (after 7.3.210) wrong file names in previous patch + 9055 7.3.216 when recovering a file a range of lines is missing + 1916 7.3.217 inside an "if" a ":wincmd" causes problems + 4735 7.3.218 (after 7.3.212) tiny configuration problem with Python 3 + 3087 7.3.219 can't compile with GTK on Mac + 37536 7.3.220 various Python 3 problems + 8061 7.3.221 text from clipboard is not consistently handled as linewise + 2214 7.3.222 warning for building GvimExt + 10890 7.3.223 (fixed) MingW cross compilation doesn't work with tiny feat. + 5522 7.3.224 can't pass dict to sort function + 18841 7.3.225 "\n" in a substitute() inside ":s" not handled correctly + 1838 7.3.226 on a 64 bit system "syn sync fromstart" is very slow + 3430 7.3.227 after 7.3.221) Mac OS doesn't have the linewise clipboard fix + 1390 7.3.228 "2gj" does not always move to the correct position + 1645 7.3.229 fork() makes Mac gvim crash when build with CoreFoundation + 2295 7.3.230 ":wundo" and ":rundo" don't unescape their argument + 5151 7.3.231 runtime file patches failed for 7.3.202 and 7.3.203 + 2324 7.3.232 Python doesn't compile without +multi_byte + 2476 7.3.233 ":scriptnames" and ":breaklist" show long file names + 5209 7.3.234 with GTK menu may be popping down + 11651 7.3.235 ";" gets stuck on a "t" command, it's not useful + 2994 7.3.236 (after 7.3.232) Python 3 doesn't compile without +multi_byte + 7267 7.3.237 filetype completion doesn't work on Windows + 1599 7.3.238 compiler warning for conversion + 8837 7.3.239 Python corrects cursor column without using 'virtualedit' + 22002 7.3.240 external commands can't use pipes on MS-Windows + 2115 7.3.241 CTRL-R CTRL-W on command line may insert only part of word + 2070 7.3.242 illegal memory access in after_pathsep() + 1652 7.3.243 illegal memory access in readline() + 1537 7.3.244 MS-Windows: Build problem with old compiler diff --git a/vim.spec b/vim.spec index b0564a76..cfc241eb 100644 --- a/vim.spec +++ b/vim.spec @@ -18,13 +18,13 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 206 +%define patchlevel 244 Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{beta}%{patchlevel} -Release: 3%{?dist} +Release: 1%{?dist} License: Vim Group: Applications/Editors Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}%{?beta}%{?CVSDATE}.tar.bz2 @@ -271,6 +271,44 @@ Patch203: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.203 Patch204: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.204 Patch205: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.205 Patch206: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.206 +Patch207: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.207 +Patch208: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.208 +Patch209: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.209 +Patch210: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.210 +Patch211: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.211 +Patch212: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.212 +Patch213: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.213 +Patch214: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.214 +Patch215: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.215 +Patch216: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.216 +Patch217: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.217 +Patch218: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.218 +Patch219: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.219 +Patch220: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.220 +Patch221: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.221 +Patch222: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.222 +Patch223: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.223 +Patch224: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.224 +Patch225: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.225 +Patch226: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.226 +Patch227: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.227 +Patch228: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.228 +Patch229: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.229 +Patch230: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.230 +Patch231: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.231 +Patch232: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.232 +Patch233: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.233 +Patch234: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.234 +Patch235: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.235 +Patch236: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.236 +Patch237: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.237 +Patch238: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.238 +Patch239: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.239 +Patch240: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.240 +Patch241: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.241 +Patch242: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.242 +Patch243: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.243 +Patch244: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.244 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -620,6 +658,44 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch204 -p0 %patch205 -p0 %patch206 -p0 +%patch207 -p0 +%patch208 -p0 +%patch209 -p0 +%patch210 -p0 +%patch211 -p0 +%patch212 -p0 +%patch213 -p0 +%patch214 -p0 +%patch215 -p0 +%patch216 -p0 +%patch217 -p0 +%patch218 -p0 +%patch219 -p0 +%patch220 -p0 +%patch221 -p0 +%patch222 -p0 +%patch223 -p0 +%patch224 -p0 +%patch225 -p0 +%patch226 -p0 +%patch227 -p0 +%patch228 -p0 +%patch229 -p0 +%patch230 -p0 +%patch231 -p0 +%patch232 -p0 +%patch233 -p0 +%patch234 -p0 +%patch235 -p0 +%patch236 -p0 +%patch237 -p0 +%patch238 -p0 +%patch239 -p0 +%patch240 -p0 +%patch241 -p0 +%patch242 -p0 +%patch243 -p0 +%patch244 -p0 # install spell files @@ -1088,6 +1164,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Mon Jul 11 2011 Karsten Hopp 7.3.244-1 +- patchlevel 244 + * Tue Jun 14 2011 Marcela MaÅ¡láňová - 2:7.3.206-3 - Perl mass rebuild From 59d89e6ac37d3d703f61d2c1608a9f5b855b0d1b Mon Sep 17 00:00:00 2001 From: Petr Sabata Date: Thu, 21 Jul 2011 11:40:55 +0200 Subject: [PATCH 0420/3803] Perl mass rebuild --- vim.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vim.spec b/vim.spec index cfc241eb..8247bb39 100644 --- a/vim.spec +++ b/vim.spec @@ -24,7 +24,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{beta}%{patchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Vim Group: Applications/Editors Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}%{?beta}%{?CVSDATE}.tar.bz2 @@ -1164,6 +1164,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Thu Jul 21 2011 Petr Sabata - 2:7.3.244-2 +- Perl mass rebuild + * Mon Jul 11 2011 Karsten Hopp 7.3.244-1 - patchlevel 244 From 2f3540723d6d51282d536de9964750eef318e9f3 Mon Sep 17 00:00:00 2001 From: Petr Sabata Date: Thu, 21 Jul 2011 14:37:41 +0200 Subject: [PATCH 0421/3803] Perl mass rebuild --- vim.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vim.spec b/vim.spec index 8247bb39..fa846934 100644 --- a/vim.spec +++ b/vim.spec @@ -24,7 +24,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{beta}%{patchlevel} -Release: 2%{?dist} +Release: 3%{?dist} License: Vim Group: Applications/Editors Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}%{?beta}%{?CVSDATE}.tar.bz2 @@ -1164,6 +1164,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Thu Jul 21 2011 Petr Sabata - 2:7.3.244-3 +- Perl mass rebuild + * Thu Jul 21 2011 Petr Sabata - 2:7.3.244-2 - Perl mass rebuild From 34f5331eaf7c5ffd78f30ddbdb66dbe33addea54 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:40:54 +0200 Subject: [PATCH 0422/3803] - Remove old patched files. (Ricky Zhou ) (bugzilla #709456) --- vim.spec | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/vim.spec b/vim.spec index cfc241eb..72cfdaff 100644 --- a/vim.spec +++ b/vim.spec @@ -41,17 +41,6 @@ Source12: vi_help.txt Source13: vim-spell-files.tar.bz2 %endif Source14: spec-template -Source15: http://www.cvjb.de/comp/vim/forth.vim - -# remove this for the next major version, CVE fixes: -Source16: ftp://ftp.vim.org/vol/2/vim/runtime/plugin/netrwPlugin.vim -Source17: ftp://ftp.vim.org/vol/2/vim/runtime/plugin/gzip.vim -Source18: ftp://ftp.vim.org/vol/2/vim/runtime/filetype.vim -Source19: ftp://ftp.vim.org/vol/2/vim/runtime/autoload/zip.vim -Source20: ftp://ftp.vim.org/vol/2/vim/runtime/autoload/tar.vim -Source21: ftp://ftp.vim.org/vol/2/vim/runtime/autoload/netrwFileHandlers.vim -Source22: ftp://ftp.vim.org/vol/2/vim/runtime/autoload/netrw.vim -Source23: ftp://ftp.vim.org/vol/2/vim/runtime/autoload/netrwSettings.vim Patch2002: vim-7.0-fixkeys.patch Patch2003: vim-6.2-specsyntax.patch @@ -320,7 +309,6 @@ Patch3008: vim-7.0-warning.patch Patch3009: vim-7.0-syncolor.patch Patch3010: vim-7.0-specedit.patch Patch3011: vim72-rh514717.patch -Patch3012: vim-7.2-elinks-parameter-518791.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel ncurses-devel gettext perl-devel @@ -715,17 +703,6 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch3010 -p1 %patch3011 -p1 -cp -f %{SOURCE15} runtime/syntax/forth.vim -cp -f %{SOURCE16} runtime/plugin/netrwPlugin.vim -cp -f %{SOURCE17} runtime/plugin/gzip.vim -cp -f %{SOURCE18} runtime/plugin/filetype.vim -cp -f %{SOURCE19} runtime/autoload/zip.vim -cp -f %{SOURCE20} runtime/autoload/tar.vim -cp -f %{SOURCE21} runtime/autoload/netrwFileHandlers.vim -cp -f %{SOURCE22} runtime/autoload/netrw.vim -cp -f %{SOURCE23} runtime/autoload/netrwSettings.vim -%patch3012 -p1 - %build cd src autoconf @@ -1164,6 +1141,10 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Mon Aug 29 2011 Karsten Hopp 7.3.244-1 +- Remove old patched files. (Ricky Zhou ) + (bugzilla #709456) + * Mon Jul 11 2011 Karsten Hopp 7.3.244-1 - patchlevel 244 From 56fe68080dad7dcfdd7b704195f3f1089067254b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:44:51 +0200 Subject: [PATCH 0423/3803] - patchlevel 245 --- 7.3.245 | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 7.3.245 diff --git a/7.3.245 b/7.3.245 new file mode 100644 index 00000000..b05fe433 --- /dev/null +++ b/7.3.245 @@ -0,0 +1,81 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.245 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.245 +Problem: Python 3.2 libraries not correctly detected. +Solution: Add the suffix to the library name. (Niclas Zeising) +Files: src/auto/configure, src/configure.in + + +*** ../vim-7.3.244/src/auto/configure 2011-06-13 01:32:42.000000000 +0200 +--- src/auto/configure 2011-07-13 17:57:05.000000000 +0200 +*************** +*** 5611,5617 **** + eof + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" +! vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}" + vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` +--- 5611,5617 ---- + eof + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" +! vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" + vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` +*** ../vim-7.3.244/src/configure.in 2011-06-13 01:32:42.000000000 +0200 +--- src/configure.in 2011-07-13 17:57:01.000000000 +0200 +*************** +*** 1068,1074 **** + dnl -- delete the lines from make about Entering/Leaving directory + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" +! vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}" + vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" + dnl remove -ltermcap, it can conflict with an earlier -lncurses + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` +--- 1068,1074 ---- + dnl -- delete the lines from make about Entering/Leaving directory + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" +! vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" + vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" + dnl remove -ltermcap, it can conflict with an earlier -lncurses + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` +*** ../vim-7.3.244/src/version.c 2011-07-07 17:43:37.000000000 +0200 +--- src/version.c 2011-07-15 13:09:17.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 245, + /**/ + + +-- + When danger reared its ugly head, + He bravely turned his tail and fled + Yes, Brave Sir Robin turned about + And gallantly he chickened out + Bravely taking to his feet + He beat a very brave retreat + Bravest of the brave Sir Robin + Petrified of being dead + Soiled his pants then brave Sir Robin + Turned away and fled. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 3f19a0d0c1681fe8d4063a5de6a391fd23cea5a8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:44:52 +0200 Subject: [PATCH 0424/3803] - patchlevel 246 --- 7.3.246 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 7.3.246 diff --git a/7.3.246 b/7.3.246 new file mode 100644 index 00000000..d9982ea0 --- /dev/null +++ b/7.3.246 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.246 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.246 (after 7.3.235) +Problem: Repeating "f4" in "4444" skips one 4. +Solution: Check the t_cmd flag. (Christian Brabandt) +Files: src/search.c + + +*** ../vim-7.3.245/src/search.c 2011-06-26 05:36:07.000000000 +0200 +--- src/search.c 2011-07-15 13:16:49.000000000 +0200 +*************** +*** 1585,1591 **** + /* Force a move of at least one char, so ";" and "," will move the + * cursor, even if the cursor is right in front of char we are looking + * at. */ +! if (vim_strchr(p_cpo, CPO_SCOLON) == NULL && count == 1) + stop = FALSE; + } + +--- 1585,1591 ---- + /* Force a move of at least one char, so ";" and "," will move the + * cursor, even if the cursor is right in front of char we are looking + * at. */ +! if (vim_strchr(p_cpo, CPO_SCOLON) == NULL && count == 1 && t_cmd) + stop = FALSE; + } + +*** ../vim-7.3.245/src/version.c 2011-07-15 13:09:46.000000000 +0200 +--- src/version.c 2011-07-15 13:20:40.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 246, + /**/ + +-- + GALAHAD turns back. We see from his POV the lovely ZOOT standing by him + smiling enchantingly and a number of equally delectable GIRLIES draped + around in the seductively poulticed room. They look at him smilingly and + wave. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 6c8853250b8c395b8d5587d1ca3a861c79de4f89 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:44:53 +0200 Subject: [PATCH 0425/3803] - patchlevel 247 --- 7.3.247 | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 7.3.247 diff --git a/7.3.247 b/7.3.247 new file mode 100644 index 00000000..a0cb566c --- /dev/null +++ b/7.3.247 @@ -0,0 +1,95 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.247 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.247 +Problem: Running tests changes the users viminfo file. Test for patch + 7.3.246 missing. +Solution: Add "nviminfo" to the 'viminfo' option. Include the test. +Files: src/testdir/test78.in, src/testdir/test81.in + + +*** ../vim-7.3.246/src/testdir/test78.in 2011-06-13 01:07:22.000000000 +0200 +--- src/testdir/test78.in 2011-07-15 13:26:22.000000000 +0200 +*************** +*** 6,12 **** + + STARTTEST + :so small.vim +! :set nocp fileformat=unix undolevels=-1 + :e! Xtest + ggdG + :let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789" +--- 6,12 ---- + + STARTTEST + :so small.vim +! :set nocp fileformat=unix undolevels=-1 viminfo+=nviminfo + :e! Xtest + ggdG + :let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789" +*** ../vim-7.3.246/src/testdir/test81.in 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/test81.in 2011-07-15 13:25:00.000000000 +0200 +*************** +*** 1,10 **** + Test for t movement command and 'cpo-;' setting + + STARTTEST +! :set nocompatible + :set cpo-=; + /firstline/ + j0tt;D + $Ty;D:set cpo+=; + j0tt;;D + $Ty;;D:?firstline?+1,$w! test.out +--- 1,12 ---- + Test for t movement command and 'cpo-;' setting + + STARTTEST +! :set nocompatible viminfo+=nviminfo + :set cpo-=; + /firstline/ + j0tt;D ++ 0fz;D ++ $Fy;D + $Ty;D:set cpo+=; + j0tt;;D + $Ty;;D:?firstline?+1,$w! test.out +*************** +*** 13,18 **** +--- 15,22 ---- + + firstline + aaa two three four ++ zzz ++ yyy + bbb yee yoo four + ccc two three four + ddd yee yoo four +*** ../vim-7.3.246/src/version.c 2011-07-15 13:21:24.000000000 +0200 +--- src/version.c 2011-07-15 13:31:14.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 247, + /**/ + +-- +ZOOT: I'm afraid our life must seem very dull and quiet compared to yours. + We are but eightscore young blondes, all between sixteen and + nineteen-and-a-half, cut off in this castle, with no one to protect us. + Oooh. It is a lonely life ... bathing ... dressing ... undressing ... + making exciting underwear.... + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 7fccbb4fccf866bbc815b36ff6573b8ed73558c0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:44:54 +0200 Subject: [PATCH 0426/3803] - patchlevel 248 --- 7.3.248 | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 7.3.248 diff --git a/7.3.248 b/7.3.248 new file mode 100644 index 00000000..6fbf3f6c --- /dev/null +++ b/7.3.248 @@ -0,0 +1,129 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.248 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.248 +Problem: PC Install instructions missing install instructions. +Solution: Step-by-step explanation. (Michael Soyka) +Files: src/INSTALLpc.txt + + +*** ../vim-7.3.247/src/INSTALLpc.txt 2011-06-12 20:36:00.000000000 +0200 +--- src/INSTALLpc.txt 2011-07-15 13:49:46.000000000 +0200 +*************** +*** 11,19 **** + this, then you will get the default behavior as is documented, which should + be fine for most people. + +! With the exception of the last two sections (Windows 3.1 and MS-DOS), +! this document assumes that you are building Vim for Win32 +! (Windows NT/2000/XP/2003/Vista and Windows 95/98/Me) + + + Contents: +--- 11,19 ---- + this, then you will get the default behavior as is documented, which should + be fine for most people. + +! With the exception of two sections (Windows 3.1 and MS-DOS), this document +! assumes that you are building Vim for Win32 or later. +! (Windows 95/98/Me/NT/2000/XP/2003/Vista/7) + + + Contents: +*************** +*** 27,32 **** +--- 27,35 ---- + 8. Windows 3.1 + 9. MS-DOS + ++ 10. Installing after building from sources ++ ++ + The currently preferred method is using the free Visual C++ Toolkit 2008 + |msvc-2008-express|, the produced binary runs on most MS-Windows systems. If + you need the executable to run on Windows 98 or ME, use the 2003 one +*************** +*** 409,411 **** +--- 412,470 ---- + + If you get all kinds of strange error messages when compiling, try adding + changing the file format from "unix" to "dos". ++ ++ ++ 10. Installing after building from sources ++ ========================================== ++ ++ [provided by Michael Soyka] ++ ++ After you've built the Vim binaries as described above, you're ready to ++ install Vim on your system. However, if you've obtained the Vim sources ++ using Mercurial or by downloading them as a unix tar file, you must first ++ create a "vim73" directory. If you instead downloaded the sources as ++ zip files, you can skip this setup as the zip archives already have the ++ correct directory structure. ++ ++ A. Create a Vim "runtime" subdirectory named "vim73" ++ ----------------------------------------------------- ++ If you obtained your Vim sources as zip files, you can skip this step. ++ Otherwise, continue reading. ++ ++ Go to the directory that contains the Vim "src" and "runtime" ++ directories and create a new subdirectory named "vim73". ++ ++ Copy the "runtime" files into "vim73": ++ copy runtime\* vim73 ++ ++ B. Copy the new binaries into the "vim73" directory ++ ---------------------------------------------------- ++ Regardless of how you installed the Vim sources, you need to copy the ++ new binaries you created above into "vim73": ++ ++ copy src\*.exe vim73 ++ copy src\GvimExt\gvimext.dll vim73 ++ copy src\xxd\xxd.exe vim73 ++ ++ C. Move the "vim73" directory into the Vim installation subdirectory ++ --------------------------------------------------------------------- ++ Move the "vim73" subdirectory into the subdirectory where you want Vim ++ to be installed. Typically, this subdirectory will be named "vim". ++ If you already have a "vim73" subdirectory in "vim", delete it first ++ by running its unstal.exe program. ++ ++ D. Install Vim ++ --------------- ++ "cd" to your Vim installation subdirectory "vim\vim73" and run the ++ "install.exe" program. It will ask you a number of questions about ++ how you would like to have your Vim setup. Among these are: ++ - You can tell it to write a "_vimrc" file with your preferences in the ++ parent directory. ++ - It can also install an "Edit with Vim" entry in the Windows Explorer ++ popup menu. ++ - You can have it create batch files, so that you can run Vim from the ++ console or in a shell. You can select one of the directories in your ++ PATH or add the directory to PATH using the Windows Control Panel. ++ - Create entries for Vim on the desktop and in the Start menu. ++ ++ Happy Vimming! +*** ../vim-7.3.247/src/version.c 2011-07-15 13:33:17.000000000 +0200 +--- src/version.c 2011-07-15 13:51:03.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 248, + /**/ + +-- +Linux is just like a wigwam: no Windows, no Gates and an Apache inside. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 0070ce68025453b9d1dc971bffd634b0d229258f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:44:55 +0200 Subject: [PATCH 0427/3803] - patchlevel 249 --- 7.3.249 | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 7.3.249 diff --git a/7.3.249 b/7.3.249 new file mode 100644 index 00000000..661f9797 --- /dev/null +++ b/7.3.249 @@ -0,0 +1,134 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.249 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.249 +Problem: Wrong indenting for array initializer. +Solution: Detect '}' in a better way. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.248/src/misc1.c 2011-06-12 21:51:01.000000000 +0200 +--- src/misc1.c 2011-07-15 14:06:44.000000000 +0200 +*************** +*** 7945,7952 **** + * If we're at the end of a block, skip to the start of + * that block. + */ +! curwin->w_cursor.col = 0; +! if (*cin_skipcomment(l) == '}' + && (trypos = find_start_brace(ind_maxcomment)) + != NULL) /* XXX */ + { +--- 7945,7951 ---- + * If we're at the end of a block, skip to the start of + * that block. + */ +! if (find_last_paren(l, '{', '}') + && (trypos = find_start_brace(ind_maxcomment)) + != NULL) /* XXX */ + { +*** ../vim-7.3.248/src/testdir/test3.in 2011-06-12 21:51:01.000000000 +0200 +--- src/testdir/test3.in 2011-07-15 14:03:41.000000000 +0200 +*************** +*** 1452,1457 **** +--- 1452,1487 ---- + + STARTTEST + :set cino& ++ :set cino+=l1 ++ 2kdd=][ ++ ENDTEST ++ ++ void func(void) ++ { ++ int tab[] = ++ { ++ 1, 2, 3, ++ 4, 5, 6}; ++ ++ printf("Indent this line correctly!\n"); ++ ++ switch (foo) ++ { ++ case bar: ++ printf("bar"); ++ break; ++ case baz: { ++ printf("baz"); ++ break; ++ } ++ case quux: ++ printf("But don't break the indentation of this instruction\n"); ++ break; ++ } ++ } ++ ++ STARTTEST ++ :set cino& + 2kdd=][ + ENDTEST + +*** ../vim-7.3.248/src/testdir/test3.ok 2011-06-12 21:51:01.000000000 +0200 +--- src/testdir/test3.ok 2011-07-15 14:03:41.000000000 +0200 +*************** +*** 1310,1315 **** +--- 1310,1340 ---- + + void func(void) + { ++ int tab[] = ++ { ++ 1, 2, 3, ++ 4, 5, 6}; ++ ++ printf("Indent this line correctly!\n"); ++ ++ switch (foo) ++ { ++ case bar: ++ printf("bar"); ++ break; ++ case baz: { ++ printf("baz"); ++ break; ++ } ++ case quux: ++ printf("But don't break the indentation of this instruction\n"); ++ break; ++ } ++ } ++ ++ ++ void func(void) ++ { + cout << "a" + << "b" + << ") :" +*** ../vim-7.3.248/src/version.c 2011-07-15 13:51:57.000000000 +0200 +--- src/version.c 2011-07-15 14:12:05.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 249, + /**/ + +-- + GALAHAD hurries to the door and pushes through it. As he leaves the room + we CUT TO the reverse to show that he is now in a room full of bathing + and romping GIRLIES, all innocent, wide-eyed and beautiful. They smile + enchantingly at him as he tries to keep walking without being diverted by + the lovely sights assaulting his eyeballs. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 7ef2e6a4477a50900789835d0f8a31b41f1b1fd6 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:44:56 +0200 Subject: [PATCH 0428/3803] - patchlevel 250 --- 7.3.250 | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 7.3.250 diff --git a/7.3.250 b/7.3.250 new file mode 100644 index 00000000..fc33328b --- /dev/null +++ b/7.3.250 @@ -0,0 +1,104 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.250 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.250 +Problem: Python: Errors in Unicode characters not handled nicely. +Solution: Add the surrogateescape error handler. (lilydjwg) +Files: src/if_python3.c + + +*** ../vim-7.3.249/src/if_python3.c 2011-06-26 19:13:33.000000000 +0200 +--- src/if_python3.c 2011-07-15 15:50:01.000000000 +0200 +*************** +*** 68,76 **** + + static void init_structs(void); + + #define PyInt Py_ssize_t + #define PyString_Check(obj) PyUnicode_Check(obj) +! #define PyString_AsBytes(obj) PyUnicode_AsEncodedString(obj, (char *)ENC_OPT, NULL); + #define PyString_FreeBytes(obj) Py_XDECREF(bytes) + #define PyString_AsString(obj) PyBytes_AsString(obj) + #define PyString_Size(obj) PyBytes_GET_SIZE(bytes) +--- 68,83 ---- + + static void init_structs(void); + ++ /* The "surrogateescape" error handler is new in Python 3.1 */ ++ #if PY_VERSION_HEX >= 0x030100f0 ++ # define CODEC_ERROR_HANDLER "surrogateescape" ++ #else ++ # define CODEC_ERROR_HANDLER NULL ++ #endif ++ + #define PyInt Py_ssize_t + #define PyString_Check(obj) PyUnicode_Check(obj) +! #define PyString_AsBytes(obj) PyUnicode_AsEncodedString(obj, (char *)ENC_OPT, CODEC_ERROR_HANDLER); + #define PyString_FreeBytes(obj) Py_XDECREF(bytes) + #define PyString_AsString(obj) PyBytes_AsString(obj) + #define PyString_Size(obj) PyBytes_GET_SIZE(bytes) +*************** +*** 661,668 **** + + /* PyRun_SimpleString expects a UTF-8 string. Wrong encoding may cause + * SyntaxError (unicode error). */ +! cmdstr = PyUnicode_Decode(cmd, strlen(cmd), (char *)ENC_OPT, NULL); +! cmdbytes = PyUnicode_AsEncodedString(cmdstr, "utf-8", NULL); + Py_XDECREF(cmdstr); + PyRun_SimpleString(PyBytes_AsString(cmdbytes)); + Py_XDECREF(cmdbytes); +--- 668,676 ---- + + /* PyRun_SimpleString expects a UTF-8 string. Wrong encoding may cause + * SyntaxError (unicode error). */ +! cmdstr = PyUnicode_Decode(cmd, strlen(cmd), +! (char *)ENC_OPT, CODEC_ERROR_HANDLER); +! cmdbytes = PyUnicode_AsEncodedString(cmdstr, "utf-8", CODEC_ERROR_HANDLER); + Py_XDECREF(cmdstr); + PyRun_SimpleString(PyBytes_AsString(cmdbytes)); + Py_XDECREF(cmdbytes); +*************** +*** 1463,1469 **** + } + *p = '\0'; + +! result = PyUnicode_Decode(tmp, len, (char *)ENC_OPT, NULL); + + vim_free(tmp); + return result; +--- 1471,1477 ---- + } + *p = '\0'; + +! result = PyUnicode_Decode(tmp, len, (char *)ENC_OPT, CODEC_ERROR_HANDLER); + + vim_free(tmp); + return result; +*** ../vim-7.3.249/src/version.c 2011-07-15 14:12:25.000000000 +0200 +--- src/version.c 2011-07-15 15:46:19.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 250, + /**/ + +-- +DINGO: You must spank her well and after you have spanked her you + may deal with her as you like and then ... spank me. +AMAZING: And spank me! +STUNNER: And me. +LOVELY: And me. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 6b3fc87ac46d226ea55ee0ea852a0918d6c5f90b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:44:57 +0200 Subject: [PATCH 0429/3803] - patchlevel 251 --- 7.3.251 | 184 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 7.3.251 diff --git a/7.3.251 b/7.3.251 new file mode 100644 index 00000000..43aa4148 --- /dev/null +++ b/7.3.251 @@ -0,0 +1,184 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.251 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.251 +Problem: "gH" deletes the current line, except when it's the last + line. +Solution: Set the "include" flag to indicate the last line is to be deleted. +Files: src/normal.c, src/ops.c + + +*** ../vim-7.3.250/src/normal.c 2011-07-07 15:08:53.000000000 +0200 +--- src/normal.c 2011-07-15 16:53:12.000000000 +0200 +*************** +*** 1795,1811 **** + { + oap->inclusive = FALSE; + /* Try to include the newline, unless it's an operator +! * that works on lines only */ +! if (*p_sel != 'o' +! && !op_on_lines(oap->op_type) +! && oap->end.lnum < curbuf->b_ml.ml_line_count) + { +! ++oap->end.lnum; +! oap->end.col = 0; + # ifdef FEAT_VIRTUALEDIT +! oap->end.coladd = 0; + # endif +! ++oap->line_count; + } + } + } +--- 1795,1819 ---- + { + oap->inclusive = FALSE; + /* Try to include the newline, unless it's an operator +! * that works on lines only. */ +! if (*p_sel != 'o' && !op_on_lines(oap->op_type)) + { +! if (oap->end.lnum < curbuf->b_ml.ml_line_count) +! { +! ++oap->end.lnum; +! oap->end.col = 0; + # ifdef FEAT_VIRTUALEDIT +! oap->end.coladd = 0; + # endif +! ++oap->line_count; +! } +! else +! { +! /* Cannot move below the last line, make the op +! * inclusive to tell the operation to include the +! * line break. */ +! oap->inclusive = TRUE; +! } + } + } + } +*** ../vim-7.3.250/src/ops.c 2011-06-19 01:14:22.000000000 +0200 +--- src/ops.c 2011-07-15 17:28:28.000000000 +0200 +*************** +*** 1650,1656 **** + && oap->line_count > 1 + && oap->op_type == OP_DELETE) + { +! ptr = ml_get(oap->end.lnum) + oap->end.col + oap->inclusive; + ptr = skipwhite(ptr); + if (*ptr == NUL && inindent(0)) + oap->motion_type = MLINE; +--- 1650,1658 ---- + && oap->line_count > 1 + && oap->op_type == OP_DELETE) + { +! ptr = ml_get(oap->end.lnum) + oap->end.col; +! if (*ptr != NUL) +! ptr += oap->inclusive; + ptr = skipwhite(ptr); + if (*ptr == NUL && inindent(0)) + oap->motion_type = MLINE; +*************** +*** 1920,1930 **** + curwin->w_cursor.coladd = 0; + } + #endif +! (void)del_bytes((long)n, !virtual_op, oap->op_type == OP_DELETE + #ifdef FEAT_VISUAL + && !oap->is_VIsual + #endif + ); + } + else /* delete characters between lines */ + { +--- 1922,1941 ---- + curwin->w_cursor.coladd = 0; + } + #endif +! if (oap->inclusive && oap->end.lnum == curbuf->b_ml.ml_line_count +! && n > (int)STRLEN(ml_get(oap->end.lnum))) +! { +! /* Special case: gH deletes the last line. */ +! del_lines(1L, FALSE); +! } +! else +! { +! (void)del_bytes((long)n, !virtual_op, oap->op_type == OP_DELETE + #ifdef FEAT_VISUAL + && !oap->is_VIsual + #endif + ); ++ } + } + else /* delete characters between lines */ + { +*************** +*** 1941,1957 **** + ++curwin->w_cursor.lnum; + del_lines((long)(oap->line_count - 2), FALSE); + +! /* delete from start of line until op_end */ +! curwin->w_cursor.col = 0; +! (void)del_bytes((long)(oap->end.col + 1 - !oap->inclusive), +! !virtual_op, oap->op_type == OP_DELETE + #ifdef FEAT_VISUAL + && !oap->is_VIsual + #endif + ); +! curwin->w_cursor = curpos; /* restore curwin->w_cursor */ +! +! (void)do_join(2, FALSE, FALSE); + } + } + +--- 1952,1980 ---- + ++curwin->w_cursor.lnum; + del_lines((long)(oap->line_count - 2), FALSE); + +! n = (oap->end.col + 1 - !oap->inclusive); +! if (oap->inclusive && oap->end.lnum == curbuf->b_ml.ml_line_count +! && n > (int)STRLEN(ml_get(oap->end.lnum))) +! { +! /* Special case: gH deletes the last line. */ +! del_lines(1L, FALSE); +! curwin->w_cursor = curpos; /* restore curwin->w_cursor */ +! if (curwin->w_cursor.lnum > 1) +! --curwin->w_cursor.lnum; +! } +! else +! { +! /* delete from start of line until op_end */ +! curwin->w_cursor.col = 0; +! (void)del_bytes((long)n, !virtual_op, oap->op_type == OP_DELETE + #ifdef FEAT_VISUAL + && !oap->is_VIsual + #endif + ); +! curwin->w_cursor = curpos; /* restore curwin->w_cursor */ +! } +! if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) +! (void)do_join(2, FALSE, FALSE); + } + } + +*** ../vim-7.3.250/src/version.c 2011-07-15 15:54:39.000000000 +0200 +--- src/version.c 2011-07-15 17:35:18.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 251, + /**/ + +-- + ### Hiroshima 45, Chernobyl 86, Windows 95 ### + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9c190f425506ec123ccb921d7b5d318223548b0b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:44:58 +0200 Subject: [PATCH 0430/3803] - patchlevel 252 --- 7.3.252 | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 7.3.252 diff --git a/7.3.252 b/7.3.252 new file mode 100644 index 00000000..e24b73be --- /dev/null +++ b/7.3.252 @@ -0,0 +1,43 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.252 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.252 (after 7.3.247) +Problem: Tests fail. (David Northfield) +Solution: Add missing update for .ok file. +Files: src/testdir/test81.ok + + +*** ../vim-7.3.251/src/testdir/test81.ok 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/test81.ok 2011-07-15 13:14:27.000000000 +0200 +*************** +*** 1,4 **** +--- 1,6 ---- + aaa two ++ z ++ y + bbb y + ccc + ddd yee y +*** ../vim-7.3.251/src/version.c 2011-07-15 17:51:30.000000000 +0200 +--- src/version.c 2011-07-15 17:55:25.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 252, + /**/ + +-- +You cannot propel yourself forward by patting yourself on the back. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e0b25627e88abeaff6fb30477692c4e0ffbb73be Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:44:58 +0200 Subject: [PATCH 0431/3803] - patchlevel 253 --- 7.3.253 | 539 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 539 insertions(+) create mode 100644 7.3.253 diff --git a/7.3.253 b/7.3.253 new file mode 100644 index 00000000..70e415b5 --- /dev/null +++ b/7.3.253 @@ -0,0 +1,539 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.253 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.253 +Problem: "echo 'abc' > ''" returns 0 or 1, depending on 'ignorecase'. + Checks in mb_strnicmp() for illegal and truncated bytes are + wrong. Should not assume that byte length is equal before case + folding. +Solution: Add utf_safe_read_char_adv() and utf_strnicmp(). Add a test for + this. (Ivan Krasilnikov) +Files: src/mbyte.c src/testdir/test82.in, src/testdir/test82.ok, + src/testdir/Makefile, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + + +*** ../vim-7.3.252/src/mbyte.c 2011-07-07 15:08:53.000000000 +0200 +--- src/mbyte.c 2011-07-15 20:13:52.000000000 +0200 +*************** +*** 132,137 **** +--- 132,138 ---- + static int dbcs_char2cells __ARGS((int c)); + static int dbcs_ptr2cells_len __ARGS((char_u *p, int size)); + static int dbcs_ptr2char __ARGS((char_u *p)); ++ static int utf_safe_read_char_adv __ARGS((char_u **s, size_t *n)); + + /* + * Lookup table to quickly get the length in bytes of a UTF-8 character from +*************** +*** 1701,1706 **** +--- 1702,1767 ---- + } + + /* ++ * Convert a UTF-8 byte sequence to a wide character. ++ * String is assumed to be terminated by NUL or after "n" bytes, whichever ++ * comes first. ++ * The function is safe in the sense that it never accesses memory beyond the ++ * first "n" bytes of "s". ++ * ++ * On success, returns decoded codepoint, advances "s" to the beginning of ++ * next character and decreases "n" accordingly. ++ * ++ * If end of string was reached, returns 0 and, if "n" > 0, advances "s" past ++ * NUL byte. ++ * ++ * If byte sequence is illegal or incomplete, returns -1 and does not advance ++ * "s". ++ */ ++ static int ++ utf_safe_read_char_adv(s, n) ++ char_u **s; ++ size_t *n; ++ { ++ int c, k; ++ ++ if (*n == 0) /* end of buffer */ ++ return 0; ++ ++ k = utf8len_tab_zero[**s]; ++ ++ if (k == 1) ++ { ++ /* ASCII character or NUL */ ++ (*n)--; ++ return *(*s)++; ++ } ++ ++ if ((size_t)k <= *n) ++ { ++ /* We have a multibyte sequence and it isn't truncated by buffer ++ * limits so utf_ptr2char() is safe to use. Or the first byte is ++ * illegal (k=0), and it's also safe to use utf_ptr2char(). */ ++ c = utf_ptr2char(*s); ++ ++ /* On failure, utf_ptr2char() returns the first byte, so here we ++ * check equality with the first byte. The only non-ASCII character ++ * which equals the first byte of its own UTF-8 representation is ++ * U+00C3 (UTF-8: 0xC3 0x83), so need to check that special case too. ++ * It's safe even if n=1, else we would have k=2 > n. */ ++ if (c != (int)(**s) || (c == 0xC3 && (*s)[1] == 0x83)) ++ { ++ /* byte sequence was successfully decoded */ ++ *s += k; ++ *n -= k; ++ return c; ++ } ++ } ++ ++ /* byte sequence is incomplete or illegal */ ++ return -1; ++ } ++ ++ /* + * Get character at **pp and advance *pp to the next character. + * Note: composing characters are skipped! + */ +*************** +*** 2667,2673 **** + {0x10400,0x10427,1,40} + }; + +! static int utf_convert(int a, convertStruct table[], int tableSize); + + /* + * Generic conversion function for case operations. +--- 2728,2735 ---- + {0x10400,0x10427,1,40} + }; + +! static int utf_convert __ARGS((int a, convertStruct table[], int tableSize)); +! static int utf_strnicmp __ARGS((char_u *s1, char_u *s2, size_t n1, size_t n2)); + + /* + * Generic conversion function for case operations. +*************** +*** 3079,3084 **** +--- 3141,3220 ---- + return (utf_tolower(a) != a); + } + ++ static int ++ utf_strnicmp(s1, s2, n1, n2) ++ char_u *s1, *s2; ++ size_t n1, n2; ++ { ++ int c1, c2, cdiff; ++ char_u buffer[6]; ++ ++ for (;;) ++ { ++ c1 = utf_safe_read_char_adv(&s1, &n1); ++ c2 = utf_safe_read_char_adv(&s2, &n2); ++ ++ if (c1 <= 0 || c2 <= 0) ++ break; ++ ++ if (c1 == c2) ++ continue; ++ ++ cdiff = utf_fold(c1) - utf_fold(c2); ++ if (cdiff != 0) ++ return cdiff; ++ } ++ ++ /* some string ended or has an incomplete/illegal character sequence */ ++ ++ if (c1 == 0 || c2 == 0) ++ { ++ /* some string ended. shorter string is smaller */ ++ if (c1 == 0 && c2 == 0) ++ return 0; ++ return c1 == 0 ? -1 : 1; ++ } ++ ++ /* Continue with bytewise comparison to produce some result that ++ * would make comparison operations involving this function transitive. ++ * ++ * If only one string had an error, comparison should be made with ++ * folded version of the other string. In this case it is enough ++ * to fold just one character to determine the result of comparison. */ ++ ++ if (c1 != -1 && c2 == -1) ++ { ++ n1 = utf_char2bytes(utf_fold(c1), buffer); ++ s1 = buffer; ++ } ++ else if (c2 != -1 && c1 == -1) ++ { ++ n2 = utf_char2bytes(utf_fold(c2), buffer); ++ s2 = buffer; ++ } ++ ++ while (n1 > 0 && n2 > 0 && *s1 != NUL && *s2 != NUL) ++ { ++ cdiff = (int)(*s1) - (int)(*s2); ++ if (cdiff != 0) ++ return cdiff; ++ ++ s1++; ++ s2++; ++ n1--; ++ n2--; ++ } ++ ++ if (n1 > 0 && *s1 == NUL) ++ n1 = 0; ++ if (n2 > 0 && *s2 == NUL) ++ n2 = 0; ++ ++ if (n1 == 0 && n2 == 0) ++ return 0; ++ return n1 == 0 ? -1 : 1; ++ } ++ + /* + * Version of strnicmp() that handles multi-byte characters. + * Needed for Big5, Sjift-JIS and UTF-8 encoding. Other DBCS encodings can +*************** +*** 3092,3140 **** + char_u *s1, *s2; + size_t nn; + { +! int i, j, l; + int cdiff; +- int incomplete = FALSE; + int n = (int)nn; + +! for (i = 0; i < n; i += l) + { +! if (s1[i] == NUL && s2[i] == NUL) /* both strings end */ +! return 0; +! if (enc_utf8) +! { +! l = utf_byte2len(s1[i]); +! if (l > n - i) +! { +! l = n - i; /* incomplete character */ +! incomplete = TRUE; +! } +! /* Check directly first, it's faster. */ +! for (j = 0; j < l; ++j) +! { +! if (s1[i + j] != s2[i + j]) +! break; +! if (s1[i + j] == 0) +! /* Both stings have the same bytes but are incomplete or +! * have illegal bytes, accept them as equal. */ +! l = j; +! } +! if (j < l) +! { +! /* If one of the two characters is incomplete return -1. */ +! if (incomplete || i + utf_byte2len(s2[i]) > n) +! return -1; +! /* Don't case-fold illegal bytes or truncated characters. */ +! if (utf_ptr2len(s1 + i) < l || utf_ptr2len(s2 + i) < l) +! return -1; +! cdiff = utf_fold(utf_ptr2char(s1 + i)) +! - utf_fold(utf_ptr2char(s2 + i)); +! if (cdiff != 0) +! return cdiff; +! } +! } +! else + { + l = (*mb_ptr2len)(s1 + i); + if (l <= 1) + { +--- 3228,3248 ---- + char_u *s1, *s2; + size_t nn; + { +! int i, l; + int cdiff; + int n = (int)nn; + +! if (enc_utf8) + { +! return utf_strnicmp(s1, s2, nn, nn); +! } +! else +! { +! for (i = 0; i < n; i += l) + { ++ if (s1[i] == NUL && s2[i] == NUL) /* both strings end */ ++ return 0; ++ + l = (*mb_ptr2len)(s1 + i); + if (l <= 1) + { +*** ../vim-7.3.252/src/testdir/test82.in 2011-07-15 21:16:03.000000000 +0200 +--- src/testdir/test82.in 2011-07-15 18:22:46.000000000 +0200 +*************** +*** 0 **** +--- 1,93 ---- ++ Tests for case-insensitive UTF-8 comparisons (utf_strnicmp() in mbyte.c) ++ ++ STARTTEST ++ :so small.vim ++ :if !has("multi_byte") ++ : e! test.ok ++ : w! test.out ++ : qa! ++ :endif ++ :set enc=utf8 ++ ggdG ++ : ++ :function! Ch(a, op, b, expected) ++ : if eval(printf('"%s" %s "%s"', a:a, a:op, a:b)) != a:expected ++ : call append(line('$'), printf('"%s" %s "%s" should return %d', a:a, a:op, a:b, a:expected)) ++ : else ++ : let b:passed += 1 ++ : endif ++ :endfunction ++ : ++ :function! Chk(a, b, result) ++ : if a:result == 0 ++ : call Ch(a:a, '==?', a:b, 1) ++ : call Ch(a:a, '!=?', a:b, 0) ++ : call Ch(a:a, '<=?', a:b, 1) ++ : call Ch(a:a, '>=?', a:b, 1) ++ : call Ch(a:a, '?', a:b, 0) ++ : elseif a:result > 0 ++ : call Ch(a:a, '==?', a:b, 0) ++ : call Ch(a:a, '!=?', a:b, 1) ++ : call Ch(a:a, '<=?', a:b, 0) ++ : call Ch(a:a, '>=?', a:b, 1) ++ : call Ch(a:a, '?', a:b, 1) ++ : else ++ : call Ch(a:a, '==?', a:b, 0) ++ : call Ch(a:a, '!=?', a:b, 1) ++ : call Ch(a:a, '<=?', a:b, 1) ++ : call Ch(a:a, '>=?', a:b, 0) ++ : call Ch(a:a, '?', a:b, 0) ++ : endif ++ :endfunction ++ : ++ :function! Check(a, b, result) ++ : call Chk(a:a, a:b, a:result) ++ : call Chk(a:b, a:a, -a:result) ++ :endfunction ++ : ++ :function! LT(a, b) ++ : call Check(a:a, a:b, -1) ++ :endfunction ++ : ++ :function! GT(a, b) ++ : call Check(a:a, a:b, 1) ++ :endfunction ++ : ++ :function! EQ(a, b) ++ : call Check(a:a, a:b, 0) ++ :endfunction ++ : ++ :let b:passed=0 ++ :call EQ('', '') ++ :call LT('', 'a') ++ :call EQ('abc', 'abc') ++ :call EQ('Abc', 'abC') ++ :call LT('ab', 'abc') ++ :call LT('AB', 'abc') ++ :call LT('ab', 'aBc') ++ :call EQ('\xd0\xb9\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd', '\xd0\xb9\xd0\xa6\xd0\xa3\xd0\xba\xd0\x95\xd0\xbd') ++ :call LT('\xd0\xb9\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd', '\xd0\xaf\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd') ++ :call EQ('\xe2\x84\xaa', 'k') ++ :call LT('\xe2\x84\xaa', 'kkkkkk') ++ :call EQ('\xe2\x84\xaa\xe2\x84\xaa\xe2\x84\xaa', 'kkk') ++ :call LT('kk', '\xe2\x84\xaa\xe2\x84\xaa\xe2\x84\xaa') ++ :call EQ('\xe2\x84\xaa\xe2\x84\xa6k\xe2\x84\xaak\xcf\x89', 'k\xcf\x89\xe2\x84\xaakk\xe2\x84\xa6') ++ :call EQ('Abc\x80', 'AbC\x80') ++ :call LT('Abc\x80', 'AbC\x81') ++ :call LT('Abc', 'AbC\x80') ++ :call LT('abc\x80DEF', 'abc\x80def') " case folding stops at the first bad character ++ :call LT('\xc3XYZ', '\xc3xyz') ++ :call EQ('\xef\xbc\xba', '\xef\xbd\x9a') " FF3A (upper), FF5A (lower) ++ :call GT('\xef\xbc\xba', '\xef\xbc\xff') " first string is ok and equals \xef\xbd\x9a after folding, second string is illegal and was left unchanged, then the strings were bytewise compared ++ :call LT('\xc3', '\xc3\x83') ++ :call EQ('\xc3\xa3xYz', '\xc3\x83XyZ') ++ :for n in range(0x60, 0xFF) | call LT(printf('xYz\x%.2X', n-1), printf('XyZ\x%.2X', n)) | endfor ++ :for n in range(0x80, 0xBF) | call EQ(printf('xYz\xc2\x%.2XUvW', n), printf('XyZ\xc2\x%.2XuVw', n)) | endfor ++ :for n in range(0xC0, 0xFF) | call LT(printf('xYz\xc2\x%.2XUvW', n), printf('XyZ\xc2\x%.2XuVw', n)) | endfor ++ :call append(0, printf('%d checks passed', b:passed)) ++ :wq! test.out ++ ENDTEST ++ +*** ../vim-7.3.252/src/testdir/test82.ok 2011-07-15 21:16:03.000000000 +0200 +--- src/testdir/test82.ok 2011-07-15 18:37:33.000000000 +0200 +*************** +*** 0 **** +--- 1,2 ---- ++ 3732 checks passed ++ +*** ../vim-7.3.252/src/testdir/Makefile 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/Makefile 2011-07-15 18:30:08.000000000 +0200 +*************** +*** 26,32 **** + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out + + SCRIPTS_GUI = test16.out + +--- 26,32 ---- + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out test82.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.3.252/src/testdir/Make_amiga.mak 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/Make_amiga.mak 2011-07-15 18:29:50.000000000 +0200 +*************** +*** 29,35 **** + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ + test76.out test77.out test78.out test79.out test80.out \ +! test81.out + + .SUFFIXES: .in .out + +--- 29,35 ---- + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ + test76.out test77.out test78.out test79.out test80.out \ +! test81.out test82.out + + .SUFFIXES: .in .out + +*************** +*** 130,132 **** +--- 130,133 ---- + test79.out: test79.in + test80.out: test80.in + test81.out: test81.in ++ test82.out: test82.in +*** ../vim-7.3.252/src/testdir/Make_dos.mak 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/Make_dos.mak 2011-07-15 18:30:02.000000000 +0200 +*************** +*** 29,35 **** + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out + + SCRIPTS32 = test50.out test70.out + +--- 29,35 ---- + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out test82.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.252/src/testdir/Make_ming.mak 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/Make_ming.mak 2011-07-15 18:30:15.000000000 +0200 +*************** +*** 49,55 **** + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out + + SCRIPTS32 = test50.out test70.out + +--- 49,55 ---- + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out test82.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.252/src/testdir/Make_os2.mak 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/Make_os2.mak 2011-07-15 18:30:25.000000000 +0200 +*************** +*** 29,35 **** + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ + test76.out test77.out test78.out test79.out test80.out \ +! test81.out + + .SUFFIXES: .in .out + +--- 29,35 ---- + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ + test76.out test77.out test78.out test79.out test80.out \ +! test81.out test82.out + + .SUFFIXES: .in .out + +*** ../vim-7.3.252/src/testdir/Make_vms.mms 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/Make_vms.mms 2011-07-15 18:30:33.000000000 +0200 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Jun 26 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Jul 15 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +*************** +*** 75,81 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ + test71.out test72.out test74.out test75.out test76.out \ +! test77.out test78.out test79.out test80.out test81.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 75,82 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ + test71.out test72.out test74.out test75.out test76.out \ +! test77.out test78.out test79.out test80.out test81.out \ +! test82.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.3.252/src/version.c 2011-07-15 17:56:11.000000000 +0200 +--- src/version.c 2011-07-15 21:12:26.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 253, + /**/ + +-- +"Intelligence has much less practical application than you'd think." + -- Scott Adams, Dilbert. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ad3aa508b8556a8b4c481fa06186150973f89c5d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:44:59 +0200 Subject: [PATCH 0432/3803] - patchlevel 254 --- 7.3.254 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 7.3.254 diff --git a/7.3.254 b/7.3.254 new file mode 100644 index 00000000..85176a7a --- /dev/null +++ b/7.3.254 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.254 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.254 +Problem: The coladd field is not reset when setting the line number for a + ":call" command. +Solution: Reset it. +Files: src/eval.c + + +*** ../vim-7.3.253/src/eval.c 2011-07-07 17:36:52.000000000 +0200 +--- src/eval.c 2011-07-07 17:51:42.000000000 +0200 +*************** +*** 3430,3435 **** +--- 3430,3438 ---- + { + curwin->w_cursor.lnum = lnum; + curwin->w_cursor.col = 0; ++ #ifdef FEAT_VIRTUALEDIT ++ curwin->w_cursor.coladd = 0; ++ #endif + } + arg = startarg; + if (get_func_tv(name, (int)STRLEN(name), &rettv, &arg, +*** ../vim-7.3.253/src/version.c 2011-07-15 21:16:54.000000000 +0200 +--- src/version.c 2011-07-15 21:23:16.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 254, + /**/ + +-- +Eight Megabytes And Continually Swapping. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b3b93d95eace4605d26d3c0e7a3482b1fe2f376e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:44:59 +0200 Subject: [PATCH 0433/3803] - patchlevel 255 --- 7.3.255 | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 7.3.255 diff --git a/7.3.255 b/7.3.255 new file mode 100644 index 00000000..c01a585e --- /dev/null +++ b/7.3.255 @@ -0,0 +1,81 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.255 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.255 +Problem: When editing a file such as "File[2010-08-15].vim" an E16 error is + given. (Manuel Stol) +Solution: Don't give an error for failing to compile the regexp. +Files: src/ex_docmd.c, src/misc1.c, src/vim.h + + +*** ../vim-7.3.254/src/ex_docmd.c 2011-06-13 01:19:48.000000000 +0200 +--- src/ex_docmd.c 2011-07-20 14:48:01.000000000 +0200 +*************** +*** 7069,7075 **** + old_arg_count = GARGCOUNT; + if (expand_wildcards(old_arg_count, old_arg_files, + &new_arg_file_count, &new_arg_files, +! EW_FILE|EW_NOTFOUND|EW_ADDSLASH) == OK + && new_arg_file_count > 0) + { + alist_set(&global_alist, new_arg_file_count, new_arg_files, +--- 7069,7075 ---- + old_arg_count = GARGCOUNT; + if (expand_wildcards(old_arg_count, old_arg_files, + &new_arg_file_count, &new_arg_files, +! EW_FILE|EW_NOTFOUND|EW_ADDSLASH|EW_NOERROR) == OK + && new_arg_file_count > 0) + { + alist_set(&global_alist, new_arg_file_count, new_arg_files, +*** ../vim-7.3.254/src/misc1.c 2011-07-15 14:12:25.000000000 +0200 +--- src/misc1.c 2011-07-20 14:55:09.000000000 +0200 +*************** +*** 9043,9050 **** +--- 9043,9054 ---- + } + + /* compile the regexp into a program */ ++ if (flags & EW_NOERROR) ++ ++emsg_silent; + regmatch.rm_ic = TRUE; /* Always ignore case */ + regmatch.regprog = vim_regcomp(pat, RE_MAGIC); ++ if (flags & EW_NOERROR) ++ --emsg_silent; + vim_free(pat); + + if (regmatch.regprog == NULL) +*** ../vim-7.3.254/src/vim.h 2011-06-13 02:03:55.000000000 +0200 +--- src/vim.h 2011-07-20 14:50:13.000000000 +0200 +*************** +*** 815,820 **** +--- 815,821 ---- + #define EW_EXEC 0x40 /* executable files */ + #define EW_PATH 0x80 /* search in 'path' too */ + #define EW_ICASE 0x100 /* ignore case */ ++ #define EW_NOERROR 0x200 /* no error for bad regexp */ + /* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND + * is used when executing commands and EW_SILENT for interactive expanding. */ + +*** ../vim-7.3.254/src/version.c 2011-07-15 21:24:06.000000000 +0200 +--- src/version.c 2011-07-20 15:03:52.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 255, + /**/ + +-- +Not too long ago, a program was something you watched on TV... + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f410e201717bd080ab1d96fce916306cb9f06386 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:00 +0200 Subject: [PATCH 0434/3803] - patchlevel 256 --- 7.3.256 | 322 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 322 insertions(+) create mode 100644 7.3.256 diff --git a/7.3.256 b/7.3.256 new file mode 100644 index 00000000..b8c9f00d --- /dev/null +++ b/7.3.256 @@ -0,0 +1,322 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.256 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.256 +Problem: Javascript indenting not sufficiently tested. +Solution: Add more tests. (Luc Deschenaux) Mark the lines that are indented + wrong. +Files: src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.255/src/testdir/test3.in 2011-07-15 14:12:25.000000000 +0200 +--- src/testdir/test3.in 2011-07-15 21:05:49.000000000 +0200 +*************** +*** 1592,1598 **** + + + STARTTEST +! :set cino=J1 + /^JSSTART + =/^JSEND + ENDTEST +--- 1592,1598 ---- + + + STARTTEST +! :set cino=j1,J1 + /^JSSTART + =/^JSEND + ENDTEST +*************** +*** 1613,1618 **** +--- 1613,1757 ---- + JSEND + + STARTTEST ++ :set cino=j1,J1 ++ /^JSSTART ++ =/^JSEND ++ ENDTEST ++ ++ JSSTART ++ var foo = [ ++ 1, // indent 8 more ++ 2, ++ 3 ++ ]; // indent 8 less ++ JSEND ++ ++ STARTTEST ++ :set cino=j1,J1 ++ /^JSSTART ++ =/^JSEND ++ ENDTEST ++ ++ JSSTART ++ function bar() { ++ var foo = [ ++ 1, ++ 2, ++ 3 ++ ]; // indent 16 less ++ } ++ JSEND ++ ++ STARTTEST ++ :set cino=j1,J1 ++ /^JSSTART ++ =/^JSEND ++ ENDTEST ++ ++ JSSTART ++ (function($){ ++ ++ var class_name='myclass'; ++ ++ function private_method() { ++ } ++ ++ var public_method={ ++ method: function(options,args){ ++ private_method(); ++ } ++ } ++ ++ function init(options) { ++ ++ $(this).data(class_name+'_public',$.extend({},{ ++ foo: 'bar', ++ bar: 2, // indent 8 more ++ foobar: [ // indent 8 more ++ 1, // indent 8 more ++ 2, // indent 16 more ++ 3 // indent 16 more ++ ], ++ callback: function(){ // indent 8 more ++ return true; // indent 8 more ++ } // indent 8 more ++ }, options||{})); ++ } ++ ++ $.fn[class_name]=function() { ++ ++ var _arguments=arguments; ++ return this.each(function(){ ++ ++ var options=$(this).data(class_name+'_public'); ++ if (!options) { ++ init.apply(this,_arguments); ++ ++ } else { ++ var method=public_method[_arguments[0]]; ++ ++ if (typeof(method)!='function') { ++ console.log(class_name+' has no method "'+_arguments[0]+'"'); ++ return false; ++ } ++ _arguments[0]=options; ++ method.apply(this,_arguments); ++ } ++ }); ++ } ++ ++ })(jQuery); ++ JSEND ++ ++ STARTTEST ++ :set cino=j1,J1 ++ /^JSSTART ++ =/^JSEND ++ ENDTEST ++ ++ JSSTART ++ function init(options) { ++ $(this).data(class_name+'_public',$.extend({},{ ++ foo: 'bar', ++ bar: 2, ++ foobar: [ ++ 1, // indent 8 more ++ 2, // indent 8 more ++ 3 // indent 8 more ++ ], ++ callback: function(){ ++ return true; ++ } ++ }, options||{})); ++ } ++ JSEND ++ ++ STARTTEST ++ :set cino=j1,J1 ++ /^JSSTART ++ =/^JSEND ++ ENDTEST ++ ++ JSSTART ++ (function($){ ++ function init(options) { ++ $(this).data(class_name+'_public',$.extend({},{ ++ foo: 'bar', ++ bar: 2, // indent 8 more ++ foobar: [ // indent 8 more ++ 1, // indent 8 more ++ 2, // indent 16 more ++ 3 // indent 16 more ++ ], ++ callback: function(){ // indent 8 more ++ return true; // indent 8 more ++ } // indent 8 more ++ }, options||{})); ++ } ++ })(jQuery); ++ JSEND ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../vim-7.3.255/src/testdir/test3.ok 2011-07-15 14:12:25.000000000 +0200 +--- src/testdir/test3.ok 2011-07-15 21:06:38.000000000 +0200 +*************** +*** 1443,1445 **** +--- 1443,1559 ---- + } + JSEND + ++ ++ JSSTART ++ var foo = [ ++ 1, // indent 8 more ++ 2, ++ 3 ++ ]; // indent 8 less ++ JSEND ++ ++ ++ JSSTART ++ function bar() { ++ var foo = [ ++ 1, ++ 2, ++ 3 ++ ]; // indent 16 less ++ } ++ JSEND ++ ++ ++ JSSTART ++ (function($){ ++ ++ var class_name='myclass'; ++ ++ function private_method() { ++ } ++ ++ var public_method={ ++ method: function(options,args){ ++ private_method(); ++ } ++ } ++ ++ function init(options) { ++ ++ $(this).data(class_name+'_public',$.extend({},{ ++ foo: 'bar', ++ bar: 2, // indent 8 more ++ foobar: [ // indent 8 more ++ 1, // indent 8 more ++ 2, // indent 16 more ++ 3 // indent 16 more ++ ], ++ callback: function(){ // indent 8 more ++ return true; // indent 8 more ++ } // indent 8 more ++ }, options||{})); ++ } ++ ++ $.fn[class_name]=function() { ++ ++ var _arguments=arguments; ++ return this.each(function(){ ++ ++ var options=$(this).data(class_name+'_public'); ++ if (!options) { ++ init.apply(this,_arguments); ++ ++ } else { ++ var method=public_method[_arguments[0]]; ++ ++ if (typeof(method)!='function') { ++ console.log(class_name+' has no method "'+_arguments[0]+'"'); ++ return false; ++ } ++ _arguments[0]=options; ++ method.apply(this,_arguments); ++ } ++ }); ++ } ++ ++ })(jQuery); ++ JSEND ++ ++ ++ JSSTART ++ function init(options) { ++ $(this).data(class_name+'_public',$.extend({},{ ++ foo: 'bar', ++ bar: 2, ++ foobar: [ ++ 1, // indent 8 more ++ 2, // indent 8 more ++ 3 // indent 8 more ++ ], ++ callback: function(){ ++ return true; ++ } ++ }, options||{})); ++ } ++ JSEND ++ ++ ++ JSSTART ++ (function($){ ++ function init(options) { ++ $(this).data(class_name+'_public',$.extend({},{ ++ foo: 'bar', ++ bar: 2, // indent 8 more ++ foobar: [ // indent 8 more ++ 1, // indent 8 more ++ 2, // indent 16 more ++ 3 // indent 16 more ++ ], ++ callback: function(){ // indent 8 more ++ return true; // indent 8 more ++ } // indent 8 more ++ }, options||{})); ++ } ++ })(jQuery); ++ JSEND ++ +*** ../vim-7.3.255/src/version.c 2011-07-20 15:04:52.000000000 +0200 +--- src/version.c 2011-07-20 15:08:13.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 256, + /**/ + +-- +Not too long ago, a keyboard was something to make music with... + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From c679be038cd7fbabb64682b83705fa330243bef7 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:01 +0200 Subject: [PATCH 0435/3803] - patchlevel 257 --- 7.3.257 | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 7.3.257 diff --git a/7.3.257 b/7.3.257 new file mode 100644 index 00000000..f6292bf8 --- /dev/null +++ b/7.3.257 @@ -0,0 +1,97 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.257 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.257 +Problem: Not all completions are available to user commands. +Solution: Add "color", "compiler", "file_in_path" and "locale". (Dominique + Pelle) +Files: src/ex_docmd.c, runtime/doc/map.txt + + +*** ../vim-7.3.256/src/ex_docmd.c 2011-07-20 15:04:52.000000000 +0200 +--- src/ex_docmd.c 2011-07-20 16:10:28.000000000 +0200 +*************** +*** 5297,5303 **** +--- 5297,5305 ---- + { + {EXPAND_AUGROUP, "augroup"}, + {EXPAND_BUFFERS, "buffer"}, ++ {EXPAND_COLORS, "color"}, + {EXPAND_COMMANDS, "command"}, ++ {EXPAND_COMPILER, "compiler"}, + #if defined(FEAT_CSCOPE) + {EXPAND_CSCOPE, "cscope"}, + #endif +*************** +*** 5310,5319 **** +--- 5312,5326 ---- + {EXPAND_EVENTS, "event"}, + {EXPAND_EXPRESSION, "expression"}, + {EXPAND_FILES, "file"}, ++ {EXPAND_FILES_IN_PATH, "file_in_path"}, + {EXPAND_FILETYPE, "filetype"}, + {EXPAND_FUNCTIONS, "function"}, + {EXPAND_HELP, "help"}, + {EXPAND_HIGHLIGHT, "highlight"}, ++ #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ ++ && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) ++ {EXPAND_LOCALES, "locale"}, ++ #endif + {EXPAND_MAPPINGS, "mapping"}, + {EXPAND_MENUS, "menu"}, + {EXPAND_OWNSYNTAX, "syntax"}, +*** ../vim-7.3.256/runtime/doc/map.txt 2011-05-19 17:25:36.000000000 +0200 +--- runtime/doc/map.txt 2011-07-20 16:10:28.000000000 +0200 +*************** +*** 1202,1221 **** +--- 1211,1236 ---- + + -complete=augroup autocmd groups + -complete=buffer buffer names ++ -complete=color color schemes + -complete=command Ex command (and arguments) ++ -complete=compiler compilers ++ -complete=cscope |:cscope| suboptions + -complete=dir directory names + -complete=environment environment variable names + -complete=event autocommand events + -complete=expression Vim expression + -complete=file file and directory names ++ -complete=file_in_path file and directory names in |'path'| + -complete=filetype filetype names |'filetype'| + -complete=function function name + -complete=help help subjects + -complete=highlight highlight groups ++ -complete=locale locale names (as output of locale -a) + -complete=mapping mapping name + -complete=menu menus + -complete=option options + -complete=shellcmd Shell command ++ -complete=sign |:sign| suboptions + -complete=syntax syntax file names |'syntax'| + -complete=tag tags + -complete=tag_listfiles tags, file names are shown when CTRL-D is hit +*** ../vim-7.3.256/src/version.c 2011-07-20 15:09:38.000000000 +0200 +--- src/version.c 2011-07-20 16:30:31.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 257, + /**/ + +-- +I have to exercise early in the morning before my brain +figures out what I'm doing. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e95cb3b993236608cb8457e940ebaadc9c3eff3a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:02 +0200 Subject: [PATCH 0436/3803] - patchlevel 258 --- 7.3.258 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 7.3.258 diff --git a/7.3.258 b/7.3.258 new file mode 100644 index 00000000..277cbe77 --- /dev/null +++ b/7.3.258 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.258 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.258 +Problem: MS-Windows: The edit with existing vim context menu entries can be + unwanted. +Solution: Let a registry entry disable them. (Jerome Vuarand) +Files: src/GvimExt/gvimext.cpp + + +*** ../vim-7.3.257/src/GvimExt/gvimext.cpp 2010-08-15 21:57:29.000000000 +0200 +--- src/GvimExt/gvimext.cpp 2011-07-20 16:48:09.000000000 +0200 +*************** +*** 586,593 **** + + // Initialize m_cntOfHWnd to 0 + m_cntOfHWnd = 0; +! // Retrieve all the vim instances +! EnumWindows(EnumWindowsProc, (LPARAM)this); + + if (cbFiles > 1) + { +--- 586,608 ---- + + // Initialize m_cntOfHWnd to 0 + m_cntOfHWnd = 0; +! +! HKEY keyhandle; +! bool showExisting = true; +! +! // Check whether "Edit with existing Vim" entries are disabled. +! if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", 0, +! KEY_READ, &keyhandle) == ERROR_SUCCESS) +! { +! if (RegQueryValueEx(keyhandle, "DisableEditWithExisting", 0, NULL, +! NULL, NULL) == ERROR_SUCCESS) +! showExisting = false; +! RegCloseKey(keyhandle); +! } +! +! // Retrieve all the vim instances, unless disabled. +! if (showExisting) +! EnumWindows(EnumWindowsProc, (LPARAM)this); + + if (cbFiles > 1) + { +*** ../vim-7.3.257/src/version.c 2011-07-20 16:36:35.000000000 +0200 +--- src/version.c 2011-07-20 16:54:34.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 258, + /**/ + +-- +What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics' +meaning 'bloodsucking creatures'. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 80b7f63d512b890b7f292ea2112c8e56c41bdbb2 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:03 +0200 Subject: [PATCH 0437/3803] - patchlevel 259 --- 7.3.259 | 503 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 503 insertions(+) create mode 100644 7.3.259 diff --git a/7.3.259 b/7.3.259 new file mode 100644 index 00000000..91f9dfa1 --- /dev/null +++ b/7.3.259 @@ -0,0 +1,503 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.259 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.259 +Problem: Equivalence classes only work for latin characters. +Solution: Add the Unicode equivalence characters. (Dominique Pelle) +Files: runtime/doc/pattern.txt, src/regexp.c, src/testdir/test44.in, + src/testdir/test44.ok + + +*** ../vim-7.3.258/runtime/doc/pattern.txt 2010-08-15 21:57:14.000000000 +0200 +--- runtime/doc/pattern.txt 2011-07-20 17:44:03.000000000 +0200 +*************** +*** 1027,1037 **** + These items only work for 8-bit characters. + */[[=* *[==]* + - An equivalence class. This means that characters are matched that +! have almost the same meaning, e.g., when ignoring accents. The form +! is: + [=a=] +- Currently this is only implemented for latin1. Also works for the +- latin1 characters in utf-8 and latin9. + */[[.* *[..]* + - A collation element. This currently simply accepts a single + character in the form: +--- 1036,1044 ---- + These items only work for 8-bit characters. + */[[=* *[==]* + - An equivalence class. This means that characters are matched that +! have almost the same meaning, e.g., when ignoring accents. This +! only works for Unicode, latin1 and latin9. The form is: + [=a=] + */[[.* *[..]* + - A collation element. This currently simply accepts a single + character in the form: +*** ../vim-7.3.258/src/regexp.c 2011-06-19 04:31:54.000000000 +0200 +--- src/regexp.c 2011-07-20 17:56:52.000000000 +0200 +*************** +*** 666,673 **** +--- 666,677 ---- + static void regc __ARGS((int b)); + #ifdef FEAT_MBYTE + static void regmbc __ARGS((int c)); ++ # define REGMBC(x) regmbc(x); ++ # define CASEMBC(x) case x: + #else + # define regmbc(c) regc(c) ++ # define REGMBC(x) ++ # define CASEMBC(x) + #endif + static void reginsert __ARGS((int, char_u *)); + static void reginsert_limits __ARGS((int, long, long, char_u *)); +*************** +*** 787,854 **** + switch (c) + { + case 'A': case '\300': case '\301': case '\302': + case '\303': case '\304': case '\305': + regmbc('A'); regmbc('\300'); regmbc('\301'); + regmbc('\302'); regmbc('\303'); regmbc('\304'); + regmbc('\305'); + return; + case 'C': case '\307': + regmbc('C'); regmbc('\307'); + return; + case 'E': case '\310': case '\311': case '\312': case '\313': + regmbc('E'); regmbc('\310'); regmbc('\311'); + regmbc('\312'); regmbc('\313'); + return; + case 'I': case '\314': case '\315': case '\316': case '\317': + regmbc('I'); regmbc('\314'); regmbc('\315'); + regmbc('\316'); regmbc('\317'); + return; + case 'N': case '\321': + regmbc('N'); regmbc('\321'); + return; + case 'O': case '\322': case '\323': case '\324': case '\325': +! case '\326': + regmbc('O'); regmbc('\322'); regmbc('\323'); + regmbc('\324'); regmbc('\325'); regmbc('\326'); + return; + case 'U': case '\331': case '\332': case '\333': case '\334': + regmbc('U'); regmbc('\331'); regmbc('\332'); + regmbc('\333'); regmbc('\334'); + return; + case 'Y': case '\335': + regmbc('Y'); regmbc('\335'); + return; + case 'a': case '\340': case '\341': case '\342': + case '\343': case '\344': case '\345': + regmbc('a'); regmbc('\340'); regmbc('\341'); + regmbc('\342'); regmbc('\343'); regmbc('\344'); + regmbc('\345'); + return; + case 'c': case '\347': + regmbc('c'); regmbc('\347'); + return; + case 'e': case '\350': case '\351': case '\352': case '\353': + regmbc('e'); regmbc('\350'); regmbc('\351'); + regmbc('\352'); regmbc('\353'); + return; + case 'i': case '\354': case '\355': case '\356': case '\357': + regmbc('i'); regmbc('\354'); regmbc('\355'); + regmbc('\356'); regmbc('\357'); + return; + case 'n': case '\361': + regmbc('n'); regmbc('\361'); + return; + case 'o': case '\362': case '\363': case '\364': case '\365': +! case '\366': + regmbc('o'); regmbc('\362'); regmbc('\363'); + regmbc('\364'); regmbc('\365'); regmbc('\366'); + return; + case 'u': case '\371': case '\372': case '\373': case '\374': + regmbc('u'); regmbc('\371'); regmbc('\372'); + regmbc('\373'); regmbc('\374'); + return; + case 'y': case '\375': case '\377': + regmbc('y'); regmbc('\375'); regmbc('\377'); + return; + } + #endif +--- 791,1085 ---- + switch (c) + { + case 'A': case '\300': case '\301': case '\302': ++ CASEMBC(0x100) CASEMBC(0x102) CASEMBC(0x104) CASEMBC(0x1cd) ++ CASEMBC(0x1de) CASEMBC(0x1e0) CASEMBC(0x1ea2) + case '\303': case '\304': case '\305': + regmbc('A'); regmbc('\300'); regmbc('\301'); + regmbc('\302'); regmbc('\303'); regmbc('\304'); + regmbc('\305'); ++ REGMBC(0x100) REGMBC(0x102) REGMBC(0x104) ++ REGMBC(0x1cd) REGMBC(0x1de) REGMBC(0x1e0) ++ REGMBC(0x1ea2) ++ return; ++ case 'B': CASEMBC(0x1e02) CASEMBC(0x1e06) ++ regmbc('B'); REGMBC(0x1e02) REGMBC(0x1e06) + return; + case 'C': case '\307': ++ CASEMBC(0x106) CASEMBC(0x108) CASEMBC(0x10a) CASEMBC(0x10c) + regmbc('C'); regmbc('\307'); ++ REGMBC(0x106) REGMBC(0x108) REGMBC(0x10a) ++ REGMBC(0x10c) ++ return; ++ case 'D': CASEMBC(0x10e) CASEMBC(0x110) CASEMBC(0x1e0a) ++ CASEMBC(0x1e0e) CASEMBC(0x1e10) ++ regmbc('D'); REGMBC(0x10e) REGMBC(0x110) ++ REGMBC(0x1e0a) REGMBC(0x1e0e) REGMBC(0x1e10) + return; + case 'E': case '\310': case '\311': case '\312': case '\313': ++ CASEMBC(0x112) CASEMBC(0x114) CASEMBC(0x116) CASEMBC(0x118) ++ CASEMBC(0x11a) CASEMBC(0x1eba) CASEMBC(0x1ebc) + regmbc('E'); regmbc('\310'); regmbc('\311'); + regmbc('\312'); regmbc('\313'); ++ REGMBC(0x112) REGMBC(0x114) REGMBC(0x116) ++ REGMBC(0x118) REGMBC(0x11a) REGMBC(0x1eba) ++ REGMBC(0x1ebc) ++ return; ++ case 'F': CASEMBC(0x1e1e) ++ regmbc('F'); REGMBC(0x1e1e) ++ return; ++ case 'G': CASEMBC(0x11c) CASEMBC(0x11e) CASEMBC(0x120) ++ CASEMBC(0x122) CASEMBC(0x1e4) CASEMBC(0x1e6) CASEMBC(0x1f4) ++ CASEMBC(0x1e20) ++ regmbc('G'); REGMBC(0x11c) REGMBC(0x11e) ++ REGMBC(0x120) REGMBC(0x122) REGMBC(0x1e4) ++ REGMBC(0x1e6) REGMBC(0x1f4) REGMBC(0x1e20) ++ return; ++ case 'H': CASEMBC(0x124) CASEMBC(0x126) CASEMBC(0x1e22) ++ CASEMBC(0x1e26) CASEMBC(0x1e28) ++ regmbc('H'); REGMBC(0x124) REGMBC(0x126) ++ REGMBC(0x1e22) REGMBC(0x1e26) REGMBC(0x1e28) + return; + case 'I': case '\314': case '\315': case '\316': case '\317': ++ CASEMBC(0x128) CASEMBC(0x12a) CASEMBC(0x12c) CASEMBC(0x12e) ++ CASEMBC(0x130) CASEMBC(0x1cf) CASEMBC(0x1ec8) + regmbc('I'); regmbc('\314'); regmbc('\315'); + regmbc('\316'); regmbc('\317'); ++ REGMBC(0x128) REGMBC(0x12a) REGMBC(0x12c) ++ REGMBC(0x12e) REGMBC(0x130) REGMBC(0x1cf) ++ REGMBC(0x1ec8) ++ return; ++ case 'J': CASEMBC(0x134) ++ regmbc('J'); REGMBC(0x134) ++ return; ++ case 'K': CASEMBC(0x136) CASEMBC(0x1e8) CASEMBC(0x1e30) ++ CASEMBC(0x1e34) ++ regmbc('K'); REGMBC(0x136) REGMBC(0x1e8) ++ REGMBC(0x1e30) REGMBC(0x1e34) ++ return; ++ case 'L': CASEMBC(0x139) CASEMBC(0x13b) CASEMBC(0x13d) ++ CASEMBC(0x13f) CASEMBC(0x141) CASEMBC(0x1e3a) ++ regmbc('L'); REGMBC(0x139) REGMBC(0x13b) ++ REGMBC(0x13d) REGMBC(0x13f) REGMBC(0x141) ++ REGMBC(0x1e3a) ++ return; ++ case 'M': CASEMBC(0x1e3e) CASEMBC(0x1e40) ++ regmbc('M'); REGMBC(0x1e3e) REGMBC(0x1e40) + return; + case 'N': case '\321': ++ CASEMBC(0x143) CASEMBC(0x145) CASEMBC(0x147) CASEMBC(0x1e44) ++ CASEMBC(0x1e48) + regmbc('N'); regmbc('\321'); ++ REGMBC(0x143) REGMBC(0x145) REGMBC(0x147) ++ REGMBC(0x1e44) REGMBC(0x1e48) + return; + case 'O': case '\322': case '\323': case '\324': case '\325': +! case '\326': case '\330': +! CASEMBC(0x14c) CASEMBC(0x14e) CASEMBC(0x150) CASEMBC(0x1a0) +! CASEMBC(0x1d1) CASEMBC(0x1ea) CASEMBC(0x1ec) CASEMBC(0x1ece) + regmbc('O'); regmbc('\322'); regmbc('\323'); + regmbc('\324'); regmbc('\325'); regmbc('\326'); ++ regmbc('\330'); ++ REGMBC(0x14c) REGMBC(0x14e) REGMBC(0x150) ++ REGMBC(0x1a0) REGMBC(0x1d1) REGMBC(0x1ea) ++ REGMBC(0x1ec) REGMBC(0x1ece) ++ return; ++ case 'P': case 0x1e54: case 0x1e56: ++ regmbc('P'); REGMBC(0x1e54) REGMBC(0x1e56) ++ return; ++ case 'R': CASEMBC(0x154) CASEMBC(0x156) CASEMBC(0x158) ++ CASEMBC(0x1e58) CASEMBC(0x1e5e) ++ regmbc('R'); REGMBC(0x154) REGMBC(0x156) REGMBC(0x158) ++ REGMBC(0x1e58) REGMBC(0x1e5e) ++ return; ++ case 'S': CASEMBC(0x15a) CASEMBC(0x15c) CASEMBC(0x15e) ++ CASEMBC(0x160) CASEMBC(0x1e60) ++ regmbc('S'); REGMBC(0x15a) REGMBC(0x15c) ++ REGMBC(0x15e) REGMBC(0x160) REGMBC(0x1e60) ++ return; ++ case 'T': CASEMBC(0x162) CASEMBC(0x164) CASEMBC(0x166) ++ CASEMBC(0x1e6a) CASEMBC(0x1e6e) ++ regmbc('T'); REGMBC(0x162) REGMBC(0x164) ++ REGMBC(0x166) REGMBC(0x1e6a) REGMBC(0x1e6e) + return; + case 'U': case '\331': case '\332': case '\333': case '\334': ++ CASEMBC(0x168) CASEMBC(0x16a) CASEMBC(0x16c) CASEMBC(0x16e) ++ CASEMBC(0x170) CASEMBC(0x172) CASEMBC(0x1af) CASEMBC(0x1d3) ++ CASEMBC(0x1ee6) + regmbc('U'); regmbc('\331'); regmbc('\332'); + regmbc('\333'); regmbc('\334'); ++ REGMBC(0x168) REGMBC(0x16a) REGMBC(0x16c) ++ REGMBC(0x16e) REGMBC(0x170) REGMBC(0x172) ++ REGMBC(0x1af) REGMBC(0x1d3) REGMBC(0x1ee6) ++ return; ++ case 'V': CASEMBC(0x1e7c) ++ regmbc('V'); REGMBC(0x1e7c) ++ return; ++ case 'W': CASEMBC(0x174) CASEMBC(0x1e80) CASEMBC(0x1e82) ++ CASEMBC(0x1e84) CASEMBC(0x1e86) ++ regmbc('W'); REGMBC(0x174) REGMBC(0x1e80) ++ REGMBC(0x1e82) REGMBC(0x1e84) REGMBC(0x1e86) ++ return; ++ case 'X': CASEMBC(0x1e8a) CASEMBC(0x1e8c) ++ regmbc('X'); REGMBC(0x1e8a) REGMBC(0x1e8c) + return; + case 'Y': case '\335': ++ CASEMBC(0x176) CASEMBC(0x178) CASEMBC(0x1e8e) CASEMBC(0x1ef2) ++ CASEMBC(0x1ef6) CASEMBC(0x1ef8) + regmbc('Y'); regmbc('\335'); ++ REGMBC(0x176) REGMBC(0x178) REGMBC(0x1e8e) ++ REGMBC(0x1ef2) REGMBC(0x1ef6) REGMBC(0x1ef8) ++ return; ++ case 'Z': CASEMBC(0x179) CASEMBC(0x17b) CASEMBC(0x17d) ++ CASEMBC(0x1b5) CASEMBC(0x1e90) CASEMBC(0x1e94) ++ regmbc('Z'); REGMBC(0x179) REGMBC(0x17b) ++ REGMBC(0x17d) REGMBC(0x1b5) REGMBC(0x1e90) ++ REGMBC(0x1e94) + return; + case 'a': case '\340': case '\341': case '\342': + case '\343': case '\344': case '\345': ++ CASEMBC(0x101) CASEMBC(0x103) CASEMBC(0x105) CASEMBC(0x1ce) ++ CASEMBC(0x1df) CASEMBC(0x1e1) CASEMBC(0x1ea3) + regmbc('a'); regmbc('\340'); regmbc('\341'); + regmbc('\342'); regmbc('\343'); regmbc('\344'); + regmbc('\345'); ++ REGMBC(0x101) REGMBC(0x103) REGMBC(0x105) ++ REGMBC(0x1ce) REGMBC(0x1df) REGMBC(0x1e1) ++ REGMBC(0x1ea3) ++ return; ++ case 'b': CASEMBC(0x1e03) CASEMBC(0x1e07) ++ regmbc('b'); REGMBC(0x1e03) REGMBC(0x1e07) + return; + case 'c': case '\347': ++ CASEMBC(0x107) CASEMBC(0x109) CASEMBC(0x10b) CASEMBC(0x10d) + regmbc('c'); regmbc('\347'); ++ REGMBC(0x107) REGMBC(0x109) REGMBC(0x10b) ++ REGMBC(0x10d) ++ return; ++ case 'd': CASEMBC(0x10f) CASEMBC(0x111) CASEMBC(0x1d0b) ++ CASEMBC(0x1e11) ++ regmbc('d'); REGMBC(0x10f) REGMBC(0x111) ++ REGMBC(0x1e0b) REGMBC(0x01e0f) REGMBC(0x1e11) + return; + case 'e': case '\350': case '\351': case '\352': case '\353': ++ CASEMBC(0x113) CASEMBC(0x115) CASEMBC(0x117) CASEMBC(0x119) ++ CASEMBC(0x11b) CASEMBC(0x1ebb) CASEMBC(0x1ebd) + regmbc('e'); regmbc('\350'); regmbc('\351'); + regmbc('\352'); regmbc('\353'); ++ REGMBC(0x113) REGMBC(0x115) REGMBC(0x117) ++ REGMBC(0x119) REGMBC(0x11b) REGMBC(0x1ebb) ++ REGMBC(0x1ebd) ++ return; ++ case 'f': CASEMBC(0x1e1f) ++ regmbc('f'); REGMBC(0x1e1f) ++ return; ++ case 'g': CASEMBC(0x11d) CASEMBC(0x11f) CASEMBC(0x121) ++ CASEMBC(0x123) CASEMBC(0x1e5) CASEMBC(0x1e7) CASEMBC(0x1f5) ++ CASEMBC(0x1e21) ++ regmbc('g'); REGMBC(0x11d) REGMBC(0x11f) ++ REGMBC(0x121) REGMBC(0x123) REGMBC(0x1e5) ++ REGMBC(0x1e7) REGMBC(0x1f5) REGMBC(0x1e21) ++ return; ++ case 'h': CASEMBC(0x125) CASEMBC(0x127) CASEMBC(0x1e23) ++ CASEMBC(0x1e27) CASEMBC(0x1e29) CASEMBC(0x1e96) ++ regmbc('h'); REGMBC(0x125) REGMBC(0x127) ++ REGMBC(0x1e23) REGMBC(0x1e27) REGMBC(0x1e29) ++ REGMBC(0x1e96) + return; + case 'i': case '\354': case '\355': case '\356': case '\357': ++ CASEMBC(0x129) CASEMBC(0x12b) CASEMBC(0x12d) CASEMBC(0x12f) ++ CASEMBC(0x1d0) CASEMBC(0x1ec9) + regmbc('i'); regmbc('\354'); regmbc('\355'); + regmbc('\356'); regmbc('\357'); ++ REGMBC(0x129) REGMBC(0x12b) REGMBC(0x12d) ++ REGMBC(0x12f) REGMBC(0x1d0) REGMBC(0x1ec9) ++ return; ++ case 'j': CASEMBC(0x135) CASEMBC(0x1f0) ++ regmbc('j'); REGMBC(0x135) REGMBC(0x1f0) ++ return; ++ case 'k': CASEMBC(0x137) CASEMBC(0x1e9) CASEMBC(0x1e31) ++ CASEMBC(0x1e35) ++ regmbc('k'); REGMBC(0x137) REGMBC(0x1e9) ++ REGMBC(0x1e31) REGMBC(0x1e35) ++ return; ++ case 'l': CASEMBC(0x13a) CASEMBC(0x13c) CASEMBC(0x13e) ++ CASEMBC(0x140) CASEMBC(0x142) CASEMBC(0x1e3b) ++ regmbc('l'); REGMBC(0x13a) REGMBC(0x13c) ++ REGMBC(0x13e) REGMBC(0x140) REGMBC(0x142) ++ REGMBC(0x1e3b) ++ return; ++ case 'm': CASEMBC(0x1e3f) CASEMBC(0x1e41) ++ regmbc('m'); REGMBC(0x1e3f) REGMBC(0x1e41) + return; + case 'n': case '\361': ++ CASEMBC(0x144) CASEMBC(0x146) CASEMBC(0x148) CASEMBC(0x149) ++ CASEMBC(0x1e45) CASEMBC(0x1e49) + regmbc('n'); regmbc('\361'); ++ REGMBC(0x144) REGMBC(0x146) REGMBC(0x148) ++ REGMBC(0x149) REGMBC(0x1e45) REGMBC(0x1e49) + return; + case 'o': case '\362': case '\363': case '\364': case '\365': +! case '\366': case '\370': +! CASEMBC(0x14d) CASEMBC(0x14f) CASEMBC(0x151) CASEMBC(0x1a1) +! CASEMBC(0x1d2) CASEMBC(0x1eb) CASEMBC(0x1ed) CASEMBC(0x1ecf) + regmbc('o'); regmbc('\362'); regmbc('\363'); + regmbc('\364'); regmbc('\365'); regmbc('\366'); ++ regmbc('\370'); ++ REGMBC(0x14d) REGMBC(0x14f) REGMBC(0x151) ++ REGMBC(0x1a1) REGMBC(0x1d2) REGMBC(0x1eb) ++ REGMBC(0x1ed) REGMBC(0x1ecf) ++ return; ++ case 'p': CASEMBC(0x1e55) CASEMBC(0x1e57) ++ regmbc('p'); REGMBC(0x1e55) REGMBC(0x1e57) ++ return; ++ case 'r': CASEMBC(0x155) CASEMBC(0x157) CASEMBC(0x159) ++ CASEMBC(0x1e59) CASEMBC(0x1e5f) ++ regmbc('r'); REGMBC(0x155) REGMBC(0x157) REGMBC(0x159) ++ REGMBC(0x1e59) REGMBC(0x1e5f) ++ return; ++ case 's': CASEMBC(0x15b) CASEMBC(0x15d) CASEMBC(0x15f) ++ CASEMBC(0x161) CASEMBC(0x1e61) ++ regmbc('s'); REGMBC(0x15b) REGMBC(0x15d) ++ REGMBC(0x15f) REGMBC(0x161) REGMBC(0x1e61) ++ return; ++ case 't': CASEMBC(0x163) CASEMBC(0x165) CASEMBC(0x167) ++ CASEMBC(0x1e6b) CASEMBC(0x1e6f) CASEMBC(0x1e97) ++ regmbc('t'); REGMBC(0x163) REGMBC(0x165) REGMBC(0x167) ++ REGMBC(0x1e6b) REGMBC(0x1e6f) REGMBC(0x1e97) + return; + case 'u': case '\371': case '\372': case '\373': case '\374': ++ CASEMBC(0x169) CASEMBC(0x16b) CASEMBC(0x16d) CASEMBC(0x16f) ++ CASEMBC(0x171) CASEMBC(0x173) CASEMBC(0x1b0) CASEMBC(0x1d4) ++ CASEMBC(0x1ee7) + regmbc('u'); regmbc('\371'); regmbc('\372'); + regmbc('\373'); regmbc('\374'); ++ REGMBC(0x169) REGMBC(0x16b) REGMBC(0x16d) ++ REGMBC(0x16f) REGMBC(0x171) REGMBC(0x173) ++ REGMBC(0x1b0) REGMBC(0x1d4) REGMBC(0x1ee7) ++ return; ++ case 'v': CASEMBC(0x1e7d) ++ regmbc('v'); REGMBC(0x1e7d) ++ return; ++ case 'w': CASEMBC(0x175) CASEMBC(0x1e81) CASEMBC(0x1e83) ++ CASEMBC(0x1e85) CASEMBC(0x1e87) CASEMBC(0x1e98) ++ regmbc('w'); REGMBC(0x175) REGMBC(0x1e81) ++ REGMBC(0x1e83) REGMBC(0x1e85) REGMBC(0x1e87) ++ REGMBC(0x1e98) ++ return; ++ case 'x': CASEMBC(0x1e8b) CASEMBC(0x1e8d) ++ regmbc('x'); REGMBC(0x1e8b) REGMBC(0x1e8d) + return; + case 'y': case '\375': case '\377': ++ CASEMBC(0x177) CASEMBC(0x1e8f) CASEMBC(0x1e99) ++ CASEMBC(0x1ef3) CASEMBC(0x1ef7) CASEMBC(0x1ef9) + regmbc('y'); regmbc('\375'); regmbc('\377'); ++ REGMBC(0x177) REGMBC(0x1e8f) REGMBC(0x1e99) ++ REGMBC(0x1ef3) REGMBC(0x1ef7) REGMBC(0x1ef9) ++ return; ++ case 'z': CASEMBC(0x17a) CASEMBC(0x17c) CASEMBC(0x17e) ++ CASEMBC(0x1b6) CASEMBC(0x1e91) CASEMBC(0x1e95) ++ regmbc('z'); REGMBC(0x17a) REGMBC(0x17c) ++ REGMBC(0x17e) REGMBC(0x1b6) REGMBC(0x1e91) ++ REGMBC(0x1e95) + return; + } + #endif +*************** +*** 2468,2473 **** +--- 2699,2706 ---- + regmbc(c) + int c; + { ++ if (!has_mbyte && c > 0xff) ++ return; + if (regcode == JUST_CALC_SIZE) + regsize += (*mb_char2len)(c); + else +*************** +*** 2588,2594 **** + else + offset = (int)(val - scan); + /* When the offset uses more than 16 bits it can no longer fit in the two +! * bytes avaliable. Use a global flag to avoid having to check return + * values in too many places. */ + if (offset > 0xffff) + reg_toolong = TRUE; +--- 2821,2827 ---- + else + offset = (int)(val - scan); + /* When the offset uses more than 16 bits it can no longer fit in the two +! * bytes available. Use a global flag to avoid having to check return + * values in too many places. */ + if (offset > 0xffff) + reg_toolong = TRUE; +*** ../vim-7.3.258/src/testdir/test44.in 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test44.in 2011-07-20 17:36:49.000000000 +0200 +*************** +*** 27,32 **** +--- 27,34 ---- + x/\%U12345678 + x/[\U1234abcd\u1234\uabcd] + x/\%d21879b ++ x/ [[=A=]]* [[=B=]]* [[=C=]]* [[=D=]]* [[=E=]]* [[=F=]]* [[=G=]]* [[=H=]]* [[=I=]]* [[=J=]]* [[=K=]]* [[=L=]]* [[=M=]]* [[=N=]]* [[=O=]]* [[=P=]]* [[=Q=]]* [[=R=]]* [[=S=]]* [[=T=]]* [[=U=]]* [[=V=]]* [[=W=]]* [[=X=]]* [[=Y=]]* [[=Z=]]*/e ++ x/ [[=a=]]* [[=b=]]* [[=c=]]* [[=d=]]* [[=e=]]* [[=f=]]* [[=g=]]* [[=h=]]* [[=i=]]* [[=j=]]* [[=k=]]* [[=l=]]* [[=m=]]* [[=n=]]* [[=o=]]* [[=p=]]* [[=q=]]* [[=r=]]* [[=s=]]* [[=t=]]* [[=u=]]* [[=v=]]* [[=w=]]* [[=x=]]* [[=y=]]* [[=z=]]*/e + x:?^1?,$w! test.out + :e! test.out + G:put =matchstr(\"×בגד\", \".\", 0, 2) " ב +*************** +*** 53,55 **** +--- 55,59 ---- + e ü’…™¸y + f ü’Нz + g aå•·bb ++ h AÀÃÂÃÄÅĀĂĄÇǞǠẢ BḂḆ CÇĆĈĊČ DÄŽÄḊḎḠEÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÃŒÃÃŽÃĨĪĬĮİÇỈ JÄ´ KĶǨḰḴ LĹĻĽĿÅḺ MḾṀ NÑŃŅŇṄṈ OÃ’Ã“Ã”Ã•Ã–Ã˜ÅŒÅŽÅÆ Ç‘ǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ Vá¹¼ WŴẀẂẄẆ XẊẌ YÃŶŸẎỲỶỸ ZŹŻŽƵáºáº” ++ i aàáâãäåÄăąǎǟǡả bḃḇ cÃ§Ä‡Ä‰Ä‹Ä dÄđḋá¸á¸‘ eèéêëēĕėęěẻẽ fḟ gÄğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįÇỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṠnñńņňʼnṅṉ oòóôõöøÅÅőơǒǫǭỠpṕṗ q rŕŗřṙṟ sÅ›Åşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vá¹½ wŵáºáºƒáº…ẇẘ xẋẠyýÿŷáºáº™á»³á»·á»¹ zźżžƶẑẕ +*** ../vim-7.3.258/src/testdir/test44.ok 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test44.ok 2011-07-20 17:36:49.000000000 +0200 +*************** +*** 14,19 **** +--- 14,21 ---- + e y + f z + g abb ++ h AÀÃÂÃÄÅĀĂĄÇǞǠẢ BḂḆ CÇĆĈĊČ DÄŽÄḊḎḠEÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÃŒÃÃŽÃĨĪĬĮİÇỈ JÄ´ KĶǨḰḴ LĹĻĽĿÅḺ MḾṀ NÑŃŅŇṄṈ OÃ’Ã“Ã”Ã•Ã–Ã˜ÅŒÅŽÅÆ Ç‘ǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ Vá¹¼ WŴẀẂẄẆ XẊẌ YÃŶŸẎỲỶỸ ZŹŻŽƵẠ++ i aàáâãäåÄăąǎǟǡả bḃḇ cÃ§Ä‡Ä‰Ä‹Ä dÄđḋá¸á¸‘ eèéêëēĕėęěẻẽ fḟ gÄğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįÇỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṠnñńņňʼnṅṉ oòóôõöøÅÅőơǒǫǭỠpṕṗ q rŕŗřṙṟ sÅ›Åşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vá¹½ wŵáºáºƒáº…ẇẘ xẋẠyýÿŷáºáº™á»³á»·á»¹ zźżžƶẑ + ב + בג + × +*** ../vim-7.3.258/src/version.c 2011-07-20 17:27:17.000000000 +0200 +--- src/version.c 2011-07-20 17:38:32.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 259, + /**/ + +-- +Not too long ago, compress was something you did to garbage... + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 89d98ff8f348f5d2c0aff504c8bdd6f6b1ae0f20 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:05 +0200 Subject: [PATCH 0438/3803] - patchlevel 260 --- 7.3.260 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 7.3.260 diff --git a/7.3.260 b/7.3.260 new file mode 100644 index 00000000..ba9af57a --- /dev/null +++ b/7.3.260 @@ -0,0 +1,69 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.260 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.260 +Problem: CursorHold triggers on an incomplete mapping. (Will Gray) +Solution: Don't trigger CursorHold when there is typeahead. +Files: src/fileio.c + + +*** ../vim-7.3.259/src/fileio.c 2011-05-19 17:25:36.000000000 +0200 +--- src/fileio.c 2011-07-20 18:22:16.000000000 +0200 +*************** +*** 9044,9050 **** + { + int state; + +! if (!did_cursorhold && has_cursorhold() && !Recording + #ifdef FEAT_INS_EXPAND + && !ins_compl_active() + #endif +--- 9044,9053 ---- + { + int state; + +! if (!did_cursorhold +! && has_cursorhold() +! && !Recording +! && typebuf.tb_len == 0 + #ifdef FEAT_INS_EXPAND + && !ins_compl_active() + #endif +*************** +*** 9935,9940 **** +--- 9938,9945 ---- + if ((c == ';' || c == '>') && match == FALSE) + { + *pattern = NUL; /* Terminate the string */ ++ /* TODO: match with 'filetype' of buffer that "fname" comes ++ * from. */ + match = mch_check_filetype(fname, type_start); + *pattern = c; /* Restore the terminator */ + type_start = pattern + 1; +*** ../vim-7.3.259/src/version.c 2011-07-20 17:58:14.000000000 +0200 +--- src/version.c 2011-07-20 18:25:15.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 260, + /**/ + +-- +LAUNCELOT: At last! A call! A cry of distress ... + (he draws his sword, and turns to CONCORDE) + Concorde! Brave, Concorde ... you shall not have died in vain! +CONCORDE: I'm not quite dead, sir ... + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a9622ad9dff89d2849926deba938c5c88eac8318 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:05 +0200 Subject: [PATCH 0439/3803] - patchlevel 261 --- 7.3.261 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 7.3.261 diff --git a/7.3.261 b/7.3.261 new file mode 100644 index 00000000..4c03f6b5 --- /dev/null +++ b/7.3.261 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.261 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.261 +Problem: G++ error message errornously recognized as error. +Solution: Ignore "In file included from" line also when it ends in a colon. + (Fernando Castillo) +Files: src/option.h + + +*** ../vim-7.3.260/src/option.h 2011-06-26 05:36:07.000000000 +0200 +--- src/option.h 2011-07-27 13:44:08.000000000 +0200 +*************** +*** 33,39 **** + # ifdef EBCDIC + #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" + # else +! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-Gfrom %f:%l:%c,%-Gfrom %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" + # endif + # endif + # endif +--- 33,39 ---- + # ifdef EBCDIC + #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" + # else +! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-Gfrom %f:%l:%c,%-Gfrom %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" + # endif + # endif + # endif +*** ../vim-7.3.260/src/version.c 2011-07-20 18:29:33.000000000 +0200 +--- src/version.c 2011-07-27 13:46:23.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 261, + /**/ + +-- +Have you heard about the new Barbie doll? It's called Divorce +Barbie. It comes with all of Ken's stuff. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 5d62ff80d9dd8c05560daeb918c68013c75e0f16 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:06 +0200 Subject: [PATCH 0440/3803] - patchlevel 262 --- 7.3.262 | 1356 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1356 insertions(+) create mode 100644 7.3.262 diff --git a/7.3.262 b/7.3.262 new file mode 100644 index 00000000..b3bd5cd8 --- /dev/null +++ b/7.3.262 @@ -0,0 +1,1356 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.262 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.262 +Problem: Photon code style doesn't match Vim style. +Solution: Clean up some of it. (Elias Diem) +Files: src/gui_photon.c + + +*** ../vim-7.3.261/src/gui_photon.c 2011-01-17 20:08:03.000000000 +0100 +--- src/gui_photon.c 2011-07-27 14:07:02.000000000 +0200 +*************** +*** 32,40 **** + #endif + + #define ARRAY_LENGTH(a) (sizeof(a) / sizeof(a[0])) +! #define RGB(r,g,b) PgRGB(r,g,b) + +! #define EVENT_BUFFER_SIZE sizeof( PhEvent_t ) + 1000 + + /* Some defines for gui_mch_mousehide() */ + #define MOUSE_HIDE TRUE +--- 32,40 ---- + #endif + + #define ARRAY_LENGTH(a) (sizeof(a) / sizeof(a[0])) +! #define RGB(r, g, b) PgRGB(r, g, b) + +! #define EVENT_BUFFER_SIZE sizeof(PhEvent_t) + 1000 + + /* Some defines for gui_mch_mousehide() */ + #define MOUSE_HIDE TRUE +*************** +*** 206,258 **** + static PtCallbackF_t gui_ph_handle_menu_unrealized; + + #ifdef USE_PANEL_GROUP +! static void gui_ph_get_panelgroup_margins( short*, short*, short*, short* ); + #endif + + #ifdef FEAT_TOOLBAR +! static PhImage_t *gui_ph_toolbar_find_icon( vimmenu_T *menu ); + #endif + +! static void gui_ph_draw_start( void ); +! static void gui_ph_draw_end( void ); + + /* Set the text for the balloon */ +! static PtWidget_t * gui_ph_show_tooltip( PtWidget_t *window, + PtWidget_t *widget, + int position, + char *text, + char *font, + PgColor_t fill_color, +! PgColor_t text_color ); + + /****************************************************************************/ + +! static PtWidget_t * gui_ph_show_tooltip( PtWidget_t *window, + PtWidget_t *widget, + int position, + char *text, + char *font, + PgColor_t fill_color, +! PgColor_t text_color ) + { + PtArg_t arg; + vimmenu_T *menu; + char_u *tooltip; + +! PtSetArg( &arg, Pt_ARG_POINTER, &menu, 0 ); +! PtGetResources( widget, 1, &arg ); + + /* Override the text and position */ + + tooltip = text; +! if( menu != NULL ) + { + int index = MENU_INDEX_TIP; +! if( menu->strings[ index ] != NULL ) + tooltip = menu->strings[ index ]; + } + +! return( PtInflateBalloon( + window, + widget, + /* Don't put the balloon at the bottom, +--- 206,258 ---- + static PtCallbackF_t gui_ph_handle_menu_unrealized; + + #ifdef USE_PANEL_GROUP +! static void gui_ph_get_panelgroup_margins(short*, short*, short*, short*); + #endif + + #ifdef FEAT_TOOLBAR +! static PhImage_t *gui_ph_toolbar_find_icon(vimmenu_T *menu); + #endif + +! static void gui_ph_draw_start(void); +! static void gui_ph_draw_end(void); + + /* Set the text for the balloon */ +! static PtWidget_t * gui_ph_show_tooltip(PtWidget_t *window, + PtWidget_t *widget, + int position, + char *text, + char *font, + PgColor_t fill_color, +! PgColor_t text_color); + + /****************************************************************************/ + +! static PtWidget_t * gui_ph_show_tooltip(PtWidget_t *window, + PtWidget_t *widget, + int position, + char *text, + char *font, + PgColor_t fill_color, +! PgColor_t text_color) + { + PtArg_t arg; + vimmenu_T *menu; + char_u *tooltip; + +! PtSetArg(&arg, Pt_ARG_POINTER, &menu, 0); +! PtGetResources(widget, 1, &arg); + + /* Override the text and position */ + + tooltip = text; +! if (menu != NULL) + { + int index = MENU_INDEX_TIP; +! if (menu->strings[ index ] != NULL) + tooltip = menu->strings[ index ]; + } + +! return PtInflateBalloon( + window, + widget, + /* Don't put the balloon at the bottom, +*************** +*** 261,285 **** + tooltip, + font, + fill_color, +! text_color ) ); + } + + static void +! gui_ph_resize_container( void ) + { + PhArea_t area; + +! PtWidgetArea( gui.vimWindow, &area ); +! PtWidgetPos ( gui.vimContainer, &area.pos ); + +! PtSetResource( gui.vimContainer, Pt_ARG_AREA, &area, 0 ); + } + + static int + gui_ph_handle_menu_resize( + PtWidget_t *widget, + void *other, +! PtCallbackInfo_t *info ) + { + PtContainerCallback_t *sizes = info->cbdata; + PtWidget_t *container; +--- 261,285 ---- + tooltip, + font, + fill_color, +! text_color); + } + + static void +! gui_ph_resize_container(void) + { + PhArea_t area; + +! PtWidgetArea(gui.vimWindow, &area); +! PtWidgetPos (gui.vimContainer, &area.pos); + +! PtSetResource(gui.vimContainer, Pt_ARG_AREA, &area, 0); + } + + static int + gui_ph_handle_menu_resize( + PtWidget_t *widget, + void *other, +! PtCallbackInfo_t *info) + { + PtContainerCallback_t *sizes = info->cbdata; + PtWidget_t *container; +*************** +*** 291,297 **** + /* Because vim treats the toolbar and menubar separately, + * and here they're lumped together into a PtToolbarGroup, + * we only need either menu_height or toolbar_height set at once */ +! if( gui.menu_is_active ) + { + gui.menu_height = height; + gui.toolbar_height = 0; +--- 291,297 ---- + /* Because vim treats the toolbar and menubar separately, + * and here they're lumped together into a PtToolbarGroup, + * we only need either menu_height or toolbar_height set at once */ +! if (gui.menu_is_active) + { + gui.menu_height = height; + gui.toolbar_height = 0; +*************** +*** 310,325 **** + container = gui.vimContainer; + #endif + +! PtSetResource( container, Pt_ARG_POS, &below_menu, 0 ); + + gui_ph_resize_container(); + + #ifdef USE_PANEL_GROUP + gui_ph_get_panelgroup_margins( + &pg_margin_top, &pg_margin_bottom, +! &pg_margin_left, &pg_margin_right ); + #endif +! return( Pt_CONTINUE ); + } + + /* +--- 310,325 ---- + container = gui.vimContainer; + #endif + +! PtSetResource(container, Pt_ARG_POS, &below_menu, 0); + + gui_ph_resize_container(); + + #ifdef USE_PANEL_GROUP + gui_ph_get_panelgroup_margins( + &pg_margin_top, &pg_margin_bottom, +! &pg_margin_left, &pg_margin_right); + #endif +! return Pt_CONTINUE; + } + + /* +*************** +*** 330,352 **** + gui_ph_handle_timer_cursor( + PtWidget_t *widget, + void *data, +! PtCallbackInfo_t *info ) + { +! if( blink_state == BLINK_ON ) + { + gui_undraw_cursor(); + blink_state = BLINK_OFF; +! PtSetResource( gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL, +! blink_offtime, 0 ); + } + else + { + gui_update_cursor(TRUE, FALSE); + blink_state = BLINK_ON; +! PtSetResource( gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL, +! blink_ontime, 0 ); + } +! return( Pt_CONTINUE ); + } + + static int +--- 330,352 ---- + gui_ph_handle_timer_cursor( + PtWidget_t *widget, + void *data, +! PtCallbackInfo_t *info) + { +! if (blink_state == BLINK_ON) + { + gui_undraw_cursor(); + blink_state = BLINK_OFF; +! PtSetResource(gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL, +! blink_offtime, 0); + } + else + { + gui_update_cursor(TRUE, FALSE); + blink_state = BLINK_ON; +! PtSetResource(gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL, +! blink_ontime, 0); + } +! return Pt_CONTINUE; + } + + static int +*************** +*** 354,360 **** + { + is_timeout = TRUE; + +! return( Pt_CONTINUE ); + } + + static int +--- 354,360 ---- + { + is_timeout = TRUE; + +! return Pt_CONTINUE; + } + + static int +*************** +*** 402,408 **** + break; + } + +! return( Pt_CONTINUE ); + } + + static int +--- 402,408 ---- + break; + } + +! return Pt_CONTINUE; + } + + static int +*************** +*** 426,438 **** + + case Pt_SCROLL_SET: + /* FIXME: return straight away here? */ +! return( Pt_CONTINUE ); + break; + } + + gui_drag_scrollbar(sb, value, dragging); + } +! return( Pt_CONTINUE ); + } + + static int +--- 426,438 ---- + + case Pt_SCROLL_SET: + /* FIXME: return straight away here? */ +! return Pt_CONTINUE; + break; + } + + gui_drag_scrollbar(sb, value, dragging); + } +! return Pt_CONTINUE; + } + + static int +*************** +*** 453,459 **** + /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */ + if( key->key_flags & Pk_KF_Compose ) + { +! return( Pt_CONTINUE ); + } + + if( (key->key_flags & Pk_KF_Cap_Valid) && +--- 453,459 ---- + /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */ + if( key->key_flags & Pk_KF_Compose ) + { +! return Pt_CONTINUE; + } + + if( (key->key_flags & Pk_KF_Cap_Valid) && +*************** +*** 473,479 **** + gui_is_menu_shortcut( key->key_cap ) ) ) ) + { + /* Fallthrough and let photon look for the hotkey */ +! return( Pt_CONTINUE ); + } + #endif + +--- 473,479 ---- + gui_is_menu_shortcut( key->key_cap ) ) ) ) + { + /* Fallthrough and let photon look for the hotkey */ +! return Pt_CONTINUE; + } + #endif + +*************** +*** 544,550 **** + add_to_input_buf( string, len ); + } + +! return( Pt_CONSUME ); + } + len = 0; + #endif +--- 544,550 ---- + add_to_input_buf( string, len ); + } + +! return Pt_CONSUME; + } + len = 0; + #endif +*************** +*** 579,585 **** + } + else + { +! return( Pt_CONTINUE ); + } + } + else +--- 579,585 ---- + } + else + { +! return Pt_CONTINUE; + } + } + else +*************** +*** 622,632 **** + if( len > 0 ) + { + add_to_input_buf( string, len ); +! return( Pt_CONSUME ); + } + } + +! return( Pt_CONTINUE ); + } + + static int +--- 622,632 ---- + if( len > 0 ) + { + add_to_input_buf( string, len ); +! return Pt_CONSUME; + } + } + +! return Pt_CONTINUE; + } + + static int +*************** +*** 652,658 **** + if( info->event->type == Ph_EV_PTR_MOTION_NOBUTTON ) + { + gui_mouse_moved( mouse_x, mouse_y ); +! return( Pt_CONTINUE ); + } + + if( pointer->key_mods & Pk_KM_Shift ) +--- 652,658 ---- + if( info->event->type == Ph_EV_PTR_MOTION_NOBUTTON ) + { + gui_mouse_moved( mouse_x, mouse_y ); +! return Pt_CONTINUE; + } + + if( pointer->key_mods & Pk_KM_Shift ) +*************** +*** 702,708 **** + gui_send_mouse_event( button , mouse_x, mouse_y, repeated_click, modifiers ); + } + +! return( Pt_CONTINUE ); + } + + /* Handle a focus change of the PtRaw widget */ +--- 702,708 ---- + gui_send_mouse_event( button , mouse_x, mouse_y, repeated_click, modifiers ); + } + +! return Pt_CONTINUE; + } + + /* Handle a focus change of the PtRaw widget */ +*************** +*** 721,727 **** + PtAddEventHandler( gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON, + gui_ph_handle_mouse, NULL ); + } +! return( Pt_CONTINUE ); + } + + static void +--- 721,727 ---- + PtAddEventHandler( gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON, + gui_ph_handle_mouse, NULL ); + } +! return Pt_CONTINUE; + } + + static void +*************** +*** 793,799 **** + PtRealizeWidget( menu->submenu_id ); + } + +! return( Pt_CONTINUE ); + } + + /* This is used for pulldown/popup menus and also toolbar buttons */ +--- 793,799 ---- + PtRealizeWidget( menu->submenu_id ); + } + +! return Pt_CONTINUE; + } + + /* This is used for pulldown/popup menus and also toolbar buttons */ +*************** +*** 805,811 **** + vimmenu_T *menu = (vimmenu_T *) data; + gui_menu_cb( menu ); + } +! return( Pt_CONTINUE ); + } + + /* Stop focus from disappearing into the menubar... */ +--- 805,811 ---- + vimmenu_T *menu = (vimmenu_T *) data; + gui_menu_cb( menu ); + } +! return Pt_CONTINUE; + } + + /* Stop focus from disappearing into the menubar... */ +*************** +*** 816,822 **** + PtCallbackInfo_t *info ) + { + PtGiveFocus( gui.vimTextArea, NULL ); +! return( Pt_CONTINUE ); + } + + static int +--- 816,822 ---- + PtCallbackInfo_t *info ) + { + PtGiveFocus( gui.vimTextArea, NULL ); +! return Pt_CONTINUE; + } + + static int +*************** +*** 826,832 **** + PtCallbackInfo_t *info ) + { + gui_set_shellsize( FALSE, TRUE, RESIZE_BOTH ); +! return( Pt_CONTINUE ); + } + + /****************************************************************************/ +--- 826,832 ---- + PtCallbackInfo_t *info ) + { + gui_set_shellsize( FALSE, TRUE, RESIZE_BOTH ); +! return Pt_CONTINUE; + } + + /****************************************************************************/ +*************** +*** 878,884 **** + ( STRCMP( items->dname, name ) != 0 ) ) + items = items->next; + } +! return( items ); + } + + static void +--- 878,884 ---- + ( STRCMP( items->dname, name ) != 0 ) ) + items = items->next; + } +! return items; + } + + static void +*************** +*** 927,933 **** + gui_menu_cb( menu ); + } + } +! return( Pt_CONTINUE ); + } + + static void +--- 927,933 ---- + gui_menu_cb( menu ); + } + } +! return Pt_CONTINUE; + } + + static void +*************** +*** 974,983 **** + mark++; + + if( *mark == ')' ) +! return( TRUE); + } + } +! return( FALSE ); + } + + static void +--- 974,983 ---- + mark++; + + if( *mark == ')' ) +! return TRUE; + } + } +! return FALSE; + } + + static void +*************** +*** 1057,1063 **** + gui_ph_pg_remove_buffer( menu->dname ); + } + +! return( Pt_CONTINUE ); + } + #endif + +--- 1057,1063 ---- + gui_ph_pg_remove_buffer( menu->dname ); + } + +! return Pt_CONTINUE; + } + #endif + +*************** +*** 1071,1077 **** + PtContainerHold( gui.vimContainer ); + } + +! return( Pt_CONTINUE ); + } + + /****************************************************************************/ +--- 1071,1077 ---- + PtContainerHold( gui.vimContainer ); + } + +! return Pt_CONTINUE; + } + + /****************************************************************************/ +*************** +*** 1126,1132 **** + + gui.event_buffer = (PhEvent_t *) alloc( EVENT_BUFFER_SIZE ); + if( gui.event_buffer == NULL ) +! return( FAIL ); + + /* Get a translation so we can convert from ISO Latin-1 to UTF */ + charset_translate = PxTranslateSet( NULL, "latin1" ); +--- 1126,1132 ---- + + gui.event_buffer = (PhEvent_t *) alloc( EVENT_BUFFER_SIZE ); + if( gui.event_buffer == NULL ) +! return FAIL; + + /* Get a translation so we can convert from ISO Latin-1 to UTF */ + charset_translate = PxTranslateSet( NULL, "latin1" ); +*************** +*** 1141,1147 **** + PtSetArg( &args[ n++ ], Pt_ARG_DIM, &window_size, 0 ); + gui.vimWindow = PtCreateWidget( PtWindow, NULL, n, args ); + if( gui.vimWindow == NULL ) +! return( FAIL ); + + PtAddCallback( gui.vimWindow, Pt_CB_WINDOW, gui_ph_handle_window_cb, NULL ); + PtAddCallback( gui.vimWindow, Pt_CB_WINDOW_OPENING, +--- 1141,1147 ---- + PtSetArg( &args[ n++ ], Pt_ARG_DIM, &window_size, 0 ); + gui.vimWindow = PtCreateWidget( PtWindow, NULL, n, args ); + if( gui.vimWindow == NULL ) +! return FAIL; + + PtAddCallback( gui.vimWindow, Pt_CB_WINDOW, gui_ph_handle_window_cb, NULL ); + PtAddCallback( gui.vimWindow, Pt_CB_WINDOW_OPENING, +*************** +*** 1158,1164 **** + + gui.vimPanelGroup = PtCreateWidget( PtPanelGroup, gui.vimWindow, n, args ); + if( gui.vimPanelGroup == NULL ) +! return( FAIL ); + + PtAddCallback( gui.vimPanelGroup, Pt_CB_PG_PANEL_SWITCHING, + gui_ph_handle_pg_change, NULL ); +--- 1158,1164 ---- + + gui.vimPanelGroup = PtCreateWidget( PtPanelGroup, gui.vimWindow, n, args ); + if( gui.vimPanelGroup == NULL ) +! return FAIL; + + PtAddCallback( gui.vimPanelGroup, Pt_CB_PG_PANEL_SWITCHING, + gui_ph_handle_pg_change, NULL ); +*************** +*** 1172,1178 **** + + gui.vimContainer = PtCreateWidget( PtPane, gui.vimWindow, n, args ); + if( gui.vimContainer == NULL ) +! return( FAIL ); + + PtAddCallback( gui.vimContainer, Pt_CB_RESIZE, gui_ph_pane_resize, NULL ); + #endif +--- 1172,1178 ---- + + gui.vimContainer = PtCreateWidget( PtPane, gui.vimWindow, n, args ); + if( gui.vimContainer == NULL ) +! return FAIL; + + PtAddCallback( gui.vimContainer, Pt_CB_RESIZE, gui_ph_pane_resize, NULL ); + #endif +*************** +*** 1195,1201 **** + + gui.vimTextArea = PtCreateWidget( PtRaw, Pt_DFLT_PARENT, n, args ); + if( gui.vimTextArea == NULL) +! return( FAIL ); + + /* TODO: use PtAddEventHandlers instead? */ + /* Not using Ph_EV_BUT_REPEAT because vim wouldn't use it anyway */ +--- 1195,1201 ---- + + gui.vimTextArea = PtCreateWidget( PtRaw, Pt_DFLT_PARENT, n, args ); + if( gui.vimTextArea == NULL) +! return FAIL; + + /* TODO: use PtAddEventHandlers instead? */ + /* Not using Ph_EV_BUT_REPEAT because vim wouldn't use it anyway */ +*************** +*** 1220,1230 **** + */ + gui_ph_timer_cursor = PtCreateWidget( PtTimer, gui.vimWindow, 0, NULL ); + if( gui_ph_timer_cursor == NULL ) +! return( FAIL ); + + gui_ph_timer_timeout = PtCreateWidget( PtTimer, gui.vimWindow, 0, NULL ); + if( gui_ph_timer_timeout == NULL ) +! return( FAIL ); + + PtAddCallback( gui_ph_timer_cursor, Pt_CB_TIMER_ACTIVATE, + gui_ph_handle_timer_cursor, NULL); +--- 1220,1230 ---- + */ + gui_ph_timer_cursor = PtCreateWidget( PtTimer, gui.vimWindow, 0, NULL ); + if( gui_ph_timer_cursor == NULL ) +! return FAIL; + + gui_ph_timer_timeout = PtCreateWidget( PtTimer, gui.vimWindow, 0, NULL ); + if( gui_ph_timer_timeout == NULL ) +! return FAIL; + + PtAddCallback( gui_ph_timer_cursor, Pt_CB_TIMER_ACTIVATE, + gui_ph_handle_timer_cursor, NULL); +*************** +*** 1239,1245 **** + gui.vimToolBarGroup = PtCreateWidget( PtToolbarGroup, gui.vimWindow, + n, args ); + if( gui.vimToolBarGroup == NULL ) +! return( FAIL ); + + PtAddCallback( gui.vimToolBarGroup, Pt_CB_RESIZE, + gui_ph_handle_menu_resize, NULL ); +--- 1239,1245 ---- + gui.vimToolBarGroup = PtCreateWidget( PtToolbarGroup, gui.vimWindow, + n, args ); + if( gui.vimToolBarGroup == NULL ) +! return FAIL; + + PtAddCallback( gui.vimToolBarGroup, Pt_CB_RESIZE, + gui_ph_handle_menu_resize, NULL ); +*************** +*** 1254,1260 **** + } + gui.vimMenuBar = PtCreateWidget( PtMenuBar, gui.vimToolBarGroup, n, args ); + if( gui.vimMenuBar == NULL ) +! return( FAIL ); + + # ifdef FEAT_TOOLBAR + n = 0; +--- 1254,1260 ---- + } + gui.vimMenuBar = PtCreateWidget( PtMenuBar, gui.vimToolBarGroup, n, args ); + if( gui.vimMenuBar == NULL ) +! return FAIL; + + # ifdef FEAT_TOOLBAR + n = 0; +*************** +*** 1273,1279 **** + + gui.vimToolBar = PtCreateWidget( PtToolbar, gui.vimToolBarGroup, n, args ); + if( gui.vimToolBar == NULL ) +! return( FAIL ); + + /* + * Size for the toolbar is fetched in gui_mch_show_toolbar, after +--- 1273,1279 ---- + + gui.vimToolBar = PtCreateWidget( PtToolbar, gui.vimToolBarGroup, n, args ); + if( gui.vimToolBar == NULL ) +! return FAIL; + + /* + * Size for the toolbar is fetched in gui_mch_show_toolbar, after +*************** +*** 1284,1296 **** + + #endif + +! return( OK ); + } + + int + gui_mch_init_check(void) + { +! return( (is_photon_available == TRUE) ? OK : FAIL ); + } + + int +--- 1284,1296 ---- + + #endif + +! return OK; + } + + int + gui_mch_init_check(void) + { +! return (is_photon_available == TRUE) ? OK : FAIL; + } + + int +*************** +*** 1310,1316 **** + if (gui_win_x != -1 && gui_win_y != -1) + gui_mch_set_winpos(gui_win_x, gui_win_y); + +! return( (PtRealizeWidget( gui.vimWindow ) == 0) ? OK : FAIL ); + } + + void +--- 1310,1316 ---- + if (gui_win_x != -1 && gui_win_y != -1) + gui_mch_set_winpos(gui_win_x, gui_win_y); + +! return (PtRealizeWidget( gui.vimWindow ) == 0) ? OK : FAIL; + } + + void +*************** +*** 1336,1342 **** + exit_gui_mch_update( void *data ) + { + *(int *)data = FALSE; +! return( Pt_END ); + } + + void +--- 1336,1342 ---- + exit_gui_mch_update( void *data ) + { + *(int *)data = FALSE; +! return Pt_END; + } + + void +*************** +*** 1365,1374 **** + if( input_available() ) + { + PtSetResource( gui_ph_timer_timeout, Pt_ARG_TIMER_INITIAL, 0, 0 ); +! return( OK ); + } + else if( is_timeout == TRUE ) +! return( FAIL ); + } + } + +--- 1365,1374 ---- + if( input_available() ) + { + PtSetResource( gui_ph_timer_timeout, Pt_ARG_TIMER_INITIAL, 0, 0 ); +! return OK; + } + else if( is_timeout == TRUE ) +! return FAIL; + } + } + +*************** +*** 1446,1454 **** + vim_free( default_path ); + + if( file.ret == Pt_FSDIALOG_BTN1 ) +! return( vim_strsave( file.path ) ); + } +! return( NULL ); + } + #endif + +--- 1446,1454 ---- + vim_free( default_path ); + + if( file.ret == Pt_FSDIALOG_BTN1 ) +! return vim_strsave(file.path); + } +! return NULL; + } + #endif + +*************** +*** 1470,1476 **** + + PtModalUnblock( modal_ctrl, (void *) button ); + +! return( Pt_TRUE ); + } + + static int +--- 1470,1476 ---- + + PtModalUnblock( modal_ctrl, (void *) button ); + +! return Pt_TRUE; + } + + static int +*************** +*** 1478,1484 **** + { + if( info->reason_subtype == Pt_EDIT_ACTIVATE ) + gui_ph_dialog_close( 1, data ); +! return( Pt_CONTINUE ); + } + + static int +--- 1478,1484 ---- + { + if( info->reason_subtype == Pt_EDIT_ACTIVATE ) + gui_ph_dialog_close( 1, data ); +! return Pt_CONTINUE; + } + + static int +*************** +*** 1490,1498 **** + if( ( key->key_flags & Pk_KF_Cap_Valid ) && ( key->key_cap == Pk_Escape ) ) + { + gui_ph_dialog_close( 0, data ); +! return( Pt_CONSUME ); + } +! return( Pt_PROCESS ); + } + + int +--- 1490,1498 ---- + if( ( key->key_flags & Pk_KF_Cap_Valid ) && ( key->key_cap == Pk_Escape ) ) + { + gui_ph_dialog_close( 0, data ); +! return Pt_CONSUME; + } +! return Pt_PROCESS; + } + + int +*************** +*** 1519,1525 **** + button_count = len = i = 0; + + if( buttons == NULL || *buttons == NUL ) +! return( -1 ); + + /* There is one less separator than buttons, so bump up the button count */ + button_count = 1; +--- 1519,1525 ---- + button_count = len = i = 0; + + if( buttons == NULL || *buttons == NUL ) +! return -1; + + /* There is one less separator than buttons, so bump up the button count */ + button_count = 1; +*************** +*** 1637,1643 **** + vim_free( button_array ); + vim_free( buttons_copy ); + +! return( dialog_result ); + } + #endif + /****************************************************************************/ +--- 1637,1643 ---- + vim_free( button_array ); + vim_free( buttons_copy ); + +! return dialog_result; + } + #endif + /****************************************************************************/ +*************** +*** 1653,1659 **** + *x = pos->x; + *y = pos->y; + +! return( OK ); + } + + void +--- 1653,1659 ---- + *x = pos->x; + *y = pos->y; + +! return OK; + } + + void +*************** +*** 1975,1985 **** + hex_digit(int c) + { + if (VIM_ISDIGIT(c)) +! return( c - '0' ); + c = TOLOWER_ASC(c); + if (c >= 'a' && c <= 'f') +! return( c - 'a' + 10 ); +! return( -1000 ); + } + + +--- 1975,1985 ---- + hex_digit(int c) + { + if (VIM_ISDIGIT(c)) +! return c - '0'; + c = TOLOWER_ASC(c); + if (c >= 'a' && c <= 'f') +! return c - 'a' + 10; +! return -1000; + } + + +*************** +*** 2065,2077 **** + b = hex_digit( name[5] ) * 16 + hex_digit( name[6] ); + if( r < 0 || g < 0 || b < 0 ) + return INVALCOLOR; +! return( RGB( r, g, b ) ); + } + + for( i = 0; i < ARRAY_LENGTH( table ); i++ ) + { + if( STRICMP( name, table[i].name ) == 0 ) +! return( table[i].colour ); + } + + /* +--- 2065,2077 ---- + b = hex_digit( name[5] ) * 16 + hex_digit( name[6] ); + if( r < 0 || g < 0 || b < 0 ) + return INVALCOLOR; +! return RGB(r, g, b); + } + + for( i = 0; i < ARRAY_LENGTH( table ); i++ ) + { + if( STRICMP( name, table[i].name ) == 0 ) +! return table[i].colour; + } + + /* +*************** +*** 2115,2121 **** + if (STRICMP(color, name) == 0) + { + fclose(fd); +! return( (guicolor_T) RGB(r,g,b) ); + } + } + +--- 2115,2121 ---- + if (STRICMP(color, name) == 0) + { + fclose(fd); +! return (guicolor_T)RGB(r, g, b); + } + } + +*************** +*** 2451,2458 **** + for (i = 0; special_keys[i].key_sym != 0; i++) + if (name[0] == special_keys[i].vim_code0 && + name[1] == special_keys[i].vim_code1) +! return( OK ); +! return( FAIL ); + } + + /****************************************************************************/ +--- 2451,2458 ---- + for (i = 0; special_keys[i].key_sym != 0; i++) + if (name[0] == special_keys[i].vim_code0 && + name[1] == special_keys[i].vim_code1) +! return OK; +! return FAIL; + } + + /****************************************************************************/ +*************** +*** 2512,2518 **** + + temp_phi = &external_icon; + } +! return( temp_phi ); + } + + /* +--- 2512,2518 ---- + + temp_phi = &external_icon; + } +! return temp_phi; + } + + /* +*************** +*** 2541,2556 **** + icon = gui_ph_toolbar_load_icon( full_pathname ); + + if( icon != NULL ) +! return( icon ); + } + + if( menu->iconidx >= 0 && + ( menu->iconidx < ARRAY_LENGTH( gui_ph_toolbar_images ) ) ) + { +! return( gui_ph_toolbar_images[ menu->iconidx ] ); + } + +! return( NULL ); + } + #endif + +--- 2541,2556 ---- + icon = gui_ph_toolbar_load_icon( full_pathname ); + + if( icon != NULL ) +! return icon; + } + + if( menu->iconidx >= 0 && + ( menu->iconidx < ARRAY_LENGTH( gui_ph_toolbar_images ) ) ) + { +! return gui_ph_toolbar_images[menu->iconidx]; + } + +! return NULL; + } + #endif + +*************** +*** 2895,2905 **** + * at least has the bits we're checking for */ + if( font_size == info.size && + style == (info.style & style) ) +! return( (GuiFont) font_tag ); + } + vim_free( font_tag ); + } +! return( NULL ); + } + + /* +--- 2895,2905 ---- + * at least has the bits we're checking for */ + if( font_size == info.size && + style == (info.style & style) ) +! return (GuiFont)font_tag; + } + vim_free( font_tag ); + } +! return NULL; + } + + /* +*************** +*** 2957,2965 **** + } + } + } +! return( TRUE ); + } +! return( FALSE ); + } + + int +--- 2957,2965 ---- + } + } + } +! return TRUE; + } +! return FALSE; + } + + int +*************** +*** 2985,2991 **** + "pcterm12", -1, PHFONT_FIXED, NULL ); + + if( font_tag == NULL ) +! return( FAIL ); + + gui_mch_free_font( gui.norm_font ); + gui.norm_font = font_tag; +--- 2985,2991 ---- + "pcterm12", -1, PHFONT_FIXED, NULL ); + + if( font_tag == NULL ) +! return FAIL; + + gui_mch_free_font( gui.norm_font ); + gui.norm_font = font_tag; +*************** +*** 2997,3009 **** + { + if( gui_ph_parse_font_name( vim_font_name, &font_name, &font_flags, + &font_size ) == FALSE ) +! return( FAIL ); + + font_tag = gui_ph_get_font( font_name, font_flags, font_size, 0 ); + if( font_tag == NULL ) + { + vim_free( font_name ); +! return( FAIL ); + } + + gui_mch_free_font( gui.norm_font ); +--- 2997,3009 ---- + { + if( gui_ph_parse_font_name( vim_font_name, &font_name, &font_flags, + &font_size ) == FALSE ) +! return FAIL; + + font_tag = gui_ph_get_font( font_name, font_flags, font_size, 0 ); + if( font_tag == NULL ) + { + vim_free( font_name ); +! return FAIL; + } + + gui_mch_free_font( gui.norm_font ); +*************** +*** 3026,3032 **** + gui.char_ascent = - extent.ul.y; + + vim_free( font_name ); +! return( OK ); + } + + /* +--- 3026,3032 ---- + gui.char_ascent = - extent.ul.y; + + vim_free( font_name ); +! return OK; + } + + /* +*************** +*** 3042,3048 **** + gui.char_height = - info.ascender + info.descender + p_linespace; + gui.char_ascent = - info.ascender + p_linespace / 2; + +! return( OK ); + } + + GuiFont +--- 3042,3048 ---- + gui.char_height = - info.ascender + info.descender + p_linespace; + gui.char_ascent = - info.ascender + p_linespace / 2; + +! return OK; + } + + GuiFont +*************** +*** 3060,3072 **** + vim_free( font_name ); + + if( font_tag != NULL ) +! return( (GuiFont) font_tag ); + } + + if( report_error ) + EMSG2(e_font, vim_font_name ); + +! return( FAIL ); + } + + #if defined(FEAT_EVAL) || defined(PROTO) +--- 3060,3072 ---- + vim_free( font_name ); + + if( font_tag != NULL ) +! return (GuiFont)font_tag; + } + + if( report_error ) + EMSG2(e_font, vim_font_name ); + +! return FAIL; + } + + #if defined(FEAT_EVAL) || defined(PROTO) +*** ../vim-7.3.261/src/version.c 2011-07-27 13:59:12.000000000 +0200 +--- src/version.c 2011-07-27 14:08:08.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 262, + /**/ + +-- +You know you use Vim too much when you have this alias in your +~/.bashrc file: alias :e=/bin/vim (Eljay Love-Jensen) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e7ac7a970d8b551873557d0943d76fbfe179f327 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:07 +0200 Subject: [PATCH 0441/3803] - patchlevel 263 --- 7.3.263 | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 7.3.263 diff --git a/7.3.263 b/7.3.263 new file mode 100644 index 00000000..98850988 --- /dev/null +++ b/7.3.263 @@ -0,0 +1,162 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.263 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.263 +Problem: Perl and Tcl have a few code style problems. +Solution: Clean it up. (Elias Diem) +Files: src/if_perl.xs, src/if_tcl.c + + +*** ../vim-7.3.262/src/if_perl.xs 2010-10-23 14:02:48.000000000 +0200 +--- src/if_perl.xs 2011-07-27 14:11:03.000000000 +0200 +*************** +*** 755,761 **** + #ifdef HAVE_SANDBOX + if (sandbox) + { +! safe = perl_get_sv( "VIM::safe", FALSE ); + # ifndef MAKE_TEST /* avoid a warning for unreachable code */ + if (safe == NULL || !SvTRUE(safe)) + EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module")); +--- 755,761 ---- + #ifdef HAVE_SANDBOX + if (sandbox) + { +! safe = perl_get_sv("VIM::safe", FALSE); + # ifndef MAKE_TEST /* avoid a warning for unreachable code */ + if (safe == NULL || !SvTRUE(safe)) + EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module")); +*************** +*** 1108,1114 **** + VIWIN win + + PPCODE: +! if(items == 1) + { + EXTEND(sp, 2); + if (!win_valid(win)) +--- 1108,1114 ---- + VIWIN win + + PPCODE: +! if (items == 1) + { + EXTEND(sp, 2); + if (!win_valid(win)) +*************** +*** 1116,1122 **** + PUSHs(sv_2mortal(newSViv(win->w_cursor.lnum))); + PUSHs(sv_2mortal(newSViv(win->w_cursor.col))); + } +! else if(items == 3) + { + int lnum, col; + +--- 1116,1122 ---- + PUSHs(sv_2mortal(newSViv(win->w_cursor.lnum))); + PUSHs(sv_2mortal(newSViv(win->w_cursor.col))); + } +! else if (items == 3) + { + int lnum, col; + +*************** +*** 1249,1257 **** + { + lnum = SvIV(ST(1)); + count = 1 + SvIV(ST(2)) - lnum; +! if(count == 0) + count = 1; +! if(count < 0) + { + lnum -= count; + count = -count; +--- 1249,1257 ---- + { + lnum = SvIV(ST(1)); + count = 1 + SvIV(ST(2)) - lnum; +! if (count == 0) + count = 1; +! if (count < 0) + { + lnum -= count; + count = -count; +*** ../vim-7.3.262/src/if_tcl.c 2010-12-17 20:23:56.000000000 +0100 +--- src/if_tcl.c 2011-07-27 14:11:03.000000000 +0200 +*************** +*** 1884,1897 **** + { + int newerr = OK; + +! if (error == TCL_EXIT ) + { + int retval; + char buf[50]; + Tcl_Obj *robj; + + robj = Tcl_GetObjResult(tclinfo.interp); +! if( Tcl_GetIntFromObj(tclinfo.interp, robj, &retval) != TCL_OK ) + { + EMSG(_("E281: TCL ERROR: exit code is not int!? Please report this to vim-dev@vim.org")); + newerr = FAIL; +--- 1884,1897 ---- + { + int newerr = OK; + +! if (error == TCL_EXIT) + { + int retval; + char buf[50]; + Tcl_Obj *robj; + + robj = Tcl_GetObjResult(tclinfo.interp); +! if (Tcl_GetIntFromObj(tclinfo.interp, robj, &retval) != TCL_OK) + { + EMSG(_("E281: TCL ERROR: exit code is not int!? Please report this to vim-dev@vim.org")); + newerr = FAIL; +*************** +*** 1900,1906 **** + { + sprintf(buf, _("E572: exit code %d"), retval); + tclerrmsg(buf); +! if (retval == 0 ) + { + did_emsg = 0; + newerr = OK; +--- 1900,1906 ---- + { + sprintf(buf, _("E572: exit code %d"), retval); + tclerrmsg(buf); +! if (retval == 0) + { + did_emsg = 0; + newerr = OK; +*** ../vim-7.3.262/src/version.c 2011-07-27 14:09:05.000000000 +0200 +--- src/version.c 2011-07-27 14:12:05.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 263, + /**/ + +-- +DEAD PERSON: I don't want to go in the cart! +CUSTOMER: Oh, don't be such a baby. +MORTICIAN: I can't take him... +DEAD PERSON: I feel fine! +CUSTOMER: Oh, do us a favor... +MORTICIAN: I can't. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 664dc2c4f20bf6f99f3780532a167550256c20d1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:07 +0200 Subject: [PATCH 0442/3803] - patchlevel 264 --- 7.3.264 | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 7.3.264 diff --git a/7.3.264 b/7.3.264 new file mode 100644 index 00000000..71ec851f --- /dev/null +++ b/7.3.264 @@ -0,0 +1,159 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.264 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.264 +Problem: When the current directory name contains wildcard characters, such + as "foo[with]bar", the tags file can't be found. (Jeremy + Erickson) +Solution: When searching for matching files also match without expanding + wildcards. This is a bit of a hack. +Files: src/vim.h, src/misc1.c, src/misc2.c + + +*** ../vim-7.3.263/src/vim.h 2011-07-20 15:04:52.000000000 +0200 +--- src/vim.h 2011-07-27 16:21:38.000000000 +0200 +*************** +*** 816,821 **** +--- 816,822 ---- + #define EW_PATH 0x80 /* search in 'path' too */ + #define EW_ICASE 0x100 /* ignore case */ + #define EW_NOERROR 0x200 /* no error for bad regexp */ ++ #define EW_NOTWILD 0x400 /* add match with literal name if exists */ + /* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND + * is used when executing commands and EW_SILENT for interactive expanding. */ + +*** ../vim-7.3.263/src/misc1.c 2011-07-20 15:04:52.000000000 +0200 +--- src/misc1.c 2011-07-27 17:24:39.000000000 +0200 +*************** +*** 9119,9125 **** + * all entries found with "matchname". */ + if ((p[0] != '.' || starts_with_dot) + && (matchname == NULL +! || vim_regexec(®match, p, (colnr_T)0))) + { + #ifdef WIN3264 + STRCPY(s, p); +--- 9119,9127 ---- + * all entries found with "matchname". */ + if ((p[0] != '.' || starts_with_dot) + && (matchname == NULL +! || vim_regexec(®match, p, (colnr_T)0) +! || ((flags & EW_NOTWILD) +! && fnamencmp(path + (s - buf), p, e - s) == 0))) + { + #ifdef WIN3264 + STRCPY(s, p); +*************** +*** 9323,9329 **** + e = p; + *e = NUL; + +! /* now we have one wildcard component between "s" and "e" */ + /* Remove backslashes between "wildoff" and the start of the wildcard + * component. */ + for (p = buf + wildoff; p < s; ++p) +--- 9325,9331 ---- + e = p; + *e = NUL; + +! /* Now we have one wildcard component between "s" and "e". */ + /* Remove backslashes between "wildoff" and the start of the wildcard + * component. */ + for (p = buf + wildoff; p < s; ++p) +*************** +*** 9390,9396 **** + if (dp == NULL) + break; + if ((dp->d_name[0] != '.' || starts_with_dot) +! && vim_regexec(®match, (char_u *)dp->d_name, (colnr_T)0)) + { + STRCPY(s, dp->d_name); + len = STRLEN(buf); +--- 9392,9400 ---- + if (dp == NULL) + break; + if ((dp->d_name[0] != '.' || starts_with_dot) +! && (vim_regexec(®match, (char_u *)dp->d_name, (colnr_T)0) +! || ((flags & EW_NOTWILD) +! && fnamencmp(path + (s - buf), dp->d_name, e - s) == 0))) + { + STRCPY(s, dp->d_name); + len = STRLEN(buf); +*** ../vim-7.3.263/src/misc2.c 2011-07-07 17:15:29.000000000 +0200 +--- src/misc2.c 2011-07-27 17:21:10.000000000 +0200 +*************** +*** 4653,4661 **** + { + if (r_ptr[0] == '\\' && r_ptr[1] == ';') + { +! /* overwrite the escape char, +! * use STRLEN(r_ptr) to move the trailing '\0' +! */ + STRMOVE(r_ptr, r_ptr + 1); + r_ptr++; + } +--- 4653,4660 ---- + { + if (r_ptr[0] == '\\' && r_ptr[1] == ';') + { +! /* Overwrite the escape char, +! * use STRLEN(r_ptr) to move the trailing '\0'. */ + STRMOVE(r_ptr, r_ptr + 1); + r_ptr++; + } +*************** +*** 4914,4923 **** + stackp->ffs_filearray_size = 0; + } + else + expand_wildcards((dirptrs[1] == NULL) ? 1 : 2, dirptrs, + &stackp->ffs_filearray_size, + &stackp->ffs_filearray, +! EW_DIR|EW_ADDSLASH|EW_SILENT); + + stackp->ffs_filearray_cur = 0; + stackp->ffs_stage = 0; +--- 4913,4925 ---- + stackp->ffs_filearray_size = 0; + } + else ++ /* Add EW_NOTWILD because the expanded path may contain ++ * wildcard characters that are to be taken literally. ++ * This is a bit of a hack. */ + expand_wildcards((dirptrs[1] == NULL) ? 1 : 2, dirptrs, + &stackp->ffs_filearray_size, + &stackp->ffs_filearray, +! EW_DIR|EW_ADDSLASH|EW_SILENT|EW_NOTWILD); + + stackp->ffs_filearray_cur = 0; + stackp->ffs_stage = 0; +*** ../vim-7.3.263/src/version.c 2011-07-27 14:15:41.000000000 +0200 +--- src/version.c 2011-07-27 17:25:44.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 264, + /**/ + +-- +CUSTOMER: You're not fooling anyone y'know. Look, isn't there something + you can do? +DEAD PERSON: I feel happy... I feel happy. + [whop] +CUSTOMER: Ah, thanks very much. +MORTICIAN: Not at all. See you on Thursday. +CUSTOMER: Right. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d89e9a0273b25696d9ee74cbeae7a228afd912dd Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:08 +0200 Subject: [PATCH 0443/3803] - patchlevel 265 --- 7.3.265 | 145 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 7.3.265 diff --git a/7.3.265 b/7.3.265 new file mode 100644 index 00000000..98cb1b4e --- /dev/null +++ b/7.3.265 @@ -0,0 +1,145 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.265 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.265 +Problem: When storing a pattern in search history there is no proper check + for the separator character. +Solution: Pass the separator character to in_history(). (Muraoka Taro) +Files: src/ex_getln.c + + +*** ../vim-7.3.264/src/ex_getln.c 2011-07-07 16:44:33.000000000 +0200 +--- src/ex_getln.c 2011-07-27 17:50:35.000000000 +0200 +*************** +*** 67,73 **** + + static int hist_char2type __ARGS((int c)); + +! static int in_history __ARGS((int, char_u *, int)); + # ifdef FEAT_EVAL + static int calc_hist_idx __ARGS((int histype, int num)); + # endif +--- 67,73 ---- + + static int hist_char2type __ARGS((int c)); + +! static int in_history __ARGS((int, char_u *, int, int)); + # ifdef FEAT_EVAL + static int calc_hist_idx __ARGS((int histype, int num)); + # endif +*************** +*** 5289,5301 **** + * If 'move_to_front' is TRUE, matching entry is moved to end of history. + */ + static int +! in_history(type, str, move_to_front) + int type; + char_u *str; + int move_to_front; /* Move the entry to the front if it exists */ + { + int i; + int last_i = -1; + + if (hisidx[type] < 0) + return FALSE; +--- 5289,5303 ---- + * If 'move_to_front' is TRUE, matching entry is moved to end of history. + */ + static int +! in_history(type, str, move_to_front, sep) + int type; + char_u *str; + int move_to_front; /* Move the entry to the front if it exists */ ++ int sep; + { + int i; + int last_i = -1; ++ char_u *p; + + if (hisidx[type] < 0) + return FALSE; +*************** +*** 5304,5310 **** + { + if (history[type][i].hisstr == NULL) + return FALSE; +! if (STRCMP(str, history[type][i].hisstr) == 0) + { + if (!move_to_front) + return TRUE; +--- 5306,5317 ---- + { + if (history[type][i].hisstr == NULL) + return FALSE; +! +! /* For search history, check that the separator character matches as +! * well. */ +! p = history[type][i].hisstr; +! if (STRCMP(str, p) == 0 +! && (type != HIST_SEARCH || sep == p[STRLEN(p) + 1])) + { + if (!move_to_front) + return TRUE; +*************** +*** 5398,5404 **** + } + last_maptick = -1; + } +! if (!in_history(histype, new_entry, TRUE)) + { + if (++hisidx[histype] == hislen) + hisidx[histype] = 0; +--- 5405,5411 ---- + } + last_maptick = -1; + } +! if (!in_history(histype, new_entry, TRUE, sep)) + { + if (++hisidx[histype] == hislen) + hisidx[histype] = 0; +*************** +*** 5977,5983 **** + if (val != NULL && *val != NUL) + { + if (!in_history(type, val + (type == HIST_SEARCH), +! viminfo_add_at_front)) + { + /* Need to re-allocate to append the separator byte. */ + len = STRLEN(val); +--- 5984,5990 ---- + if (val != NULL && *val != NUL) + { + if (!in_history(type, val + (type == HIST_SEARCH), +! viminfo_add_at_front, *val)) + { + /* Need to re-allocate to append the separator byte. */ + len = STRLEN(val); +*** ../vim-7.3.264/src/version.c 2011-07-27 17:31:42.000000000 +0200 +--- src/version.c 2011-07-27 17:58:22.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 265, + /**/ + +-- + [clop clop] +MORTICIAN: Who's that then? +CUSTOMER: I don't know. +MORTICIAN: Must be a king. +CUSTOMER: Why? +MORTICIAN: He hasn't got shit all over him. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ea24c115a547008badfa11c86639a80f37de7484 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:09 +0200 Subject: [PATCH 0444/3803] - patchlevel 266 --- 7.3.266 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 7.3.266 diff --git a/7.3.266 b/7.3.266 new file mode 100644 index 00000000..373280ee --- /dev/null +++ b/7.3.266 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.266 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.266 +Problem: In Gvim with iBus typing space in Insert mode doesn't work. +Solution: Clear xim_expected_char after checking it. +Files: src/mbyte.c + + +*** ../vim-7.3.265/src/mbyte.c 2011-07-15 21:16:54.000000000 +0200 +--- src/mbyte.c 2011-07-27 18:21:13.000000000 +0200 +*************** +*** 5170,5175 **** +--- 5170,5179 ---- + /* We had a keypad key, and XIM tried to thieve it */ + return FALSE; + ++ /* This is supposed to fix a problem with iBus, that space ++ * characters don't work in input mode. */ ++ xim_expected_char = NUL; ++ + /* Normal processing */ + return imresult; + } +*** ../vim-7.3.265/src/version.c 2011-07-27 17:58:42.000000000 +0200 +--- src/version.c 2011-07-27 18:23:00.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 266, + /**/ + +-- + [clop clop] +ARTHUR: Old woman! +DENNIS: Man! +ARTHUR: Man, sorry. What knight lives in that castle over there? +DENNIS: I'm thirty seven. +ARTHUR: What? +DENNIS: I'm thirty seven -- I'm not old! + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From e923a2a1413669964ed95f71455e4adf9b4a6ec5 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:11 +0200 Subject: [PATCH 0445/3803] - patchlevel 267 --- 7.3.267 | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 7.3.267 diff --git a/7.3.267 b/7.3.267 new file mode 100644 index 00000000..d986e503 --- /dev/null +++ b/7.3.267 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.267 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.267 +Problem: Ruby on Mac OS X 10.7 may crash. +Solution: Avoid alloc(0). (Bjorn Winckler) +Files: src/if_ruby.c + + +*** ../vim-7.3.266/src/if_ruby.c 2011-01-17 19:53:20.000000000 +0100 +--- src/if_ruby.c 2011-08-04 18:57:43.000000000 +0200 +*************** +*** 761,771 **** + char *buff, *p; + + str = rb_obj_as_string(str); +! buff = ALLOCA_N(char, RSTRING_LEN(str)); +! strcpy(buff, RSTRING_PTR(str)); +! p = strchr(buff, '\n'); +! if (p) *p = '\0'; +! MSG(buff); + return Qnil; + } + +--- 761,779 ---- + char *buff, *p; + + str = rb_obj_as_string(str); +! if (RSTRING_LEN(str) > 0) +! { +! /* Only do this when the string isn't empty, alloc(0) causes trouble. */ +! buff = ALLOCA_N(char, RSTRING_LEN(str)); +! strcpy(buff, RSTRING_PTR(str)); +! p = strchr(buff, '\n'); +! if (p) *p = '\0'; +! MSG(buff); +! } +! else +! { +! MSG(""); +! } + return Qnil; + } + +*** ../vim-7.3.266/src/version.c 2011-07-27 18:25:40.000000000 +0200 +--- src/version.c 2011-08-04 19:07:45.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 267, + /**/ + +-- +There are 10 kinds of people: Those who understand binary and those who don't. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 70bfaa68e292168ae76db117b30a34700eab3da8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:12 +0200 Subject: [PATCH 0446/3803] - patchlevel 268 --- 7.3.268 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 7.3.268 diff --git a/7.3.268 b/7.3.268 new file mode 100644 index 00000000..aa848770 --- /dev/null +++ b/7.3.268 @@ -0,0 +1,69 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.268 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.268 +Problem: Vim freezes when executing an external command with zsh. +Solution: Use O_NOCTTY both in the master and slave. (Bjorn Winckler) +Files: src/os_unix.c + + +*** ../vim-7.3.267/src/os_unix.c 2011-07-07 16:20:45.000000000 +0200 +--- src/os_unix.c 2011-08-04 19:06:14.000000000 +0200 +*************** +*** 3889,3899 **** + if (p_guipty && !(options & (SHELL_READ|SHELL_WRITE))) + { + pty_master_fd = OpenPTY(&tty_name); /* open pty */ +! if (pty_master_fd >= 0 && ((pty_slave_fd = +! open(tty_name, O_RDWR | O_EXTRA, 0)) < 0)) + { +! close(pty_master_fd); +! pty_master_fd = -1; + } + } + /* +--- 3889,3909 ---- + if (p_guipty && !(options & (SHELL_READ|SHELL_WRITE))) + { + pty_master_fd = OpenPTY(&tty_name); /* open pty */ +! if (pty_master_fd >= 0) + { +! /* Leaving out O_NOCTTY may lead to waitpid() always returning +! * 0 on Mac OS X 10.7 thereby causing freezes. Let's assume +! * adding O_NOCTTY always works when defined. */ +! #ifdef O_NOCTTY +! pty_slave_fd = open(tty_name, O_RDWR | O_NOCTTY | O_EXTRA, 0); +! #else +! pty_slave_fd = open(tty_name, O_RDWR | O_EXTRA, 0); +! #endif +! if (pty_slave_fd < 0) +! { +! close(pty_master_fd); +! pty_master_fd = -1; +! } + } + } + /* +*** ../vim-7.3.267/src/version.c 2011-08-04 19:34:55.000000000 +0200 +--- src/version.c 2011-08-04 19:36:00.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 268, + /**/ + +-- +Mental Floss prevents moral decay! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 404aa2aff0425b7aeb07f98dde94b80e7895d4fa Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:13 +0200 Subject: [PATCH 0447/3803] - patchlevel 269 --- 7.3.269 | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 7.3.269 diff --git a/7.3.269 b/7.3.269 new file mode 100644 index 00000000..a0bfc473 --- /dev/null +++ b/7.3.269 @@ -0,0 +1,112 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.269 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.269 +Problem: 'shellcmdflag' only works with one flag. +Solution: Split into multiple arguments. (Gary Johnson) +Files: src/os_unix.c + + +*** ../vim-7.3.268/src/os_unix.c 2011-08-04 19:36:47.000000000 +0200 +--- src/os_unix.c 2011-08-04 20:27:13.000000000 +0200 +*************** +*** 3795,3802 **** +--- 3795,3804 ---- + int retval = -1; + char **argv = NULL; + int argc; ++ char_u *p_shcf_copy = NULL; + int i; + char_u *p; ++ char_u *s; + int inquote; + int pty_master_fd = -1; /* for pty's */ + # ifdef FEAT_GUI +*************** +*** 3855,3860 **** +--- 3857,3875 ---- + } + if (argv == NULL) + { ++ /* ++ * Account for possible multiple args in p_shcf. ++ */ ++ p = p_shcf; ++ for (;;) ++ { ++ p = skiptowhite(p); ++ if (*p == NUL) ++ break; ++ ++argc; ++ p = skipwhite(p); ++ } ++ + argv = (char **)alloc((unsigned)((argc + 4) * sizeof(char *))); + if (argv == NULL) /* out of memory */ + goto error; +*************** +*** 3864,3870 **** + { + if (extra_shell_arg != NULL) + argv[argc++] = (char *)extra_shell_arg; +! argv[argc++] = (char *)p_shcf; + argv[argc++] = (char *)cmd; + } + argv[argc] = NULL; +--- 3879,3901 ---- + { + if (extra_shell_arg != NULL) + argv[argc++] = (char *)extra_shell_arg; +! +! /* Break 'shellcmdflag' into white separated parts. This doesn't +! * handle quoted strings, they are very unlikely to appear. */ +! p_shcf_copy = alloc((unsigned)STRLEN(p_shcf) + 1); +! if (p_shcf_copy == NULL) /* out of memory */ +! goto error; +! s = p_shcf_copy; +! p = p_shcf; +! while (*p != NUL) +! { +! argv[argc++] = (char *)s; +! while (*p && *p != ' ' && *p != TAB) +! *s++ = *p++; +! *s++ = NUL; +! p = skipwhite(p); +! } +! + argv[argc++] = (char *)cmd; + } + argv[argc] = NULL; +*************** +*** 4677,4682 **** +--- 4708,4714 ---- + } + } + vim_free(argv); ++ vim_free(p_shcf_copy); + + error: + if (!did_settmode) +*** ../vim-7.3.268/src/version.c 2011-08-04 19:36:47.000000000 +0200 +--- src/version.c 2011-08-04 20:30:44.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 269, + /**/ + +-- +Be nice to your kids... they'll be the ones choosing your nursing home. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From b317814cd34bc592b53345d0108152bd01db4787 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:13 +0200 Subject: [PATCH 0448/3803] - patchlevel 270 --- 7.3.270 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 7.3.270 diff --git a/7.3.270 b/7.3.270 new file mode 100644 index 00000000..3eaf6bfa --- /dev/null +++ b/7.3.270 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.270 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.270 +Problem: Illegal memory access. +Solution: Swap conditions. (Dominique Pelle) +Files: src/ops.c + + +*** ../vim-7.3.269/src/ops.c 2011-07-15 17:51:30.000000000 +0200 +--- src/ops.c 2011-08-10 12:07:22.000000000 +0200 +*************** +*** 6311,6317 **** + *wc += words; + + /* Add eol_size if the end of line was reached before hitting limit. */ +! if (line[i] == NUL && i < limit) + { + i += eol_size; + chars += eol_size; +--- 6311,6317 ---- + *wc += words; + + /* Add eol_size if the end of line was reached before hitting limit. */ +! if (i < limit && line[i] == NUL) + { + i += eol_size; + chars += eol_size; +*** ../vim-7.3.269/src/version.c 2011-08-04 20:31:50.000000000 +0200 +--- src/version.c 2011-08-10 12:09:30.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 270, + /**/ + +-- +An indication you must be a manager: +You give constructive feedback to your dog. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From c13f0317adfd1207f410c4aa6f2ea07daa5c1218 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:14 +0200 Subject: [PATCH 0449/3803] - patchlevel 271 --- 7.3.271 | 504 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 504 insertions(+) create mode 100644 7.3.271 diff --git a/7.3.271 b/7.3.271 new file mode 100644 index 00000000..c42d19a8 --- /dev/null +++ b/7.3.271 @@ -0,0 +1,504 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.271 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.271 +Problem: Code not following Vim coding style. +Solution: Fix the style. (Elias Diem) +Files: src/gui_photon.c + + +*** ../vim-7.3.270/src/gui_photon.c 2011-07-27 14:09:05.000000000 +0200 +--- src/gui_photon.c 2011-08-10 12:18:35.000000000 +0200 +*************** +*** 358,378 **** + } + + static int +! gui_ph_handle_window_cb( PtWidget_t *widget, void *data, PtCallbackInfo_t *info ) + { + PhWindowEvent_t *we = info->cbdata; + ushort_t *width, *height; + +! switch( we->event_f ) { + case Ph_WM_CLOSE: + gui_shell_closed(); + break; + + case Ph_WM_FOCUS: + /* Just in case it's hidden and needs to be shown */ +! gui_mch_mousehide( MOUSE_SHOW ); + +! if( we->event_state == Ph_WM_EVSTATE_FOCUS ) + { + gui_focus_change(TRUE); + gui_mch_start_blink(); +--- 358,378 ---- + } + + static int +! gui_ph_handle_window_cb(PtWidget_t *widget, void *data, PtCallbackInfo_t *info) + { + PhWindowEvent_t *we = info->cbdata; + ushort_t *width, *height; + +! switch (we->event_f) { + case Ph_WM_CLOSE: + gui_shell_closed(); + break; + + case Ph_WM_FOCUS: + /* Just in case it's hidden and needs to be shown */ +! gui_mch_mousehide(MOUSE_SHOW); + +! if (we->event_state == Ph_WM_EVSTATE_FOCUS) + { + gui_focus_change(TRUE); + gui_mch_start_blink(); +*************** +*** 385,401 **** + break; + + case Ph_WM_RESIZE: +! PtGetResource( gui.vimWindow, Pt_ARG_WIDTH, &width, 0 ); +! PtGetResource( gui.vimWindow, Pt_ARG_HEIGHT, &height, 0 ); + #ifdef USE_PANEL_GROUP + width -= (pg_margin_left + pg_margin_right); + height -= (pg_margin_top + pg_margin_bottom); + #endif +! gui_resize_shell( *width, *height ); +! gui_set_shellsize( FALSE, FALSE, RESIZE_BOTH ); + is_ignore_draw = FALSE; +! PtEndFlux( gui.vimContainer ); +! PtContainerRelease( gui.vimContainer ); + break; + + default: +--- 385,401 ---- + break; + + case Ph_WM_RESIZE: +! PtGetResource(gui.vimWindow, Pt_ARG_WIDTH, &width, 0); +! PtGetResource(gui.vimWindow, Pt_ARG_HEIGHT, &height, 0); + #ifdef USE_PANEL_GROUP + width -= (pg_margin_left + pg_margin_right); + height -= (pg_margin_top + pg_margin_bottom); + #endif +! gui_resize_shell(*width, *height); +! gui_set_shellsize(FALSE, FALSE, RESIZE_BOTH); + is_ignore_draw = FALSE; +! PtEndFlux(gui.vimContainer); +! PtContainerRelease(gui.vimContainer); + break; + + default: +*************** +*** 406,412 **** + } + + static int +! gui_ph_handle_scrollbar( PtWidget_t *widget, void *data, PtCallbackInfo_t *info ) + { + PtScrollbarCallback_t *scroll; + scrollbar_T *sb; +--- 406,412 ---- + } + + static int +! gui_ph_handle_scrollbar(PtWidget_t *widget, void *data, PtCallbackInfo_t *info) + { + PtScrollbarCallback_t *scroll; + scrollbar_T *sb; +*************** +*** 415,424 **** + scroll = info->cbdata; + + sb = (scrollbar_T *) data; +! if( sb != NULL ) + { + value = scroll->position; +! switch( scroll->action ) + { + case Pt_SCROLL_DRAGGED: + dragging = TRUE; +--- 415,424 ---- + scroll = info->cbdata; + + sb = (scrollbar_T *) data; +! if (sb != NULL) + { + value = scroll->position; +! switch (scroll->action) + { + case Pt_SCROLL_DRAGGED: + dragging = TRUE; +*************** +*** 436,532 **** + } + + static int +! gui_ph_handle_keyboard( PtWidget_t *widget, void *data, PtCallbackInfo_t *info ) + { + PhKeyEvent_t *key; + unsigned char string[6]; + int len, i; + int ch, modifiers; + +! key = PhGetData( info->event ); + + ch = modifiers = len = 0; + +! if( p_mh ) +! gui_mch_mousehide( MOUSE_HIDE ); + + /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */ +! if( key->key_flags & Pk_KF_Compose ) + { + return Pt_CONTINUE; + } + +! if( (key->key_flags & Pk_KF_Cap_Valid) && +! PkIsKeyDown( key->key_flags ) ) + { + #ifdef FEAT_MENU + /* + * Only show the menu if the Alt key is down, and the Shift & Ctrl + * keys aren't down, as well as the other conditions + */ +! if( ( ( key->key_mods & Pk_KM_Alt ) && +! !( key->key_mods & Pk_KM_Shift ) && +! !( key->key_mods & Pk_KM_Ctrl ) ) && + gui.menu_is_active && +! ( *p_wak == 'y' || +! ( *p_wak == 'm' && +! gui_is_menu_shortcut( key->key_cap ) ) ) ) + { + /* Fallthrough and let photon look for the hotkey */ + return Pt_CONTINUE; + } + #endif + +! for( i = 0; special_keys[i].key_sym != 0; i++ ) + { +! if( special_keys[i].key_sym == key->key_cap ) + { + len = 0; +! if( special_keys[i].vim_code1 == NUL ) + ch = special_keys[i].vim_code0; + else + { + /* Detect if a keypad number key has been pressed + * and change the key if Num Lock is on */ +! if( key->key_cap >= Pk_KP_Enter && key->key_cap <= Pk_KP_9 +! && ( key->key_mods & Pk_KM_Num_Lock ) ) + { + /* FIXME: For now, just map the key to a ascii value + * (see ) */ + ch = key->key_cap - 0xf080; + } + else +! ch = TO_SPECIAL( special_keys[i].vim_code0, +! special_keys[i].vim_code1 ); + } + break; + } + } + +! if( key->key_mods & Pk_KM_Ctrl ) + modifiers |= MOD_MASK_CTRL; +! if( key->key_mods & Pk_KM_Alt ) + modifiers |= MOD_MASK_ALT; +! if( key->key_mods & Pk_KM_Shift ) + modifiers |= MOD_MASK_SHIFT; + + /* Is this not a special key? */ +! if( special_keys[i].key_sym == 0 ) + { +! ch = PhTo8859_1( key ); +! if( ch == -1 + #ifdef FEAT_MBYTE +! || ( enc_utf8 && ch > 127 ) + #endif + ) + { + #ifdef FEAT_MBYTE +! len = PhKeyToMb( string, key ); +! if( len > 0 ) + { + static char buf[6]; + int src_taken, dst_made; +! if( enc_utf8 != TRUE ) + { + PxTranslateFromUTF( + charset_translate, +--- 436,532 ---- + } + + static int +! gui_ph_handle_keyboard(PtWidget_t *widget, void *data, PtCallbackInfo_t *info) + { + PhKeyEvent_t *key; + unsigned char string[6]; + int len, i; + int ch, modifiers; + +! key = PhGetData(info->event); + + ch = modifiers = len = 0; + +! if (p_mh) +! gui_mch_mousehide(MOUSE_HIDE); + + /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */ +! if (key->key_flags & Pk_KF_Compose) + { + return Pt_CONTINUE; + } + +! if ((key->key_flags & Pk_KF_Cap_Valid) && +! PkIsKeyDown(key->key_flags)) + { + #ifdef FEAT_MENU + /* + * Only show the menu if the Alt key is down, and the Shift & Ctrl + * keys aren't down, as well as the other conditions + */ +! if (((key->key_mods & Pk_KM_Alt) && +! !(key->key_mods & Pk_KM_Shift) && +! !(key->key_mods & Pk_KM_Ctrl)) && + gui.menu_is_active && +! (*p_wak == 'y' || +! (*p_wak == 'm' && +! gui_is_menu_shortcut(key->key_cap)))) + { + /* Fallthrough and let photon look for the hotkey */ + return Pt_CONTINUE; + } + #endif + +! for(i = 0; special_keys[i].key_sym != 0; i++) + { +! if (special_keys[i].key_sym == key->key_cap) + { + len = 0; +! if (special_keys[i].vim_code1 == NUL) + ch = special_keys[i].vim_code0; + else + { + /* Detect if a keypad number key has been pressed + * and change the key if Num Lock is on */ +! if (key->key_cap >= Pk_KP_Enter && key->key_cap <= Pk_KP_9 +! && (key->key_mods & Pk_KM_Num_Lock)) + { + /* FIXME: For now, just map the key to a ascii value + * (see ) */ + ch = key->key_cap - 0xf080; + } + else +! ch = TO_SPECIAL(special_keys[i].vim_code0, +! special_keys[i].vim_code1); + } + break; + } + } + +! if (key->key_mods & Pk_KM_Ctrl) + modifiers |= MOD_MASK_CTRL; +! if (key->key_mods & Pk_KM_Alt) + modifiers |= MOD_MASK_ALT; +! if (key->key_mods & Pk_KM_Shift) + modifiers |= MOD_MASK_SHIFT; + + /* Is this not a special key? */ +! if (special_keys[i].key_sym == 0) + { +! ch = PhTo8859_1(key); +! if (ch == -1 + #ifdef FEAT_MBYTE +! || (enc_utf8 && ch > 127) + #endif + ) + { + #ifdef FEAT_MBYTE +! len = PhKeyToMb(string, key); +! if (len > 0) + { + static char buf[6]; + int src_taken, dst_made; +! if (enc_utf8 != TRUE) + { + PxTranslateFromUTF( + charset_translate, +*************** +*** 2931,2943 **** + name_len = (int_u) ( mark - vim_font ); + + *font_name = vim_strnsave( vim_font, name_len ); +! if( *font_name != NULL ) + { +! if( mark != NULL ) + { +! while( *mark != NUL && *mark++ == ':') + { +! switch( tolower( *mark++ ) ) + { + case 'a': *font_flags |= PF_STYLE_ANTIALIAS; break; + case 'b': *font_flags |= PF_STYLE_BOLD; break; +--- 2931,2943 ---- + name_len = (int_u) ( mark - vim_font ); + + *font_name = vim_strnsave( vim_font, name_len ); +! if (*font_name != NULL) + { +! if (mark != NULL) + { +! while (*mark != NUL && *mark++ == ':') + { +! switch (tolower(*mark++)) + { + case 'a': *font_flags |= PF_STYLE_ANTIALIAS; break; + case 'b': *font_flags |= PF_STYLE_BOLD; break; +*************** +*** 2946,2952 **** + case 's': + size = getdigits( &mark ); + /* Restrict the size to some vague limits */ +! if( size < 1 || size > 100 ) + size = 8; + + *font_size = size; +--- 2946,2952 ---- + case 's': + size = getdigits( &mark ); + /* Restrict the size to some vague limits */ +! if (size < 1 || size > 100) + size = 8; + + *font_size = size; +*************** +*** 2973,2990 **** + FontQueryInfo info; + PhRect_t extent; + +! if( vim_font_name == NULL ) + { + /* Default font */ + vim_font_name = "PC Terminal"; + } + +! if( STRCMP( vim_font_name, "*" ) == 0 ) + { + font_tag = PtFontSelection( gui.vimWindow, NULL, NULL, + "pcterm12", -1, PHFONT_FIXED, NULL ); + +! if( font_tag == NULL ) + return FAIL; + + gui_mch_free_font( gui.norm_font ); +--- 2973,2990 ---- + FontQueryInfo info; + PhRect_t extent; + +! if (vim_font_name == NULL) + { + /* Default font */ + vim_font_name = "PC Terminal"; + } + +! if (STRCMP( vim_font_name, "*" ) == 0) + { + font_tag = PtFontSelection( gui.vimWindow, NULL, NULL, + "pcterm12", -1, PHFONT_FIXED, NULL ); + +! if (font_tag == NULL) + return FAIL; + + gui_mch_free_font( gui.norm_font ); +*************** +*** 2995,3006 **** + } + else + { +! if( gui_ph_parse_font_name( vim_font_name, &font_name, &font_flags, +! &font_size ) == FALSE ) + return FAIL; + + font_tag = gui_ph_get_font( font_name, font_flags, font_size, 0 ); +! if( font_tag == NULL ) + { + vim_free( font_name ); + return FAIL; +--- 2995,3006 ---- + } + else + { +! if (gui_ph_parse_font_name( vim_font_name, &font_name, &font_flags, +! &font_size ) == FALSE) + return FAIL; + + font_tag = gui_ph_get_font( font_name, font_flags, font_size, 0 ); +! if (font_tag == NULL) + { + vim_free( font_name ); + return FAIL; +*************** +*** 3053,3069 **** + int_u font_size = 12; + int_u font_flags = 0; + +! if( gui_ph_parse_font_name( vim_font_name, &font_name, &font_flags, +! &font_size ) != FALSE ) + { + font_tag = gui_ph_get_font( font_name, font_flags, font_size, -1 ); + vim_free( font_name ); + +! if( font_tag != NULL ) + return (GuiFont)font_tag; + } + +! if( report_error ) + EMSG2(e_font, vim_font_name ); + + return FAIL; +--- 3053,3069 ---- + int_u font_size = 12; + int_u font_flags = 0; + +! if (gui_ph_parse_font_name( vim_font_name, &font_name, &font_flags, +! &font_size ) != FALSE) + { + font_tag = gui_ph_get_font( font_name, font_flags, font_size, -1 ); + vim_free( font_name ); + +! if (font_tag != NULL) + return (GuiFont)font_tag; + } + +! if (report_error) + EMSG2(e_font, vim_font_name ); + + return FAIL; +*** ../vim-7.3.270/src/version.c 2011-08-10 12:10:55.000000000 +0200 +--- src/version.c 2011-08-10 12:17:06.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 271, + /**/ + +-- +An indication you must be a manager: +You believe you never have any problems in your life, just +"issues" and "improvement opportunities". + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 1ede7cd87da416091354e1f715dc82d7bf19e405 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:15 +0200 Subject: [PATCH 0450/3803] - patchlevel 272 --- 7.3.272 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 7.3.272 diff --git a/7.3.272 b/7.3.272 new file mode 100644 index 00000000..b512a1fd --- /dev/null +++ b/7.3.272 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.272 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.272 +Problem: ":put =list" does not add an empty line for a trailing empty + item. +Solution: Add a trailing NL when turning a list into a string. +Files: src/eval.c + + +*** ../vim-7.3.271/src/eval.c 2011-07-15 21:24:06.000000000 +0200 +--- src/eval.c 2011-08-10 12:31:51.000000000 +0200 +*************** +*** 1357,1363 **** +--- 1357,1367 ---- + { + ga_init2(&ga, (int)sizeof(char), 80); + if (tv.vval.v_list != NULL) ++ { + list_join(&ga, tv.vval.v_list, (char_u *)"\n", TRUE, 0); ++ if (tv.vval.v_list->lv_len > 0) ++ ga_append(&ga, NL); ++ } + ga_append(&ga, NUL); + retval = (char_u *)ga.ga_data; + } +*** ../vim-7.3.271/src/version.c 2011-08-10 12:19:00.000000000 +0200 +--- src/version.c 2011-08-10 12:36:41.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 272, + /**/ + +-- +Lose weight, NEVER Diet again with + The "Invisible Weight Loss Patch" + (spam e-mail) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 474b1b43e87c4bd928a8ea94b22c6e71cf2aa32c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:16 +0200 Subject: [PATCH 0451/3803] - patchlevel 273 --- 7.3.273 | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 7.3.273 diff --git a/7.3.273 b/7.3.273 new file mode 100644 index 00000000..e74eb5a2 --- /dev/null +++ b/7.3.273 @@ -0,0 +1,124 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.273 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.273 +Problem: A BOM in an error file is seen as text. (Aleksey Baibarin) +Solution: Remove the BOM from the text before evaluating. (idea by Christian + Brabandt) +Files: src/quickfix.c, src/mbyte.c, src/proto/mbyte.pro, + src/testdir/test10.in + + +*** ../vim-7.3.272/src/quickfix.c 2011-05-19 17:42:54.000000000 +0200 +--- src/quickfix.c 2011-08-10 12:56:15.000000000 +0200 +*************** +*** 561,566 **** +--- 561,570 ---- + break; + + IObuff[CMDBUFFSIZE - 2] = NUL; /* for very long lines */ ++ #ifdef FEAT_MBYTE ++ remove_bom(IObuff); ++ #endif ++ + if ((efmp = vim_strrchr(IObuff, '\n')) != NULL) + *efmp = NUL; + #ifdef USE_CRNL +*** ../vim-7.3.272/src/mbyte.c 2011-07-27 18:25:40.000000000 +0200 +--- src/mbyte.c 2011-08-10 13:11:56.000000000 +0200 +*************** +*** 838,843 **** +--- 838,864 ---- + } + + /* ++ * Remove all BOM from "s" by moving remaining text. ++ */ ++ void ++ remove_bom(s) ++ char_u *s; ++ { ++ if (enc_utf8) ++ { ++ char_u *p = s; ++ ++ while ((p = vim_strbyte(p, 0xef)) != NULL) ++ { ++ if (p[1] == 0xbb && p[2] == 0xbf) ++ STRMOVE(p, p + 3); ++ else ++ ++p; ++ } ++ } ++ } ++ ++ /* + * Get class of pointer: + * 0 for blank or NUL + * 1 for punctuation +*** ../vim-7.3.272/src/proto/mbyte.pro 2011-07-07 15:08:53.000000000 +0200 +--- src/proto/mbyte.pro 2011-08-10 12:50:44.000000000 +0200 +*************** +*** 2,7 **** +--- 2,8 ---- + int enc_canon_props __ARGS((char_u *name)); + char_u *mb_init __ARGS((void)); + int bomb_size __ARGS((void)); ++ void remove_bom __ARGS((char_u *s)); + int mb_get_class __ARGS((char_u *p)); + int dbcs_class __ARGS((unsigned lead, unsigned trail)); + int latin_char2len __ARGS((int c)); +*** ../vim-7.3.272/src/testdir/test10.in 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test10.in 2011-08-10 13:01:46.000000000 +0200 +*************** +*** 2,7 **** +--- 2,10 ---- + + STARTTEST + :so small.vim ++ :" Also test a BOM is ignored. ++ :so mbyte.vim ++ :set encoding=utf-8 + :/start of errorfile/,/end of errorfile/w! Xerrorfile + :/start of testfile/,/end of testfile/w! Xtestfile + :cf Xerrorfile +*************** +*** 20,26 **** + + start of errorfile + "Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set. +! "Xtestfile", line 7 col 19; this is an error + gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include version.c + Xtestfile:13: parse error before `asd' + make: *** [vim] Error 1 +--- 23,29 ---- + + start of errorfile + "Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set. +! "Xtestfile", line 7 col 19; this is an error + gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include version.c + Xtestfile:13: parse error before `asd' + make: *** [vim] Error 1 +*** ../vim-7.3.272/src/version.c 2011-08-10 12:38:02.000000000 +0200 +--- src/version.c 2011-08-10 13:14:35.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 273, + /**/ + +-- +Compilation process failed successfully. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 27a48e249df11cdfb76e85107298e0481cb690a8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:17 +0200 Subject: [PATCH 0452/3803] - patchlevel 274 --- 7.3.274 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 7.3.274 diff --git a/7.3.274 b/7.3.274 new file mode 100644 index 00000000..48faf3cf --- /dev/null +++ b/7.3.274 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.274 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.274 +Problem: With concealed characters tabs do not have the right size. +Solution: Use VCOL_HLC instead of vcol. (Eiichi Sato) +Files: src/screen.c + + +*** ../vim-7.3.273/src/screen.c 2011-03-22 13:29:20.000000000 +0100 +--- src/screen.c 2011-08-10 14:22:47.000000000 +0200 +*************** +*** 4252,4258 **** + { + /* tab amount depends on current column */ + n_extra = (int)wp->w_buffer->b_p_ts +! - vcol % (int)wp->w_buffer->b_p_ts - 1; + #ifdef FEAT_MBYTE + mb_utf8 = FALSE; /* don't draw as UTF-8 */ + #endif +--- 4252,4258 ---- + { + /* tab amount depends on current column */ + n_extra = (int)wp->w_buffer->b_p_ts +! - VCOL_HLC % (int)wp->w_buffer->b_p_ts - 1; + #ifdef FEAT_MBYTE + mb_utf8 = FALSE; /* don't draw as UTF-8 */ + #endif +*** ../vim-7.3.273/src/version.c 2011-08-10 13:21:30.000000000 +0200 +--- src/version.c 2011-08-10 14:23:38.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 274, + /**/ + +-- + Arthur pulls Pin out. The MONK blesses the grenade as ... +ARTHUR: (quietly) One, two, five ... +GALAHAD: Three, sir! +ARTHUR: Three. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d540a51d340363e4e0c126d124792511beaa8793 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:18 +0200 Subject: [PATCH 0453/3803] - patchlevel 275 --- 7.3.275 | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 7.3.275 diff --git a/7.3.275 b/7.3.275 new file mode 100644 index 00000000..2bdd145b --- /dev/null +++ b/7.3.275 @@ -0,0 +1,77 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.275 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.275 +Problem: MS-Windows: When using a black background some screen updates + cause the window to flicker. +Solution: Add WS_CLIPCHILDREN to CreateWindow(). (René Aguirre) +Files: src/gui_w32.c + + +*** ../vim-7.3.274/src/gui_w32.c 2011-07-07 17:43:37.000000000 +0200 +--- src/gui_w32.c 2011-08-10 14:40:58.000000000 +0200 +*************** +*** 1379,1385 **** + s_hwnd = CreateWindowEx( + WS_EX_MDICHILD, + szVimWndClass, "Vim MSWindows GUI", +! WS_OVERLAPPEDWINDOW | WS_CHILD | WS_CLIPSIBLINGS | 0xC000, + gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x, + gui_win_y == -1 ? CW_USEDEFAULT : gui_win_y, + 100, /* Any value will do */ +--- 1379,1386 ---- + s_hwnd = CreateWindowEx( + WS_EX_MDICHILD, + szVimWndClass, "Vim MSWindows GUI", +! WS_OVERLAPPEDWINDOW | WS_CHILD +! | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | 0xC000, + gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x, + gui_win_y == -1 ? CW_USEDEFAULT : gui_win_y, + 100, /* Any value will do */ +*************** +*** 1410,1416 **** + * titlebar, it will be reparented below. */ + s_hwnd = CreateWindow( + szVimWndClass, "Vim MSWindows GUI", +! win_socket_id == 0 ? WS_OVERLAPPEDWINDOW : WS_POPUP, + gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x, + gui_win_y == -1 ? CW_USEDEFAULT : gui_win_y, + 100, /* Any value will do */ +--- 1411,1418 ---- + * titlebar, it will be reparented below. */ + s_hwnd = CreateWindow( + szVimWndClass, "Vim MSWindows GUI", +! (win_socket_id == 0 ? WS_OVERLAPPEDWINDOW : WS_POPUP) +! | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, + gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x, + gui_win_y == -1 ? CW_USEDEFAULT : gui_win_y, + 100, /* Any value will do */ +*** ../vim-7.3.274/src/version.c 2011-08-10 14:32:33.000000000 +0200 +--- src/version.c 2011-08-10 14:39:14.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 275, + /**/ + +-- +ARTHUR: What does it say? +BROTHER MAYNARD: It reads ... "Here may be found the last words of Joseph of + Aramathea." "He who is valorous and pure of heart may find + the Holy Grail in the aaaaarrrrrrggghhh..." +ARTHUR: What? +BROTHER MAYNARD: "The Aaaaarrrrrrggghhh..." + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From cb63ccc36d111316781ab26b356c5a9f79b5c9c6 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:18 +0200 Subject: [PATCH 0454/3803] - patchlevel 276 --- 7.3.276 | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 7.3.276 diff --git a/7.3.276 b/7.3.276 new file mode 100644 index 00000000..3af02457 --- /dev/null +++ b/7.3.276 @@ -0,0 +1,130 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.276 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.276 +Problem: GvimExt sets $LANG in the wrong way. +Solution: Save the environment and use it for gvim. (Yasuhiro Matsumoto) +Files: src/GvimExt/gvimext.cpp + + +*** ../vim-7.3.275/src/GvimExt/gvimext.cpp 2011-07-20 17:27:17.000000000 +0200 +--- src/GvimExt/gvimext.cpp 2011-08-10 16:25:32.000000000 +0200 +*************** +*** 142,147 **** +--- 142,148 ---- + static int dyn_libintl_init(char *dir); + static void dyn_libintl_end(void); + ++ static wchar_t *oldenv = NULL; + static HINSTANCE hLibintlDLL = 0; + static char *(*dyn_libintl_gettext)(const char *) = null_libintl_gettext; + static char *(*dyn_libintl_textdomain)(const char *) = null_libintl_textdomain; +*************** +*** 339,346 **** + inc_cRefThisDLL() + { + #ifdef FEAT_GETTEXT +! if (g_cRefThisDll == 0) + dyn_gettext_load(); + #endif + InterlockedIncrement((LPLONG)&g_cRefThisDll); + } +--- 340,349 ---- + inc_cRefThisDLL() + { + #ifdef FEAT_GETTEXT +! if (g_cRefThisDll == 0) { + dyn_gettext_load(); ++ oldenv = GetEnvironmentStringsW(); ++ } + #endif + InterlockedIncrement((LPLONG)&g_cRefThisDll); + } +*************** +*** 349,356 **** + dec_cRefThisDLL() + { + #ifdef FEAT_GETTEXT +! if (InterlockedDecrement((LPLONG)&g_cRefThisDll) == 0) + dyn_gettext_free(); + #else + InterlockedDecrement((LPLONG)&g_cRefThisDll); + #endif +--- 352,364 ---- + dec_cRefThisDLL() + { + #ifdef FEAT_GETTEXT +! if (InterlockedDecrement((LPLONG)&g_cRefThisDll) == 0) { + dyn_gettext_free(); ++ if (oldenv != NULL) { ++ FreeEnvironmentStringsW(oldenv); ++ oldenv = NULL; ++ } ++ } + #else + InterlockedDecrement((LPLONG)&g_cRefThisDll); + #endif +*************** +*** 905,912 **** + NULL, // Process handle not inheritable. + NULL, // Thread handle not inheritable. + FALSE, // Set handle inheritance to FALSE. +! 0, // No creation flags. +! NULL, // Use parent's environment block. + NULL, // Use parent's starting directory. + &si, // Pointer to STARTUPINFO structure. + &pi) // Pointer to PROCESS_INFORMATION structure. +--- 913,920 ---- + NULL, // Process handle not inheritable. + NULL, // Thread handle not inheritable. + FALSE, // Set handle inheritance to FALSE. +! oldenv == NULL ? 0 : CREATE_UNICODE_ENVIRONMENT, +! oldenv, // Use unmodified environment block. + NULL, // Use parent's starting directory. + &si, // Pointer to STARTUPINFO structure. + &pi) // Pointer to PROCESS_INFORMATION structure. +*************** +*** 987,994 **** + NULL, // Process handle not inheritable. + NULL, // Thread handle not inheritable. + FALSE, // Set handle inheritance to FALSE. +! 0, // No creation flags. +! NULL, // Use parent's environment block. + NULL, // Use parent's starting directory. + &si, // Pointer to STARTUPINFO structure. + &pi) // Pointer to PROCESS_INFORMATION structure. +--- 995,1002 ---- + NULL, // Process handle not inheritable. + NULL, // Thread handle not inheritable. + FALSE, // Set handle inheritance to FALSE. +! oldenv == NULL ? 0 : CREATE_UNICODE_ENVIRONMENT, +! oldenv, // Use unmodified environment block. + NULL, // Use parent's starting directory. + &si, // Pointer to STARTUPINFO structure. + &pi) // Pointer to PROCESS_INFORMATION structure. +*** ../vim-7.3.275/src/version.c 2011-08-10 15:56:24.000000000 +0200 +--- src/version.c 2011-08-10 16:28:42.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 276, + /**/ + +-- +User: I'm having problems with my text editor. +Help desk: Which editor are you using? +User: I don't know, but it's version VI (pronounced: 6). +Help desk: Oh, then you should upgrade to version VIM (pronounced: 994). + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 0a96408132e566a2517e7d068131aedfed2e4f08 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:19 +0200 Subject: [PATCH 0455/3803] - patchlevel 277 --- 7.3.277 | 348 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 348 insertions(+) create mode 100644 7.3.277 diff --git a/7.3.277 b/7.3.277 new file mode 100644 index 00000000..3509a1a6 --- /dev/null +++ b/7.3.277 @@ -0,0 +1,348 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.277 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.277 +Problem: MS-Windows: some characters do not show in dialogs. +Solution: Use the wide methods when available. (Yanwei Jia) +Files: src/gui_w32.c, src/gui_w48.c, src/os_mswin.c, src/os_win32.c, + src/os_win32.h + + +*** ../vim-7.3.276/src/gui_w32.c 2011-08-10 15:56:24.000000000 +0200 +--- src/gui_w32.c 2011-08-10 16:52:55.000000000 +0200 +*************** +*** 1270,1275 **** +--- 1270,1294 ---- + pGetMonitorInfo = (TGetMonitorInfo)GetProcAddress(user32_lib, + "GetMonitorInfoA"); + } ++ ++ #ifdef FEAT_MBYTE ++ /* If the OS is Windows NT, use wide functions; ++ * this enables common dialogs input unicode from IME. */ ++ if (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT) ++ { ++ pDispatchMessage = DispatchMessageW; ++ pGetMessage = GetMessageW; ++ pIsDialogMessage = IsDialogMessageW; ++ pPeekMessage = PeekMessageW; ++ } ++ else ++ { ++ pDispatchMessage = DispatchMessageA; ++ pGetMessage = GetMessageA; ++ pIsDialogMessage = IsDialogMessageA; ++ pPeekMessage = PeekMessageA; ++ } ++ #endif + } + + /* +*** ../vim-7.3.276/src/gui_w48.c 2010-10-20 21:22:17.000000000 +0200 +--- src/gui_w48.c 2011-08-10 16:49:39.000000000 +0200 +*************** +*** 390,396 **** + KillTimer(NULL, idEvent); + + /* Eat spurious WM_TIMER messages */ +! while (PeekMessage(&msg, hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + + if (blink_state == BLINK_ON) +--- 390,396 ---- + KillTimer(NULL, idEvent); + + /* Eat spurious WM_TIMER messages */ +! while (pPeekMessage(&msg, hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + + if (blink_state == BLINK_ON) +*************** +*** 418,424 **** + { + KillTimer(NULL, blink_timer); + /* Eat spurious WM_TIMER messages */ +! while (PeekMessage(&msg, s_hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + blink_timer = 0; + } +--- 418,424 ---- + { + KillTimer(NULL, blink_timer); + /* Eat spurious WM_TIMER messages */ +! while (pPeekMessage(&msg, s_hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + blink_timer = 0; + } +*************** +*** 476,482 **** + s_timed_out = TRUE; + + /* Eat spurious WM_TIMER messages */ +! while (PeekMessage(&msg, hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + if (idEvent == s_wait_timer) + s_wait_timer = 0; +--- 476,482 ---- + s_timed_out = TRUE; + + /* Eat spurious WM_TIMER messages */ +! while (pPeekMessage(&msg, hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + if (idEvent == s_wait_timer) + s_wait_timer = 0; +*************** +*** 1707,1713 **** + static char_u k10[] = {K_SPECIAL, 'k', ';', 0}; + #endif + +! GetMessage(&msg, NULL, 0, 0); + + #ifdef FEAT_OLE + /* Look after OLE Automation commands */ +--- 1707,1713 ---- + static char_u k10[] = {K_SPECIAL, 'k', ';', 0}; + #endif + +! pGetMessage(&msg, NULL, 0, 0); + + #ifdef FEAT_OLE + /* Look after OLE Automation commands */ +*************** +*** 1718,1724 **** + { + /* Message can't be ours, forward it. Fixes problem with Ultramon + * 3.0.4 */ +! DispatchMessage(&msg); + } + else + { +--- 1718,1724 ---- + { + /* Message can't be ours, forward it. Fixes problem with Ultramon + * 3.0.4 */ +! pDispatchMessage(&msg); + } + else + { +*************** +*** 1749,1762 **** + if (msg.message == WM_USER) + { + MyTranslateMessage(&msg); +! DispatchMessage(&msg); + return; + } + #endif + + #ifdef MSWIN_FIND_REPLACE + /* Don't process messages used by the dialog */ +! if (s_findrep_hwnd != NULL && IsDialogMessage(s_findrep_hwnd, &msg)) + { + HandleMouseHide(msg.message, msg.lParam); + return; +--- 1749,1762 ---- + if (msg.message == WM_USER) + { + MyTranslateMessage(&msg); +! pDispatchMessage(&msg); + return; + } + #endif + + #ifdef MSWIN_FIND_REPLACE + /* Don't process messages used by the dialog */ +! if (s_findrep_hwnd != NULL && pIsDialogMessage(s_findrep_hwnd, &msg)) + { + HandleMouseHide(msg.message, msg.lParam); + return; +*************** +*** 1928,1934 **** + if (vk != VK_F10 || check_map(k10, State, FALSE, TRUE, FALSE, + NULL, NULL) == NULL) + #endif +! DispatchMessage(&msg); + } + + /* +--- 1928,1934 ---- + if (vk != VK_F10 || check_map(k10, State, FALSE, TRUE, FALSE, + NULL, NULL) == NULL) + #endif +! pDispatchMessage(&msg); + } + + /* +*************** +*** 1943,1949 **** + MSG msg; + + if (!s_busy_processing) +! while (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) + && !vim_is_input_buf_full()) + process_message(); + } +--- 1943,1949 ---- + MSG msg; + + if (!s_busy_processing) +! while (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) + && !vim_is_input_buf_full()) + process_message(); + } +*************** +*** 2019,2025 **** + KillTimer(NULL, s_wait_timer); + + /* Eat spurious WM_TIMER messages */ +! while (PeekMessage(&msg, s_hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + s_wait_timer = 0; + } +--- 2019,2025 ---- + KillTimer(NULL, s_wait_timer); + + /* Eat spurious WM_TIMER messages */ +! while (pPeekMessage(&msg, s_hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + s_wait_timer = 0; + } +*** ../vim-7.3.276/src/os_mswin.c 2011-06-19 01:30:01.000000000 +0200 +--- src/os_mswin.c 2011-08-10 16:45:24.000000000 +0200 +*************** +*** 1856,1867 **** + { + MSG msg; + +! while (!*bUserAbort && PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { +! if (!hDlgPrint || !IsDialogMessage(hDlgPrint, &msg)) + { + TranslateMessage(&msg); +! DispatchMessage(&msg); + } + } + return !*bUserAbort; +--- 1856,1867 ---- + { + MSG msg; + +! while (!*bUserAbort && pPeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { +! if (!hDlgPrint || !pIsDialogMessage(hDlgPrint, &msg)) + { + TranslateMessage(&msg); +! pDispatchMessage(&msg); + } + } + return !*bUserAbort; +*************** +*** 3132,3141 **** + { + MSG msg; + +! while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); +! DispatchMessage(&msg); + } + } + +--- 3132,3141 ---- + { + MSG msg; + +! while (pPeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); +! pDispatchMessage(&msg); + } + } + +*** ../vim-7.3.276/src/os_win32.c 2011-07-07 16:20:45.000000000 +0200 +--- src/os_win32.c 2011-08-10 16:54:50.000000000 +0200 +*************** +*** 152,157 **** +--- 152,165 ---- + # define wcsicmp(a, b) wcscmpi((a), (b)) + #endif + ++ /* Enable common dialogs input unicode from IME if posible. */ ++ #ifdef FEAT_MBYTE ++ LRESULT (WINAPI *pDispatchMessage)(LPMSG) = DispatchMessage; ++ BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT) = GetMessage; ++ BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG) = IsDialogMessage; ++ BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT) = PeekMessage; ++ #endif ++ + #ifndef FEAT_GUI_W32 + /* Win32 Console handles for input and output */ + static HANDLE g_hConIn = INVALID_HANDLE_VALUE; +*************** +*** 3284,3293 **** + { + MSG msg; + +! if (PeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); +! DispatchMessage(&msg); + } + if (WaitForSingleObject(pi.hProcess, delay) != WAIT_TIMEOUT) + break; +--- 3292,3301 ---- + { + MSG msg; + +! if (pPeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); +! pDispatchMessage(&msg); + } + if (WaitForSingleObject(pi.hProcess, delay) != WAIT_TIMEOUT) + break; +*** ../vim-7.3.276/src/os_win32.h 2011-05-05 18:31:54.000000000 +0200 +--- src/os_win32.h 2011-08-10 16:51:58.000000000 +0200 +*************** +*** 193,195 **** +--- 193,209 ---- + #else + # define vim_mkdir(x, y) mch_mkdir(x) + #endif ++ ++ /* Enable common dialogs input unicode from IME if posible. */ ++ #ifdef FEAT_MBYTE ++ /* The variables are defined in os_win32.c. */ ++ extern LRESULT (WINAPI *pDispatchMessage)(LPMSG); ++ extern BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT); ++ extern BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG); ++ extern BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT); ++ #else ++ # define pDispatchMessage DispatchMessage ++ # define pGetMessage GetMessage ++ # define pIsDialogMessage IsDialogMessage ++ # define pPeekMessage PeekMessage ++ #endif +*** ../vim-7.3.276/src/version.c 2011-08-10 16:31:18.000000000 +0200 +--- src/version.c 2011-08-10 17:06:55.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 277, + /**/ + +-- +Veni, Vidi, VW -- I came, I saw, I drove around in a little car. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 12a9174bdfcac20736c185699006de8667a9d91b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:19 +0200 Subject: [PATCH 0456/3803] - patchlevel 278 --- 7.3.278 | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 7.3.278 diff --git a/7.3.278 b/7.3.278 new file mode 100644 index 00000000..60bc0ac8 --- /dev/null +++ b/7.3.278 @@ -0,0 +1,73 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.278 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.278 +Problem: Passing the file name to open in VisVim doesn't work. +Solution: Adjust the index and check for end of buffer. (Jiri Sedlak) +Files: src/VisVim/Commands.cpp + + +*** ../vim-7.3.277/src/VisVim/Commands.cpp 2010-08-15 21:57:27.000000000 +0200 +--- src/VisVim/Commands.cpp 2011-08-10 17:21:27.000000000 +0200 +*************** +*** 549,555 **** + if (g_bNewTabs) + { + sprintf(VimCmd, ":tab drop "); +! s = VimCmd + 11; + } + else + { +--- 549,555 ---- + if (g_bNewTabs) + { + sprintf(VimCmd, ":tab drop "); +! s = VimCmd + 10; + } + else + { +*************** +*** 557,564 **** + s = VimCmd + 6; + } + sprintf(FileNameTmp, "%S", (char *)FileName); +! for (p = FileNameTmp; *p != '\0' && s < FileNameTmp + MAX_OLE_STR - 4; +! ++p) + if (*p == '\\') + *s++ = '/'; + else +--- 557,563 ---- + s = VimCmd + 6; + } + sprintf(FileNameTmp, "%S", (char *)FileName); +! for (p = FileNameTmp; *p != '\0' && s < VimCmd + MAX_OLE_STR - 4; ++p) + if (*p == '\\') + *s++ = '/'; + else +*** ../vim-7.3.277/src/version.c 2011-08-10 17:07:56.000000000 +0200 +--- src/version.c 2011-08-10 17:25:20.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 278, + /**/ + +-- +ARTHUR: But if he was dying, he wouldn't bother to carve + "Aaaaarrrrrrggghhh". He'd just say it. +BROTHER MAYNARD: It's down there carved in stone. +GALAHAD: Perhaps he was dictating. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 6d6f47cf2e98c139da0e342d506b5f562508fad1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:20 +0200 Subject: [PATCH 0457/3803] - patchlevel 279 --- 7.3.279 | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 7.3.279 diff --git a/7.3.279 b/7.3.279 new file mode 100644 index 00000000..6a8814b6 --- /dev/null +++ b/7.3.279 @@ -0,0 +1,118 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.279 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.279 +Problem: With GTK, when gvim is full-screen and a tab is opened and using a + specific monitor configuration the window is too big. +Solution: Adjust the window size like on MS-Windows. (Yukihiro Nakadaira) +Files: src/gui.c, src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro + + +*** ../vim-7.3.278/src/gui.c 2011-06-26 04:48:56.000000000 +0200 +--- src/gui.c 2011-08-10 17:40:31.000000000 +0200 +*************** +*** 1407,1413 **** + if (!gui.shell_created) + return; + +! #ifdef MSWIN + /* If not setting to a user specified size and maximized, calculate the + * number of characters that fit in the maximized window. */ + if (!mustset && gui_mch_maximized()) +--- 1407,1413 ---- + if (!gui.shell_created) + return; + +! #if defined(MSWIN) || defined(FEAT_GUI_GTK) + /* If not setting to a user specified size and maximized, calculate the + * number of characters that fit in the maximized window. */ + if (!mustset && gui_mch_maximized()) +*** ../vim-7.3.278/src/gui_gtk_x11.c 2011-06-26 04:48:56.000000000 +0200 +--- src/gui_gtk_x11.c 2011-08-10 17:42:19.000000000 +0200 +*************** +*** 3900,3905 **** +--- 3900,3920 ---- + } + + /* ++ * Called when the font changed while the window is maximized. Compute the ++ * new Rows and Columns. This is like resizing the window. ++ */ ++ void ++ gui_mch_newfont() ++ { ++ int w, h; ++ ++ gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h); ++ w -= get_menu_tool_width(); ++ h -= get_menu_tool_height(); ++ gui_resize_shell(w, h); ++ } ++ ++ /* + * Set the windows size. + */ + void +*************** +*** 4409,4422 **** + + if (gui_mch_maximized()) + { +- int w, h; +- + /* Update lines and columns in accordance with the new font, keep the + * window maximized. */ +! gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h); +! w -= get_menu_tool_width(); +! h -= get_menu_tool_height(); +! gui_resize_shell(w, h); + } + else + { +--- 4424,4432 ---- + + if (gui_mch_maximized()) + { + /* Update lines and columns in accordance with the new font, keep the + * window maximized. */ +! gui_mch_newfont(); + } + else + { +*** ../vim-7.3.278/src/proto/gui_gtk_x11.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_gtk_x11.pro 2011-08-10 17:42:29.000000000 +0200 +*************** +*** 20,25 **** +--- 20,26 ---- + void gui_mch_set_winpos __ARGS((int x, int y)); + int gui_mch_maximized __ARGS((void)); + void gui_mch_unmaximize __ARGS((void)); ++ void gui_mch_newfont __ARGS((void)); + void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction)); + void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h)); + void gui_mch_settitle __ARGS((char_u *title, char_u *icon)); +*** ../vim-7.3.278/src/version.c 2011-08-10 17:25:48.000000000 +0200 +--- src/version.c 2011-08-10 17:43:22.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 279, + /**/ + +-- +LAUNCELOT: Isn't there a St. Aaaaarrrrrrggghhh's in Cornwall? +ARTHUR: No, that's Saint Ives. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 846c6097aa0d1ce8a7c174f4c538aaa07d4bf7c1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:21 +0200 Subject: [PATCH 0458/3803] - patchlevel 280 --- 7.3.280 | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 7.3.280 diff --git a/7.3.280 b/7.3.280 new file mode 100644 index 00000000..1c1387ae --- /dev/null +++ b/7.3.280 @@ -0,0 +1,181 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.280 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.280 +Problem: ":lmake" does not update the quickfix window title. +Solution: Update the title. (Lech Lorens) +Files: src/quickfix.c, src/testdir/test10.in, src/testdir/test10.ok + + +*** ../vim-7.3.279/src/quickfix.c 2011-08-10 13:21:30.000000000 +0200 +--- src/quickfix.c 2011-08-10 18:09:19.000000000 +0200 +*************** +*** 126,131 **** +--- 126,132 ---- + static win_T *qf_find_win __ARGS((qf_info_T *qi)); + static buf_T *qf_find_buf __ARGS((qf_info_T *qi)); + static void qf_update_buffer __ARGS((qf_info_T *qi)); ++ static void qf_set_title __ARGS((qf_info_T *qi)); + static void qf_fill_buffer __ARGS((qf_info_T *qi)); + #endif + static char_u *get_mef_name __ARGS((void)); +*************** +*** 2388,2395 **** + qf_fill_buffer(qi); + + if (qi->qf_lists[qi->qf_curlist].qf_title != NULL) +! set_internal_string_var((char_u *)"w:quickfix_title", +! qi->qf_lists[qi->qf_curlist].qf_title); + + curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index; + curwin->w_cursor.col = 0; +--- 2389,2395 ---- + qf_fill_buffer(qi); + + if (qi->qf_lists[qi->qf_curlist].qf_title != NULL) +! qf_set_title(qi); + + curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index; + curwin->w_cursor.col = 0; +*************** +*** 2526,2531 **** +--- 2526,2533 ---- + qf_info_T *qi; + { + buf_T *buf; ++ win_T *win; ++ win_T *curwin_save; + aco_save_T aco; + + /* Check if a buffer for the quickfix list exists. Update it. */ +*************** +*** 2537,2542 **** +--- 2539,2554 ---- + + qf_fill_buffer(qi); + ++ if (qi->qf_lists[qi->qf_curlist].qf_title != NULL ++ && (win = qf_find_win(qi)) != NULL) ++ { ++ curwin_save = curwin; ++ curwin = win; ++ qf_set_title(qi); ++ curwin = curwin_save; ++ ++ } ++ + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + +*************** +*** 2544,2549 **** +--- 2556,2569 ---- + } + } + ++ static void ++ qf_set_title(qi) ++ qf_info_T *qi; ++ { ++ set_internal_string_var((char_u *)"w:quickfix_title", ++ qi->qf_lists[qi->qf_curlist].qf_title); ++ } ++ + /* + * Fill current buffer with quickfix errors, replacing any previous contents. + * curbuf must be the quickfix buffer! +*** ../vim-7.3.279/src/testdir/test10.in 2011-08-10 13:21:30.000000000 +0200 +--- src/testdir/test10.in 2011-08-10 18:28:31.000000000 +0200 +*************** +*** 5,13 **** + :" Also test a BOM is ignored. + :so mbyte.vim + :set encoding=utf-8 +! :/start of errorfile/,/end of errorfile/w! Xerrorfile + :/start of testfile/,/end of testfile/w! Xtestfile +! :cf Xerrorfile + rA + :cn + rB +--- 5,20 ---- + :" Also test a BOM is ignored. + :so mbyte.vim + :set encoding=utf-8 +! :7/start of errorfile/,/end of errorfile/w! Xerrorfile1 +! :7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2 + :/start of testfile/,/end of testfile/w! Xtestfile +! :cf Xerrorfile2 +! :clast +! :copen +! :let a=w:quickfix_title +! :wincmd p +! gR=a  +! :cf Xerrorfile1 + rA + :cn + rB +*************** +*** 17,22 **** +--- 24,34 ---- + rD + :cn + rE ++ :cn ++ :wincmd w ++ :let a=w:quickfix_title ++ :wincmd p ++ gR=a  + :w! test.out " Write contents of this file + :qa! + ENDTEST +*************** +*** 33,38 **** +--- 45,52 ---- + "Xtestfile", linenr 19: yet another problem + + Does anyone know what is the problem and how to correction it? ++ "Xtestfile", line 21 col 9: What is the title of the quickfix window? ++ "Xtestfile", line 22 col 9: What is the title of the quickfix window? + end of errorfile + + start of testfile +*** ../vim-7.3.279/src/testdir/test10.ok 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test10.ok 2011-08-10 18:03:53.000000000 +0200 +*************** +*** 18,23 **** + line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + Eine 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 22 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + end of testfile +--- 18,23 ---- + line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + Eine 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 21 :cf Xerrorfile1xxxxxxxxxxxxxxx +! line 22 :cf Xerrorfile2xxxxxxxxxxxxxxx + end of testfile +*** ../vim-7.3.279/src/version.c 2011-08-10 17:44:41.000000000 +0200 +--- src/version.c 2011-08-10 18:35:52.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 280, + /**/ + +-- +"When I die, I want a tombstone that says "GAME OVER" - Ton Richters + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From afbf38289001f7d0665b02264ec93046c91cae1e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:23 +0200 Subject: [PATCH 0459/3803] - patchlevel 281 --- 7.3.281 | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 7.3.281 diff --git a/7.3.281 b/7.3.281 new file mode 100644 index 00000000..f90e95e1 --- /dev/null +++ b/7.3.281 @@ -0,0 +1,134 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.281 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.281 +Problem: After using "expand('%:8')" the buffer name is changed. +Solution: Make a copy of the file name before shortening it. +Files: src/eval.c + + +*** ../vim-7.3.280/src/eval.c 2011-08-10 12:38:02.000000000 +0200 +--- src/eval.c 2011-08-17 15:12:39.000000000 +0200 +*************** +*** 23205,23210 **** +--- 23205,23211 ---- + int c; + int has_fullname = 0; + #ifdef WIN3264 ++ char_u *fname_start = *fnamep; + int has_shortname = 0; + #endif + +*************** +*** 23379,23402 **** + } + + #ifdef WIN3264 +! /* Check shortname after we have done 'heads' and before we do 'tails' + */ + if (has_shortname) + { +! pbuf = NULL; +! /* Copy the string if it is shortened by :h */ +! if (*fnamelen < (int)STRLEN(*fnamep)) + { + p = vim_strnsave(*fnamep, *fnamelen); +! if (p == 0) + return -1; + vim_free(*bufp); + *bufp = *fnamep = p; + } + + /* Split into two implementations - makes it easier. First is where +! * there isn't a full name already, second is where there is. +! */ + if (!has_fullname && !vim_isAbsName(*fnamep)) + { + if (shortpath_for_partial(fnamep, bufp, fnamelen) == FAIL) +--- 23380,23404 ---- + } + + #ifdef WIN3264 +! /* +! * Handle ":8" after we have done 'heads' and before we do 'tails'. + */ + if (has_shortname) + { +! /* Copy the string if it is shortened by :h and when it wasn't copied +! * yet, because we are going to change it in place. Avoids changing +! * the buffer name for "%:8". */ +! if (*fnamelen < (int)STRLEN(*fnamep) || *fnamep == fname_start) + { + p = vim_strnsave(*fnamep, *fnamelen); +! if (p == NULL) + return -1; + vim_free(*bufp); + *bufp = *fnamep = p; + } + + /* Split into two implementations - makes it easier. First is where +! * there isn't a full name already, second is where there is. */ + if (!has_fullname && !vim_isAbsName(*fnamep)) + { + if (shortpath_for_partial(fnamep, bufp, fnamelen) == FAIL) +*************** +*** 23404,23421 **** + } + else + { +! int l; + +! /* Simple case, already have the full-name + * Nearly always shorter, so try first time. */ +- l = *fnamelen; + if (get_short_pathname(fnamep, bufp, &l) == FAIL) + return -1; + + if (l == 0) + { +! /* Couldn't find the filename.. search the paths. +! */ + l = *fnamelen; + if (shortpath_for_invalid_fname(fnamep, bufp, &l) == FAIL) + return -1; +--- 23406,23421 ---- + } + else + { +! int l = *fnamelen; + +! /* Simple case, already have the full-name. + * Nearly always shorter, so try first time. */ + if (get_short_pathname(fnamep, bufp, &l) == FAIL) + return -1; + + if (l == 0) + { +! /* Couldn't find the filename, search the paths. */ + l = *fnamelen; + if (shortpath_for_invalid_fname(fnamep, bufp, &l) == FAIL) + return -1; +*** ../vim-7.3.280/src/version.c 2011-08-10 18:36:49.000000000 +0200 +--- src/version.c 2011-08-17 15:21:41.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 281, + /**/ + +-- +Kisses may last for as much as, but no more than, five minutes. + [real standing law in Iowa, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 71f22776e9f03e5cf3bcbababe47980fe66c6c5d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:24 +0200 Subject: [PATCH 0460/3803] - patchlevel 282 --- 7.3.282 | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 7.3.282 diff --git a/7.3.282 b/7.3.282 new file mode 100644 index 00000000..dcd16806 --- /dev/null +++ b/7.3.282 @@ -0,0 +1,60 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.282 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.282 +Problem: When using input() and :echo in a loop the displayed text is + incorrect. (Benjamin Fritz) +Solution: Only restore the cursor position when there is a command line. + (Ben Schmidt) +Files: src/ex_getln.c + + +*** ../vim-7.3.281/src/ex_getln.c 2011-07-27 17:58:42.000000000 +0200 +--- src/ex_getln.c 2011-08-17 15:57:39.000000000 +0200 +*************** +*** 1969,1976 **** + # endif + s = getcmdline(firstc, 1L, 0); + restore_cmdline(&save_ccline); +! /* Restore msg_col, the prompt from input() may have changed it. */ +! msg_col = msg_col_save; + + return s; + } +--- 1969,1980 ---- + # endif + s = getcmdline(firstc, 1L, 0); + restore_cmdline(&save_ccline); +! /* Restore msg_col, the prompt from input() may have changed it. +! * But only if called recursively and the commandline is therefore being +! * restored to an old one; if not, the input() prompt stays on the screen, +! * so we need its modified msg_col left intact. */ +! if (ccline.cmdbuff != NULL) +! msg_col = msg_col_save; + + return s; + } +*** ../vim-7.3.281/src/version.c 2011-08-17 15:23:16.000000000 +0200 +--- src/version.c 2011-08-17 16:24:04.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 282, + /**/ + +-- +Why don't cannibals eat clowns? +Because they taste funny. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From f91b62b24409b7b9af78a2912bf2a3f4fea2fadc Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:25 +0200 Subject: [PATCH 0461/3803] - patchlevel 283 --- 7.3.283 | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 7.3.283 diff --git a/7.3.283 b/7.3.283 new file mode 100644 index 00000000..1a3a6358 --- /dev/null +++ b/7.3.283 @@ -0,0 +1,114 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.283 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.283 +Problem: An expression mapping with a multi-byte character containing a + 0x80 byte gets messed up. (ZyX) +Solution: Unescape the expression before evaluating it (Yukihiro Nakadaira) +Files: src/getchar.c + + +*** ../vim-7.3.282/src/getchar.c 2011-04-28 17:30:05.000000000 +0200 +--- src/getchar.c 2011-08-17 17:04:38.000000000 +0200 +*************** +*** 3262,3270 **** + validate_maphash(); + + /* +! * find end of keys and skip CTRL-Vs (and backslashes) in it + * Accept backslash like CTRL-V when 'cpoptions' does not contain 'B'. +! * with :unmap white space is included in the keys, no argument possible + */ + p = keys; + do_backslash = (vim_strchr(p_cpo, CPO_BSLASH) == NULL); +--- 3262,3270 ---- + validate_maphash(); + + /* +! * Find end of keys and skip CTRL-Vs (and backslashes) in it. + * Accept backslash like CTRL-V when 'cpoptions' does not contain 'B'. +! * with :unmap white space is included in the keys, no argument possible. + */ + p = keys; + do_backslash = (vim_strchr(p_cpo, CPO_BSLASH) == NULL); +*************** +*** 4506,4517 **** +--- 4506,4528 ---- + { + char_u *res; + char_u *p; ++ char_u *expr; + char_u *save_cmd; + pos_T save_cursor; + ++ /* Remove escaping of CSI, because "str" is in a format to be used as ++ * typeahead. */ ++ expr = vim_strsave(str); ++ if (expr == NULL) ++ return NULL; ++ vim_unescape_csi(expr); ++ + save_cmd = save_cmdline_alloc(); + if (save_cmd == NULL) ++ { ++ vim_free(expr); + return NULL; ++ } + + /* Forbid changing text or using ":normal" to avoid most of the bad side + * effects. Also restore the cursor position. */ +*************** +*** 4521,4527 **** + #endif + set_vim_var_char(c); /* set v:char to the typed character */ + save_cursor = curwin->w_cursor; +! p = eval_to_string(str, NULL, FALSE); + --textlock; + #ifdef FEAT_EX_EXTRA + --ex_normal_lock; +--- 4532,4538 ---- + #endif + set_vim_var_char(c); /* set v:char to the typed character */ + save_cursor = curwin->w_cursor; +! p = eval_to_string(expr, NULL, FALSE); + --textlock; + #ifdef FEAT_EX_EXTRA + --ex_normal_lock; +*************** +*** 4529,4536 **** +--- 4540,4550 ---- + curwin->w_cursor = save_cursor; + + restore_cmdline_alloc(save_cmd); ++ vim_free(expr); ++ + if (p == NULL) + return NULL; ++ /* Escape CSI in the result to be able to use the string as typeahead. */ + res = vim_strsave_escape_csi(p); + vim_free(p); + +*** ../vim-7.3.282/src/version.c 2011-08-17 16:25:43.000000000 +0200 +--- src/version.c 2011-08-17 17:17:03.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 283, + /**/ + +-- +bashian roulette: +$ ((RANDOM%6)) || rm -rf ~ + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 005f84aee9fce84bb04792055a6466ef5617daa4 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:25 +0200 Subject: [PATCH 0462/3803] - patchlevel 284 --- 7.3.284 | 211 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 211 insertions(+) create mode 100644 7.3.284 diff --git a/7.3.284 b/7.3.284 new file mode 100644 index 00000000..c621ced6 --- /dev/null +++ b/7.3.284 @@ -0,0 +1,211 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.284 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.284 +Problem: The str2special() function doesn't handle multi-byte characters + properly. +Solution: Recognize multi-byte characters. (partly by Vladimir Vichniakov) +Files: src/getchar.c, src/message.c, src/misc2.c + + +*** ../vim-7.3.283/src/getchar.c 2011-08-17 17:18:14.000000000 +0200 +--- src/getchar.c 2011-08-17 20:11:58.000000000 +0200 +*************** +*** 3964,3970 **** + if (*mp->m_str == NUL) + msg_puts_attr((char_u *)"", hl_attr(HLF_8)); + else +! msg_outtrans_special(mp->m_str, FALSE); + #ifdef FEAT_EVAL + if (p_verbose > 0) + last_set_msg(mp->m_script_ID); +--- 3964,3980 ---- + if (*mp->m_str == NUL) + msg_puts_attr((char_u *)"", hl_attr(HLF_8)); + else +! { +! /* Remove escaping of CSI, because "m_str" is in a format to be used +! * as typeahead. */ +! char_u *s = vim_strsave(mp->m_str); +! if (s != NULL) +! { +! vim_unescape_csi(s); +! msg_outtrans_special(s, FALSE); +! vim_free(s); +! } +! } + #ifdef FEAT_EVAL + if (p_verbose > 0) + last_set_msg(mp->m_script_ID); +*** ../vim-7.3.283/src/message.c 2011-03-22 13:07:19.000000000 +0100 +--- src/message.c 2011-08-17 18:40:10.000000000 +0200 +*************** +*** 1547,1562 **** + if (IS_SPECIAL(c) || modifiers) /* special key */ + special = TRUE; + } +- *sp = str + 1; + + #ifdef FEAT_MBYTE +! /* For multi-byte characters check for an illegal byte. */ +! if (has_mbyte && MB_BYTE2LEN(*str) > (*mb_ptr2len)(str)) + { +! transchar_nonprint(buf, c); +! return buf; + } + #endif + + /* Make unprintable characters in <> form, also and . + * Use only for lhs of a mapping. */ +--- 1547,1573 ---- + if (IS_SPECIAL(c) || modifiers) /* special key */ + special = TRUE; + } + + #ifdef FEAT_MBYTE +! if (has_mbyte && !IS_SPECIAL(c)) + { +! int len = (*mb_ptr2len)(str); +! +! /* For multi-byte characters check for an illegal byte. */ +! if (has_mbyte && MB_BYTE2LEN(*str) > len) +! { +! transchar_nonprint(buf, c); +! *sp = str + 1; +! return buf; +! } +! /* Since 'special' is TRUE the multi-byte character 'c' will be +! * processed by get_special_key_name() */ +! c = (*mb_ptr2char)(str); +! *sp = str + len; + } ++ else + #endif ++ *sp = str + 1; + + /* Make unprintable characters in <> form, also and . + * Use only for lhs of a mapping. */ +*** ../vim-7.3.283/src/misc2.c 2011-07-27 17:31:42.000000000 +0200 +--- src/misc2.c 2011-08-17 20:27:30.000000000 +0200 +*************** +*** 2754,2759 **** +--- 2754,2760 ---- + int bit; + int key; + unsigned long n; ++ int l; + + src = *srcp; + if (src[0] != '<') +*************** +*** 2766,2773 **** + if (*bp == '-') + { + last_dash = bp; +! if (bp[1] != NUL && bp[2] == '>') +! ++bp; /* anything accepted, like */ + } + if (bp[0] == 't' && bp[1] == '_' && bp[2] && bp[3]) + bp += 3; /* skip t_xx, xx may be '-' or '>' */ +--- 2767,2783 ---- + if (*bp == '-') + { + last_dash = bp; +! if (bp[1] != NUL) +! { +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! l = mb_ptr2len(bp + 1); +! else +! #endif +! l = 1; +! if (bp[l + 1] == '>') +! bp += l; /* anything accepted, like */ +! } + } + if (bp[0] == 't' && bp[1] == '_' && bp[2] && bp[3]) + bp += 3; /* skip t_xx, xx may be '-' or '>' */ +*************** +*** 2777,2791 **** + { + end_of_name = bp + 1; + +- if (STRNICMP(src + 1, "char-", 5) == 0 && VIM_ISDIGIT(src[6])) +- { +- /* or or */ +- vim_str2nr(src + 6, NULL, NULL, TRUE, TRUE, NULL, &n); +- *modp = 0; +- *srcp = end_of_name; +- return (int)n; +- } +- + /* Which modifiers are given? */ + modifiers = 0x0; + for (bp = src + 1; bp < last_dash; bp++) +--- 2787,2792 ---- +*************** +*** 2804,2814 **** + */ + if (bp >= last_dash) + { + /* + * Modifier with single letter, or special key name. + */ +! if (modifiers != 0 && last_dash[2] == '>') +! key = last_dash[1]; + else + { + key = get_special_key_code(last_dash + 1); +--- 2805,2831 ---- + */ + if (bp >= last_dash) + { ++ if (STRNICMP(last_dash + 1, "char-", 5) == 0 ++ && VIM_ISDIGIT(last_dash[6])) ++ { ++ /* or or */ ++ vim_str2nr(last_dash + 6, NULL, NULL, TRUE, TRUE, NULL, &n); ++ *modp = modifiers; ++ *srcp = end_of_name; ++ return (int)n; ++ } ++ + /* + * Modifier with single letter, or special key name. + */ +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! l = mb_ptr2len(last_dash + 1); +! else +! #endif +! l = 1; +! if (modifiers != 0 && last_dash[l + 1] == '>') +! key = PTR2CHAR(last_dash + 1); + else + { + key = get_special_key_code(last_dash + 1); +*** ../vim-7.3.283/src/version.c 2011-08-17 17:18:14.000000000 +0200 +--- src/version.c 2011-08-17 20:27:47.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 284, + /**/ + +-- +Snoring is prohibited unless all bedroom windows are closed and securely +locked. + [real standing law in Massachusetts, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 4185d1ac1cb03e8889b03273e927445e6483dde2 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 29 Aug 2011 13:45:25 +0200 Subject: [PATCH 0463/3803] - patchlevel 285 --- 7.3.285 | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 7.3.285 diff --git a/7.3.285 b/7.3.285 new file mode 100644 index 00000000..24be28bc --- /dev/null +++ b/7.3.285 @@ -0,0 +1,144 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.285 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.285 (after 7.3.284) +Problem: Mapping no longer works. +Solution: Properly check for "char-". Add a test for it. +Files: src/misc2.c, src/testdir/test75.in, src/testdir/test75.ok + + +*** ../vim-7.3.284/src/misc2.c 2011-08-17 20:33:18.000000000 +0200 +--- src/misc2.c 2011-08-19 22:08:37.000000000 +0200 +*************** +*** 2781,2786 **** +--- 2781,2792 ---- + } + if (bp[0] == 't' && bp[1] == '_' && bp[2] && bp[3]) + bp += 3; /* skip t_xx, xx may be '-' or '>' */ ++ else if (STRNICMP(bp, "char-", 5) == 0) ++ { ++ vim_str2nr(bp + 5, NULL, &l, TRUE, TRUE, NULL, NULL); ++ bp += l + 5; ++ break; ++ } + } + + if (*bp == '>') /* found matching '>' */ +*************** +*** 2810,2836 **** + { + /* or or */ + vim_str2nr(last_dash + 6, NULL, NULL, TRUE, TRUE, NULL, &n); +! *modp = modifiers; +! *srcp = end_of_name; +! return (int)n; + } +- +- /* +- * Modifier with single letter, or special key name. +- */ +- #ifdef FEAT_MBYTE +- if (has_mbyte) +- l = mb_ptr2len(last_dash + 1); +- else +- #endif +- l = 1; +- if (modifiers != 0 && last_dash[l + 1] == '>') +- key = PTR2CHAR(last_dash + 1); + else + { +! key = get_special_key_code(last_dash + 1); +! if (!keep_x_key) +! key = handle_x_keys(key); + } + + /* +--- 2816,2842 ---- + { + /* or or */ + vim_str2nr(last_dash + 6, NULL, NULL, TRUE, TRUE, NULL, &n); +! key = (int)n; + } + else + { +! /* +! * Modifier with single letter, or special key name. +! */ +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! l = mb_ptr2len(last_dash + 1); +! else +! #endif +! l = 1; +! if (modifiers != 0 && last_dash[l + 1] == '>') +! key = PTR2CHAR(last_dash + 1); +! else +! { +! key = get_special_key_code(last_dash + 1); +! if (!keep_x_key) +! key = handle_x_keys(key); +! } + } + + /* +*** ../vim-7.3.284/src/testdir/test75.in 2010-10-20 21:22:17.000000000 +0200 +--- src/testdir/test75.in 2011-08-19 22:05:13.000000000 +0200 +*************** +*** 2,7 **** +--- 2,8 ---- + + STARTTEST + :so small.vim ++ :set cpo-=< + :" Test maparg() with a string result + :map foo isfoo + :vnoremap