! Copyright (C) 2009 Anthony Simpson. ! See http://factorcode.org/license.txt for BSD license. USING: kernel namespaces sequences command-line io.files io.encodings.utf8 io ; IN: wnlc : convert ( seq -- seq ) [ CHAR: \r = not ] filter ; : read-file ( path -- seq ) utf8 file-contents ; : write-file ( seq path -- ) utf8 set-file-contents ; : doconvert ( -- ) (command-line) rest [ dup read-file convert swap write-file ] each ; : main ( -- ) doconvert ; MAIN: main