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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// 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 /// diff --git a/README.patches b/README.patches index 61cdee8b..678dad30 100644 --- a/README.patches +++ b/README.patches @@ -81,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 d6693f1f..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,7 +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} @@ -785,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++;