summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-09-23 11:41:52 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-09-23 11:42:49 -0400
commite456c6e18ce47279d429b38f0b348e1a5f2b2beb (patch)
tree84abea6eac269002e7650149cbd3d0b20a304465
parentcf2eb17c48a23d49bf517df58e34e30529c16576 (diff)
downloadbfs-e456c6e18ce47279d429b38f0b348e1a5f2b2beb.tar.xz
Fix spelling
-rw-r--r--bench/bench.sh2
-rw-r--r--build/prelude.mk2
-rw-r--r--completions/bfs.zsh6
-rw-r--r--docs/BUILDING.md2
-rw-r--r--docs/CHANGELOG.md2
-rw-r--r--docs/SECURITY.md2
-rw-r--r--docs/USAGE.md2
-rw-r--r--src/alloc.c2
-rw-r--r--src/alloc.h2
-rw-r--r--src/bftw.c2
-rw-r--r--src/color.c2
-rw-r--r--src/expr.h2
-rw-r--r--src/opt.c2
-rw-r--r--tests/run.sh2
-rw-r--r--tests/util.sh2
15 files changed, 17 insertions, 17 deletions
diff --git a/bench/bench.sh b/bench/bench.sh
index b6682a2..f249ffc 100644
--- a/bench/bench.sh
+++ b/bench/bench.sh
@@ -360,7 +360,7 @@ bench-complete() {
fi
}
-# Benchmark quiting as soon as a file is seen
+# Benchmark quitting as soon as a file is seen
bench-early-quit-corpus() {
dir="$2"
max_depth=$(./bin/bfs "$dir" -printf '%d\n' | sort -rn | head -n1)
diff --git a/build/prelude.mk b/build/prelude.mk
index 2cd07a8..c25dea4 100644
--- a/build/prelude.mk
+++ b/build/prelude.mk
@@ -37,7 +37,7 @@ RM ?= rm -f
# VAR=1 ${TRUTHY,${VAR}} => ${TRUTHY,1} => y
# VAR=n ${TRUTHY,${VAR}} => ${TRUTHY,n} => [empty]
# VAR=other ${TRUTHY,${VAR}} => ${TRUTHY,other} => [empty]
-# VAR= ${TRUTHY,${VAR}} => ${TRUTHY,} => [emtpy]
+# VAR= ${TRUTHY,${VAR}} => ${TRUTHY,} => [empty]
#
# Inspired by https://github.com/wahern/autoguess
TRUTHY,y := y
diff --git a/completions/bfs.zsh b/completions/bfs.zsh
index 3825e09..6b46f83 100644
--- a/completions/bfs.zsh
+++ b/completions/bfs.zsh
@@ -91,11 +91,11 @@ args=(
'*-user[find files owned by user NAME]:user:_users'
'*-hidden[find hidden files (those beginning with .)]'
- '*-ilname[find symbolic links whose target matches GLOB (case insensitve)]:link pattern to search (case insensitive):'
+ '*-ilname[find symbolic links whose target matches GLOB (case insensitive)]:link pattern to search (case insensitive):'
'*-iname[find files whose name matches GLOB (case insensitive)]:name pattern to match (case insensitive):'
'*-inum[find files with inode number N]:inode number:'
- '*-ipath[find files whose entire path matches GLOB (case insenstive)]:path pattern to search (case insensitive):'
- '*-iregex[find files whose entire path matches REGEX (case insenstive)]:regular expression to search (case insensitive):'
+ '*-ipath[find files whose entire path matches GLOB (case insensitive)]:path pattern to search (case insensitive):'
+ '*-iregex[find files whose entire path matches REGEX (case insensitive)]:regular expression to search (case insensitive):'
'*-iwholename[find files whose entire path matches GLOB (case insensitive)]:full path pattern to search (case insensitive):'
'*-links[find files with N hard links]:number of links:'
diff --git a/docs/BUILDING.md b/docs/BUILDING.md
index cb26059..69a997c 100644
--- a/docs/BUILDING.md
+++ b/docs/BUILDING.md
@@ -93,7 +93,7 @@ External dependencies are auto-detected by default, but you can build `--with` o
</pre>
[`pkg-config`] is used, if available, to detect these libraries and any additional build flags they may require.
-If this is undesireable, disable it by setting `PKG_CONFIG` to the empty string (`./configure PKG_CONFIG=""`).
+If this is undesirable, disable it by setting `PKG_CONFIG` to the empty string (`./configure PKG_CONFIG=""`).
[`pkg-config`]: https://www.freedesktop.org/wiki/Software/pkg-config/
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index ec3daab..a7136cf 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -324,7 +324,7 @@
- Breadth-first search could become highly unbalanced, negating many of the benefits of `bfs`
- - On non-{Linux,FreeBSD} plaforms, directories could stay open longer than necessary, consuming extra memory
+ - On non-{Linux,FreeBSD} platforms, directories could stay open longer than necessary, consuming extra memory
[#107]: https://github.com/tavianator/bfs/pull/107
diff --git a/docs/SECURITY.md b/docs/SECURITY.md
index 7bcb5e6..dd3277a 100644
--- a/docs/SECURITY.md
+++ b/docs/SECURITY.md
@@ -16,7 +16,7 @@ Anyone with enough control over the command line of `bfs` or any `find`-compatib
> It is *always* unsafe to allow *any* other part of the command line to be affected by untrusted input.
> Use the `-f` flag, or `-files0-from`, to ensure that the input is interpreted as a path.
-This still has security implications, incuding:
+This still has security implications, including:
- **Information disclosure:** an attacker may learn whether particular files exist by observing `bfs`'s output, exit status, or even side channels like execution time.
- **Denial of service:** large directory trees or slow/network storage may cause `bfs` to consume excessive system resources.
diff --git a/docs/USAGE.md b/docs/USAGE.md
index 70f8475..16aeaf6 100644
--- a/docs/USAGE.md
+++ b/docs/USAGE.md
@@ -105,7 +105,7 @@ For expressions like `-name`, that's all they do.
But some expressions, called *actions*, have other side effects.
If no actions are included in the expression, `bfs` adds the `-print` action automatically, which is why the above examples actually print any output.
-The default `-print` is supressed if any actions are given explicitly.
+The default `-print` is suppressed if any actions are given explicitly.
Available actions include printing with alternate formats (`-ls`, `-printf`, etc.), executing commands (`-exec`, `-execdir`, etc.), deleting files (`-delete`), and stopping the search (`-quit`, `-exit`).
diff --git a/src/alloc.c b/src/alloc.c
index 223d737..779e1d7 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -108,7 +108,7 @@ void *reserve(void *ptr, size_t align, size_t size, size_t count) {
size_t old_size = size * count;
// Capacity is doubled every power of two, from 0→1, 1→2, 2→4, etc.
- // If we stayed within the same size class, re-use ptr.
+ // If we stayed within the same size class, reuse ptr.
if (count & (count - 1)) {
// Tell sanitizers about the new array element
sanitize_alloc((char *)ptr + old_size, size);
diff --git a/src/alloc.h b/src/alloc.h
index 7b97b8c..9bab01b 100644
--- a/src/alloc.h
+++ b/src/alloc.h
@@ -350,7 +350,7 @@ void *varena_alloc(struct varena *varena, size_t count);
* @param ptr
* The object to resize.
* @param old_count
- * The old array lenth.
+ * The old array length.
* @param new_count
* The new array length.
* @return
diff --git a/src/bftw.c b/src/bftw.c
index 0186e3f..61193d5 100644
--- a/src/bftw.c
+++ b/src/bftw.c
@@ -448,7 +448,7 @@ static void bftw_queue_rebalance(struct bftw_queue *queue, bool async) {
}
}
-/** Detatch the next waiting file. */
+/** Detach the next waiting file. */
static void bftw_queue_detach(struct bftw_queue *queue, struct bftw_file *file, bool async) {
bfs_assert(!file->ioqueued);
diff --git a/src/color.c b/src/color.c
index 7f653b0..1ee6662 100644
--- a/src/color.c
+++ b/src/color.c
@@ -31,7 +31,7 @@
struct esc_seq {
/** The length of the escape sequence. */
size_t len;
- /** The escape sequence iteself, without a terminating NUL. */
+ /** The escape sequence itself, without a terminating NUL. */
char seq[];
};
diff --git a/src/expr.h b/src/expr.h
index f14b936..871b120 100644
--- a/src/expr.h
+++ b/src/expr.h
@@ -146,7 +146,7 @@ struct bfs_expr {
/** Total time spent running this predicate. */
struct timespec elapsed;
- /** Auxilliary data for the evaluation function. */
+ /** Auxiliary data for the evaluation function. */
union {
/** Child expressions. */
struct bfs_exprs children;
diff --git a/src/opt.c b/src/opt.c
index aa41a6a..b50c1ef 100644
--- a/src/opt.c
+++ b/src/opt.c
@@ -122,7 +122,7 @@ static const char *const pred_names[] = {
};
/**
- * A contrained integer range.
+ * A constrained integer range.
*/
struct df_range {
/** The (inclusive) minimum value. */
diff --git a/tests/run.sh b/tests/run.sh
index 612e11a..164790e 100644
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -159,7 +159,7 @@ comake() {
exec {READY_PIPE}<&${COPROC[0]} {DONE_PIPE}>&${COPROC[1]}
}
-# Print the current test progess
+# Print the current test progress
progress() {
if [ "${BAR:-}" ]; then
print_bar "$(printf "$@")"
diff --git a/tests/util.sh b/tests/util.sh
index 76b72b9..d8b7036 100644
--- a/tests/util.sh
+++ b/tests/util.sh
@@ -70,7 +70,7 @@ stdenv() {
fi
}
-# Drop root priviliges or bail
+# Drop root privileges or bail
drop_root() {
if command -v capsh &>/dev/null; then
if capsh --has-p=cap_dac_override &>/dev/null || capsh --has-p=cap_dac_read_search &>/dev/null; then