Compare commits

...

5 Commits

Author SHA1 Message Date
Bram Moolenaar
a878510770 updated for version 7.2-037 2008-11-12 13:10:15 +00:00
Bram Moolenaar
12806c8844 updated for version 7.2-036 2008-11-12 12:36:30 +00:00
Bram Moolenaar
5a22181f59 updated for version 7.2-035 2008-11-12 12:08:45 +00:00
Bram Moolenaar
9381ab7761 updated for version 7.2-034 2008-11-12 11:52:19 +00:00
Bram Moolenaar
223a18948c updated for version 7.2-033 2008-11-11 20:57:11 +00:00
13 changed files with 45 additions and 24 deletions

View File

@@ -647,6 +647,9 @@ free_buffer_stuff(buf, free_options)
vim_free(buf->b_start_fenc);
buf->b_start_fenc = NULL;
#endif
#ifdef FEAT_SPELL
ga_clear(&buf->b_langp);
#endif
}
/*
@@ -1237,7 +1240,7 @@ do_buffer(action, start, dir, count, forceit)
* "buf" if one exists */
if ((swb_flags & SWB_USEOPEN) && buf_jump_open_win(buf))
return OK;
/* If 'switchbuf' contians "usetab": jump to first window in any tab
/* If 'switchbuf' contains "usetab": jump to first window in any tab
* page containing "buf" if one exists */
if ((swb_flags & SWB_USETAB) && buf_jump_open_tab(buf))
return OK;
@@ -3964,7 +3967,7 @@ build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar, maxwidth, hltab, t
width = vim_strsize(out);
if (maxwidth > 0 && width > maxwidth)
{
/* Result is too long, must trunctate somewhere. */
/* Result is too long, must truncate somewhere. */
l = 0;
if (itemcnt == 0)
s = out;

View File

@@ -5550,9 +5550,10 @@ check_for_bom(p, size, lenp, flags)
name = "ucs-4le"; /* FF FE 00 00 */
len = 4;
}
else if (flags == FIO_ALL || flags == (FIO_UCS2 | FIO_ENDIAN_L))
else if (flags == (FIO_UCS2 | FIO_ENDIAN_L))
name = "ucs-2le"; /* FF FE */
else if (flags == (FIO_UTF16 | FIO_ENDIAN_L))
else if (flags == FIO_ALL || flags == (FIO_UTF16 | FIO_ENDIAN_L))
/* utf-16le is preferred, it also works for ucs-2le text */
name = "utf-16le"; /* FF FE */
}
else if (p[0] == 0xfe && p[1] == 0xff

View 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 */
}

View 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;

View File

@@ -2450,7 +2450,7 @@ find_closest_color(colormap, colorPtr)
*colorPtr = colortable[closest];
}
free(colortable);
vim_free(colortable);
return OK;
}

View File

@@ -5384,7 +5384,7 @@ preedit_draw_cbproc(XIC xic, XPointer client_data, XPointer call_data)
draw_feedback = (char *)alloc(draw_data->chg_first
+ text->length);
else
draw_feedback = realloc(draw_feedback,
draw_feedback = vim_realloc(draw_feedback,
draw_data->chg_first + text->length);
if (draw_feedback != NULL)
{

View File

@@ -873,7 +873,7 @@ lalloc(size, message)
/* 3. check for available memory: call mch_avail_mem() */
if (mch_avail_mem(TRUE) < KEEP_ROOM && !releasing)
{
vim_free((char *)p); /* System is low... no go! */
free((char *)p); /* System is low... no go! */
p = NULL;
}
else

View File

@@ -2905,7 +2905,7 @@ mch_early_init()
* Ignore any errors.
*/
#if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
signal_stack = malloc(SIGSTKSZ);
signal_stack = (char *)alloc(SIGSTKSZ);
init_signal_stack();
#endif
}
@@ -2936,7 +2936,8 @@ mch_free_mem()
}
# endif
# endif
# ifdef FEAT_X11
/* Don't close the display for GTK 1, it is done in exit(). */
# if defined(FEAT_X11) && (!defined(FEAT_GUI_GTK) || defined(HAVE_GTK2))
if (x11_display != NULL
# ifdef FEAT_XCLIPBOARD
&& x11_display != xterm_dpy
@@ -6814,7 +6815,8 @@ xsmp_close()
if (xsmp_icefd != -1)
{
SmcCloseConnection(xsmp.smcconn, 0, NULL);
vim_free(xsmp.clientid);
if (xsmp.clientid != NULL)
free(xsmp.clientid);
xsmp.clientid = NULL;
xsmp_icefd = -1;
}

View 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

View File

@@ -129,7 +129,8 @@ WinMain(
errout:
#endif
free(argv);
free(tofree);
if (tofree != NULL)
free(tofree);
#ifdef FEAT_MBYTE
free_cmd_argsW();
#endif

View File

@@ -121,7 +121,8 @@ WinMain(
pmain(argc, argv);
free(argv);
free(tofree);
if (tofree != NULL)
free(tofree);
return 0;
}

Binary file not shown.

View File

@@ -676,6 +676,16 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
37,
/**/
36,
/**/
35,
/**/
34,
/**/
33,
/**/
32,
/**/