]> granicus.if.org Git - vim/commitdiff
updated for version 7.2-036 v7.2.036
authorBram Moolenaar <Bram@vim.org>
Wed, 12 Nov 2008 12:36:30 +0000 (12:36 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 12 Nov 2008 12:36:30 +0000 (12:36 +0000)
src/gui_riscos.c
src/gui_w48.c
src/os_vms.c
src/os_w32exe.c
src/os_win16.c
src/version.c

index 6adc8b77e3be7df3a9cacbfa80f95ecf6d5026b5..90634fad76c80c68af4bd58e4a272138b0349849 100644 (file)
@@ -695,7 +695,7 @@ gui_mch_set_winpos(int x, int y)
 gui_mch_set_shellsize(width, height, min_width, min_height, base_width, base_height, direction)
     int width;         /* In OS units */
     int height;
-    int min_width;     /* Smallest permissable window size (ignored) */
+    int min_width;     /* Smallest permissible window size (ignored) */
     int min_height;
     int base_width;    /* Space for scroll bars, etc */
     int base_height;
@@ -863,7 +863,7 @@ zap_load_file(name, style)
     if (strncmp(file, "ZapFont\015", 8) == 0)
        return file;    /* Loaded OK! */
 
-    free(file);
+    vim_free(file);
     return NULL;       /* Not a valid font file */
 }
 
index 8b96f2b9cc98e331b0dac2c1806c060882f3fc94..53dbad112b1a64292edf356da7aec6eb084be80c 100644 (file)
@@ -3335,7 +3335,7 @@ gui_mch_browseW(
 
 /*
  * Convert the string s to the proper format for a filter string by replacing
- * the \t and \n delimeters with \0.
+ * the \t and \n delimiters with \0.
  * Returns the converted string in allocated memory.
  *
  * Keep in sync with convert_filterW() above!
@@ -3674,7 +3674,8 @@ _OnScroll(
  * Use "prog" as the name of the program and "cmdline" as the arguments.
  * Copy the arguments to allocated memory.
  * Return the number of arguments (including program name).
- * Return pointers to the arguments in "argvp".
+ * Return pointers to the arguments in "argvp".  Memory is allocated with
+ * malloc(), use free() instead of vim_free().
  * Return pointer to buffer in "tofree".
  * Returns zero when out of memory.
  */
@@ -3692,6 +3693,8 @@ get_cmd_args(char *prog, char *cmdline, char ***argvp, char **tofree)
     char       **argv = NULL;
     int                round;
 
+    *tofree = NULL;
+
 #ifdef FEAT_MBYTE
     /* Try using the Unicode version first, it takes care of conversion when
      * 'encoding' is changed. */
@@ -3802,15 +3805,15 @@ get_cmd_args(char *prog, char *cmdline, char ***argvp, char **tofree)
            argv = (char **)malloc((argc + 1) * sizeof(char *));
            if (argv == NULL )
            {
-               vim_free(newcmdline);
+               free(newcmdline);
                return 0;                  /* malloc error */
            }
            pnew = newcmdline;
+           *tofree = newcmdline;
        }
     }
 
 done:
-
     argv[argc] = NULL;         /* NULL-terminated list */
     *argvp = argv;
     return argc;
index 76a15ce2f51f87adcf02a041c72f8cb76ed39c67..7954294b91b0c00c78085a8caec5a8968a7ddafb 100644 (file)
@@ -228,7 +228,7 @@ mch_getenv(char_u *lognam)
     else if ((sbuf = getenv((char *)lognam)))
     {
        lengte = strlen(sbuf) + 1;
-       cp = (char_u *)malloc((size_t)lengte);
+       cp = (char_u *)alloc((size_t)lengte);
        if (cp)
            strcpy((char *)cp, sbuf);
        return cp;
@@ -381,7 +381,7 @@ vms_wproc(char *name, int val)
     if (--vms_match_free == 0) {
        /* add more space to store matches */
        vms_match_alloced += EXPL_ALLOC_INC;
-       vms_fmatch = (char_u **)realloc(vms_fmatch,
+       vms_fmatch = (char_u **)vim_realloc(vms_fmatch,
                sizeof(char **) * vms_match_alloced);
        if (!vms_fmatch)
            return 0;
@@ -460,7 +460,7 @@ mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***file, i
            if (--files_free < 1)
            {
                files_alloced += EXPL_ALLOC_INC;
-               *file = (char_u **)realloc(*file,
+               *file = (char_u **)vim_realloc(*file,
                    sizeof(char_u **) * files_alloced);
                if (*file == NULL)
                {
@@ -614,14 +614,14 @@ vms_fixfilename(void *instring)
     {
        buflen = len + 128;
        if (buf)
-           buf = (char *)realloc(buf, buflen);
+           buf = (char *)vim_realloc(buf, buflen);
        else
-           buf = (char *)calloc(buflen, sizeof(char));
+           buf = (char *)alloc(buflen * sizeof(char));
     }
 
 #ifdef DEBUG
      char               *tmpbuf = NULL;
-     tmpbuf = (char *)calloc(buflen, sizeof(char));
+     tmpbuf = (char *)alloc(buflen * sizeof(char));
      strcpy(tmpbuf, instring);
 #endif
 
index 76f9332a65d4524081dda837c15d2bf8f2eb18e4..93a13899c21262984de1a86338f1c1da9f9dbbc1 100644 (file)
@@ -129,7 +129,8 @@ WinMain(
 errout:
 #endif
     free(argv);
-    free(tofree);
+    if (tofree != NULL)
+       free(tofree);
 #ifdef FEAT_MBYTE
     free_cmd_argsW();
 #endif
index 2afaddcba613a615028356374dda121726b0ec6a..1cf3ff8e93dfbde46e0bcda84fc6de82fd33362d 100644 (file)
@@ -121,7 +121,8 @@ WinMain(
     pmain(argc, argv);
 
     free(argv);
-    free(tofree);
+    if (tofree != NULL)
+       free(tofree);
 
     return 0;
 }
index b1049255b284f058e68e4e11c6b906eee5aceecb..3d68f7051f03447e4a017fe641bcfb3d71a6b985 100644 (file)
@@ -676,6 +676,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    36,
 /**/
     35,
 /**/