home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unreleased / patches / 5.6a.019 < prev    next >
Encoding:
Internet Message Format  |  2000-01-09  |  1.7 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 5.6a.19
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.6a.019
  8. Problem:    When trying to recover through NFS, which uses a large block size,
  9.         Vim might think the swap file is empty, because mf_blocknr_max is
  10.         zero.  (Scott McDermott)
  11. Solution:   When computing the number of blocks of the file in mf_open(),
  12.         round up instead of down.
  13. Files:        src/memfile.c
  14.  
  15.  
  16. *** ../vim-5.6a.18/src/memfile.c    Mon Dec 20 09:59:15 1999
  17. --- src/memfile.c    Mon Jan 10 21:22:11 2000
  18. ***************
  19. *** 185,191 ****
  20.                 || (size = lseek(mfp->mf_fd, (off_t)0L, SEEK_END)) <= 0)
  21.       mfp->mf_blocknr_max = 0;    /* no file or empty file */
  22.       else
  23. !     mfp->mf_blocknr_max = (blocknr_t)(size / mfp->mf_page_size);
  24.       mfp->mf_blocknr_min = -1;
  25.       mfp->mf_neg_count = 0;
  26.       mfp->mf_infile_count = mfp->mf_blocknr_max;
  27. --- 185,192 ----
  28.                 || (size = lseek(mfp->mf_fd, (off_t)0L, SEEK_END)) <= 0)
  29.       mfp->mf_blocknr_max = 0;    /* no file or empty file */
  30.       else
  31. !     mfp->mf_blocknr_max = (blocknr_t)((size + mfp->mf_page_size - 1)
  32. !                              / mfp->mf_page_size);
  33.       mfp->mf_blocknr_min = -1;
  34.       mfp->mf_neg_count = 0;
  35.       mfp->mf_infile_count = mfp->mf_blocknr_max;
  36. *** ../vim-5.6a.18/src/version.c    Sat Jan  8 23:13:04 2000
  37. --- src/version.c    Mon Jan 10 21:26:18 2000
  38. ***************
  39. *** 420,421 ****
  40. --- 420,423 ----
  41.   {   /* Add new patch number below this line */
  42. + /**/
  43. +     19,
  44.   /**/
  45.  
  46. -- 
  47. hundred-and-one symptoms of being an internet addict:
  48. 97. Your mother tells you to remember something, and you look for
  49.     a File/Save command.
  50.  
  51. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
  52.   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /
  53.