Mercurial > vim
comparison src/evalfunc.c @ 18738:e0cd10f750e7 v8.1.2359
patch 8.1.2359: cannot build without FEAT_FLOAT
Commit: https://github.com/vim/vim/commit/0387cae15ccdb8136381534a1f2c96b222346432
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Nov 29 21:07:58 2019 +0100
patch 8.1.2359: cannot build without FEAT_FLOAT
Problem: Cannot build without FEAT_FLOAT. (John Marriott)
Solution: Fix #ifdefs around f_srand().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 29 Nov 2019 21:15:03 +0100 |
parents | 2513e666aa82 |
children | e9b2ade1adbd |
comparison
equal
deleted
inserted
replaced
18737:dad81eee6723 | 18738:e0cd10f750e7 |
---|---|
224 static void f_spellbadword(typval_T *argvars, typval_T *rettv); | 224 static void f_spellbadword(typval_T *argvars, typval_T *rettv); |
225 static void f_spellsuggest(typval_T *argvars, typval_T *rettv); | 225 static void f_spellsuggest(typval_T *argvars, typval_T *rettv); |
226 static void f_split(typval_T *argvars, typval_T *rettv); | 226 static void f_split(typval_T *argvars, typval_T *rettv); |
227 #ifdef FEAT_FLOAT | 227 #ifdef FEAT_FLOAT |
228 static void f_sqrt(typval_T *argvars, typval_T *rettv); | 228 static void f_sqrt(typval_T *argvars, typval_T *rettv); |
229 #endif | |
229 static void f_srand(typval_T *argvars, typval_T *rettv); | 230 static void f_srand(typval_T *argvars, typval_T *rettv); |
231 #ifdef FEAT_FLOAT | |
230 static void f_str2float(typval_T *argvars, typval_T *rettv); | 232 static void f_str2float(typval_T *argvars, typval_T *rettv); |
231 #endif | 233 #endif |
232 static void f_str2list(typval_T *argvars, typval_T *rettv); | 234 static void f_str2list(typval_T *argvars, typval_T *rettv); |
233 static void f_str2nr(typval_T *argvars, typval_T *rettv); | 235 static void f_str2nr(typval_T *argvars, typval_T *rettv); |
234 static void f_strchars(typval_T *argvars, typval_T *rettv); | 236 static void f_strchars(typval_T *argvars, typval_T *rettv); |
726 {"spellbadword", 0, 1, FEARG_1, f_spellbadword}, | 728 {"spellbadword", 0, 1, FEARG_1, f_spellbadword}, |
727 {"spellsuggest", 1, 3, FEARG_1, f_spellsuggest}, | 729 {"spellsuggest", 1, 3, FEARG_1, f_spellsuggest}, |
728 {"split", 1, 3, FEARG_1, f_split}, | 730 {"split", 1, 3, FEARG_1, f_split}, |
729 #ifdef FEAT_FLOAT | 731 #ifdef FEAT_FLOAT |
730 {"sqrt", 1, 1, FEARG_1, f_sqrt}, | 732 {"sqrt", 1, 1, FEARG_1, f_sqrt}, |
733 #endif | |
731 {"srand", 0, 1, FEARG_1, f_srand}, | 734 {"srand", 0, 1, FEARG_1, f_srand}, |
732 #endif | |
733 {"state", 0, 1, FEARG_1, f_state}, | 735 {"state", 0, 1, FEARG_1, f_state}, |
734 #ifdef FEAT_FLOAT | 736 #ifdef FEAT_FLOAT |
735 {"str2float", 1, 1, FEARG_1, f_str2float}, | 737 {"str2float", 1, 1, FEARG_1, f_str2float}, |
736 #endif | 738 #endif |
737 {"str2list", 1, 2, FEARG_1, f_str2list}, | 739 {"str2list", 1, 2, FEARG_1, f_str2list}, |
7090 if (get_float_arg(argvars, &f) == OK) | 7092 if (get_float_arg(argvars, &f) == OK) |
7091 rettv->vval.v_float = sqrt(f); | 7093 rettv->vval.v_float = sqrt(f); |
7092 else | 7094 else |
7093 rettv->vval.v_float = 0.0; | 7095 rettv->vval.v_float = 0.0; |
7094 } | 7096 } |
7097 #endif | |
7095 | 7098 |
7096 /* | 7099 /* |
7097 * "srand()" function | 7100 * "srand()" function |
7098 */ | 7101 */ |
7099 static void | 7102 static void |
7158 list_append_number(rettv->vval.v_list, (varnumber_T)SPLITMIX32); | 7161 list_append_number(rettv->vval.v_list, (varnumber_T)SPLITMIX32); |
7159 list_append_number(rettv->vval.v_list, (varnumber_T)SPLITMIX32); | 7162 list_append_number(rettv->vval.v_list, (varnumber_T)SPLITMIX32); |
7160 list_append_number(rettv->vval.v_list, (varnumber_T)SPLITMIX32); | 7163 list_append_number(rettv->vval.v_list, (varnumber_T)SPLITMIX32); |
7161 } | 7164 } |
7162 | 7165 |
7166 #ifdef FEAT_FLOAT | |
7163 /* | 7167 /* |
7164 * "str2float()" function | 7168 * "str2float()" function |
7165 */ | 7169 */ |
7166 static void | 7170 static void |
7167 f_str2float(typval_T *argvars, typval_T *rettv) | 7171 f_str2float(typval_T *argvars, typval_T *rettv) |