Mercurial > vim
diff src/eval.c @ 2529:2aaa88366cbb vim73
Fix for float values on VMS. (Zoltan Arpadffy)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Mon, 09 Aug 2010 22:07:08 +0200 |
parents | a88237afdb20 |
children | 9fe4164cb586 |
line wrap: on
line diff
--- a/src/eval.c +++ b/src/eval.c @@ -22,6 +22,10 @@ # include <time.h> /* for strftime() */ #endif +#ifdef VMS +# include <float.h> +#endif + #ifdef MACOS # include <time.h> /* for time_t */ #endif @@ -4807,11 +4811,11 @@ eval6(arg, rettv, evaluate, want_string) if (f2 == 0.0) { if (f1 == 0) - f1 = -0x7fffffffL - 1L; /* similar to NaN */ + f1 = -1 * __F_FLT_MAX - 1L; /* similar to NaN */ else if (f1 < 0) - f1 = -0x7fffffffL; + f1 = -1 * __F_FLT_MAX; else - f1 = 0x7fffffffL; + f1 = __F_FLT_MAX; } else f1 = f1 / f2;