From e4d0798fd570256bd6d399ce714fe55293044da6 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 26 Aug 2012 02:18:54 +0000 Subject: * interp/br-saturn.boot: Replace TERPRI with finishLine. * interp/c-util.boot: Likewise. * interp/clam.boot: Likewise. * interp/compiler.boot: Likewise. * interp/diagnostics.boot: Likewise. * interp/format.boot: Likewise. * interp/functor.boot: Likewise. * interp/g-error.boot: Likewise. * interp/ht-util.boot: Likewise. * interp/i-syscmd.boot: Likewise. * interp/i-toplev.boot: Likewise. * interp/postpar.boot: Likewise. * interp/setvars.boot: Likewise. * interp/topics.boot: Likewise. * interp/trace.boot: Likewise. --- src/ChangeLog | 18 ++++++++++++++++++ src/interp/br-saturn.boot | 12 ++++++------ src/interp/c-util.boot | 10 +++++----- src/interp/clam.boot | 6 +++--- src/interp/compiler.boot | 2 +- src/interp/diagnostics.boot | 4 ++-- src/interp/format.boot | 2 +- src/interp/functor.boot | 4 ++-- src/interp/g-error.boot | 2 +- src/interp/ht-util.boot | 2 +- src/interp/i-syscmd.boot | 4 ++-- src/interp/i-toplev.boot | 2 +- src/interp/postpar.boot | 2 +- src/interp/setvars.boot | 14 +++++++------- src/interp/topics.boot | 4 ++-- src/interp/trace.boot | 2 +- 16 files changed, 54 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 554f80e6..15964ef5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,21 @@ +2012-08-25 Gabriel Dos Reis + + * interp/br-saturn.boot: Replace TERPRI with finishLine. + * interp/c-util.boot: Likewise. + * interp/clam.boot: Likewise. + * interp/compiler.boot: Likewise. + * interp/diagnostics.boot: Likewise. + * interp/format.boot: Likewise. + * interp/functor.boot: Likewise. + * interp/g-error.boot: Likewise. + * interp/ht-util.boot: Likewise. + * interp/i-syscmd.boot: Likewise. + * interp/i-toplev.boot: Likewise. + * interp/postpar.boot: Likewise. + * interp/setvars.boot: Likewise. + * interp/topics.boot: Likewise. + * interp/trace.boot: Likewise. + 2012-08-25 Gabriel Dos Reis * interp/i-util.boot: Lose paramater. Unconditional flush the diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot index 060a5289..7a5c8c5d 100644 --- a/src/interp/br-saturn.boot +++ b/src/interp/br-saturn.boot @@ -338,7 +338,7 @@ saturnPRINTEXP s == saturnTERPRI() == $browserOutputStream => writeNewline $browserOutputStream - TERPRI() + finishLine $OutputStream writeSaturnTable line == open := charPosition(char "{",line,0) @@ -1566,7 +1566,7 @@ mkButtonBox n == strconc('"\buttonbox{", STRINGIMAGE n, '"}") -- PRINC(0, comstream) -- PRINC($tick,comstream) -- PRINC('"", comstream) --- TERPRI(comstream) +-- finishLine(comstream) -- while (line := readLine instream) ~= %nothing repeat -- comP := FILE_-POSITION comstream -- if key ~= line.0 then @@ -1579,20 +1579,20 @@ mkButtonBox n == strconc('"\buttonbox{", STRINGIMAGE n, '"}") -- PRINC($tick ,outstream) -- null comments => -- PRINC(0,outstream) --- TERPRI(outstream) +-- finishLine(outstream) -- PRINC(comP,outstream) --- TERPRI(outstream) +-- finishLine(outstream) -- PRINC(key, comstream) --identifies file the backpointer is to -- PRINC(outP ,comstream) -- PRINC($tick ,comstream) -- PRINC(first comments,comstream) --- TERPRI(comstream) +-- finishLine(comstream) -- for c in rest comments repeat -- PRINC(key, comstream) --identifies file the backpointer is to -- PRINC(outP ,comstream) -- PRINC($tick ,comstream) -- PRINC(c, comstream) --- TERPRI(comstream) +-- finishLine(comstream) -- SHUT instream -- SHUT outstream -- SHUT comstream diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index b1d09f25..5a07644d 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -662,7 +662,7 @@ printEnv E == for y in x for j in 1.. repeat SAY('"******CONTOUR ",j,'", LEVEL ",i,'":******") for z in y repeat - TERPRI() + finishLine $OutputStream SAY("Properties Of: ",first z) for u in rest z repeat PRIN1 first u @@ -677,7 +677,7 @@ prEnv E == for y in x for j in 1.. repeat SAY('"******CONTOUR ",j,'", LEVEL ",i,'":******") for z in y | null symbolTarget("modemap",rest z) repeat - TERPRI() + finishLine $OutputStream SAY("Properties Of: ",first z) for u in rest z repeat PRIN1 first u @@ -694,7 +694,7 @@ prModemaps E == for z in y | not member(first z,listOfOperatorsSeenSoFar) and (modemap := symbolTarget("modemap",rest z)) repeat listOfOperatorsSeenSoFar:= [first z,:listOfOperatorsSeenSoFar] - TERPRI() + finishLine $OutputStream PRIN1 first z printString ": " PRETTYPRINT modemap @@ -1024,7 +1024,7 @@ printSignature(before,op,[target,:argSigList]) == for m in rest argSigList repeat (printString ","; printAny m) printString "_) -> " printAny target - TERPRI() + finishLine $OutputStream elapsedTime() == currentTime:= TEMPUS_-FUGIT() @@ -1038,7 +1038,7 @@ printStats [byteCount,elapsedSeconds] == timeString := normalizeStatAndStringify elapsedSeconds if byteCount = 0 then SAY('"Time: ",timeString,'" SEC.") else SAY('"Size: ",byteCount,'" BYTES Time: ",timeString,'" SEC.") - TERPRI() + finishLine $OutputStream nil extendsCategoryForm(domain,form,form') == diff --git a/src/interp/clam.boot b/src/interp/clam.boot index f88f379e..10d5157a 100644 --- a/src/interp/clam.boot +++ b/src/interp/clam.boot @@ -176,13 +176,13 @@ reportCircularCacheStats(fn,n) == +/[1 for i in 1..n for x in circList while x isnt ['_$failed,:.]] sayBrightly ["%b",fn,"%d","has","%b",numberUsed,"%d","/ ",n," values cached"] displayCacheFrequency mkCircularCountAlist(circList,n) - TERPRI() + finishLine $OutputStream displayCacheFrequency al == al := sortBy(function first,al) sayBrightlyNT " #hits/#occurrences: " for [a,:b] in al repeat sayBrightlyNT [a,"/",b," "] - TERPRI() + finishLine $OutputStream mkCircularCountAlist(cl,len) == for [x,count,:.] in cl for i in 1..len while x ~= '_$failed repeat @@ -199,7 +199,7 @@ reportHashCacheStats fn == hashValues:= [val for [.,:val] in entries ht] sayBrightly [:bright fn,'"has",:bright(# hashValues),'"values cached."] displayCacheFrequency mkHashCountAlist hashValues - TERPRI() + finishLine $OutputStream mkHashCountAlist vl == for [count,:.] in vl repeat diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 2693906b..ef8859cb 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -2819,7 +2819,7 @@ compileParseTree pt == processInteractive(pf,nil) else if T := compTopLevel(pf,$EmptyMode,$InteractiveFrame) then [.,.,$InteractiveFrame] := T - TERPRI() + finishLine $OutputStream --% diff --git a/src/interp/diagnostics.boot b/src/interp/diagnostics.boot index bb7cd4ff..c8a193a2 100644 --- a/src/interp/diagnostics.boot +++ b/src/interp/diagnostics.boot @@ -89,7 +89,7 @@ THETA__ERROR op == SAY(:x) == MESSAGEPRINT x - TERPRI() + finishLine $OutputStream MESSAGEPRINT x == MAPC(function MESSAGEPRINT_-1, x) @@ -100,7 +100,7 @@ MESSAGEPRINT_-1 x == MESSAGEPRINT_-1 first x MESSAGEPRINT_-2 rest x writeString '")" - x = "%l" or x is '"%l" => TERPRI() + x = "%l" or x is '"%l" => finishLine $OutputStream PRINC x MESSAGEPRINT_-2 x == diff --git a/src/interp/format.boot b/src/interp/format.boot index c759c57c..66d36400 100644 --- a/src/interp/format.boot +++ b/src/interp/format.boot @@ -57,7 +57,7 @@ sayModemapWithNumber(m,n) == sayMSG flowSegmentedMsg(reverse msg,$LINELENGTH,3) displayOpModemaps(op,modemaps) == - TERPRI() + finishLine $OutputStream count:= #modemaps phrase:= (count=1 => 'modemap;'modemaps) sayMSG ['"%b",count,'"%d",phrase,'" for",'"%b",op,'"%d",'":"] diff --git a/src/interp/functor.boot b/src/interp/functor.boot index ae7073a2..06eac21d 100644 --- a/src/interp/functor.boot +++ b/src/interp/functor.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2011, Gabriel Dos Reis. +-- Copyright (C) 2007-2012, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -80,7 +80,7 @@ DomainPrint(D,brief) == s:= $WhereList $WhereList:= nil for u in s repeat - TERPRI() + finishLine $OutputStream SAY ['"Where ",first u,'" is:"] DomainPrint1(rest u,brief,env) SAY '"-----------------------------------------------------------------------" diff --git a/src/interp/g-error.boot b/src/interp/g-error.boot index 60eab314..f5e6d17d 100644 --- a/src/interp/g-error.boot +++ b/src/interp/g-error.boot @@ -104,7 +104,7 @@ errorSupervisor1(errorType,errorMsg,$BreakMode) == handleLispBreakLoop($BreakMode) handleLispBreakLoop($BreakMode) == - TERPRI() + finishLine $OutputStream $BreakMode = 'break => sayBrightly '" " BREAK() diff --git a/src/interp/ht-util.boot b/src/interp/ht-util.boot index 20c7ba23..fcc9b2f5 100644 --- a/src/interp/ht-util.boot +++ b/src/interp/ht-util.boot @@ -464,7 +464,7 @@ doDoitButton(htPage, command) == executeInterpreterCommand command == PRINC command - TERPRI() + finishLine $OutputStream ncSetCurrentLine(command) CATCH($SpadReaderTag, parseAndInterpret command) not $leanMode and printPrompt() diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index cc4b4db8..8170ccb0 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -2247,13 +2247,13 @@ spool filename == null filename => DRIBBLE() SETQ(_*TRACE_-OUTPUT_*,_*STANDARD_-OUTPUT_*) - TERPRI() + finishLine $OutputStream resetHighlight() PROBE_-FILE STRING first filename => systemError strconc('"file ", STRING first filename, '" already exists") DRIBBLE STRING first filename SETQ(_*TRACE_-OUTPUT_*,_*STANDARD_-OUTPUT_*) - TERPRI() + finishLine $OutputStream clearHighlight() --% )synonym diff --git a/src/interp/i-toplev.boot b/src/interp/i-toplev.boot index be0b4496..15a63bad 100644 --- a/src/interp/i-toplev.boot +++ b/src/interp/i-toplev.boot @@ -104,7 +104,7 @@ start(:l) == sayKeyedMsg("S2IZ0051",nil) else sayKeyedMsg("S2IZ0052",nil) SAY fillerSpaces($LINELENGTH,char "=") - TERPRI() + finishLine $OutputStream $OLDLINE := nil $superHash := hashTable 'EQUAL if null l then runspad() diff --git a/src/interp/postpar.boot b/src/interp/postpar.boot index 391a3019..eeebbfe0 100644 --- a/src/interp/postpar.boot +++ b/src/interp/postpar.boot @@ -73,7 +73,7 @@ displayPreCompilationErrors() == if 1 %ParseForm postTran x == diff --git a/src/interp/setvars.boot b/src/interp/setvars.boot index f519cc23..906f2248 100644 --- a/src/interp/setvars.boot +++ b/src/interp/setvars.boot @@ -278,7 +278,7 @@ displaySetOptionInformation(arg,setData) == sayBrightly ['"%l",:bright '"Description:",setData.setLabel] st = 'FUNCTION => - TERPRI() + finishLine $OutputStream if functionp(setData.setVar) then FUNCALL(setData.setVar,"%describe%") else sayMSG '" Function not implemented." @@ -316,7 +316,7 @@ displaySetVariableSettings(setTree,label) == else label := strconc('" ",object2String label,'" ") centerAndHighlight(strconc('"Current Values of ",label, '" Variables"),$LINELENGTH," ") - TERPRI() + finishLine $OutputStream sayBrightly ["Variable ", "Description ", "Current Value"] @@ -348,7 +348,7 @@ displaySetVariableSettings(setTree,label) == sayBrightly [setOption,:bright '"..."] subtree := true subname := object2String setData.setName - TERPRI() + finishLine $OutputStream subtree => sayBrightly ['"Variables with current values of",:bright '"...", '"have further sub-options. For example,"] @@ -676,7 +676,7 @@ setFunctionsCache arg == '"..." (null arg) or (arg = "%describe%") or (first arg = '_?) => describeSetFunctionsCache() - TERPRI() + finishLine $OutputStream sayAllCacheCounts() n := first arg (n ~= 'all) and ((not integer? n) or (n < 0)) => @@ -717,7 +717,7 @@ describeSetFunctionsCache() == sayAllCacheCounts () == sayCacheCount(nil,$cacheCount) $cacheAlist => - TERPRI() + finishLine $OutputStream -- SAY '" However," for [x,:n] in $cacheAlist | n ~= $cacheCount repeat sayCacheCount(x,n) @@ -766,7 +766,7 @@ setHistory arg == if name = current then sayBrightly ['" ->",:bright name] else sayBrightly ['" ",name] - TERPRI() + finishLine $OutputStream sayBrightly '" The current setting is indicated within the list." sayBrightly [:bright '"yes",'"and",:bright '"no", '"have the same effect as",:bright '"on",'"and",:bright '"off", @@ -1019,7 +1019,7 @@ setOutputCharacters arg == if name = current then sayBrightly ['" ->",:bright name] else sayBrightly ['" ",name] - TERPRI() + finishLine $OutputStream sayBrightly '" The current setting is indicated within the list. This option determines " sayBrightly '" the special characters used for algebraic output. This is what the" sayBrightly '" current choice of special characters looks like:" diff --git a/src/interp/topics.boot b/src/interp/topics.boot index 6174b0bd..22a8ed50 100644 --- a/src/interp/topics.boot +++ b/src/interp/topics.boot @@ -1,4 +1,4 @@ --- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. +-- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. -- Copyright (C) 2007-2012, Gabriel Dos Reis. -- All rights reserved. @@ -207,7 +207,7 @@ tdPrint hash == sayBrightly [key,'":"] sayBrightlyNT '" " for x in tableValue(hash,key) repeat sayBrightlyNT ['" ",x] - TERPRI() + finishLine $OutputStream topics con == --assumes that DOCUMENTATION property already has #s added diff --git a/src/interp/trace.boot b/src/interp/trace.boot index f62db3c4..71ab533c 100644 --- a/src/interp/trace.boot +++ b/src/interp/trace.boot @@ -591,7 +591,7 @@ letPrint(x,val,currentFunction) == not (IS__GENVAR(x) or isSharpVarWithNum(x) or gensym? x) then sayBrightlyNT [:bright x,": "] PRIN1 shortenForPrinting val - TERPRI() + finishLine $OutputStream if (y:= hasPair("BREAK",y)) and (y="all" or symbolMember?(x,y) and (not symbolMember?(PNAME(x).0,'($ _#)) and not gensym? x)) then -- cgit v1.2.3