Make at_line_start persist between printing each file. This fixes an
issue when numbering lines in the output and one of the input files
does not have a trailing newline.
- adds conditional supports for unix domain sockets
- adds unix domain socket test
- adds Results to functions, removing unwraps
- uutils `cat` used to panic on broken stdout pipes (e.g. `cat
/dev/zero | head -c1`). this is fixed in this PR
- updated to exit 0 on success, and 1 if an error occurs.
- adds docstrings
- adds an error log on printing a directory
- adds categorization of other filetypes for extensible
differentiation of behaviors
- adds OutputOptions struct to replace params for extensibility
- adds correct status code on exit
Fixes#1017.
test_mkdir_dup_dir asserted that creating an existing directory is an
error, but that's not how GNU coreutils behaves. This has been reported
in #121, but wasn't fixed (only the `-p` case was).
Fuchsia uses musl as its libc; musl only has stub implementation
for utmpx. From their wiki, that is deliberately chosen.
Fuchsia doesn't have signals mechanism.
* update status in README.md
* enable busybox tests
Adding `CONFIG_DESKTOP` and `CONFIG_LONG_OPTS` to busybox config.
These flags also enable other tests, but those utilities are not
included in `TEST_PROGS`. (eg. awk)
* fix whitespace and small issues
* fix Eq imp for FormatWriter on nightly + beta
* fix indention in multifilereader.rs
* fix intermittent errors in tests
Rewrote cat to eliminate code duplication and make it safe
- UnsafeWriter is replaced by BufWriter
- write_lines (any option except -T and -v) and write_bytes (-T and -v
options) are replaced by single write_lines method. A new method use
``write_to_end``, ``write_tab_to_end`` or ``write_nonprint_to_end``
method to write all symbols untill the end of line in the right way.
- Benchmarking (-n, -T and -v options respectively):
| old (ns/iter) | new (ns/iter) |
| -------------------------- | -------------------------- |
| 6,501,496 (+/- 1,173,481) | 6,683,158 (+/- 373,539) |
| 8,634,023 (+/- 547,595) | 5,408,676 (+/- 715,458) |
| 24,056,507 (+/- 1,177,445) | 30,879,788 (+/- 1,180,598) |