aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2014-11-27 01:36:14 +0000
committerdos-reis <gdr@axiomatics.org>2014-11-27 01:36:14 +0000
commit291cdbd599f6332c6f92612629f1b4cf7fb71308 (patch)
tree278c206bc2d20bf4bc433da4a80cf58b50fb0572 /src/interp
parentf4623b771b1e798d81d1cc8d2013683371061c43 (diff)
downloadopen-axiom-291cdbd599f6332c6f92612629f1b4cf7fb71308.tar.gz
Replace PATHNAME-* Lisp API with filePath* API.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/br-con.boot4
-rw-r--r--src/interp/cformat.boot2
-rw-r--r--src/interp/cparse.boot4
-rw-r--r--src/interp/database.boot2
-rw-r--r--src/interp/fortcall.boot2
-rw-r--r--src/interp/g-util.boot2
-rw-r--r--src/interp/i-syscmd.boot10
-rw-r--r--src/interp/lisplib.boot8
-rw-r--r--src/interp/pathname.boot16
-rw-r--r--src/interp/record.boot4
-rw-r--r--src/interp/setvars.boot2
-rw-r--r--src/interp/sfsfun.boot8
-rw-r--r--src/interp/sys-driver.boot6
-rw-r--r--src/interp/sys-utility.boot2
14 files changed, 35 insertions, 37 deletions
diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot
index 70dee07b..c4e53323 100644
--- a/src/interp/br-con.boot
+++ b/src/interp/br-con.boot
@@ -1053,8 +1053,8 @@ bcUnixTable(u) ==
else htSaySaturn '"&"
htSay '"{"
ft := '("SPAD")
- filename := NAMESTRING findFile(STRINGIMAGE x, ft)
- htMakePage [['text, '"\unixcommand{",PATHNAME_-NAME x, '"}{",
+ filename := filePathString findFile(STRINGIMAGE x, ft)
+ htMakePage [['text, '"\unixcommand{",filePathName x, '"}{",
textEditor(), '" ", filename, '"} "]]
htSay '"}"
htEndTable()
diff --git a/src/interp/cformat.boot b/src/interp/cformat.boot
index 4a8939d2..3e0d4586 100644
--- a/src/interp/cformat.boot
+++ b/src/interp/cformat.boot
@@ -52,7 +52,7 @@ porigin x ==
%fname x ==
[function pfname, x]
pfname x ==
- NAMESTRING x
+ filePathString x
%pos p == [function ppos, p]
diff --git a/src/interp/cparse.boot b/src/interp/cparse.boot
index eaa43873..8960fbb0 100644
--- a/src/interp/cparse.boot
+++ b/src/interp/cparse.boot
@@ -1106,9 +1106,9 @@ _/RQ_,LIB(:x) ==
_/RF_-1 x ==
ifile := makeInputFilename $editFile
lfile := nil
- type := PATHNAME_-TYPE ifile
+ type := filePathType ifile
type = '"boot" =>
- lfile := MAKE_-PATHNAME(type <- '"lisp",defaults <- ifile)
+ lfile := makeFilePath(type <- '"lisp",defaults <- ifile)
BOOT(ifile,lfile)
LOAD lfile
type = '"lisp" => LOAD ifile
diff --git a/src/interp/database.boot b/src/interp/database.boot
index 9343bb32..be21edfe 100644
--- a/src/interp/database.boot
+++ b/src/interp/database.boot
@@ -831,7 +831,7 @@ printAllInitdbInfo(srcdir,dbfile) ==
prettyPrint(['IN_-PACKAGE,'"BOOT"],out)
writeNewline out
for path in paths repeat
- printInitdbInfo(NAMESTRING path,out)
+ printInitdbInfo(filePathString path,out)
finally closeStream out
--%
diff --git a/src/interp/fortcall.boot b/src/interp/fortcall.boot
index f45a82c3..7ba85979 100644
--- a/src/interp/fortcall.boot
+++ b/src/interp/fortcall.boot
@@ -39,7 +39,7 @@ namespace BOOT
$nagMessages := nil
makeVector(elts, t) ==
- MAKE_-ARRAY(#elts, element_-type <- t or true, initial_-contents <- elts)
+ newVector(#elts, element_-type <- t or true, initial_-contents <- elts)
makeList(n, e) ==
MAKE_-LIST(n, initial_-element <- e)
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index e96f81d3..371bcdfe 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -1114,7 +1114,7 @@ queryVar? var ==
++ Returns a newly allocated domain shell (a simple vector) of length `n'.
newShell: %Short -> SIMPLE_-ARRAY
newShell n ==
- MAKE_-ARRAY(n,initial_-element <- nil)
+ newVector(n,initial_-element <- nil)
-- Push into the BOOT package when invoked in batch mode.
AxiomCore::$sysScope := '"BOOT"
diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot
index fb075d75..1c8036bd 100644
--- a/src/interp/i-syscmd.boot
+++ b/src/interp/i-syscmd.boot
@@ -255,10 +255,10 @@ listConstructorAbbreviations() ==
cd args ==
dir := TRUENAME STRING(first args or '"")
- changeDirectory NAMESTRING dir
+ changeDirectory filePathString dir
SETF(_*DEFAULT_-PATHNAME_-DEFAULTS_*,
- PATHNAME ensureTrailingSlash NAMESTRING dir)
- sayKeyedMsg("S2IZ0070", [NAMESTRING _*DEFAULT_-PATHNAME_-DEFAULTS_*])
+ filePath ensureTrailingSlash filePathString dir)
+ sayKeyedMsg("S2IZ0070", [filePathString _*DEFAULT_-PATHNAME_-DEFAULTS_*])
--% )clear
@@ -435,11 +435,11 @@ compiler args ==
aft := pathnameType af
haveOld or (aft = '"spad") =>
not (af1 := findFile(af, '(spad))) =>
- throwKeyedMsg("S2IL0003",[NAMESTRING af])
+ throwKeyedMsg("S2IL0003",[filePathString af])
compileSpad2Cmd [af1]
aft = '"NRLIB" =>
not (af1 := findFile(af, '(NRLIB))) =>
- throwKeyedMsg("S2IL0003",[NAMESTRING af])
+ throwKeyedMsg("S2IL0003",[filePathString af])
compileSpadLispCmd [af1]
-- see if we something with the appropriate file extension
diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot
index b26cc2af..6ab93035 100644
--- a/src/interp/lisplib.boot
+++ b/src/interp/lisplib.boot
@@ -224,7 +224,7 @@ dbLocateModule db ==
getConstructorModuleFromDB dbConstructor db
existingFile? m => m
strap := algebraBootstrapDir() =>
- m := strconc(strap,PATHNAME_-NAME m,'".",$faslType)
+ m := strconc(strap,filePathName m,'".",$faslType)
existingFile? m => m
nil
nil
@@ -757,7 +757,7 @@ getAllIndexPathnames dir ==
-- a list of drirectories AND files. Pretty much like `ls *'.
-- Everybody else strips out directories.
)if %hasFeature KEYWORD::GCL
- [getIndexPathname NAMESTRING d for d in DIRECTORY strconc(dir,'"*.NRLIB")]
+ [getIndexPathname filePathString d for d in DIRECTORY strconc(dir,'"*.NRLIB")]
)else
DIRECTORY strconc(dir,'"*.NRLIB/",$IndexFilename)
)endif
@@ -769,9 +769,9 @@ getAllAldorObjectFiles dir ==
asos := DIRECTORY strconc(dir,'"*.ao")
-- don't include both a `x.asy' and `x.ao', and retain
-- only sensical .asy files.
- dupAOs := MAPCAN(function PATHNAME_-NAME,asys)
+ dupAOs := MAPCAN(function filePathName,asys)
[asys,[f for f in asos
- | PATHNAME_-NAME f is '"ao" and not member(PATHNAME_-NAME f,dupAOs)]]
+ | filePathName f is '"ao" and not member(filePathName f,dupAOs)]]
diff --git a/src/interp/pathname.boot b/src/interp/pathname.boot
index c1b9d868..1eeb346d 100644
--- a/src/interp/pathname.boot
+++ b/src/interp/pathname.boot
@@ -45,25 +45,25 @@ namespace BOOT
--% Common Lisp Pathname Functions
pathname? p ==
- null p or PATHNAMEP p
+ null p or filePath? p
pathname p ==
pathname? p => p
- p isnt [.,:.] => PATHNAME p
+ p isnt [.,:.] => filePath p
if #p>2 then p:=[p.0,p.1]
- PATHNAME apply(function makeFilename, p)
+ filePath apply(function makeFilename, p)
namestring p ==
null p => nil
- NAMESTRING pathname p
+ filePathString pathname p
pathnameName p ==
null p => nil
- PATHNAME_-NAME pathname p
+ filePathName pathname p
pathnameType p ==
null p => nil
- PATHNAME_-TYPE pathname p
+ filePathType pathname p
pathnameTypeId p ==
null p => nil
@@ -71,7 +71,7 @@ pathnameTypeId p ==
pathnameDirectory p ==
null p => nil
- NAMESTRING MAKE_-PATHNAME(directory <- PATHNAME_-DIRECTORY pathname p)
+ filePathString makeFilePath(directory <- filePathDirectory pathname p)
isExistingFile f ==
-- p := pathname f
@@ -85,8 +85,6 @@ isExistingFile f ==
--% Scratchpad II File Name Functions
makePathname(name,type,dir) ==
- -- Common Lisp version of this will have to be written
- -- using MAKE-PATHNAME and the optional args.
pathname [object2String name,object2String type]
mergePathnames(a,b) ==
diff --git a/src/interp/record.boot b/src/interp/record.boot
index e5b60953..96e31a7b 100644
--- a/src/interp/record.boot
+++ b/src/interp/record.boot
@@ -76,7 +76,7 @@ $mkTestOutputType := nil -- saves the type for $testStream
-- Function for Creating a `record' file
--=======================================================================
inputFile2RecordFile(pathname,:option) ==
- ifn := PATHNAME_-NAME pathname
+ ifn := filePathName pathname
not isExistingFile pathname => throwKeyedMsg("S2IL0003",[namestring ifn])
opath := KAR option or pathname
odirect := pathnameDirectory opath
@@ -144,7 +144,7 @@ verbatimize u ==
-- Function for Verifying a `record' file
--=======================================================================
verifyRecordFile(pathname) ==
- ifn := PATHNAME_-NAME pathname
+ ifn := filePathName pathname
sayBrightly ['"Verifying",:bright ifn]
not isExistingFile pathname => throwKeyedMsg("S2IL0003",[namestring ifn])
stream := MAKE_-INSTREAM pathname
diff --git a/src/interp/setvars.boot b/src/interp/setvars.boot
index cd21c3a1..de8883b6 100644
--- a/src/interp/setvars.boot
+++ b/src/interp/setvars.boot
@@ -579,7 +579,7 @@ setFortTmpDir arg ==
validateOutputDirectory x ==
- AND(PATHNAME_-DIRECTORY(PROBE_-FILE(first(x))), NOT PATHNAME_-NAME (PROBE_-FILE(first(x)))) =>
+ AND(filePathDirectory(PROBE_-FILE(first(x))), null filePathName(PROBE_-FILE(first(x)))) =>
first(x)
nil
diff --git a/src/interp/sfsfun.boot b/src/interp/sfsfun.boot
index d7401ef4..d855c4af 100644
--- a/src/interp/sfsfun.boot
+++ b/src/interp/sfsfun.boot
@@ -418,7 +418,7 @@ PsiIntpart(x) ==
cotdiffeval(n,z,skipit) ==
---skip=1 if arg z is known to be an exact multiple of Pi/2
- a := MAKE_-ARRAY(n+2)
+ a := newVector(n+2)
AREF(a,0) := 0.0
AREF(a,1) := 1.0
for i in 2..n repeat
@@ -523,7 +523,7 @@ chebf01 (c,z) ==
a1 := start -- arbitrary starting value
z1 := four/w
ncount := n1
- arr := MAKE_-ARRAY(n2)
+ arr := newVector(n2)
AREF(arr,ncount) := start -- start off
x1 := n2
c1 := 1.0 - c
@@ -616,7 +616,7 @@ chebf01coefmake (c,w,n) ==
a1 := start -- arbitrary starting value
z1 := four/w
ncount := n1
- arr := MAKE_-ARRAY(n2)
+ arr := newVector(n2)
AREF(arr,ncount) := start -- start off
x1 := n2
c1 := 1.0 - c
@@ -828,7 +828,7 @@ BesselIBackRecur(largev,argm,v,z,type,n) ==
start := EXPT(10.0,-40)
z2 := two/z
m2 := n+3
- w:=MAKE_-ARRAY(m2+1)
+ w := newVector(m2+1)
AREF(w,m2) := zero --- start off
if type = '"I"
then
diff --git a/src/interp/sys-driver.boot b/src/interp/sys-driver.boot
index b8d5ae81..4fb8611c 100644
--- a/src/interp/sys-driver.boot
+++ b/src/interp/sys-driver.boot
@@ -1,4 +1,4 @@
--- Copyright (C) 2007-2012 Gabriel Dos Reis
+-- Copyright (C) 2007-2014 Gabriel Dos Reis
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -113,7 +113,7 @@ REROOT() ==
[makeAbsoluteFilename d for d in $RELATIVE_-DIRECTORY_-LIST]
$LIBRARY_-DIRECTORY_-LIST :=
[makeAbsoluteFilename d for d in $RELATIVE_-LIBRARY_-DIRECTORY_-LIST]
- $defaultMsgDatabaseName := PATHNAME
+ $defaultMsgDatabaseName := filePath
makeAbsoluteFilename '"share/msgs/s2-us.msgs"
$msgDatabaseName := nil
@@ -283,7 +283,7 @@ executeSpadScript(progname,options,file) ==
-- Accomodate for testsuite stream.
if testing then
set ["message","testing","on"]
- sayKeyedMsg('S2IZ0100,[NAMESTRING canonicalFilename file])
+ sayKeyedMsg('S2IZ0100,[filePathString canonicalFilename file])
CATCH($intCoerceFailure,
CATCH($SpadReaderTag,read [file]))
coreQuit (errorCount()> 0 => 1; 0)
diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot
index e043e6f7..ce2b7838 100644
--- a/src/interp/sys-utility.boot
+++ b/src/interp/sys-utility.boot
@@ -318,7 +318,7 @@ writeByteToStreamSocket(s,b) ==
--%
makeByteBuffer(n,b == 0) ==
- MAKE_-ARRAY(n,element_-type <- "%Byte",initial_-element <- b)
+ newVector(n,element_-type <- "%Byte",initial_-element <- b)
++ Return the position of the symbol `s' in the list `l', if present.
++ Otherwise return nil.