apps/rss: fix bitrot and broken stack effects

darcs
chris.double 2006-12-14 13:35:53 +00:00
parent 6a46eb2b2d
commit f23ba12c95
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ USING: kernel http-client sequences namespaces math errors io ;
: (between-tags) ( tag seq -- content ) : (between-tags) ( tag seq -- content )
#! Return a string containing the contents of the XML tag contained in seq. Returns #! Return a string containing the contents of the XML tag contained in seq. Returns
#! false if the tag is not found. #! false if the tag is not found.
[ find-start-tag [ "no start tag" throw ] unless* ] 2keep [ find-end-tag 2dup and ] keep swap [ subseq ] when ; [ find-start-tag [ "no start tag" throw ] unless* ] 2keep [ find-end-tag 2dup and ] keep swap [ subseq ] [ 3drop "" ] if ;
: between-tags ( tag seq -- content ) : between-tags ( tag seq -- content )
[ (between-tags) ] catch [ 3drop "" ] when* ; [ (between-tags) ] catch [ 3drop "" ] when* ;
@ -54,7 +54,7 @@ USING: kernel http-client sequences namespaces math errors io ;
-rot >r >r over push r> r> r> ! list tag seq end -rot >r >r over push r> r> r> ! list tag seq end
over length rot subseq (child-tags) over length rot subseq (child-tags)
] [ ] [
drop drop drop drop drop drop drop drop drop
] if ; ] if ;
: child-tags ( tag seq -- list ) : child-tags ( tag seq -- list )