diff options
author | Rob Landley <rob@landley.net> | 2015-02-14 14:05:00 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-02-14 14:05:00 -0600 |
commit | 7fcd90b39ce63f282d5498c06f78118bc03acf18 (patch) | |
tree | 7286fba1d1f3d57711c29a894dbe41550bf24539 | |
parent | 45962a70e01c817dea7e7bf872b4e33748df7921 (diff) | |
download | toybox-7fcd90b39ce63f282d5498c06f78118bc03acf18.tar.gz |
Split out unix2dos so scripts/single.sh and "make change" can build it standalone.
-rw-r--r-- | toys/other/dos2unix.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/toys/other/dos2unix.c b/toys/other/dos2unix.c index 690c5a8e..021ba384 100644 --- a/toys/other/dos2unix.c +++ b/toys/other/dos2unix.c @@ -2,16 +2,25 @@ * * Copyright 2012 Rob Landley <rob@landley.net> -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 between dos (\r\n) and unix (just \n) + Convert newline format from dos "\r\n" to unix "\n". + If no files listed copy from stdin, "-" is a synonym for stdin. + +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 @@ void dos2unix_main(void) { loopfiles(toys.optargs, do_dos2unix); } + +void unix2dos_main(void) +{ + dos2unix_main(); +} |