From 07271fe8442507acc3f48c96fc06b06a470e5f18 Mon Sep 17 00:00:00 2001 From: Tim Daly Date: Fri, 24 Apr 2015 05:37:05 -0400 Subject: [PATCH] vmlisp.lisp remove SayNewLine function There is no reason to call a function just to call another function native to Lisp. --- books/bookvol5.pamphlet | 6 +++--- changelog | 9 +++++++++ patch | 8 +++----- src/axiom-website/patches.html | 4 +++- src/interp/format.lisp.pamphlet | 12 ++++++------ src/interp/i-util.lisp.pamphlet | 2 +- src/interp/msgdb.lisp.pamphlet | 31 +++++-------------------------- src/interp/nrunopt.lisp.pamphlet | 2 +- src/interp/record.lisp.pamphlet | 4 ++-- src/interp/vmlisp.lisp.pamphlet | 2 -- 10 files changed, 33 insertions(+), 47 deletions(-) diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index cadb026..f8d667a 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -30127,11 +30127,11 @@ If there is only one then we clean it up and print it. (do ((mark (search "spad{X}" line) (search "spad{X}" line))) ((null mark)) (princ (cleanupLine (subseq line 0 mark))) - (|sayNewLine|) + (terpri) (setq line (subseq line (+ mark 8)))) (princ (cleanupLine line)) - (|sayNewLine|) - (|sayNewLine|)))) + (terpri) + (terpri)))) \end{chunk} diff --git a/changelog b/changelog index eccb9c2..f025cf6 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,12 @@ +20150424 tpd src/axiom-website/patches.html 20150424.02.tpd.patch +20150424 tpd vmlisp.lisp remove SayNewLine function +20150424 tpd books/bookvol5 remove SayNewLine function +20150424 tpd src/interp/format.lisp remove SayNewLine function +20150424 tpd src/interp/i-util.lisp remove SayNewLine function +20150424 tpd src/interp/msgdb.lisp remove SayNewLine function +20150424 tpd src/interp/nrunopt.lisp remove SayNewLine function +20150424 tpd src/interp/record.lisp remove SayNewLine function +20150424 tpd src/interp/vmlisp.lisp remove SayNewLine function 20150424 tpd src/axiom-website/patches.html 20150424.01.tpd.patch 20150424 tpd buglist bug 7302: rich12b.input 457 failed 20150423 tpd src/axiom-website/patches.html 20150423.01.tpd.patch diff --git a/patch b/patch index aed8da7..86f3283 100644 --- a/patch +++ b/patch @@ -1,6 +1,4 @@ -buglist bug 7302: rich12b.input 457 failed - -The storage for STRING is exhausted. -Currently, 710 pages are allocated. -Use ALLOCATE to expand the space. +vmlisp.lisp remove SayNewLine function +There is no reason to call a function just to call another +function native to Lisp. diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index a76a2f3..733022b 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -5023,7 +5023,9 @@ src/interp/msgdb.lisp remove dead code, simplify
20150423.01.tpd.patch buglist bug 7301: rich12c.input 310 failed
20150424.01.tpd.patch -buglist bug 7302: rich12b.input 457 failed +buglist bug 7302: rich12b.input 457 failed
+20150424.02.tpd.patch +vmlisp.lisp remove SayNewLine function
diff --git a/src/interp/format.lisp.pamphlet b/src/interp/format.lisp.pamphlet index a4f5505..1ec5ab5 100644 --- a/src/interp/format.lisp.pamphlet +++ b/src/interp/format.lisp.pamphlet @@ -593,7 +593,7 @@ code which fixes bug 7217 bad title generated in Axiom 3D output. ; (COND (|ok| (|apropos| (LIST |op1|)))))) ; (#1# ; (PROGN -; (|sayNewLine|) +; (terpri) ; (SETQ |mmsE| (SETQ |mmsU| NIL)) ; ((LAMBDA (|bfVar#15| |mm|) ; (LOOP @@ -610,7 +610,7 @@ code which fixes bug 7217 bad title generated in Axiom 3D output. ; |modemaps| NIL) ; (COND (|mmsE| (|sayMms| |op| |mmsE| "exposed"))) ; (COND -; (|mmsU| (COND (|mmsE| (|sayNewLine|))) +; (|mmsU| (COND (|mmsE| (terpri))) ; (|sayMms| |op| |mmsU| "unexposed"))) ; NIL))))))) @@ -726,7 +726,7 @@ code which fixes bug 7217 bad title generated in Axiom 3D output. displayed.") (CONS |op1| NIL))))))) (COND (|ok| (|apropos| (CONS |op1| NIL))))) - ('T (|sayNewLine|) (SPADLET |mmsE| (SPADLET |mmsU| NIL)) + ('T (terpri) (SPADLET |mmsE| (SPADLET |mmsU| NIL)) (SPADLET |domlist| NIL) (DO ((G166497 |modemaps| (CDR G166497)) (|mm| NIL)) ((OR (ATOM G166497) @@ -745,7 +745,7 @@ code which fixes bug 7217 bad title generated in Axiom 3D output. (|mmsE| (|reportOpSymbol,sayMms| |op| |mmsE| "exposed"))) (COND - (|mmsU| (COND (|mmsE| (|sayNewLine|))) + (|mmsU| (COND (|mmsE| (terpri))) (|reportOpSymbol,sayMms| |op| |mmsU| "unexposed"))) (DO ((G166512 |domlist| (CDR G166512)) @@ -759,12 +759,12 @@ code which fixes bug 7217 bad title generated in Axiom 3D output. 'DOCUMENTATION)) (SPADLET |docs| (CDR (|assoc| |op| |doc|))) - (|sayNewLine|) + (terpri) (|sayBrightly| (CONS "Examples of " (CONS |op| (CONS " from " (CONS |adom| NIL))))) - (|sayNewLine|) + (terpri) (DO ((G166521 |docs| (CDR G166521)) (|export| NIL)) ((OR (ATOM G166521) diff --git a/src/interp/i-util.lisp.pamphlet b/src/interp/i-util.lisp.pamphlet index a712de3..3f6ad79 100644 --- a/src/interp/i-util.lisp.pamphlet +++ b/src/interp/i-util.lisp.pamphlet @@ -105,7 +105,7 @@ lisp code is unwrapped. ; sayNewLine() (DEFUN |spadPrompt| () - (PROGN (SAY " AXIOM") (|sayNewLine|))) + (PROGN (SAY " AXIOM") (terpri))) ;inputPrompt str == ; -- replaces older INPUT-PROMPT diff --git a/src/interp/msgdb.lisp.pamphlet b/src/interp/msgdb.lisp.pamphlet index cb876b8..31923b6 100644 --- a/src/interp/msgdb.lisp.pamphlet +++ b/src/interp/msgdb.lisp.pamphlet @@ -1029,27 +1029,6 @@ (defun |sayMessage| (|msg|) (|sayMSG| (|mkMessage| |msg|))) -;sayNewLine(:margin) == -; -- Note: this function should *always* be used by sayBrightly and -; -- friends rather than TERPRI -- see bindSayBrightly -; TERPRI() -; if margin is [n] then BLANKS n -; nil - -;;; *** |sayNewLine| REDEFINED - -(defun |sayNewLine| (&REST G166644 &AUX |margin|) - (DSETQ |margin| G166644) - (PROG (|n|) - (RETURN - (PROGN - (TERPRI) - (COND - ((AND (consp |margin|) (EQ (QCDR |margin|) nil) - (PROGN (setq |n| (QCAR |margin|)) 'T)) - (BLANKS |n|))) - nil)))) - ;sayString x == ; -- Note: this function should *always* be used by sayBrightly and ; -- friends rather than PRINTEXP -- see bindSayBrightly @@ -1141,7 +1120,7 @@ (BOOT-EQUAL (ELT |x| 0) (|char| '|\\|)) (BOOT-EQUAL (ELT |x| 1) (|char| '%))) (|sayString| (SUBSTRING |x| 1 nil))) - ((BOOT-EQUAL |x| "%l") (|sayNewLine|) + ((BOOT-EQUAL |x| "%l") (terpri) (DO ((|i| 1 (QSADD1 |i|))) ((QSGREATERP |i| $MARG) nil) (SEQ (EXIT (|sayString| " "))))) @@ -1247,7 +1226,7 @@ (defun |brightPrint1| (|x|) (PROGN (COND - ((|member| |x| '(|%l| "%l")) (|sayNewLine|)) + ((|member| |x| '(|%l| "%l")) (terpri)) ((STRINGP |x|) (|sayString| |x|)) ('T (|brightPrintHighlight| |x|))) nil)) @@ -1482,7 +1461,7 @@ (PROGN (SETQ |z| (CAR G166816)) nil)) nil) (SEQ (EXIT (|brightPrint0| |z|)))) - (COND (|x| (|sayNewLine|) (|brightPrintCenter| |x|))) + (COND (|x| (terpri) (|brightPrintCenter| |x|))) nil)))))) ;brightPrintCenterAsTeX x == @@ -1611,7 +1590,7 @@ nil) (SEQ (EXIT (|brightPrint0| |z|)))) (COND - (|x| (|sayNewLine|) (|brightPrintRightJustify| |x|))) + (|x| (terpri) (|brightPrintRightJustify| |x|))) nil)))))) ;-- some hooks for older functions @@ -1985,7 +1964,7 @@ (setq |al| (CDR |LETTMP#1|)) (TAB (QUOTIENT $LINELENGTH 2)) (|ppPair| |abb| |name|))) - (|sayNewLine|))))) + (terpri))))) nil))))) ;ppPair(abb,name) == diff --git a/src/interp/nrunopt.lisp.pamphlet b/src/interp/nrunopt.lisp.pamphlet index 5bba013..7eaf7f4 100644 --- a/src/interp/nrunopt.lisp.pamphlet +++ b/src/interp/nrunopt.lisp.pamphlet @@ -2670,7 +2670,7 @@ (|sayBrightlyNT| (|rightJustifyString| (STRINGIMAGE (ELT |vec| |j|)) 6))))) - (|sayNewLine|))))) + (terpri))))) |vec|))))) ;dcSize(:options) == diff --git a/src/interp/record.lisp.pamphlet b/src/interp/record.lisp.pamphlet index 3f508be..46befcc 100644 --- a/src/interp/record.lisp.pamphlet +++ b/src/interp/record.lisp.pamphlet @@ -174,7 +174,7 @@ (SPADLET |i| (CAR |LETTMP#1|)) (SPADLET |t| (CADR |LETTMP#1|)) (SPADLET |o| (CDDR |LETTMP#1|)) - (|sayNewLine|) + (terpri) (DO ((G166104 |i| (CDR G166104)) (|x| NIL)) ((OR (ATOM G166104) @@ -183,7 +183,7 @@ NIL)) NIL) (SEQ (EXIT (|sayBrightly| |x|)))) - (|sayNewLine|) + (terpri) (DO ((G166113 |o| (CDR G166113)) (|x| NIL)) ((OR (ATOM G166113) diff --git a/src/interp/vmlisp.lisp.pamphlet b/src/interp/vmlisp.lisp.pamphlet index a712f5f..fac7837 100644 --- a/src/interp/vmlisp.lisp.pamphlet +++ b/src/interp/vmlisp.lisp.pamphlet @@ -3555,8 +3555,6 @@ The original code was: (defun |sayTeX| (x) (if (null x) nil (sayBrightly1 x |$texOutputStream|))) -(defun |sayNewLine| () (TERPRI)) - (defvar |$sayBrightlyStream| nil "if not nil, gives stream for sayBrightly output") (defun |sayBrightly| (x &optional (out-stream *standard-output*)) -- 1.7.5.4