1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

refactor/polish ~ whitespace normalization (consistent indentation [either tabs *or* spaces], EOF EOLNs, no trailing whitespace)

This commit is contained in:
Roy Ivy III 2020-05-10 21:14:58 -05:00
parent 3877cf4bd3
commit 6606408ce9
10 changed files with 273 additions and 273 deletions

View file

@ -24,109 +24,109 @@ test_unimplemented = []
## (common/core and Tier1) feature sets ## (common/core and Tier1) feature sets
# "feat_common_core" == baseline core set of utilities which can be built/run on most targets # "feat_common_core" == baseline core set of utilities which can be built/run on most targets
feat_common_core = [ feat_common_core = [
"base32", "base32",
"base64", "base64",
"basename", "basename",
"cat", "cat",
"cksum", "cksum",
"comm", "comm",
"cp", "cp",
"cut", "cut",
"date", "date",
"df", "df",
"dircolors", "dircolors",
"dirname", "dirname",
"echo", "echo",
"env", "env",
"expand", "expand",
"expr", "expr",
"factor", "factor",
"false", "false",
"fmt", "fmt",
"fold", "fold",
"hashsum", "hashsum",
"head", "head",
"join", "join",
"link", "link",
"ln", "ln",
"ls", "ls",
"mkdir", "mkdir",
"mktemp", "mktemp",
"more", "more",
"mv", "mv",
"nl", "nl",
"od", "od",
"paste", "paste",
"printenv", "printenv",
"printf", "printf",
"ptx", "ptx",
"pwd", "pwd",
"readlink", "readlink",
"realpath", "realpath",
"relpath", "relpath",
"rm", "rm",
"rmdir", "rmdir",
"seq", "seq",
"shred", "shred",
"shuf", "shuf",
"sleep", "sleep",
"sort", "sort",
"split", "split",
"sum", "sum",
"tac", "tac",
"tail", "tail",
"tee", "tee",
"test", "test",
"tr", "tr",
"true", "true",
"truncate", "truncate",
"tsort", "tsort",
"unexpand", "unexpand",
"uniq", "uniq",
"wc", "wc",
"yes", "yes",
] ]
# "feat_Tier1" == expanded set of utilities which can be built/run on the usual rust "Tier 1" target platforms (ref: <https://forge.rust-lang.org/release/platform-support.html>) # "feat_Tier1" == expanded set of utilities which can be built/run on the usual rust "Tier 1" target platforms (ref: <https://forge.rust-lang.org/release/platform-support.html>)
feat_Tier1 = [ feat_Tier1 = [
"feat_common_core", "feat_common_core",
# #
"arch", "arch",
"hostname", "hostname",
"nproc", "nproc",
"sync", "sync",
"touch", "touch",
"whoami", "whoami",
] ]
## (primary platforms) feature sets ## (primary platforms) feature sets
# "feat_os_macos" == set of utilities which can be built/run on the MacOS platform # "feat_os_macos" == set of utilities which can be built/run on the MacOS platform
feat_os_macos = [ feat_os_macos = [
"feat_os_unix", ## == a modern/usual *nix platform "feat_os_unix", ## == a modern/usual *nix platform
] ]
# "feat_os_unix" == set of utilities which can be built/run on modern/usual *nix platforms # "feat_os_unix" == set of utilities which can be built/run on modern/usual *nix platforms
feat_os_unix = [ feat_os_unix = [
"feat_Tier1", "feat_Tier1",
# #
"feat_require_crate_cpp", "feat_require_crate_cpp",
"feat_require_unix", "feat_require_unix",
"feat_require_unix_utmpx", "feat_require_unix_utmpx",
] ]
# "feat_os_windows" == set of utilities which can be built/run on modern/usual windows platforms # "feat_os_windows" == set of utilities which can be built/run on modern/usual windows platforms
feat_os_windows = [ feat_os_windows = [
"feat_Tier1", ## == "feat_os_windows_legacy" + "hostname" "feat_Tier1", ## == "feat_os_windows_legacy" + "hostname"
] ]
## (secondary platforms) feature sets ## (secondary platforms) feature sets
# "feat_os_unix_gnueabihf" == set of utilities which can be built/run on the "arm-unknown-linux-gnueabihf" target (ARMv6 Linux [hardfloat]) # "feat_os_unix_gnueabihf" == set of utilities which can be built/run on the "arm-unknown-linux-gnueabihf" target (ARMv6 Linux [hardfloat])
feat_os_unix_gnueabihf = [ feat_os_unix_gnueabihf = [
"feat_Tier1", "feat_Tier1",
# #
"feat_require_unix", "feat_require_unix",
"feat_require_unix_utmpx", "feat_require_unix_utmpx",
] ]
# "feat_os_unix_musl" == set of utilities which can be built/run on targets binding to the "musl" library (ref: <https://musl.libc.org/about.html>) # "feat_os_unix_musl" == set of utilities which can be built/run on targets binding to the "musl" library (ref: <https://musl.libc.org/about.html>)
feat_os_unix_musl = [ feat_os_unix_musl = [
"feat_Tier1", "feat_Tier1",
# #
"feat_require_unix", "feat_require_unix",
] ]
## feature sets with requirements (restricting cross-platform availability) ## feature sets with requirements (restricting cross-platform availability)
# #
@ -134,81 +134,81 @@ feat_os_unix_musl = [
# #
# "feat_require_crate_cpp" == set of utilities requiring the `cpp` crate (which fail to compile on several platforms; as of 2020-04-23) # "feat_require_crate_cpp" == set of utilities requiring the `cpp` crate (which fail to compile on several platforms; as of 2020-04-23)
feat_require_crate_cpp = [ feat_require_crate_cpp = [
"stdbuf", "stdbuf",
] ]
# "feat_require_unix" == set of utilities requiring support which is only available on unix platforms (as of 2020-04-23) # "feat_require_unix" == set of utilities requiring support which is only available on unix platforms (as of 2020-04-23)
feat_require_unix = [ feat_require_unix = [
"chgrp", "chgrp",
"chmod", "chmod",
"chown", "chown",
"chroot", "chroot",
"du", "du",
"groups", "groups",
"hostid", "hostid",
"id", "id",
"install", "install",
"kill", "kill",
"logname", "logname",
"mkfifo", "mkfifo",
"mknod", "mknod",
"nice", "nice",
"numfmt", "numfmt",
"nohup", "nohup",
"pathchk", "pathchk",
"stat", "stat",
"timeout", "timeout",
"tty", "tty",
"uname", "uname",
"unlink", "unlink",
] ]
# "feat_require_unix_utmpx" == set of utilities requiring unix utmp/utmpx support # "feat_require_unix_utmpx" == set of utilities requiring unix utmp/utmpx support
# * ref: <https://wiki.musl-libc.org/faq.html#Q:-Why-is-the-utmp/wtmp-functionality-only-implemented-as-stubs?> # * ref: <https://wiki.musl-libc.org/faq.html#Q:-Why-is-the-utmp/wtmp-functionality-only-implemented-as-stubs?>
feat_require_unix_utmpx = [ feat_require_unix_utmpx = [
"pinky", "pinky",
"uptime", "uptime",
"users", "users",
"who", "who",
] ]
## (alternate/newer/smaller platforms) feature sets ## (alternate/newer/smaller platforms) feature sets
# "feat_os_unix_fuchsia" == set of utilities which can be built/run on the "Fuchsia" OS (refs: <https://fuchsia.dev>; <https://en.wikipedia.org/wiki/Google_Fuchsia>) # "feat_os_unix_fuchsia" == set of utilities which can be built/run on the "Fuchsia" OS (refs: <https://fuchsia.dev>; <https://en.wikipedia.org/wiki/Google_Fuchsia>)
feat_os_unix_fuchsia = [ feat_os_unix_fuchsia = [
"feat_common_core", "feat_common_core",
# #
"feat_require_crate_cpp", "feat_require_crate_cpp",
# #
"chgrp", "chgrp",
"chmod", "chmod",
"chown", "chown",
"du", "du",
"groups", "groups",
"hostid", "hostid",
"install", "install",
"logname", "logname",
"mkfifo", "mkfifo",
"mknod", "mknod",
"nice", "nice",
"pathchk", "pathchk",
"tty", "tty",
"uname", "uname",
"unlink", "unlink",
] ]
# "feat_os_unix_redox" == set of utilities which can be built/run on "Redox OS" (refs: <https://www.redox-os.org>; <https://en.wikipedia.org/wiki/Redox_(operating_system)>) # "feat_os_unix_redox" == set of utilities which can be built/run on "Redox OS" (refs: <https://www.redox-os.org>; <https://en.wikipedia.org/wiki/Redox_(operating_system)>)
feat_os_unix_redox = [ feat_os_unix_redox = [
"feat_common_core", "feat_common_core",
# #
"uname", "uname",
"chmod", "chmod",
"install", "install",
] ]
# "feat_os_windows_legacy" == slightly restricted set of utilities which can be built/run on early windows platforms (eg, "WinXP") # "feat_os_windows_legacy" == slightly restricted set of utilities which can be built/run on early windows platforms (eg, "WinXP")
feat_os_windows_legacy = [ feat_os_windows_legacy = [
"feat_common_core", "feat_common_core",
# #
"arch", "arch",
"nproc", "nproc",
"sync", "sync",
"touch", "touch",
"whoami", "whoami",
] ]
[workspace] [workspace]

View file

@ -46,101 +46,101 @@ BUSYBOX_SRC := $(BUSYBOX_ROOT)/busybox-$(BUSYBOX_VER)
# Possible programs # Possible programs
PROGS := \ PROGS := \
base32 \ base32 \
base64 \ base64 \
basename \ basename \
cat \ cat \
cksum \ cksum \
comm \ comm \
cp \ cp \
cut \ cut \
df \ df \
dircolors \ dircolors \
dirname \ dirname \
echo \ echo \
env \ env \
expand \ expand \
expr \ expr \
factor \ factor \
false \ false \
fmt \ fmt \
fold \ fold \
hashsum \ hashsum \
head \ head \
join \ join \
link \ link \
ln \ ln \
ls \ ls \
mkdir \ mkdir \
mktemp \ mktemp \
more \ more \
mv \ mv \
nl \ nl \
numfmt \ numfmt \
nproc \ nproc \
od \ od \
paste \ paste \
printenv \ printenv \
printf \ printf \
ptx \ ptx \
pwd \ pwd \
readlink \ readlink \
realpath \ realpath \
relpath \ relpath \
rm \ rm \
rmdir \ rmdir \
seq \ seq \
shred \ shred \
shuf \ shuf \
sleep \ sleep \
sort \ sort \
split \ split \
sum \ sum \
sync \ sync \
tac \ tac \
tail \ tail \
tee \ tee \
test \ test \
tr \ tr \
true \ true \
truncate \ truncate \
tsort \ tsort \
unexpand \ unexpand \
uniq \ uniq \
wc \ wc \
whoami \ whoami \
yes yes
UNIX_PROGS := \ UNIX_PROGS := \
arch \ arch \
chgrp \ chgrp \
chmod \ chmod \
chown \ chown \
chroot \ chroot \
du \ du \
groups \ groups \
hostid \ hostid \
hostname \ hostname \
id \ id \
install \ install \
kill \ kill \
logname \ logname \
mkfifo \ mkfifo \
mknod \ mknod \
nice \ nice \
nohup \ nohup \
pathchk \ pathchk \
pinky \ pinky \
stat \ stat \
stdbuf \ stdbuf \
timeout \ timeout \
touch \ touch \
tty \ tty \
uname \ uname \
unlink \ unlink \
uptime \ uptime \
users \ users \
who who
ifneq ($(OS),Windows_NT) ifneq ($(OS),Windows_NT)
PROGS := $(PROGS) $(UNIX_PROGS) PROGS := $(PROGS) $(UNIX_PROGS)
@ -229,7 +229,7 @@ endef
# Output names # Output names
EXES := \ EXES := \
$(sort $(filter $(UTILS),$(filter-out $(SKIP_UTILS),$(PROGS)))) $(sort $(filter $(UTILS),$(filter-out $(SKIP_UTILS),$(PROGS))))
INSTALLEES := ${EXES} INSTALLEES := ${EXES}
ifeq (${MULTICALL}, y) ifeq (${MULTICALL}, y)

View file

@ -36,7 +36,7 @@ set_env CARGO_MAKE_CARGO_BUILD_TEST_FLAGS ""
# determine features # determine features
env_features = get_env CARGO_FEATURES env_features = get_env CARGO_FEATURES
if is_empty "${env_features}" if is_empty "${env_features}"
env_features = get_env FEATURES env_features = get_env FEATURES
end_if end_if
if is_empty "${env_features}" if is_empty "${env_features}"
if eq "${CARGO_MAKE_RUST_TARGET_OS}" "macos" if eq "${CARGO_MAKE_RUST_TARGET_OS}" "macos"
@ -61,7 +61,7 @@ end_if
# set build flags from features # set build flags from features
if not is_empty "${features}" if not is_empty "${features}"
set_env CARGO_MAKE_VAR_BUILD_TEST_FEATURES "${features}" set_env CARGO_MAKE_VAR_BUILD_TEST_FEATURES "${features}"
set_env CARGO_MAKE_CARGO_BUILD_TEST_FLAGS "--features ${features}" set_env CARGO_MAKE_CARGO_BUILD_TEST_FLAGS "--features ${features}"
end_if end_if
# determine show-utils helper script # determine show-utils helper script
show_utils = set "util/show-utils.sh" show_utils = set "util/show-utils.sh"
@ -96,7 +96,7 @@ description = "## *DEFAULT* Build (debug-mode) and test project"
category = "[project]" category = "[project]"
dependencies = [ dependencies = [
"action-build-debug", "action-build-debug",
"test-terse", "test-terse",
] ]
## ##
@ -106,8 +106,8 @@ description = "## Build (release-mode) project"
category = "[project]" category = "[project]"
dependencies = [ dependencies = [
"core::pre-build", "core::pre-build",
"action-build-release", "action-build-release",
"core::post-build", "core::post-build",
] ]
[tasks.build-debug] [tasks.build-debug]
@ -122,8 +122,8 @@ description = "## Build (release-mode) project example(s); usage: `cargo make (b
category = "[project]" category = "[project]"
dependencies = [ dependencies = [
"core::pre-build", "core::pre-build",
"action-build-examples", "action-build-examples",
"core::post-build", "core::post-build",
] ]
[tasks.build-features] [tasks.build-features]
@ -131,8 +131,8 @@ description = "## Build (with features; release-mode) project; usage: `cargo mak
category = "[project]" category = "[project]"
dependencies = [ dependencies = [
"core::pre-build", "core::pre-build",
"action-build-features", "action-build-features",
"core::post-build", "core::post-build",
] ]
[tasks.debug] [tasks.debug]
@ -185,8 +185,8 @@ description = "## Run project tests"
category = "[project]" category = "[project]"
dependencies = [ dependencies = [
"core::pre-test", "core::pre-test",
"core::test", "core::test",
"core::post-test", "core::post-test",
] ]
[tasks.test-terse] [tasks.test-terse]
@ -194,8 +194,8 @@ description = "## Run project tests (with terse/summary output)"
category = "[project]" category = "[project]"
dependencies = [ dependencies = [
"core::pre-test", "core::pre-test",
"action-test_quiet", "action-test_quiet",
"core::post-test", "core::post-test",
] ]
[tasks.uninstall] [tasks.uninstall]
@ -213,8 +213,8 @@ category = "[project]"
dependencies = [ dependencies = [
"core::pre-build", "core::pre-build",
"action-determine-utils", "action-determine-utils",
"action-build-utils", "action-build-utils",
"core::post-build", "core::post-build",
] ]
[tasks.uutil] [tasks.uutil]

View file

@ -5,7 +5,7 @@ pushd %~dp0
REM Command file for Sphinx documentation REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" ( if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build set SPHINXBUILD=sphinx-build
) )
set SOURCEDIR=. set SOURCEDIR=.
set BUILDDIR=_build set BUILDDIR=_build
@ -15,15 +15,15 @@ if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL %SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 ( if errorlevel 9009 (
echo. echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH. echo.may add the Sphinx directory to PATH.
echo. echo.
echo.If you don't have Sphinx installed, grab it from echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/ echo.http://sphinx-doc.org/
exit /b 1 exit /b 1
) )
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

View file

@ -128,10 +128,10 @@ Exit status is 0 if EXPRESSION is neither null nor 0, 1 if EXPRESSION is null
or 0, 2 if EXPRESSION is syntactically invalid, and 3 if an error occurred. or 0, 2 if EXPRESSION is syntactically invalid, and 3 if an error occurred.
Environment variables: Environment variables:
* EXPR_DEBUG_TOKENS=1 dump expression's tokens * EXPR_DEBUG_TOKENS=1 dump expression's tokens
* EXPR_DEBUG_RPN=1 dump expression represented in reverse polish notation * EXPR_DEBUG_RPN=1 dump expression represented in reverse polish notation
* EXPR_DEBUG_SYA_STEP=1 dump each parser step * EXPR_DEBUG_SYA_STEP=1 dump each parser step
* EXPR_DEBUG_AST=1 dump expression represented abstract syntax tree"# * EXPR_DEBUG_AST=1 dump expression represented abstract syntax tree"#
); );
} }

View file

@ -331,19 +331,19 @@ pub fn uumain(args: Vec<String>) -> i32 {
auto accept optional single/two letter suffix: auto accept optional single/two letter suffix:
1K = 1000, 1Ki = 1024, 1M = 1000000, 1Mi = 1048576, 1K = 1000, 1Ki = 1024, 1M = 1000000, 1Mi = 1048576,
si accept optional single letter suffix: si accept optional single letter suffix:
1K = 1000, 1M = 1000000, ... 1K = 1000, 1M = 1000000, ...
iec accept optional single letter suffix: iec accept optional single letter suffix:
1K = 1024, 1M = 1048576, ... 1K = 1024, 1M = 1048576, ...
iec-i accept optional two-letter suffix: iec-i accept optional two-letter suffix:
1Ki = 1024, 1Mi = 1048576, ..." 1Ki = 1024, 1Mi = 1048576, ..."
); );
return 0; return 0;