aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buffer.c80
-rw-r--r--src/diff.c40
-rw-r--r--src/digraph.c16
-rw-r--r--src/edit.c70
-rw-r--r--src/eval.c298
-rw-r--r--src/ex_cmds.c136
-rw-r--r--src/ex_cmds2.c74
-rw-r--r--src/ex_docmd.c134
-rw-r--r--src/ex_eval.c26
-rw-r--r--src/ex_getln.c106
-rw-r--r--src/file_search.c54
-rw-r--r--src/fileio.c144
-rw-r--r--src/fold.c4
-rw-r--r--src/garray.c6
-rw-r--r--src/getchar.c66
-rw-r--r--src/hardcopy.c20
-rw-r--r--src/hashtab.c6
-rw-r--r--src/if_cscope.c98
-rw-r--r--src/indent.c2
-rw-r--r--src/indent_c.c4
-rw-r--r--src/main.c10
-rw-r--r--src/mark.c40
-rw-r--r--src/mbyte.c20
-rw-r--r--src/memfile.c48
-rw-r--r--src/memline.c72
-rw-r--r--src/memory.c6
-rw-r--r--src/menu.c64
-rw-r--r--src/message.c36
-rw-r--r--src/misc1.c44
-rw-r--r--src/misc2.c8
-rw-r--r--src/normal.c18
-rw-r--r--src/ops.c78
-rw-r--r--src/option.c52
-rw-r--r--src/os/fs.c4
-rw-r--r--src/os_unix.c24
-rw-r--r--src/path.c56
-rw-r--r--src/popupmnu.c6
-rw-r--r--src/quickfix.c86
-rw-r--r--src/regexp.c28
-rw-r--r--src/regexp_nfa.c20
-rw-r--r--src/screen.c52
-rw-r--r--src/search.c54
-rw-r--r--src/spell.c170
-rw-r--r--src/strings.c2
-rw-r--r--src/syntax.c166
-rw-r--r--src/tag.c60
-rw-r--r--src/term.c16
-rw-r--r--src/ui.c8
-rw-r--r--src/undo.c42
-rw-r--r--src/window.c34
50 files changed, 1358 insertions, 1350 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 35d5582340..4e87305c60 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -430,8 +430,8 @@ aucmd_abort:
* Remove the buffer from the list.
*/
if (wipe_buf) {
- vim_free(buf->b_ffname);
- vim_free(buf->b_sfname);
+ free(buf->b_ffname);
+ free(buf->b_sfname);
if (buf->b_prev == NULL)
firstbuf = buf->b_next;
else
@@ -552,7 +552,7 @@ static void free_buffer(buf_T *buf)
buf->b_next = au_pending_free_buf;
au_pending_free_buf = buf;
} else {
- vim_free(buf);
+ free(buf);
}
}
@@ -576,7 +576,7 @@ free_buffer_stuff (
buf_delete_signs(buf); /* delete any signs */
map_clear_int(buf, MAP_ALL_MODES, TRUE, FALSE); /* clear local mappings */
map_clear_int(buf, MAP_ALL_MODES, TRUE, TRUE); /* clear local abbrevs */
- vim_free(buf->b_start_fenc);
+ free(buf->b_start_fenc);
buf->b_start_fenc = NULL;
}
@@ -594,7 +594,7 @@ static void clear_wininfo(buf_T *buf)
clear_winopt(&wip->wi_opt);
deleteFoldRecurse(&wip->wi_folds);
}
- vim_free(wip);
+ free(wip);
}
}
@@ -1327,7 +1327,7 @@ buflist_new (
buflist_findname(ffname)
#endif
) != NULL) {
- vim_free(ffname);
+ free(ffname);
if (lnum != 0)
buflist_setfpos(buf, curwin, lnum, (colnr_T)0, FALSE);
/* copy the options now, if 'cpo' doesn't have 's' and not done
@@ -1390,9 +1390,9 @@ buflist_new (
buf->b_wininfo = xcalloc(1, sizeof(wininfo_T));
if (ffname != NULL && (buf->b_ffname == NULL || buf->b_sfname == NULL)) {
- vim_free(buf->b_ffname);
+ free(buf->b_ffname);
buf->b_ffname = NULL;
- vim_free(buf->b_sfname);
+ free(buf->b_sfname);
buf->b_sfname = NULL;
if (buf != curbuf)
free_buffer(buf);
@@ -1669,7 +1669,7 @@ buf_T *buflist_findname_exp(char_u *fname)
);
if (ffname != NULL) {
buf = buflist_findname(ffname);
- vim_free(ffname);
+ free(ffname);
}
return buf;
}
@@ -1771,7 +1771,7 @@ buflist_findpat (
++p;
prog = vim_regcomp(p, p_magic ? RE_MAGIC : 0);
if (prog == NULL) {
- vim_free(pat);
+ free(pat);
return -1;
}
@@ -1809,7 +1809,7 @@ buflist_findpat (
find_listed = FALSE;
}
- vim_free(pat);
+ free(pat);
}
if (match == -2)
@@ -1856,7 +1856,7 @@ int ExpandBufnames(char_u *pat, int *num_file, char_u ***file, int options)
prog = vim_regcomp(patc + attempt * 11, RE_MAGIC);
if (prog == NULL) {
if (patc != pat)
- vim_free(patc);
+ free(patc);
return FAIL;
}
@@ -1894,7 +1894,7 @@ int ExpandBufnames(char_u *pat, int *num_file, char_u ***file, int options)
}
if (patc != pat)
- vim_free(patc);
+ free(patc);
*num_file = count;
return count == 0 ? FAIL : OK;
@@ -1937,7 +1937,7 @@ static char_u *fname_match(regprog_T *prog, char_u *name)
p = home_replace_save(NULL, name);
if (p != NULL && vim_regexec(&regmatch, p, (colnr_T)0))
match = name;
- vim_free(p);
+ free(p);
}
}
@@ -2226,8 +2226,8 @@ setfname (
if (ffname == NULL || *ffname == NUL) {
/* Removing the name. */
- vim_free(buf->b_ffname);
- vim_free(buf->b_sfname);
+ free(buf->b_ffname);
+ free(buf->b_sfname);
buf->b_ffname = NULL;
buf->b_sfname = NULL;
#ifdef UNIX
@@ -2257,7 +2257,7 @@ setfname (
if (obuf->b_ml.ml_mfp != NULL) { /* it's loaded, fail */
if (message)
EMSG(_("E95: Buffer with this name already exists"));
- vim_free(ffname);
+ free(ffname);
return FAIL;
}
/* delete from the list */
@@ -2265,15 +2265,15 @@ setfname (
}
sfname = vim_strsave(sfname);
if (ffname == NULL || sfname == NULL) {
- vim_free(sfname);
- vim_free(ffname);
+ free(sfname);
+ free(ffname);
return FAIL;
}
#ifdef USE_FNAME_CASE
fname_case(sfname, 0); /* set correct case for short file name */
#endif
- vim_free(buf->b_ffname);
- vim_free(buf->b_sfname);
+ free(buf->b_ffname);
+ free(buf->b_sfname);
buf->b_ffname = ffname;
buf->b_sfname = sfname;
}
@@ -2302,8 +2302,8 @@ void buf_set_name(int fnum, char_u *name)
buf = buflist_findnr(fnum);
if (buf != NULL) {
- vim_free(buf->b_sfname);
- vim_free(buf->b_ffname);
+ free(buf->b_sfname);
+ free(buf->b_ffname);
buf->b_ffname = vim_strsave(name);
buf->b_sfname = NULL;
/* Allocate ffname and expand into full path. Also resolves .lnk
@@ -2595,7 +2595,7 @@ fileinfo (
set_keep_msg(p, 0);
}
- vim_free(buffer);
+ free(buffer);
}
void col_print(char_u *buf, size_t buflen, int col, int vcol)
@@ -2670,7 +2670,7 @@ void maketitle(void)
else {
p = transstr(path_tail(curbuf->b_fname));
vim_strncpy(buf, p, SPACE_FOR_FNAME);
- vim_free(p);
+ free(p);
}
switch (bufIsChanged(curbuf)
@@ -2712,7 +2712,7 @@ void maketitle(void)
if (off < SPACE_FOR_DIR) {
p = transstr(buf + off);
vim_strncpy(buf + off, p, (size_t)(SPACE_FOR_DIR - off));
- vim_free(p);
+ free(p);
} else {
vim_strncpy(buf + off, (char_u *)"...",
(size_t)(SPACE_FOR_ARGNR - off));
@@ -2785,7 +2785,7 @@ static int ti_change(char_u *str, char_u **last)
{
if ((str == NULL) != (*last == NULL)
|| (str != NULL && *last != NULL && STRCMP(str, *last) != 0)) {
- vim_free(*last);
+ free(*last);
if (str == NULL)
*last = NULL;
else
@@ -2806,8 +2806,8 @@ void resettitle(void)
# if defined(EXITFREE) || defined(PROTO)
void free_titles(void)
{
- vim_free(lasttitle);
- vim_free(lasticon);
+ free(lasttitle);
+ free(lasticon);
}
# endif
@@ -3159,7 +3159,7 @@ build_stl_str_hl (
if (str != NULL && *str != 0) {
if (*skipdigits(str) == NUL) {
num = atoi((char *)str);
- vim_free(str);
+ free(str);
str = NULL;
itemisflag = FALSE;
}
@@ -3416,7 +3416,7 @@ build_stl_str_hl (
item[curitem].type = Empty;
if (opt == STL_VIM_EXPR)
- vim_free(str);
+ free(str);
if (num >= 0 || (!itemisflag && str && *str))
prevchar_isflag = FALSE; /* Item not NULL, but not a flag */
@@ -3426,7 +3426,7 @@ build_stl_str_hl (
itemcnt = curitem;
if (usefmt != fmt)
- vim_free(usefmt);
+ free(usefmt);
width = vim_strsize(out);
if (maxwidth > 0 && width > maxwidth) {
@@ -3624,7 +3624,7 @@ void fname_expand(buf_T *buf, char_u **ffname, char_u **sfname)
/* If the file name is a shortcut file, use the file it links to. */
rfname = mch_resolve_shortcut(*ffname);
if (rfname != NULL) {
- vim_free(*ffname);
+ free(*ffname);
*ffname = rfname;
*sfname = rfname;
}
@@ -3882,7 +3882,7 @@ do_arg_all (
win_enter(new_curwin, FALSE);
--autocmd_no_leave;
- vim_free(opened);
+ free(opened);
}
/*
@@ -4207,7 +4207,7 @@ chk_modeline (
sourcing_lnum = save_sourcing_lnum;
sourcing_name = save_sourcing_name;
- vim_free(linecopy);
+ free(linecopy);
}
return retval;
}
@@ -4254,7 +4254,7 @@ int read_viminfo_bufferlist(vir_T *virp, int writing)
buflist_setfpos(buf, curwin, lnum, col, FALSE);
}
}
- vim_free(xline);
+ free(xline);
return viminfo_readline(virp);
}
@@ -4297,7 +4297,7 @@ void write_viminfo_bufferlist(FILE *fp)
buf->b_last_cursor.col);
viminfo_writestring(fp, line);
}
- vim_free(line);
+ free(line);
}
@@ -4472,7 +4472,7 @@ linenr_T buf_delsign(
if (sign->id == id) {
*lastp = next;
lnum = sign->lnum;
- vim_free(sign);
+ free(sign);
break;
} else {
lastp = &sign->next;
@@ -4537,7 +4537,7 @@ void buf_delete_signs(buf_T *buf)
while (buf->b_signlist != NULL) {
next = buf->b_signlist->next;
- vim_free(buf->b_signlist);
+ free(buf->b_signlist);
buf->b_signlist = next;
}
}
@@ -4664,7 +4664,7 @@ int buf_contents_changed(buf_T *buf)
}
}
}
- vim_free(ea.cmd);
+ free(ea.cmd);
/* restore curwin/curbuf and a few other things */
aucmd_restbuf(&aco);
diff --git a/src/diff.c b/src/diff.c
index 880ae9edef..a93f1324fe 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -405,7 +405,7 @@ static void diff_mark_adjust_tp(tabpage_T *tp, int idx, linenr_T line1,
}
}
dprev->df_next = dp->df_next;
- vim_free(dp);
+ free(dp);
dp = dprev->df_next;
} else {
// Advance to next entry.
@@ -428,7 +428,7 @@ static void diff_mark_adjust_tp(tabpage_T *tp, int idx, linenr_T line1,
if (i == DB_COUNT) {
diff_T *dnext = dp->df_next;
- vim_free(dp);
+ free(dp);
dp = dnext;
if (dprev == NULL) {
@@ -543,7 +543,7 @@ static void diff_check_unchanged(tabpage_T *tp, diff_T *dp)
break;
}
}
- vim_free(line_org);
+ free(line_org);
// Stop when a line isn't equal in all diff buffers.
if (i_new != DB_COUNT) {
@@ -801,9 +801,9 @@ void ex_diffupdate(exarg_T *eap)
diff_redraw(TRUE);
theend:
- vim_free(tmp_orig);
- vim_free(tmp_new);
- vim_free(tmp_diff);
+ free(tmp_orig);
+ free(tmp_new);
+ free(tmp_diff);
}
/// Make a diff between files "tmp_orig" and "tmp_new", results in "tmp_diff".
@@ -843,7 +843,7 @@ static void diff_file(char_u *tmp_orig, char_u *tmp_new, char_u *tmp_diff)
NULL
);
unblock_autocmds();
- vim_free(cmd);
+ free(cmd);
}
}
@@ -1010,16 +1010,16 @@ theend:
if (tmp_orig != NULL) {
os_remove((char *)tmp_orig);
}
- vim_free(tmp_orig);
+ free(tmp_orig);
if (tmp_new != NULL) {
os_remove((char *)tmp_new);
}
- vim_free(tmp_new);
- vim_free(newname);
- vim_free(buf);
+ free(tmp_new);
+ free(newname);
+ free(buf);
#ifdef UNIX
- vim_free(fullname);
+ free(fullname);
#endif // ifdef UNIX
}
@@ -1362,7 +1362,7 @@ static void diff_read(int idx_orig, int idx_new, char_u *fname)
while (dn != dp->df_next) {
dpl = dn->df_next;
- vim_free(dn);
+ free(dn);
dn = dpl;
}
} else {
@@ -1429,7 +1429,7 @@ void diff_clear(tabpage_T *tp)
diff_T *next_p;
for (p = tp->tp_first_diff; p != NULL; p = next_p) {
next_p = p->df_next;
- vim_free(p);
+ free(p);
}
tp->tp_first_diff = NULL;
}
@@ -1584,7 +1584,7 @@ static int diff_equal_entry(diff_T *dp, int idx1, int idx2)
}
int cmp = diff_cmp(line, ml_get_buf(curtab->tp_diffbuf[idx2],
dp->df_lnum[idx2] + i, FALSE));
- vim_free(line);
+ free(line);
if (cmp != 0) {
return FALSE;
@@ -1892,7 +1892,7 @@ int diff_find_change(win_T *wp, linenr_T lnum, int *startp, int *endp)
int idx = diff_buf_idx(wp->w_buffer);
if (idx == DB_COUNT) {
// cannot happen
- vim_free(line_org);
+ free(line_org);
return FALSE;
}
@@ -1905,7 +1905,7 @@ int diff_find_change(win_T *wp, linenr_T lnum, int *startp, int *endp)
}
if ((dp == NULL) || (diff_check_sanity(curtab, dp) == FAIL)) {
- vim_free(line_org);
+ free(line_org);
return FALSE;
}
@@ -1985,7 +1985,7 @@ int diff_find_change(win_T *wp, linenr_T lnum, int *startp, int *endp)
}
}
- vim_free(line_org);
+ free(line_org);
return added;
}
@@ -2284,7 +2284,7 @@ void ex_diffgetput(exarg_T *eap)
p = vim_strsave(ml_get_buf(curtab->tp_diffbuf[idx_from], nr, FALSE));
if (p != NULL) {
ml_append(lnum + i - 1, p, 0, FALSE);
- vim_free(p);
+ free(p);
added++;
if (buf_empty && (curbuf->b_ml.ml_line_count == 2)) {
// Added the first line into an empty buffer, need to
@@ -2340,7 +2340,7 @@ void ex_diffgetput(exarg_T *eap)
if (dfree != NULL) {
// Diff is deleted, update folds in other windows.
diff_fold_update(dfree, idx_to);
- vim_free(dfree);
+ free(dfree);
} else {
// mark_adjust() may have changed the count in a wrong way
dp->df_count[idx_to] = new_count;
diff --git a/src/digraph.c b/src/digraph.c
index 88f183be4f..7ab8bd181d 100644
--- a/src/digraph.c
+++ b/src/digraph.c
@@ -1527,7 +1527,7 @@ static int getexactdigraph(int char1, int char2, int meta_char)
if (to != NULL) {
retval = (*mb_ptr2char)(to);
- vim_free(to);
+ free(to);
}
(void)convert_setup(&vc, NULL, NULL);
}
@@ -1759,11 +1759,11 @@ char_u* keymap_init(void)
curbuf->b_p_keymap);
if (source_runtime(buf, FALSE) == FAIL) {
- vim_free(buf);
+ free(buf);
return (char_u *)N_("E544: Keymap file not found");
}
}
- vim_free(buf);
+ free(buf);
}
return NULL;
@@ -1825,13 +1825,13 @@ void ex_loadkeymap(exarg_T *eap)
if ((kp->to != NULL) && (*kp->to == NUL)) {
EMSG(_("E791: Empty keymap entry"));
}
- vim_free(kp->from);
- vim_free(kp->to);
+ free(kp->from);
+ free(kp->to);
} else {
++curbuf->b_kmap_ga.ga_len;
}
}
- vim_free(line);
+ free(line);
}
// setup ":lnoremap" to map the keys
@@ -1869,8 +1869,8 @@ static void keymap_unload(void)
for (i = 0; i < curbuf->b_kmap_ga.ga_len; ++i) {
vim_snprintf((char *)buf, sizeof(buf), "<buffer> %s", kp[i].from);
(void)do_map(1, buf, LANGMAP, FALSE);
- vim_free(kp[i].from);
- vim_free(kp[i].to);
+ free(kp[i].from);
+ free(kp[i].to);
}
p_cpo = save_cpo;
diff --git a/src/edit.c b/src/edit.c
index d02dd6fbbc..4b1d1878d1 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -569,7 +569,7 @@ edit (
new_insert_skip = 0;
else {
new_insert_skip = (int)STRLEN(ptr);
- vim_free(ptr);
+ free(ptr);
}
old_indent = 0;
@@ -734,7 +734,7 @@ edit (
if (str != NULL) {
for (p = str; *p != NUL; mb_ptr_adv(p))
ins_compl_addleader(PTR2CHAR(p));
- vim_free(str);
+ free(str);
} else
ins_compl_addleader(c);
continue;
@@ -1239,7 +1239,7 @@ normalchar:
}
AppendToRedobuffLit(str, -1);
}
- vim_free(str);
+ free(str);
c = NUL;
}
@@ -1656,7 +1656,7 @@ change_indent (
memset(ptr, ' ', i);
new_cursor_col += i;
ins_str(ptr);
- vim_free(ptr);
+ free(ptr);
}
/*
@@ -1742,7 +1742,7 @@ change_indent (
/* Insert new stuff into line again */
ins_bytes(new_line);
- vim_free(new_line);
+ free(new_line);
}
}
@@ -2067,7 +2067,7 @@ int ins_compl_add_infercase(char_u *str, int len, int icase, char_u *fname, int
*(p++) = wca[i++];
*p = NUL;
- vim_free(wca);
+ free(wca);
return ins_compl_add(IObuff, len, icase, fname, NULL, dir,
flags, FALSE);
@@ -2128,7 +2128,7 @@ ins_compl_add (
if (flags & ORIGINAL_TEXT)
match->cp_number = 0;
if ((match->cp_str = vim_strnsave(str, len)) == NULL) {
- vim_free(match);
+ free(match);
return FAIL;
}
match->cp_icase = icase;
@@ -2373,7 +2373,7 @@ static void ins_compl_del_pum(void)
{
if (compl_match_array != NULL) {
pum_undisplay();
- vim_free(compl_match_array);
+ free(compl_match_array);
compl_match_array = NULL;
}
}
@@ -2594,8 +2594,8 @@ ins_compl_dictionaries (
ptr = xmalloc(len);
vim_snprintf((char *)ptr, len, "^\\s*\\zs\\V%s", pat_esc);
regmatch.regprog = vim_regcomp(ptr, RE_MAGIC);
- vim_free(pat_esc);
- vim_free(ptr);
+ free(pat_esc);
+ free(ptr);
} else {
regmatch.regprog = vim_regcomp(pat, p_magic ? RE_MAGIC : 0);
if (regmatch.regprog == NULL)
@@ -2643,7 +2643,7 @@ ins_compl_dictionaries (
theend:
p_scs = save_p_scs;
vim_regfree(regmatch.regprog);
- vim_free(buf);
+ free(buf);
}
static void ins_compl_files(int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir)
@@ -2792,9 +2792,9 @@ static void ins_compl_free(void)
compl_T *match;
int i;
- vim_free(compl_pattern);
+ free(compl_pattern);
compl_pattern = NULL;
- vim_free(compl_leader);
+ free(compl_leader);
compl_leader = NULL;
if (compl_first_match == NULL)
@@ -2807,13 +2807,13 @@ static void ins_compl_free(void)
do {
match = compl_curr_match;
compl_curr_match = compl_curr_match->cp_next;
- vim_free(match->cp_str);
+ free(match->cp_str);
/* several entries may use the same fname, free it just once. */
if (match->cp_flags & FREE_FNAME)
- vim_free(match->cp_fname);
+ free(match->cp_fname);
for (i = 0; i < CPT_COUNT; ++i)
- vim_free(match->cp_text[i]);
- vim_free(match);
+ free(match->cp_text[i]);
+ free(match);
} while (compl_curr_match != NULL && compl_curr_match != compl_first_match);
compl_first_match = compl_curr_match = NULL;
compl_shown_match = NULL;
@@ -2824,12 +2824,12 @@ static void ins_compl_clear(void)
compl_cont_status = 0;
compl_started = FALSE;
compl_matches = 0;
- vim_free(compl_pattern);
+ free(compl_pattern);
compl_pattern = NULL;
- vim_free(compl_leader);
+ free(compl_leader);
compl_leader = NULL;
edit_submode_extra = NULL;
- vim_free(compl_orig_text);
+ free(compl_orig_text);
compl_orig_text = NULL;
compl_enter_selects = FALSE;
}
@@ -2870,7 +2870,7 @@ static int ins_compl_bs(void)
|| ins_compl_need_restart())
ins_compl_restart();
- vim_free(compl_leader);
+ free(compl_leader);
compl_leader = vim_strnsave(line + compl_col, (int)(p - line) - compl_col);
if (compl_leader != NULL) {
ins_compl_new_leader();
@@ -2976,7 +2976,7 @@ static void ins_compl_addleader(int c)
* cursor doesn't point original position, changing compl_leader would
* break redo. */
if (!compl_opt_refresh_always) {
- vim_free(compl_leader);
+ free(compl_leader);
compl_leader = vim_strnsave(ml_get_curline() + compl_col,
(int)(curwin->w_cursor.col - compl_col));
if (compl_leader != NULL)
@@ -3008,7 +3008,7 @@ static void ins_compl_set_original_text(char_u *str)
if (compl_first_match->cp_flags & ORIGINAL_TEXT) { /* safety check */
p = vim_strsave(str);
if (p != NULL) {
- vim_free(compl_first_match->cp_str);
+ free(compl_first_match->cp_str);
compl_first_match->cp_str = p;
}
}
@@ -4565,13 +4565,13 @@ static int ins_complete(int c)
ins_compl_fixRedoBufForLeader(NULL);
/* Always add completion for the original text. */
- vim_free(compl_orig_text);
+ free(compl_orig_text);
compl_orig_text = vim_strnsave(line + compl_col, compl_length);
if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
-1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK) {
- vim_free(compl_pattern);
+ free(compl_pattern);
compl_pattern = NULL;
- vim_free(compl_orig_text);
+ free(compl_orig_text);
compl_orig_text = NULL;
return FAIL;
}
@@ -5441,7 +5441,7 @@ internal_format (
* moved, now we re-insert it into the new line.
*/
ins_bytes(saved_text);
- vim_free(saved_text);
+ free(saved_text);
} else {
/*
* Check if cursor is not past the NUL off the line, cindent
@@ -5768,11 +5768,11 @@ stop_insert (
ptr = get_inserted();
if (did_restart_edit == 0 || (ptr != NULL
&& (int)STRLEN(ptr) > new_insert_skip)) {
- vim_free(last_insert);
+ free(last_insert);
last_insert = ptr;
last_insert_skip = new_insert_skip;
} else
- vim_free(ptr);
+ free(ptr);
if (!arrow_used && end_insert_pos != NULL) {
/* Auto-format now. It may seem strange to do this when stopping an
@@ -5871,7 +5871,7 @@ void set_last_insert(int c)
{
char_u *s;
- vim_free(last_insert);
+ free(last_insert);
last_insert = xmalloc(MB_MAXBYTES * 3 + 5);
s = last_insert;
/* Use the CTRL-V only when entering a special char */
@@ -5886,9 +5886,9 @@ void set_last_insert(int c)
#if defined(EXITFREE) || defined(PROTO)
void free_last_insert(void)
{
- vim_free(last_insert);
+ free(last_insert);
last_insert = NULL;
- vim_free(compl_orig_text);
+ free(compl_orig_text);
compl_orig_text = NULL;
}
@@ -6289,7 +6289,7 @@ replace_push (
if (replace_stack != NULL) {
memmove(p, replace_stack,
(size_t)(replace_stack_nr * sizeof(char_u)));
- vim_free(replace_stack);
+ free(replace_stack);
}
replace_stack = p;
}
@@ -6415,7 +6415,7 @@ static void mb_replace_pop_ins(int cc)
*/
static void replace_flush(void)
{
- vim_free(replace_stack);
+ free(replace_stack);
replace_stack = NULL;
replace_stack_len = 0;
replace_stack_nr = 0;
@@ -8103,7 +8103,7 @@ static int ins_tab(void)
}
if (State & VREPLACE_FLAG)
- vim_free(saved_line);
+ free(saved_line);
curwin->w_p_list = save_list;
}
diff --git a/src/eval.c b/src/eval.c
index df11174898..61a33c04d9 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -911,7 +911,7 @@ void eval_clear(void)
for (i = 0; i < VV_LEN; ++i) {
p = &vimvars[i];
if (p->vv_di.di_tv.v_type == VAR_STRING) {
- vim_free(p->vv_str);
+ free(p->vv_str);
p->vv_str = NULL;
} else if (p->vv_di.di_tv.v_type == VAR_LIST) {
list_unref(p->vv_list);
@@ -937,7 +937,7 @@ void eval_clear(void)
for (i = 1; i <= ga_scripts.ga_len; ++i)
vars_clear(&SCRIPT_VARS(i));
for (i = 1; i <= ga_scripts.ga_len; ++i)
- vim_free(SCRIPT_SV(i));
+ free(SCRIPT_SV(i));
ga_clear(&ga_scripts);
/* unreferenced lists and dicts */
@@ -1135,13 +1135,13 @@ void var_redir_stop(void)
}
/* free the collected output */
- vim_free(redir_ga.ga_data);
+