From e651b5909f144a7f4a9c033d15d075f35395a7f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sat, 12 Jan 2019 11:53:09 +0100 Subject: [PATCH] Fix typos found by codespell Codespell instructions at https://github.com/codespell-project/codespell Short instructions: - pip install codespell - add ~/.local/bin to PATH - codespell `git ls-files` - use -L and egrep -v to sort out false positives --- build-aux/texinfo.tex | 6 +++--- build-aux/update-copyright | 4 ++-- doc/gnulib-tool.texi | 2 +- lib/af_alg.h | 2 +- lib/argp-fmtstream.c | 2 +- lib/argp-help.c | 4 ++-- lib/cdefs.h | 2 +- lib/diffseq.h | 2 +- lib/file-set.c | 2 +- lib/fts_.h | 2 +- lib/get-rusage-as.c | 2 +- lib/hash.c | 2 +- lib/md2.c | 2 +- lib/md4.c | 2 +- lib/md5.c | 2 +- lib/mountlist.h | 2 +- lib/regexec.c | 2 +- lib/sha1.c | 2 +- lib/sha256.c | 2 +- lib/sha512.c | 2 +- lib/sm3.c | 2 +- lib/str-two-way.h | 2 +- lib/strptime.c | 2 +- lib/trigl.c | 2 +- lib/vma-iter.c | 2 +- pygnulib/GLError.py | 6 +++--- pygnulib/constants.py | 2 +- tests/test-fseek.c | 2 +- tests/test-fseeko.c | 2 +- tests/test-spawn-pipe-child.c | 2 +- top/maint.mk | 2 +- 31 files changed, 37 insertions(+), 37 deletions(-) diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex index 48d532bc6..74bea4134 100644 --- a/build-aux/texinfo.tex +++ b/build-aux/texinfo.tex @@ -4688,7 +4688,7 @@ end \fi } -% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined +% @ifset VAR ... @end ifset reads the `...' if VAR has been defined % with @set. % % To get the special treatment we need for address@hidden ifset,' we call @@ -4708,7 +4708,7 @@ end } \def\ifsetfail{\doignore{ifset}} -% @ifclear VAR ... @end executes the `...' iff VAR has never been +% @ifclear VAR ... @end executes the `...' if VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the @@ -5971,7 +5971,7 @@ end \fi } \newbox\balancedcolumns -\setbox\balancedcolumns=\vbox{shouldnt see this}% +\setbox\balancedcolumns=\vbox{shouldn't see this}% % % Only called for the last of the double column material. \doublecolumnout % does the others. diff --git a/build-aux/update-copyright b/build-aux/update-copyright index d80549ea8..991ef6aef 100755 --- a/build-aux/update-copyright +++ b/build-aux/update-copyright @@ -31,7 +31,7 @@ my $VERSION = '2018-03-07.03:47'; # UTC # For example, you might wish to use the update-copyright target rule # in maint.mk from gnulib's maintainer-makefile module. # -# Iff a copyright statement is recognized in a file and the final +# If a copyright statement is recognized in a file and the final # year is not the current year, then the statement is updated for the # new year and it is reformatted to: # @@ -86,7 +86,7 @@ my $VERSION = '2018-03-07.03:47'; # UTC # 4. The "Copyright" appears at the beginning of a line, except that it # may be prefixed by any sequence (e.g., a comment) of no more than # 5 characters -- including white space. -# 5. Iff such a prefix is present, the same prefix appears at the +# 5. If such a prefix is present, the same prefix appears at the # beginning of each remaining line within the FSF copyright # statement. There is one exception in order to support C-style # comments: if the first line's prefix contains nothing but diff --git a/doc/gnulib-tool.texi b/doc/gnulib-tool.texi index c3adf57f1..017160bb7 100644 --- a/doc/gnulib-tool.texi +++ b/doc/gnulib-tool.texi @@ -104,7 +104,7 @@ definitions, and the source files include it (see @ref{Source changes}). Unless you use @command{gnulib-tool}'s @option{--gnu-make} option, Gnulib also assumes that your project uses Automake at least in a subdirectory of your project. While the use of Automake in your -project's top level directory is an easy way to fulfil the Makefile +project's top level directory is an easy way to fulfill the Makefile conventions of the GNU coding standards, Gnulib does not require it. Invoking @samp{gnulib-tool --import} will copy source files, create a diff --git a/lib/af_alg.h b/lib/af_alg.h index aabb52fab..877369a7f 100644 --- a/lib/af_alg.h +++ b/lib/af_alg.h @@ -66,7 +66,7 @@ afalg_buffer (const char *buffer, size_t len, const char *alg, STREAM is an open file stream. The last operation on STREAM should not be 'ungetc', and if STREAM is also open for writing it should have been fflushed since its last write. Read from the current - position to the end of STREAM. Handle regular files efficently. + position to the end of STREAM. Handle regular files efficiently. ALG is the message digest algorithm; see the file /proc/crypto. diff --git a/lib/argp-fmtstream.c b/lib/argp-fmtstream.c index ba6a407f7..4963dcab5 100644 --- a/lib/argp-fmtstream.c +++ b/lib/argp-fmtstream.c @@ -345,7 +345,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs) } /* Ensure that FS has space for AMOUNT more bytes in its buffer, either by - growing the buffer, or by flushing it. True is returned iff we succeed. */ + growing the buffer, or by flushing it. True is returned if we succeed. */ int __argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount) { diff --git a/lib/argp-help.c b/lib/argp-help.c index 75abe84df..908ed91c7 100644 --- a/lib/argp-help.c +++ b/lib/argp-help.c @@ -712,7 +712,7 @@ hol_cluster_is_child (const struct hol_cluster *cl1, } /* Given the name of an OPTION_DOC option, modifies NAME to start at the tail - that should be used for comparisons, and returns true iff it should be + that should be used for comparisons, and returns true if it should be treated as a non-option. */ static int canon_doc_option (const char **name) @@ -1556,7 +1556,7 @@ argp_doc (const struct argp *argp, const struct argp_state *state, } /* Output a usage message for ARGP to STREAM. If called from - argp_state_help, STATE is the relevent parsing state. FLAGS are from the + argp_state_help, STATE is the relevant parsing state. FLAGS are from the set ARGP_HELP_*. NAME is what to use wherever a 'program name' is needed. */ static void diff --git a/lib/cdefs.h b/lib/cdefs.h index 4b696590c..4f9217544 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h @@ -340,7 +340,7 @@ semantics. clang++ identifies itself as gcc-4.2, but has support for GNU inlining - semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and + semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and __GNUC_GNU_INLINE__ macro definitions. */ #if (!defined __cplusplus || __GNUC_PREREQ (4,3) \ || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \ diff --git a/lib/diffseq.h b/lib/diffseq.h index c6aac3d81..82df3396b 100644 --- a/lib/diffseq.h +++ b/lib/diffseq.h @@ -165,7 +165,7 @@ struct partition XMID - YMID equals the number of inserted elements minus the number of deleted elements (counting only elements before the midpoint). - Set PART->lo_minimal to true iff the minimal edit script for the + Set PART->lo_minimal to true if the minimal edit script for the left half of the partition is known; similarly for PART->hi_minimal. This function assumes that the first elements of the specified portions diff --git a/lib/file-set.c b/lib/file-set.c index 5916a178e..5eb9fae3e 100644 --- a/lib/file-set.c +++ b/lib/file-set.c @@ -48,7 +48,7 @@ record_file (Hash_table *ht, char const *file, struct stat const *stats) if (ent_from_table != ent) { - /* There was alread a matching entry in the table, so ENT was + /* There was already a matching entry in the table, so ENT was not inserted. Free it. */ triple_free (ent); } diff --git a/lib/fts_.h b/lib/fts_.h index fb5558f97..da9481f39 100644 --- a/lib/fts_.h +++ b/lib/fts_.h @@ -172,7 +172,7 @@ typedef struct { /* This data structure is used if FTS_TIGHT_CYCLE_CHECK is specified. It records the directories between a starting point and the current directory. I.e., a directory is - recorded here IFF we have visited it once, but we have not + recorded here if we have visited it once, but we have not yet completed processing of all its entries. Every time we visit a new directory, we add that directory to this set. When we finish with a directory (usually by visiting it a diff --git a/lib/get-rusage-as.c b/lib/get-rusage-as.c index 0ace6d67c..73364c719 100644 --- a/lib/get-rusage-as.c +++ b/lib/get-rusage-as.c @@ -91,7 +91,7 @@ b) pstat_getprocvm() can be used to find out about the virtual memory areas. Both methods agree, except that the value of get_rusage_as_via_iterator() - is slighly larger higher than get_rusage_as_via_setrlimit(), by 4 KB in + is slightly larger higher than get_rusage_as_via_setrlimit(), by 4 KB in 32-bit mode and by 40 KB in 64-bit mode. IRIX: diff --git a/lib/hash.c b/lib/hash.c index 9e1f8e841..39ea6d818 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -937,7 +937,7 @@ transfer_entries (Hash_table *dst, Hash_table *src, bool safe) the table may receive at least CANDIDATE different user entries, including those already in the table, before any other growth of the hash table size occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the - exact number of buckets desired. Return true iff the rehash succeeded. */ + exact number of buckets desired. Return true if the rehash succeeded. */ bool hash_rehash (Hash_table *table, size_t candidate) diff --git a/lib/md2.c b/lib/md2.c index 9b08ea226..9fe1378c2 100644 --- a/lib/md2.c +++ b/lib/md2.c @@ -124,7 +124,7 @@ md2_stream (FILE *stream, void *resblock) if (n == 0) { - /* Check for the error flag IFF N == 0, so that we don't + /* Check for the error flag if N == 0, so that we don't exit the loop after a partial read due to e.g., EAGAIN or EWOULDBLOCK. */ if (ferror (stream)) diff --git a/lib/md4.c b/lib/md4.c index 04f075c11..236a925d4 100644 --- a/lib/md4.c +++ b/lib/md4.c @@ -152,7 +152,7 @@ md4_stream (FILE * stream, void *resblock) if (n == 0) { - /* Check for the error flag IFF N == 0, so that we don't + /* Check for the error flag if N == 0, so that we don't exit the loop after a partial read due to e.g., EAGAIN or EWOULDBLOCK. */ if (ferror (stream)) diff --git a/lib/md5.c b/lib/md5.c index be0c88812..a9b8e2b41 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -187,7 +187,7 @@ md5_stream (FILE *stream, void *resblock) if (n == 0) { - /* Check for the error flag IFF N == 0, so that we don't + /* Check for the error flag if N == 0, so that we don't exit the loop after a partial read due to e.g., EAGAIN or EWOULDBLOCK. */ if (ferror (stream)) diff --git a/lib/mountlist.h b/lib/mountlist.h index d0cf6c1d6..e4ec024a3 100644 --- a/lib/mountlist.h +++ b/lib/mountlist.h @@ -32,7 +32,7 @@ struct mount_entry char *me_type; /* "nfs", "4.2", etc. */ dev_t me_dev; /* Device number of me_mountdir. */ unsigned int me_dummy : 1; /* Nonzero for dummy file systems. */ - unsigned int me_remote : 1; /* Nonzero for remote fileystems. */ + unsigned int me_remote : 1; /* Nonzero for remote filesystems. */ unsigned int me_type_malloced : 1; /* Nonzero if me_type was malloced. */ struct mount_entry *me_next; }; diff --git a/lib/regexec.c b/lib/regexec.c index 0a7a27b77..91d5a797b 100644 --- a/lib/regexec.c +++ b/lib/regexec.c @@ -2207,7 +2207,7 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, dfa->nexts[node_idx])) /* The node can't accept the "multi byte", or the destination was already thrown away, then the node - could't accept the current input "multi byte". */ + couldn't accept the current input "multi byte". */ naccepted = 0; /* Otherwise, it is sure that the node could accept 'naccepted' bytes input. */ diff --git a/lib/sha1.c b/lib/sha1.c index 9afc9b410..e787b9057 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -175,7 +175,7 @@ sha1_stream (FILE *stream, void *resblock) if (n == 0) { - /* Check for the error flag IFF N == 0, so that we don't + /* Check for the error flag if N == 0, so that we don't exit the loop after a partial read due to e.g., EAGAIN or EWOULDBLOCK. */ if (ferror (stream)) diff --git a/lib/sha256.c b/lib/sha256.c index 721e944a7..c75800ee1 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -225,7 +225,7 @@ shaxxx_stream (FILE *stream, char const *alg, void *resblock, if (n == 0) { - /* Check for the error flag IFF N == 0, so that we don't + /* Check for the error flag if N == 0, so that we don't exit the loop after a partial read due to e.g., EAGAIN or EWOULDBLOCK. */ if (ferror (stream)) diff --git a/lib/sha512.c b/lib/sha512.c index e7f5bd5a1..e6645499b 100644 --- a/lib/sha512.c +++ b/lib/sha512.c @@ -226,7 +226,7 @@ shaxxx_stream (FILE *stream, char const *alg, void *resblock, if (n == 0) { - /* Check for the error flag IFF N == 0, so that we don't + /* Check for the error flag if N == 0, so that we don't exit the loop after a partial read due to e.g., EAGAIN or EWOULDBLOCK. */ if (ferror (stream)) diff --git a/lib/sm3.c b/lib/sm3.c index df357d199..f34682199 100644 --- a/lib/sm3.c +++ b/lib/sm3.c @@ -184,7 +184,7 @@ sm3_stream (FILE *stream, void *resblock) if (n == 0) { - /* Check for the error flag IFF N == 0, so that we don't + /* Check for the error flag if N == 0, so that we don't exit the loop after a partial read due to e.g., EAGAIN or EWOULDBLOCK. */ if (ferror (stream)) diff --git a/lib/str-two-way.h b/lib/str-two-way.h index c5f0e60cb..c30d97150 100644 --- a/lib/str-two-way.h +++ b/lib/str-two-way.h @@ -29,7 +29,7 @@ to compute the end of H up front. For case-insensitivity, you may optionally define: - CMP_FUNC(p1, p2, l) A macro that returns 0 iff the first L + CMP_FUNC(p1, p2, l) A macro that returns 0 if the first L characters of P1 and P2 are equal. CANON_ELEMENT(c) A macro that canonicalizes an element right after it has been fetched from one of the two strings. diff --git a/lib/strptime.c b/lib/strptime.c index bd7f87032..e6d405a44 100644 --- a/lib/strptime.c +++ b/lib/strptime.c @@ -277,7 +277,7 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM) } /* Any character but '%' must be matched by the same character - in the iput string. */ + in the input string. */ if (*fmt != '%') { match_char (*fmt++, *rp++); diff --git a/lib/trigl.c b/lib/trigl.c index 1f73bd92e..29cd2ba3e 100644 --- a/lib/trigl.c +++ b/lib/trigl.c @@ -325,7 +325,7 @@ static char rcsid[] = * z = (z-x[i])*2**24 * * - * y[] ouput result in an array of double precision numbers. + * y[] output result in an array of double precision numbers. * The dimension of y[] is: * 24-bit precision 1 * 53-bit precision 2 diff --git a/lib/vma-iter.c b/lib/vma-iter.c index a871d2c55..d64157057 100644 --- a/lib/vma-iter.c +++ b/lib/vma-iter.c @@ -125,7 +125,7 @@ - On all platforms, if some other thread is doing memory allocations or deallocations between two read() calls, there is a high risk that the result of these two read() calls don't fit together, and as a - consequence we will parse gargage and either omit some VMAs or return + consequence we will parse garbage and either omit some VMAs or return VMAs with nonsensical addresses. So use mmap(), and ignore the resulting VMA. */ diff --git a/pygnulib/GLError.py b/pygnulib/GLError.py index 9c249a328..0727e2f38 100644 --- a/pygnulib/GLError.py +++ b/pygnulib/GLError.py @@ -62,7 +62,7 @@ class GLError(Exception): 9: missing libname argument 10: conddeps are not supported with inctests 11: incompatible licenses on modules: - 12: cannot process empy filelist + 12: cannot process empty filelist 13: cannot create the given directory: 14: cannot delete the given file: 15: cannot create the given file: @@ -71,7 +71,7 @@ class GLError(Exception): 18: module lacks a license: 19: could not create destination directory: errinfo: additional information; - style: 0 or 1, wheter old-style''' + style: 0 or 1, whether old-style''' self.errno = errno self.errinfo = errinfo self.args = (self.errno, self.errinfo) @@ -97,7 +97,7 @@ class GLError(Exception): + " so you might have to set this argument", "conddeps are not supported with inctests", "incompatible licenses on modules: %s" % repr(errinfo), - "cannot process empy filelist", + "cannot process empty filelist", "cannot create the given directory: %s" % repr(errinfo), "cannot remove the given file: %s" % repr(errinfo), "cannot create the given file: %s" % repr(errinfo), diff --git a/pygnulib/constants.py b/pygnulib/constants.py index 2dc64e6b6..39fe08f00 100644 --- a/pygnulib/constants.py +++ b/pygnulib/constants.py @@ -54,7 +54,7 @@ if not PYTHON3: #=============================================================================== # Define global constants #=============================================================================== -# Declare neccessary variables +# Declare necessary variables APP = dict() # Application DIRS = dict() # Directories UTILS = dict() # Utilities diff --git a/tests/test-fseek.c b/tests/test-fseek.c index b6f0eb669..66a73d873 100644 --- a/tests/test-fseek.c +++ b/tests/test-fseek.c @@ -36,7 +36,7 @@ int main (int argc, char **argv) { /* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh' - iff argc > 1. */ + if argc > 1. */ int expected = argc > 1 ? 0 : -1; ASSERT (fseek (stdin, 0, SEEK_CUR) == expected); if (argc > 1) diff --git a/tests/test-fseeko.c b/tests/test-fseeko.c index 33659178b..9dda4eb34 100644 --- a/tests/test-fseeko.c +++ b/tests/test-fseeko.c @@ -37,7 +37,7 @@ int main (int argc, char **argv _GL_UNUSED) { /* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh' - iff argc > 1. */ + if argc > 1. */ int expected = argc > 1 ? 0 : -1; /* Exit with success only if fseek/fseeko agree. */ int r1 = fseeko (stdin, 0, SEEK_CUR); diff --git a/tests/test-spawn-pipe-child.c b/tests/test-spawn-pipe-child.c index 05768276f..bdd8674ae 100644 --- a/tests/test-spawn-pipe-child.c +++ b/tests/test-spawn-pipe-child.c @@ -81,7 +81,7 @@ main (int argc, char *argv[]) ASSERT (argc == 2); /* Read one byte from fd 0, and write its value plus one to fd 1. - fd 2 should be closed iff the argument is 1. Check that no other file + fd 2 should be closed if the argument is 1. Check that no other file descriptors leaked. */ ASSERT (read (STDIN_FILENO, buffer, 2) == 1); diff --git a/top/maint.mk b/top/maint.mk index 4e37efeb5..deffdbd02 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -500,7 +500,7 @@ sc_prohibit_HAVE_MBRTOWC: # To use this "command" macro, you must first define two shell variables: # h: the header name, with no enclosing <> or "" -# re: a regular expression that matches IFF something provided by $h is used. +# re: a regular expression that matches if something provided by $h is used. define _sc_header_without_use dummy=; : so we do not need a semicolon before each use; \ h_esc=`echo '[<"]'"$$h"'[">]'|$(SED) 's/\./\\\\./g'`; \ -- 2.20.1