Remove file-length

db4
Eduardo Cavazos 2008-03-13 01:49:21 -06:00
parent 979a81a25d
commit c3391ac0ae
2 changed files with 3 additions and 2 deletions

View File

@ -220,7 +220,7 @@ M: pathname <=> [ pathname-string ] compare ;
>r <file-reader> r> with-stream ; inline >r <file-reader> r> with-stream ; inline
: file-contents ( path encoding -- str ) : file-contents ( path encoding -- str )
dupd [ file-length read ] with-file-reader ; dupd [ file-info file-info-size read ] with-file-reader ;
: with-file-writer ( path encoding quot -- ) : with-file-writer ( path encoding quot -- )
>r <file-writer> r> with-stream ; inline >r <file-writer> r> with-stream ; inline

View File

@ -4,6 +4,7 @@ USING: alien alien.accessors alien.c-types arrays io kernel libc
math math.vectors namespaces opengl opengl.gl prettyprint assocs math math.vectors namespaces opengl opengl.gl prettyprint assocs
sequences io.files io.styles continuations freetype sequences io.files io.styles continuations freetype
ui.gadgets.worlds ui.render ui.backend byte-arrays ; ui.gadgets.worlds ui.render ui.backend byte-arrays ;
IN: ui.freetype IN: ui.freetype
TUPLE: freetype-renderer ; TUPLE: freetype-renderer ;
@ -74,7 +75,7 @@ M: freetype-renderer free-fonts ( world -- )
: open-face ( font style -- face ) : open-face ( font style -- face )
ttf-name ttf-path ttf-name ttf-path
dup malloc-file-contents dup malloc-file-contents
swap file-length swap file-info file-info-size
(open-face) ; (open-face) ;
SYMBOL: dpi SYMBOL: dpi