]> git.pld-linux.org Git - packages/vim.git/blame - 7.2.057
- new
[packages/vim.git] / 7.2.057
CommitLineData
65bfde4c
AG
1To: vim-dev@vim.org
2Subject: Patch 7.2.057
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.2.057 (after 7.2.056)
11Problem: Combination of int and size_t may not work.
12Solution: Use size_t for variable.
13Files: src/spell.c
14
15
16*** ../vim-7.2.056/src/spell.c Sat Nov 29 20:10:59 2008
17--- src/spell.c Sat Nov 29 20:15:43 2008
18***************
19*** 7926,7932 ****
20 char_u *p;
21 int rr;
22 int retval = OK;
23! int fwv = 1; /* collect return value of fwrite() to avoid
24 warnings from picky compiler */
25
26 fd = mch_fopen((char *)fname, "w");
27--- 8028,8034 ----
28 char_u *p;
29 int rr;
30 int retval = OK;
31! size_t fwv = 1; /* collect return value of fwrite() to avoid
32 warnings from picky compiler */
33
34 fd = mch_fopen((char *)fname, "w");
35***************
36*** 7939,7944 ****
37--- 8041,8050 ----
38 /* <HEADER>: <fileID> <versionnr> */
39 /* <fileID> */
40 fwv &= fwrite(VIMSPELLMAGIC, VIMSPELLMAGICL, (size_t)1, fd);
41+ if (fwv != (size_t)1)
42+ /* Catch first write error, don't try writing more. */
43+ goto theend;
44+
45 putc(VIMSPELLVERSION, fd); /* <versionnr> */
46
47 /*
48***************
49*** 8300,8310 ****
50 /* Write another byte to check for errors (file system full). */
51 if (putc(0, fd) == EOF)
52 retval = FAIL;
53!
54 if (fclose(fd) == EOF)
55 retval = FAIL;
56
57! if (fwv != 1)
58 retval = FAIL;
59 if (retval == FAIL)
60 EMSG(_(e_write));
61--- 8406,8416 ----
62 /* Write another byte to check for errors (file system full). */
63 if (putc(0, fd) == EOF)
64 retval = FAIL;
65! theend:
66 if (fclose(fd) == EOF)
67 retval = FAIL;
68
69! if (fwv != (size_t)1)
70 retval = FAIL;
71 if (retval == FAIL)
72 EMSG(_(e_write));
73***************
74*** 9897,9903 ****
75 char_u *p;
76 int len;
77 int totlen;
78! int x = 1; /* collect return value of fwrite() */
79
80 if (fd != NULL)
81 put_bytes(fd, (long_u)gap->ga_len, 2); /* <prefcondcnt> */
82--- 10003,10009 ----
83 char_u *p;
84 int len;
85 int totlen;
86! size_t x = 1; /* collect return value of fwrite() */
87
88 if (fd != NULL)
89 put_bytes(fd, (long_u)gap->ga_len, 2); /* <prefcondcnt> */
90*** ../vim-7.2.056/src/version.c Sat Nov 29 20:10:59 2008
91--- src/version.c Sat Nov 29 20:13:46 2008
92***************
93*** 678,679 ****
94--- 678,681 ----
95 { /* Add new patch number below this line */
96+ /**/
97+ 57,
98 /**/
99
100--
101GUARD #1: What -- a swallow carrying a coconut?
102ARTHUR: It could grip it by the husk!
103GUARD #1: It's not a question of where he grips it! It's a simple question
104 of weight ratios! A five ounce bird could not carry a 1 pound
105 coconut.
106 The Quest for the Holy Grail (Monty Python)
107
108 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
109/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
110\\\ download, build and distribute -- http://www.A-A-P.org ///
111 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.064514 seconds and 4 git commands to generate.