changelog shortlog graph tags branches changeset file revisions annotate raw help

Mercurial > core / lisp/std/fmt.lisp

revision 685: ebe3315b7add
parent 291: a0dfde3cb3c4
     1.1--- a/lisp/std/fmt.lisp	Sun Sep 29 00:31:24 2024 -0400
     1.2+++ b/lisp/std/fmt.lisp	Sun Sep 29 22:44:52 2024 -0400
     1.3@@ -23,17 +23,17 @@
     1.4   (format t ";;        *print-readably* = ~a~%" *print-readably*)
     1.5   (format t ";;    *print-right-margin* = ~a~%" *print-right-margin*))
     1.6 
     1.7-(defun fmt-row (data)
     1.8-  (format nil "| ~{~A~^ | ~} |~%" data))
     1.9+(defun fmt-row (data &optional stream)
    1.10+  (format stream "| ~{~A~^ | ~} |~%" data))
    1.11 
    1.12-(defun format-sxhash (code)
    1.13+(defun format-sxhash (code &optional stream)
    1.14   "Turn the fixnum value CODE into a human-friendly string. CODE should
    1.15 be produced by `sxhash'."
    1.16   (let (r)
    1.17     (dotimes (i 8 r)
    1.18       (push (ldb (byte 8 (* i 8)) code) r))
    1.19     (format
    1.20-     nil
    1.21+     stream
    1.22      "~{~A~^-~}"
    1.23      (mapcar
    1.24       (lambda (x) (format nil "~{~(~2,'0x~)~}" x))