sys-file-reader: Add PSPP version to messages that ask for files.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 2 Aug 2015 19:26:39 +0000 (12:26 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 2 Aug 2015 19:26:39 +0000 (12:26 -0700)
This may make it easier to advise users.

Suggested by Harry Thijssen <pspp4windows@gmail.com>.

src/data/sys-file-reader.c
tests/atlocal.in
tests/data/sys-file-reader.at
tests/ui/terminal/main.at

index 7cd658ba818493a3c6ac58f7c5f1a561f73747df..8718a5f940ba9d96acca418c4b2fbbeb787a9048 100644 (file)
@@ -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);
index b30709d2f76f0672bc0940e65187e46f87b055ec..29886a0cd22508023c75f272951961e945241787 100644 (file)
@@ -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
index 019d873081b898e2cc42fb28db338e07030e79a6..70cd84ea126ab3107a840608f14055634d910c34 100644 (file)
@@ -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
index 2f682e8d2d6b4ed245096da4e8d651914bbc5571..128ad4182de1f199ce6beca5fea95d6cc8f2e7a8 100644 (file)
@@ -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 <<EOF
 ******************************************************
 You have discovered a bug in PSPP.  Please report this
-to bug-gnu-pspp@gnu.org.  Please include this entire
+to $PACKAGE_BUGREPORT.  Please include this entire
 message, *plus* several lines of output just above it.
 For the best chance at having the bug fixed, also
 include the syntax file that triggered it and a sample
 of any data file used for input.
 proximate cause:     Segmentation Violation
-])
+EOF
+
 AT_CHECK([sed '/proximate/q' < stderr], [0], [expout])
 AT_CLEANUP