Mercurial > vim
comparison src/evalfunc.c @ 26895:46e6ef4cf18b v8.2.3976
patch 8.2.3976: FEARG_LAST is never used
Commit: https://github.com/vim/vim/commit/b34689010a587e85ff724051f276513a15c634d0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 1 19:42:16 2022 +0000
patch 8.2.3976: FEARG_LAST is never used
Problem: FEARG_LAST is never used. (Dominique Pell?)
Solution: Remove FEARG_LAST and the related code.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 01 Jan 2022 20:45:04 +0100 |
parents | 612339679616 |
children | ccb9be1cdd71 |
comparison
equal
deleted
inserted
replaced
26894:c14895e06302 | 26895:46e6ef4cf18b |
---|---|
1200 // values for f_argtype; zero means it cannot be used as a method | 1200 // values for f_argtype; zero means it cannot be used as a method |
1201 #define FEARG_1 1 // base is the first argument | 1201 #define FEARG_1 1 // base is the first argument |
1202 #define FEARG_2 2 // base is the second argument | 1202 #define FEARG_2 2 // base is the second argument |
1203 #define FEARG_3 3 // base is the third argument | 1203 #define FEARG_3 3 // base is the third argument |
1204 #define FEARG_4 4 // base is the fourth argument | 1204 #define FEARG_4 4 // base is the fourth argument |
1205 #define FEARG_LAST 9 // base is the last argument | |
1206 | 1205 |
1207 #ifdef FEAT_FLOAT | 1206 #ifdef FEAT_FLOAT |
1208 # define FLOAT_FUNC(name) name | 1207 # define FLOAT_FUNC(name) name |
1209 #else | 1208 #else |
1210 # define FLOAT_FUNC(name) NULL | 1209 # define FLOAT_FUNC(name) NULL |
2716 if (argcount + 1 < global_functions[fi].f_min_argc) | 2715 if (argcount + 1 < global_functions[fi].f_min_argc) |
2717 return FCERR_TOOFEW; | 2716 return FCERR_TOOFEW; |
2718 if (argcount + 1 > global_functions[fi].f_max_argc) | 2717 if (argcount + 1 > global_functions[fi].f_max_argc) |
2719 return FCERR_TOOMANY; | 2718 return FCERR_TOOMANY; |
2720 | 2719 |
2721 if (global_functions[fi].f_argtype == FEARG_LAST) | 2720 if (global_functions[fi].f_argtype == FEARG_2) |
2722 { | |
2723 // base value goes last | |
2724 for (i = 0; i < argcount; ++i) | |
2725 argv[i] = argvars[i]; | |
2726 argv[argcount] = *basetv; | |
2727 } | |
2728 else if (global_functions[fi].f_argtype == FEARG_2) | |
2729 { | 2721 { |
2730 // base value goes second | 2722 // base value goes second |
2731 argv[0] = argvars[0]; | 2723 argv[0] = argvars[0]; |
2732 argv[1] = *basetv; | 2724 argv[1] = *basetv; |
2733 for (i = 1; i < argcount; ++i) | 2725 for (i = 1; i < argcount; ++i) |