Merge git://factorcode.org/git/factor

db4
Doug Coleman 2008-02-01 23:56:09 -06:00
commit dcd2ce7b57
3 changed files with 16 additions and 16 deletions

View File

@ -20,7 +20,7 @@ crossref off
{ "linux-ppc" "ppc/linux" }
{ "macosx-ppc" "ppc/macosx" }
{ "arm" "arm" }
} at "/bootstrap.factor" 3append parse-file
} at "/bootstrap.factor" 3append parse-file
"resource:core/bootstrap/layouts/layouts.factor" parse-file

View File

@ -58,17 +58,17 @@ M: f pprint* drop \ f pprint-word ;
! Strings
: ch>ascii-escape ( ch -- str )
H{
{ CHAR: \e CHAR: \\e }
{ CHAR: \n CHAR: \\n }
{ CHAR: \r CHAR: \\r }
{ CHAR: \t CHAR: \\t }
{ CHAR: \0 CHAR: \\0 }
{ CHAR: \\ CHAR: \\\\ }
{ CHAR: \" CHAR: \\\" }
{ CHAR: \e CHAR: e }
{ CHAR: \n CHAR: n }
{ CHAR: \r CHAR: r }
{ CHAR: \t CHAR: t }
{ CHAR: \0 CHAR: 0 }
{ CHAR: \\ CHAR: \\ }
{ CHAR: \" CHAR: \" }
} at ;
: unparse-ch ( ch -- )
dup ch>ascii-escape [ ] [ ] ?if , ;
dup ch>ascii-escape [ "\\" % ] [ ] ?if , ;
: do-string-limit ( str -- trimmed )
string-limit get [