split: fixes

- -b argument required, don't allow -b <= 0.
- -l argument required, don't allow -l <= 0.
- usage() and argument parsing: sort flags.
- don't write 0 size file, get rid of goto reproducable with:
  printf 'a' | split -b 1.
- close FILE *in if != stdin.
- mark split as finished in README.
- codestyle fixes.
This commit is contained in:
Hiltjo Posthuma
2015-02-01 14:00:47 +01:00
parent 5552db75ba
commit 949f930280
2 changed files with 100 additions and 106 deletions

2
README
View File

@@ -60,7 +60,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
=* setsid non-posix none
=* sleep yes none
sort no -m, -o, -d, -f, -i
split yes none
=* split yes none
= sponge non-posix none
strings no -a, -n, -t
= sync non-posix none