(scm_i_print_double): New.
authorMarius Vollmer <mvo@zagadka.de>
Tue, 26 Oct 2004 16:53:23 +0000 (16:53 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Tue, 26 Oct 2004 16:53:23 +0000 (16:53 +0000)
libguile/numbers.c
libguile/numbers.h

index dde6645..6e3d6ac 100644 (file)
@@ -2315,6 +2315,13 @@ scm_print_real (SCM sexp, SCM port, scm_print_state *pstate SCM_UNUSED)
   return !0;
 }
 
+void
+scm_i_print_double (double val, SCM port)
+{
+  char num_buf[FLOBUFLEN];
+  scm_lfwrite (num_buf, idbl2str (val, num_buf, 10), port);
+}
+
 int
 scm_print_complex (SCM sexp, SCM port, scm_print_state *pstate SCM_UNUSED)
 
index 87bac7a..b4352c4 100644 (file)
@@ -282,6 +282,9 @@ SCM_API double scm_i_fraction2double (SCM z);
 SCM_API SCM scm_i_fraction_equalp (SCM x, SCM y);
 SCM_API int scm_i_print_fraction (SCM sexp, SCM port, scm_print_state *pstate);
 
+/* general internal functions */
+SCM_API void scm_i_print_double (double val, SCM port);
+
 /* conversion functions for integers */
 
 SCM_API int scm_is_integer (SCM val);