summaryrefslogtreecommitdiff
path: root/libguile/numbers.h
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2004-10-22 13:50:39 +0000
committerMarius Vollmer <mvo@zagadka.de>2004-10-22 13:50:39 +0000
commit2881e77b5a00d8fa397b5c302dd60afd2de49d2d (patch)
treeacfbdfb7b85002e075e561375bb3dfb3dbd5b0e8 /libguile/numbers.h
parent77c2594f2f88fc8c2ec79126c9f04c9eb8b2d057 (diff)
downloadguile-2881e77b5a00d8fa397b5c302dd60afd2de49d2d.tar.gz
(SCM_T_INTBUFLEN): Increased to cover
scm_t_intmax values. (scm_uint2str): New, for scm_t_uintmax. (scm_iint2str): Argument type changed to scm_t_intmax, reimplemented in terms of scm_uint2str.
Diffstat (limited to 'libguile/numbers.h')
-rw-r--r--libguile/numbers.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/libguile/numbers.h b/libguile/numbers.h
index f663e9e85..87bac7a4a 100644
--- a/libguile/numbers.h
+++ b/libguile/numbers.h
@@ -111,10 +111,12 @@
#endif /* def FLT_MAX */
-/* SCM_INTBUFLEN is the maximum number of characters neccessary for the
- * printed or scm_string representation of an exact immediate.
+/* SCM_INTBUFLEN is the maximum number of characters neccessary for
+ * the printed or scm_string representation of an scm_t_intmax in
+ * radix 2. The buffer passed to scm_iint2str and scm_iuint2str must
+ * be of this size, for example.
*/
-#define SCM_INTBUFLEN (5 + SCM_LONG_BIT)
+#define SCM_INTBUFLEN (5 + SCM_CHAR_BIT*sizeof(scm_t_intmax))
@@ -208,7 +210,8 @@ SCM_API SCM scm_bit_extract (SCM n, SCM start, SCM end);
SCM_API SCM scm_logcount (SCM n);
SCM_API SCM scm_integer_length (SCM n);
-SCM_API size_t scm_iint2str (long num, int rad, char *p);
+SCM_API size_t scm_iint2str (scm_t_intmax num, int rad, char *p);
+SCM_API size_t scm_iuint2str (scm_t_uintmax num, int rad, char *p);
SCM_API SCM scm_number_to_string (SCM x, SCM radix);
SCM_API int scm_print_real (SCM sexp, SCM port, scm_print_state *pstate);
SCM_API int scm_print_complex (SCM sexp, SCM port, scm_print_state *pstate);