From bff72ecab3900add29892dc64d98936c0424a609 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 26 Jul 2009 06:25:38 +0000 Subject: * interp/c-doc.boot (checkDecorate): Tidy. * interp/format.boot (form2Fence1): Likewise. (form2FenceQuote): Likewise. --- src/ChangeLog | 6 ++++++ src/interp/c-doc.boot | 10 +++++----- src/interp/format.boot | 9 +++++---- 3 files changed, 16 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index ca318df2..8051a423 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2009-07-26 Gabriel Dos Reis + + * interp/c-doc.boot (checkDecorate): Tidy. + * interp/format.boot (form2Fence1): Likewise. + (form2FenceQuote): Likewise. + 2009-07-24 Gabriel Dos Reis Fix SF/2798962 diff --git a/src/interp/c-doc.boot b/src/interp/c-doc.boot index 7355d14f..9afdd7b0 100644 --- a/src/interp/c-doc.boot +++ b/src/interp/c-doc.boot @@ -53,7 +53,7 @@ getDoc(conName,op,modemap) == sig := MSUBST('$,dc,sig) getDocForCategory(conName,op,sig) -++ Given a preidcate `pred' for a modemap, returns the first +++ Given a predicate `pred' for a modemap, returns the first ++ argument to the ofCategory predicate it contains. Return ++ nil otherwise. getOfCategoryArgument pred == @@ -821,10 +821,10 @@ checkDecorate u == ['"th",$charRbrace,x.0,$charLbrace,'"\spad",:acc] xcount = 4 and x.1 = char '_- and x.2 = char 't and x.3 = char 'h => ['"-th",$charRbrace,x.0,$charLbrace,'"\spad",:acc] - xcount = 2 and x.1 = char 'i or --wrap ei, xi, hi - not spadflag and xcount > 0 and xcount < 4 and not member(x,'("th" "rd" "st")) and - hasNoVowels x => --wrap words with no vowels - [$charRbrace,x,$charLbrace,'"\spad",:acc] + not spadflag and (xcount = 2 and x.1 = char 'i or --wrap ei, xi, hi + xcount > 0 and xcount < 4 and not member(x,'("th" "rd" "st")) and + hasNoVowels x) => --wrap words with no vowels + [$charRbrace,x,$charLbrace,'"\spad",:acc] [checkAddBackSlashes x,:acc] u := rest u NREVERSE acc diff --git a/src/interp/format.boot b/src/interp/format.boot index 9e2c9416..3d72f266 100644 --- a/src/interp/format.boot +++ b/src/interp/format.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2008, Gabriel Dos Reis. +-- Copyright (C) 2007-2009, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -782,16 +782,17 @@ form2Fence form == form2Fence1 x == x is [op,:argl] => - op = 'QUOTE => ['"(QUOTE ",:form2FenceQuote first argl,'")"] + op = "QUOTE" => ['"(QUOTE ",:form2FenceQuote first argl,'")"] ['"(", FORMAT(NIL, '"|~a|", op),:"append"/[form2Fence1 y for y in argl],'")"] + null x => '"" IDENTP x => FORMAT(NIL, '"|~a|", x) --- [x] ['" ", x] form2FenceQuote x == NUMBERP x => [STRINGIMAGE x] SYMBOLP x => [FORMAT(NIL, '"|~a|", x)] - atom x => '"??" + STRINGP x => ['"_"",x,'"_""] + atom x => systemErrorHere ["form2FenceQuote",x] ['"(",:form2FenceQuote first x,:form2FenceQuoteTail rest x] form2FenceQuoteTail x == -- cgit v1.2.3