commit 40044ee095ebc56214d116a8195c191bac0cef70
parent baa1826e3d59609fde776e00317a4988c435953e
Author: Yuval Langer <yuval.langer@gmail.com>
Date: Sun, 14 Jan 2024 14:06:51 +0200
Use SRFI-28 format instead of string-append. More readable.
Diffstat:
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/rsv/commands.scm b/rsv/commands.scm
@@ -5,6 +5,7 @@
(scheme read)
(scheme write)
+ (srfi srfi-28)
(srfi srfi-41)
(rsv)
@@ -18,31 +19,24 @@
(begin
(define (display-help args)
(let ((arg0 (car args)))
- (display (string-append "Usage: "
- arg0
- " [OPTIONS]...
+ (display (format "Usage: ~a [OPTIONS]...
Keywords:
-h, --help Print this help message.
- -V, --version Display the version of "
- arg0
- " and exit.
+ -V, --version Display the version and exit.
Send bug reports and questions to <yuval.langer@gmail.com>.
-"))))
+" arg0))))
(define (display-version args)
(let ((arg0 (car args)))
- (display (string-append arg0
- " version "
- version
- "
+ (display (format "~a version ~a
Copyright (C) 2024 Yuval Langer
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
-"))))
+" arg0 version))))
(define (scm2rsv maybe-filename)
(write-rsv (read (file-or-current-input-port maybe-filename))