Fixed a bug which crashed PSPP if VALUE LABELS had a trailing slash.
msgstr ""
"Project-Id-Version: PSPP 0.3.1\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2005-01-01 18:55+0800\n"
+"POT-Creation-Date: 2005-01-05 08:20+0800\n"
"PO-Revision-Date: 2004-01-23 13:04+0800\n"
"Last-Translator: John Darrington <john@darrington.wattle.id.au>\n"
"Language-Team: John Darrington <john@darrington.wattle.id.au>\n"
msgid "expecting %s"
msgstr ""
-#: src/lexer.c:556 src/val-labs.c:151
+#: src/lexer.c:556 src/val-labs.c:154
msgid "expecting string"
msgstr ""
-#: src/lexer.c:570 src/val-labs.c:160
+#: src/lexer.c:570 src/val-labs.c:163
msgid "expecting integer"
msgstr ""
msgid "Error opening page on %s device of %s class."
msgstr ""
-#: src/percentiles.c:38
-msgid "HAverage"
-msgstr ""
-
-#: src/percentiles.c:39
-msgid "Weighted Average"
-msgstr ""
-
-#: src/percentiles.c:40
-msgid "Rounded"
-msgstr ""
-
-#: src/percentiles.c:41
-msgid "Empirical"
-msgstr ""
-
-#: src/percentiles.c:42
-msgid "Empirical with averaging"
-msgstr ""
-
#: src/permissions.c:75
#, c-format
msgid "Expecting %s or %s."
msgid "position %d: character `\\%03o' is not valid in a variable name."
msgstr ""
-#: src/pfm-read.c:748
+#: src/pfm-read.c:746
#, c-format
msgid "Duplicate variable name %s."
msgstr ""
-#: src/pfm-read.c:792
+#: src/pfm-read.c:790
#, c-format
msgid "Bad missing values for %s."
msgstr ""
-#: src/pfm-read.c:815
+#: src/pfm-read.c:813
#, c-format
msgid "Weighting variable %s not present in dictionary."
msgstr ""
-#: src/pfm-read.c:886
+#: src/pfm-read.c:884
#, c-format
msgid "Unknown variable %s while parsing value labels."
msgstr ""
-#: src/pfm-read.c:889
+#: src/pfm-read.c:887
#, c-format
msgid ""
"Cannot assign value labels to %s and %s, which have different variable types "
"or widths."
msgstr ""
-#: src/pfm-read.c:922
+#: src/pfm-read.c:920
#, c-format
msgid "Duplicate label for value %g for variable %s."
msgstr ""
-#: src/pfm-read.c:925
+#: src/pfm-read.c:923
#, c-format
msgid "Duplicate label for value `%.*s' for variable %s."
msgstr ""
-#: src/pfm-read.c:978
+#: src/pfm-read.c:976
msgid "End of file midway through case."
msgstr ""
msgid "Document entered %s %02d:%02d:%02d by %s (%s):"
msgstr ""
-#: src/val-labs.c:115
+#: src/val-labs.c:118
#, c-format
msgid ""
"It is not possible to assign value labels to long string variables such as %"
"s."
msgstr ""
-#: src/val-labs.c:164
+#: src/val-labs.c:167
#, c-format
msgid "Value label `%g' is not integer."
msgstr ""
-#: src/val-labs.c:174
+#: src/val-labs.c:177
msgid "Truncating value label to 60 characters."
msgstr ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2005-01-01 18:55+0800\n"
+"POT-Creation-Date: 2005-01-05 08:20+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "expecting %s"
msgstr ""
-#: src/lexer.c:556 src/val-labs.c:151
+#: src/lexer.c:556 src/val-labs.c:154
msgid "expecting string"
msgstr ""
-#: src/lexer.c:570 src/val-labs.c:160
+#: src/lexer.c:570 src/val-labs.c:163
msgid "expecting integer"
msgstr ""
msgid "Error opening page on %s device of %s class."
msgstr ""
-#: src/percentiles.c:38
-msgid "HAverage"
-msgstr ""
-
-#: src/percentiles.c:39
-msgid "Weighted Average"
-msgstr ""
-
-#: src/percentiles.c:40
-msgid "Rounded"
-msgstr ""
-
-#: src/percentiles.c:41
-msgid "Empirical"
-msgstr ""
-
-#: src/percentiles.c:42
-msgid "Empirical with averaging"
-msgstr ""
-
#: src/permissions.c:75
#, c-format
msgid "Expecting %s or %s."
msgid "position %d: character `\\%03o' is not valid in a variable name."
msgstr ""
-#: src/pfm-read.c:748
+#: src/pfm-read.c:746
#, c-format
msgid "Duplicate variable name %s."
msgstr ""
-#: src/pfm-read.c:792
+#: src/pfm-read.c:790
#, c-format
msgid "Bad missing values for %s."
msgstr ""
-#: src/pfm-read.c:815
+#: src/pfm-read.c:813
#, c-format
msgid "Weighting variable %s not present in dictionary."
msgstr ""
-#: src/pfm-read.c:886
+#: src/pfm-read.c:884
#, c-format
msgid "Unknown variable %s while parsing value labels."
msgstr ""
-#: src/pfm-read.c:889
+#: src/pfm-read.c:887
#, c-format
msgid ""
"Cannot assign value labels to %s and %s, which have different variable types "
"or widths."
msgstr ""
-#: src/pfm-read.c:922
+#: src/pfm-read.c:920
#, c-format
msgid "Duplicate label for value %g for variable %s."
msgstr ""
-#: src/pfm-read.c:925
+#: src/pfm-read.c:923
#, c-format
msgid "Duplicate label for value `%.*s' for variable %s."
msgstr ""
-#: src/pfm-read.c:978
+#: src/pfm-read.c:976
msgid "End of file midway through case."
msgstr ""
msgid "Document entered %s %02d:%02d:%02d by %s (%s):"
msgstr ""
-#: src/val-labs.c:115
+#: src/val-labs.c:118
#, c-format
msgid ""
"It is not possible to assign value labels to long string variables such as %"
"s."
msgstr ""
-#: src/val-labs.c:164
+#: src/val-labs.c:167
#, c-format
msgid "Value label `%g' is not integer."
msgstr ""
-#: src/val-labs.c:174
+#: src/val-labs.c:177
msgid "Truncating value label to 60 characters."
msgstr ""
+Wed Jan 5 08:30:48 WST 2005 John Darrington <john@darrington.wattle.id.au>
+
+ * val-labs.c Fixed bug which caused a crash if VALUE LABELS had
+ a trailing slash.
+
Mon Jan 3 17:44:37 2005 Ben Pfaff <blp@gnu.org>
* pfm-read.c: (read_variables) Remove direct manipulation of
goto lossage;
if (token != '/')
+ {
+ free (vars);
break;
+ }
+
lex_get ();
free (vars);
}
- free (vars);
if (token != '.')
{
bugs/t-test-alpha2.sh \
bugs/temporary.sh \
bugs/val-labs.sh \
+ bugs/val-labs-trailing-slash.sh \
bugs/recode-copy-bug.sh \
bugs/computebug.sh \
xforms/casefile.sh \
--- /dev/null
+#!/bin/sh
+
+# This program tests for a bug in the VALUE LABELS command
+# which caused a crash if it had a trailing /
+
+TEMPDIR=/tmp/pspp-tst-$$
+
+here=`pwd`;
+
+# ensure that top_srcdir is absolute
+cd $top_srcdir; top_srcdir=`pwd`
+
+export STAT_CONFIG_PATH=$top_srcdir/config
+
+
+cleanup()
+{
+ rm -rf $TEMPDIR
+}
+
+
+fail()
+{
+ echo $activity
+ echo FAILED
+ cleanup;
+ exit 1;
+}
+
+
+no_result()
+{
+ echo $activity
+ echo NO RESULT;
+ cleanup;
+ exit 2;
+}
+
+pass()
+{
+ cleanup;
+ exit 0;
+}
+
+mkdir -p $TEMPDIR
+
+cd $TEMPDIR
+
+activity="create program"
+cat > $TEMPDIR/out.stat <<EOF
+DATA LIST LIST /X * .
+BEGIN DATA.
+1
+2
+3
+4
+END DATA.
+
+
+VALUE LABELS X 1 'one' 2 'two' 3 'three'/
+
+
+LIST VARIABLES=X.
+EOF
+if [ $? -ne 0 ] ; then no_result ; fi
+
+
+activity="run program"
+$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/out.stat
+if [ $? -ne 0 ] ; then fail ; fi
+
+pass
--- /dev/null
+#!/bin/sh
+
+# This program tests the IMPORT and EXPORT commands
+
+TEMPDIR=/tmp/pspp-tst-$$
+
+here=`pwd`;
+
+# ensure that top_srcdir is absolute
+cd $top_srcdir; top_srcdir=`pwd`
+
+export STAT_CONFIG_PATH=$top_srcdir/config
+
+
+cleanup()
+{
+ rm -rf $TEMPDIR
+}
+
+
+fail()
+{
+ echo $activity
+ echo FAILED
+ cleanup;
+ exit 1;
+}
+
+
+no_result()
+{
+ echo $activity
+ echo NO RESULT;
+ cleanup;
+ exit 2;
+}
+
+pass()
+{
+ cleanup;
+ exit 0;
+}
+
+mkdir -p $TEMPDIR
+
+cd $TEMPDIR
+
+activity="create program"
+cat > $TEMPDIR/prog.stat <<EOF
+DATA LIST LIST /x * y *.
+BEGIN DATA.
+1 2
+3 4
+5 6
+END DATA.
+
+EXPORT /OUTFILE='wiz.por'.
+
+LIST.
+
+IMPORT /FILE='wiz.por'.
+
+LIST.
+EOF
+if [ $? -ne 0 ] ; then no_result ; fi
+
+
+activity="run program"
+$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TEMPDIR/prog.stat
+if [ $? -ne 0 ] ; then no_result ; fi
+
+activity="compare output"
+diff $TEMPDIR/pspp.list - << EOF
+1.1 DATA LIST. Reading free-form data from the command file.
++--------+------+
+|Variable|Format|
+#========#======#
+|X |F8.0 |
+|Y |F8.0 |
++--------+------+
+
+ X Y
+-------- --------
+ 1.00 2.00
+ 3.00 4.00
+ 5.00 6.00
+
+ X Y
+-------- --------
+ 1.00 2.00
+ 3.00 4.00
+ 5.00 6.00
+
+EOF
+if [ $? -ne 0 ] ; then fail ; fi
+
+pass;