|
25 | 25 | #endif |
26 | 26 |
|
27 | 27 | static char *e_listblobarg = N_("E899: Argument of %s must be a List or Blob"); |
28 | | -static char *e_stringreq = N_("E928: String required"); |
29 | 28 |
|
30 | 29 | #ifdef FEAT_FLOAT |
31 | 30 | static void f_abs(typval_T *argvars, typval_T *rettv); |
@@ -141,11 +140,9 @@ static void f_getftime(typval_T *argvars, typval_T *rettv); |
141 | 140 | static void f_getftype(typval_T *argvars, typval_T *rettv); |
142 | 141 | static void f_getjumplist(typval_T *argvars, typval_T *rettv); |
143 | 142 | static void f_getline(typval_T *argvars, typval_T *rettv); |
144 | | -static void f_getloclist(typval_T *argvars UNUSED, typval_T *rettv UNUSED); |
145 | 143 | static void f_getpid(typval_T *argvars, typval_T *rettv); |
146 | 144 | static void f_getcurpos(typval_T *argvars, typval_T *rettv); |
147 | 145 | static void f_getpos(typval_T *argvars, typval_T *rettv); |
148 | | -static void f_getqflist(typval_T *argvars, typval_T *rettv); |
149 | 146 | static void f_getreg(typval_T *argvars, typval_T *rettv); |
150 | 147 | static void f_getregtype(typval_T *argvars, typval_T *rettv); |
151 | 148 | static void f_gettabinfo(typval_T *argvars, typval_T *rettv); |
@@ -279,9 +276,7 @@ static void f_setcmdpos(typval_T *argvars, typval_T *rettv); |
279 | 276 | static void f_setenv(typval_T *argvars, typval_T *rettv); |
280 | 277 | static void f_setfperm(typval_T *argvars, typval_T *rettv); |
281 | 278 | static void f_setline(typval_T *argvars, typval_T *rettv); |
282 | | -static void f_setloclist(typval_T *argvars, typval_T *rettv); |
283 | 279 | static void f_setpos(typval_T *argvars, typval_T *rettv); |
284 | | -static void f_setqflist(typval_T *argvars, typval_T *rettv); |
285 | 280 | static void f_setreg(typval_T *argvars, typval_T *rettv); |
286 | 281 | static void f_settagstack(typval_T *argvars, typval_T *rettv); |
287 | 282 | #ifdef FEAT_CRYPT |
@@ -4771,49 +4766,6 @@ f_getline(typval_T *argvars, typval_T *rettv) |
4771 | 4766 | get_buffer_lines(curbuf, lnum, end, retlist, rettv); |
4772 | 4767 | } |
4773 | 4768 |
|
4774 | | -#ifdef FEAT_QUICKFIX |
4775 | | - static void |
4776 | | -get_qf_loc_list(int is_qf, win_T *wp, typval_T *what_arg, typval_T *rettv) |
4777 | | -{ |
4778 | | - if (what_arg->v_type == VAR_UNKNOWN) |
4779 | | - { |
4780 | | - if (rettv_list_alloc(rettv) == OK) |
4781 | | - if (is_qf || wp != NULL) |
4782 | | - (void)get_errorlist(NULL, wp, -1, rettv->vval.v_list); |
4783 | | - } |
4784 | | - else |
4785 | | - { |
4786 | | - if (rettv_dict_alloc(rettv) == OK) |
4787 | | - if (is_qf || (wp != NULL)) |
4788 | | - { |
4789 | | - if (what_arg->v_type == VAR_DICT) |
4790 | | - { |
4791 | | - dict_T *d = what_arg->vval.v_dict; |
4792 | | - |
4793 | | - if (d != NULL) |
4794 | | - qf_get_properties(wp, d, rettv->vval.v_dict); |
4795 | | - } |
4796 | | - else |
4797 | | - emsg(_(e_dictreq)); |
4798 | | - } |
4799 | | - } |
4800 | | -} |
4801 | | -#endif |
4802 | | - |
4803 | | -/* |
4804 | | - * "getloclist()" function |
4805 | | - */ |
4806 | | - static void |
4807 | | -f_getloclist(typval_T *argvars UNUSED, typval_T *rettv UNUSED) |
4808 | | -{ |
4809 | | -#ifdef FEAT_QUICKFIX |
4810 | | - win_T *wp; |
4811 | | - |
4812 | | - wp = find_win_by_nr_or_id(&argvars[0]); |
4813 | | - get_qf_loc_list(FALSE, wp, &argvars[1], rettv); |
4814 | | -#endif |
4815 | | -} |
4816 | | - |
4817 | 4769 | /* |
4818 | 4770 | * "getpid()" function |
4819 | 4771 | */ |
@@ -4894,17 +4846,6 @@ f_getpos(typval_T *argvars, typval_T *rettv) |
4894 | 4846 | getpos_both(argvars, rettv, FALSE); |
4895 | 4847 | } |
4896 | 4848 |
|
4897 | | -/* |
4898 | | - * "getqflist()" function |
4899 | | - */ |
4900 | | - static void |
4901 | | -f_getqflist(typval_T *argvars UNUSED, typval_T *rettv UNUSED) |
4902 | | -{ |
4903 | | -#ifdef FEAT_QUICKFIX |
4904 | | - get_qf_loc_list(TRUE, NULL, &argvars[0], rettv); |
4905 | | -#endif |
4906 | | -} |
4907 | | - |
4908 | 4849 | /* |
4909 | 4850 | * "getreg()" function |
4910 | 4851 | */ |
@@ -9625,90 +9566,6 @@ f_setline(typval_T *argvars, typval_T *rettv) |
9625 | 9566 | set_buffer_lines(curbuf, lnum, FALSE, &argvars[1], rettv); |
9626 | 9567 | } |
9627 | 9568 |
|
9628 | | -/* |
9629 | | - * Used by "setqflist()" and "setloclist()" functions |
9630 | | - */ |
9631 | | - static void |
9632 | | -set_qf_ll_list( |
9633 | | - win_T *wp UNUSED, |
9634 | | - typval_T *list_arg UNUSED, |
9635 | | - typval_T *action_arg UNUSED, |
9636 | | - typval_T *what_arg UNUSED, |
9637 | | - typval_T *rettv) |
9638 | | -{ |
9639 | | -#ifdef FEAT_QUICKFIX |
9640 | | - static char *e_invact = N_("E927: Invalid action: '%s'"); |
9641 | | - char_u *act; |
9642 | | - int action = 0; |
9643 | | - static int recursive = 0; |
9644 | | -#endif |
9645 | | - |
9646 | | - rettv->vval.v_number = -1; |
9647 | | - |
9648 | | -#ifdef FEAT_QUICKFIX |
9649 | | - if (list_arg->v_type != VAR_LIST) |
9650 | | - emsg(_(e_listreq)); |
9651 | | - else if (recursive != 0) |
9652 | | - emsg(_(e_au_recursive)); |
9653 | | - else |
9654 | | - { |
9655 | | - list_T *l = list_arg->vval.v_list; |
9656 | | - dict_T *d = NULL; |
9657 | | - int valid_dict = TRUE; |
9658 | | - |
9659 | | - if (action_arg->v_type == VAR_STRING) |
9660 | | - { |
9661 | | - act = tv_get_string_chk(action_arg); |
9662 | | - if (act == NULL) |
9663 | | - return; /* type error; errmsg already given */ |
9664 | | - if ((*act == 'a' || *act == 'r' || *act == ' ' || *act == 'f') && |
9665 | | - act[1] == NUL) |
9666 | | - action = *act; |
9667 | | - else |
9668 | | - semsg(_(e_invact), act); |
9669 | | - } |
9670 | | - else if (action_arg->v_type == VAR_UNKNOWN) |
9671 | | - action = ' '; |
9672 | | - else |
9673 | | - emsg(_(e_stringreq)); |
9674 | | - |
9675 | | - if (action_arg->v_type != VAR_UNKNOWN |
9676 | | - && what_arg->v_type != VAR_UNKNOWN) |
9677 | | - { |
9678 | | - if (what_arg->v_type == VAR_DICT) |
9679 | | - d = what_arg->vval.v_dict; |
9680 | | - else |
9681 | | - { |
9682 | | - emsg(_(e_dictreq)); |
9683 | | - valid_dict = FALSE; |
9684 | | - } |
9685 | | - } |
9686 | | - |
9687 | | - ++recursive; |
9688 | | - if (l != NULL && action && valid_dict && set_errorlist(wp, l, action, |
9689 | | - (char_u *)(wp == NULL ? ":setqflist()" : ":setloclist()"), |
9690 | | - d) == OK) |
9691 | | - rettv->vval.v_number = 0; |
9692 | | - --recursive; |
9693 | | - } |
9694 | | -#endif |
9695 | | -} |
9696 | | - |
9697 | | -/* |
9698 | | - * "setloclist()" function |
9699 | | - */ |
9700 | | - static void |
9701 | | -f_setloclist(typval_T *argvars, typval_T *rettv) |
9702 | | -{ |
9703 | | - win_T *win; |
9704 | | - |
9705 | | - rettv->vval.v_number = -1; |
9706 | | - |
9707 | | - win = find_win_by_nr_or_id(&argvars[0]); |
9708 | | - if (win != NULL) |
9709 | | - set_qf_ll_list(win, &argvars[1], &argvars[2], &argvars[3], rettv); |
9710 | | -} |
9711 | | - |
9712 | 9569 | /* |
9713 | 9570 | * "setpos()" function |
9714 | 9571 | */ |
@@ -9752,15 +9609,6 @@ f_setpos(typval_T *argvars, typval_T *rettv) |
9752 | 9609 | } |
9753 | 9610 | } |
9754 | 9611 |
|
9755 | | -/* |
9756 | | - * "setqflist()" function |
9757 | | - */ |
9758 | | - static void |
9759 | | -f_setqflist(typval_T *argvars, typval_T *rettv) |
9760 | | -{ |
9761 | | - set_qf_ll_list(NULL, &argvars[0], &argvars[1], &argvars[2], rettv); |
9762 | | -} |
9763 | | - |
9764 | 9612 | /* |
9765 | 9613 | * "setreg()" function |
9766 | 9614 | */ |
|
0 commit comments