diff --git a/extra/cryptlib/streams/streams.factor b/extra/cryptlib/streams/streams.factor index 828476d2e2..04106285e0 100755 --- a/extra/cryptlib/streams/streams.factor +++ b/extra/cryptlib/streams/streams.factor @@ -3,7 +3,7 @@ USING: cryptlib cryptlib.libcl kernel alien sequences continuations byte-arrays namespaces io.buffers math generic io strings io.streams.lines io.streams.plain io.streams.duplex combinators -alien.c-types ; +alien.c-types continuations ; IN: cryptlib.streams @@ -154,4 +154,4 @@ M: crypt-stream dispose ( stream -- ) dispose end - ; \ No newline at end of file + ; diff --git a/extra/html/elements/elements.factor b/extra/html/elements/elements.factor index 0f76c2e91e..101bc423b5 100644 --- a/extra/html/elements/elements.factor +++ b/extra/html/elements/elements.factor @@ -4,7 +4,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: io kernel namespaces prettyprint quotations -sequences strings words xml.writer xml.entities compiler.units effects ; +sequences strings words xml.entities compiler.units effects ; IN: html.elements diff --git a/extra/html/html.factor b/extra/html/html.factor index b5b0a5e2a9..0619937332 100755 --- a/extra/html/html.factor +++ b/extra/html/html.factor @@ -3,7 +3,7 @@ USING: generic assocs help http io io.styles io.files continuations io.streams.string kernel math math.parser namespaces quotations assocs sequences strings words html.elements -xml.writer xml.entities sbufs ; +xml.entities sbufs continuations ; IN: html GENERIC: browser-link-href ( presented -- href ) diff --git a/extra/http/http.factor b/extra/http/http.factor index 9e5d34fa36..7beb3b9da0 100755 --- a/extra/http/http.factor +++ b/extra/http/http.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2003, 2007 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: hashtables io kernel math namespaces math.parser assocs -sequences strings splitting ; +sequences strings splitting ascii ; IN: http : header-line ( line -- ) @@ -20,7 +20,7 @@ IN: http dup letter? over LETTER? or over digit? or - swap "/_-?." member? or ; foldable + swap "/_-." member? or ; foldable : url-encode ( str -- str ) [ diff --git a/extra/io/sniffer/bsd/bsd.factor b/extra/io/sniffer/bsd/bsd.factor index ae87c05d38..66336425a1 100644 --- a/extra/io/sniffer/bsd/bsd.factor +++ b/extra/io/sniffer/bsd/bsd.factor @@ -7,7 +7,7 @@ sequences io.sniffer.backend ; QUALIFIED: unix IN: io.sniffer.bsd -M: unix-io destruct-handle ( obj -- ) close drop ; +M: unix-io destruct-handle ( obj -- ) unix:close drop ; C-UNION: ifreq_props "sockaddr-in" "short" "int" "caddr_t" ; C-STRUCT: ifreq { { "char" 16 } "name" } { "ifreq_props" "props" } ; diff --git a/extra/tar/tar.factor b/extra/tar/tar.factor index d3412568fe..363ce6b412 100755 --- a/extra/tar/tar.factor +++ b/extra/tar/tar.factor @@ -1,6 +1,8 @@ -USING: combinators io io.files io.streams.duplex continuations -io.streams.string kernel math math.parser -namespaces pack prettyprint sequences strings system hexdump ; +<<<<<<< HEAD:extra/tar/tar.factor +USING: combinators io io.files io.streams.duplex +io.streams.string kernel math math.parser continuations +namespaces pack prettyprint sequences strings system ; +USING: hexdump tools.interpreter ; IN: tar : zero-checksum 256 ; diff --git a/extra/webapps/pastebin/pastebin.factor b/extra/webapps/pastebin/pastebin.factor index e02e5c01f2..21bae57fe7 100755 --- a/extra/webapps/pastebin/pastebin.factor +++ b/extra/webapps/pastebin/pastebin.factor @@ -1,6 +1,6 @@ USING: calendar furnace furnace.validator io.files kernel -namespaces sequences http.server.responders html math math.parser rss -xml.writer xmode.code2html ; +namespaces sequences http.server.responders html math.parser rss +xml.writer xmode.code2html math ; IN: webapps.pastebin TUPLE: pastebin pastes ; diff --git a/extra/wrap/wrap.factor b/extra/wrap/wrap.factor index 4392ac81a6..41dea1bd13 100644 --- a/extra/wrap/wrap.factor +++ b/extra/wrap/wrap.factor @@ -12,15 +12,17 @@ SYMBOL: width : (split-chunk) ( words -- ) -1 over [ length + 1+ dup width get > ] find drop nip - [ cut-slice swap , (split-chunk) ] [ , ] if* ; + [ 1 max cut-slice swap , (split-chunk) ] [ , ] if* ; : split-chunk ( words -- lines ) [ (split-chunk) ] { } make ; +: join-spaces ( words-seqs -- lines ) + [ [ " " join ] map ] map concat ; + : broken-lines ( string width -- lines ) width [ - line-chunks - [ split-chunk [ " " join ] map ] map concat + line-chunks [ split-chunk ] map join-spaces ] with-variable ; : line-break ( string width -- newstring )