]> granicus.if.org Git - vim/commitdiff
updated for version 7.2-057 v7.2.057
authorBram Moolenaar <Bram@vim.org>
Sat, 29 Nov 2008 19:19:19 +0000 (19:19 +0000)
committerBram Moolenaar <Bram@vim.org>
Sat, 29 Nov 2008 19:19:19 +0000 (19:19 +0000)
src/spell.c
src/version.c

index 058f7d68c4b8c81e5b63e55f23047b5f8d4419ea..8c9a89184a4709ba1d0157ab7c416a32944c2354 100644 (file)
@@ -7926,7 +7926,7 @@ write_vim_spell(spin, fname)
     char_u     *p;
     int                rr;
     int                retval = OK;
-    int                fwv = 1;  /* collect return value of fwrite() to avoid
+    size_t     fwv = 1;  /* collect return value of fwrite() to avoid
                             warnings from picky compiler */
 
     fd = mch_fopen((char *)fname, "w");
@@ -7939,6 +7939,10 @@ write_vim_spell(spin, fname)
     /* <HEADER>: <fileID> <versionnr> */
                                                            /* <fileID> */
     fwv &= fwrite(VIMSPELLMAGIC, VIMSPELLMAGICL, (size_t)1, fd);
+    if (fwv != (size_t)1)
+       /* Catch first write error, don't try writing more. */
+       goto theend;
+
     putc(VIMSPELLVERSION, fd);                             /* <versionnr> */
 
     /*
@@ -8300,11 +8304,11 @@ write_vim_spell(spin, fname)
     /* Write another byte to check for errors (file system full). */
     if (putc(0, fd) == EOF)
        retval = FAIL;
-
+theend:
     if (fclose(fd) == EOF)
        retval = FAIL;
 
-    if (fwv != 1)
+    if (fwv != (size_t)1)
        retval = FAIL;
     if (retval == FAIL)
        EMSG(_(e_write));
@@ -9897,7 +9901,7 @@ write_spell_prefcond(fd, gap)
     char_u     *p;
     int                len;
     int                totlen;
-    int                x = 1;  /* collect return value of fwrite() */
+    size_t     x = 1;  /* collect return value of fwrite() */
 
     if (fd != NULL)
        put_bytes(fd, (long_u)gap->ga_len, 2);      /* <prefcondcnt> */
index bba1c7c6e6dc7dd077def59b6a9546cd52eba684..7929ff0a4906e066fcd35ec56fc3ad4298fb4fb5 100644 (file)
@@ -676,6 +676,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    57,
 /**/
     56,
 /**/