Correct error message from previous commit. 20130427010504/pspp
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 27 Apr 2013 05:38:54 +0000 (07:38 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 27 Apr 2013 05:38:54 +0000 (07:38 +0200)
Commit 49b3e593c078b40d7c72379b4f8622a1ea8d7ea1 produced a misleading
and non-sensical error message.  This change fixes that.

src/language/xforms/recode.c
tests/language/xforms/recode.at

index 2849ea32d1510eb74f518506728edf65484bd401..1aebe344696a066635c0f5dd2cd72e0f6bdf21a1 100644 (file)
@@ -563,7 +563,7 @@ enlarge_dst_widths (struct recode_trns *trns)
            {
              msg (ME, 
                   _("Cannot recode because the variable %s would require a width of %d bytes or greater, but it has a width of only %d bytes."),
-                  var_get_name (narrow_var), out->width, trns->max_dst_width);
+                  var_get_name (narrow_var), out->width, min_dst_width);
              return false;
            }
            
index ae434c657a8be0c18667e21ac6911f7bf6053492..cf5036d49d6559d8cb12775ccbcade6743b7a1e0 100644 (file)
@@ -300,7 +300,7 @@ AT_CLEANUP
 AT_SETUP([RECODE increased string widths])
 
 AT_DATA([recode.sps],[dnl
-data list list /x (a1) y (a8) z *.
+data list notable list /x (a1) y (a8) z *.
 begin data.
 a a         2
 a two       2
@@ -314,13 +314,7 @@ list.
 ])
 
 AT_CHECK([pspp -O format=csv recode.sps], [1], [dnl
-Table: Reading free-form data from INLINE.
-Variable,Format
-x,A1
-y,A8
-z,F8.0
-
-"error: Cannot recode in place, because the variable x would require a width of 5 bytes or greater, but it has a width of only 8 bytes."
+"error: Cannot recode because the variable x would require a width of 5 bytes or greater, but it has a width of only 1 bytes."
 
 Table: Data List
 x,y,z