[PATCH] misc cleanup i-syscmd.boot

8 views
Skip to first unread message

Qian Yun

unread,
Jan 27, 2024, 7:10:57 AM1/27/24
to fricas-devel
$SYSCOMMANDS is already initialized by
DEFPARAMETER($SYSCOMMANDS, [first x for x in $systemCommands])

- Qian

diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot
index eca9f345..e5ad7164 100644
--- a/src/interp/i-syscmd.boot
+++ b/src/interp/i-syscmd.boot
@@ -75,14 +75,6 @@ DEFPARAMETER($displayOptions, '( _

--% Top level system command

-initializeSystemCommands() ==
- l := $systemCommands
- $SYSCOMMANDS := NIL
- while l repeat
- $SYSCOMMANDS := CONS(CAAR l, $SYSCOMMANDS)
- l := rest l
- $SYSCOMMANDS := NREVERSE $SYSCOMMANDS
-
systemCommand [[op,:argl],:options] ==
$options: local:= options
$e:local := $CategoryFrame
@@ -2994,13 +2986,13 @@ splitIntoOptionBlocks str ==
blockStart := 0
parenCount := 0
for i in 0..#str-1 repeat
- STRING str.i = '"_"" =>
+ str.i = char '"_"" =>
inString := not inString
- if STRING str.i = '"(" and not inString
+ if str.i = char '"(" and not inString
then parenCount := parenCount + 1
- if STRING str.i = '")" and not inString
+ if str.i = char '")" and not inString
then parenCount := parenCount - 1
- STRING str.i = '")" and not inString and parenCount = -1 =>
+ str.i = char '")" and not inString and parenCount = -1 =>
block := stripSpaces SUBSEQ(str, blockStart, i)
blockList := [block, :blockList]
blockStart := i+1
@@ -3058,7 +3050,7 @@ ltrace l == trace l

--------------------> NEW DEFINITION (see intint.lisp)
stripSpaces str ==
- STRING_-TRIM([char '" "], str)
+ STRING_-TRIM('" ", str)

npProcessSynonym(str) ==
if str = '"" then printSynonyms(NIL)

Qian Yun

unread,
Jan 27, 2024, 7:12:21 AM1/27/24
to fricas-devel
I forget to also remove "initializeSystemCommands" from i-toplev.boot.

- Qian

diff --git a/src/interp/i-toplev.boot b/src/interp/i-toplev.boot
index 744bc703..f5e122e5 100644
--- a/src/interp/i-toplev.boot
+++ b/src/interp/i-toplev.boot
@@ -71,7 +71,6 @@ interpsysInitialization(display_messages) ==
if $displayStartMsgs then sayKeyedMsg("S2IZ0053",['"interpreter"])
initializeTimedNames($interpreterTimedNames,$interpreterTimedClasses)
$InteractiveFrame := makeInitialModemapFrame()
- initializeSystemCommands()
initializeInterpreterFrameRing()
setOutputAlgebra "%initialize%"
loadExposureGroupData()

Waldek Hebisch

unread,
Jan 27, 2024, 7:55:46 AM1/27/24
to fricas...@googlegroups.com
On Sat, Jan 27, 2024 at 08:10:52PM +0800, Qian Yun wrote:
> $SYSCOMMANDS is already initialized by
> DEFPARAMETER($SYSCOMMANDS, [first x for x in $systemCommands])

Yes. Look OK (with the hunk from your next mail).

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages