Revision d432821e0b869cae47e59d2541eee1243ee75630 authored by Simeon Schaub on 20 October 2023, 00:16:42 UTC, committed by GitHub on 20 October 2023, 00:16:42 UTC
Should fix the failures observed in JuliaLang/BugReporting.jl#141. Test
for this is in #51776 which depends on afromentioned PR which depends on
this fix.
1 parent cd82984
Raw File
bin2hex.scm
(define (read-u8) (io.read *input-stream* 'uint8))
(define modulo mod)
(define display princ)
(let loop ((b (read-u8))
           (i 0))
  (if (not (eof-object? b))
      (begin
        (if (> i 0)
            (display ", "))
        (display "0x") (display (number->string b 16))
        (if (= 0 (modulo (+ 1 i) 16))
            (newline))
        (loop (read-u8) (+ 1 i)))))
(newline)
back to top