diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-03-25 21:58:17 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-03-25 21:58:17 +0000 |
commit | 2641f77fbcbd2dbfd494e940aed7fe0df4760f22 (patch) | |
tree | 3243064afaaea82e64f6787113de8c667ad573bf /src | |
parent | 68b76a69aa818e4220654244a4353ab43c1ae728 (diff) |
updated for version 7.0064v7.0064
Diffstat (limited to 'src')
-rw-r--r-- | src/eval.c | 126 | ||||
-rw-r--r-- | src/installml.sh | 2 | ||||
-rw-r--r-- | src/po/ko.po | 4 | ||||
-rw-r--r-- | src/proto/quickfix.pro | 1 |
4 files changed, 97 insertions, 36 deletions
diff --git a/src/eval.c b/src/eval.c index dd135afbaa..74f985a6f5 100644 --- a/src/eval.c +++ b/src/eval.c @@ -428,7 +428,6 @@ static void f_did_filetype __ARGS((typval_T *argvars, typval_T *rettv)); static void f_diff_filler __ARGS((typval_T *argvars, typval_T *rettv)); static void f_diff_hlID __ARGS((typval_T *argvars, typval_T *rettv)); static void f_empty __ARGS((typval_T *argvars, typval_T *rettv)); -static void f_errorlist __ARGS((typval_T *argvars, typval_T *rettv)); static void f_escape __ARGS((typval_T *argvars, typval_T *rettv)); static void f_eval __ARGS((typval_T *argvars, typval_T *rettv)); static void f_eventhandler __ARGS((typval_T *argvars, typval_T *rettv)); @@ -462,6 +461,7 @@ static void f_getfsize __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getftime __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getftype __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getline __ARGS((typval_T *argvars, typval_T *rettv)); +static void f_getqflist __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getreg __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getregtype __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getwinposx __ARGS((typval_T *argvars, typval_T *rettv)); @@ -536,6 +536,7 @@ static void f_serverlist __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setbufvar __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setcmdpos __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setline __ARGS((typval_T *argvars, typval_T *rettv)); +static void f_setqflist __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setreg __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setwinvar __ARGS((typval_T *argvars, typval_T *rettv)); static void f_simplify __ARGS((typval_T *argvars, typval_T *rettv)); @@ -5121,7 +5122,7 @@ list_append_tv(l, tv) } /* - * Add a dictionary to a list. Used by errorlist(). + * Add a dictionary to a list. Used by getqflist(). * Return FAIL when out of memory. */ int @@ -5670,6 +5671,40 @@ dict_find(d, key, len) } /* + * Get a string item from a dictionary in allocated memory. + * Returns NULL if the entry doesn't exist or out of memory. + */ + char_u * +get_dict_string(d, key) + dict_T *d; + char_u *key; +{ + dictitem_T *di; + + di = dict_find(d, key, -1); + if (di == NULL) + return NULL; + return vim_strsave(get_tv_string(&di->di_tv)); +} + +/* + * Get a number item from a dictionary. + * Returns 0 if the entry doesn't exist or out of memory. + */ + long +get_dict_number(d, key) + dict_T *d; + char_u *key; +{ + dictitem_T *di; + + di = dict_find(d, key, -1); + if (di == NULL) + return 0; + return get_tv_number(&di->di_tv); +} + +/* * Return an allocated string with the string representation of a Dictionary. * May return NULL. */ @@ -6078,7 +6113,6 @@ static struct fst {"diff_filler", 1, 1, f_diff_filler}, {"diff_hlID", 2, 2, f_diff_hlID}, {"empty", 1, 1, f_empty}, - {"errorlist", 0, 0, f_errorlist}, {"escape", 2, 2, f_escape}, {"eval", 1, 1, f_eval}, {"eventhandler", 0, 0, f_eventhandler}, @@ -6113,6 +6147,7 @@ static struct fst {"getftime", 1, 1, f_getftime}, {"getftype", 1, 1, f_getftype}, {"getline", 1, 2, f_getline}, + {"getqflist", 0, 0, f_getqflist}, {"getreg", 0, 1, f_getreg}, {"getregtype", 0, 1, f_getregtype}, {"getwinposx", 0, 0, f_getwinposx}, @@ -6189,6 +6224,7 @@ static struct fst {"setbufvar", 3, 3, f_setbufvar}, {"setcmdpos", 1, 1, f_setcmdpos}, {"setline", 2, 2, f_setline}, + {"setqflist", 1, 1, f_setqflist}, {"setreg", 2, 3, f_setreg}, {"setwinvar", 3, 3, f_setwinvar}, {"simplify", 1, 1, f_simplify}, @@ -7578,36 +7614,6 @@ f_empty(argvars, rettv) } /* - * "errorlist()" function - */ -/*ARGSUSED*/ - static void -f_errorlist(argvars, rettv) - typval_T *argvars; - typval_T *rettv; -{ -#ifdef FEAT_QUICKFIX - list_T *l; -#endif - - rettv->vval.v_number = FALSE; -#ifdef FEAT_QUICKFIX - l = list_alloc(); - if (l != NULL) - { - if (get_errorlist(l) != FAIL) - { - rettv->vval.v_list = l; - rettv->v_type = VAR_LIST; - ++l->lv_refcount; - } - else - list_free(l); - } -#endif -} - -/* * "escape({string}, {chars})" function */ static void @@ -8915,6 +8921,36 @@ f_getline(argvars, rettv) } /* + * "getqflist()" function + */ +/*ARGSUSED*/ + static void +f_getqflist(argvars, rettv) + typval_T *argvars; + typval_T *rettv; +{ +#ifdef FEAT_QUICKFIX + list_T *l; +#endif + + rettv->vval.v_number = FALSE; +#ifdef FEAT_QUICKFIX + l = list_alloc(); + if (l != NULL) + { + if (get_errorlist(l) != FAIL) + { + rettv->vval.v_list = l; + rettv->v_type = VAR_LIST; + ++l->lv_refcount; + } + else + list_free(l); + } +#endif +} + +/* * "getreg()" function */ static void @@ -12291,6 +12327,30 @@ f_setline(argvars, rettv) } /* + * "setqflist()" function + */ +/*ARGSUSED*/ + static void +f_setqflist(argvars, rettv) + typval_T *argvars; + typval_T *rettv; +{ + rettv->vval.v_number = -1; + +#ifdef FEAT_QUICKFIX + if (argvars[0].v_type != VAR_LIST) + EMSG(_(e_listreq)); + else + { + list_T *l = argvars[0].vval.v_list; + + if (l != NULL && set_errorlist(l) == OK) + rettv->vval.v_number = 0; + } +#endif +} + +/* * "setreg()" function */ static void diff --git a/src/installml.sh b/src/installml.sh index bae0a8e364..8cb9264530 100644 --- a/src/installml.sh +++ b/src/installml.sh @@ -38,7 +38,7 @@ rgviewname=${14} gvimdiffname=${15} eviewname=${16} -if test $what = "install" -a (-e $destdir/$vimname.1 -o -e $destdir/$vimdiffname.1 -o -e $destdir/$eviewname.1); then +if test $what = "install" -a \( -e $destdir/$vimname.1 -o -e $destdir/$vimdiffname.1 -o -e $destdir/$eviewname.1 \); then if test ! -d $destdir; then echo creating $destdir ./mkinstalldirs $destdir diff --git a/src/po/ko.po b/src/po/ko.po index 2b4ca85759..7e0b493bfc 100644 --- a/src/po/ko.po +++ b/src/po/ko.po @@ -161,8 +161,8 @@ msgid "line %ld of %ld --%d%%-- col " msgstr "%ld / %ld ÁÙ --%d%%-- Ä " #: buffer.c:2868 -msgid "[No file]" -msgstr "[ÆÄÀÏ ¾øÀ½]" +msgid "[No Name]" +msgstr "[À̸§ ¾øÀ½]" #. must be a help buffer #: buffer.c:2908 diff --git a/src/proto/quickfix.pro b/src/proto/quickfix.pro index c731876683..87621ca58f 100644 --- a/src/proto/quickfix.pro +++ b/src/proto/quickfix.pro @@ -21,6 +21,7 @@ void ex_cfile __ARGS((exarg_T *eap)); void ex_vimgrep __ARGS((exarg_T *eap)); char_u *skip_vimgrep_pat __ARGS((char_u *p, char_u **s, int *flags)); int get_errorlist __ARGS((list_T *list)); +int set_errorlist __ARGS((list_T *list)); void ex_cbuffer __ARGS((exarg_T *eap)); void ex_helpgrep __ARGS((exarg_T *eap)); /* vim: set ft=c : */ |