Greetings! Matt Kaufmann <kaufm...@cs.utexas.edu> writes:
> Hi, Camm -- > > I see that the startup banner is printed differently now in GCL, at > least 2.6.9, than it used to be. (I haven't looked into 2.6.8.) > Specifically, when I build ACL2 the banner doesn't get printed until I > exit that ACL2 read-eval-print loop. I know how to fix that in GCL > 2.6.9, but my fix doesn't work for older GCL versions (where the > banner would be printed twice with my fix). > > I think the -f option is intended to suppress the startup banner, and > that would solve my problem -- I'll just write -f into the saved_acl2 > script. However -f seems to be broken in GCL 2.6.9: > > eld:~% gcl-2.6.9 -f > > Error: Cannot open the file NIL. > Fast links are on: do (si::use-fast-links nil) for debugging > Error signalled by SYSTEM:TOP-LEVEL. > Backtrace: > eld:~% > > Will you make -f work when you create 2.6.10? > Thanks for the report! The argument handling was to support Jared's request for --. The manpage describes -f as follows (with formatting error -- also to fix): Open the file following -f for input, skip the first line,and then read and eval the rest of the forms in the file. Replaces si::*command-args* by the the list starting after -f. This can be used as with the shells to write small shell programs: So a shell script starting with #!/usr/bin/gcl -f does indeed work as advertised in 2.6.9. I do see that in 2.6.8, gcl -f alone on the command line gave one a bannerless prompt, and in 2.6.9 this fails as there is no filename after the -f to open. (#! supplies the filename containing it when executed by the kernel.) So I have a patch here that will go in 2.6.10 if you'd like: gcl_top.lsp: (defun do-f (file &aux *break-enable*) (catch *quit-tag* (labels ((read-loop (st &aux (tem (read st nil 'eof))) (when (eq tem 'eof) (bye)) (eval tem) (read-file st)) (read-file (st) (read-line st) (read-loop st))) (if file (with-open-file (st file) (read-file st)) (read-file *standard-input*)))) (bye 1)) which when run gives ./saved_pre_gcl -f (print 'h) (print 'h) H (print 'h) (print 'h) H (print 'h) (print 'h) H Note the first line is skipped as advertised. Is this desired? In sum, the banner ommission is a side-effect of -f -- the intent was to read commands from a shell script. Take care, -- Camm Maguire c...@maguirefamily.org ========================================================================== "The earth is but one country, and mankind its citizens." -- Baha'u'llah _______________________________________________ Gcl-devel mailing list Gcl-devel@gnu.org https://lists.gnu.org/mailman/listinfo/gcl-devel