* validate.h
[bpt/guile.git] / libguile / values.c
index a5377e6..2fbfaaa 100644 (file)
@@ -61,13 +61,10 @@ print_values (SCM obj, SCM pwps)
   SCM port = SCM_PORT_WITH_PS_PORT (pwps);
   scm_print_state *ps = SCM_PRINT_STATE (SCM_PORT_WITH_PS_PS (pwps));
 
-  while (SCM_CONSP (values))
-    {
-      scm_iprin1 (SCM_CAR (values), port, ps);
-      values = SCM_CDR (values);
-      if (SCM_CONSP (values))
-       scm_newline (port);
-    }
+  scm_puts ("#<values ", port);
+  scm_iprin1 (values, port, ps);
+  scm_puts (">", port);
+
   return SCM_UNSPECIFIED;
 }
 
@@ -80,7 +77,7 @@ SCM_DEFINE (scm_values, "values", 0, 0, 1,
            "were not created by @code{call-with-values} is unspecified.")
 #define FUNC_NAME s_scm_values
 {
-  long n;
+  scm_bits_t n;
   SCM result;
 
   SCM_VALIDATE_LIST_COPYLEN (1, args, n);
@@ -99,7 +96,8 @@ SCM_DEFINE (scm_values, "values", 0, 0, 1,
 void
 scm_init_values (void)
 {
-  SCM print = scm_make_subr ("%print-values", scm_tc7_subr_2, print_values);
+  SCM print = scm_c_define_subr ("%print-values", scm_tc7_subr_2,
+                                print_values);
 
   scm_values_vtable 
     = scm_permanent_object (scm_make_vtable_vtable (scm_makfrom0str ("pr"),