| To: vim-dev@vim.org |
| Subject: patch 7.1.008 (correction |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Oops, forgot the src/version.c change. |
| |
| Patch 7.1.008 |
| Problem: getfsize() returns a negative number for very big files. |
| Solution: Check for overflow and return -2. |
| Files: runtime/doc/eval.txt, src/eval.c |
| |
| |
| |
| |
| |
| *** 1,4 **** |
| ! *eval.txt* For Vim version 7.1. Last change: 2007 May 11 |
| |
| |
| VIM REFERENCE MANUAL by Bram Moolenaar |
| --- 1,4 ---- |
| ! *eval.txt* For Vim version 7.1. Last change: 2007 Jun 09 |
| |
| |
| VIM REFERENCE MANUAL by Bram Moolenaar |
| |
| *** 2824,2829 **** |
| --- 2824,2831 ---- |
| given file {fname}. |
| If {fname} is a directory, 0 is returned. |
| If the file {fname} can't be found, -1 is returned. |
| + If the size of {fname} is too big to fit in a Number then -2 |
| + is returned. |
| |
| getfontname([{name}]) *getfontname()* |
| Without an argument returns the name of the normal font being |
| |
| |
| |
| *** 10136,10142 **** |
| --- 10136,10148 ---- |
| if (mch_isdir(fname)) |
| rettv->vval.v_number = 0; |
| else |
| + { |
| rettv->vval.v_number = (varnumber_T)st.st_size; |
| + |
| + /* non-perfect check for overflow */ |
| + if ((off_t)rettv->vval.v_number != (off_t)st.st_size) |
| + rettv->vval.v_number = -2; |
| + } |
| } |
| else |
| rettv->vval.v_number = -1; |
| |
| |
| |
| *** 668,669 **** |
| --- 668,671 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 8, |
| /**/ |
| |
| |
| -- |
| ZOOT: I'm afraid our life must seem very dull and quiet compared to yours. |
| We are but eightscore young blondes, all between sixteen and |
| nineteen-and-a-half, cut off in this castle, with no one to protect us. |
| Oooh. It is a lonely life ... bathing ... dressing ... undressing ... |
| making exciting underwear.... |
| "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ download, build and distribute -- http://www.A-A-P.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |