diff options
author | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2001-01-18 13:35:45 +0000 |
---|---|---|
committer | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2001-01-18 13:35:45 +0000 |
commit | 5c75b29f1d3f318318a1645a268cd17d6452cbf5 (patch) | |
tree | e529e3bb84f4cbbd9096abf6a98492ddbdfc1e4c /libguile/numbers.h | |
parent | 339bfe47a1d2acee88f84e1ef5653b7b85d1d98a (diff) | |
download | guile-5c75b29f1d3f318318a1645a268cd17d6452cbf5.tar.gz |
* Cleaned up some limits-definitions.
Diffstat (limited to 'libguile/numbers.h')
-rw-r--r-- | libguile/numbers.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/libguile/numbers.h b/libguile/numbers.h index 6a78c5910..d5b2809e7 100644 --- a/libguile/numbers.h +++ b/libguile/numbers.h @@ -52,7 +52,6 @@ - /* Immediate Numbers * * Inums are exact integer data that fits within an SCM word. @@ -63,6 +62,11 @@ * SCM_INUMP (SCM_CAR (x)) can give wrong answers. */ +#define SCM_FIXNUM_BIT (SCM_LONG_BIT - 2) +#define SCM_MOST_POSITIVE_FIXNUM ((1L << (SCM_FIXNUM_BIT - 1)) - 1) +#define SCM_MOST_NEGATIVE_FIXNUM (-SCM_MOST_POSITIVE_FIXNUM - 1) + + /* SCM_SRS is signed right shift */ #if (-1 == (((-1) << 2) + 2) >> 2) # define SCM_SRS(x, y) ((x) >> (y)) @@ -111,15 +115,7 @@ /* SCM_INTBUFLEN is the maximum number of characters neccessary for the * printed or scm_string representation of an exact immediate. */ - -#ifndef SCM_CHAR_BIT -# define SCM_CHAR_BIT 8 -#endif /* ndef SCM_CHAR_BIT */ -#ifndef SCM_LONG_BIT -# define SCM_LONG_BIT (SCM_CHAR_BIT*sizeof(long)/sizeof(char)) -#endif /* ndef SCM_LONG_BIT */ -#define SCM_INTBUFLEN (5+SCM_LONG_BIT) - +#define SCM_INTBUFLEN (5 + SCM_LONG_BIT) |