diff options
author | dos-reis <gdr@axiomatics.org> | 2011-05-29 02:28:09 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-05-29 02:28:09 +0000 |
commit | c220d4d9a44a3828d96e55b1b1a0756d3acea9fe (patch) | |
tree | 095a41566dc0299676d32d7c9068d9b0e392652d /src/interp/sys-utility.boot | |
parent | 05f1dbf1e8564c316a4e0ed7146b4991162f8875 (diff) | |
download | open-axiom-c220d4d9a44a3828d96e55b1b1a0756d3acea9fe.tar.gz |
* interp/sys-utility.boot (displayTextFile): New.
* interp/i-syscmd.boot (summary): Use it.
(copyright): Likewise.
* algebra/net.spad.pamphlet: Replace closeFile with closeStream.
* boot/translator.boot: Likewise.
* interp/as.boot: Likewise.
* interp/ax.boot: Likewise.
* interp/br-saturn.boot: Likewise.
* interp/br-search.boot: Likewise.
Diffstat (limited to 'src/interp/sys-utility.boot')
-rw-r--r-- | src/interp/sys-utility.boot | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot index 2fa38afa..53114135 100644 --- a/src/interp/sys-utility.boot +++ b/src/interp/sys-utility.boot @@ -41,6 +41,7 @@ namespace BOOT module sys_-utility where probeReadableFile : %String -> %Maybe %String remove!: (%List %Thing,%Thing) -> %List %Thing + displayTextFile: %Thing -> %Void --% $COMBLOCKLIST := nil @@ -379,3 +380,11 @@ remove!(l,x) == return l p := rest p +--% +displayTextFile f == + try + stream := inputTextFile f + while (line := readLine stream) ~= %nothing repeat + writeLine(line,$OutputStream) + finally + stream ~= nil => closeStream stream |