[PATCH] add a synonym ")storage" and prevent 0 in its output

5 views
Skip to first unread message

Qian Yun

unread,
Dec 8, 2023, 7:54:35 PM12/8/23
to fricas-devel
I find that the ability to show RAM usage can be useful frequently,
so adding a shortcut ')storage' to ')set mes sto' is justified.

Also fix a regression from previous commit that shows "0 bytes"
in its output.

- Qian

diff --git a/src/interp/g-timer.boot b/src/interp/g-timer.boot
index 49fd8071..cb373c43 100644
--- a/src/interp/g-timer.boot
+++ b/src/interp/g-timer.boot
@@ -77,7 +77,9 @@ makeStatString(oldstr,time,abb,flag) ==
oldstr = '"" => STRCONC(timestr, opening, abb, '")")
STRCONC(oldstr, '" + ", timestr, opening, abb, '")")

-significantStat? t == INTEGERP t or t >= 0.1^$timePrintDigits
+significantStat? s ==
+ INTEGERP s => s ~= 0
+ s >= 0.1^$timePrintDigits

peekTimedName() == IFCAR $timedNameStack

diff --git a/src/interp/setq.lisp b/src/interp/setq.lisp
index 13990ede..24d2b3cb 100644
--- a/src/interp/setq.lisp
+++ b/src/interp/setq.lisp
@@ -233,6 +233,7 @@
(|startGraphics| . "system $FRICAS/lib/viewman &")
(|stopGraphics| . "lisp (|sockSendSignal| 2 15)")
(|time| . "set message time")
+ (|storage| . "set message storage")
(|type| . "set message type")
(|unexpose| . "set expose drop constructor")
(|wc| . "what categories")

Waldek Hebisch

unread,
Dec 8, 2023, 8:21:53 PM12/8/23
to fricas...@googlegroups.com
On Sat, Dec 09, 2023 at 08:54:29AM +0800, Qian Yun wrote:
> I find that the ability to show RAM usage can be useful frequently,
> so adding a shortcut ')storage' to ')set mes sto' is justified.
>
> Also fix a regression from previous commit that shows "0 bytes"
> in its output.

OK.

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