aboutsummaryrefslogtreecommitdiff
path: root/module/hnh/util/io.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/hnh/util/io.scm')
-rw-r--r--module/hnh/util/io.scm14
1 files changed, 9 insertions, 5 deletions
diff --git a/module/hnh/util/io.scm b/module/hnh/util/io.scm
index 3a595b67..d638ebb4 100644
--- a/module/hnh/util/io.scm
+++ b/module/hnh/util/io.scm
@@ -1,19 +1,23 @@
(define-module (hnh util io)
:use-module ((hnh util) :select (begin1))
- :use-module ((ice-9 rdelim) :select (read-line)))
+ :use-module ((ice-9 rdelim) :select (read-line))
+ :export (open-input-port
+ open-output-port
+ read-lines
+ with-atomic-output-to-file))
-(define-public (open-input-port str)
+(define (open-input-port str)
(if (string=? "-" str)
(current-input-port)
(open-input-file str)))
-(define-public (open-output-port str)
+(define (open-output-port str)
(if (string=? "-" str)
(current-output-port)
(open-output-file str)))
-(define-public (read-lines port)
+(define (read-lines port)
(let ((line (read-line port)))
(if (eof-object? line)
'() (cons line (read-lines port)))))
@@ -26,7 +30,7 @@
;;
;; propagates the return value of @var{thunk} upon successfully writing
;; the file, and @code{#f} otherwise.
-(define-public (with-atomic-output-to-file filename thunk)
+(define (with-atomic-output-to-file filename thunk)
;; copy to enusre writable string
(define tmpfile (string-copy (string-append
(dirname filename)