Skip to content

Commit

Permalink
updated for version 7.2-036
Browse files Browse the repository at this point in the history
  • Loading branch information
vimboss committed Nov 12, 2008
1 parent 81a5c6d commit a57ecd4
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/gui_riscos.c
Expand Up @@ -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) gui_mch_set_shellsize(width, height, min_width, min_height, base_width, base_height, direction)
int width; /* In OS units */ int width; /* In OS units */
int height; int height;
int min_width; /* Smallest permissable window size (ignored) */ int min_width; /* Smallest permissible window size (ignored) */
int min_height; int min_height;
int base_width; /* Space for scroll bars, etc */ int base_width; /* Space for scroll bars, etc */
int base_height; int base_height;
Expand Down Expand Up @@ -863,7 +863,7 @@ zap_load_file(name, style)
if (strncmp(file, "ZapFont\015", 8) == 0) if (strncmp(file, "ZapFont\015", 8) == 0)
return file; /* Loaded OK! */ return file; /* Loaded OK! */


free(file); vim_free(file);
return NULL; /* Not a valid font file */ return NULL; /* Not a valid font file */
} }


Expand Down
11 changes: 7 additions & 4 deletions src/gui_w48.c
Expand Up @@ -3335,7 +3335,7 @@ gui_mch_browseW(


/* /*
* Convert the string s to the proper format for a filter string by replacing * 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. * Returns the converted string in allocated memory.
* *
* Keep in sync with convert_filterW() above! * Keep in sync with convert_filterW() above!
Expand Down Expand Up @@ -3674,7 +3674,8 @@ _OnScroll(
* Use "prog" as the name of the program and "cmdline" as the arguments. * Use "prog" as the name of the program and "cmdline" as the arguments.
* Copy the arguments to allocated memory. * Copy the arguments to allocated memory.
* Return the number of arguments (including program name). * 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". * Return pointer to buffer in "tofree".
* Returns zero when out of memory. * Returns zero when out of memory.
*/ */
Expand All @@ -3692,6 +3693,8 @@ get_cmd_args(char *prog, char *cmdline, char ***argvp, char **tofree)
char **argv = NULL; char **argv = NULL;
int round; int round;


*tofree = NULL;

#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
/* Try using the Unicode version first, it takes care of conversion when /* Try using the Unicode version first, it takes care of conversion when
* 'encoding' is changed. */ * 'encoding' is changed. */
Expand Down Expand Up @@ -3802,15 +3805,15 @@ get_cmd_args(char *prog, char *cmdline, char ***argvp, char **tofree)
argv = (char **)malloc((argc + 1) * sizeof(char *)); argv = (char **)malloc((argc + 1) * sizeof(char *));
if (argv == NULL ) if (argv == NULL )
{ {
vim_free(newcmdline); free(newcmdline);
return 0; /* malloc error */ return 0; /* malloc error */
} }
pnew = newcmdline; pnew = newcmdline;
*tofree = newcmdline;
} }
} }


done: done:

argv[argc] = NULL; /* NULL-terminated list */ argv[argc] = NULL; /* NULL-terminated list */
*argvp = argv; *argvp = argv;
return argc; return argc;
Expand Down
12 changes: 6 additions & 6 deletions src/os_vms.c
Expand Up @@ -228,7 +228,7 @@ mch_getenv(char_u *lognam)
else if ((sbuf = getenv((char *)lognam))) else if ((sbuf = getenv((char *)lognam)))
{ {
lengte = strlen(sbuf) + 1; lengte = strlen(sbuf) + 1;
cp = (char_u *)malloc((size_t)lengte); cp = (char_u *)alloc((size_t)lengte);
if (cp) if (cp)
strcpy((char *)cp, sbuf); strcpy((char *)cp, sbuf);
return cp; return cp;
Expand Down Expand Up @@ -381,7 +381,7 @@ vms_wproc(char *name, int val)
if (--vms_match_free == 0) { if (--vms_match_free == 0) {
/* add more space to store matches */ /* add more space to store matches */
vms_match_alloced += EXPL_ALLOC_INC; 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); sizeof(char **) * vms_match_alloced);
if (!vms_fmatch) if (!vms_fmatch)
return 0; return 0;
Expand Down Expand Up @@ -460,7 +460,7 @@ mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***file, i
if (--files_free < 1) if (--files_free < 1)
{ {
files_alloced += EXPL_ALLOC_INC; files_alloced += EXPL_ALLOC_INC;
*file = (char_u **)realloc(*file, *file = (char_u **)vim_realloc(*file,
sizeof(char_u **) * files_alloced); sizeof(char_u **) * files_alloced);
if (*file == NULL) if (*file == NULL)
{ {
Expand Down Expand Up @@ -614,14 +614,14 @@ vms_fixfilename(void *instring)
{ {
buflen = len + 128; buflen = len + 128;
if (buf) if (buf)
buf = (char *)realloc(buf, buflen); buf = (char *)vim_realloc(buf, buflen);
else else
buf = (char *)calloc(buflen, sizeof(char)); buf = (char *)alloc(buflen * sizeof(char));
} }


#ifdef DEBUG #ifdef DEBUG
char *tmpbuf = NULL; char *tmpbuf = NULL;
tmpbuf = (char *)calloc(buflen, sizeof(char)); tmpbuf = (char *)alloc(buflen * sizeof(char));
strcpy(tmpbuf, instring); strcpy(tmpbuf, instring);
#endif #endif


Expand Down
3 changes: 2 additions & 1 deletion src/os_w32exe.c
Expand Up @@ -129,7 +129,8 @@ WinMain(
errout: errout:
#endif #endif
free(argv); free(argv);
free(tofree); if (tofree != NULL)
free(tofree);
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
free_cmd_argsW(); free_cmd_argsW();
#endif #endif
Expand Down
3 changes: 2 additions & 1 deletion src/os_win16.c
Expand Up @@ -121,7 +121,8 @@ WinMain(
pmain(argc, argv); pmain(argc, argv);


free(argv); free(argv);
free(tofree); if (tofree != NULL)
free(tofree);


return 0; return 0;
} }
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -676,6 +676,8 @@ static char *(features[]) =


static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
36,
/**/ /**/
35, 35,
/**/ /**/
Expand Down

0 comments on commit a57ecd4

Please sign in to comment.