summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-06-24 23:11:15 +0000
committerBram Moolenaar <Bram@vim.org>2005-06-24 23:11:15 +0000
commit29a1c1d374151aae361dbf39f4b599403fee2e66 (patch)
treec006f6592413c2d29af4be4f28e84b8e6dce49d1
parent1ec484f58e9fef3666e80aa835d99a287c155911 (diff)
updated for version 7.0092v7.0092
-rw-r--r--runtime/doc/todo.txt5
-rw-r--r--runtime/indent/scheme.vim7
-rw-r--r--runtime/indent/xhtml.vim7
-rw-r--r--src/eval.c58
-rw-r--r--src/proto/ex_cmds2.pro1
-rw-r--r--src/proto/misc2.pro1
-rw-r--r--src/proto/screen.pro1
7 files changed, 76 insertions, 4 deletions
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 81dd80a958..9b617802af 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2005 Jun 23
+*todo.txt* For Vim version 7.0aa. Last change: 2005 Jun 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -98,7 +98,6 @@ PLANNED FOR VERSION 7.0:
- Add SPELLCHECKER, with support for many languages.
- Spell checking code todo's:
- - Make "en-rare" spell file?
- Add hl groups to 'spelllang'?
:set spelllang=en_us,en-rare/SpellRare,en-math/SpellMath
More complicated: Regions with different languages? E.g. comments
@@ -111,7 +110,9 @@ PLANNED FOR VERSION 7.0:
- Simple and fast sound-a-like: mapping list for first char and rest
vowel as first char: *
remove other vowels
+ - Cleanup spell help.
- Use "engspchk" from Charles Campbell for ideas (commands, rare words).
+ - Make "en-rare" spell file? Ask Charles Campbell.
- References: MySpell library (in OpenOffice.org).
http://spellchecker.mozdev.org/source.html
http://whiteboard.openoffice.org/source/browse/whiteboard/lingucomponent/source/spellcheck/myspell/
diff --git a/runtime/indent/scheme.vim b/runtime/indent/scheme.vim
index 0884b513a6..a16f4f9ea1 100644
--- a/runtime/indent/scheme.vim
+++ b/runtime/indent/scheme.vim
@@ -1,6 +1,11 @@
" Vim indent file
" Language: Scheme
" Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
-" Last Change: 2005 Jun 08
+" Last Change: 2005 Jun 24
+
+" Only load this indent file when no other was loaded.
+if exists("b:did_indent")
+ finish
+endif
runtime! indent/lisp.vim
diff --git a/runtime/indent/xhtml.vim b/runtime/indent/xhtml.vim
index 1abf6b75f3..2197b7901c 100644
--- a/runtime/indent/xhtml.vim
+++ b/runtime/indent/xhtml.vim
@@ -1,7 +1,12 @@
" Vim indent file
" Language: XHTML
" Maintainer: Bram Moolenaar <Bram@vim.org> (for now)
-" Last Change: 2003 Feb 04
+" Last Change: 2005 Jun 24
+
+" Only load this indent file when no other was loaded.
+if exists("b:did_indent")
+ finish
+endif
" Handled like HTML for now.
runtime! indent/html.vim
diff --git a/src/eval.c b/src/eval.c
index fb07e5edb2..dc38936aa4 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -708,6 +708,32 @@ eval_init()
}
}
+#if defined(EXITFREE) || defined(PROTO)
+ void
+eval_clear()
+{
+ int i;
+ struct vimvar *p;
+
+ for (i = 0; i < VV_LEN; ++i)
+ {
+ p = &vimvars[i];
+ if (p->vv_di.di_tv.v_type == VAR_STRING)
+ vim_free(p->vv_di.di_tv.vval.v_string);
+ }
+ hash_clear(&vimvarht);
+ hash_clear(&compat_hashtab);
+
+ /* script-local variables */
+ for (i = 1; i <= ga_scripts.ga_len; ++i)
+ vars_clear(&SCRIPT_VARS(i));
+ ga_clear(&ga_scripts);
+
+ /* global variables */
+ vars_clear(&globvarht);
+}
+#endif
+
/*
* Return the name of the executed function.
*/
@@ -16406,7 +16432,21 @@ ex_function(eap)
/* Add the line to the function. */
if (ga_grow(&newlines, 1) == FAIL)
+ {
+ vim_free(theline);
goto erret;
+ }
+
+ /* Copy the line to newly allocated memory. get_one_sourceline()
+ * allocates 250 bytes per line, this saves 80% on average. The cost
+ * is an extra alloc/free. */
+ p = vim_strsave(theline);
+ if (p != NULL)
+ {
+ vim_free(theline);
+ theline = p;
+ }
+
((char_u **)(newlines.ga_data))[newlines.ga_len] = theline;
newlines.ga_len++;
}
@@ -16808,6 +16848,24 @@ find_func(name)
return NULL;
}
+#if defined(EXITFREE) || defined(PROTO)
+ void
+free_all_functions()
+{
+ hashitem_T *hi;
+
+ /* Need to start all over every time, because func_free() may change the
+ * hash table. */
+ while (func_hashtab.ht_used > 0)
+ for (hi = func_hashtab.ht_array; ; ++hi)
+ if (!HASHITEM_EMPTY(hi))
+ {
+ func_free(HI2UF(hi));
+ break;
+ }
+}
+#endif
+
/*
* Return TRUE if a function "name" exists.
*/
diff --git a/src/proto/ex_cmds2.pro b/src/proto/ex_cmds2.pro
index 4914a44d3b..66584f5b0f 100644
--- a/src/proto/ex_cmds2.pro
+++ b/src/proto/ex_cmds2.pro
@@ -61,6 +61,7 @@ linenr_T *source_breakpoint __ARGS((void *cookie));
int *source_dbg_tick __ARGS((void *cookie));
int source_level __ARGS((void *cookie));
int do_source __ARGS((char_u *fname, int check_other, int is_vimrc));
+void free_scriptnames __ARGS((void));
void ex_scriptnames __ARGS((exarg_T *eap));
void scriptnames_slash_adjust __ARGS((void));
char_u *get_scriptname __ARGS((scid_T id));
diff --git a/src/proto/misc2.pro b/src/proto/misc2.pro
index 6d79631534..936f38fad5 100644
--- a/src/proto/misc2.pro
+++ b/src/proto/misc2.pro
@@ -24,6 +24,7 @@ char_u *lalloc_clear __ARGS((long_u size, int message));
char_u *lalloc __ARGS((long_u size, int message));
void *mem_realloc __ARGS((void *ptr, size_t size));
void do_outofmem_msg __ARGS((long_u size));
+void free_all_mem __ARGS((void));
char_u *vim_strsave __ARGS((char_u *string));
char_u *vim_strnsave __ARGS((char_u *string, int len));
char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars));
diff --git a/src/proto/screen.pro b/src/proto/screen.pro
index 6831d42b9a..b5b6eec683 100644
--- a/src/proto/screen.pro
+++ b/src/proto/screen.pro
@@ -29,6 +29,7 @@ void screen_fill __ARGS((int start_row, int end_row, int start_col, int end_col,
void check_for_delay __ARGS((int check_msg_scroll));
int screen_valid __ARGS((int clear));
void screenalloc __ARGS((int clear));
+void free_screenlines __ARGS((void));
void screenclear __ARGS((void));
int can_clear __ARGS((char_u *p));
void screen_start __ARGS((void));