From 26f3ffbb107db482e1f1f83dbea913462c56ba81 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 2 Aug 2015 12:26:39 -0700 Subject: [PATCH] sys-file-reader: Add PSPP version to messages that ask for files. This may make it easier to advise users. Suggested by Harry Thijssen . --- src/data/sys-file-reader.c | 22 +++++++++++----------- tests/atlocal.in | 2 ++ tests/data/sys-file-reader.at | 4 ++-- tests/ui/terminal/main.at | 8 +++++--- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/data/sys-file-reader.c b/src/data/sys-file-reader.c index 7cd658ba81..8718a5f940 100644 --- a/src/data/sys-file-reader.c +++ b/src/data/sys-file-reader.c @@ -507,21 +507,21 @@ read_record (struct sfm_reader *r, int type, || subtype >= sizeof r->extensions / sizeof *r->extensions) { sys_warn (r, r->pos, - _("Unrecognized record type 7, subtype %d. Please " - "send a copy of this file, and the syntax which " - "created it to %s."), - subtype, PACKAGE_BUGREPORT); + _("Unrecognized record type 7, subtype %d. For help, " + "please send this file to %s and mention that you were " + "using %s."), + subtype, PACKAGE_BUGREPORT, PACKAGE_STRING); return skip_extension_record (r, subtype); } else if (r->extensions[subtype] != NULL) { sys_warn (r, r->pos, _("Record type 7, subtype %d found here has the same " - "type as the record found near offset 0x%llx. " - "Please send a copy of this file, and the syntax " - "which created it to %s."), + "type as the record found near offset 0x%llx. For " + "help, please send this file to %s and mention that " + "you were using %s."), subtype, (long long int) r->extensions[subtype]->pos, - PACKAGE_BUGREPORT); + PACKAGE_BUGREPORT, PACKAGE_STRING); return skip_extension_record (r, subtype); } else @@ -1346,9 +1346,9 @@ read_extension_record (struct sfm_reader *r, int subtype, } sys_warn (r, record->pos, - _("Unrecognized record type 7, subtype %d. Please send a " - "copy of this file, and the syntax which created it to %s."), - subtype, PACKAGE_BUGREPORT); + _("Unrecognized record type 7, subtype %d. For help, please " + "send this file to %s and mention that you were using %s."), + subtype, PACKAGE_BUGREPORT, PACKAGE_STRING); skip: return skip_bytes (r, n_bytes); diff --git a/tests/atlocal.in b/tests/atlocal.in index b30709d2f7..29886a0cd2 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -7,6 +7,8 @@ ODF_READ_SUPPORT='@ODF_READ_SUPPORT@' PERL='@PERL@' WITH_PERL_MODULE='@WITH_PERL_MODULE@' host='@host@' +PACKAGE_STRING='@PACKAGE_STRING@' +PACKAGE_BUGREPORT='@PACKAGE_BUGREPORT@' PSQL_SUPPORT='@PSQL_SUPPORT@' if test "$PSQL_SUPPORT" = yes; then diff --git a/tests/data/sys-file-reader.at b/tests/data/sys-file-reader.at index 019d873081..70cd84ea12 100644 --- a/tests/data/sys-file-reader.at +++ b/tests/data/sys-file-reader.at @@ -2262,8 +2262,8 @@ for variant in be le; do AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) - AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl -"warning: `sys-file.sav' near offset 0xd8: Unrecognized record type 7, subtype 30. Please send a copy of this file, and the syntax which created it to bug-gnu-pspp@gnu.org." + AT_CHECK_UNQUOTED([pspp -O format=csv sys-file.sps], [0], [dnl +"warning: \`sys-file.sav' near offset 0xd8: Unrecognized record type 7, subtype 30. For help, please send this file to ${PACKAGE_BUGREPORT} and mention that you were using ${PACKAGE_STRING}." ]) done AT_CLEANUP diff --git a/tests/ui/terminal/main.at b/tests/ui/terminal/main.at index 2f682e8d2d..128ad4182d 100644 --- a/tests/ui/terminal/main.at +++ b/tests/ui/terminal/main.at @@ -24,16 +24,18 @@ AT_CLEANUP AT_SETUP([SIGSEGV yields error report]) AT_CHECK([[echo 'host command=["kill -SEGV $PPID"].' | pspp -O format=csv]], [139], [], [stderr]) -AT_DATA([expout], [dnl + +cat > expout <