Merge branch 'master' of git://littledan.onigirihouse.com/git/littledan

db4
Slava Pestov 2008-02-01 18:31:13 -06:00
commit 0cd8eb8745
8 changed files with 19 additions and 15 deletions

View File

@ -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
;
;

View File

@ -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

View File

@ -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 )

View File

@ -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 )
[

View File

@ -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" } ;

View File

@ -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 ;

View File

@ -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 ;

View File

@ -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 )