logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git
commit: 294a15f1d3bfce531ab18ee563c484fcc9df5e90
parent 245fd577711b818e053fc686117a979881a48050
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 31 Oct 2024 11:49:13 +0100

Fix spelling via codespell

Diffstat:

MREADME.md6+++---
Mcmd/chmod.12+-
Mcmd/chown.18++++----
Mcmd/chroot.12+-
Mcmd/echo.12+-
Mcmd/env.12+-
Mcmd/env.c2+-
Mcmd/install.12+-
Mcmd/mknod.12+-
Mcmd/nice.12+-
Mcmd/nohup.12+-
Mcmd/rm.12+-
Mcmd/sha1sum.12+-
Mcmd/strings.12+-
Mcmd/time.12+-
Mcmd/time.c2+-
Mcmd/tty.12+-
Mconfigure2+-
Mlib/consent.c4++--
Mlib/humanize.c8++++----
Mlib/humanize.h4++--
Mtest-cmd/mv-devshm.t2+-
Mtest-cmd/realpath.sh2+-
Mtest-cmd/rm.t2+-
24 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/README.md b/README.md @@ -12,7 +12,7 @@ Developed on Linux+musl, automatically tested on FreeBSD and NetBSD thanks to [S - POSIX yacc(1) implementation - POSIX Shell - POSIX.1-2017 Make -- (optional, test) [prysk](https://www.prysk.net/) (or [cram](https://bitheap.org/cram/) but it got abandonned) +- (optional, test) [prysk](https://www.prysk.net/) (or [cram](https://bitheap.org/cram/) but it got abandoned) - (optional, lint) mandoc: <https://mdocml.bsd.lv/> For linting the manual pages ## Packaging @@ -29,7 +29,7 @@ To compile the test binaries without running them, run `make build-checks` - Whenever possible programs prefix their messages with their name. This way you don't end up with context-less messages. - Error messages contain "error:", warning messages contain "warning:". To allow to easily find what went wrong in logs. - When the output is structured data, a terminal gets human-oriented output, others like piped programs get machine-oriented output (no padding, line separation, CSV, JSON, …). Prior art: most `ls(1)` implementations, i3/sway, FreeBSD utils via `libxo`, … -- As the `utmp` and `wtmp` files are considered broken by design, utilities dependant on them like `who` and `lastlog` won't be implemented. Proper authentication logs shouldn't be writable into by multiple programs, some of them third-party (like SSH and Display Managers typically are). +- As the `utmp` and `wtmp` files are considered broken by design, utilities dependent on them like `who` and `lastlog` won't be implemented. Proper authentication logs shouldn't be writable into by multiple programs, some of them third-party (like SSH and Display Managers typically are). - Minimal dependencies, allowing to bootstrap utils-std with barely having unix utilities. - No binary blobs, even in the testsuite. Output of generated code is itself auditable. @@ -48,7 +48,7 @@ utils-std default license is the MPL-2.0 to be able to take code and design back - (long-run) Effectively serve as one of the blocks to get base utilities, replacing GNU coreutils and part of BusyBox/ToyBox - Code readability and hackability - Portability, should run on modern libre POSIX systems as to not introduce vendor-locking -- Efficiency, but not without sacrifying the other goals +- Efficiency, but not without sacrificing the other goals ## Non-Goals - Reimplementing complex utilities that already have great code or ought to be maintained separately diff --git a/cmd/chmod.1 b/cmd/chmod.1 @@ -32,7 +32,7 @@ sections for details. .Pp If .Ar mode -starts with a dash (or is user-provided), it should be broken from options with a preceeding double-dash +starts with a dash (or is user-provided), it should be broken from options with a preceding double-dash .Pq -- like so: .Dl chmod -v -- -w,+r foobar diff --git a/cmd/chown.1 b/cmd/chown.1 @@ -51,14 +51,14 @@ If is also specified, and .Ar file -refers to a symbolic link itself refering to a directory, -change ownership of the directory and it's childs. +refers to a symbolic link itself referring to a directory, +change ownership of the directory and it's children. .It Fl L If .Fl R is also specified, -and symbolic links refering to directories are found, -change ownership of said directories and their childs. +and symbolic links referring to directories are found, +change ownership of said directories and their children. .It Fl P If .Fl R diff --git a/cmd/chroot.1 b/cmd/chroot.1 @@ -39,7 +39,7 @@ Otherwise, the utility shall exit with one of the following values: .Bl -tag -width Ds .It 125 -An error occured in +An error occurred in .Nm .It 126 .Ar command diff --git a/cmd/echo.1 b/cmd/echo.1 @@ -22,7 +22,7 @@ only the newline is written. .Pp The .Fl - -operand, which generaly terminates option processing, is treated as part of +operand, which generally terminates option processing, is treated as part of .Ar string . .Sh OPTIONS .Bl -tag -width Ds diff --git a/cmd/env.1 b/cmd/env.1 @@ -67,7 +67,7 @@ utility shall exit with one of the following values: .Nm completed successfully. .It 1 -An error occured in +An error occurred in .Nm .It 126 .Ar command diff --git a/cmd/env.c b/cmd/env.c @@ -139,7 +139,7 @@ main(int argc, char *argv[]) if(setenv(argv[0], sep, 1)) { fprintf(stderr, - "env: error: Faild setting environment variable '%s' to '%s': %s\n", + "env: error: Failed setting environment variable '%s' to '%s': %s\n", argv[0], sep, strerror(errno)); diff --git a/cmd/install.1 b/cmd/install.1 @@ -6,7 +6,7 @@ .Os .Sh NAME .Nm install -.Nd install binairies +.Nd install binaries .Sh SYNOPSIS .Nm .Op Fl CcDpTv diff --git a/cmd/mknod.1 b/cmd/mknod.1 @@ -36,7 +36,7 @@ Both .Ar major and .Ar minor -must be secified when type is +must be specified when type is .Ar b , .Ar c , or diff --git a/cmd/nice.1 b/cmd/nice.1 @@ -38,7 +38,7 @@ Otherwise, the utility shall exit with one of the following values: .Bl -tag -width Ds .It 125 -An error occured within the +An error occurred within the .Nm utility. .It 126 diff --git a/cmd/nohup.1 b/cmd/nohup.1 @@ -41,7 +41,7 @@ utility shall exit with one of the following values: was found but couldn't be invoked. .It 127 .Ar command -wasn't found or an error occured within the +wasn't found or an error occurred within the .Nm utility. .El diff --git a/cmd/rm.1 b/cmd/rm.1 @@ -20,7 +20,7 @@ by default directories aren't removed. .Pp As required by POSIX, .Nm -explicitely checks if a file is writable, when not and +explicitly checks if a file is writable, when not and .Fl f wasn't passed, the user is prompted before removal. Care should be taken when using other programs as diff --git a/cmd/sha1sum.1 b/cmd/sha1sum.1 @@ -40,7 +40,7 @@ SHA1 is standardized both in FIPS 180-4 and RFC 3174. .Sh AUTHORS .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me .Sh SECURITY CONSIDERATIONS -Due to it's known collissions SHA-1 is deprecated, the +Due to it's known collisions SHA-1 is deprecated, the .Nm utility is only provided in the interest of compatibility and verification of legacy checksums. diff --git a/cmd/strings.1 b/cmd/strings.1 @@ -36,7 +36,7 @@ otherwise. .It Fl n Ar number Change the minimum string length (default: 4). .It Fl t Ar format -Write the byte offset of each string found, the format is dependend on the +Write the byte offset of each string found, the format is dependent on the format argument: .Bl -tag -width d .It d diff --git a/cmd/time.1 b/cmd/time.1 @@ -32,7 +32,7 @@ is invoked, the exit status should be the one given by Otherwise, it will exit with the following values: .Bl -tag -width 1-125 .It 1-125 -An error occured in +An error occurred in .Ar command .It 126 .Ar command diff --git a/cmd/time.c b/cmd/time.c @@ -113,7 +113,7 @@ main(int argc, char *argv[]) if(getrusage(RUSAGE_CHILDREN, &usage) != 0) { fprintf( - stderr, "time: error: Failed getting resource usage of childrens: %s\n", strerror(errno)); + stderr, "time: error: Failed getting resource usage of children: %s\n", strerror(errno)); return 1; } diff --git a/cmd/tty.1 b/cmd/tty.1 @@ -19,7 +19,7 @@ Standard input is a terminal. .It 1 Standard input is not a terminal. .It >1 -An error occured. +An error occurred. .El .Sh SEE ALSO .Xr ttyname 3 diff --git a/configure b/configure @@ -79,7 +79,7 @@ check_cmd() { set -- $full_cmd cmd="$1" - printf 'Checking $%s = %s command existance ...' "$var" "$full_cmd" + printf 'Checking $%s = %s command existence ...' "$var" "$full_cmd" command -v "$cmd" >/dev/null ; is_ok } diff --git a/lib/consent.c b/lib/consent.c @@ -29,7 +29,7 @@ consent_init(void) char errstr[64] = ""; regerror(yesexpr_ret, &consent_yesexpr_r, errstr, 100); fprintf(stderr, - "%s: warning: Got errorneous yesexpr regex /%s/ from locale: %s\n", + "%s: warning: Got erroneous yesexpr regex /%s/ from locale: %s\n", argv0, yesexpr, errstr); @@ -48,7 +48,7 @@ consent_init(void) char errstr[64] = ""; regerror(noexpr_ret, &consent_noexpr_r, errstr, 100); fprintf(stderr, - "%s: warning: Got errorneous noexpr regex /%s/ from locale: %s\n", + "%s: warning: Got erroneous noexpr regex /%s/ from locale: %s\n", argv0, noexpr, errstr); diff --git a/lib/humanize.c b/lib/humanize.c @@ -22,16 +22,16 @@ dtosi(double num, bool iec) struct si_scale ret = { .number = num, .prefix = "", - .exponant = 0, + .exponent = 0, }; - while(ret.number > div && ret.exponant < PFX) + while(ret.number > div && ret.exponent < PFX) { ret.number /= div; - ret.exponant += 1; + ret.exponent += 1; } - ret.prefix = prefixes[ret.exponant]; + ret.prefix = prefixes[ret.exponent]; return ret; } diff --git a/lib/humanize.h b/lib/humanize.h @@ -9,10 +9,10 @@ struct si_scale { double number; const char *prefix; - unsigned exponant; + unsigned exponent; }; -// dtosi(num, iec) => num ≈ number*scale^exponant where scale == iec ? 1024 : 1000 +// dtosi(num, iec) => num ≈ number*scale^exponent where scale == iec ? 1024 : 1000 // SI scale returns prefix values like k, M, G, … // IEC scale returns prefix values like KiB, MiB, GiB, … struct si_scale dtosi(double num, bool iec); diff --git a/test-cmd/mv-devshm.t b/test-cmd/mv-devshm.t @@ -9,7 +9,7 @@ Skip if /dev/shm doesn't exists $ test -d /dev/shm || exit 80 -Successfully moves directory contents accross filesystems +Successfully moves directory contents across filesystems $ mkdir non-empty-dir $ touch non-empty-dir/foo $ mkdir non-empty-dir/foo.d diff --git a/test-cmd/realpath.sh b/test-cmd/realpath.sh @@ -70,7 +70,7 @@ t --exit=1 E:/dev/null/.. '-E /dev/null/..' 'realpath: error: Failed canonilizin t n:/dev/null_/var/empty '-n /dev/null /var/empty' '/dev/null /var/empty' -# As required by POSIX.1-2024 -E and -e aren't errorneous +# As required by POSIX.1-2024 -E and -e aren't erroneous t Ee:/dev/null '-E -e /dev/null' '/dev/null ' diff --git a/test-cmd/rm.t b/test-cmd/rm.t @@ -119,7 +119,7 @@ Verbose rm: Removed: file_v -POSIX, -f shouldn't return an error when non-existant files are passed +POSIX, -f shouldn't return an error when non-existent files are passed $ rm -f /var/empty/e/no/ent $ rm /var/empty/e/no/ent rm: error: Failed getting status for '/var/empty/e/no/ent': No such file or directory