From 173d1687aea88e0e5e1b1d8615ed68ebefb15d08 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Wed, 15 Sep 2010 14:53:41 +0200 Subject: [PATCH] Consolidate quoting style in printed strings. The GNU coding standards say to use `xxxx' for quoted strings. Previously we've been using a mixture of that style and "xxxx". This change substitutes all instances of the latter with the former. --- src/data/any-reader.c | 4 +- src/data/csv-file-writer.c | 4 +- src/data/data-in.c | 2 +- src/data/file-handle-def.c | 2 +- src/data/gnumeric-reader.c | 6 +- src/data/por-file-reader.c | 4 +- src/data/por-file-writer.c | 4 +- src/data/sys-file-reader.c | 12 ++-- src/data/sys-file-writer.c | 4 +- src/language/control/repeat.c | 10 ++-- src/language/data-io/data-reader.c | 2 +- src/language/data-io/data-writer.c | 4 +- src/language/data-io/get-data.c | 1 - src/language/data-io/placement-parser.c | 2 +- src/language/data-io/print.c | 2 +- src/language/data-io/save-translate.c | 2 +- src/language/data-io/trim.c | 4 +- src/language/dictionary/mrsets.c | 2 +- src/language/expressions/helpers.c | 10 ++-- src/language/expressions/parse.c | 56 +++++++++---------- src/language/lexer/format-parser.c | 4 +- src/language/lexer/lexer.c | 2 +- src/language/utilities/set.q | 4 +- src/libpspp/i18n.c | 2 +- src/libpspp/model-checker.c | 6 +- src/output/ascii.c | 4 +- src/output/cairo.c | 6 +- src/output/csv.c | 2 +- src/output/driver.c | 5 +- src/output/html.c | 6 +- src/output/journal.c | 4 +- src/output/measure.c | 6 +- src/output/msglog.c | 2 +- src/output/options.c | 18 +++--- src/ui/gui/helper.c | 4 +- src/ui/gui/psppire-dict.c | 2 +- src/ui/gui/psppire-syntax-window.c | 2 +- src/ui/gui/psppire-var-store.c | 6 +- src/ui/gui/psppire-var-view.c | 2 +- src/ui/gui/psppire-window.c | 2 +- src/ui/gui/psppire.c | 2 +- src/ui/gui/text-data-import-dialog.c | 10 ++-- src/ui/gui/val-labs-dialog.c | 2 +- src/ui/source-init-opts.c | 8 ++- tests/command/get-data-gnm.sh | 4 +- tests/command/list.sh | 2 +- tests/command/weight.sh | 2 +- tests/dissect-sysfile.c | 4 +- tests/language/dictionary/mrsets.at | 4 +- tests/language/expressions/evaluate.at | 74 ++++++++++++------------- tests/perl-module.at | 2 +- 51 files changed, 173 insertions(+), 167 deletions(-) diff --git a/src/data/any-reader.c b/src/data/any-reader.c index 731f552a9f..807c4fe90e 100644 --- a/src/data/any-reader.c +++ b/src/data/any-reader.c @@ -53,7 +53,7 @@ try_detect (const char *file_name, bool (*detect) (FILE *)) file = fn_open (file_name, "rb"); if (file == NULL) { - msg (ME, _("An error occurred while opening \"%s\": %s."), + msg (ME, _("An error occurred while opening `%s': %s."), file_name, strerror (errno)); return IO_ERROR; } @@ -98,7 +98,7 @@ any_reader_open (struct file_handle *handle, struct dictionary **dict) else if (result == YES) return pfm_open_reader (handle, dict, NULL); - msg (SE, _("\"%s\" is not a system or portable file."), + msg (SE, _("`%s' is not a system or portable file."), fh_get_file_name (handle)); return NULL; } diff --git a/src/data/csv-file-writer.c b/src/data/csv-file-writer.c index 7d35b1c2e0..70568c3e1d 100644 --- a/src/data/csv-file-writer.c +++ b/src/data/csv-file-writer.c @@ -158,7 +158,7 @@ csv_writer_open (struct file_handle *fh, const struct dictionary *dict, &w->file, NULL); if (w->rf == NULL) { - msg (ME, _("Error opening \"%s\" for writing as a system file: %s."), + msg (ME, _("Error opening `%s' for writing as a system file: %s."), fh_get_file_name (fh), strerror (errno)); goto error; } @@ -459,7 +459,7 @@ close_writer (struct csv_writer *w) ok = false; if (!ok) - msg (ME, _("An I/O error occurred writing CSV file \"%s\"."), + msg (ME, _("An I/O error occurred writing CSV file `%s'."), fh_get_file_name (w->fh)); if (ok ? !replace_file_commit (w->rf) : !replace_file_abort (w->rf)) diff --git a/src/data/data-in.c b/src/data/data-in.c index c105454ae6..cd51226830 100644 --- a/src/data/data-in.c +++ b/src/data/data-in.c @@ -873,7 +873,7 @@ parse_trailer (struct data_in *i) if (ss_is_empty (i->input)) return true; - data_warning (i, _("Trailing garbage \"%.*s\" following date."), + data_warning (i, _("Trailing garbage `%.*s' following date."), (int) ss_length (i->input), ss_data (i->input)); return false; } diff --git a/src/data/file-handle-def.c b/src/data/file-handle-def.c index beba83d4fb..d025ff6a3a 100644 --- a/src/data/file-handle-def.c +++ b/src/data/file-handle-def.c @@ -233,7 +233,7 @@ fh_create_file (const char *id, const char *file_name, char *handle_name; struct file_handle *handle; - handle_name = id != NULL ? xstrdup (id) : xasprintf ("\"%s\"", file_name); + handle_name = id != NULL ? xstrdup (id) : xasprintf ("`%s'", file_name); handle = create_handle (id, handle_name, FH_REF_FILE); handle->file_name = xstrdup (file_name); handle->mode = properties->mode; diff --git a/src/data/gnumeric-reader.c b/src/data/gnumeric-reader.c index 74911c469e..1e18cc7bd5 100644 --- a/src/data/gnumeric-reader.c +++ b/src/data/gnumeric-reader.c @@ -361,7 +361,7 @@ gnumeric_open_reader (struct gnumeric_read_info *gri, struct dictionary **dict) if ( NULL == gz) { - msg (ME, _("Error opening \"%s\" for reading as a Gnumeric file: %s."), + msg (ME, _("Error opening `%s' for reading as a Gnumeric file: %s."), gri->file_name, strerror (errno)); goto error; @@ -381,7 +381,7 @@ gnumeric_open_reader (struct gnumeric_read_info *gri, struct dictionary **dict) &r->start_col, &r->start_row, &r->stop_col, &r->stop_row)) { - msg (SE, _("Invalid cell range \"%s\""), + msg (SE, _("Invalid cell range `%s'"), gri->cell_range); goto error; } @@ -525,7 +525,7 @@ gnumeric_open_reader (struct gnumeric_read_info *gri, struct dictionary **dict) if ( n_var_specs == 0 ) { - msg (MW, _("Selected sheet or range of spreadsheet \"%s\" is empty."), + msg (MW, _("Selected sheet or range of spreadsheet `%s' is empty."), gri->file_name); goto error; } diff --git a/src/data/por-file-reader.c b/src/data/por-file-reader.c index c148a7f09a..f3b78b1579 100644 --- a/src/data/por-file-reader.c +++ b/src/data/por-file-reader.c @@ -152,7 +152,7 @@ close_reader (struct pfm_reader *r) { if (fn_close (fh_get_file_name (r->fh), r->file) == EOF) { - msg (ME, _("Error closing portable file \"%s\": %s."), + msg (ME, _("Error closing portable file `%s': %s."), fh_get_file_name (r->fh), strerror (errno)); r->ok = false; } @@ -271,7 +271,7 @@ pfm_open_reader (struct file_handle *fh, struct dictionary **dict, r->file = fn_open (fh_get_file_name (r->fh), "rb"); if (r->file == NULL) { - msg (ME, _("An error occurred while opening \"%s\" for reading " + msg (ME, _("An error occurred while opening `%s' for reading " "as a portable file: %s."), fh_get_file_name (r->fh), strerror (errno)); goto error; diff --git a/src/data/por-file-writer.c b/src/data/por-file-writer.c index 9889cfd953..c5f758a1e5 100644 --- a/src/data/por-file-writer.c +++ b/src/data/por-file-writer.c @@ -157,7 +157,7 @@ pfm_open_writer (struct file_handle *fh, struct dictionary *dict, &w->file, NULL); if (w->rf == NULL) { - msg (ME, _("Error opening \"%s\" for writing as a portable file: %s."), + msg (ME, _("Error opening `%s' for writing as a portable file: %s."), fh_get_file_name (fh), strerror (errno)); goto error; } @@ -502,7 +502,7 @@ close_writer (struct pfm_writer *w) ok = false; if (!ok) - msg (ME, _("An I/O error occurred writing portable file \"%s\"."), + msg (ME, _("An I/O error occurred writing portable file `%s'."), fh_get_file_name (w->fh)); if (ok ? !replace_file_commit (w->rf) : !replace_file_abort (w->rf)) diff --git a/src/data/sys-file-reader.c b/src/data/sys-file-reader.c index b92f42a96c..de2c47a59c 100644 --- a/src/data/sys-file-reader.c +++ b/src/data/sys-file-reader.c @@ -293,7 +293,7 @@ sfm_open_reader (struct file_handle *fh, struct dictionary **dict, r->file = fn_open (fh_get_file_name (fh), "rb"); if (r->file == NULL) { - msg (ME, _("Error opening \"%s\" for reading as a system file: %s."), + msg (ME, _("Error opening `%s' for reading as a system file: %s."), fh_get_file_name (r->fh), strerror (errno)); goto error; } @@ -424,7 +424,7 @@ close_reader (struct sfm_reader *r) { if (fn_close (fh_get_file_name (r->fh), r->file) == EOF) { - msg (ME, _("Error closing system file \"%s\": %s."), + msg (ME, _("Error closing system file `%s': %s."), fh_get_file_name (r->fh), strerror (errno)); r->error = true; } @@ -1079,7 +1079,7 @@ read_mrsets (struct sfm_reader *r, size_t size, size_t count, if (!strcmp (number, "11")) mrset->label_from_var_label = true; else if (strcmp (number, "1")) - sys_warn (r, _("Unexpected label source value \"%s\" " + sys_warn (r, _("Unexpected label source value `%s' " "following 'E' at offset %zu in MRSETS record"), number, text_pos (text)); } @@ -1502,7 +1502,7 @@ read_value_labels (struct sfm_reader *r, sys_warn (r, _("Duplicate value label for %g on %s."), label->value.f, var_get_name (v)); else - sys_warn (r, _("Duplicate value label for \"%.*s\" on %s."), + sys_warn (r, _("Duplicate value label for `%.*s' on %s."), max_width, value_str (&label->value, max_width), var_get_name (v)); } @@ -1683,7 +1683,7 @@ read_long_string_value_labels (struct sfm_reader *r, } if (!skip && !var_add_value_label (v, &value, label)) - sys_warn (r, _("Duplicate value label for \"%.*s\" on %s."), + sys_warn (r, _("Duplicate value label for `%.*s' on %s."), width, value_str (&value, width), var_get_name (v)); } } @@ -2290,7 +2290,7 @@ sys_msg (struct sfm_reader *r, int class, const char *format, va_list args) struct string text; ds_init_empty (&text); - ds_put_format (&text, "\"%s\" near offset 0x%llx: ", + ds_put_format (&text, "`%s' near offset 0x%llx: ", fh_get_file_name (r->fh), (long long int) ftello (r->file)); ds_put_vformat (&text, format, args); diff --git a/src/data/sys-file-writer.c b/src/data/sys-file-writer.c index ac5f4c903e..f31bd99a88 100644 --- a/src/data/sys-file-writer.c +++ b/src/data/sys-file-writer.c @@ -215,7 +215,7 @@ sfm_open_writer (struct file_handle *fh, struct dictionary *d, &w->file, NULL); if (w->rf == NULL) { - msg (ME, _("Error opening \"%s\" for writing as a system file: %s."), + msg (ME, _("Error opening `%s' for writing as a system file: %s."), fh_get_file_name (fh), strerror (errno)); goto error; } @@ -982,7 +982,7 @@ close_writer (struct sfm_writer *w) ok = false; if (!ok) - msg (ME, _("An I/O error occurred writing system file \"%s\"."), + msg (ME, _("An I/O error occurred writing system file `%s'."), fh_get_file_name (w->fh)); if (ok ? !replace_file_commit (w->rf) : !replace_file_abort (w->rf)) diff --git a/src/language/control/repeat.c b/src/language/control/repeat.c index cb608f769d..cd88a1e141 100644 --- a/src/language/control/repeat.c +++ b/src/language/control/repeat.c @@ -169,12 +169,12 @@ parse_specification (struct lexer *lexer, struct repeat_block *block) if (!lex_force_id (lexer)) return false; if (dict_lookup_var (dict, lex_tokid (lexer))) - msg (SW, _("Dummy variable name \"%s\" hides dictionary " - "variable \"%s\"."), + msg (SW, _("Dummy variable name `%s' hides dictionary " + "variable `%s'."), lex_tokid (lexer), lex_tokid (lexer)); if (find_macro (block, ss_cstr (lex_tokid (lexer)))) { - msg (SE, _("Dummy variable name \"%s\" is given twice."), + msg (SE, _("Dummy variable name `%s' is given twice."), lex_tokid (lexer)); return false; } @@ -220,8 +220,8 @@ parse_specification (struct lexer *lexer, struct repeat_block *block) } else if (block->loop_cnt != count) { - msg (SE, _("Dummy variable \"%.*s\" had %d " - "substitutions, so \"%.*s\" must also, but %d " + msg (SE, _("Dummy variable `%.*s' had %d " + "substitutions, so `%.*s' must also, but %d " "were specified."), (int) ss_length (first_name), ss_data (first_name), block->loop_cnt, diff --git a/src/language/data-io/data-reader.c b/src/language/data-io/data-reader.c index 27c8ca68db..e9bcbfa9dc 100644 --- a/src/language/data-io/data-reader.c +++ b/src/language/data-io/data-reader.c @@ -146,7 +146,7 @@ dfm_open_reader (struct file_handle *fh, struct lexer *lexer) r->file = fn_open (fh_get_file_name (fh), "rb"); if (r->file == NULL) { - msg (ME, _("Could not open \"%s\" for reading as a data file: %s."), + msg (ME, _("Could not open `%s' for reading as a data file: %s."), fh_get_file_name (r->fh), strerror (errno)); fh_unlock (r->lock); fh_unref (fh); diff --git a/src/language/data-io/data-writer.c b/src/language/data-io/data-writer.c index f736568798..fd77d504f8 100644 --- a/src/language/data-io/data-writer.c +++ b/src/language/data-io/data-writer.c @@ -70,7 +70,7 @@ dfm_open_writer (struct file_handle *fh) &w->file, NULL); if (w->rf == NULL) { - msg (ME, _("An error occurred while opening \"%s\" for writing " + msg (ME, _("An error occurred while opening `%s' for writing " "as a data file: %s."), fh_get_file_name (w->fh), strerror (errno)); dfm_close_writer (w); @@ -187,7 +187,7 @@ dfm_close_writer (struct dfm_writer *w) ok = !dfm_write_error (w) && !fn_close (file_name, w->file); if (!ok) - msg (ME, _("I/O error occurred writing data file \"%s\"."), file_name); + msg (ME, _("I/O error occurred writing data file `%s'."), file_name); if (ok ? !replace_file_commit (w->rf) : !replace_file_abort (w->rf)) ok = false; diff --git a/src/language/data-io/get-data.c b/src/language/data-io/get-data.c index 0039089188..c00baa5d66 100644 --- a/src/language/data-io/get-data.c +++ b/src/language/data-io/get-data.c @@ -219,7 +219,6 @@ parse_get_gnm (struct lexer *lexer, struct dataset *ds) } else { - printf ("Unknown data file type \"\%s\"\n", lex_tokid (lexer)); goto error; } lex_get (lexer); diff --git a/src/language/data-io/placement-parser.c b/src/language/data-io/placement-parser.c index eee5206b5b..4f1d062cb8 100644 --- a/src/language/data-io/placement-parser.c +++ b/src/language/data-io/placement-parser.c @@ -223,7 +223,7 @@ fixed_parse_fortran (struct lexer *lexer, struct pool *pool, bool for_input, { if (!fmt_from_name (type, &f.type)) { - msg (SE, _("Unknown format type \"%s\"."), type); + msg (SE, _("Unknown format type `%s'."), type); return false; } if (!fmt_check (&f, for_input)) diff --git a/src/language/data-io/print.c b/src/language/data-io/print.c index fd98eaedcc..d3d0972543 100644 --- a/src/language/data-io/print.c +++ b/src/language/data-io/print.c @@ -412,7 +412,7 @@ dump_table (struct print_trns *trns, const struct file_handle *fh) switch (spec->type) { case PRT_LITERAL: - tab_text_format (t, 0, row, TAB_LEFT | TAB_FIX, "\"%.*s\"", + tab_text_format (t, 0, row, TAB_LEFT | TAB_FIX, "`%.*s'", (int) ds_length (&spec->string), ds_data (&spec->string)); width = ds_length (&spec->string); diff --git a/src/language/data-io/save-translate.c b/src/language/data-io/save-translate.c index 3e33ff1125..4cf5e71eaa 100644 --- a/src/language/data-io/save-translate.c +++ b/src/language/data-io/save-translate.c @@ -245,7 +245,7 @@ cmd_save_translate (struct lexer *lexer, struct dataset *ds) } else if (!replace && fn_exists (fh_get_file_name (handle))) { - msg (SE, _("Output file \"%s\" exists but REPLACE was not specified."), + msg (SE, _("Output file `%s' exists but REPLACE was not specified."), fh_get_file_name (handle)); goto error; } diff --git a/src/language/data-io/trim.c b/src/language/data-io/trim.c index 921b9c655e..5817fd02cc 100644 --- a/src/language/data-io/trim.c +++ b/src/language/data-io/trim.c @@ -88,8 +88,8 @@ parse_dict_rename (struct lexer *lexer, struct dictionary *dict) msg (SE, _("Cannot rename %s as %s because there already exists " "a variable named %s. To rename variables with " "overlapping names, use a single RENAME subcommand " - "such as \"/RENAME (A=B)(B=C)(C=A)\", or equivalently, " - "\"/RENAME (A B C=B C A)\"."), + "such as `/RENAME (A=B)(B=C)(C=A)', or equivalently, " + "`/RENAME (A B C=B C A)'."), var_get_name (v), lex_tokid (lexer), lex_tokid (lexer)); return 0; } diff --git a/src/language/dictionary/mrsets.c b/src/language/dictionary/mrsets.c index 6e8a050849..96f1a110f5 100644 --- a/src/language/dictionary/mrsets.c +++ b/src/language/dictionary/mrsets.c @@ -577,7 +577,7 @@ parse_display (struct lexer *lexer, struct dictionary *dict) if (mrset->width == 0) ds_put_format (&details, "%.0f\n", mrset->counted.f); else - ds_put_format (&details, "\"%.*s\"\n", mrset->width, + ds_put_format (&details, "`%.*s'\n", mrset->width, value_str (&mrset->counted, mrset->width)); ds_put_format (&details, "%s: %s\n", _("Category label source"), (mrset->cat_source == MRSET_VARLABELS diff --git a/src/language/expressions/helpers.c b/src/language/expressions/helpers.c index 0b77919217..17fc318225 100644 --- a/src/language/expressions/helpers.c +++ b/src/language/expressions/helpers.c @@ -179,9 +179,11 @@ recognize_unit (struct substring name, enum date_unit *unit) return true; } - msg (SE, _("Unrecognized date unit \"%.*s\". " - "Valid date units are \"years\", \"quarters\", \"months\", " - "\"weeks\", \"days\", \"hours\", \"minutes\", and \"seconds\"."), + /* TRANSLATORS: Don't translate the the actual unit names `weeks', `days' etc + They must remain in their original English. */ + msg (SE, _("Unrecognized date unit `%.*s'. " + "Valid date units are `years', `quarters', `months', " + "`weeks', `days', `hours', `minutes', and `seconds'."), (int) ss_length (name), ss_data (name)); return false; } @@ -330,7 +332,7 @@ recognize_method (struct substring method_name, enum date_sum_method *method) else { msg (SE, _("Invalid DATESUM method. " - "Valid choices are \"closest\" and \"rollover\".")); + "Valid choices are `closest' and `rollover'.")); return false; } } diff --git a/src/language/expressions/parse.c b/src/language/expressions/parse.c index 530e272cbe..f9461f16bc 100644 --- a/src/language/expressions/parse.c +++ b/src/language/expressions/parse.c @@ -616,7 +616,7 @@ static union any_node * parse_or (struct lexer *lexer, struct expression *e) { static const struct operator op = - { T_OR, OP_OR, "logical disjunction (\"OR\")" }; + { T_OR, OP_OR, "logical disjunction (`OR')" }; return parse_binary_operators (lexer, e, parse_and (lexer, e), &op, 1, parse_and, NULL); } @@ -626,7 +626,7 @@ static union any_node * parse_and (struct lexer *lexer, struct expression *e) { static const struct operator op = - { T_AND, OP_AND, "logical conjunction (\"AND\")" }; + { T_AND, OP_AND, "logical conjunction (`AND')" }; return parse_binary_operators (lexer, e, parse_not (lexer, e), &op, 1, parse_not, NULL); @@ -637,7 +637,7 @@ static union any_node * parse_not (struct lexer *lexer, struct expression *e) { static const struct operator op - = { T_NOT, OP_NOT, "logical negation (\"NOT\")" }; + = { T_NOT, OP_NOT, "logical negation (`NOT')" }; return parse_inverting_unary_operator (lexer, e, &op, parse_rel); } @@ -646,12 +646,12 @@ static union any_node * parse_rel (struct lexer *lexer, struct expression *e) { const char *chain_warning = - _("Chaining relational operators (e.g. \"a < b < c\") will " + _("Chaining relational operators (e.g. `a < b < c') will " "not produce the mathematically expected result. " "Use the AND logical operator to fix the problem " - "(e.g. \"a < b AND b < c\"). " + "(e.g. `a < b AND b < c'). " "If chaining is really intended, parentheses will disable " - "this warning (e.g. \"(a < b) < c\".)"); + "this warning (e.g. `(a < b) < c'.)"); union any_node *node = parse_add (lexer, e); @@ -665,13 +665,13 @@ parse_rel (struct lexer *lexer, struct expression *e) { static const struct operator ops[] = { - { '=', OP_EQ, "numeric equality (\"=\")" }, - { T_EQ, OP_EQ, "numeric equality (\"EQ\")" }, - { T_GE, OP_GE, "numeric greater-than-or-equal-to (\">=\")" }, - { T_GT, OP_GT, "numeric greater than (\">\")" }, - { T_LE, OP_LE, "numeric less-than-or-equal-to (\"<=\")" }, - { T_LT, OP_LT, "numeric less than (\"<\")" }, - { T_NE, OP_NE, "numeric inequality (\"<>\")" }, + { '=', OP_EQ, "numeric equality (`=')" }, + { T_EQ, OP_EQ, "numeric equality (`EQ')" }, + { T_GE, OP_GE, "numeric greater-than-or-equal-to (`>=')" }, + { T_GT, OP_GT, "numeric greater than (`>')" }, + { T_LE, OP_LE, "numeric less-than-or-equal-to (`<=')" }, + { T_LT, OP_LT, "numeric less than (`<')" }, + { T_NE, OP_NE, "numeric inequality (`<>')" }, }; return parse_binary_operators (lexer, e, node, ops, @@ -683,13 +683,13 @@ parse_rel (struct lexer *lexer, struct expression *e) { static const struct operator ops[] = { - { '=', OP_EQ_STRING, "string equality (\"=\")" }, - { T_EQ, OP_EQ_STRING, "string equality (\"EQ\")" }, - { T_GE, OP_GE_STRING, "string greater-than-or-equal-to (\">=\")" }, - { T_GT, OP_GT_STRING, "string greater than (\">\")" }, - { T_LE, OP_LE_STRING, "string less-than-or-equal-to (\"<=\")" }, - { T_LT, OP_LT_STRING, "string less than (\"<\")" }, - { T_NE, OP_NE_STRING, "string inequality (\"<>\")" }, + { '=', OP_EQ_STRING, "string equality (`=')" }, + { T_EQ, OP_EQ_STRING, "string equality (`EQ')" }, + { T_GE, OP_GE_STRING, "string greater-than-or-equal-to (`>=')" }, + { T_GT, OP_GT_STRING, "string greater than (`>')" }, + { T_LE, OP_LE_STRING, "string less-than-or-equal-to (`<=')" }, + { T_LT, OP_LT_STRING, "string less than (`<')" }, + { T_NE, OP_NE_STRING, "string inequality (`<>')" }, }; return parse_binary_operators (lexer, e, node, ops, @@ -708,8 +708,8 @@ parse_add (struct lexer *lexer, struct expression *e) { static const struct operator ops[] = { - { '+', OP_ADD, "addition (\"+\")" }, - { '-', OP_SUB, "subtraction (\"-\")" }, + { '+', OP_ADD, "addition (`+')" }, + { '-', OP_SUB, "subtraction (`-')" }, }; return parse_binary_operators (lexer, e, parse_mul (lexer, e), @@ -723,8 +723,8 @@ parse_mul (struct lexer *lexer, struct expression *e) { static const struct operator ops[] = { - { '*', OP_MUL, "multiplication (\"*\")" }, - { '/', OP_DIV, "division (\"/\")" }, + { '*', OP_MUL, "multiplication (`*')" }, + { '/', OP_DIV, "division (`/')" }, }; return parse_binary_operators (lexer, e, parse_neg (lexer, e), @@ -736,7 +736,7 @@ parse_mul (struct lexer *lexer, struct expression *e) static union any_node * parse_neg (struct lexer *lexer, struct expression *e) { - static const struct operator op = { '-', OP_NEG, "negation (\"-\")" }; + static const struct operator op = { '-', OP_NEG, "negation (`-')" }; return parse_inverting_unary_operator (lexer, e, &op, parse_exp); } @@ -744,12 +744,12 @@ static union any_node * parse_exp (struct lexer *lexer, struct expression *e) { static const struct operator op = - { T_EXP, OP_POW, "exponentiation (\"**\")" }; + { T_EXP, OP_POW, "exponentiation (`**')" }; const char *chain_warning = - _("The exponentiation operator (\"**\") is left-associative, " + _("The exponentiation operator (`**') is left-associative, " "even though right-associative semantics are more useful. " - "That is, \"a**b**c\" equals \"(a**b)**c\", not as \"a**(b**c)\". " + "That is, `a**b**c' equals `(a**b)**c', not as `a**(b**c)'. " "To disable this warning, insert parentheses."); return parse_binary_operators (lexer, e, parse_primary (lexer, e), &op, 1, diff --git a/src/language/lexer/format-parser.c b/src/language/lexer/format-parser.c index 35e9a991fa..39dbacbf23 100644 --- a/src/language/lexer/format-parser.c +++ b/src/language/lexer/format-parser.c @@ -104,7 +104,7 @@ parse_format_specifier (struct lexer *lexer, struct fmt_spec *format) if (!fmt_from_name (type, &format->type)) { - msg (SE, _("Unknown format type \"%s\"."), type); + msg (SE, _("Unknown format type `%s'."), type); return false; } @@ -123,7 +123,7 @@ parse_format_specifier_name (struct lexer *lexer, enum fmt_type *type) } if (!fmt_from_name (ds_cstr (lex_tokstr (lexer)), type)) { - msg (SE, _("Unknown format type \"%s\"."), ds_cstr (lex_tokstr (lexer))); + msg (SE, _("Unknown format type `%s'."), ds_cstr (lex_tokstr (lexer))); return false; } lex_get (lexer); diff --git a/src/language/lexer/lexer.c b/src/language/lexer/lexer.c index bad35be8a1..9b879c71ec 100644 --- a/src/language/lexer/lexer.c +++ b/src/language/lexer/lexer.c @@ -1249,7 +1249,7 @@ dump_token (struct lexer *lexer) break; case T_STRING: - fprintf (stderr, "STRING\t\"%s\"\n", ds_cstr (&lexer->tokstr)); + fprintf (stderr, "STRING\t`%s'\n", ds_cstr (&lexer->tokstr)); break; case T_STOP: diff --git a/src/language/utilities/set.q b/src/language/utilities/set.q index 30f3c56e57..0bd7738591 100644 --- a/src/language/utilities/set.q +++ b/src/language/utilities/set.q @@ -618,13 +618,13 @@ show_cce (const struct dataset *ds UNUSED) static char * show_decimals (const struct dataset *ds UNUSED) { - return xasprintf ("\"%c\"", settings_get_decimal_char (FMT_F)); + return xasprintf ("`%c'", settings_get_decimal_char (FMT_F)); } static char * show_endcmd (const struct dataset *ds UNUSED) { - return xasprintf ("\"%c\"", settings_get_endcmd ()); + return xasprintf ("`%c'", settings_get_endcmd ()); } static char * diff --git a/src/libpspp/i18n.c b/src/libpspp/i18n.c index 02aefb5b51..1cc518ff3c 100644 --- a/src/libpspp/i18n.c +++ b/src/libpspp/i18n.c @@ -79,7 +79,7 @@ create_iconv (const char* tocode, const char* fromcode) const int err = errno; fprintf (stderr, "Warning: " - "cannot create a converter for \"%s\" to \"%s\": %s\n", + "cannot create a converter for `%s' to `%s': %s\n", fromcode, tocode, strerror (err)); } diff --git a/src/libpspp/model-checker.c b/src/libpspp/model-checker.c index 80198f82bc..940f89aa73 100644 --- a/src/libpspp/model-checker.c +++ b/src/libpspp/model-checker.c @@ -707,7 +707,7 @@ mc_parser_option_callback (int id, void *mc_options_) mc_options_set_strategy (options, MC_RANDOM); else error (1, 0, - "strategy must be \"broad\", \"deep\", or \"random\""); + "strategy must be `broad', `deep', or `random'"); break; case OPT_MAX_DEPTH: @@ -756,8 +756,8 @@ mc_parser_option_callback (int id, void *mc_options_) else if (!strcmp (optarg, "random")) mc_options_set_queue_limit_strategy (options, MC_DROP_RANDOM); else - error (1, 0, "--queue-drop argument must be \"newest\", " - "\"oldest\", or \"random\""); + error (1, 0, "--queue-drop argument must be `newest' " + "`oldest' or `random'"); break; case OPT_SEED: diff --git a/src/output/ascii.c b/src/output/ascii.c index 730a82444d..6afefefa0e 100644 --- a/src/output/ascii.c +++ b/src/output/ascii.c @@ -357,7 +357,7 @@ ascii_flush (struct output_driver *driver) ascii_close_page (a); if (fn_close (a->file_name, a->file) != 0) - error (0, errno, _("ascii: closing output file \"%s\""), + error (0, errno, _("ascii: closing output file `%s'"), a->file_name); a->file = NULL; } @@ -803,7 +803,7 @@ ascii_open_page (struct ascii_driver *a) } else { - error (0, errno, _("ascii: opening output file \"%s\""), + error (0, errno, _("ascii: opening output file `%s'"), a->file_name); a->error = true; return false; diff --git a/src/output/cairo.c b/src/output/cairo.c index d4f31aad6a..5a310c610c 100644 --- a/src/output/cairo.c +++ b/src/output/cairo.c @@ -190,7 +190,7 @@ parse_font (struct output_driver *d, struct string_map *options, desc = pango_font_description_from_string (string); if (desc == NULL) { - error (0, 0, _("\"%s\": bad font specification"), string); + error (0, 0, _("`%s': bad font specification"), string); /* Fall back to DEFAULT_VALUE, which had better be a valid font description. */ @@ -354,7 +354,7 @@ xr_create (const char *file_name, enum settings_output_devices device_type, status = cairo_surface_status (surface); if (status != CAIRO_STATUS_SUCCESS) { - error (0, 0, _("error opening output file \"%s\": %s"), + error (0, 0, _("error opening output file `%s': %s"), file_name, cairo_status_to_string (status)); cairo_surface_destroy (surface); goto error; @@ -1038,7 +1038,7 @@ xr_draw_png_chart (const struct chart_item *item, status = cairo_surface_write_to_png (surface, file_name); if (status != CAIRO_STATUS_SUCCESS) - error (0, 0, _("error writing output file \"%s\": %s"), + error (0, 0, _("error writing output file `%s': %s"), file_name, cairo_status_to_string (status)); cairo_destroy (cr); diff --git a/src/output/csv.c b/src/output/csv.c index 626dc2fa5a..c648bfa79c 100644 --- a/src/output/csv.c +++ b/src/output/csv.c @@ -84,7 +84,7 @@ csv_create (const char *file_name, enum settings_output_devices device_type, if (csv->file == NULL) { - error (0, errno, _("error opening output file \"%s\""), csv->file_name); + error (0, errno, _("error opening output file `%s'"), csv->file_name); output_driver_destroy (d); return NULL; } diff --git a/src/output/driver.c b/src/output/driver.c index 6d836354a1..136b4c4f27 100644 --- a/src/output/driver.c +++ b/src/output/driver.c @@ -327,8 +327,9 @@ output_driver_create (struct string_map *options) device_type = SETTINGS_DEVICE_LISTING; else { + /* TRANSLATORS: Don't translate the words `terminal' or `listing'. */ error (0, 0, _("%s is not a valid device type (the choices are " - "\"terminal\" and \"listing\")"), device_string); + "`terminal' and `listing')"), device_string); device_type = default_device_type (file_name); } @@ -340,7 +341,7 @@ output_driver_create (struct string_map *options) const char *key; STRING_MAP_FOR_EACH_KEY (key, node, options) - error (0, 0, _("%s: unknown option \"%s\""), file_name, key); + error (0, 0, _("%s: unknown option `%s'"), file_name, key); } string_map_clear (options); diff --git a/src/output/html.c b/src/output/html.c index 4fd23184ec..8b062134cd 100644 --- a/src/output/html.c +++ b/src/output/html.c @@ -103,7 +103,7 @@ html_create (const char *file_name, enum settings_output_devices device_type, html->file = fn_open (html->file_name, "w"); if (html->file == NULL) { - error (0, errno, _("error opening output file \"%s\""), html->file_name); + error (0, errno, _("error opening output file `%s'"), html->file_name); goto error; } @@ -112,7 +112,7 @@ html_create (const char *file_name, enum settings_output_devices device_type, fputs ("\n", html->file); fputs ("\n", html->file); print_title_tag (html->file, "TITLE", _("PSPP Output")); - fprintf (html->file, "\n", version); + fprintf (html->file, "\n", version); fputs ("\n", html->file); fputs ("chart_cnt++); if (file_name != NULL) { - fprintf (html->file, "", file_name); + fprintf (html->file, "", file_name); free (file_name); } } diff --git a/src/output/journal.c b/src/output/journal.c index 10da4d8485..66c1b77534 100644 --- a/src/output/journal.c +++ b/src/output/journal.c @@ -64,7 +64,7 @@ journal_close (void) if (journal != NULL && journal->file != NULL) { if (fwriteerror (journal->file)) - error (0, errno, _("error writing output file \"%s\""), + error (0, errno, _("error writing output file `%s'"), journal_file_name); journal->file = NULL; } @@ -90,7 +90,7 @@ journal_output (struct journal_driver *j, const char *s) j->file = fopen (journal_file_name, "a"); if (j->file == NULL) { - error (0, errno, _("error opening output file \"%s\""), + error (0, errno, _("error opening output file `%s'"), journal_file_name); output_driver_destroy (&j->driver); return; diff --git a/src/output/measure.c b/src/output/measure.c index 2064f45b13..8de7ed1d48 100644 --- a/src/output/measure.c +++ b/src/output/measure.c @@ -245,7 +245,7 @@ read_paper_conf (const char *file_name, int *h, int *v) file = fopen (file_name, "r"); if (file == NULL) { - error (0, errno, _("error opening input file \"%s\""), file_name); + error (0, errno, _("error opening input file `%s'"), file_name); return false; } @@ -256,7 +256,7 @@ read_paper_conf (const char *file_name, int *h, int *v) if (!ds_read_config_line (&line, &line_number, file)) { if (ferror (file)) - error (0, errno, _("error reading file \"%s\""), file_name); + error (0, errno, _("error reading file `%s'"), file_name); break; } @@ -273,7 +273,7 @@ read_paper_conf (const char *file_name, int *h, int *v) fclose (file); ds_destroy (&line); - error (0, 0, _("paper size file \"%s\" does not state a paper size"), + error (0, 0, _("paper size file `%s' does not state a paper size"), file_name); return false; } diff --git a/src/output/msglog.c b/src/output/msglog.c index 70c237c3db..4042b460e7 100644 --- a/src/output/msglog.c +++ b/src/output/msglog.c @@ -63,7 +63,7 @@ msglog_create (const char *file_name) file = fn_open (file_name, "w"); if (file == NULL) { - error (0, errno, _("error opening output file \"%s\""), file_name); + error (0, errno, _("error opening output file `%s'"), file_name); return NULL; } diff --git a/src/output/options.c b/src/output/options.c index 593adf5af0..11d38ea467 100644 --- a/src/output/options.c +++ b/src/output/options.c @@ -110,7 +110,7 @@ do_parse_boolean (const char *driver_name, const char *key, return false; else { - error (0, 0, _("%s: \"%s\" is \"%s\" but a Boolean value is required"), + error (0, 0, _("%s: `%s' is `%s' but a Boolean value is required"), driver_name, value, key); return -1; } @@ -185,7 +185,7 @@ parse_enum (struct driver_option *o, ...) ds_put_format (&choices, "`%s'", s); } - error (0, 0, _("%s: \"%s\" is \"%s\" but one of the following " + error (0, 0, _("%s: `%s' is `%s' but one of the following " "is required: %s"), o->driver_name, o->name, o->value, ds_cstr (&choices)); ds_destroy (&choices); @@ -229,22 +229,22 @@ parse_int (struct driver_option *o, int min_value, int max_value) else if (max_value == INT_MAX) { if (min_value == 0) - error (0, 0, _("%s: \"%s\" is \"%s\" but a nonnegative integer " + error (0, 0, _("%s: `%s' is `%s' but a nonnegative integer " "is required"), o->driver_name, o->name, o->value); else if (min_value == 1) - error (0, 0, _("%s: \"%s\" is \"%s\" but a positive integer is " + error (0, 0, _("%s: `%s' is `%s' but a positive integer is " "required"), o->driver_name, o->name, o->value); else if (min_value == INT_MIN) - error (0, 0, _("%s: \"%s\" is \"%s\" but an integer is required"), + error (0, 0, _("%s: `%s' is `%s' but an integer is required"), o->driver_name, o->name, o->value); else - error (0, 0, _("%s: \"%s\" is \"%s\" but an integer greater " + error (0, 0, _("%s: `%s' is `%s' but an integer greater " "than %d is required"), o->driver_name, o->name, o->value, min_value - 1); } else - error (0, 0, _("%s: \"%s\" is \"%s\" but an integer between %d and " + error (0, 0, _("%s: `%s' is `%s' but an integer between %d and " "%d is required"), o->driver_name, o->name, o->value, min_value, max_value); } @@ -323,8 +323,8 @@ parse_chart_file_name (struct driver_option *o) chart_file_name = xstrdup (o->value); else { - error (0, 0, _("%s: \"%s\" is \"%s\" but a file name that contains " - "\"#\" is required."), + error (0, 0, _("%s: `%s' is `%s' but a file name that contains " + "`#' is required."), o->name, o->value, o->driver_name); chart_file_name = default_chart_file_name (o->default_value); } diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index 0dfae65964..9a1172a4db 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -132,10 +132,10 @@ get_object_assert (GtkBuilder *builder, const gchar *name, GType type) o = gtk_builder_get_object (builder, name); if ( !o ) - g_critical ("Object \"%s\" could not be found\n", name); + g_critical ("Object `%s' could not be found\n", name); else if ( ! g_type_is_a (G_OBJECT_TYPE (o), type)) { - g_critical ("Object \"%s\" was expected to have type %s, but in fact has type %s", + g_critical ("Object `%s' was expected to have type %s, but in fact has type %s", name, g_type_name (type), G_OBJECT_TYPE_NAME (o)); } diff --git a/src/ui/gui/psppire-dict.c b/src/ui/gui/psppire-dict.c index 972ea13c56..d19fc809ed 100644 --- a/src/ui/gui/psppire-dict.c +++ b/src/ui/gui/psppire-dict.c @@ -867,7 +867,7 @@ psppire_dict_dump (const PsppireDict *dict) { const struct variable *v = psppire_dict_get_variable (dict, i); int di = var_get_dict_index (v); - g_print ("\"%s\" idx=%d, fv=%d\n", + g_print ("`%s' idx=%d, fv=%d\n", var_get_name(v), di, var_get_case_index(v)); diff --git a/src/ui/gui/psppire-syntax-window.c b/src/ui/gui/psppire-syntax-window.c index e99302a0e8..82370853f3 100644 --- a/src/ui/gui/psppire-syntax-window.c +++ b/src/ui/gui/psppire-syntax-window.c @@ -436,7 +436,7 @@ save_editor_to_file (PsppireSyntaxWindow *se, if ( result ) { char *fn = g_filename_display_name (filename); - gchar *msg = g_strdup_printf (_("Saved file \"%s\""), fn); + gchar *msg = g_strdup_printf (_("Saved file `%s'"), fn); g_free (fn); gtk_statusbar_push (GTK_STATUSBAR (se->sb), se->text_context, msg); gtk_text_buffer_set_modified (buffer, FALSE); diff --git a/src/ui/gui/psppire-var-store.c b/src/ui/gui/psppire-var-store.c index 1a2fc1fcee..ddfc802f57 100644 --- a/src/ui/gui/psppire-var-store.c +++ b/src/ui/gui/psppire-var-store.c @@ -279,7 +279,7 @@ static void psppire_var_store_init (PsppireVarStore *var_store) { if ( ! gdk_color_parse (DISABLED_COLOR, &var_store->disabled)) - g_critical ("Could not parse color \"%s\"", DISABLED_COLOR); + g_critical ("Could not parse color `%s'", DISABLED_COLOR); var_store->dictionary = NULL; var_store->format_type = PSPPIRE_VAR_STORE_OUTPUT_FORMATS; @@ -685,7 +685,7 @@ text_for_column (PsppireVarStore *vs, default: { char str[FMT_STRING_LEN_MAX + 1]; - g_warning ("Unknown format: \"%s\"\n", + g_warning ("Unknown format: `%s'\n", fmt_to_string (write_spec, str)); } break; @@ -752,7 +752,7 @@ text_for_column (PsppireVarStore *vs, { gchar *const vstr = value_to_text (vl->value, dict, *write_spec); - return g_strdup_printf ( "{%s,\"%s\"}_", vstr, val_lab_get_label (vl)); + return g_strdup_printf ( "{%s,`%s'}_", vstr, val_lab_get_label (vl)); } } } diff --git a/src/ui/gui/psppire-var-view.c b/src/ui/gui/psppire-var-view.c index f7a017b336..73bd9d8de2 100644 --- a/src/ui/gui/psppire-var-view.c +++ b/src/ui/gui/psppire-var-view.c @@ -297,7 +297,7 @@ psppire_var_view_get_variable (PsppireVarView *vv, gint column, GtkTreeIter *ite if ( G_VALUE_TYPE (&value) == PSPPIRE_VAR_PTR_TYPE) var = g_value_get_boxed (&value); else - g_critical ("Unsupported type \"%s\", in variable name treeview.", + g_critical ("Unsupported type `%s', in variable name treeview.", G_VALUE_TYPE_NAME (&value)); g_value_unset (&value); diff --git a/src/ui/gui/psppire-window.c b/src/ui/gui/psppire-window.c index 2ae6b02fd9..e03732fc36 100644 --- a/src/ui/gui/psppire-window.c +++ b/src/ui/gui/psppire-window.c @@ -466,7 +466,7 @@ psppire_window_query_save (PsppireWindow *se) GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, - _("Save the changes to \"%s\" before closing?"), + _("Save the changes to `%s' before closing?"), fn); g_free (fn); diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index 089208148d..61042efe54 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -268,7 +268,7 @@ load_data_file (const char *arg) utf8 = g_locale_to_utf8 (arg, -1, NULL, &written, &err); if ( NULL == utf8) { - g_warning ("Cannot convert filename from local encoding \"%s\" to UTF-8: %s", + g_warning ("Cannot convert filename from local encoding `%s' to UTF-8: %s", local_encoding, err->message); g_clear_error (&err); diff --git a/src/ui/gui/text-data-import-dialog.c b/src/ui/gui/text-data-import-dialog.c index 5add061365..3eda12f83a 100644 --- a/src/ui/gui/text-data-import-dialog.c +++ b/src/ui/gui/text-data-import-dialog.c @@ -458,7 +458,7 @@ init_file (struct import_assistant *ia, GtkWindow *parent_window) stream = fopen (file->file_name, "r"); if (stream == NULL) { - msg (ME, _("Could not open \"%s\": %s"), + msg (ME, _("Could not open `%s': %s"), file->file_name, strerror (errno)); return false; } @@ -474,10 +474,10 @@ init_file (struct import_assistant *ia, GtkWindow *parent_window) if (feof (stream)) break; else if (ferror (stream)) - msg (ME, _("Error reading \"%s\": %s"), + msg (ME, _("Error reading `%s': %s"), file->file_name, strerror (errno)); else - msg (ME, _("Failed to read \"%s\", because it contains a line " + msg (ME, _("Failed to read `%s', because it contains a line " "over %d bytes long and therefore appears not to be " "a text file."), file->file_name, MAX_LINE_LEN); @@ -491,7 +491,7 @@ init_file (struct import_assistant *ia, GtkWindow *parent_window) if (file->line_cnt == 0) { - msg (ME, _("\"%s\" is empty."), file->file_name); + msg (ME, _("`%s' is empty."), file->file_name); fclose (stream); destroy_file (ia); return false; @@ -1783,7 +1783,7 @@ parse_field (struct import_assistant *ia, { char fmt_string[FMT_STRING_LEN_MAX + 1]; fmt_to_string (in, fmt_string); - tooltip = xasprintf (_("Field content \"%.*s\" cannot be parsed in " + tooltip = xasprintf (_("Field content `%.*s' cannot be parsed in " "format %s."), (int) field.length, field.string, fmt_string); diff --git a/src/ui/gui/val-labs-dialog.c b/src/ui/gui/val-labs-dialog.c index 5f43ff498f..68d7070ca1 100644 --- a/src/ui/gui/val-labs-dialog.c +++ b/src/ui/gui/val-labs-dialog.c @@ -508,7 +508,7 @@ repopulate_dialog (struct val_labs_dialog *dialog) value_to_text (vl->value, dialog->dict, *var_get_write_format (dialog->pv)); - gchar *const text = g_strdup_printf ("%s = \"%s\"", + gchar *const text = g_strdup_printf ("%s = `%s'", vstr, val_lab_get_label (vl)); gtk_list_store_append (list_store, &iter); diff --git a/src/ui/source-init-opts.c b/src/ui/source-init-opts.c index c91a9fef1a..a984b3d099 100644 --- a/src/ui/source-init-opts.c +++ b/src/ui/source-init-opts.c @@ -74,8 +74,10 @@ source_init_option_callback (int id, void *ss_) else if (!strcmp (optarg, "enhanced")) settings_set_algorithm (ENHANCED); else + /* TRANSLATORS: Leave the words `compatible' and `enhanced' in their + original English. */ error (1, 0, - _("Algorithm must be either \"compatible\" or \"enhanced\".")); + _("Algorithm must be either `compatible' or `enhanced'.")); break; case OPT_INCLUDE: @@ -99,8 +101,10 @@ source_init_option_callback (int id, void *ss_) else if (!strcmp (optarg, "enhanced")) settings_set_syntax (ENHANCED); else + /* TRANSLATORS: Leave the words `compatible' and `enhanced' in their + original English. */ error (1, 0, - _("Syntax must be either \"compatible\" or \"enhanced\".")); + _("Syntax must be either `compatible' or `enhanced'.")); break; default: diff --git a/tests/command/get-data-gnm.sh b/tests/command/get-data-gnm.sh index 9927364db6..08cad6a3b8 100755 --- a/tests/command/get-data-gnm.sh +++ b/tests/command/get-data-gnm.sh @@ -202,9 +202,9 @@ if [ $? -ne 0 ] ; then fail ; fi activity="compare output 2" diff -c $TEMPDIR/pspp.csv - <2) + 1], [1.00]], [[$true + $false], [1.00]]) @@ -53,19 +53,19 @@ CHECK_EXPR_EVAL([addition and subtraction], [[$sysmis + 1], [sysmis]], [[7676 + $sysmis], [sysmis]], [[('foo') + 5], [error], - [error: DEBUG EVALUATE: Type mismatch while applying addition ("+") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying addition (`+') operator: cannot convert string to number.]], dnl Arithmetic concatenation requires CONCAT: [[('foo') + ('bar')], [error], - [error: DEBUG EVALUATE: Type mismatch while applying addition ("+") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying addition (`+') operator: cannot convert string to number.]], dnl Lexical concatenation succeeds: [['foo' + 'bar'], ["foobar"]], [[1 +3 - 2 +4 -5], [1.00]], [[1 - $true], [0.00]], [[$true - 4/3], [-0.33]], [['string' - 1e10], [error], - [error: DEBUG EVALUATE: Type mismatch while applying subtraction ("-") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying subtraction (`-') operator: cannot convert string to number.]], [[9.5 - ''], [error], - [error: DEBUG EVALUATE: Type mismatch while applying subtraction ("-") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying subtraction (`-') operator: cannot convert string to number.]], [[1 - 2], [-1.00]], [[52 -23], [29.00]]) @@ -85,7 +85,7 @@ CHECK_EXPR_EVAL([exponentiation], [[2**8], [256.00]], [[(2**3)**4], [4096.00]], [[2**3**4], [4096.00], - [warning: DEBUG EVALUATE: The exponentiation operator ("**") is left-associative, even though right-associative semantics are more useful. That is, "a**b**c" equals "(a**b)**c", not as "a**(b**c)". To disable this warning, insert parentheses.]]) + [warning: DEBUG EVALUATE: The exponentiation operator (`**') is left-associative, even though right-associative semantics are more useful. That is, `a**b**c' equals `(a**b)**c', not as `a**(b**c)'. To disable this warning, insert parentheses.]]) CHECK_EXPR_EVAL([unary minus], [[2+-3], [-1.00]], @@ -141,14 +141,14 @@ CHECK_EXPR_EVAL([NOT truth table], [[not $false], [true]], [[not 0], [true]], [[not 2.5], [true], - [error: DEBUG EVALUATE: An operand of the logical negation ("NOT") operator was found to have a value other than 0 (false), 1 (true), or the system-missing value. The result was forced to 0.]], + [error: DEBUG EVALUATE: An operand of the logical negation (`NOT') operator was found to have a value other than 0 (false), 1 (true), or the system-missing value. The result was forced to 0.]], [[not $true], [false]], [[not 1], [false]], [[not $sysmis], [sysmis]], [[~ $false], [true]], [[~ 0], [true]], [[~ 2.5], [true], - [error: DEBUG EVALUATE: An operand of the logical negation ("NOT") operator was found to have a value other than 0 (false), 1 (true), or the system-missing value. The result was forced to 0.]], + [error: DEBUG EVALUATE: An operand of the logical negation (`NOT') operator was found to have a value other than 0 (false), 1 (true), or the system-missing value. The result was forced to 0.]], [[~ $true], [false]], [[~ 1], [false]], [[~ $sysmis], [sysmis]]) @@ -159,13 +159,13 @@ CHECK_EXPR_EVAL([= <= <], [[1 eq 2], [false]], [[2 = 3], [false]], [[1 eq 'foobar'], [error], - [error: DEBUG EVALUATE: Type mismatch while applying numeric equality ("EQ") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying numeric equality (`EQ') operator: cannot convert string to number.]], [[5 eq 'foobar'], [error], - [error: DEBUG EVALUATE: Type mismatch while applying numeric equality ("EQ") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying numeric equality (`EQ') operator: cannot convert string to number.]], [['baz' = 10], [error], - [error: DEBUG EVALUATE: Type mismatch while applying string equality ("=") operator: cannot convert number to string.]], + [error: DEBUG EVALUATE: Type mismatch while applying string equality (`=') operator: cannot convert number to string.]], [['quux' = 5.55], [error], - [error: DEBUG EVALUATE: Type mismatch while applying string equality ("=") operator: cannot convert number to string.]], + [error: DEBUG EVALUATE: Type mismatch while applying string equality (`=') operator: cannot convert number to string.]], [['foobar' = 'foobar'], [true]], [['quux' = 'bar'], [false]], [['bar ' = 'bar'], [true]], @@ -174,12 +174,12 @@ CHECK_EXPR_EVAL([= <= <], dnl Check precedence: [[1 + 2 = 3], [true]], [[1 >= 2 = 2 ge 3], [false], - [warning: DEBUG EVALUATE: Chaining relational operators (e.g. "a < b < c") will not produce the mathematically expected result. Use the AND logical operator to fix the problem (e.g. "a < b AND b < c"). If chaining is really intended, parentheses will disable this warning (e.g. "(a < b) < c".)]], + [warning: DEBUG EVALUATE: Chaining relational operators (e.g. `a < b < c') will not produce the mathematically expected result. Use the AND logical operator to fix the problem (e.g. `a < b AND b < c'). If chaining is really intended, parentheses will disable this warning (e.g. `(a < b) < c'.)]], dnl Mathematically true: [[3 ne 2 ~= 1], [false], - [warning: DEBUG EVALUATE: Chaining relational operators (e.g. "a < b < c") will not produce the mathematically expected result. Use the AND logical operator to fix the problem (e.g. "a < b AND b < c"). If chaining is really intended, parentheses will disable this warning (e.g. "(a < b) < c".)]], + [warning: DEBUG EVALUATE: Chaining relational operators (e.g. `a < b < c') will not produce the mathematically expected result. Use the AND logical operator to fix the problem (e.g. `a < b AND b < c'). If chaining is really intended, parentheses will disable this warning (e.g. `(a < b) < c'.)]], [[3 > 2 > 1], [false], - [warning: DEBUG EVALUATE: Chaining relational operators (e.g. "a < b < c") will not produce the mathematically expected result. Use the AND logical operator to fix the problem (e.g. "a < b AND b < c"). If chaining is really intended, parentheses will disable this warning (e.g. "(a < b) < c".)]], + [warning: DEBUG EVALUATE: Chaining relational operators (e.g. `a < b < c') will not produce the mathematically expected result. Use the AND logical operator to fix the problem (e.g. `a < b AND b < c'). If chaining is really intended, parentheses will disable this warning (e.g. `(a < b) < c'.)]], [[1 <= 2], [true]], [[2.5 <= 1.5], [false]], @@ -190,13 +190,13 @@ dnl Make sure <= token can't be split: [[2 < = 2], [error], [error: DEBUG EVALUATE: Syntax error in expression at `='.]], [[1 <= 'foobar'], [error], - [error: DEBUG EVALUATE: Type mismatch while applying numeric less-than-or-equal-to ("<=") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying numeric less-than-or-equal-to (`<=') operator: cannot convert string to number.]], [[5 <= 'foobar'], [error], - [error: DEBUG EVALUATE: Type mismatch while applying numeric less-than-or-equal-to ("<=") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying numeric less-than-or-equal-to (`<=') operator: cannot convert string to number.]], [['baz' <= 10], [error], - [error: DEBUG EVALUATE: Type mismatch while applying string less-than-or-equal-to ("<=") operator: cannot convert number to string.]], + [error: DEBUG EVALUATE: Type mismatch while applying string less-than-or-equal-to (`<=') operator: cannot convert number to string.]], [['quux' <= 5.55], [error], - [error: DEBUG EVALUATE: Type mismatch while applying string less-than-or-equal-to ("<=") operator: cannot convert number to string.]], + [error: DEBUG EVALUATE: Type mismatch while applying string less-than-or-equal-to (`<=') operator: cannot convert number to string.]], [['0123' <= '0123'], [true]], [['0123' <= '0124'], [true]], [['0124' le '0123'], [false]], @@ -208,13 +208,13 @@ dnl Make sure <= token can't be split: [[3.5 lt 4], [true]], [[4 lt 3.5], [false]], [[1 lt 'foobar'], [error], - [error: DEBUG EVALUATE: Type mismatch while applying numeric less than ("<") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying numeric less than (`<') operator: cannot convert string to number.]], [[5 lt 'foobar'], [error], - [error: DEBUG EVALUATE: Type mismatch while applying numeric less than ("<") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying numeric less than (`<') operator: cannot convert string to number.]], [['baz' < 10], [error], - [error: DEBUG EVALUATE: Type mismatch while applying string less than ("<") operator: cannot convert number to string.]], + [error: DEBUG EVALUATE: Type mismatch while applying string less than (`<') operator: cannot convert number to string.]], [['quux' < 5.55], [error], - [error: DEBUG EVALUATE: Type mismatch while applying string less than ("<") operator: cannot convert number to string.]], + [error: DEBUG EVALUATE: Type mismatch while applying string less than (`<') operator: cannot convert number to string.]], [['0123' lt '0123'], [false]], [['0123' < '0124'], [true]], [['0124' lt '0123'], [false]], @@ -231,13 +231,13 @@ dnl Make sure >= token can't be split: [[2 > = 2], [error], [error: DEBUG EVALUATE: Syntax error in expression at `='.]], [[1 >= 'foobar'], [error], - [error: DEBUG EVALUATE: Type mismatch while applying numeric greater-than-or-equal-to (">=") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying numeric greater-than-or-equal-to (`>=') operator: cannot convert string to number.]], [[5 ge 'foobar'], [error], - [error: DEBUG EVALUATE: Type mismatch while applying numeric greater-than-or-equal-to (">=") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying numeric greater-than-or-equal-to (`>=') operator: cannot convert string to number.]], [['baz' ge 10], [error], - [error: DEBUG EVALUATE: Type mismatch while applying string greater-than-or-equal-to (">=") operator: cannot convert number to string.]], + [error: DEBUG EVALUATE: Type mismatch while applying string greater-than-or-equal-to (`>=') operator: cannot convert number to string.]], [['quux' >= 5.55], [error], - [error: DEBUG EVALUATE: Type mismatch while applying string greater-than-or-equal-to (">=") operator: cannot convert number to string.]], + [error: DEBUG EVALUATE: Type mismatch while applying string greater-than-or-equal-to (`>=') operator: cannot convert number to string.]], [['0123' ge '0123'], [true]], [['0123' >= '0124'], [false]], [['0124' >= '0123'], [true]], @@ -249,13 +249,13 @@ dnl Make sure >= token can't be split: [[3.5 gt 4], [false]], [[4 gt 3.5], [true]], [[1 gt 'foobar'], [error], - [error: DEBUG EVALUATE: Type mismatch while applying numeric greater than (">") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying numeric greater than (`>') operator: cannot convert string to number.]], [[5 gt 'foobar'], [error], - [error: DEBUG EVALUATE: Type mismatch while applying numeric greater than (">") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying numeric greater than (`>') operator: cannot convert string to number.]], [['baz' > 10], [error], - [error: DEBUG EVALUATE: Type mismatch while applying string greater than (">") operator: cannot convert number to string.]], + [error: DEBUG EVALUATE: Type mismatch while applying string greater than (`>') operator: cannot convert number to string.]], [['quux' > 5.55], [error], - [error: DEBUG EVALUATE: Type mismatch while applying string greater than (">") operator: cannot convert number to string.]], + [error: DEBUG EVALUATE: Type mismatch while applying string greater than (`>') operator: cannot convert number to string.]], [['0123' gt '0123'], [false]], [['0123' > '0124'], [false]], [['0124' gt '0123'], [true]], @@ -267,13 +267,13 @@ dnl Make sure >= token can't be split: [[1 <> 2], [true]], [[2 ne 3], [true]], [[1 ~= 'foobar'], [error], - [error: DEBUG EVALUATE: Type mismatch while applying numeric inequality ("<>") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying numeric inequality (`<>') operator: cannot convert string to number.]], [[5 <> 'foobar'], [error], - [error: DEBUG EVALUATE: Type mismatch while applying numeric inequality ("<>") operator: cannot convert string to number.]], + [error: DEBUG EVALUATE: Type mismatch while applying numeric inequality (`<>') operator: cannot convert string to number.]], [['baz' ne 10], [error], - [error: DEBUG EVALUATE: Type mismatch while applying string inequality ("<>") operator: cannot convert number to string.]], + [error: DEBUG EVALUATE: Type mismatch while applying string inequality (`<>') operator: cannot convert number to string.]], [['quux' ~= 5.55], [error], - [error: DEBUG EVALUATE: Type mismatch while applying string inequality ("<>") operator: cannot convert number to string.]], + [error: DEBUG EVALUATE: Type mismatch while applying string inequality (`<>') operator: cannot convert number to string.]], [['foobar' <> 'foobar'], [false]], [['quux' ne 'bar'], [true]], [['bar ' <> 'bar'], [false]], diff --git a/tests/perl-module.at b/tests/perl-module.at index 2be037066c..115f2a8d20 100644 --- a/tests/perl-module.at +++ b/tests/perl-module.at @@ -620,7 +620,7 @@ AT_DATA([test.pl], print $PSPP::errstr, "\n"; ]]) AT_CHECK([RUN_PERL_MODULE test.pl], [0], - [[Error opening "no-such-file.sav" for reading as a system file: No such file or directory. + [[Error opening `no-such-file.sav' for reading as a system file: No such file or directory. ]], [[Name "PSPP::errstr" used only once: possible typo at test.pl line 8. ]]) -- 2.30.2