diff options
author | Marius Vollmer <mvo@zagadka.de> | 2004-07-23 15:43:02 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2004-07-23 15:43:02 +0000 |
commit | e11e83f3d99305ada6354cae7123fb8c0e998703 (patch) | |
tree | 23dccd2a0fd1741abb8561214acadc347036480b /libguile/num2float.i.c | |
parent | 928e0f421070bb610f3375d5808a6378d5edfa1b (diff) | |
download | guile-e11e83f3d99305ada6354cae7123fb8c0e998703.tar.gz |
* deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
SCM_INUM): Deprecated by reenaming them to SCM_I_INUMP, SCM_I_NINUMP
and SCM_I_INUM, respectively and adding deprecated versions to
deprecated.h and deprecated.c. Changed all uses to either use the
SCM_I_ variants or scm_is_*, scm_to_*, or scm_from_*, as appropriate.
Diffstat (limited to 'libguile/num2float.i.c')
-rw-r--r-- | libguile/num2float.i.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/libguile/num2float.i.c b/libguile/num2float.i.c index bfcf4bd10..e69de29bb 100644 --- a/libguile/num2float.i.c +++ b/libguile/num2float.i.c @@ -1,39 +0,0 @@ -/* this file is #include'd (several times) by numbers.c */ - -FTYPE -NUM2FLOAT (SCM num, unsigned long int pos, const char *s_caller) -{ - if (SCM_INUMP (num)) - return SCM_INUM (num); - else if (SCM_BIGP (num)) - { /* bignum */ - FTYPE res = mpz_get_d (SCM_I_BIG_MPZ (num)); - if (! xisinf (res)) - return res; - else - scm_out_of_range (s_caller, num); - } - else if (SCM_REALP (num)) - return SCM_REAL_VALUE (num); - else - scm_wrong_type_arg (s_caller, pos, num); -} - -SCM -FLOAT2NUM (FTYPE n) -{ - SCM z = scm_double_cell (scm_tc16_real, 0, 0, 0); - SCM_REAL_VALUE (z) = n; - return z; -} - -/* clean up */ -#undef FLOAT2NUM -#undef NUM2FLOAT -#undef FTYPE - -/* - Local Variables: - c-file-style: "gnu" - End: -*/ |