aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-08-25 01:24:19 +0000
committerdos-reis <gdr@axiomatics.org>2010-08-25 01:24:19 +0000
commit7ffa34642e7d2671da8664936befb5fcd78c37c0 (patch)
tree988effba4da1f43daa9b40a78e87dd7c844909a9 /src
parentea2ea538c6a308bfc1ca17142ad3e272f5758e80 (diff)
downloadopen-axiom-7ffa34642e7d2671da8664936befb5fcd78c37c0.tar.gz
* interp/br-saturn.boot ($saturn): Define here.
* interp/br-search.boot: Remove $saturn-related codes. * interp/g-error.boot: Likewise. * interp/ht-root.boot: Likewise. * interp/ht-util.boot: Likewise. * interp/i-output.boot: Likewise. * interp/i-syscmd.boot: Likewise. * interp/i-toplev.boot: Likewise. * interp/msgdb.boot: Likewise. * interp/patches.lisp: Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog13
-rw-r--r--src/interp/br-saturn.boot2
-rw-r--r--src/interp/br-search.boot48
-rw-r--r--src/interp/g-error.boot14
-rw-r--r--src/interp/ht-root.boot11
-rw-r--r--src/interp/ht-util.boot9
-rw-r--r--src/interp/i-output.boot1
-rw-r--r--src/interp/i-syscmd.boot16
-rw-r--r--src/interp/i-toplev.boot26
-rw-r--r--src/interp/msgdb.boot69
-rw-r--r--src/interp/patches.lisp8
11 files changed, 32 insertions, 185 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fd38d66f..77e4294e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-24 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/br-saturn.boot ($saturn): Define here.
+ * interp/br-search.boot: Remove $saturn-related codes.
+ * interp/g-error.boot: Likewise.
+ * interp/ht-root.boot: Likewise.
+ * interp/ht-util.boot: Likewise.
+ * interp/i-output.boot: Likewise.
+ * interp/i-syscmd.boot: Likewise.
+ * interp/i-toplev.boot: Likewise.
+ * interp/msgdb.boot: Likewise.
+ * interp/patches.lisp: Likewise.
+
2010-08-22 Gabriel Dos Reis <gdr@cs.tamu.edu>
* algebra/openmath.spad.pamphlet (outputOMFunction): Coerce
diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot
index d5daf12b..a270151d 100644
--- a/src/interp/br-saturn.boot
+++ b/src/interp/br-saturn.boot
@@ -40,7 +40,7 @@ namespace BOOT
$aixTestSaturn := false
--These will be set in patches.lisp:
--$saturn := false --true to write SATURN output to $browserOutputStream
---$standard:= true --true to write browser output on AIX
+$standard := true --true to write browser output on AIX
$saturnAmpersand := '"\&\&"
$saturnFileNumber --true to write DOS files for Thinkpad (testing only)
:= false
diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot
index 9bd50917..7e8ea376 100644
--- a/src/interp/br-search.boot
+++ b/src/interp/br-search.boot
@@ -103,7 +103,7 @@ grepForAbbrev(s,key) ==
a := getConstructorAbbreviationFromDB x
match?(pattern,PNAME a) and not HGET($defaultPackageNamesHT,x)
-applyGrep(x,filename) == --OBSELETE with $saturn--> see applyGrepSaturn
+applyGrep(x,filename) ==
atom x => grepFile(x,filename,'i)
$localLibdb =>
a := purgeNewConstructorLines(grepf(x,filename,false),$newConstructorList)
@@ -871,9 +871,7 @@ mkDetailedGrepPattern(kind,name,nargs,argOrSig) == main where
main() ==
nottick := '"[^`]"
name := replaceGrepStar name
- firstPart :=
- $saturn => strconc(char "^",name)
- strconc(char "^",kind,name)
+ firstPart := strconc(char "^",kind,name)
nargsPart := replaceGrepStar nargs
exposedPart := char '_. --always get exposed/unexposed
patPart := replaceGrepStar argOrSig
@@ -909,14 +907,6 @@ underscoreDollars(s) == fn(s,0,MAXINDEX s) where
strconc(SUBSTRING(s,i,m - i),'"___$",fn(s,m + 1,n))
--=======================================================================
--- Code dependent on $saturn
---=======================================================================
-
-obey x ==
- $saturn and not $aixTestSaturn => nil
- runCommand x
-
---=======================================================================
-- I/O Code
--=======================================================================
@@ -962,12 +952,13 @@ grepSource key ==
mkGrepTextfile s ==
strconc(systemRootDirectory(),"/algebra/", STRINGIMAGE s, '".text")
+getTemporaryDirectory() ==
+ getEnv '"TMP" or getEnv '"TEMP"
+ or strconc(systemRootDirectory(),'"/algebra/")
+
mkGrepFile s == --called to generate a path name for a temporary grep file
- prefix :=
- $standard or $aixTestSaturn => '"/tmp/"
- strconc(systemRootDirectory(),'"/algebra/")
suffix := getEnv '"SPADNUM"
- strconc(prefix, PNAME s,'".txt.", suffix)
+ strconc(getTemporaryDirectory(), PNAME s,'".txt.", suffix)
--=======================================================================
-- Grepping Code
@@ -978,21 +969,16 @@ grepFile(pattern,:options) ==
source := grepSource key
lines :=
not PROBE_-FILE source => NIL
- $standard or $aixTestSaturn =>
- -----AIX Version----------
- target := getTempPath 'target
- casepart :=
- 'iv in options => '"-vi"
- '"-i"
- command := strconc('"grep ",casepart,'" _'",pattern,'"_' ",source)
- obey
- member(key,'(a o c d p x)) =>
- strconc(command, '" | sed 's/~/", STRINGIMAGE key, '"/' > ", target)
- strconc(command, '" > ",target)
- dbReadLines target
- ----Windows Version------
- invert? := 'iv in options
- GREP(source, pattern, false, not invert?)
+ target := getTempPath 'target
+ casepart :=
+ 'iv in options => '"-vi"
+ '"-i"
+ command := strconc('"grep ",casepart,'" _'",pattern,'"_' ",source)
+ runCommand
+ member(key,'(a o c d p x)) =>
+ strconc(command, '" | sed 's/~/", STRINGIMAGE key, '"/' > ", target)
+ strconc(command, '" > ",target)
+ dbReadLines target
dbUnpatchLines lines
dbUnpatchLines lines == --concatenate long lines together, skip blank lines
diff --git a/src/interp/g-error.boot b/src/interp/g-error.boot
index 30d55035..5f31421d 100644
--- a/src/interp/g-error.boot
+++ b/src/interp/g-error.boot
@@ -149,20 +149,6 @@ returnToReader() ==
THROW($SpadReaderTag, nil)
sayErrorly(errorLabel, msg) ==
- $saturn => saturnSayErrorly(errorLabel, msg)
- sayErrorly1(errorLabel, msg)
-
-saturnSayErrorly(errorLabel, msg) ==
- SETQ($OutputStream, $texOutputStream)
- old := pushSatOutput("line")
- sayString '"\bgroup\color{red}"
- sayString '"\begin{verbatim}"
- sayErrorly1(errorLabel, msg)
- sayString '"\end{verbatim}"
- sayString '"\egroup"
- popSatOutput(old)
-
-sayErrorly1(errorLabel, msg) ==
sayBrightly '" "
if $testingSystem then sayMSG $testingErrorPrefix
sayBrightly ['" >> ",errorLabel,'":"]
diff --git a/src/interp/ht-root.boot b/src/interp/ht-root.boot
index 70270540..927b5a93 100644
--- a/src/interp/ht-root.boot
+++ b/src/interp/ht-root.boot
@@ -39,21 +39,10 @@ $historyDisplayWidth := 120
$newline := char 10
downlink page ==
- $saturn => downlinkSaturn page
htInitPage('"Bridge",nil)
htSay('"\replacepage{", page, '"}")
htShowPage()
-downlinkSaturn fn ==
- u := dbReadLines(fn)
- lines := '""
- while u is [line,:u] repeat
- n := MAXINDEX line
- n < 1 => nil
- line.0 = (char '_%) => nil
- lines := strconc(lines,line)
- issueHTSaturn lines
-
dbNonEmptyPattern pattern ==
null pattern => '"*"
pattern := STRINGIMAGE pattern
diff --git a/src/interp/ht-util.boot b/src/interp/ht-util.boot
index a4781e09..d04cd526 100644
--- a/src/interp/ht-util.boot
+++ b/src/interp/ht-util.boot
@@ -236,15 +236,6 @@ stringize s ==
string? s => s
PRINC_-TO_-STRING s
---htInitPageNoHeading(propList) ==
------------------------> replaced by htInitPageNoScroll
--- start defining a hyperTeX page
--- $curPage := htpMakeEmptyPage(propList)
--- if $saturn then $saturnPage := htpMakeEmptyPage(propList)
--- $newPage := true
--- $htLineList := nil
--- $curPage
-
htQuote s ==
-- wrap quotes around a piece of hyperTeX
iht '"_""
diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index c9f35dc5..c6168293 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -471,7 +471,6 @@ mathprintWithNumber x ==
mathprint(x,out == $OutputStream) ==
x := outputTran x
- $saturn => texFormat1 x
maprin x
sayMath u ==
diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot
index 693052a1..74a658d7 100644
--- a/src/interp/i-syscmd.boot
+++ b/src/interp/i-syscmd.boot
@@ -384,10 +384,6 @@ queryClients () ==
close args ==
- $saturn =>
- sayErrorly('"Obsolete system command", _
- ['" The )close system command is obsolete in this version of AXIOM.",
- '" Please use Close from the File menu instead."])
quiet:local:= false
null $SpadServer =>
throwKeyedMsg('"S2IZ0071", [])
@@ -2305,20 +2301,12 @@ library args ==
pquit() == pquitSpad2Cmd()
pquitSpad2Cmd() ==
- $saturn =>
- sayErrorly('"Obsolete system command", _
- ['" The )pquit system command is obsolete in this version of AXIOM.",
- '" Please select Exit from the File Menu instead."])
$quitCommandType :local := 'protected
quitSpad2Cmd()
quit() == quitSpad2Cmd()
quitSpad2Cmd() ==
- $saturn =>
- sayErrorly('"Obsolete system command", _
- ['" The )quit system command is obsolete in this version of AXIOM.",
- '" Please select Exit from the File Menu instead."])
$quitCommandType ~= 'protected => leaveScratchpad()
x := UPCASE queryUserKeyedMsg("S2IZ0031",NIL)
STRING2ID_-N(x,1) in '(Y YES) => leaveScratchpad()
@@ -2333,10 +2321,6 @@ leaveScratchpad () ==
read l == readSpad2Cmd l
readSpad2Cmd l ==
- ---$saturn =>
- --- sayErrorly('"Obsolete system command", _
- --- ['" The )read system command is obsolete in this version of AXIOM.",
- --- '" Please use Open from the File menu instead."])
$InteractiveMode : local := true
quiet := nil
ifthere := nil
diff --git a/src/interp/i-toplev.boot b/src/interp/i-toplev.boot
index a2d0b30c..c0f786f2 100644
--- a/src/interp/i-toplev.boot
+++ b/src/interp/i-toplev.boot
@@ -210,7 +210,6 @@ recordAndPrint(x,md) ==
'done
printTypeAndTime(x,m) == --m is the mode/type of the result
- $saturn => printTypeAndTimeSaturn(x, m)
printTypeAndTimeNormal(x, m)
printTypeAndTimeNormal(x,m) ==
@@ -234,31 +233,6 @@ printTypeAndTimeNormal(x,m) ==
$outputLines := [justifyMyType msgText("S2GL0012", [m]), :$outputLines]
sayKeyedMsg("S2GL0012",[m])
-printTypeAndTimeSaturn(x, m) ==
- -- header
- if $printTimeIfTrue then
- timeString := makeLongTimeString($interpreterTimedNames,
- $interpreterTimedClasses)
- else
- timeString := '""
- if $printTypeIfTrue then
- typeString := form2StringAsTeX devaluate m
- else
- typeString := '""
- if $printTypeIfTrue then
- printAsTeX('"\axPrintType{")
- if cons? typeString then
- MAPC(FUNCTION printAsTeX, typeString)
- else
- printAsTeX(typeString)
- printAsTeX('"}")
- if $printTimeIfTrue then
- printAsTeX('"\axPrintTime{")
- printAsTeX(timeString)
- printAsTeX('"}")
-
-printAsTeX(x) == PRINC(x, $texOutputStream)
-
sameUnionBranch(uArg, m) ==
uArg is [":", ., t] => t = m
uArg = m
diff --git a/src/interp/msgdb.boot b/src/interp/msgdb.boot
index 4d26fe71..a0adc6f7 100644
--- a/src/interp/msgdb.boot
+++ b/src/interp/msgdb.boot
@@ -340,19 +340,6 @@ throwKeyedMsgSP(key,args,atree) ==
throwKeyedMsg(key,args)
throwKeyedMsg(key,args) ==
- $saturn => saturnThrowKeyedMsg(key, args)
- throwKeyedMsg1(key, args)
-
-saturnThrowKeyedMsg(key,args) ==
- SETQ($OutputStream, $texOutputStream)
- last := pushSatOutput("line")
- sayString '"\bgroup\color{red}\begin{list}\item{} "
- sayKeyedMsgAsTeX(key,args)
- sayString '"\end{list}\egroup"
- popSatOutput(last)
- spadThrow()
-
-throwKeyedMsg1(key,args) ==
SETQ($OutputStream, $texOutputStream)
sayMSG '" "
if $testingSystem then sayMSG $testingErrorPrefix
@@ -384,53 +371,9 @@ breakKeyedMsg(key,args) ==
handleLispBreakLoop($BreakMode)
keyedSystemError(key,args) ==
- $saturn => saturnKeyedSystemError(key, args)
- keyedSystemError1(key, args)
-
-saturnKeyedSystemError(key, args) ==
- SETQ($OutputStream, $texOutputStream)
- sayString '"\bgroup\color{red}"
- sayString '"\begin{verbatim}"
- sayKeyedMsg("S2GE0000",NIL)
- BUMPERRORCOUNT "semantic"
- sayKeyedMsgAsTeX(key,args)
- sayString '"\end{verbatim}"
- sayString '"\egroup"
- handleLispBreakLoop($BreakMode)
-
-keyedSystemError1(key,args) ==
sayKeyedMsg("S2GE0000",NIL)
breakKeyedMsg(key,args)
--- these 2 functions control the mode of saturn output.
--- having the stream writing functions control this would
--- be better (eg. sayText, sayCommands)
-
-pushSatOutput(arg) ==
- $saturnMode = arg => arg
- was := $saturnMode
- arg = "verb" =>
- $saturnMode := "verb"
- sayString '"\begin{verbatim}"
- was
- arg = "line" =>
- $saturnMode := "line"
- sayString '"\end{verbatim}"
- was
- sayString FORMAT(nil, '"What is: ~a", $saturnMode)
- $saturnMode
-
-popSatOutput(newmode) ==
- newmode = $saturnMode => nil
- newmode = "verb" =>
- $saturnMode := "verb"
- sayString '"\begin{verbatim}"
- newmode = "line" =>
- $saturnMode := "line"
- sayString '"\end{verbatim}"
- sayString FORMAT(nil, '"What is: ~a", $saturnMode)
- $saturnMode
-
systemErrorHere what ==
if cons? what then
what := [first what, " with: ", :rest what]
@@ -1028,14 +971,4 @@ $htCharAlist == '(
escapeSpecialChars s ==
u := LASSOC(s,$htCharAlist) => u
member(s, $htSpecialChars) => strconc('"_\", s)
- null $saturn => s
- alphabetic? (s.0) => s
- not (or/[dbSpecialDisplayOpChar? s.i for i in 0..MAXINDEX s]) => s
- buf := '""
- for i in 0..MAXINDEX s repeat buf :=
- dbSpecialDisplayOpChar?(s.i) => strconc(buf,'"\verb!",s.i,'"!")
- strconc(buf,s.i)
- buf
-
-dbSpecialDisplayOpChar? c == (c = char '_~)
-
+ s
diff --git a/src/interp/patches.lisp b/src/interp/patches.lisp
index 958fcda4..a67c10c3 100644
--- a/src/interp/patches.lisp
+++ b/src/interp/patches.lisp
@@ -37,14 +37,6 @@
(in-package "BOOT")
;;patches for now
-;; browser stuff:
-;; gdr NOTES: it is WRONG to test for platforms, when in fact
-;; gdr NOTES: one should test for functionalities.
-#+:UNIX (defvar |$standard| 't)
-#-:UNIX (defvar |$standard| 'nil)
-#+(or :UNIX :winnt) (defvar |$saturn| 'nil)
-#-(or :UNIX :winnt) (defvar |$saturn| 't)
-
(defun CATCHALL (a &rest b) a) ;; not correct but ok for now
(defvar |$demoFlag| nil)