# HG changeset patch # User Rob Landley # Date 1423944300 21600 # Node ID 3d1b78e5e0667acbbf7c5d88de5b67a570b3abb9 # Parent a5901bfefda5d7484ea67cb17f885cb2107e830a Split out unix2dos so scripts/single.sh and "make change" can build it standalone. diff -r a5901bfefda5 -r 3d1b78e5e066 toys/other/dos2unix.c --- a/toys/other/dos2unix.c Sat Feb 14 01:08:15 2015 -0600 +++ b/toys/other/dos2unix.c Sat Feb 14 14:05:00 2015 -0600 @@ -2,16 +2,25 @@ * * Copyright 2012 Rob Landley -USE_DOS2UNIX(NEWTOY(dos2unix, NULL, TOYFLAG_BIN)) -USE_DOS2UNIX(OLDTOY(unix2dos, dos2unix, TOYFLAG_BIN)) +USE_DOS2UNIX(NEWTOY(dos2unix, 0, TOYFLAG_BIN)) +USE_UNIX2DOS(NEWTOY(unix2dos, 0, TOYFLAG_BIN)) config DOS2UNIX bool "dos2unix/unix2dos" default y help - usage: dos2unix/unix2dos [file...] + usage: dos2unix [FILE...] + + Convert newline format from dos "\r\n" to unix "\n". + If no files listed copy from stdin, "-" is a synonym for stdin. - Convert newline format between dos (\r\n) and unix (just \n) +config UNIX2DOS + bool "unix2dos" + default y + help + usage: unix2dos [FILE...] + + Convert newline format from unix "\n" to dos "\r\n". If no files listed copy from stdin, "-" is a synonym for stdin. */ @@ -60,3 +69,8 @@ { loopfiles(toys.optargs, do_dos2unix); } + +void unix2dos_main(void) +{ + dos2unix_main(); +}