commit df423e5ddea20ac71b3bbed0cb4e4ac8251e3024 parent dae5cb3aa1cd31070061a65a1cd211eef091a49d Author: Yuval Langer <yuval.langer@gmail.com> Date: Sun, 14 Jan 2024 11:15:33 +0200 Import from the real library, and use standard `cond` instead of non-standard `match`. Diffstat:
M | bin/rsv2scm.scm | | | 11 | +++++------ |
M | bin/scm2rsv.scm | | | 10 | ++++------ |
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/bin/rsv2scm.scm b/bin/rsv2scm.scm @@ -21,11 +21,10 @@ (import (scheme base) (scheme file) (scheme write) - (ice-9 match) - (rsv arbitrary-null)) + (rsv)) (define (main args) - (match args - ((arg0) - (write (rsv->scm #f (current-input-port))) - (newline)))) + (cond + ((= (length args) 1) + (write (read-rsv #f (current-input-port))) + (newline)))) diff --git a/bin/scm2rsv.scm b/bin/scm2rsv.scm @@ -21,14 +21,12 @@ (import (scheme base) (scheme file) (scheme write) - (ice-9 match) - (ice-9 pretty-print) (rsv)) (define (main args) - (match args - ((arg0) - (let ((scm (read (current-input-port)))) - (scm->rsv scm + (cond + ((= (length args) 1) + (let ((scm (read (current-input-port)))) + (write-rsv scm not (current-output-port))))))