From 8a5ce2dbefc4a1af4dc6926888eba4f58e8da45c Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 4 Jun 2023 07:57:24 -0700 Subject: [PATCH] Fix minor English grammar errors, mostly "a" versus "an". I spotted one of these and then found the rest via "grep". --- doc/data-io.texi | 2 +- doc/dev/portable-file-format.texi | 2 +- doc/matrices.texi | 2 +- doc/statistics.texi | 18 +++++++++--------- doc/variables.texi | 2 +- perl-module/lib/PSPP.pm.in | 2 +- src/data/casewindow.c | 2 +- src/data/identifier2.c | 6 +++--- src/data/missing-values.c | 4 ++-- src/data/por-file-reader.c | 2 +- src/data/sys-file-reader.c | 2 +- src/language/lexer/lexer.c | 6 +++--- src/libpspp/abt.c | 2 +- src/libpspp/bt.c | 2 +- src/libpspp/encoding-guesser.c | 2 +- src/libpspp/heap.c | 2 +- src/libpspp/heap.h | 2 +- src/libpspp/hmap.c | 2 +- src/libpspp/line-reader.c | 2 +- src/libpspp/ll.h | 4 ++-- src/output/table.c | 2 +- src/ui/gui/find-dialog.c | 2 +- tests/language/commands/frequencies.at | 2 +- utilities/pspp-dump-sav.c | 2 +- 24 files changed, 38 insertions(+), 38 deletions(-) diff --git a/doc/data-io.texi b/doc/data-io.texi index a325dde385..23cc7e51ae 100644 --- a/doc/data-io.texi +++ b/doc/data-io.texi @@ -650,7 +650,7 @@ either convention on any kind of system, regardless of ENDS. In IMAGE mode, the data file is treated as a series of fixed-length binary records. LRECL should be used to specify the record length in bytes, with a default of 1024. On input, it is an error if an IMAGE -file's length is not a integer multiple of the record length. On +file's length is not an integer multiple of the record length. On output, each record is padded with spaces or truncated, if necessary, to make it exactly the correct length. diff --git a/doc/dev/portable-file-format.texi b/doc/dev/portable-file-format.texi index e111d8f897..0a1ed8dff7 100644 --- a/doc/dev/portable-file-format.texi +++ b/doc/dev/portable-file-format.texi @@ -147,7 +147,7 @@ A forward slash (@samp{/}). Integer fields take a form identical to floating-point fields, but they may not contain a fraction. -String fields take the form of a integer field having value @var{n}, +String fields take the form of an integer field having value @var{n}, followed by exactly @var{n} characters, which are the string content. @node Portable File Header diff --git a/doc/matrices.texi b/doc/matrices.texi index f366e5fc79..4bd86f4545 100644 --- a/doc/matrices.texi +++ b/doc/matrices.texi @@ -1614,7 +1614,7 @@ equivalent to @code{@{A(1,1)*B, A(1,2)*B; A(2,1)*B, A(2,2)*B@}}. @end deffn @deffn {Matrix Function} RANK (@var{M}) -Returns the rank of matrix @var{M}, a integer scalar whose value is +Returns the rank of matrix @var{M}, an integer scalar whose value is the dimension of the vector space spanned by its columns or, equivalently, by its rows. diff --git a/doc/statistics.texi b/doc/statistics.texi index 97a04a4ea0..8e4e6f843c 100644 --- a/doc/statistics.texi +++ b/doc/statistics.texi @@ -284,7 +284,7 @@ The @subcmd{ORDER} subcommand is accepted but ignored. @ref{frequencies:ex} runs a frequency analysis on the @exvar{sex} and @exvar{occupation} variables from the @file{personnel.sav} file. -This is useful to get an general idea of the way in which these nominal +This is useful to get a general idea of the way in which these nominal variables are distributed. @float Example, frequencies:ex @@ -2786,10 +2786,10 @@ values. If more than two distinct, non-missing values for a variable under test are encountered then an error occurs. -If the test proportion is equal to 0.5, then a two tailed test is -reported. For any other test proportion, a one tailed test is +If the test proportion is equal to 0.5, then a two-tailed test is +reported. For any other test proportion, a one-tailed test is reported. -For one tailed tests, if the test proportion is less than +For one-tailed tests, if the test proportion is less than or equal to the observed proportion, then the significance of observing the observed proportion or more is reported. If the test proportion is more than the observed proportion, then the @@ -2923,7 +2923,7 @@ unity indicates complete agreement. [ /KOLMOGOROV-SMIRNOV (@{NORMAL [@var{mu}, @var{sigma}], UNIFORM [@var{min}, @var{max}], POISSON [@var{lambda}], EXPONENTIAL [@var{scale}] @}) = @var{var_list} ] @end display -The one sample Kolmogorov-Smirnov subcommand is used to test whether or not a dataset is +The one-sample Kolmogorov-Smirnov subcommand is used to test whether or not a dataset is drawn from a particular distribution. Four distributions are supported, @i{viz:} Normal, Uniform, Poisson and Exponential. @@ -3209,7 +3209,7 @@ which you wish to test. In this mode, you must also use the @subcmd{/VARIABLES} subcommand to tell @pspp{} which variables you wish to test. -@subsubsection Example - One Sample T-test +@subsubsection Example - One-Sample T-test A researcher wishes to know whether the weight of persons in a population is different from the national average. @@ -3228,12 +3228,12 @@ using the @cmd{SELECT} command. @float Example, one-sample-t:ex @psppsyntax {one-sample-t.sps} -@caption {Running a one sample T-Test after excluding all non-positive values} +@caption {Running a one-sample T-Test after excluding all non-positive values} @end float @float Screenshot, one-sample-t:scr @psppimage {one-sample-t} -@caption {Using the One Sample T-Test dialog box to test @exvar{weight} for a mean of 76.8kg} +@caption {Using the One-Sample T-Test dialog box to test @exvar{weight} for a mean of 76.8kg} @end float @@ -3245,7 +3245,7 @@ from 76.8kg. @float Results, one-sample-t:res @psppoutput {one-sample-t} -@caption {The results of a one sample T-test of @exvar{weight} using a test value of 76.8kg} +@caption {The results of a one-sample T-test of @exvar{weight} using a test value of 76.8kg} @end float @node Independent Samples Mode diff --git a/doc/variables.texi b/doc/variables.texi index c1b18edfa6..513d3a4755 100644 --- a/doc/variables.texi +++ b/doc/variables.texi @@ -571,7 +571,7 @@ one of the following roles for the variables that follow it: An input variable, such as an independent variable. @item TARGET -An output variable, such as an dependent variable. +An output variable, such as a dependent variable. @item BOTH A variable used for input and output. diff --git a/perl-module/lib/PSPP.pm.in b/perl-module/lib/PSPP.pm.in index f3c3a08229..9d2789554c 100644 --- a/perl-module/lib/PSPP.pm.in +++ b/perl-module/lib/PSPP.pm.in @@ -505,7 +505,7 @@ must be in UTF-8 encoding. =head3 get_case_cnt () -Returns the number of cases in a open system file. Some files +Returns the number of cases in an open system file. Some files do not store the number of cases. In these instances undef will be returned. Therefore, then programmer must check that the returned value is not undef before using it. diff --git a/src/data/casewindow.c b/src/data/casewindow.c index 763ceb2c41..9ce0ae95cc 100644 --- a/src/data/casewindow.c +++ b/src/data/casewindow.c @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -/* This casewindow implementation in terms of an class interface +/* This casewindow implementation in terms of a class interface is undoubtedly a form of over-abstraction. However, it works and the extra abstraction seems to be harmless. */ diff --git a/src/data/identifier2.c b/src/data/identifier2.c index 8b34bb214a..dfbaab4f17 100644 --- a/src/data/identifier2.c +++ b/src/data/identifier2.c @@ -129,7 +129,7 @@ id_is_valid (const char *id, const char *dict_encoding, enum dict_class classes) return error_to_bool (id_is_valid__ (id, dict_encoding, classes)); } -/* Checks whether UTF-8 string ID is an plausible identifier. Returns NULL if +/* Checks whether UTF-8 string ID is a plausible identifier. Returns NULL if it is, otherwise an error message that the caller must free(). */ char * WARN_UNUSED_RESULT id_is_plausible__ (const char *id) @@ -161,7 +161,7 @@ id_is_plausible__ (const char *id) { char ucname[16]; return xasprintf (_("Character %s (in `%s') may not appear " - "as the first character in a identifier."), + "as the first character in an identifier."), uc_name (uc, ucname), id); } @@ -179,7 +179,7 @@ id_is_plausible__ (const char *id) return NULL; } -/* Returns true if UTF-8 string ID is an plausible identifier, false +/* Returns true if UTF-8 string ID is a plausible identifier, false otherwise. */ bool id_is_plausible (const char *id) diff --git a/src/data/missing-values.c b/src/data/missing-values.c index 44d0bf9ee6..97facf49a8 100644 --- a/src/data/missing-values.c +++ b/src/data/missing-values.c @@ -302,7 +302,7 @@ mv_has_range (const struct missing_values *mv) } /* Removes the numeric range from MV and stores it in *LOW and - *HIGH. MV must contain a individual range (as determined by + *HIGH. MV must contain an individual range (as determined by mv_has_range()). */ void mv_pop_range (struct missing_values *mv, double *low, double *high) @@ -314,7 +314,7 @@ mv_pop_range (struct missing_values *mv, double *low, double *high) } /* Returns the numeric range from MV into *LOW and - *HIGH. MV must contain a individual range (as determined by + *HIGH. MV must contain an individual range (as determined by mv_has_range()). */ void mv_get_range (const struct missing_values *mv, double *low, double *high) diff --git a/src/data/por-file-reader.c b/src/data/por-file-reader.c index 50c4495ff8..213ad115c3 100644 --- a/src/data/por-file-reader.c +++ b/src/data/por-file-reader.c @@ -125,7 +125,7 @@ error (struct pfm_reader *r, const char *msg, ...) longjmp (r->bail_out, 1); } -/* Displays MSG as an warning for the current position in +/* Displays MSG as a warning for the current position in portable file reader R. */ static void warning (struct pfm_reader *r, const char *msg, ...) diff --git a/src/data/sys-file-reader.c b/src/data/sys-file-reader.c index b0f60a00c2..692f90252b 100644 --- a/src/data/sys-file-reader.c +++ b/src/data/sys-file-reader.c @@ -3190,7 +3190,7 @@ text_get_token (struct text_record *text, struct substring delimiters, return ss_data (token); } -/* Reads a integer value expressed in decimal, then a space, then a string that +/* Reads an integer value expressed in decimal, then a space, then a string that consists of exactly as many bytes as specified by the integer, then a space, from TEXT. Returns the string, null-terminated, as a subset of TEXT's buffer (so the caller should not free the string). */ diff --git a/src/language/lexer/lexer.c b/src/language/lexer/lexer.c index 5c1d72612a..3d65d59661 100644 --- a/src/language/lexer/lexer.c +++ b/src/language/lexer/lexer.c @@ -1073,7 +1073,7 @@ lex_force_num_range_closed (struct lexer *lexer, const char *name, if (min > max) { - /* Weird, maybe a bug in the caller. Just report that we needed an + /* Weird, maybe a bug in the caller. Just report that we needed a number. */ if (name) lex_error (lexer, _("Syntax error expecting number for %s."), name); @@ -1166,7 +1166,7 @@ lex_force_num_range_co (struct lexer *lexer, const char *name, if (min >= max) { - /* Weird, maybe a bug in the caller. Just report that we needed an + /* Weird, maybe a bug in the caller. Just report that we needed a number. */ if (name) lex_error (lexer, _("Syntax error expecting number for %s."), name); @@ -1327,7 +1327,7 @@ lex_force_num_range_open (struct lexer *lexer, const char *name, if (min >= max) { - /* Weird, maybe a bug in the caller. Just report that we needed an + /* Weird, maybe a bug in the caller. Just report that we needed a number. */ if (name) lex_error (lexer, _("Syntax error expecting number for %s."), name); diff --git a/src/libpspp/abt.c b/src/libpspp/abt.c index ae74618302..42d21eefc6 100644 --- a/src/libpspp/abt.c +++ b/src/libpspp/abt.c @@ -394,7 +394,7 @@ abt_changed (struct abt *abt, struct abt_node *p) } /* ABT nodes may be moved around in memory as necessary, e.g. as - the result of an realloc operation on a block that contains a + the result of a realloc operation on a block that contains a node. Once this is done, call this function passing node P that was moved and its ABT before attempting any other operation on ABT. diff --git a/src/libpspp/bt.c b/src/libpspp/bt.c index 4178d1475a..e6eaba7efd 100644 --- a/src/libpspp/bt.c +++ b/src/libpspp/bt.c @@ -399,7 +399,7 @@ bt_changed (struct bt *bt, struct bt_node *p) } /* BT nodes may be moved around in memory as necessary, e.g. as - the result of an realloc operation on a block that contains a + the result of a realloc operation on a block that contains a node. Once this is done, call this function passing node P that was moved and its BT before attempting any other operation on BT. diff --git a/src/libpspp/encoding-guesser.c b/src/libpspp/encoding-guesser.c index 2f3438ff81..20c4321a6e 100644 --- a/src/libpspp/encoding-guesser.c +++ b/src/libpspp/encoding-guesser.c @@ -231,7 +231,7 @@ is_utf32be_bom (const uint8_t *data, size_t n) UTF-8 cannot be distinguished from other ASCII-based encodings until a non-ASCII text character is encountered. If ENCODING specifies autodetection and this function returns "ASCII", then the client should - process the input until it encounters an non-ASCII character (as returned by + process the input until it encounters a non-ASCII character (as returned by encoding_guess_is_ascii_text()) and then use encoding_guess_tail_encoding() to make a final encoding guess. See encoding-guesser.h for details. diff --git a/src/libpspp/heap.c b/src/libpspp/heap.c index c825704ea9..beb6f21933 100644 --- a/src/libpspp/heap.c +++ b/src/libpspp/heap.c @@ -109,7 +109,7 @@ heap_count (const struct heap *h) } /* Heap nodes may be moved around in memory as necessary, e.g. as - the result of an realloc operation on a block that contains a + the result of a realloc operation on a block that contains a heap node. Once this is done, call this function passing the NODE that was moved and its heap H before attempting any other operation on H. */ diff --git a/src/libpspp/heap.h b/src/libpspp/heap.h index c24c763277..c121e6c23a 100644 --- a/src/libpspp/heap.h +++ b/src/libpspp/heap.h @@ -25,7 +25,7 @@ - Delete any node in the heap: O(lg N). - - Change value of an node: O(lg N) in general; O(1) in + - Change value of a node: O(lg N) in general; O(1) in the typically common case where the node does not change its position relative to other nodes. diff --git a/src/libpspp/hmap.c b/src/libpspp/hmap.c index f3cbf23a61..e599389abe 100644 --- a/src/libpspp/hmap.c +++ b/src/libpspp/hmap.c @@ -156,7 +156,7 @@ hmap_changed (struct hmap *map, struct hmap_node *node, size_t new_hash) } /* Hash map nodes may be moved around in memory as necessary, - e.g. as the result of an realloc operation on a block that + e.g. as the result of a realloc operation on a block that contains a node. Once this is done, call this function passing NODE that was moved, its former location in memory OLD, and its hash map MAP before attempting any other diff --git a/src/libpspp/line-reader.c b/src/libpspp/line-reader.c index c7d024b44a..a3532c37fa 100644 --- a/src/libpspp/line-reader.c +++ b/src/libpspp/line-reader.c @@ -323,7 +323,7 @@ line_reader_eof (const struct line_reader *r) return r->eof && !r->length; } -/* Returns an nonzero errno value if an error has been encountered reading +/* Returns a nonzero errno value if an error has been encountered reading R, zero otherwise. */ int line_reader_error (const struct line_reader *r) diff --git a/src/libpspp/ll.h b/src/libpspp/ll.h index 9e6e35f04a..2484513027 100644 --- a/src/libpspp/ll.h +++ b/src/libpspp/ll.h @@ -244,7 +244,7 @@ struct ll *ll_find_partition (const struct ll *r0, const struct ll *r1, DATA != NULL; \ DATA = ll_prev__ (DATA, STRUCT, MEMBER, LIST)) -/* Continues a iteration of LIST, starting from the object +/* Continues an iteration of LIST, starting from the object currently in DATA and continuing, in forward or reverse order, through the remainder of the list, assuming that each `struct ll' in LIST is embedded as the given MEMBER name in data type @@ -281,7 +281,7 @@ struct ll *ll_find_partition (const struct ll *r0, const struct ll *r1, : 0); \ DATA = PREV) -/* Continues a iteration of LIST, in forward or reverse order, +/* Continues an iteration of LIST, in forward or reverse order, starting from the object currently in DATA and continuing forward through the remainder of the list, assuming that each `struct ll' in LIST is embedded as the given MEMBER name in diff --git a/src/output/table.c b/src/output/table.c index 97a2793c55..cb6caf929a 100644 --- a/src/output/table.c +++ b/src/output/table.c @@ -40,7 +40,7 @@ #define V TABLE_VERT /* Increases TABLE's reference count, indicating that it has an additional - owner. An table that is shared among multiple owners must not be + owner. A table that is shared among multiple owners must not be modified. */ struct table * table_ref (const struct table *table_) diff --git a/src/ui/gui/find-dialog.c b/src/ui/gui/find-dialog.c index 3562885a83..d9d3a5f651 100644 --- a/src/ui/gui/find-dialog.c +++ b/src/ui/gui/find-dialog.c @@ -343,7 +343,7 @@ minus1 (casenumber current, struct datasheet *data) return -1; } -/* An type to facilitate iterating through casenumbers */ +/* A type to facilitate iterating through casenumbers */ struct casenum_iterator { /* returns the first case to access */ diff --git a/tests/language/commands/frequencies.at b/tests/language/commands/frequencies.at index 473d1af677..00f1d53997 100644 --- a/tests/language/commands/frequencies.at +++ b/tests/language/commands/frequencies.at @@ -205,7 +205,7 @@ frequencies.sps:17: warning: FREQUENCIES: Suppressed 1 additional warning about AT_CLEANUP # Tests for a bug where pspp would crash if two FREQUENCIES commands -# existed in a input file. +# existed in an input file. AT_SETUP([FREQUENCIES two runs crash]) AT_DATA([frequencies.sps], [data list free /v1 v2. diff --git a/utilities/pspp-dump-sav.c b/utilities/pspp-dump-sav.c index 7c261a93ba..cb8d804134 100644 --- a/utilities/pspp-dump-sav.c +++ b/utilities/pspp-dump-sav.c @@ -1485,7 +1485,7 @@ text_match (struct text_record *text, int c) return false; } -/* Reads a integer value expressed in decimal, then a space, then a string that +/* Reads an integer value expressed in decimal, then a space, then a string that consists of exactly as many bytes as specified by the integer, then a space, from TEXT. Returns the string, null-terminated, as a subset of TEXT's buffer (so the caller should not free the string). */ -- 2.30.2