From: Ben Pfaff Date: Mon, 15 May 2023 02:16:26 +0000 (-0700) Subject: Improve or fix some diagnostic messages. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cc7131faec0548c0df2e9b01b86664107148e3e;p=pspp Improve or fix some diagnostic messages. Thanks to Jaap Verhage for reporting these bugs at https://lists.gnu.org/archive/html/pspp-dev/2023-05/msg00004.html --- diff --git a/src/data/identifier2.c b/src/data/identifier2.c index 53f98ac6d4..8b34bb214a 100644 --- a/src/data/identifier2.c +++ b/src/data/identifier2.c @@ -70,7 +70,7 @@ id_is_valid__ (const char *id, const char *dict_encoding, dict_len = ss_length (out); ss_dealloc (&out); if (!ok) - return xasprintf (_("Identifier `%s' is not valid in encoding `%s'." + return xasprintf (_("Identifier `%s' is not valid in encoding `%s' " "used for this dictionary."), id, dict_encoding); } else diff --git a/src/language/commands/aggregate.c b/src/language/commands/aggregate.c index 8afa5f92e6..8396f12c3b 100644 --- a/src/language/commands/aggregate.c +++ b/src/language/commands/aggregate.c @@ -249,7 +249,7 @@ cmd_aggregate (struct lexer *lexer, struct dataset *ds) "input data.")); if (presorted_ofs) lex_ofs_msg (lexer, SN, presorted_ofs, presorted_ofs, - _("The PRESORTED subcommand state that the " + _("The PRESORTED subcommand states that the " "input data is presorted.")); else if (addvariables_ofs) lex_ofs_msg (lexer, SN, addvariables_ofs, addvariables_ofs, diff --git a/src/language/commands/recode.c b/src/language/commands/recode.c index 286b2ae641..9c43645676 100644 --- a/src/language/commands/recode.c +++ b/src/language/commands/recode.c @@ -589,7 +589,7 @@ enlarge_dst_widths (struct lexer *lexer, struct recode_trns *trns, msg (SE, _("At least one target variable is too narrow for " "the output values.")); lex_ofs_msg (lexer, SN, out->ofs, out->ofs, - _("This recoding output value has width %d."), + _("This output value has width %d."), out->width); lex_ofs_msg (lexer, SN, dst_start, dst_end, _("Target variable %s only has width %d."), diff --git a/tests/language/commands/aggregate.at b/tests/language/commands/aggregate.at index ac3ad929aa..b8f7c8166a 100644 --- a/tests/language/commands/aggregate.at +++ b/tests/language/commands/aggregate.at @@ -323,7 +323,7 @@ AT_CHECK([pspp --testing-mode -O format=csv insert.sps], [1], [dnl 2 | AGGREGATE/PRESORTED/BREAK=x(A). | ^~~~" -"aggregate.sps:2.11-2.19: note: AGGREGATE: The PRESORTED subcommand state that the input data is presorted. +"aggregate.sps:2.11-2.19: note: AGGREGATE: The PRESORTED subcommand states that the input data is presorted. 2 | AGGREGATE/PRESORTED/BREAK=x(A). | ^~~~~~~~~" diff --git a/tests/language/commands/recode.at b/tests/language/commands/recode.at index f12185a410..c9cd819c04 100644 --- a/tests/language/commands/recode.at +++ b/tests/language/commands/recode.at @@ -332,7 +332,7 @@ list. AT_CHECK([pspp -O format=csv recode.sps], [1], [dnl recode.sps:9: error: RECODE: At least one target variable is too narrow for the output values. -"recode.sps:9.19-9.25: note: RECODE: This recoding output value has width 5. +"recode.sps:9.19-9.25: note: RECODE: This output value has width 5. 9 | recode x y (""a"" = ""first"") . | ^~~~~~~" @@ -498,7 +498,7 @@ recode.sps:15: error: RECODE: All string variables specified on INTO must alread recode.sps:20: error: RECODE: At least one target variable is too narrow for the output values. -"recode.sps:20.19-20.26: note: RECODE: This recoding output value has width 6. +"recode.sps:20.19-20.26: note: RECODE: This output value has width 6. 20 | RECODE n1 TO n4(1='123456') INTO s1 TO s4. | ^~~~~~~~"