See https://github.com/oldk1331/fricas/commits/fix-boot-empty-line
for the 3 commits, but 2 of them are cleanups.

When compiling BOOT files, it used to have a lot of trailing
spaces, and we store some files under src/boot/compiled,
so this problem causes a little inconvenience for us before.
Now I fixed it from the root cause, now there should be no
more trailing spaces generated.

CI passes: https://github.com/oldk1331/fricas/runs/2106319522
Please review.

The core changes are https://github.com/oldk1331/fricas/commit/555d2f695a414da3859b3b08d03108f99eab1d23.patch

or:

diff --git a/src/boot/ptyout.boot b/src/boot/ptyout.boot
index 002c6e0af..4ddebed70 100644
--- a/src/boot/ptyout.boot
+++ b/src/boot/ptyout.boot
@@ -258,14 +258,14 @@
          else cons(car s,streamTake(n-1,cdr s))

 shoeFileLines (lines,fn) ==
-        shoeFileLine( '" ",fn)
+        shoeFileLine('"", fn)
         for line in lines repeat shoeFileLine (shoeAddComment line,fn)
-        shoeFileLine ('" ",fn)
+        shoeFileLine('"", fn)

 shoeConsoleLines lines ==
-        shoeConsole '" "
+        shoeConsole '""
         for line in lines repeat shoeConsole shoeAddComment line
-        shoeConsole '" "
+        shoeConsole '""

 shoeFileLine(x, stream) ==
     WRITE_-LINE(x, stream)
@@ -291,7 +291,12 @@
           REALLYPRETTYPRINT fn
           s:=CDR s

-shoeAddComment l==  CONCAT('"; ",CAR l)
+shoeAddComment l ==
+    line := CAR l
+    if LENGTH line = 0 then
+        '";"
+    else
+        CONCAT('"; ", line)

 shoeOutParse stream ==
     $inputStream :local:= stream

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/b30a2e40-e9dc-bfbb-a507-9676b8b39018%40gmail.com.

Reply via email to