I upgraded to the recent Rust release. The only major change was the
reduction of the sleep millisecond resolution from u64 to u32 (this
matches the thread::sleep_ms() method).
This is a reworked version of expand. I did this for two main
reasons:
1. The previous version assumed the input was UTF-8. This
version is compatible with both UTF-8 and non-UTF-8 inputs.
2. This version has a new flag, -U, which forces expand to
treat input as 8-bit ASCII rather than interpreting it
as UTF-8. This might be handy in some cases.
This is a reworked version of unexpand. I did this for two main
reasons:
1. The previous version of unexpand had issues correctly computing
tabstops when the `-a` flag was supplied.
2. The previous version assumed the input was UTF-8. This version works
with non-UTF-8 inputs.
3. This version has a new flag, -U, which forces unexpand to
treat input as 8-bit ASCII rather than interpreting it
as UTF-8. This might be handy in some cases.
This rule will build each program, ignore all output, and return pass or
fail depending on whether the build has errors. This is helpful for
finding out which programs need to be fixed when a new Rust nightly
build inevitably breaks everything.
In the normal case, one does, e.g.,
make TEST="cat" test
This means that the value of EXES in the Makefile contains all
possible targets, which means many prerequisites that aren't
required get built.
With this change, when the `test` target is in effect (and,
in particular, *only* the test target), then the value of
EXES is ignored when calculating dependencies. Otherwise,
the values of EXES and TESTS are both considered.
With this change, individual submodules can specify their dependencies with
an additional file called "deps.mk" in the subdir. When building, only
the dependencies that are necessary are built, using cargo, and then linked.
This greatly simplifies adding new dependencies: add the package in
deps/Cargo.toml, and add the appropriate line in "deps.mk" in the
src/utilname/ directory, and the dependency will be built automatically
as needed.
This also removes the need to use git submodules.
After building the serialize crate, the rlib was copied to the build
directory using a hyphen in the library name ('librustc-serialize').
It seems that Rust expects an underscore instead.
This patch begins the work of modernizing uutils to work with 1.0-ish
Rust. In particular, it
1. Updates to the latest submodules.
2. Convert mkmain.rs, mkuutils.rs, and src/uutils/uutils.rs
to new slice syntax and use of new io, fs, and path APIs.
3. Convert src/common/util.rs to new io, fs, and path APIs.
4. Convert fmt to use new APIs.