(Vector Data): For SCM_VECTOR_BASE, SCM_STRING_CHARS
[bpt/guile.git] / ice-9 / format.scm
index 35caeed..486dc72 100644 (file)
 
 (define-module (ice-9 format)
   :use-module (ice-9 and-let-star)
-  :autoload (ice-9 pretty-print) (pretty-print))
-
-(export format
-       format:symbol-case-conv
-       format:iobj-case-conv
-       format:expch)
+  :use-module (ice-9 threads)
+  :autoload (ice-9 pretty-print) (pretty-print)
+  :replace (format)
+  :export (format:symbol-case-conv
+          format:iobj-case-conv
+          format:expch))
 
 ;;; Configuration ------------------------------------------------------------
 
@@ -89,7 +89,7 @@
   (do ((k i (+ k 1)))
       ((= k n))
     (write-char (string-ref str k) format:port))
-  (set! format:output-col (+ format:output-col n)))
+  (set! format:output-col (+ format:output-col (- n i))))
 
 ;(define (format:out-fill n ch)       ; this allocates a new string
 ;  (format:out-str (make-string n ch)))
 
 (define format:abort (lambda () (error "error in format")))
 
-(define format format:format)
+(define (format . args) (monitor (apply format:format args)))
+
 ;; Thanks to Shuji Narazaki
 (module-set! the-root-module 'format format)