Fixing libraries for language changes

db4
Slava Pestov 2008-08-28 22:28:01 -05:00
parent a1a8a39c34
commit 1997cbe9aa
5 changed files with 12 additions and 12 deletions

View File

@ -87,7 +87,7 @@ M: threaded-server handle-client* handler>> call ;
[ [ accept-connection ] with-semaphore ] [ [ accept-connection ] with-semaphore ]
[ accept-connection ] [ accept-connection ]
if* if*
] [ accept-loop ] bi ; inline ] [ accept-loop ] bi ; inline recursive
: started-accept-loop ( server -- ) : started-accept-loop ( server -- )
threaded-server get threaded-server get

View File

@ -27,7 +27,7 @@ IN: xml.generator
! Word-based XML literal syntax ! Word-based XML literal syntax
: parsed-name ( accum -- accum ) : parsed-name ( accum -- accum )
scan ":" split1 [ f <name> ] [ <name-tag> ] if* parsed ; scan ":" split1 [ f <name> ] [ <simple-name> ] if* parsed ;
: run-combinator ( accum quot1 quot2 -- accum ) : run-combinator ( accum quot1 quot2 -- accum )
>r [ ] like parsed r> [ parsed ] each ; >r [ ] like parsed r> [ parsed ] each ;

View File

@ -127,17 +127,17 @@ TUPLE: pull-xml scope ;
: call-under ( quot object -- quot ) : call-under ( quot object -- quot )
swap dup slip ; inline swap dup slip ; inline
: sax-loop ( quot -- ) ! quot: xml-elem -- : sax-loop ( quot: ( xml-elem -- ) -- )
parse-text call-under parse-text call-under
get-char [ make-tag call-under sax-loop ] get-char [ make-tag call-under sax-loop ]
[ drop ] if ; inline [ drop ] if ; inline recursive
: sax ( stream quot -- ) ! quot: xml-elem -- : sax ( stream quot: ( xml-elem -- ) -- )
swap [ swap [
reset-prolog init-ns-stack reset-prolog init-ns-stack
prolog-data get call-under prolog-data get call-under
sax-loop sax-loop
] state-parse ; inline ] state-parse ; inline recursive
: (read-xml) ( -- ) : (read-xml) ( -- )
[ process ] sax-loop ; inline [ process ] sax-loop ; inline

View File

@ -31,10 +31,10 @@ SYMBOL: matrix
>r over r> nth dup zero? [ >r over r> nth dup zero? [
3drop 0 3drop 0
] [ ] [
>r nth dup zero? [ >r nth dup zero? r> swap [
r> 2drop 0 2drop 0
] [ ] [
r> swap / neg swap / neg
] if ] if
] if ; ] if ;

View File

@ -76,8 +76,8 @@ TUPLE: entry title url description date ;
[ "link" tag-named "href" swap at >url >>url ] [ "link" tag-named "href" swap at >url >>url ]
[ [
{ "content" "summary" } any-tag-named { "content" "summary" } any-tag-named
dup tag-children [ string? not ] contains? dup children>> [ string? not ] contains?
[ tag-children [ write-chunk ] with-string-writer ] [ children>> [ write-chunk ] with-string-writer ]
[ children>string ] if >>description [ children>string ] if >>description
] ]
[ [
@ -96,7 +96,7 @@ TUPLE: entry title url description date ;
tri ; tri ;
: xml>feed ( xml -- feed ) : xml>feed ( xml -- feed )
dup name-tag { dup main>> {
{ "RDF" [ rss1.0 ] } { "RDF" [ rss1.0 ] }
{ "rss" [ rss2.0 ] } { "rss" [ rss2.0 ] }
{ "feed" [ atom1.0 ] } { "feed" [ atom1.0 ] }