diff options
author | dos-reis <gdr@axiomatics.org> | 2012-05-25 04:15:27 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2012-05-25 04:15:27 +0000 |
commit | 425777c747c5972163c1743d6d0ad0216eabf066 (patch) | |
tree | 31b2b5d41e22006e709d5229d4e5fbe6c94b3b2d /src | |
parent | 20ce2990a91a76c43ef0d255baf7a773291d6779 (diff) | |
download | open-axiom-425777c747c5972163c1743d6d0ad0216eabf066.tar.gz |
/EDITFILE cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/interp/c-doc.boot | 2 | ||||
-rw-r--r-- | src/interp/cparse.boot | 2 | ||||
-rw-r--r-- | src/interp/debug.lisp | 8 | ||||
-rw-r--r-- | src/interp/define.boot | 6 | ||||
-rw-r--r-- | src/interp/i-syscmd.boot | 18 | ||||
-rw-r--r-- | src/interp/i-toplev.boot | 2 | ||||
-rw-r--r-- | src/interp/lisplib.boot | 4 | ||||
-rw-r--r-- | src/interp/record.boot | 4 | ||||
-rw-r--r-- | src/interp/setvars.boot | 2 | ||||
-rw-r--r-- | src/interp/spad.lisp | 6 | ||||
-rw-r--r-- | src/interp/sys-globals.boot | 4 |
11 files changed, 30 insertions, 28 deletions
diff --git a/src/interp/c-doc.boot b/src/interp/c-doc.boot index 485f28fe..dc4868db 100644 --- a/src/interp/c-doc.boot +++ b/src/interp/c-doc.boot @@ -1233,7 +1233,7 @@ docreport(nam) == runCommand '"cat temp1.input docreport.trailer > docreport.input" removeFile '"temp.input" removeFile '"temp1.input" - SETQ(_/EDITFILE,'"docreport.input") + $editFile := '"docreport.input" _/RQ() setOutStream nam == diff --git a/src/interp/cparse.boot b/src/interp/cparse.boot index 79de955f..be4fcd06 100644 --- a/src/interp/cparse.boot +++ b/src/interp/cparse.boot @@ -1104,7 +1104,7 @@ _/RQ_,LIB(:x) == _/RF_-1 x == - ifile := MAKE_-INPUT_-FILENAME _/EDITFILE + ifile := MAKE_-INPUT_-FILENAME $editFile lfile := nil type := PATHNAME_-TYPE ifile type = '"boot" => diff --git a/src/interp/debug.lisp b/src/interp/debug.lisp index 18b3d2f6..5e038fc5 100644 --- a/src/interp/debug.lisp +++ b/src/interp/debug.lisp @@ -63,9 +63,9 @@ (MAKEPROP 'SPAD '/TERMCHR '(#\: #\< #\ #\()) (MAKEPROP 'BOOT '/TERMCHR '(#\: #\< #\ #\()) -(defmacro |/C,LIB| (&rest L &aux optionlist /editfile +(defmacro |/C,LIB| (&rest L &aux optionlist |$editFile| ($prettyprint 't) ($reportCompilation 't)) - (declare (special optionlist /editfile $prettyprint $reportComilation)) + (declare (special optionlist |$editFile| $prettyprint $reportComilation)) `',(|compileConstructorLib| L (/COMP) NIL NIL)) (defmacro /C (&rest L) `',(/D-1 L (/COMP) NIL NIL)) @@ -175,8 +175,8 @@ (cond ( INFILE (SETQ /SOURCEFILES (CONS INFILE (REMOVE INFILE /SOURCEFILES))) (LIST INFILE)) - ( /EDITFILE - (|insert| (|pathname| /EDITFILE) /SOURCEFILES)) + (|$editFile| + (|insert| (|pathname| |$editFile|) /SOURCEFILES)) ( 't /SOURCEFILES))) (SETQ RECNO (dolist (file sourcefiles) diff --git a/src/interp/define.boot b/src/interp/define.boot index fa24ec4a..4779e3e8 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -1525,7 +1525,7 @@ incompleteFunctorBody(db,m,body,e) == body is ['SubDomain,dom,pred] => [dom,pred] body is ['add,['SubDomain,dom,pred],:.] => [dom,pred] nil - [bootStrapError(dbConstructorForm db, _/EDITFILE),m,e] + [bootStrapError(dbConstructorForm db,$editFile),m,e] ++ Subroutine of compDefineFunctor1. Called to generate backend code ++ for a functor definition. @@ -2150,7 +2150,7 @@ compAdd(['add,$addForm,capsule],m,e) == ['$bootStrapMode, _ code],_ ['%otherwise, ['systemError,['%list,'"%b",MKQ $functorForm.op,'"%d",'"from", _ - '"%b",MKQ namestring _/EDITFILE,'"%d",'"needs to be compiled"]]]],m,e] + '"%b",MKQ namestring $editFile,'"%d",'"needs to be compiled"]]]],m,e] $addFormLhs: local:= $addForm db := constructorDB currentConstructor e if $addForm is ["SubDomain",domainForm,predicate] then @@ -2177,7 +2177,7 @@ compTuple2Record u == compCapsule(['CAPSULE,:itemList],m,e) == $bootStrapMode => - [bootStrapError($functorForm, _/EDITFILE),m,e] + [bootStrapError($functorForm, $editFile),m,e] $insideExpressionIfTrue: local:= false $useRepresentationHack := true clearCapsuleFunctionTable() diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index f79f9baa..02f69f23 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -411,8 +411,8 @@ constructor args == compiler args == $newConlist: local := nil --reset by compDefineLisplib and astran - null args and null $options and null _/EDITFILE => helpSpad2Cmd '(compiler) - if null args then args := [_/EDITFILE] + null args and null $options and $editFile = nil => helpSpad2Cmd '(compiler) + if null args then args := [$editFile] -- first see if the user has explicitly specified the compiler -- to use. @@ -448,8 +448,8 @@ compiler args == af1 and pathnameType(af1) = '"spad" => compileSpad2Cmd [af1] - -- maybe /EDITFILE has some stuff that can help us - ef := pathname _/EDITFILE + -- maybe $editFile has some stuff that can help us + ef := pathname $editFile ef := mergePathnames(af,ef) ef = af => throwKeyedMsg("S2IZ0039", nil) @@ -520,7 +520,7 @@ compileSpad2Cmd args == pathnameType path ~= '"spad" => throwKeyedMsg("S2IZ0082", nil) null PROBE_-FILE path => throwKeyedMsg("S2IL0003",[namestring args]) - SETQ(_/EDITFILE, path) + $editFile := path updateSourceFiles path sayKeyedMsg("S2IZ0038",[namestring args]) @@ -970,7 +970,7 @@ edit l == editSpad2Cmd l editSpad2Cmd l == l:= - null l => _/EDITFILE + null l => $editFile first l l := pathname STRING l oldDir := pathnameDirectory l @@ -983,7 +983,7 @@ editSpad2Cmd l == oldDir = '"" => pathname $FINDFILE (pathnameName l, fileTypes) l l := pathname ll - SETQ(_/EDITFILE,l) + $editFile := l rc := editFile l updateSourceFiles l rc @@ -1988,7 +1988,7 @@ readSpad2Cmd l == fullopt is 'ifthere => ifthere := true fullopt is 'quiet => quiet := true - ef := pathname _/EDITFILE + ef := pathname $editFile if pathnameTypeId(ef) = 'SPAD then ef := makePathname(pathnameName ef,'"*",'"*") if l then @@ -2011,7 +2011,7 @@ readSpad2Cmd l == fs := namestring l member(upft,devFTs) => throwKeyedMsg("S2IZ0033",[fs]) throwKeyedMsg("S2IZ0034",[fs]) - SETQ(_/EDITFILE,ll) + $editFile := ll if upft = '"BOOT" then $InteractiveMode := nil _/READ(ll,quiet) diff --git a/src/interp/i-toplev.boot b/src/interp/i-toplev.boot index 56b01266..be0b4496 100644 --- a/src/interp/i-toplev.boot +++ b/src/interp/i-toplev.boot @@ -114,7 +114,7 @@ readSpadProfileIfThere() == -- reads SPADPROF INPUT if it exists file := ['_.axiom,'input] MAKE_-INPUT_-FILENAME file => - SETQ(_/EDITFILE,file) + $editFile := file _/RQ () nil diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index a22c7f05..a65d6f4a 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -406,7 +406,7 @@ compConLib1(fun,infileOrNil,outfileOrNil,auxOp,editFlag,traceFlag) == libName:= getConstructorAbbreviation fun infile:= infileOrNil or getFunctionSourceFile fun or throwKeyedMsg("S2IL0004",[fun]) - SETQ(_/EDITFILE,infile) + $editFile := infile outfile := outfileOrNil or [libName,'OUTPUT,$listingDirectory] --always QUIET _$ERASE(libName,'OUTPUT,$listingDirectory) @@ -427,7 +427,7 @@ compDefineLisplib(df:=["DEF",[op,:.],:.],m,e,fal,fn) == --set in compDefineCategory1 if category, otherwise in finalizeLisplib libName := dbAbbreviation db if dbSourceFile db = nil then - dbSourceFile(db) := namestring _/EDITFILE + dbSourceFile(db) := namestring $editFile $compileDocumentation => compileDocumentation(op,libName) sayMSG ['" initializing ",$spadLibFT,:bright libName, '"for",:bright op] diff --git a/src/interp/record.boot b/src/interp/record.boot index 6b36af77..66660a5a 100644 --- a/src/interp/record.boot +++ b/src/interp/record.boot @@ -186,9 +186,9 @@ evaluateLines lines == stringPrefix?('")undo )redo",line) => 'skip writeLine(line, file) SHUT file - _/EDITFILE: local := '"/tmp/temp.input" + $editFile: local := '"/tmp/temp.input" _/RF() - -- can't use _/EDITFILE since it might be reset + -- can't use $editFile since it might be reset DELETE_-FILE '"/tmp/temp.input" diff --git a/src/interp/setvars.boot b/src/interp/setvars.boot index 25efcd12..4822f778 100644 --- a/src/interp/setvars.boot +++ b/src/interp/setvars.boot @@ -139,7 +139,7 @@ resetWorkspaceVariables() == -- this function resets many workspace variables to their default -- values. Some things are reset by start and not reset by restart. SETQ(_/COUNTLIST , nil) - SETQ(_/EDITFILE , nil) + SETQ($editFile , nil) SETQ(_/SOURCEFILES , nil) SETQ($sourceFiles , nil) SETQ(_/PRETTY , nil) diff --git a/src/interp/spad.lisp b/src/interp/spad.lisp index 4b203e9b..7776a6e6 100644 --- a/src/interp/spad.lisp +++ b/src/interp/spad.lisp @@ -73,9 +73,9 @@ ($SPAD T) (OPTIONLIST nil) (*EOF* NIL) - (/editfile *spad-input-file*) + (|$editFile| *spad-input-file*) in-stream out-stream) - (declare (special |$Echo| /editfile *comp370-apply* *EOF* Xcape)) + (declare (special |$Echo| |$editFile| *comp370-apply* *EOF*)) (setq |$InteractiveMode| nil) ;; only rebind |$InteractiveFrame| if compiling (progv (if (not |$InteractiveMode|) '(|$InteractiveFrame|)) @@ -134,7 +134,7 @@ (|spadThrow|)) (defun /READ (L Q) - (SETQ /EDITFILE L) + (SETQ |$editFile| L) (COND (Q (/RQ)) ('T (/RF)) ) diff --git a/src/interp/sys-globals.boot b/src/interp/sys-globals.boot index f28f5f8d..04821f54 100644 --- a/src/interp/sys-globals.boot +++ b/src/interp/sys-globals.boot @@ -324,7 +324,6 @@ SPADERRORSTREAM := _*ERROR_-OUTPUT_* ++ _/VERSION := 0 _/WSNAME := "NOBOOT" -_/EDITFILE := nil ++ LINE := nil @@ -358,6 +357,9 @@ INPUT_-LIBRARIES := nil OUTPUT_-LIBRARY := nil ++ +$editFile := nil + +++ $newConlist := nil ++ True if the input file uses old semantics of `Rep', |