diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/as.boot | 4 | ||||
-rw-r--r-- | src/interp/ax.boot | 2 | ||||
-rw-r--r-- | src/interp/br-saturn.boot | 2 | ||||
-rw-r--r-- | src/interp/br-search.boot | 6 | ||||
-rw-r--r-- | src/interp/cstream.boot | 2 | ||||
-rw-r--r-- | src/interp/i-syscmd.boot | 4 | ||||
-rw-r--r-- | src/interp/int-top.boot | 4 | ||||
-rw-r--r-- | src/interp/lisplib.boot | 4 | ||||
-rw-r--r-- | src/interp/spad.lisp | 7 | ||||
-rw-r--r-- | src/interp/sys-utility.boot | 9 |
10 files changed, 23 insertions, 21 deletions
diff --git a/src/interp/as.boot b/src/interp/as.boot index 42939edb..c7533f8b 100644 --- a/src/interp/as.boot +++ b/src/interp/as.boot @@ -46,7 +46,7 @@ asList() == OBEY '"ls as/*.asy > temp.text" instream := inputTextFile '"temp.text" lines := [line := readLine instream while line ~= %nothing] - closeFile instream + closeStream instream lines asAll lines == @@ -429,7 +429,7 @@ asytran fn == asytranDeclaration(d,'(top),nil,false) if null name then hohohoho() tableValue($docHash,name) := $docHashLocal - closeFile inStream + closeStream inStream 'done mkNiladics u == diff --git a/src/interp/ax.boot b/src/interp/ax.boot index 9a2d774a..e3728a78 100644 --- a/src/interp/ax.boot +++ b/src/interp/ax.boot @@ -73,7 +73,7 @@ makeAxFile(filename, constructors) == ['Import, [], 'AxiomLib], ['Import, [], 'Boolean], :axForms] st := MAKE_-OUTSTREAM(filename) PPRINT(axForm,st) - closeFile st + closeStream st makeAxExportForm(filename, constructors) == $defaultFlag : local := false diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot index 2b0d4755..9af0e238 100644 --- a/src/interp/br-saturn.boot +++ b/src/interp/br-saturn.boot @@ -92,7 +92,7 @@ off()== -- '"/windows/temp/browser.text" -- $saturn => -- saturnEvalToFile(x, fn) --- runCommand '"cat /tmp/sat.text" +-- displayTextFile '"/tmp/sat.text" -- eval x diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot index 45c22ee4..ed3c9a19 100644 --- a/src/interp/br-search.boot +++ b/src/interp/br-search.boot @@ -228,7 +228,7 @@ grepSplit(lines,doc?) == kind = char "o" => ops := insert(line,ops) kind = char "-" => 'skip --for now systemError 'kind - if doc? then closeFile instream2 + if doc? then closeStream instream2 [['"attribute",:reverse! atts], ['"operation",:reverse! ops], ['"category",:reverse! cats], @@ -930,7 +930,7 @@ dbWriteLines(s, :options) == dbReadLines target == --AIX only--called by grepFile instream := inputTextFile target lines := [line := readLine instream while line ~= %nothing] - closeFile instream + closeStream instream lines dbGetCommentOrigin line == @@ -943,7 +943,7 @@ dbGetCommentOrigin line == instream := inputTextFile grepSource key --this always returns libdb now FILE_-POSITION(instream,readInteger address) line := readLine instream - closeFile instream + closeStream instream line grepSource key == diff --git a/src/interp/cstream.boot b/src/interp/cstream.boot index 5e158877..76a96ca2 100644 --- a/src/interp/cstream.boot +++ b/src/interp/cstream.boot @@ -58,7 +58,7 @@ incRgen s == incRgen1 s== a := readLine s - a = %nothing => (closeFile s;StreamNil) + a = %nothing => (closeStream s;StreamNil) [a,:incRgen s] incIgen n == diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index a9ed2364..1e995c05 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -877,10 +877,10 @@ withAsharpCmd args == --% )copyright -- display copyright notice summary l == - runCommand strconc('"cat _"", systemRootDirectory(),'"/lib/summary_"") + displayTextFile strconc(systemRootDirectory(),'"/lib/summary") copyright () == - runCommand strconc('"cat _"", systemRootDirectory(),'"/lib/copyright_"") + displayTextFile strconc(systemRootDirectory(),'"/lib/copyright") --% )credits -- display credit list diff --git a/src/interp/int-top.boot b/src/interp/int-top.boot index cc7edb7b..94e83572 100644 --- a/src/interp/int-top.boot +++ b/src/interp/int-top.boot @@ -215,7 +215,7 @@ intloopInclude(name, n) == try st := inputTextFile name intloopInclude0(st, name, n) - finally (if st ~= nil then closeFile st) + finally (if st ~= nil then closeStream st) intloopInclude1(name,n) == a:=ncloopIncFileName name @@ -352,7 +352,7 @@ ncloopInclude(name, n) == try st := inputTextFile name ncloopInclude0(st, name, n) - finally (if st ~= nil then closeFile st) + finally (if st ~= nil then closeStream st) ncloopInclude1(name,n) == a:=ncloopIncFileName name diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index 8e6aa7a3..06daed68 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -848,10 +848,10 @@ getIndexTable dir == try stream := inputTextFile indexFile GET_-INDEX_-TABLE_-FROM_-STREAM stream - finally (if stream ~= nil then closeFile stream) + finally (if stream ~= nil then closeStream stream) -- index file doesn't exist but mark this directory as a Lisplib. try stream := outputTextFile indexFile - finally (if stream ~= nil then closeFile stream) + finally (if stream ~= nil then closeStream stream) --% compDefineExports(form,ops,sig,e) == diff --git a/src/interp/spad.lisp b/src/interp/spad.lisp index b81fea44..02c9c87f 100644 --- a/src/interp/spad.lisp +++ b/src/interp/spad.lisp @@ -157,11 +157,6 @@ ; SYSTEM COMMANDS ;************************************************************************ -(defun CLEARDATABASE () (|runCommand| "ERASE MODEMAP DATABASE")) - -(defun erase (FN FT) - (|runCommand| (STRCONC "ERASE " (STRINGIMAGE FN) " " (STRINGIMAGE FT)))) - (defun READLISP (UPPER_CASE_FG) (let (v expr val ) (setq EXPR (READ-FROM-STRING @@ -203,8 +198,6 @@ ('T (/RQ-LIB))) (|terminateSystemCommand|)) -(defun CPSAY (X) (let (n) (if (EQ 0 (setq N (|runCommand| X))) NIL (PRINT N)))) - (defun |fin| () (SETQ *EOF* 'T) (THROW 'SPAD_READER NIL)) 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 |