diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-06-02 17:07:18 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-02 17:07:18 +0200 |
commit | 01c798c31a94a50ad0c4a022fc21c1a31553be21 (patch) | |
tree | cc720adf347b3afa81846b110dd8f595eed5177c /src/eval.c | |
parent | a83d06026d0e0dad873de296bff97707ad2faff3 (diff) | |
download | vim-git-01c798c31a94a50ad0c4a022fc21c1a31553be21.tar.gz |
patch 8.2.2928: the evalfunc.c file is too bigv8.2.2928
Problem: The evalfunc.c file is too big.
Solution: Move float related functionality to a separate file. (Yegappan
Lakshmanan, closes #8287)
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/eval.c b/src/eval.c index e39c604ad..77578f365 100644 --- a/src/eval.c +++ b/src/eval.c @@ -5155,43 +5155,6 @@ string_quote(char_u *str, int function) return s; } -#if defined(FEAT_FLOAT) || defined(PROTO) -/* - * Convert the string "text" to a floating point number. - * This uses strtod(). setlocale(LC_NUMERIC, "C") has been used to make sure - * this always uses a decimal point. - * Returns the length of the text that was consumed. - */ - int -string2float( - char_u *text, - float_T *value) // result stored here -{ - char *s = (char *)text; - float_T f; - - // MS-Windows does not deal with "inf" and "nan" properly. - if (STRNICMP(text, "inf", 3) == 0) - { - *value = INFINITY; - return 3; - } - if (STRNICMP(text, "-inf", 3) == 0) - { - *value = -INFINITY; - return 4; - } - if (STRNICMP(text, "nan", 3) == 0) - { - *value = NAN; - return 3; - } - f = strtod(s, &s); - *value = f; - return (int)((char_u *)s - text); -} -#endif - /* * Convert the specified byte index of line 'lnum' in buffer 'buf' to a * character index. Works only for loaded buffers. Returns -1 on failure. |