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 / patches / 6.1.210 < prev    next >
Encoding:
Internet Message Format  |  2002-10-06  |  2.0 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.210
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.210
  11. Problem:    When there is an iconv() conversion error when reading a file
  12.         there can be an error the next time iconv() is used.
  13. Solution:   Reset the state of the iconv() descriptor. (Yasuhiro Matsumoto)
  14. Files:        src/fileio.c
  15.  
  16.  
  17. *** ../vim61.209/src/fileio.c    Mon Sep 16 21:53:32 2002
  18. --- src/fileio.c    Sun Oct  6 20:32:06 2002
  19. ***************
  20. *** 1178,1183 ****
  21. --- 1179,1185 ----
  22.           char        *top;
  23.           size_t        from_size;
  24.           size_t        to_size;
  25. +         size_t        ret;
  26.   
  27.           fromp = (char *)ptr;
  28.           from_size = size;
  29. ***************
  30. *** 1189,1196 ****
  31.            * If there is conversion error or not enough room try using
  32.            * another conversion.
  33.            */
  34. !         if ((iconv(iconv_fd, &fromp, &from_size, &top, &to_size)
  35. !                 == (size_t)-1 && ICONV_ERRNO != EINVAL)
  36.                             || from_size > CONV_RESTLEN)
  37.               goto rewind_retry;
  38.   
  39. --- 1191,1201 ----
  40.            * If there is conversion error or not enough room try using
  41.            * another conversion.
  42.            */
  43. !         ret = iconv(iconv_fd, &fromp, &from_size, &top, &to_size);
  44. !         if (ret == (size_t)-1)
  45. !             /* need to reset the state after an error */
  46. !             (void)iconv(iconv_fd, NULL, NULL, NULL, NULL);
  47. !         if ((ret == (size_t)-1 && ICONV_ERRNO != EINVAL)
  48.                             || from_size > CONV_RESTLEN)
  49.               goto rewind_retry;
  50.   
  51. *** ../vim61.209/src/version.c    Sun Oct  6 18:30:28 2002
  52. --- src/version.c    Mon Oct  7 20:06:51 2002
  53. ***************
  54. *** 608,609 ****
  55. --- 608,611 ----
  56.   {   /* Add new patch number below this line */
  57. + /**/
  58. +     210,
  59.   /**/
  60.  
  61. -- 
  62. We are the Borg of GNU GPL.  We will assimilate your source code.
  63.  
  64.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  65. ///          Creator of Vim - Vi IMproved -- http://www.vim.org          \\\
  66. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  67.  \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
  68.