home *** CD-ROM | disk | FTP | other *** search
- To: vim-dev@vim.org
- Subject: Patch 6.2.146
- Fcc: outbox
- From: Bram Moolenaar <Bram@moolenaar.net>
- Mime-Version: 1.0
- Content-Type: text/plain; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
- ------------
-
- Patch 6.2.146
- Problem: On some systems the prototype for iconv() is wrong, causing a
- warning message.
- Solution: Use a cast (void *) to avoid the warning. (Charles Campbell)
- Files: src/fileio.c, src/mbyte.c
-
-
- *** ../vim-6.2.145/src/fileio.c Sun Nov 2 15:27:37 2003
- --- src/fileio.c Fri Nov 7 13:16:55 2003
- ***************
- *** 1255,1261 ****
- * If there is conversion error or not enough room try using
- * another conversion.
- */
- ! if ((iconv(iconv_fd, &fromp, &from_size, &top, &to_size)
- == (size_t)-1 && ICONV_ERRNO != ICONV_EINVAL)
- || from_size > CONV_RESTLEN)
- goto rewind_retry;
- --- 1255,1261 ----
- * If there is conversion error or not enough room try using
- * another conversion.
- */
- ! if ((iconv(iconv_fd, (void *)&fromp, &from_size, &top, &to_size)
- == (size_t)-1 && ICONV_ERRNO != ICONV_EINVAL)
- || from_size > CONV_RESTLEN)
- goto rewind_retry;
- ***************
- *** 4447,4453 ****
- /*
- * If iconv() has an error or there is not enough room, fail.
- */
- ! if ((iconv(ip->bw_iconv_fd, &from, &fromlen, &to, &tolen)
- == (size_t)-1 && ICONV_ERRNO != ICONV_EINVAL)
- || fromlen > CONV_RESTLEN)
- {
- --- 4447,4453 ----
- /*
- * If iconv() has an error or there is not enough room, fail.
- */
- ! if ((iconv(ip->bw_iconv_fd, (void *)&from, &fromlen, &to, &tolen)
- == (size_t)-1 && ICONV_ERRNO != ICONV_EINVAL)
- || fromlen > CONV_RESTLEN)
- {
- *** ../vim-6.2.145/src/mbyte.c Sun Oct 12 17:02:40 2003
- --- src/mbyte.c Fri Nov 7 13:15:35 2003
- ***************
- *** 2881,2887 ****
-
- to = (char *)result + done;
- tolen = len - done - 2;
- ! if (iconv(fd, &from, &fromlen, &to, &tolen) != (size_t)-1)
- {
- /* Finished, append a NUL. */
- *to = NUL;
- --- 2881,2889 ----
-
- to = (char *)result + done;
- tolen = len - done - 2;
- ! /* Avoid a warning for systems with a wrong iconv() prototype by
- ! * casting the second argument to void *. */
- ! if (iconv(fd, (void *)&from, &fromlen, &to, &tolen) != (size_t)-1)
- {
- /* Finished, append a NUL. */
- *to = NUL;
- *** ../vim-6.2.145/src/version.c Wed Nov 5 10:32:28 2003
- --- src/version.c Sun Nov 9 19:54:39 2003
- ***************
- *** 639,640 ****
- --- 639,642 ----
- { /* Add new patch number below this line */
- + /**/
- + 146,
- /**/
-
- --
- Are leaders born or made? And if they're made, can we return them under
- warranty?
- (Scott Adams - The Dilbert principle)
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
- /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
- \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
-