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.