diff options
author | Larry Wall <larry@netlabs.com> | 1993-12-10 00:00:00 +0000 |
---|---|---|
committer | Larry Wall <larry@netlabs.com> | 1993-12-10 00:00:00 +0000 |
commit | ed6116ce9b9d13712ea252ee248b0400653db7f9 (patch) | |
tree | 348e8de37401fa4381f6bfe0989abef2e3b409e0 /util.c | |
parent | 9bbf408117c16189b372e6657c9e5a15d01ea504 (diff) | |
download | perl-ed6116ce9b9d13712ea252ee248b0400653db7f9.tar.gz |
perl 5.0 alpha 5
[editor's note: the sparc executables have not been included,
and emacs backup files and other cruft such as patch backup files have
been removed. This was reconstructed from a tarball found on the
September 1994 InfoMagic CD]
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1500,6 +1500,24 @@ double f; along = (long)f; return (unsigned long)along; } +# undef BIGDOUBLE +#endif + +#ifndef CASTI32 +I32 +cast_i32(f) +double f; +{ +# define BIGDOUBLE 2147483648.0 /* Assume 32 bit int's ! */ +# define BIGNEGDOUBLE (-2147483648.0) + if (f >= BIGDOUBLE) + return (I32)fmod(f, BIGDOUBLE); + if (f <= BIGNEGDOUBLE) + return (I32)fmod(f, BIGNEGDOUBLE); + return (I32) f; +} +# undef BIGDOUBLE +# undef BIGNEGDOUBLE #endif #ifndef HAS_RENAME |