]>
Commit | Line | Data |
---|---|---|
eb0ac1ae AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.2.146 | |
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.2.146 | |
11 | Problem: On some systems the prototype for iconv() is wrong, causing a | |
12 | warning message. | |
13 | Solution: Use a cast (void *) to avoid the warning. (Charles Campbell) | |
14 | Files: src/fileio.c, src/mbyte.c | |
15 | ||
16 | ||
17 | *** ../vim-6.2.145/src/fileio.c Sun Nov 2 15:27:37 2003 | |
18 | --- src/fileio.c Fri Nov 7 13:16:55 2003 | |
19 | *************** | |
20 | *** 1255,1261 **** | |
21 | * If there is conversion error or not enough room try using | |
22 | * another conversion. | |
23 | */ | |
24 | ! if ((iconv(iconv_fd, &fromp, &from_size, &top, &to_size) | |
25 | == (size_t)-1 && ICONV_ERRNO != ICONV_EINVAL) | |
26 | || from_size > CONV_RESTLEN) | |
27 | goto rewind_retry; | |
28 | --- 1255,1261 ---- | |
29 | * If there is conversion error or not enough room try using | |
30 | * another conversion. | |
31 | */ | |
32 | ! if ((iconv(iconv_fd, (void *)&fromp, &from_size, &top, &to_size) | |
33 | == (size_t)-1 && ICONV_ERRNO != ICONV_EINVAL) | |
34 | || from_size > CONV_RESTLEN) | |
35 | goto rewind_retry; | |
36 | *************** | |
37 | *** 4447,4453 **** | |
38 | /* | |
39 | * If iconv() has an error or there is not enough room, fail. | |
40 | */ | |
41 | ! if ((iconv(ip->bw_iconv_fd, &from, &fromlen, &to, &tolen) | |
42 | == (size_t)-1 && ICONV_ERRNO != ICONV_EINVAL) | |
43 | || fromlen > CONV_RESTLEN) | |
44 | { | |
45 | --- 4447,4453 ---- | |
46 | /* | |
47 | * If iconv() has an error or there is not enough room, fail. | |
48 | */ | |
49 | ! if ((iconv(ip->bw_iconv_fd, (void *)&from, &fromlen, &to, &tolen) | |
50 | == (size_t)-1 && ICONV_ERRNO != ICONV_EINVAL) | |
51 | || fromlen > CONV_RESTLEN) | |
52 | { | |
53 | *** ../vim-6.2.145/src/mbyte.c Sun Oct 12 17:02:40 2003 | |
54 | --- src/mbyte.c Fri Nov 7 13:15:35 2003 | |
55 | *************** | |
56 | *** 2881,2887 **** | |
57 | ||
58 | to = (char *)result + done; | |
59 | tolen = len - done - 2; | |
60 | ! if (iconv(fd, &from, &fromlen, &to, &tolen) != (size_t)-1) | |
61 | { | |
62 | /* Finished, append a NUL. */ | |
63 | *to = NUL; | |
64 | --- 2881,2889 ---- | |
65 | ||
66 | to = (char *)result + done; | |
67 | tolen = len - done - 2; | |
68 | ! /* Avoid a warning for systems with a wrong iconv() prototype by | |
69 | ! * casting the second argument to void *. */ | |
70 | ! if (iconv(fd, (void *)&from, &fromlen, &to, &tolen) != (size_t)-1) | |
71 | { | |
72 | /* Finished, append a NUL. */ | |
73 | *to = NUL; | |
74 | *** ../vim-6.2.145/src/version.c Wed Nov 5 10:32:28 2003 | |
75 | --- src/version.c Sun Nov 9 19:54:39 2003 | |
76 | *************** | |
77 | *** 639,640 **** | |
78 | --- 639,642 ---- | |
79 | { /* Add new patch number below this line */ | |
80 | + /**/ | |
81 | + 146, | |
82 | /**/ | |
83 | ||
84 | -- | |
85 | Are leaders born or made? And if they're made, can we return them under | |
86 | warranty? | |
87 | (Scott Adams - The Dilbert principle) | |
88 | ||
89 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
90 | /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ | |
91 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
92 | \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// |