r930 - in /trunk/packages/vim: debian/ upstream/patches/
zack at users.alioth.debian.org
zack at users.alioth.debian.org
Tue May 1 12:54:17 UTC 2007
Author: zack
Date: Tue May 1 12:54:14 2007
New Revision: 930
URL: http://svn.debian.org/wsvn/pkg-vim/?sc=1&rev=930
Log:
new upstream patches...
Added:
trunk/packages/vim/upstream/patches/7.0.225
trunk/packages/vim/upstream/patches/7.0.226
trunk/packages/vim/upstream/patches/7.0.227
trunk/packages/vim/upstream/patches/7.0.228
trunk/packages/vim/upstream/patches/7.0.229
trunk/packages/vim/upstream/patches/7.0.230
trunk/packages/vim/upstream/patches/7.0.231
trunk/packages/vim/upstream/patches/7.0.232
trunk/packages/vim/upstream/patches/7.0.233
trunk/packages/vim/upstream/patches/7.0.234
trunk/packages/vim/upstream/patches/7.0.235
trunk/packages/vim/upstream/patches/7.0.236
Modified:
trunk/packages/vim/debian/README
trunk/packages/vim/debian/changelog
Modified: trunk/packages/vim/debian/README
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/README?rev=930&op=diff
==============================================================================
--- trunk/packages/vim/debian/README (original)
+++ trunk/packages/vim/debian/README Tue May 1 12:54:14 2007
@@ -255,3 +255,15 @@
4147 7.0.222 'cindent' works for Perl, except for recognizing comments
2604 7.0.223 popup menu could not handle unprintable characters
6467 7.0.224 when expanding "##" spaces are escaped twice
+ 2203 7.0.225 after setline() cursor may be on wrong byte of mulit-byte char
+ 1578 7.0.226 display flicker when setting sign through netbeans interface
+ 1720 7.0.227 crash when closing a window in the GUI
+ 1779 7.0.228 Cygwin: problem with symlink to DOS style path
+ 1806 7.0.229 if 'pt' starts with Esc then Insert mode Esc doesn't time out
+ 4586 7.0.230 a script doesn't know if the current dir is a local dir
+ 2628 7.0.231 recovery from a swap file may crash
+ 18671 7.0.232 (extra) Mac: GUI tab labels are not supported
+ 9738 7.0.233 (extra) Mac: code badly formatted
+ 1723 7.0.234 feedkeys() may be invoked from a modeline
+ 2299 7.0.235 writefile() may be invoked from a modeline
+ 6971 7.0.236 'maxmemtot' wrong, newer Linux sysinfo() uses mem_unit field
Modified: trunk/packages/vim/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/changelog?rev=930&op=diff
==============================================================================
--- trunk/packages/vim/debian/changelog (original)
+++ trunk/packages/vim/debian/changelog Tue May 1 12:54:14 2007
@@ -1,7 +1,7 @@
-vim (1:7.0-224+1) UNRELEASED; urgency=low
+vim (1:7.0-236+1) UNRELEASED; urgency=low
[ Debian Vim Maintainers ]
- * New upstream patches (220 - 224), see README.gz for details.
+ * New upstream patches (220 - 236), see README.gz for details.
[ James Vega ]
* patches/debchangelog.vim.diff:
@@ -11,7 +11,7 @@
folding of debchangelogs. 'foldexpr' and 'foldtext' will still be set
but 'foldmethod' will not be changed to 'expr'.
- -- James Vega <jamessan at debian.org> Tue, 10 Apr 2007 09:07:10 -0400
+ -- Stefano Zacchiroli <zack at debian.org> Tue, 01 May 2007 14:53:02 +0200
vim (1:7.0-219+1) unstable; urgency=low
Added: trunk/packages/vim/upstream/patches/7.0.225
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.225?rev=930&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.225 (added)
+++ trunk/packages/vim/upstream/patches/7.0.225 Tue May 1 12:54:14 2007
@@ -1,0 +1,75 @@
+To: vim-dev at vim.org
+Subject: patch 7.0.225
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.225
+Problem: When using setline() in an InsertEnter autocommand and doing "A"
+ the cursor ends up on the last byte in the line. (Yukihiro
+ Nakadaira)
+Solution: Only adjust the column when using setline() for the cursor line.
+ Move it back to the head byte if necessary.
+Files: src/eval.c, src/misc2.c
+
+
+*** ../vim-7.0.224/src/eval.c Tue Mar 27 16:57:54 2007
+--- src/eval.c Thu Apr 26 10:52:09 2007
+***************
+*** 14397,14403 ****
+ if (u_savesub(lnum) == OK && ml_replace(lnum, line, TRUE) == OK)
+ {
+ changed_bytes(lnum, 0);
+! check_cursor_col();
+ rettv->vval.v_number = 0; /* OK */
+ }
+ }
+--- 14411,14418 ----
+ if (u_savesub(lnum) == OK && ml_replace(lnum, line, TRUE) == OK)
+ {
+ changed_bytes(lnum, 0);
+! if (lnum == curwin->w_cursor.lnum)
+! check_cursor_col();
+ rettv->vval.v_number = 0; /* OK */
+ }
+ }
+*** ../vim-7.0.224/src/misc2.c Tue Feb 20 03:18:20 2007
+--- src/misc2.c Tue Mar 27 21:59:56 2007
+***************
+*** 516,522 ****
+--- 516,529 ----
+ || virtual_active())
+ curwin->w_cursor.col = len;
+ else
++ {
+ curwin->w_cursor.col = len - 1;
++ #ifdef FEAT_MBYTE
++ /* prevent cursor from moving on the trail byte */
++ if (has_mbyte)
++ mb_adjust_cursor();
++ #endif
++ }
+ }
+
+ #ifdef FEAT_VIRTUALEDIT
+*** ../vim-7.0.224/src/version.c Tue Mar 27 16:57:54 2007
+--- src/version.c Thu Apr 26 10:53:33 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 225,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+14. You start introducing yourself as "Jim at I-I-Net dot net dot au"
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ download, build and distribute -- http://www.A-A-P.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Added: trunk/packages/vim/upstream/patches/7.0.226
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.226?rev=930&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.226 (added)
+++ trunk/packages/vim/upstream/patches/7.0.226 Tue May 1 12:54:14 2007
@@ -1,0 +1,49 @@
+To: vim-dev at vim.org
+Subject: patch 7.0.226
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.226
+Problem: Display flickering when updating signs through the netbeans
+ interface. (Xavier de Gaye)
+Solution: Remove the redraw_later(CLEAR) call.
+Files: src/netbeans.c
+
+
+*** ../vim-7.0.225/src/netbeans.c Tue Nov 14 18:29:00 2006
+--- src/netbeans.c Sat Apr 21 18:14:00 2007
+***************
+*** 2143,2150 ****
+ coloncmd(":sign jump %d buffer=%d", serNum,
+ buf->bufp->b_fnum);
+ }
+- /* XXX only redraw what changed. */
+- redraw_later(CLEAR);
+ #endif
+ /* =====================================================================*/
+ }
+--- 2143,2148 ----
+*** ../vim-7.0.225/src/version.c Thu Apr 26 10:55:46 2007
+--- src/version.c Thu Apr 26 11:00:01 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 226,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+15. Your heart races faster and beats irregularly each time you see a new WWW
+ site address in print or on TV, even though you've never had heart
+ problems before.
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ download, build and distribute -- http://www.A-A-P.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Added: trunk/packages/vim/upstream/patches/7.0.227
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.227?rev=930&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.227 (added)
+++ trunk/packages/vim/upstream/patches/7.0.227 Tue May 1 12:54:14 2007
@@ -1,0 +1,62 @@
+To: vim-dev at vim.org
+Subject: patch 7.0.227
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.227
+Problem: Crash when closing a window in the GUI. (Charles Campbell)
+Solution: Don't call out_flush() from win_free().
+Files: src/window.c
+
+
+*** ../vim-7.0.226/src/window.c Sun Mar 11 15:53:27 2007
+--- src/window.c Wed Apr 18 22:31:52 2007
+***************
+*** 2084,2089 ****
+--- 2084,2096 ----
+ }
+ #endif
+
++ #ifdef FEAT_GUI
++ /* Avoid trouble with scrollbars that are going to be deleted in
++ * win_free(). */
++ if (gui.in_use)
++ out_flush();
++ #endif
++
+ /*
+ * Close the link to the buffer.
+ */
+***************
+*** 4174,4180 ****
+ #ifdef FEAT_GUI
+ if (gui.in_use)
+ {
+- out_flush();
+ gui_mch_destroy_scrollbar(&wp->w_scrollbars[SBAR_LEFT]);
+ gui_mch_destroy_scrollbar(&wp->w_scrollbars[SBAR_RIGHT]);
+ }
+--- 4181,4186 ----
+*** ../vim-7.0.226/src/version.c Thu Apr 26 11:01:16 2007
+--- src/version.c Thu Apr 26 16:09:30 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 227,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+16. You step out of your room and realize that your parents have moved and
+ you don't have a clue when it happened.
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ download, build and distribute -- http://www.A-A-P.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Added: trunk/packages/vim/upstream/patches/7.0.228
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.228?rev=930&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.228 (added)
+++ trunk/packages/vim/upstream/patches/7.0.228 Tue May 1 12:54:14 2007
@@ -1,0 +1,66 @@
+To: vim-dev at vim.org
+Subject: patch 7.0.228
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.228
+Problem: Cygwin: problem with symlink to DOS style path.
+Solution: Invoke cygwin_conv_to_posix_path(). (Luca Masini)
+Files: src/os_unix.c
+
+
+*** ../vim-7.0.227/src/os_unix.c Tue Mar 6 20:27:03 2007
+--- src/os_unix.c Mon Apr 23 22:27:16 2007
+***************
+*** 55,60 ****
+--- 55,66 ----
+ # endif
+ #endif
+
++ #ifdef __CYGWIN__
++ # ifndef WIN32
++ # include <sys/cygwin.h> /* for cygwin_conv_to_posix_path() */
++ # endif
++ #endif
++
+ #if defined(HAVE_SELECT)
+ extern int select __ARGS((int, fd_set *, fd_set *, fd_set *, struct timeval *));
+ #endif
+***************
+*** 2228,2233 ****
+--- 2258,2270 ----
+
+ #ifdef VMS
+ fname = vms_fixfilename(fname);
++ #endif
++
++ #ifdef __CYGWIN__
++ /*
++ * This helps for when "/etc/hosts" is a symlink to "c:/something/hosts".
++ */
++ cygwin_conv_to_posix_path(fname, fname);
+ #endif
+
+ /* expand it if forced or not an absolute path */
+*** ../vim-7.0.227/src/version.c Thu Apr 26 16:11:47 2007
+--- src/version.c Thu Apr 26 16:27:29 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 228,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+19. All of your friends have an @ in their names.
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ download, build and distribute -- http://www.A-A-P.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Added: trunk/packages/vim/upstream/patches/7.0.229
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.229?rev=930&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.229 (added)
+++ trunk/packages/vim/upstream/patches/7.0.229 Tue May 1 12:54:14 2007
@@ -1,0 +1,55 @@
+To: vim-dev at vim.org
+Subject: patch 7.0.229
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.229
+Problem: When 'pastetoggle' starts with Esc then pressing Esc in Insert
+ mode will not time out. (Jeffery Small)
+Solution: Use KL_PART_KEY instead of KL_PART_MAP, so that 'ttimeout' applies
+ to the 'pastetoggle' key.
+Files: src/getchar.c
+
+
+*** ../vim-7.0.228/src/getchar.c Sun Mar 4 21:25:44 2007
+--- src/getchar.c Thu Apr 19 22:13:37 2007
+***************
+*** 2183,2189 ****
+ }
+ /* Need more chars for partly match. */
+ if (mlen == typebuf.tb_len)
+! keylen = KL_PART_MAP;
+ else if (max_mlen < mlen)
+ /* no match, may have to check for termcode at
+ * next character */
+--- 2187,2193 ----
+ }
+ /* 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 */
+*** ../vim-7.0.228/src/version.c Thu Apr 26 16:28:43 2007
+--- src/version.c Thu Apr 26 16:48:59 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 229,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+20. When looking at a pageful of someone else's links, you notice all of them
+ are already highlighted in purple.
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ download, build and distribute -- http://www.A-A-P.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Added: trunk/packages/vim/upstream/patches/7.0.230
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.230?rev=930&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.230 (added)
+++ trunk/packages/vim/upstream/patches/7.0.230 Tue May 1 12:54:14 2007
@@ -1,0 +1,136 @@
+To: vim-dev at vim.org
+Subject: patch 7.0.230
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.230
+Problem: After using ":lcd" a script doesn't know how to restore the
+ current directory.
+Solution: Add the haslocaldir() function. (Bob Hiestand)
+Files: runtime/doc/usr_41.txt, runtime/doc/eval.txt, src/eval.c
+
+
+*** ../vim-7.0.229/runtime/doc/usr_41.txt Sun May 7 17:02:39 2006
+--- runtime/doc/usr_41.txt Thu Apr 26 17:06:48 2007
+***************
+*** 1,4 ****
+! *usr_41.txt* For Vim version 7.0. Last change: 2006 Apr 30
+
+ VIM USER MANUAL - by Bram Moolenaar
+
+--- 1,4 ----
+! *usr_41.txt* For Vim version 7.0. Last change: 2007 Apr 26
+
+ VIM USER MANUAL - by Bram Moolenaar
+
+***************
+*** 703,708 ****
+--- 703,709 ----
+ isdirectory() check if a directory exists
+ getfsize() get the size of a file
+ getcwd() get the current working directory
++ haslocaldir() check if current window used |:lcd|
+ tempname() get the name of a temporary file
+ mkdir() create a new directory
+ delete() delete a file
+*** ../vim-7.0.229/runtime/doc/eval.txt Tue Mar 27 10:20:58 2007
+--- runtime/doc/eval.txt Tue Apr 24 21:50:49 2007
+***************
+*** 1,4 ****
+! *eval.txt* For Vim version 7.0. Last change: 2006 Nov 01
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *eval.txt* For Vim version 7.0. Last change: 2007 Apr 24
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 1623,1628 ****
+--- 1633,1639 ----
+ globpath( {path}, {expr}) String do glob({expr}) for all dirs in {path}
+ has( {feature}) Number TRUE if feature {feature} supported
+ has_key( {dict}, {key}) Number TRUE if {dict} has entry {key}
++ haslocaldir() Number TRUE if current window executed |:lcd|
+ hasmapto( {what} [, {mode} [, {abbr}]])
+ Number TRUE if mapping to {what} exists
+ histadd( {history},{item}) String add an item to a history
+***************
+*** 3016,3021 ****
+--- 3041,3049 ----
+ The result is a Number, which is 1 if |Dictionary| {dict} has
+ an entry with key {key}. Zero otherwise.
+
++ haslocaldir() *haslocaldir()*
++ The result is a Number, which is 1 when the current
++ window has set a local path via |:lcd|, and 0 otherwise.
+
+ hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()*
+ The result is a Number, which is 1 if there is a mapping that
+*** ../vim-7.0.229/src/eval.c Thu Apr 26 10:55:46 2007
+--- src/eval.c Thu Apr 26 10:52:09 2007
+***************
+*** 541,546 ****
+--- 541,547 ----
+ static void f_globpath __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_has __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_has_key __ARGS((typval_T *argvars, typval_T *rettv));
++ static void f_haslocaldir __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_hasmapto __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_histadd __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_histdel __ARGS((typval_T *argvars, typval_T *rettv));
+***************
+*** 7110,7115 ****
+--- 7111,7117 ----
+ {"globpath", 2, 2, f_globpath},
+ {"has", 1, 1, f_has},
+ {"has_key", 2, 2, f_has_key},
++ {"haslocaldir", 0, 0, f_haslocaldir},
+ {"hasmapto", 1, 3, f_hasmapto},
+ {"highlightID", 1, 1, f_hlID}, /* obsolete */
+ {"highlight_exists",1, 1, f_hlexists}, /* obsolete */
+***************
+*** 11131,11136 ****
+--- 11133,11150 ----
+
+ rettv->vval.v_number = dict_find(argvars[0].vval.v_dict,
+ get_tv_string(&argvars[1]), -1) != NULL;
++ }
++
++ /*
++ * "haslocaldir()" function
++ */
++ /*ARGSUSED*/
++ static void
++ f_haslocaldir(argvars, rettv)
++ typval_T *argvars;
++ typval_T *rettv;
++ {
++ rettv->vval.v_number = (curwin->w_localdir != NULL);
+ }
+
+ /*
+*** ../vim-7.0.229/src/version.c Thu Apr 26 16:50:05 2007
+--- src/version.c Thu Apr 26 17:04:15 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 230,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+22. You've already visited all the links at Yahoo and you're halfway through
+ Lycos.
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ download, build and distribute -- http://www.A-A-P.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Added: trunk/packages/vim/upstream/patches/7.0.231
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.231?rev=930&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.231 (added)
+++ trunk/packages/vim/upstream/patches/7.0.231 Tue May 1 12:54:14 2007
@@ -1,0 +1,81 @@
+To: vim-dev at vim.org
+Subject: patch 7.0.231
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.231
+Problem: When recovering from a swap file the page size is likely to be
+ different from the minimum. The block used for the first page
+ then has a buffer of the wrong size, causing a crash when it's
+ reused later. (Zephaniah Hull)
+Solution: Reallocate the buffer when the page size changes. Also check that
+ the page size is at least the minimum value.
+Files: src/memline.c
+
+
+*** ../vim-7.0.230/src/memline.c Tue Mar 6 20:27:03 2007
+--- src/memline.c Thu Apr 19 16:10:39 2007
+***************
+*** 1015,1032 ****
+--- 1015,1053 ----
+ msg_end();
+ goto theend;
+ }
++
+ /*
+ * If we guessed the wrong page size, we have to recalculate the
+ * highest block number in the file.
+ */
+ if (mfp->mf_page_size != (unsigned)char_to_long(b0p->b0_page_size))
+ {
++ unsigned previous_page_size = mfp->mf_page_size;
++
+ mf_new_page_size(mfp, (unsigned)char_to_long(b0p->b0_page_size));
++ if (mfp->mf_page_size < previous_page_size)
++ {
++ msg_start();
++ msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST);
++ MSG_PUTS_ATTR(_(" has been damaged (page size is smaller than minimum value).\n"),
++ attr | MSG_HIST);
++ msg_end();
++ goto theend;
++ }
+ if ((size = lseek(mfp->mf_fd, (off_t)0L, SEEK_END)) <= 0)
+ mfp->mf_blocknr_max = 0; /* no file or empty file */
+ else
+ mfp->mf_blocknr_max = (blocknr_T)(size / mfp->mf_page_size);
+ mfp->mf_infile_count = mfp->mf_blocknr_max;
++
++ /* need to reallocate the memory used to store the data */
++ p = alloc(mfp->mf_page_size);
++ if (p == NULL)
++ goto theend;
++ mch_memmove(p, hp->bh_data, previous_page_size);
++ vim_free(hp->bh_data);
++ hp->bh_data = p;
++ b0p = (ZERO_BL *)(hp->bh_data);
+ }
+
+ /*
+*** ../vim-7.0.230/src/version.c Thu Apr 26 17:08:16 2007
+--- src/version.c Thu Apr 26 17:11:38 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 231,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+23. You can't call your mother...she doesn't have a modem.
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ download, build and distribute -- http://www.A-A-P.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Added: trunk/packages/vim/upstream/patches/7.0.232
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.232?rev=930&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.232 (added)
+++ trunk/packages/vim/upstream/patches/7.0.232 Tue May 1 12:54:14 2007
@@ -1,0 +1,593 @@
+To: vim-dev at vim.org
+Subject: patch 7.0.232 (extra)
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.232 (extra)
+Problem: Mac: doesn't support GUI tab page labels.
+Solution: Add GUI tab page labels. (Nicolas Weber)
+Files: src/feature.h, src/gui.c, src/gui.h, src/gui_mac.c,
+ src/proto/gui_mac.pro
+
+
+*** ../vim-7.0.231/src/feature.h Wed Nov 1 18:10:36 2006
+--- src/feature.h Thu Mar 15 19:02:15 2007
+***************
+*** 756,761 ****
+--- 756,762 ----
+ #if defined(FEAT_WINDOWS) && defined(FEAT_NORMAL) \
+ && (defined(FEAT_GUI_GTK) \
+ || (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \
++ || defined(FEAT_GUI_MAC) \
+ || (defined(FEAT_GUI_MSWIN) && (!defined(_MSC_VER) || _MSC_VER > 1020)))
+ # define FEAT_GUI_TABLINE
+ #endif
+*** ../vim-7.0.231/src/gui.c Tue Oct 10 17:36:50 2006
+--- src/gui.c Thu Mar 15 19:02:15 2007
+***************
+*** 1159,1165 ****
+ #endif
+
+ # if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
+! || defined(FEAT_GUI_MOTIF))
+ if (gui_has_tabline())
+ text_area_y += gui.tabline_height;
+ #endif
+--- 1159,1165 ----
+ #endif
+
+ # if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
+! || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_MAC))
+ if (gui_has_tabline())
+ text_area_y += gui.tabline_height;
+ #endif
+*** ../vim-7.0.231/src/gui.h Thu Apr 27 01:52:33 2006
+--- src/gui.h Thu Mar 15 19:02:15 2007
+***************
+*** 421,427 ****
+ #endif /* FEAT_GUI_GTK */
+
+ #if defined(FEAT_GUI_TABLINE) \
+! && (defined(FEAT_GUI_W32) || defined(FEAT_GUI_MOTIF))
+ int tabline_height;
+ #endif
+
+--- 425,432 ----
+ #endif /* FEAT_GUI_GTK */
+
+ #if defined(FEAT_GUI_TABLINE) \
+! && (defined(FEAT_GUI_W32) || defined(FEAT_GUI_MOTIF) \
+! || defined(FEAT_GUI_MAC))
+ int tabline_height;
+ #endif
+
+*** ../vim-7.0.231/src/gui_mac.c Thu Mar 8 20:39:02 2007
+--- src/gui_mac.c Fri Mar 16 11:26:05 2007
+***************
+*** 4,10 ****
+ * GUI/Motif support by Robert Webb
+ * Macintosh port by Dany St-Amant
+ * and Axel Kielhorn
+! * Port to MPW by Bernhard Prmmer
+ * Initial Carbon port by Ammon Skidmore
+ *
+ * Do ":help uganda" in Vim to read copying and usage conditions.
+--- 4,10 ----
+ * GUI/Motif support by Robert Webb
+ * Macintosh port by Dany St-Amant
+ * and Axel Kielhorn
+! * Port to MPW by Bernhard Pruemmer
+ * Initial Carbon port by Ammon Skidmore
+ *
+ * Do ":help uganda" in Vim to read copying and usage conditions.
+***************
+*** 260,265 ****
+--- 260,270 ----
+ OSErr HandleUnusedParms(const AppleEvent *theAEvent);
+ #endif
+
++ #ifdef FEAT_GUI_TABLINE
++ static void initialise_tabline(void);
++ static WindowRef drawer = NULL; // TODO: put into gui.h
++ #endif
++
+ /*
+ * ------------------------------------------------------------
+ * Conversion Utility
+***************
+*** 2357,2362 ****
+--- 2323,2335 ----
+
+ thePart = FindWindow(theEvent->where, &whichWindow);
+
++ #ifdef FEAT_GUI_TABLINE
++ /* prevent that the vim window size changes if it's activated by a
++ click into the tab pane */
++ if (whichWindow == drawer)
++ return;
++ #endif
++
+ switch (thePart)
+ {
+ case (inDesk):
+***************
+*** 3097,3102 ****
+--- 3070,3082 ----
+ #endif
+ */
+
++ #ifdef FEAT_GUI_TABLINE
++ /*
++ * Create the tabline
++ */
++ initialise_tabline();
++ #endif
++
+ /* TODO: Load bitmap if using TOOLBAR */
+ return OK;
+ }
+***************
+*** 5895,5901 ****
+ theCPB.dirInfo.ioFDirIndex = 0;
+ theCPB.dirInfo.ioNamePtr = file.name;
+ theCPB.dirInfo.ioVRefNum = file.vRefNum;
+! /*theCPB.hFileInfo.ioDirID = 0;*/
+ theCPB.dirInfo.ioDrDirID = file.parID;
+
+ /* As ioFDirIndex = 0, get the info of ioNamePtr,
+--- 5875,5881 ----
+ theCPB.dirInfo.ioFDirIndex = 0;
+ theCPB.dirInfo.ioNamePtr = file.name;
+ theCPB.dirInfo.ioVRefNum = file.vRefNum;
+! /*theCPB.hFileInfo.ioDirID = 0;*/
+ theCPB.dirInfo.ioDrDirID = file.parID;
+
+ /* As ioFDirIndex = 0, get the info of ioNamePtr,
+***************
+*** 6093,6096 ****
+--- 6073,6479 ----
+ return (script != smRoman
+ && script == GetScriptManagerVariable(smSysScript)) ? 1 : 0;
+ }
++
+ #endif /* defined(USE_IM_CONTROL) || defined(PROTO) */
++
++
++
++
++ #if defined(FEAT_GUI_TABLINE) || defined(PROTO)
++ // drawer implementation
++ static MenuRef contextMenu = NULL;
++ enum
++ {
++ kTabContextMenuId = 42,
++ };
++
++ // the caller has to CFRelease() the returned string
++ static CFStringRef
++ getTabLabel(tabpage_T *page)
++ {
++ get_tabline_label(page, FALSE);
++ #ifdef MACOS_CONVERT
++ return mac_enc_to_cfstring(NameBuff, STRLEN(NameBuff));
++ #else
++ // TODO: check internal encoding?
++ return CFStringCreateWithCString(kCFAllocatorDefault, (char *)NameBuff,
++ kCFStringEncodingMacRoman);
++ #endif
++ }
++
++
++ #define DRAWER_SIZE 150
++ #define DRAWER_INSET 16
++
++ static ControlRef dataBrowser = NULL;
++
++ // when the tabline is hidden, vim doesn't call update_tabline(). When
++ // the tabline is shown again, show_tabline() is called before upate_tabline(),
++ // and because of this, the tab labels and vims internal tabs are out of sync
++ // for a very short time. to prevent inconsistent state, we store the labels
++ // of the tabs, not pointers to the tabs (which are invalid for a short time).
++ static CFStringRef *tabLabels = NULL;
++ static int tabLabelsSize = 0;
++
++ enum
++ {
++ kTabsColumn = 'Tabs'
++ };
++
++ static int
++ getTabCount(void)
++ {
++ tabpage_T *tp;
++ int numTabs = 0;
++
++ for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
++ ++numTabs;
++ return numTabs;
++ }
++
++ // data browser item display callback
++ static OSStatus
++ dbItemDataCallback(ControlRef browser,
++ DataBrowserItemID itemID,
++ DataBrowserPropertyID property /* column id */,
++ DataBrowserItemDataRef itemData,
++ Boolean changeValue)
++ {
++ OSStatus status = noErr;
++
++ // assert(property == kTabsColumn); // why is this violated??
++
++ // changeValue is true if we have a modifieable list and data was changed.
++ // In our case, it's always false.
++ // (that is: if (changeValue) updateInternalData(); else return
++ // internalData();
++ if (!changeValue)
++ {
++ CFStringRef str;
++
++ assert(itemID - 1 >= 0 && itemID - 1 < tabLabelsSize);
++ str = tabLabels[itemID - 1];
++ status = SetDataBrowserItemDataText(itemData, str);
++ }
++ else
++ status = errDataBrowserPropertyNotSupported;
++
++ return status;
++ }
++
++ // data browser action callback
++ static void
++ dbItemNotificationCallback(ControlRef browser,
++ DataBrowserItemID item,
++ DataBrowserItemNotification message)
++ {
++ switch (message)
++ {
++ case kDataBrowserItemSelected:
++ send_tabline_event(item);
++ break;
++ }
++ }
++
++ // callbacks needed for contextual menu:
++ static void
++ dbGetContextualMenuCallback(ControlRef browser,
++ MenuRef *menu,
++ UInt32 *helpType,
++ CFStringRef *helpItemString,
++ AEDesc *selection)
++ {
++ // on mac os 9: kCMHelpItemNoHelp, but it's not the same
++ *helpType = kCMHelpItemRemoveHelp; // OS X only ;-)
++ *helpItemString = NULL;
++
++ *menu = contextMenu;
++ }
++
++ static void
++ dbSelectContextualMenuCallback(ControlRef browser,
++ MenuRef menu,
++ UInt32 selectionType,
++ SInt16 menuID,
++ MenuItemIndex menuItem)
++ {
++ if (selectionType == kCMMenuItemSelected)
++ {
++ MenuCommand command;
++ GetMenuItemCommandID(menu, menuItem, &command);
++
++ // get tab that was selected when the context menu appeared
++ // (there is always one tab selected). TODO: check if the context menu
++ // isn't opened on an item but on empty space (has to be possible some
++ // way, the finder does it too ;-) )
++ Handle items = NewHandle(0);
++ if (items != NULL)
++ {
++ int numItems;
++
++ GetDataBrowserItems(browser, kDataBrowserNoItem, false,
++ kDataBrowserItemIsSelected, items);
++ numItems = GetHandleSize(items) / sizeof(DataBrowserItemID);
++ if (numItems > 0)
++ {
++ int idx;
++ DataBrowserItemID *itemsPtr;
++
++ HLock(items);
++ itemsPtr = (DataBrowserItemID *)*items;
++ idx = itemsPtr[0];
++ HUnlock(items);
++ send_tabline_menu_event(idx, command);
++ }
++ DisposeHandle(items);
++ }
++ }
++ }
++
++ // focus callback of the data browser to always leave focus in vim
++ static OSStatus
++ dbFocusCallback(EventHandlerCallRef handler, EventRef event, void *data)
++ {
++ assert(GetEventClass(event) == kEventClassControl
++ && GetEventKind(event) == kEventControlSetFocusPart);
++
++ return paramErr;
++ }
++
++
++ // drawer callback to resize data browser to drawer size
++ static OSStatus
++ drawerCallback(EventHandlerCallRef handler, EventRef event, void *data)
++ {
++ switch (GetEventKind(event))
++ {
++ case kEventWindowBoundsChanged: // move or resize
++ {
++ UInt32 attribs;
++ GetEventParameter(event, kEventParamAttributes, typeUInt32,
++ NULL, sizeof(attribs), NULL, &attribs);
++ if (attribs & kWindowBoundsChangeSizeChanged) // resize
++ {
++ Rect r;
++ GetWindowBounds(drawer, kWindowContentRgn, &r);
++ SetRect(&r, 0, 0, r.right - r.left, r.bottom - r.top);
++ SetControlBounds(dataBrowser, &r);
++ SetDataBrowserTableViewNamedColumnWidth(dataBrowser,
++ kTabsColumn, r.right);
++ }
++ }
++ break;
++ }
++
++ return eventNotHandledErr;
++ }
++
++ // Load DataBrowserChangeAttributes() dynamically on tiger (and better).
++ // This way the code works on 10.2 and 10.3 as well (it doesn't have the
++ // blue highlights in the list view on these systems, though. Oh well.)
++
++
++ #import <mach-o/dyld.h>
++
++ enum { kMyDataBrowserAttributeListViewAlternatingRowColors = (1 << 1) };
++
++ static OSStatus
++ myDataBrowserChangeAttributes(ControlRef inDataBrowser,
++ OptionBits inAttributesToSet,
++ OptionBits inAttributesToClear)
++ {
++ long osVersion;
++ char *symbolName;
++ NSSymbol symbol = NULL;
++ OSStatus (*dataBrowserChangeAttributes)(ControlRef inDataBrowser,
++ OptionBits inAttributesToSet, OptionBits inAttributesToClear);
++
++ Gestalt(gestaltSystemVersion, &osVersion);
++ if (osVersion < 0x1040) // only supported for 10.4 (and up)
++ return noErr;
++
++ // C name mangling...
++ symbolName = "_DataBrowserChangeAttributes";
++ if (!NSIsSymbolNameDefined(symbolName)
++ || (symbol = NSLookupAndBindSymbol(symbolName)) == NULL)
++ return noErr;
++
++ dataBrowserChangeAttributes = NSAddressOfSymbol(symbol);
++ if (dataBrowserChangeAttributes == NULL)
++ return noErr; // well...
++ return dataBrowserChangeAttributes(inDataBrowser,
++ inAttributesToSet, inAttributesToClear);
++ }
++
++ static void
++ initialise_tabline(void)
++ {
++ Rect drawerRect = { 0, 0, 0, DRAWER_SIZE };
++ DataBrowserCallbacks dbCallbacks;
++ EventTypeSpec focusEvent = {kEventClassControl, kEventControlSetFocusPart};
++ EventTypeSpec resizeEvent = {kEventClassWindow, kEventWindowBoundsChanged};
++ DataBrowserListViewColumnDesc colDesc;
++
++ // drawers have to have compositing enabled
++ CreateNewWindow(kDrawerWindowClass,
++ kWindowStandardHandlerAttribute
++ | kWindowCompositingAttribute
++ | kWindowResizableAttribute
++ | kWindowLiveResizeAttribute,
++ &drawerRect, &drawer);
++
++ SetThemeWindowBackground(drawer, kThemeBrushDrawerBackground, true);
++ SetDrawerParent(drawer, gui.VimWindow);
++ SetDrawerOffsets(drawer, kWindowOffsetUnchanged, DRAWER_INSET);
++
++
++ // create list view embedded in drawer
++ CreateDataBrowserControl(drawer, &drawerRect, kDataBrowserListView,
++ &dataBrowser);
++
++ dbCallbacks.version = kDataBrowserLatestCallbacks;
++ InitDataBrowserCallbacks(&dbCallbacks);
++ dbCallbacks.u.v1.itemDataCallback =
++ NewDataBrowserItemDataUPP(dbItemDataCallback);
++ dbCallbacks.u.v1.itemNotificationCallback =
++ NewDataBrowserItemNotificationUPP(dbItemNotificationCallback);
++ dbCallbacks.u.v1.getContextualMenuCallback =
++ NewDataBrowserGetContextualMenuUPP(dbGetContextualMenuCallback);
++ dbCallbacks.u.v1.selectContextualMenuCallback =
++ NewDataBrowserSelectContextualMenuUPP(dbSelectContextualMenuCallback);
++
++ SetDataBrowserCallbacks(dataBrowser, &dbCallbacks);
++
++ SetDataBrowserListViewHeaderBtnHeight(dataBrowser, 0); // no header
++ SetDataBrowserHasScrollBars(dataBrowser, false, true); // only vertical
++ SetDataBrowserSelectionFlags(dataBrowser,
++ kDataBrowserSelectOnlyOne | kDataBrowserNeverEmptySelectionSet);
++ SetDataBrowserTableViewHiliteStyle(dataBrowser,
++ kDataBrowserTableViewFillHilite);
++ Boolean b = false;
++ SetControlData(dataBrowser, kControlEntireControl,
++ kControlDataBrowserIncludesFrameAndFocusTag, sizeof(b), &b);
++
++ // enable blue background in data browser (this is only in 10.4 and vim
++ // has to support older osx versions as well, so we have to load this
++ // function dynamically)
++ myDataBrowserChangeAttributes(dataBrowser,
++ kMyDataBrowserAttributeListViewAlternatingRowColors, 0);
++
++ // install callback that keeps focus in vim and away from the data browser
++ InstallControlEventHandler(dataBrowser, dbFocusCallback, 1, &focusEvent,
++ NULL, NULL);
++
++ // install callback that keeps data browser at the size of the drawer
++ InstallWindowEventHandler(drawer, drawerCallback, 1, &resizeEvent,
++ NULL, NULL);
++
++ // add "tabs" column to data browser
++ colDesc.propertyDesc.propertyID = kTabsColumn;
++ colDesc.propertyDesc.propertyType = kDataBrowserTextType;
++
++ // add if items can be selected (?): kDataBrowserListViewSelectionColumn
++ colDesc.propertyDesc.propertyFlags = kDataBrowserDefaultPropertyFlags;
++
++ colDesc.headerBtnDesc.version = kDataBrowserListViewLatestHeaderDesc;
++ colDesc.headerBtnDesc.minimumWidth = 100;
++ colDesc.headerBtnDesc.maximumWidth = 150;
++ colDesc.headerBtnDesc.titleOffset = 0;
++ colDesc.headerBtnDesc.titleString = CFSTR("Tabs");
++ colDesc.headerBtnDesc.initialOrder = kDataBrowserOrderIncreasing;
++ colDesc.headerBtnDesc.btnFontStyle.flags = 0; // use default font
++ colDesc.headerBtnDesc.btnContentInfo.contentType = kControlContentTextOnly;
++
++ AddDataBrowserListViewColumn(dataBrowser, &colDesc, 0);
++
++ // create tabline popup menu required by vim docs (see :he tabline-menu)
++ CreateNewMenu(kTabContextMenuId, 0, &contextMenu);
++ AppendMenuItemTextWithCFString(contextMenu, CFSTR("Close"), 0,
++ TABLINE_MENU_CLOSE, NULL);
++ AppendMenuItemTextWithCFString(contextMenu, CFSTR("New Tab"), 0,
++ TABLINE_MENU_NEW, NULL);
++ AppendMenuItemTextWithCFString(contextMenu, CFSTR("Open Tab..."), 0,
++ TABLINE_MENU_OPEN, NULL);
++ }
++
++
++ /*
++ * Show or hide the tabline.
++ */
++ void
++ gui_mch_show_tabline(int showit)
++ {
++ if (showit == 0)
++ CloseDrawer(drawer, true);
++ else
++ OpenDrawer(drawer, kWindowEdgeRight, true);
++ }
++
++ /*
++ * Return TRUE when tabline is displayed.
++ */
++ int
++ gui_mch_showing_tabline(void)
++ {
++ WindowDrawerState state = GetDrawerState(drawer);
++
++ return state == kWindowDrawerOpen || state == kWindowDrawerOpening;
++ }
++
++ /*
++ * Update the labels of the tabline.
++ */
++ void
++ gui_mch_update_tabline(void)
++ {
++ tabpage_T *tp;
++ int numTabs = getTabCount();
++ int nr = 1;
++ int curtabidx = 1;
++
++ // adjust data browser
++ if (tabLabels != NULL)
++ {
++ int i;
++
++ for (i = 0; i < tabLabelsSize; ++i)
++ CFRelease(tabLabels[i]);
++ free(tabLabels);
++ }
++ tabLabels = (CFStringRef *)malloc(numTabs * sizeof(CFStringRef));
++ tabLabelsSize = numTabs;
++
++ for (tp = first_tabpage; tp != NULL; tp = tp->tp_next, ++nr)
++ {
++ if (tp == curtab)
++ curtabidx = nr;
++ tabLabels[nr-1] = getTabLabel(tp);
++ }
++
++ RemoveDataBrowserItems(dataBrowser, kDataBrowserNoItem, 0, NULL,
++ kDataBrowserItemNoProperty);
++ // data browser uses ids 1, 2, 3, ... numTabs per default, so we
++ // can pass NULL for the id array
++ AddDataBrowserItems(dataBrowser, kDataBrowserNoItem, numTabs, NULL,
++ kDataBrowserItemNoProperty);
++
++ DataBrowserItemID item = curtabidx;
++ SetDataBrowserSelectedItems(dataBrowser, 1, &item, kDataBrowserItemsAssign);
++ }
++
++ /*
++ * Set the current tab to "nr". First tab is 1.
++ */
++ void
++ gui_mch_set_curtab(nr)
++ int nr;
++ {
++ DataBrowserItemID item = nr;
++ SetDataBrowserSelectedItems(dataBrowser, 1, &item, kDataBrowserItemsAssign);
++
++ // TODO: call something like this?: (or restore scroll position, or...)
++ RevealDataBrowserItem(dataBrowser, item, kTabsColumn,
++ kDataBrowserRevealOnly);
++ }
++
++ #endif // FEAT_GUI_TABLINE
+*** ../vim-7.0.231/src/proto/gui_mac.pro Tue Mar 28 23:01:02 2006
+--- src/proto/gui_mac.pro Thu Mar 15 20:23:42 2007
+***************
+*** 84,89 ****
+--- 84,93 ----
+ 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));
++ int gui_mch_showing_tabline __ARGS((void));
++ void gui_mch_update_tabline __ARGS((void));
++ void gui_mch_set_curtab __ARGS((int nr));
+
+ char_u *C2Pascal_save __ARGS((char_u *Cstring));
+ char_u *C2Pascal_save_and_remove_backslash __ARGS((char_u *Cstring));
+*** ../vim-7.0.231/src/version.c Thu Apr 26 17:23:28 2007
+--- src/version.c Thu Apr 26 18:17:42 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 232,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+24. You realize there is not a sound in the house and you have no idea where
+ your children are.
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ download, build and distribute -- http://www.A-A-P.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Added: trunk/packages/vim/upstream/patches/7.0.233
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.233?rev=930&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.233 (added)
+++ trunk/packages/vim/upstream/patches/7.0.233 Tue May 1 12:54:14 2007
@@ -1,0 +1,421 @@
+To: vim-dev at vim.org
+Subject: patch 7.0.233 (extra)
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.233 (extra)
+Problem: Mac: code formatted badly.
+Solution: Fix code formatting
+Files: src/gui_mac.c
+
+
+*** ../vim-7.0.232/src/gui_mac.c Thu Apr 26 18:22:12 2007
+--- src/gui_mac.c Fri Mar 16 11:26:05 2007
+***************
+*** 28,38 ****
+ *
+ */
+
+! /* TODO (Jussi)
+! * * Clipboard does not work (at least some cases)
+! * * ATSU font rendering has some problems
+! * * Investigate and remove dead code (there is still lots of that)
+! */
+
+ #include <Devices.h> /* included first to avoid CR problems */
+ #include "vim.h"
+--- 28,38 ----
+ *
+ */
+
+! /* TODO (Jussi)
+! * * Clipboard does not work (at least some cases)
+! * * ATSU font rendering has some problems
+! * * Investigate and remove dead code (there is still lots of that)
+! */
+
+ #include <Devices.h> /* included first to avoid CR problems */
+ #include "vim.h"
+***************
+*** 504,512 ****
+ /* Get number of files in list */
+ *error = AECountItems(theList, numFiles);
+ if (*error)
+! {
+! return(fnames);
+! }
+
+ /* Allocate the pointer list */
+ fnames = (char_u **) alloc(*numFiles * sizeof(char_u *));
+--- 504,510 ----
+ /* Get number of files in list */
+ *error = AECountItems(theList, numFiles);
+ if (*error)
+! return fnames;
+
+ /* Allocate the pointer list */
+ fnames = (char_u **) alloc(*numFiles * sizeof(char_u *));
+***************
+*** 526,532 ****
+ {
+ /* Caller is able to clean up */
+ /* TODO: Should be clean up or not? For safety. */
+! return(fnames);
+ }
+
+ /* Convert the FSSpec to a pathname */
+--- 524,530 ----
+ {
+ /* Caller is able to clean up */
+ /* TODO: Should be clean up or not? For safety. */
+! return fnames;
+ }
+
+ /* Convert the FSSpec to a pathname */
+***************
+*** 589,603 ****
+
+ error = AEGetParamPtr(theAEvent, keyDirectObject, typeChar, &typeCode, (Ptr) &SearchData, sizeof(WindowSearch), &actualSize);
+ if (error)
+! {
+! return(error);
+! }
+
+ error = HandleUnusedParms(theAEvent);
+ if (error)
+! {
+! return(error);
+! }
+
+ for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+ if (buf->b_ml.ml_mfp != NULL
+--- 587,597 ----
+
+ error = AEGetParamPtr(theAEvent, keyDirectObject, typeChar, &typeCode, (Ptr) &SearchData, sizeof(WindowSearch), &actualSize);
+ if (error)
+! return error;
+
+ error = HandleUnusedParms(theAEvent);
+ if (error)
+! return error;
+
+ for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+ if (buf->b_ml.ml_mfp != NULL
+***************
+*** 668,676 ****
+
+ error = HandleUnusedParms(theAEvent);
+ if (error)
+! {
+! return(error);
+! }
+
+ /* Send the reply */
+ /* replyObject.descriptorType = typeNull;
+--- 662,668 ----
+
+ error = HandleUnusedParms(theAEvent);
+ if (error)
+! return error;
+
+ /* Send the reply */
+ /* replyObject.descriptorType = typeNull;
+***************
+*** 679,687 ****
+ /* AECreateDesc(typeChar, (Ptr)&title[1], title[0], &data) */
+ error = AECreateList(nil, 0, false, &replyList);
+ if (error)
+! {
+! return(error);
+! }
+
+ #if 0
+ error = AECountItems(&replyList, &numFiles);
+--- 671,677 ----
+ /* AECreateDesc(typeChar, (Ptr)&title[1], title[0], &data) */
+ error = AECreateList(nil, 0, false, &replyList);
+ if (error)
+! return error;
+
+ #if 0
+ error = AECountItems(&replyList, &numFiles);
+***************
+*** 775,783 ****
+ error = AEGetParamPtr(theAEvent, keyDirectObject, typeChar, &typeCode, (Ptr) &GetTextData, sizeof(GetTextData), &actualSize);
+
+ if (error)
+! {
+! return(error);
+! }
+
+ for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+ if (buf->b_ml.ml_mfp != NULL)
+--- 765,771 ----
+ error = AEGetParamPtr(theAEvent, keyDirectObject, typeChar, &typeCode, (Ptr) &GetTextData, sizeof(GetTextData), &actualSize);
+
+ if (error)
+! return error;
+
+ for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+ if (buf->b_ml.ml_mfp != NULL)
+***************
+*** 826,837 ****
+ }
+
+ error = HandleUnusedParms(theAEvent);
+- if (error)
+- {
+- return(error);
+- }
+
+! return(error);
+ }
+
+ /*
+--- 814,821 ----
+ }
+
+ error = HandleUnusedParms(theAEvent);
+
+! return error;
+ }
+
+ /*
+***************
+*** 1017,1025 ****
+ /* the direct object parameter is the list of aliases to files (one or more) */
+ error = AEGetParamDesc(theAEvent, keyDirectObject, typeAEList, &theList);
+ if (error)
+! {
+! return(error);
+! }
+
+
+ error = AEGetParamPtr(theAEvent, keyAEPosition, typeChar, &typeCode, (Ptr) &thePosition, sizeof(SelectionRange), &actualSize);
+--- 1001,1007 ----
+ /* the direct object parameter is the list of aliases to files (one or more) */
+ error = AEGetParamDesc(theAEvent, keyDirectObject, typeAEList, &theList);
+ if (error)
+! return error;
+
+
+ error = AEGetParamPtr(theAEvent, keyAEPosition, typeChar, &typeCode, (Ptr) &thePosition, sizeof(SelectionRange), &actualSize);
+***************
+*** 1028,1036 ****
+ if (error == errAEDescNotFound)
+ error = noErr;
+ if (error)
+! {
+! return(error);
+! }
+
+ /*
+ error = AEGetParamDesc(theAEvent, keyAEPosition, typeChar, &thePosition);
+--- 1010,1016 ----
+ if (error == errAEDescNotFound)
+ error = noErr;
+ if (error)
+! return error;
+
+ /*
+ error = AEGetParamDesc(theAEvent, keyAEPosition, typeChar, &thePosition);
+***************
+*** 1134,1148 ****
+ /* Fake mouse event to wake from stall */
+ PostEvent(mouseUp, 0);
+
+! finished:
+ AEDisposeDesc(&theList); /* dispose what we allocated */
+
+ error = HandleUnusedParms(theAEvent);
+! if (error)
+! {
+! return(error);
+! }
+! return(error);
+ }
+
+ /*
+--- 1114,1124 ----
+ /* Fake mouse event to wake from stall */
+ PostEvent(mouseUp, 0);
+
+! finished:
+ AEDisposeDesc(&theList); /* dispose what we allocated */
+
+ error = HandleUnusedParms(theAEvent);
+! return error;
+ }
+
+ /*
+***************
+*** 1158,1169 ****
+ OSErr error = noErr;
+
+ error = HandleUnusedParms(theAEvent);
+! if (error)
+! {
+! return(error);
+! }
+!
+! return(error);
+ }
+
+ /*
+--- 1134,1140 ----
+ OSErr error = noErr;
+
+ error = HandleUnusedParms(theAEvent);
+! return error;
+ }
+
+ /*
+***************
+*** 1180,1193 ****
+
+ error = HandleUnusedParms(theAEvent);
+ if (error)
+! {
+! return(error);
+! }
+
+ /* Need to fake a :confirm qa */
+ do_cmdline_cmd((char_u *)"confirm qa");
+
+! return(error);
+ }
+
+ /*
+--- 1151,1162 ----
+
+ error = HandleUnusedParms(theAEvent);
+ if (error)
+! return error;
+
+ /* Need to fake a :confirm qa */
+ do_cmdline_cmd((char_u *)"confirm qa");
+
+! return error;
+ }
+
+ /*
+***************
+*** 1203,1214 ****
+ OSErr error = noErr;
+
+ error = HandleUnusedParms(theAEvent);
+- if (error)
+- {
+- return(error);
+- }
+
+! return(error);
+ }
+
+ /*
+--- 1172,1179 ----
+ OSErr error = noErr;
+
+ error = HandleUnusedParms(theAEvent);
+
+! return error;
+ }
+
+ /*
+***************
+*** 1225,1236 ****
+ OSErr error = noErr;
+
+ error = HandleUnusedParms(theAEvent);
+- if (error)
+- {
+- return(error);
+- }
+
+! return(error);
+ }
+
+
+--- 1190,1197 ----
+ OSErr error = noErr;
+
+ error = HandleUnusedParms(theAEvent);
+
+! return error;
+ }
+
+
+***************
+*** 2517,2523 ****
+
+ return noErr;
+
+! bail:
+ /*
+ * when we fail give any additional callback handler a chance to perform
+ * it's actions
+--- 2478,2484 ----
+
+ return noErr;
+
+! bail:
+ /*
+ * when we fail give any additional callback handler a chance to perform
+ * it's actions
+***************
+*** 2907,2913 ****
+ #endif
+
+ static OSErr
+! receiveHandler(WindowRef theWindow, void* handlerRefCon, DragRef theDrag)
+ {
+ int x, y;
+ int_u modifiers;
+--- 2868,2874 ----
+ #endif
+
+ static OSErr
+! receiveHandler(WindowRef theWindow, void *handlerRefCon, DragRef theDrag)
+ {
+ int x, y;
+ int_u modifiers;
+***************
+*** 4982,4988 ****
+ SetControl32BitMaximum (sb->id, max);
+ SetControl32BitMinimum (sb->id, 0);
+ SetControl32BitValue (sb->id, val);
+! SetControlViewSize (sb->id, size);
+ #ifdef DEBUG_MAC_SB
+ printf("thumb_sb (%x) %x, %x,%x\n",sb->id, val, size, max);
+ #endif
+--- 4943,4949 ----
+ SetControl32BitMaximum (sb->id, max);
+ SetControl32BitMinimum (sb->id, 0);
+ SetControl32BitValue (sb->id, val);
+! SetControlViewSize (sb->id, size);
+ #ifdef DEBUG_MAC_SB
+ printf("thumb_sb (%x) %x, %x,%x\n",sb->id, val, size, max);
+ #endif
+*** ../vim-7.0.232/src/version.c Thu Apr 26 18:22:12 2007
+--- src/version.c Thu Apr 26 18:41:08 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 233,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+25. You believe nothing looks sexier than a man in boxer shorts illuminated
+ only by a 17" inch svga monitor.
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ download, build and distribute -- http://www.A-A-P.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Added: trunk/packages/vim/upstream/patches/7.0.234
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.234?rev=930&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.234 (added)
+++ trunk/packages/vim/upstream/patches/7.0.234 Tue May 1 12:54:14 2007
@@ -1,0 +1,53 @@
+To: vim-dev at vim.org
+Subject: patch 7.0.234
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.234
+Problem: It's possible to use feedkeys() from a modeline. That is a
+ security issue, can be used for a trojan horse.
+Solution: Disallow using feedkeys() in the sandbox.
+Files: src/eval.c
+
+
+*** ../vim-7.0.233/src/eval.c Thu Apr 26 17:08:16 2007
+--- src/eval.c Fri Apr 27 21:48:18 2007
+***************
+*** 9078,9083 ****
+--- 9078,9089 ----
+ int typed = FALSE;
+ char_u *keys_esc;
+
++ /* This is not allowed in the sandbox. If the commands would still be
++ * executed in the sandbox it would be OK, but it probably happens later,
++ * when "sandbox" is no longer set. */
++ if (check_secure())
++ return;
++
+ rettv->vval.v_number = 0;
+ keys = get_tv_string(&argvars[0]);
+ if (*keys != NUL)
+*** ../vim-7.0.233/src/version.c Thu Apr 26 18:42:17 2007
+--- src/version.c Fri Apr 27 22:13:23 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 234,
+ /**/
+
+--
+"Making it up? Why should I want to make anything up? Life's bad enough
+as it is without wanting to invent any more of it."
+ -- Marvin, the Paranoid Android in Douglas Adams'
+ "The Hitchhiker's Guide to the Galaxy"
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ download, build and distribute -- http://www.A-A-P.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Added: trunk/packages/vim/upstream/patches/7.0.235
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.235?rev=930&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.235 (added)
+++ trunk/packages/vim/upstream/patches/7.0.235 Tue May 1 12:54:14 2007
@@ -1,0 +1,71 @@
+To: vim-dev at vim.org
+Subject: patch 7.0.235
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.235
+Problem: It is possible to use writefile() in the sandbox.
+Solution: Add a few more checks for the sandbox.
+Files: src/eval.c
+
+
+*** ../vim-7.0.234/src/eval.c Fri Apr 27 22:17:43 2007
+--- src/eval.c Sat Apr 28 21:36:02 2007
+***************
+*** 15598,15603 ****
+--- 15598,15606 ----
+ int err = FALSE;
+ FILE *fd;
+
++ if (check_restricted() || check_secure())
++ return;
++
+ if (argvars[1].v_type != VAR_UNKNOWN)
+ {
+ /*
+***************
+*** 16430,16435 ****
+--- 16433,16441 ----
+ char_u *s;
+ int ret = 0;
+ int c;
++
++ if (check_restricted() || check_secure())
++ return;
+
+ if (argvars[0].v_type != VAR_LIST)
+ {
+*** ../vim-7.0.234/src/version.c Fri Apr 27 22:17:43 2007
+--- src/version.c Sun Apr 29 13:54:29 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 235,
+ /**/
+
+--
+Now it is such a bizarrely improbable coincidence that anything as
+mind-bogglingly useful as the Babel fish could have evolved purely by chance
+that some thinkers have chosen to see it as a final and clinching proof of the
+NON-existence of God.
+The argument goes something like this: 'I refuse to prove that I exist,' says
+God, 'for proof denies faith, and without faith I am nothing.'
+'But,' says Man, 'the Babel fish is a dead giveaway, isn't it? It could not
+have evolved by chance. It proves you exist, and so therefore, by your own
+arguments, you don't. QED.'
+'Oh dear,' says God, 'I hadn't thought of that,' and promptly vanishes in a
+puff of logic.
+'Oh, that was easy,' says Man, and for an encore goes on to prove that black
+is white and gets himself killed on the next pedestrian crossing.
+ -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ download, build and distribute -- http://www.A-A-P.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Added: trunk/packages/vim/upstream/patches/7.0.236
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.0.236?rev=930&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.0.236 (added)
+++ trunk/packages/vim/upstream/patches/7.0.236 Tue May 1 12:54:14 2007
@@ -1,0 +1,274 @@
+To: vim-dev at vim.org
+Subject: patch 7.0.236
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.236
+Problem: Linux 2.4 uses sysinfo() with a mem_unit field, which is not
+ backwards compatible.
+Solution: Add an autoconf check for sysinfo.mem_unit. Let mch_total_mem()
+ return Kbyte to avoid overflow.
+Files: src/auto/configure, src/configure.in, src/config.h.in,
+ src/option.c, src/os_unix.c
+
+
+*** ../vim-7.0.235/src/auto/configure Tue Oct 17 11:50:45 2006
+--- src/auto/configure Thu Apr 26 16:44:07 2007
+***************
+*** 13685,13690 ****
+--- 13685,13746 ----
+
+ echo "$as_me:$LINENO: result: not usable" >&5
+ echo "${ECHO_T}not usable" >&6
++ fi
++ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++ echo "$as_me:$LINENO: checking for sysinfo.mem_unit" >&5
++ echo $ECHO_N "checking for sysinfo.mem_unit... $ECHO_C" >&6
++ cat >conftest.$ac_ext <<_ACEOF
++ /* confdefs.h. */
++ _ACEOF
++ cat confdefs.h >>conftest.$ac_ext
++ cat >>conftest.$ac_ext <<_ACEOF
++ /* end confdefs.h. */
++ #include <sys/types.h>
++ #include <sys/sysinfo.h>
++ int
++ main ()
++ {
++ struct sysinfo sinfo;
++ sinfo.mem_unit = 1;
++
++ ;
++ return 0;
++ }
++ _ACEOF
++ rm -f conftest.$ac_objext
++ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ echo "$as_me:$LINENO: result: yes" >&5
++ echo "${ECHO_T}yes" >&6; cat >>confdefs.h <<\_ACEOF
++ #define HAVE_SYSINFO_MEM_UNIT 1
++ _ACEOF
++
++ else
++ echo "$as_me: failed program was:" >&5
++ sed 's/^/| /' conftest.$ac_ext >&5
++
++ echo "$as_me:$LINENO: result: no" >&5
++ echo "${ECHO_T}no" >&6
+ fi
+ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+*** ../vim-7.0.235/src/configure.in Tue Oct 17 11:50:45 2006
+--- src/configure.in Thu Apr 26 16:40:18 2007
+***************
+*** 2589,2594 ****
+--- 2589,2605 ----
+ ],
+ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO),
+ AC_MSG_RESULT(not usable))
++
++ dnl struct sysinfo may have the mem_unit field or not
++ AC_MSG_CHECKING(for sysinfo.mem_unit)
++ AC_TRY_COMPILE(
++ [#include <sys/types.h>
++ #include <sys/sysinfo.h>],
++ [ struct sysinfo sinfo;
++ sinfo.mem_unit = 1;
++ ],
++ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_MEM_UNIT),
++ AC_MSG_RESULT(no))
+
+ dnl sysconf() may exist but not support what we want to use
+ AC_MSG_CHECKING(for sysconf)
+*** ../vim-7.0.235/src/config.h.in Fri Apr 21 00:11:09 2006
+--- src/config.h.in Thu Apr 26 16:40:34 2007
+***************
+*** 176,181 ****
+--- 176,182 ----
+ #undef HAVE_SYSCONF
+ #undef HAVE_SYSCTL
+ #undef HAVE_SYSINFO
++ #undef HAVE_SYSINFO_MEM_UNIT
+ #undef HAVE_TGETENT
+ #undef HAVE_TOWLOWER
+ #undef HAVE_TOWUPPER
+*** ../vim-7.0.235/src/option.c Fri Mar 2 20:00:06 2007
+--- src/option.c Tue May 1 13:26:10 2007
+***************
+*** 3030,3036 ****
+ #else
+ # ifdef HAVE_TOTAL_MEM
+ /* Use amount of memory available to Vim. */
+! n = (mch_total_mem(FALSE) >> 11);
+ # else
+ n = (0x7fffffff >> 11);
+ # endif
+--- 3030,3036 ----
+ #else
+ # ifdef HAVE_TOTAL_MEM
+ /* Use amount of memory available to Vim. */
+! n = (mch_total_mem(FALSE) >> 1);
+ # else
+ n = (0x7fffffff >> 11);
+ # endif
+*** ../vim-7.0.235/src/os_unix.c Thu Apr 26 16:28:43 2007
+--- src/os_unix.c Thu Apr 26 16:37:43 2007
+***************
+*** 428,435 ****
+ # endif
+
+ /*
+! * Return total amount of memory available. Doesn't change when memory has
+! * been allocated.
+ */
+ /* ARGSUSED */
+ long_u
+--- 428,435 ----
+ # endif
+
+ /*
+! * Return total amount of memory available in Kbyte.
+! * Doesn't change when memory has been allocated.
+ */
+ /* ARGSUSED */
+ long_u
+***************
+*** 437,445 ****
+ int special;
+ {
+ # ifdef __EMX__
+! return ulimit(3, 0L); /* always 32MB? */
+ # else
+ long_u mem = 0;
+
+ # ifdef HAVE_SYSCTL
+ int mib[2], physmem;
+--- 437,446 ----
+ int special;
+ {
+ # ifdef __EMX__
+! return ulimit(3, 0L) >> 10; /* always 32MB? */
+ # else
+ long_u mem = 0;
++ long_u shiftright = 10; /* how much to shift "mem" right for Kbyte */
+
+ # ifdef HAVE_SYSCTL
+ int mib[2], physmem;
+***************
+*** 460,466 ****
+--- 461,479 ----
+
+ /* Linux way of getting amount of RAM available */
+ if (sysinfo(&sinfo) == 0)
++ {
++ # ifdef HAVE_SYSINFO_MEM_UNIT
++ /* avoid overflow as much as possible */
++ while (shiftright > 0 && (sinfo.mem_unit & 1) == 0)
++ {
++ sinfo.mem_unit = sinfo.mem_unit >> 1;
++ --shiftright;
++ }
++ mem = sinfo.totalram * sinfo.mem_unit;
++ # else
+ mem = sinfo.totalram;
++ # endif
++ }
+ }
+ # endif
+
+***************
+*** 473,479 ****
+--- 486,500 ----
+ pagesize = sysconf(_SC_PAGESIZE);
+ pagecount = sysconf(_SC_PHYS_PAGES);
+ if (pagesize > 0 && pagecount > 0)
++ {
++ /* avoid overflow as much as possible */
++ while (shiftright > 0 && (pagesize & 1) == 0)
++ {
++ pagesize = pagesize >> 1;
++ --shiftright;
++ }
+ mem = (long_u)pagesize * pagecount;
++ }
+ }
+ # endif
+
+***************
+*** 488,502 ****
+ # ifdef RLIM_INFINITY
+ && rlp.rlim_cur != RLIM_INFINITY
+ # endif
+! && (long_u)rlp.rlim_cur < mem
+ )
+! return (long_u)rlp.rlim_cur;
+ }
+ # endif
+
+ if (mem > 0)
+! return mem;
+! return (long_u)0x7fffffff;
+ # endif
+ }
+ #endif
+--- 509,526 ----
+ # ifdef RLIM_INFINITY
+ && rlp.rlim_cur != RLIM_INFINITY
+ # endif
+! && ((long_u)rlp.rlim_cur >> 10) < (mem >> shiftright)
+ )
+! {
+! mem = (long_u)rlp.rlim_cur;
+! shiftright = 10;
+! }
+ }
+ # endif
+
+ if (mem > 0)
+! return mem >> shiftright;
+! return (long_u)0x1fffff;
+ # endif
+ }
+ #endif
+*** ../vim-7.0.235/src/version.c Sun Apr 29 13:55:43 2007
+--- src/version.c Tue May 1 13:32:44 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 236,
+ /**/
+
+--
+A day without sunshine is like, well, night.
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ download, build and distribute -- http://www.A-A-P.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
More information about the pkg-vim-maintainers
mailing list