? datalist.sps
? diffs
? factory.patch
? file.sps
? grob.sav
? rank.sps
? doc/.dirstamp
? lib/gsl-extras/.deps
? lib/gsl-extras/.dirstamp
? lib/gtksheet/.deps
? lib/gtksheet/.dirstamp
? lib/linreg/.deps
? lib/linreg/.dirstamp
? po/remove-potcdate.sed
? src/.dirstamp
? src/data/.deps
? src/data/.dirstamp
? src/data/casefile-factory.h
? src/data/factory.patch
? src/language/.deps
? src/language/.dirstamp
? src/language/control/.deps
? src/language/control/.dirstamp
? src/language/data-io/.deps
? src/language/data-io/.dirstamp
? src/language/data-io/file-handle.c
? src/language/data-io/list.c
? src/language/dictionary/.deps
? src/language/dictionary/.dirstamp
? src/language/expressions/.deps
? src/language/expressions/.dirstamp
? src/language/lexer/.deps
? src/language/lexer/.dirstamp
? src/language/lexer/q2c
? src/language/stats/.deps
? src/language/stats/.dirstamp
? src/language/stats/correlations.c
? src/language/stats/crosstabs.c
? src/language/stats/examine.c
? src/language/stats/frequencies.c
? src/language/stats/means.c
? src/language/stats/npar.c
? src/language/stats/oneway.c
? src/language/stats/rank.c
? src/language/stats/regression.c
? src/language/stats/t-test.c
? src/language/tests/.deps
? src/language/tests/.dirstamp
? src/language/utilities/.deps
? src/language/utilities/.dirstamp
? src/language/utilities/set.c
? src/language/xforms/.deps
? src/language/xforms/.dirstamp
? src/libpspp/.deps
? src/libpspp/.dirstamp
? src/libpspp/version.c
? src/math/.deps
? src/math/.dirstamp
? src/math/linreg/.deps
? src/math/linreg/.dirstamp
? src/math/ts/.deps
? src/math/ts/.dirstamp
? src/output/.deps
? src/output/.dirstamp
? src/output/charts/.deps
? src/output/charts/.dirstamp
? src/ui/.deps
? src/ui/.dirstamp
? src/ui/gui/.deps
? src/ui/gui/.dirstamp
? src/ui/gui/psppire
? src/ui/terminal/.deps
? src/ui/terminal/.dirstamp
? src/ui/terminal/pspp
? tests/formats/.deps
? tests/formats/.dirstamp
? tests/formats/inexactify
? tests/libpspp/.deps
? tests/libpspp/.dirstamp
? tests/libpspp/ll-test
? tests/libpspp/llx-test
Index: po/de.po
===================================================================
RCS file: /sources/pspp/pspp/po/de.po,v
retrieving revision 1.26
diff -b -w -U3 -r1.26 de.po
--- po/de.po	20 Dec 2006 10:10:51 -0000	1.26
+++ po/de.po	21 Dec 2006 00:40:34 -0000
@@ -10,7 +10,7 @@
 msgstr ""
 "Project-Id-Version: PSPP 0.4.2\n"
 "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2006-12-20 18:53+0900\n"
+"POT-Creation-Date: 2006-12-21 09:13+0900\n"
 "PO-Revision-Date: 2006-05-26 17:49+0800\n"
 "Last-Translator: John Darrington <john@darrington.wattle.id.au>\n"
 "Language-Team: German <pspp-dev@gnu.org>\n"
@@ -938,6 +938,10 @@
 msgid "This command may not follow ELSE in DO IF...END IF."
 msgstr ""
 
+#: src/language/control/loop.c:214
+msgid "Only one index clause may be specified."
+msgstr ""
+
 #: src/language/control/repeat.c:170
 #, c-format
 msgid "Dummy variable name \"%s\" hides dictionary variable \"%s\"."
@@ -1246,7 +1250,7 @@
 msgid "IN variable name %s duplicates an existing variable name."
 msgstr ""
 
-#: src/language/data-io/get.c:1479
+#: src/language/data-io/get.c:1484
 #, c-format
 msgid ""
 "Variable %s in file %s (%s) has different type or width from the same "
@@ -1403,7 +1407,7 @@
 msgstr ""
 
 #: src/language/dictionary/missing-values.c:58
-#: src/language/stats/aggregate.c:479
+#: src/language/stats/aggregate.c:484
 msgid "expecting `('"
 msgstr ""
 
@@ -1885,7 +1889,7 @@
 msgid "Unknown identifier %s."
 msgstr ""
 
-#: src/language/expressions/parse.c:886 src/language/stats/aggregate.c:537
+#: src/language/expressions/parse.c:886 src/language/stats/aggregate.c:542
 msgid "expecting `)'"
 msgstr ""
 
@@ -2171,40 +2175,40 @@
 "has no effect.  Output data will be sorted the same way as the input data."
 msgstr ""
 
-#: src/language/stats/aggregate.c:444
+#: src/language/stats/aggregate.c:449
 msgid "expecting aggregation function"
 msgstr ""
 
-#: src/language/stats/aggregate.c:462
+#: src/language/stats/aggregate.c:467
 #, c-format
 msgid "Unknown aggregation function %s."
 msgstr ""
 
-#: src/language/stats/aggregate.c:518
+#: src/language/stats/aggregate.c:523
 #, c-format
 msgid "Missing argument %d to %s."
 msgstr ""
 
-#: src/language/stats/aggregate.c:527
+#: src/language/stats/aggregate.c:532
 #, c-format
 msgid "Arguments to %s must be of same type as source variables."
 msgstr ""
 
-#: src/language/stats/aggregate.c:549
+#: src/language/stats/aggregate.c:554
 #, c-format
 msgid ""
 "Number of source variables (%u) does not match number of target variables (%"
 "u)."
 msgstr ""
 
-#: src/language/stats/aggregate.c:565
+#: src/language/stats/aggregate.c:570
 #, c-format
 msgid ""
 "The value arguments passed to the %s function are out-of-order.  They will "
 "be treated as if they had been specified in the correct order."
 msgstr ""
 
-#: src/language/stats/aggregate.c:635
+#: src/language/stats/aggregate.c:640
 #, c-format
 msgid ""
 "Variable name %s is not unique within the aggregate file dictionary, which "
@@ -2226,25 +2230,25 @@
 msgid "Duplicate variable name %s among target variables."
 msgstr ""
 
-#: src/language/stats/binomial.c:139
+#: src/language/stats/binomial.c:138
 #, c-format
 msgid "Variable %s is not dichotomous"
 msgstr ""
 
-#: src/language/stats/binomial.c:185
+#: src/language/stats/binomial.c:184
 msgid "Binomial Test"
 msgstr ""
 
-#: src/language/stats/binomial.c:203
+#: src/language/stats/binomial.c:202
 msgid "Group1"
 msgstr ""
 
-#: src/language/stats/binomial.c:206
+#: src/language/stats/binomial.c:205
 msgid "Group2"
 msgstr ""
 
-#: src/language/stats/binomial.c:209 src/language/stats/chisquare.c:237
-#: src/language/stats/chisquare.c:297 src/language/stats/crosstabs.q:821
+#: src/language/stats/binomial.c:208 src/language/stats/chisquare.c:236
+#: src/language/stats/chisquare.c:296 src/language/stats/crosstabs.q:821
 #: src/language/stats/crosstabs.q:1021 src/language/stats/crosstabs.q:1744
 #: src/language/stats/examine.q:912 src/language/stats/frequencies.q:1220
 #: src/language/stats/oneway.q:306 src/language/stats/oneway.q:470
@@ -2252,72 +2256,72 @@
 msgid "Total"
 msgstr ""
 
-#: src/language/stats/binomial.c:254 src/language/stats/chisquare.c:260
+#: src/language/stats/binomial.c:253 src/language/stats/chisquare.c:259
 #: src/language/stats/crosstabs.q:1139 src/language/stats/crosstabs.q:1180
 msgid "Category"
 msgstr ""
 
-#: src/language/stats/binomial.c:255 src/language/stats/crosstabs.q:831
+#: src/language/stats/binomial.c:254 src/language/stats/crosstabs.q:831
 #: src/language/stats/examine.q:988 src/language/stats/frequencies.q:1516
-#: src/language/stats/npar-summary.c:125 src/language/stats/oneway.q:391
+#: src/language/stats/npar-summary.c:124 src/language/stats/oneway.q:391
 #: src/language/stats/t-test.q:681 src/language/stats/t-test.q:704
 #: src/language/stats/t-test.q:830 src/language/stats/t-test.q:1367
 msgid "N"
 msgstr ""
 
-#: src/language/stats/binomial.c:256
+#: src/language/stats/binomial.c:255
 msgid "Observed Prop."
 msgstr ""
 
-#: src/language/stats/binomial.c:257
+#: src/language/stats/binomial.c:256
 msgid "Test Prop."
 msgstr ""
 
-#: src/language/stats/binomial.c:260
+#: src/language/stats/binomial.c:259
 #, c-format
 msgid "Exact Sig. (%d-tailed)"
 msgstr ""
 
-#: src/language/stats/chisquare.c:209
+#: src/language/stats/chisquare.c:208
 #, c-format
 msgid ""
 "CHISQUARE test specified %d expected values, but %d distinct values were "
 "encountered in variable %s."
 msgstr ""
 
-#: src/language/stats/chisquare.c:221 src/language/stats/chisquare.c:261
+#: src/language/stats/chisquare.c:220 src/language/stats/chisquare.c:260
 msgid "Observed N"
 msgstr ""
 
-#: src/language/stats/chisquare.c:222 src/language/stats/chisquare.c:262
+#: src/language/stats/chisquare.c:221 src/language/stats/chisquare.c:261
 msgid "Expected N"
 msgstr ""
 
-#: src/language/stats/chisquare.c:223 src/language/stats/chisquare.c:263
+#: src/language/stats/chisquare.c:222 src/language/stats/chisquare.c:262
 #: src/language/stats/regression.q:313
 msgid "Residual"
 msgstr ""
 
-#: src/language/stats/chisquare.c:256
+#: src/language/stats/chisquare.c:255
 msgid "Frequencies"
 msgstr ""
 
-#: src/language/stats/chisquare.c:310
+#: src/language/stats/chisquare.c:309
 msgid "Test Statistics"
 msgstr ""
 
-#: src/language/stats/chisquare.c:324
+#: src/language/stats/chisquare.c:323
 msgid "Chi-Square"
 msgstr ""
 
-#: src/language/stats/chisquare.c:325 src/language/stats/crosstabs.q:1115
+#: src/language/stats/chisquare.c:324 src/language/stats/crosstabs.q:1115
 #: src/language/stats/oneway.q:279 src/language/stats/oneway.q:680
 #: src/language/stats/regression.q:307 src/language/stats/t-test.q:981
 #: src/language/stats/t-test.q:1173 src/language/stats/t-test.q:1266
 msgid "df"
 msgstr ""
 
-#: src/language/stats/chisquare.c:326
+#: src/language/stats/chisquare.c:325
 msgid "Asymp. Sig."
 msgstr ""
 
@@ -2600,7 +2604,7 @@
 msgstr ""
 
 #: src/language/stats/descriptives.c:106 src/language/stats/examine.q:1528
-#: src/language/stats/frequencies.q:125 src/language/stats/npar-summary.c:128
+#: src/language/stats/frequencies.q:125 src/language/stats/npar-summary.c:127
 #: src/language/stats/oneway.q:392 src/language/stats/t-test.q:682
 #: src/language/stats/t-test.q:705 src/language/stats/t-test.q:829
 #: src/language/stats/t-test.q:1167
@@ -2644,13 +2648,13 @@
 msgstr ""
 
 #: src/language/stats/descriptives.c:115 src/language/stats/examine.q:1633
-#: src/language/stats/frequencies.q:136 src/language/stats/npar-summary.c:134
+#: src/language/stats/frequencies.q:136 src/language/stats/npar-summary.c:133
 #: src/language/stats/oneway.q:404
 msgid "Minimum"
 msgstr ""
 
 #: src/language/stats/descriptives.c:116 src/language/stats/examine.q:1644
-#: src/language/stats/frequencies.q:137 src/language/stats/npar-summary.c:137
+#: src/language/stats/frequencies.q:137 src/language/stats/npar-summary.c:136
 #: src/language/stats/oneway.q:405
 msgid "Maximum"
 msgstr ""
@@ -2765,7 +2769,7 @@
 msgid "Median"
 msgstr ""
 
-#: src/language/stats/examine.q:1620 src/language/stats/npar-summary.c:131
+#: src/language/stats/examine.q:1620 src/language/stats/npar-summary.c:130
 #: src/language/stats/oneway.q:393 src/language/stats/t-test.q:683
 #: src/language/stats/t-test.q:706 src/language/stats/t-test.q:831
 #: src/language/stats/t-test.q:1168
@@ -2808,7 +2812,7 @@
 msgstr ""
 
 #: src/language/stats/examine.q:2014 src/language/stats/examine.q:2036
-#: src/language/stats/frequencies.q:1528 src/language/stats/npar-summary.c:144
+#: src/language/stats/frequencies.q:1528 src/language/stats/npar-summary.c:143
 msgid "Percentiles"
 msgstr ""
 
@@ -2834,51 +2838,51 @@
 msgid "Could not create temporary file for FLIP."
 msgstr ""
 
-#: src/language/stats/flip.c:313 src/language/stats/flip.c:382
+#: src/language/stats/flip.c:313 src/language/stats/flip.c:385
 #, c-format
 msgid "Error writing FLIP file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:429
+#: src/language/stats/flip.c:432
 #, c-format
 msgid "Error rewinding FLIP file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:436
+#: src/language/stats/flip.c:439
 msgid "Error creating FLIP source file."
 msgstr ""
 
-#: src/language/stats/flip.c:448
+#: src/language/stats/flip.c:451
 #, c-format
 msgid "Error reading FLIP file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:472
+#: src/language/stats/flip.c:475
 #, c-format
 msgid "Error seeking FLIP source file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:480
+#: src/language/stats/flip.c:483
 #, c-format
 msgid "Error writing FLIP source file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:491
+#: src/language/stats/flip.c:494
 #, c-format
 msgid "Error closing FLIP source file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:499
+#: src/language/stats/flip.c:502
 #, c-format
 msgid "Error rewinding FLIP source file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:545
+#: src/language/stats/flip.c:548
 #, c-format
 msgid "Error reading FLIP temporary file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:548
+#: src/language/stats/flip.c:551
 msgid "Unexpected end of file reading FLIP temporary file."
 msgstr ""
 
@@ -2999,19 +3003,19 @@
 "match the number following (%d)."
 msgstr ""
 
-#: src/language/stats/npar-summary.c:111
+#: src/language/stats/npar-summary.c:110
 msgid "Descriptive Statistics"
 msgstr ""
 
-#: src/language/stats/npar-summary.c:148
+#: src/language/stats/npar-summary.c:147
 msgid "25th"
 msgstr ""
 
-#: src/language/stats/npar-summary.c:151
+#: src/language/stats/npar-summary.c:150
 msgid "50th (Median)"
 msgstr ""
 
-#: src/language/stats/npar-summary.c:154
+#: src/language/stats/npar-summary.c:153
 msgid "75th"
 msgstr ""
 
@@ -3677,7 +3681,7 @@
 msgid "Empirical with averaging"
 msgstr ""
 
-#: src/math/sort.c:438
+#: src/math/sort.c:467
 #, c-format
 msgid ""
 "Out of memory.  Could not allocate room for minimum of %d cases of %d bytes "
@@ -4145,15 +4149,15 @@
 msgid "Incorrect range specification"
 msgstr "Falshe Spannweitebeschreibung"
 
-#: src/ui/gui/psppire.c:74
+#: src/ui/gui/psppire.c:76
 msgid "Sorry. The help system hasn't yet been implemented."
 msgstr "Es gibt noch nicht kein Helpsysteme. Schade!"
 
-#: src/ui/gui/psppire-data-store.c:724
+#: src/ui/gui/psppire-data-store.c:721
 msgid "var"
 msgstr ""
 
-#: src/ui/gui/psppire-data-store.c:805 src/ui/gui/psppire-var-store.c:551
+#: src/ui/gui/psppire-data-store.c:802 src/ui/gui/psppire-var-store.c:551
 #: src/ui/gui/psppire-var-store.c:561 src/ui/gui/psppire-var-store.c:571
 #: src/ui/gui/psppire-var-store.c:769
 #, c-format
@@ -4617,7 +4621,7 @@
 "Report bugs to <%s>.\n"
 msgstr ""
 
-#: src/ui/terminal/main.c:125
+#: src/ui/terminal/main.c:129
 msgid ""
 "Stopping syntax file processing here to avoid a cascade of dependent command "
 "failures."
Index: po/pspp.pot
===================================================================
RCS file: /sources/pspp/pspp/po/pspp.pot,v
retrieving revision 1.110
diff -b -w -U3 -r1.110 pspp.pot
--- po/pspp.pot	20 Dec 2006 10:10:51 -0000	1.110
+++ po/pspp.pot	21 Dec 2006 00:40:34 -0000
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2006-12-20 18:53+0900\n"
+"POT-Creation-Date: 2006-12-21 09:13+0900\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"
@@ -933,6 +933,10 @@
 msgid "This command may not follow ELSE in DO IF...END IF."
 msgstr ""
 
+#: src/language/control/loop.c:214
+msgid "Only one index clause may be specified."
+msgstr ""
+
 #: src/language/control/repeat.c:170
 #, c-format
 msgid "Dummy variable name \"%s\" hides dictionary variable \"%s\"."
@@ -1241,7 +1245,7 @@
 msgid "IN variable name %s duplicates an existing variable name."
 msgstr ""
 
-#: src/language/data-io/get.c:1479
+#: src/language/data-io/get.c:1484
 #, c-format
 msgid ""
 "Variable %s in file %s (%s) has different type or width from the same "
@@ -1398,7 +1402,7 @@
 msgstr ""
 
 #: src/language/dictionary/missing-values.c:58
-#: src/language/stats/aggregate.c:479
+#: src/language/stats/aggregate.c:484
 msgid "expecting `('"
 msgstr ""
 
@@ -1880,7 +1884,7 @@
 msgid "Unknown identifier %s."
 msgstr ""
 
-#: src/language/expressions/parse.c:886 src/language/stats/aggregate.c:537
+#: src/language/expressions/parse.c:886 src/language/stats/aggregate.c:542
 msgid "expecting `)'"
 msgstr ""
 
@@ -2166,40 +2170,40 @@
 "has no effect.  Output data will be sorted the same way as the input data."
 msgstr ""
 
-#: src/language/stats/aggregate.c:444
+#: src/language/stats/aggregate.c:449
 msgid "expecting aggregation function"
 msgstr ""
 
-#: src/language/stats/aggregate.c:462
+#: src/language/stats/aggregate.c:467
 #, c-format
 msgid "Unknown aggregation function %s."
 msgstr ""
 
-#: src/language/stats/aggregate.c:518
+#: src/language/stats/aggregate.c:523
 #, c-format
 msgid "Missing argument %d to %s."
 msgstr ""
 
-#: src/language/stats/aggregate.c:527
+#: src/language/stats/aggregate.c:532
 #, c-format
 msgid "Arguments to %s must be of same type as source variables."
 msgstr ""
 
-#: src/language/stats/aggregate.c:549
+#: src/language/stats/aggregate.c:554
 #, c-format
 msgid ""
 "Number of source variables (%u) does not match number of target variables (%"
 "u)."
 msgstr ""
 
-#: src/language/stats/aggregate.c:565
+#: src/language/stats/aggregate.c:570
 #, c-format
 msgid ""
 "The value arguments passed to the %s function are out-of-order.  They will "
 "be treated as if they had been specified in the correct order."
 msgstr ""
 
-#: src/language/stats/aggregate.c:635
+#: src/language/stats/aggregate.c:640
 #, c-format
 msgid ""
 "Variable name %s is not unique within the aggregate file dictionary, which "
@@ -2221,25 +2225,25 @@
 msgid "Duplicate variable name %s among target variables."
 msgstr ""
 
-#: src/language/stats/binomial.c:139
+#: src/language/stats/binomial.c:138
 #, c-format
 msgid "Variable %s is not dichotomous"
 msgstr ""
 
-#: src/language/stats/binomial.c:185
+#: src/language/stats/binomial.c:184
 msgid "Binomial Test"
 msgstr ""
 
-#: src/language/stats/binomial.c:203
+#: src/language/stats/binomial.c:202
 msgid "Group1"
 msgstr ""
 
-#: src/language/stats/binomial.c:206
+#: src/language/stats/binomial.c:205
 msgid "Group2"
 msgstr ""
 
-#: src/language/stats/binomial.c:209 src/language/stats/chisquare.c:237
-#: src/language/stats/chisquare.c:297 src/language/stats/crosstabs.q:821
+#: src/language/stats/binomial.c:208 src/language/stats/chisquare.c:236
+#: src/language/stats/chisquare.c:296 src/language/stats/crosstabs.q:821
 #: src/language/stats/crosstabs.q:1021 src/language/stats/crosstabs.q:1744
 #: src/language/stats/examine.q:912 src/language/stats/frequencies.q:1220
 #: src/language/stats/oneway.q:306 src/language/stats/oneway.q:470
@@ -2247,72 +2251,72 @@
 msgid "Total"
 msgstr ""
 
-#: src/language/stats/binomial.c:254 src/language/stats/chisquare.c:260
+#: src/language/stats/binomial.c:253 src/language/stats/chisquare.c:259
 #: src/language/stats/crosstabs.q:1139 src/language/stats/crosstabs.q:1180
 msgid "Category"
 msgstr ""
 
-#: src/language/stats/binomial.c:255 src/language/stats/crosstabs.q:831
+#: src/language/stats/binomial.c:254 src/language/stats/crosstabs.q:831
 #: src/language/stats/examine.q:988 src/language/stats/frequencies.q:1516
-#: src/language/stats/npar-summary.c:125 src/language/stats/oneway.q:391
+#: src/language/stats/npar-summary.c:124 src/language/stats/oneway.q:391
 #: src/language/stats/t-test.q:681 src/language/stats/t-test.q:704
 #: src/language/stats/t-test.q:830 src/language/stats/t-test.q:1367
 msgid "N"
 msgstr ""
 
-#: src/language/stats/binomial.c:256
+#: src/language/stats/binomial.c:255
 msgid "Observed Prop."
 msgstr ""
 
-#: src/language/stats/binomial.c:257
+#: src/language/stats/binomial.c:256
 msgid "Test Prop."
 msgstr ""
 
-#: src/language/stats/binomial.c:260
+#: src/language/stats/binomial.c:259
 #, c-format
 msgid "Exact Sig. (%d-tailed)"
 msgstr ""
 
-#: src/language/stats/chisquare.c:209
+#: src/language/stats/chisquare.c:208
 #, c-format
 msgid ""
 "CHISQUARE test specified %d expected values, but %d distinct values were "
 "encountered in variable %s."
 msgstr ""
 
-#: src/language/stats/chisquare.c:221 src/language/stats/chisquare.c:261
+#: src/language/stats/chisquare.c:220 src/language/stats/chisquare.c:260
 msgid "Observed N"
 msgstr ""
 
-#: src/language/stats/chisquare.c:222 src/language/stats/chisquare.c:262
+#: src/language/stats/chisquare.c:221 src/language/stats/chisquare.c:261
 msgid "Expected N"
 msgstr ""
 
-#: src/language/stats/chisquare.c:223 src/language/stats/chisquare.c:263
+#: src/language/stats/chisquare.c:222 src/language/stats/chisquare.c:262
 #: src/language/stats/regression.q:313
 msgid "Residual"
 msgstr ""
 
-#: src/language/stats/chisquare.c:256
+#: src/language/stats/chisquare.c:255
 msgid "Frequencies"
 msgstr ""
 
-#: src/language/stats/chisquare.c:310
+#: src/language/stats/chisquare.c:309
 msgid "Test Statistics"
 msgstr ""
 
-#: src/language/stats/chisquare.c:324
+#: src/language/stats/chisquare.c:323
 msgid "Chi-Square"
 msgstr ""
 
-#: src/language/stats/chisquare.c:325 src/language/stats/crosstabs.q:1115
+#: src/language/stats/chisquare.c:324 src/language/stats/crosstabs.q:1115
 #: src/language/stats/oneway.q:279 src/language/stats/oneway.q:680
 #: src/language/stats/regression.q:307 src/language/stats/t-test.q:981
 #: src/language/stats/t-test.q:1173 src/language/stats/t-test.q:1266
 msgid "df"
 msgstr ""
 
-#: src/language/stats/chisquare.c:326
+#: src/language/stats/chisquare.c:325
 msgid "Asymp. Sig."
 msgstr ""
 
@@ -2595,7 +2599,7 @@
 msgstr ""
 
 #: src/language/stats/descriptives.c:106 src/language/stats/examine.q:1528
-#: src/language/stats/frequencies.q:125 src/language/stats/npar-summary.c:128
+#: src/language/stats/frequencies.q:125 src/language/stats/npar-summary.c:127
 #: src/language/stats/oneway.q:392 src/language/stats/t-test.q:682
 #: src/language/stats/t-test.q:705 src/language/stats/t-test.q:829
 #: src/language/stats/t-test.q:1167
@@ -2639,13 +2643,13 @@
 msgstr ""
 
 #: src/language/stats/descriptives.c:115 src/language/stats/examine.q:1633
-#: src/language/stats/frequencies.q:136 src/language/stats/npar-summary.c:134
+#: src/language/stats/frequencies.q:136 src/language/stats/npar-summary.c:133
 #: src/language/stats/oneway.q:404
 msgid "Minimum"
 msgstr ""
 
 #: src/language/stats/descriptives.c:116 src/language/stats/examine.q:1644
-#: src/language/stats/frequencies.q:137 src/language/stats/npar-summary.c:137
+#: src/language/stats/frequencies.q:137 src/language/stats/npar-summary.c:136
 #: src/language/stats/oneway.q:405
 msgid "Maximum"
 msgstr ""
@@ -2760,7 +2764,7 @@
 msgid "Median"
 msgstr ""
 
-#: src/language/stats/examine.q:1620 src/language/stats/npar-summary.c:131
+#: src/language/stats/examine.q:1620 src/language/stats/npar-summary.c:130
 #: src/language/stats/oneway.q:393 src/language/stats/t-test.q:683
 #: src/language/stats/t-test.q:706 src/language/stats/t-test.q:831
 #: src/language/stats/t-test.q:1168
@@ -2803,7 +2807,7 @@
 msgstr ""
 
 #: src/language/stats/examine.q:2014 src/language/stats/examine.q:2036
-#: src/language/stats/frequencies.q:1528 src/language/stats/npar-summary.c:144
+#: src/language/stats/frequencies.q:1528 src/language/stats/npar-summary.c:143
 msgid "Percentiles"
 msgstr ""
 
@@ -2829,51 +2833,51 @@
 msgid "Could not create temporary file for FLIP."
 msgstr ""
 
-#: src/language/stats/flip.c:313 src/language/stats/flip.c:382
+#: src/language/stats/flip.c:313 src/language/stats/flip.c:385
 #, c-format
 msgid "Error writing FLIP file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:429
+#: src/language/stats/flip.c:432
 #, c-format
 msgid "Error rewinding FLIP file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:436
+#: src/language/stats/flip.c:439
 msgid "Error creating FLIP source file."
 msgstr ""
 
-#: src/language/stats/flip.c:448
+#: src/language/stats/flip.c:451
 #, c-format
 msgid "Error reading FLIP file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:472
+#: src/language/stats/flip.c:475
 #, c-format
 msgid "Error seeking FLIP source file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:480
+#: src/language/stats/flip.c:483
 #, c-format
 msgid "Error writing FLIP source file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:491
+#: src/language/stats/flip.c:494
 #, c-format
 msgid "Error closing FLIP source file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:499
+#: src/language/stats/flip.c:502
 #, c-format
 msgid "Error rewinding FLIP source file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:545
+#: src/language/stats/flip.c:548
 #, c-format
 msgid "Error reading FLIP temporary file: %s."
 msgstr ""
 
-#: src/language/stats/flip.c:548
+#: src/language/stats/flip.c:551
 msgid "Unexpected end of file reading FLIP temporary file."
 msgstr ""
 
@@ -2994,19 +2998,19 @@
 "match the number following (%d)."
 msgstr ""
 
-#: src/language/stats/npar-summary.c:111
+#: src/language/stats/npar-summary.c:110
 msgid "Descriptive Statistics"
 msgstr ""
 
-#: src/language/stats/npar-summary.c:148
+#: src/language/stats/npar-summary.c:147
 msgid "25th"
 msgstr ""
 
-#: src/language/stats/npar-summary.c:151
+#: src/language/stats/npar-summary.c:150
 msgid "50th (Median)"
 msgstr ""
 
-#: src/language/stats/npar-summary.c:154
+#: src/language/stats/npar-summary.c:153
 msgid "75th"
 msgstr ""
 
@@ -3672,7 +3676,7 @@
 msgid "Empirical with averaging"
 msgstr ""
 
-#: src/math/sort.c:438
+#: src/math/sort.c:467
 #, c-format
 msgid ""
 "Out of memory.  Could not allocate room for minimum of %d cases of %d bytes "
@@ -4140,15 +4144,15 @@
 msgid "Incorrect range specification"
 msgstr ""
 
-#: src/ui/gui/psppire.c:74
+#: src/ui/gui/psppire.c:76
 msgid "Sorry. The help system hasn't yet been implemented."
 msgstr ""
 
-#: src/ui/gui/psppire-data-store.c:724
+#: src/ui/gui/psppire-data-store.c:721
 msgid "var"
 msgstr ""
 
-#: src/ui/gui/psppire-data-store.c:805 src/ui/gui/psppire-var-store.c:551
+#: src/ui/gui/psppire-data-store.c:802 src/ui/gui/psppire-var-store.c:551
 #: src/ui/gui/psppire-var-store.c:561 src/ui/gui/psppire-var-store.c:571
 #: src/ui/gui/psppire-var-store.c:769
 #, c-format
@@ -4601,7 +4605,7 @@
 "Report bugs to <%s>.\n"
 msgstr ""
 
-#: src/ui/terminal/main.c:125
+#: src/ui/terminal/main.c:129
 msgid ""
 "Stopping syntax file processing here to avoid a cascade of dependent command "
 "failures."
Index: src/data/automake.mk
===================================================================
RCS file: /sources/pspp/pspp/src/data/automake.mk,v
retrieving revision 1.12
diff -b -w -U3 -r1.12 automake.mk
--- src/data/automake.mk	14 Dec 2006 10:45:19 -0000	1.12
+++ src/data/automake.mk	21 Dec 2006 00:40:34 -0000
@@ -20,6 +20,8 @@
 	src/data/casefile-private.h \
 	src/data/fastfile.c \
 	src/data/fastfile.h \
+	src/data/fastfile-factory.h \
+	src/data/fastfile-factory.c \
 	src/data/case.h \
 	src/data/category.c \
 	src/data/category.h \
Index: src/data/case-sink.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/case-sink.c,v
retrieving revision 1.2
diff -b -w -U3 -r1.2 case-sink.c
--- src/data/case-sink.c	15 Dec 2006 00:16:01 -0000	1.2
+++ src/data/case-sink.c	21 Dec 2006 00:40:34 -0000
@@ -30,13 +30,14 @@
    class CLASS and auxiliary data AUX. */
 struct case_sink *
 create_case_sink (const struct case_sink_class *class,
-                  const struct dictionary *dict,
+                  const struct dictionary *dict, struct casefile_factory *f,
                   void *aux) 
 {
   struct case_sink *sink = xmalloc (sizeof *sink);
   sink->class = class;
   sink->value_cnt = dict_get_compacted_value_cnt (dict);
   sink->aux = aux;
+  sink->factory = f;
   return sink;
 }
 
Index: src/data/case-sink.h
===================================================================
RCS file: /sources/pspp/pspp/src/data/case-sink.h,v
retrieving revision 1.2
diff -b -w -U3 -r1.2 case-sink.h
--- src/data/case-sink.h	15 Dec 2006 00:16:01 -0000	1.2
+++ src/data/case-sink.h	21 Dec 2006 00:40:34 -0000
@@ -30,6 +30,8 @@
   {
     const struct case_sink_class *class;        /* Class. */
     void *aux;          /* Auxiliary data. */
+    struct casefile_factory *factory ;    /* Factory used to create 
+                                             the destination */
     size_t value_cnt;   /* Number of `union value's in case. */
   };
 
@@ -56,8 +58,10 @@
 
 extern const struct case_sink_class null_sink_class;
 
+struct casefile_factory ;
 struct case_sink *create_case_sink (const struct case_sink_class *,
                                     const struct dictionary *,
+				    struct casefile_factory *,
                                     void *);
 void free_case_sink (struct case_sink *);
 
Index: src/data/fastfile-factory.c
===================================================================
RCS file: src/data/fastfile-factory.c
diff -N src/data/fastfile-factory.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ src/data/fastfile-factory.c	21 Dec 2006 00:40:34 -0000
@@ -0,0 +1,37 @@
+
+#include <stdlib.h>
+#include <libpspp/alloc.h>
+#include <libpspp/compiler.h>
+#include "fastfile-factory.h"
+#include "fastfile.h"
+
+
+struct fastfile_factory
+ {
+   struct casefile_factory parent;
+ };
+
+
+static struct casefile *
+produce_fastfile(struct casefile_factory *this UNUSED, size_t value_cnt)
+{
+  return fastfile_create (value_cnt);
+}
+
+
+struct casefile_factory *
+fastfile_factory_create (void)
+{
+  struct fastfile_factory *fact = xzalloc (sizeof (*fact));
+
+  fact->parent.create_casefile = produce_fastfile;
+
+  return (struct casefile_factory *) fact;
+}
+
+
+void
+fastfile_factory_destroy (struct casefile_factory *factory)
+{
+  free (factory);
+}
Index: src/data/fastfile-factory.h
===================================================================
RCS file: src/data/fastfile-factory.h
diff -N src/data/fastfile-factory.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ src/data/fastfile-factory.h	21 Dec 2006 00:40:34 -0000
@@ -0,0 +1,10 @@
+#ifndef FASTFILE_FACTORY_H
+#define FASTFILE_FACTORY_H
+
+
+#include <data/casefile-factory.h>
+
+struct casefile_factory * fastfile_factory_create (void);
+void fastfile_factory_destroy (struct casefile_factory *);
+
+#endif
Index: src/data/procedure.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/procedure.c,v
retrieving revision 1.19
diff -b -w -U3 -r1.19 procedure.c
--- src/data/procedure.c	19 Dec 2006 14:21:53 -0000	1.19
+++ src/data/procedure.c	21 Dec 2006 00:40:34 -0000
@@ -39,6 +39,10 @@
 #include <libpspp/str.h>
 
 struct dataset {
+
+  /* An abstract factory which creates casefiles */
+  struct casefile_factory *cf_factory;
+
   /* Cases are read from proc_source,
      pass through permanent_trns_chain (which transforms them into
      the format described by permanent_dict),
@@ -182,7 +186,10 @@
   struct multipass_aux_data aux_data;
   bool ok;
 
-  aux_data.casefile = fastfile_create (dict_get_next_value_idx (ds->dict));
+  aux_data.casefile =
+    ds->cf_factory->create_casefile (ds->cf_factory,
+				     dict_get_next_value_idx (ds->dict));
+
   aux_data.proc_func = proc_func;
   aux_data.aux = aux;
 
@@ -322,7 +329,6 @@
       if (!proc_read (ds, &c))
         break; 
     }
-  
   ds->ok = free_case_source (ds->proc_source) && ds->ok;
   ds->proc_source = NULL;
 
@@ -388,7 +394,10 @@
 
   /* Prepare sink. */
   if (ds->proc_sink == NULL)
-    ds->proc_sink = create_case_sink (&storage_sink_class, ds->permanent_dict, NULL);
+    ds->proc_sink = create_case_sink (&storage_sink_class,
+				      ds->permanent_dict,
+				      ds->cf_factory,
+				      NULL);
   if (ds->proc_sink->class->open != NULL)
     ds->proc_sink->class->open (ds->proc_sink);
 
@@ -464,6 +473,10 @@
       ds->compactor = NULL;
     }
     
+  /* Free data source. */
+  free_case_source (ds->proc_source);
+  ds->proc_source = NULL;
+
   /* Old data sink becomes new data source. */
   if (ds->proc_sink->class->make_source != NULL)
     ds->proc_source = ds->proc_sink->class->make_source (ds->proc_sink);
@@ -662,7 +675,8 @@
 
       /* Start a new casefile. */
       aux->casefile = 
-	fastfile_create (dict_get_next_value_idx (ds->dict));
+	ds->cf_factory->create_casefile (ds->cf_factory,
+					 dict_get_next_value_idx (ds->dict));
     }
 
   return casefile_append (aux->casefile, c) && ok;
@@ -834,10 +848,11 @@
 
 /* Initializes procedure handling. */
 struct dataset *
-create_dataset (void)
+create_dataset (struct casefile_factory *fact)
 {
   struct dataset *ds = xzalloc (sizeof(*ds));
   ds->dict = dict_create ();
+  ds->cf_factory = fact;
   proc_cancel_all_transformations (ds);
   return ds;
 }
@@ -998,3 +1013,9 @@
 }
 
 
+struct casefile_factory *
+dataset_get_casefile_factory (const struct dataset *ds)
+{
+  return ds->cf_factory;
+}
+
Index: src/data/procedure.h
===================================================================
RCS file: /sources/pspp/pspp/src/data/procedure.h,v
retrieving revision 1.9
diff -b -w -U3 -r1.9 procedure.h
--- src/data/procedure.h	19 Dec 2006 14:21:53 -0000	1.9
+++ src/data/procedure.h	21 Dec 2006 00:40:34 -0000
@@ -23,6 +23,7 @@
 #include <stdbool.h>
 
 #include <data/transformations.h>
+#include <data/casefile-factory.h>
 #include <libpspp/compiler.h>
 
 struct ccase;
@@ -57,9 +58,11 @@
 
 /* Procedures. */
 
-struct dataset * create_dataset (void);
+struct dataset * create_dataset (struct casefile_factory *);
 void destroy_dataset (struct dataset *);
 
+struct casefile_factory *dataset_get_casefile_factory (const struct dataset *);
+
 void proc_set_source (struct dataset *ds, struct case_source *);
 bool proc_has_source (const struct dataset *ds);
 
Index: src/data/storage-stream.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/storage-stream.c,v
retrieving revision 1.9
diff -b -w -U3 -r1.9 storage-stream.c
--- src/data/storage-stream.c	19 Dec 2006 14:21:53 -0000	1.9
+++ src/data/storage-stream.c	21 Dec 2006 00:40:34 -0000
@@ -27,7 +27,7 @@
 #include <data/case-source.h>
 #include <data/case.h>
 #include <data/casefile.h> 
-#include <data/fastfile.h> 
+#include <data/casefile-factory.h>
 
 #include "xalloc.h"
 
@@ -53,7 +53,8 @@
   struct storage_sink_info *info;
 
   sink->aux = info = xmalloc (sizeof *info);
-  info->casefile = fastfile_create (sink->value_cnt);
+  info->casefile = sink->factory->create_casefile (sink->factory,
+						   sink->value_cnt);
 }
 
 /* Writes case C to the storage sink SINK.
Index: src/language/data-io/get.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/get.c,v
retrieving revision 1.27
diff -b -w -U3 -r1.27 get.c
--- src/language/data-io/get.c	19 Dec 2006 14:21:53 -0000	1.27
+++ src/language/data-io/get.c	21 Dec 2006 00:40:34 -0000
@@ -1111,14 +1111,19 @@
   if (used_active_file) 
     {
       proc_set_sink (ds, create_case_sink (&null_sink_class, 
-                                           dataset_dict (ds), NULL));
+                                           dataset_dict (ds),
+					   dataset_get_casefile_factory (ds),
+					   NULL));
       proc_open (ds); 
     }
   else
     discard_variables (ds);
 
   dict_compact_values (mtf.dict);
-  mtf.output = fastfile_create (dict_get_next_value_idx (mtf.dict));
+  mtf.output = dataset_get_casefile_factory (ds)->create_casefile
+    (dataset_get_casefile_factory (ds),
+     dict_get_next_value_idx (mtf.dict));
+
   mtf.seq_nums = xcalloc (dict_get_var_cnt (mtf.dict), sizeof *mtf.seq_nums);
   case_create (&mtf.mtf_case, dict_get_next_value_idx (mtf.dict));
 
Index: src/language/expressions/evaluate.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/expressions/evaluate.c,v
retrieving revision 1.15
diff -b -w -U3 -r1.15 evaluate.c
--- src/language/expressions/evaluate.c	16 Dec 2006 03:40:41 -0000	1.15
+++ src/language/expressions/evaluate.c	21 Dec 2006 00:40:34 -0000
@@ -158,7 +158,7 @@
 
 	  if  ( ds == NULL )
 	    {
-	      ds = create_dataset ();
+	      ds = create_dataset (NULL);
 	      d = dataset_dict (ds);
 	    }
 
Index: src/language/stats/aggregate.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/aggregate.c,v
retrieving revision 1.25
diff -b -w -U3 -r1.25 aggregate.c
--- src/language/stats/aggregate.c	19 Dec 2006 14:21:53 -0000	1.25
+++ src/language/stats/aggregate.c	21 Dec 2006 00:40:35 -0000
@@ -278,11 +278,15 @@
             goto error;
         }
 
-      agr.sink = create_case_sink (&storage_sink_class, agr.dict, NULL);
+      agr.sink = create_case_sink (&storage_sink_class, agr.dict,
+				   dataset_get_casefile_factory (ds),
+				   NULL);
       if (agr.sink->class->open != NULL)
         agr.sink->class->open (agr.sink);
       proc_set_sink (ds, 
-		     create_case_sink (&null_sink_class, dict, NULL));
+		     create_case_sink (&null_sink_class, dict,
+				       dataset_get_casefile_factory (ds),
+				       NULL));
       proc_open (ds);
       while (proc_read (ds, &c))
         if (aggregate_single_case (&agr, c, &agr.agr_case)) 
@@ -293,6 +297,7 @@
             }
       if (!proc_close (ds))
         goto error;
+
       if (agr.case_cnt > 0) 
         {
           dump_aggregate_info (&agr, &agr.agr_case);
Index: src/language/stats/flip.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/flip.c,v
retrieving revision 1.19
diff -b -w -U3 -r1.19 flip.c
--- src/language/stats/flip.c	19 Dec 2006 14:21:53 -0000	1.19
+++ src/language/stats/flip.c	21 Dec 2006 00:40:35 -0000
@@ -83,7 +83,7 @@
   };
 
 static void destroy_flip_pgm (struct flip_pgm *);
-static struct case_sink *flip_sink_create (struct dictionary *d, struct flip_pgm *);
+static struct case_sink *flip_sink_create (struct dataset *ds, struct flip_pgm *);
 static struct case_source *flip_source_create (struct flip_pgm *);
 static bool flip_file (struct flip_pgm *);
 static int build_dictionary (struct dictionary *, struct flip_pgm *);
@@ -158,7 +158,7 @@
   /* Read the active file into a flip_sink. */
   flip->case_cnt = 0;
   proc_make_temporary_transformations_permanent (ds);
-  sink = flip_sink_create (dict, flip);
+  sink = flip_sink_create (ds, flip);
   if (sink == NULL)
     goto error;
   proc_set_sink (ds, sink);
@@ -289,7 +289,7 @@
      
 /* Creates a flip sink based on FLIP. */
 static struct case_sink *
-flip_sink_create (struct dictionary *dict, struct flip_pgm *flip) 
+flip_sink_create (struct dataset *ds, struct flip_pgm *flip) 
 {
   size_t i;
 
@@ -316,7 +316,10 @@
 
   flip->case_cnt = 1;
 
-  return create_case_sink (&flip_sink_class, dict, flip);
+  return create_case_sink (&flip_sink_class,
+			   dataset_dict (ds),
+			   dataset_get_casefile_factory (ds),
+			   flip);
 }
 
 /* Writes case C to the FLIP sink.
Index: src/language/stats/rank.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/rank.q,v
retrieving revision 1.23
diff -b -w -U3 -r1.23 rank.q
--- src/language/stats/rank.q	16 Dec 2006 20:57:15 -0000	1.23
+++ src/language/stats/rank.q	21 Dec 2006 00:40:35 -0000
@@ -275,7 +275,7 @@
       reader = casefile_get_destructive_reader (cf) ;
       criteria.crits[criteria.crit_cnt - 1] = sc->crits[i];
       assert ( sc->crits[i].fv == var_get_case_index (src_vars[i]) );
-      sorted_cf = sort_execute (reader, &criteria);
+      sorted_cf = sort_execute (reader, &criteria, NULL);
       casefile_destroy (cf);
 
       out = rank_sorted_casefile (sorted_cf, &criteria,
Index: src/math/sort.c
===================================================================
RCS file: /sources/pspp/pspp/src/math/sort.c,v
retrieving revision 1.21
diff -b -w -U3 -r1.21 sort.c
--- src/math/sort.c	15 Dec 2006 00:16:03 -0000	1.21
+++ src/math/sort.c	21 Dec 2006 00:40:35 -0000
@@ -1,5 +1,5 @@
 /* PSPP - computes sample statistics.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -30,6 +30,8 @@
 #include <data/case.h>
 #include <data/casefile.h>
 #include <data/fastfile.h>
+#include <data/casefile-factory.h>
+#include <data/fastfile-factory.h>
 #include <data/procedure.h>
 #include <data/settings.h>
 #include <data/variable.h>
@@ -55,9 +57,13 @@
 static int compare_record (const struct ccase *, const struct ccase *,
                            const struct sort_criteria *);
 static struct casefile *do_internal_sort (struct casereader *,
-                                          const struct sort_criteria *);
+                                          const struct sort_criteria *,
+					  struct casefile_factory *
+					  );
 static struct casefile *do_external_sort (struct casereader *,
-                                          const struct sort_criteria *);
+                                          const struct sort_criteria *,
+					  struct casefile_factory *
+					  );
 
 
 /* Sorts the active file in-place according to CRITERIA.
@@ -73,7 +79,8 @@
     return false;
   
   in = proc_capture_output (ds);
-  out = sort_execute (casefile_get_destructive_reader (in), criteria);
+  out = sort_execute (casefile_get_destructive_reader (in), criteria, 
+		      dataset_get_casefile_factory (ds));
   if (out == NULL) 
     return false;
 
@@ -86,6 +93,7 @@
   {
     const struct sort_criteria *criteria;
     struct casefile *output;
+    struct casefile_factory *factory ;
   };
 
 /* Sorts casefile CF according to the criteria in CB_DATA. */
@@ -93,7 +101,10 @@
 sort_to_casefile_callback (const struct casefile *cf, void *cb_data_) 
 {
   struct sort_to_casefile_cb_data *cb_data = cb_data_;
-  cb_data->output = sort_execute (casefile_get_reader (cf, NULL), cb_data->criteria);
+  cb_data->output = sort_execute (casefile_get_reader (cf, NULL), 
+				  cb_data->criteria,
+				  cb_data->factory
+				  );
   return cb_data->output != NULL;
 }
 
@@ -110,6 +121,7 @@
 
   cb_data.criteria = criteria;
   cb_data.output = NULL;
+  cb_data.factory = dataset_get_casefile_factory (ds);
   if (!multipass_procedure (ds, sort_to_casefile_callback, &cb_data)) 
     {
       casefile_destroy (cb_data.output);
@@ -121,14 +133,27 @@
 
 /* Reads all the cases from READER, which is destroyed.  Sorts
    the cases according to CRITERIA.  Returns the sorted cases in
-   a newly created casefile. */
+   a newly created casefile, which will be created by FACTORY.
+   If FACTORY is NULL, then a local fastfile_factory will be used.
+*/
 struct casefile *
-sort_execute (struct casereader *reader, const struct sort_criteria *criteria)
+sort_execute (struct casereader *reader,
+	      const struct sort_criteria *criteria,
+	      struct casefile_factory *factory
+	      )
 {
-  struct casefile *output = do_internal_sort (reader, criteria);
+  struct casefile_factory *local_factory = NULL;
+  struct casefile *output ;
+  if ( factory == NULL )
+    factory = local_factory = fastfile_factory_create ();
+
+  output = do_internal_sort (reader, criteria, factory);
   if (output == NULL)
-    output = do_external_sort (reader, criteria);
+    output = do_external_sort (reader, criteria, factory);
   casereader_destroy (reader);
+
+  fastfile_factory_destroy (local_factory);
+
   return output;
 }
 
@@ -145,7 +170,8 @@
    casefile for the data.  Otherwise, return a null pointer. */
 static struct casefile *
 do_internal_sort (struct casereader *reader,
-                  const struct sort_criteria *criteria)
+                  const struct sort_criteria *criteria, 
+		  struct casefile_factory *factory)
 {
   const struct casefile *src;
   struct casefile *dst;
@@ -159,7 +185,7 @@
     return NULL;
       
   case_cnt = casefile_get_case_cnt (src);
-  dst = fastfile_create (casefile_get_value_cnt (src));
+  dst = factory->create_casefile (factory, casefile_get_value_cnt (src));
   if (case_cnt != 0) 
     {
       struct indexed_case *cases = nmalloc (sizeof *cases, case_cnt);
@@ -225,6 +251,7 @@
     size_t value_cnt;                 /* Size of data in `union value's. */
     struct casefile **runs;           /* Array of initial runs. */
     size_t run_cnt, run_cap;          /* Number of runs, allocated capacity. */
+    struct casefile_factory *factory; /* Factory used to  create the result */
   };
 
 /* Prototypes for helper functions. */
@@ -238,7 +265,9 @@
    pattern that assures stability. */
 static struct casefile *
 do_external_sort (struct casereader *reader,
-                  const struct sort_criteria *criteria)
+                  const struct sort_criteria *criteria,
+		  struct casefile_factory *factory
+		  )
 {
   struct external_sort *xsrt;
 
@@ -251,6 +280,7 @@
   xsrt->run_cap = 512;
   xsrt->run_cnt = 0;
   xsrt->runs = xnmalloc (xsrt->run_cap, sizeof *xsrt->runs);
+  xsrt->factory = factory;
   if (write_runs (xsrt, reader))
     {
       struct casefile *output = merge (xsrt);
@@ -508,6 +538,9 @@
 {
   irs->run++;
   irs->case_cnt = 0;
+
+  /* This casefile is internal to the sort, so don't use the factory
+     to create it. */
   irs->casefile = fastfile_create (irs->xsrt->value_cnt);
   casefile_to_disk (irs->casefile);
   case_nullify (&irs->last_output); 
@@ -673,7 +706,7 @@
     }
 
   /* Create output file. */
-  output = fastfile_create (xsrt->value_cnt);
+  output = xsrt->factory->create_casefile (xsrt->factory, xsrt->value_cnt);
   casefile_to_disk (output);
 
   /* Merge. */
Index: src/math/sort.h
===================================================================
RCS file: /sources/pspp/pspp/src/math/sort.h,v
retrieving revision 1.4
diff -b -w -U3 -r1.4 sort.h
--- src/math/sort.h	15 Dec 2006 00:16:03 -0000	1.4
+++ src/math/sort.h	21 Dec 2006 00:40:35 -0000
@@ -25,6 +25,7 @@
 struct casereader;
 struct dictionary;
 struct variable;
+struct casefile_factory;
 
 extern int min_buffers ;
 extern int max_buffers ;
@@ -57,7 +58,9 @@
 void sort_destroy_criteria (struct sort_criteria *);
 
 struct casefile *sort_execute (struct casereader *,
-                               const struct sort_criteria *);
+                               const struct sort_criteria *,
+			       struct casefile_factory *
+			       );
 
 struct dataset ;
 bool sort_active_file_in_place (struct dataset *ds, 
Index: src/ui/gui/automake.mk
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/automake.mk,v
retrieving revision 1.17
diff -b -w -U3 -r1.17 automake.mk
--- src/ui/gui/automake.mk	17 Dec 2006 00:01:05 -0000	1.17
+++ src/ui/gui/automake.mk	21 Dec 2006 00:40:35 -0000
@@ -44,6 +44,8 @@
 	src/ui/gui/customentry.h \
 	src/ui/gui/data-sheet.c \
 	src/ui/gui/data-sheet.h \
+	src/ui/gui/flexifile-factory.h \
+	src/ui/gui/flexifile-factory.c \
 	src/ui/gui/message-dialog.c \
 	src/ui/gui/message-dialog.h \
 	src/ui/gui/psppire.c \
Index: src/ui/gui/flexifile-factory.c
===================================================================
RCS file: src/ui/gui/flexifile-factory.c
diff -N src/ui/gui/flexifile-factory.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ src/ui/gui/flexifile-factory.c	21 Dec 2006 00:40:35 -0000
@@ -0,0 +1,40 @@
+
+#include <stdlib.h>
+#include <libpspp/alloc.h>
+#include <libpspp/compiler.h>
+#include "flexifile-factory.h"
+#include <ui/flexifile.h>
+#include <data/casefile-factory.h>
+
+
+struct flexifile_factory
+ {
+   struct casefile_factory parent;
+ };
+
+
+static struct casefile *
+produce_flexifile(struct casefile_factory *this UNUSED, size_t value_cnt)
+{
+  struct casefile *ff =  flexifile_create (value_cnt);
+
+  return ff;
+}
+
+
+struct casefile_factory *
+flexifile_factory_create (void)
+{
+  struct flexifile_factory *fact = xzalloc (sizeof (*fact));
+
+  fact->parent.create_casefile = produce_flexifile;
+
+  return (struct casefile_factory *) fact;
+}
+
+
+void
+flexifile_factory_destroy (struct casefile_factory *factory)
+{
+  free (factory);
+}
Index: src/ui/gui/flexifile-factory.h
===================================================================
RCS file: src/ui/gui/flexifile-factory.h
diff -N src/ui/gui/flexifile-factory.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ src/ui/gui/flexifile-factory.h	21 Dec 2006 00:40:35 -0000
@@ -0,0 +1,10 @@
+#ifndef FLEXIFILE_FACTORY_H
+#define FLEXIFILE_FACTORY_H
+
+
+struct casefile_factory ;
+
+struct casefile_factory * flexifile_factory_create (void);
+void flexifile_factory_destroy (struct casefile_factory *);
+
+#endif
Index: src/ui/gui/psppire-case-file.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire-case-file.c,v
retrieving revision 1.9
diff -b -w -U3 -r1.9 psppire-case-file.c
--- src/ui/gui/psppire-case-file.c	16 Dec 2006 04:26:43 -0000	1.9
+++ src/ui/gui/psppire-case-file.c	21 Dec 2006 00:40:35 -0000
@@ -28,6 +28,7 @@
 
 #include <data/case.h>
 #include <ui/flexifile.h>
+#include "flexifile-factory.h"
 #include <data/casefile.h>
 #include <data/data-in.h>
 #include <math/sort.h>
@@ -144,6 +145,7 @@
   cf->flexifile = 0;
 }
 
+
 /**
  * psppire_case_file_new:
  * @returns: a new #PsppireCaseFile object
@@ -161,6 +163,23 @@
 }
 
 
+/**
+ * psppire_case_file_new_from_flexifile:
+ * @returns: a new #PsppireCaseFile object
+ *
+ * Creates a new #PsppireCaseFile from an existing flexifile
+ */
+PsppireCaseFile*
+psppire_case_file_new_from_flexifile (struct flexifile *ff)
+{
+  PsppireCaseFile *cf = g_object_new (G_TYPE_PSPPIRE_CASE_FILE, NULL);
+
+  cf->flexifile = (struct casefile *) ff;
+
+  return cf;
+}
+
+
 gboolean
 psppire_case_file_delete_cases(PsppireCaseFile *cf, gint n_cases, gint first)
 {
@@ -247,7 +266,6 @@
   flexifile_get_case(FLEXIFILE(cf->flexifile), casenum, &c);
 
   v = case_data_idx(&c, idx);
-
   case_destroy(&c);
 
   return v;
@@ -321,28 +339,25 @@
 void
 psppire_case_file_sort(PsppireCaseFile *cf, const struct sort_criteria *sc)
 {
-  struct ccase cc;
   gint c;
-  struct casefile *cfile;
-  struct casereader *reader = casefile_get_reader (cf->flexifile, NULL);
-  const int value_cnt = casefile_get_value_cnt(cf->flexifile);
 
-  cfile = sort_execute(reader, sc);
+  struct casereader *reader = casefile_get_reader (cf->flexifile, NULL);
+  struct casefile *cfile;
 
-  casefile_destroy(cf->flexifile);
+  struct casefile_factory *factory  = flexifile_factory_create ();
 
-  /* Copy casefile into flexifile */
+  cfile = sort_execute(reader, sc, factory);
 
-  reader = casefile_get_destructive_reader(cfile);
-  cf->flexifile = flexifile_create(value_cnt);
-  while(casereader_read(reader, &cc))
-      casefile_append(cf->flexifile, &cc);
+  casefile_destroy(cf->flexifile);
   
+  cf->flexifile = cfile;
 
   /* FIXME: Need to have a signal to change a range of cases, instead of
      calling a signal many times */
   for ( c = 0 ; c < casefile_get_case_cnt(cf->flexifile) ; ++c ) 
     g_signal_emit(cf, signal[CASE_CHANGED], 0, c);
+
+  flexifile_factory_destroy (factory);
 }
 
 
@@ -357,6 +372,7 @@
   if ( ! cf->flexifile ) 
     {
       cf->flexifile = flexifile_create(n_values);
+
       return TRUE;
     }
 
Index: src/ui/gui/psppire-case-file.h
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire-case-file.h,v
retrieving revision 1.7
diff -b -w -U3 -r1.7 psppire-case-file.h
--- src/ui/gui/psppire-case-file.h	16 Dec 2006 04:26:43 -0000	1.7
+++ src/ui/gui/psppire-case-file.h	21 Dec 2006 00:40:35 -0000
@@ -48,7 +48,8 @@
 typedef struct _PsppireCaseFileClass PsppireCaseFileClass;
 
 struct ccase;
-struct casefilefile;
+struct flexifile;
+struct casefile;
 
 struct _PsppireCaseFile
 {
@@ -68,9 +69,8 @@
 GType          psppire_case_file_get_type (void);
 
 PsppireCaseFile *psppire_case_file_new (gint var_cnt);
+PsppireCaseFile* psppire_case_file_new_from_flexifile (struct flexifile *ff);
 
-gboolean psppire_case_file_append_case(PsppireCaseFile *cf, 
-					     struct ccase *c);
 
 gboolean psppire_case_file_insert_case(PsppireCaseFile *cf, struct ccase *c, gint row);
 
Index: src/ui/gui/psppire-data-store.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire-data-store.c,v
retrieving revision 1.25
diff -b -w -U3 -r1.25 psppire-data-store.c
--- src/ui/gui/psppire-data-store.c	16 Dec 2006 22:13:12 -0000	1.25
+++ src/ui/gui/psppire-data-store.c	21 Dec 2006 00:40:35 -0000
@@ -366,9 +366,6 @@
 psppire_data_store_set_dictionary(PsppireDataStore *data_store, PsppireDict *dict)
 {
   gint var_cnt = psppire_dict_get_next_value_idx(dict);
-#if 0
-  if ( data_store->dict ) g_object_unref(data_store->dict);
-#endif
 
   data_store->dict = dict;
 
Index: src/ui/gui/psppire.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire.c,v
retrieving revision 1.24
diff -b -w -U3 -r1.24 psppire.c
--- src/ui/gui/psppire.c	17 Dec 2006 00:01:05 -0000	1.24
+++ src/ui/gui/psppire.c	21 Dec 2006 00:40:35 -0000
@@ -22,6 +22,7 @@
 #include <assert.h>
 #include <libintl.h>
 
+
 #include <libpspp/version.h>
 #include <libpspp/copyleft.h>
 #include <data/file-handle-def.h>
@@ -44,6 +45,7 @@
 #include "data-sheet.h"
 #include "var-sheet.h"
 #include "message-dialog.h"
+#include "flexifile-factory.h"
 
 GladeXML *xml;
 
@@ -88,6 +90,7 @@
 int 
 main(int argc, char *argv[]) 
 {
+  struct casefile_factory *factory;
 
   GtkWidget *data_editor ;
   GtkSheet *var_sheet ; 
@@ -125,13 +128,14 @@
   fmt_init();
   settings_init();
   fh_init ();
+  factory = flexifile_factory_create ();
   the_source_stream = create_source_stream (
 			  fn_getenv_default ("STAT_INCLUDE_PATH", include_path)
 			  );
 
   the_lexer = lex_create (the_source_stream);
 
-  the_dataset = create_dataset ();
+  the_dataset = create_dataset (factory);
 
   message_dialog_init (the_source_stream);
 
Index: src/ui/terminal/automake.mk
===================================================================
RCS file: /sources/pspp/pspp/src/ui/terminal/automake.mk,v
retrieving revision 1.12
diff -b -w -U3 -r1.12 automake.mk
--- src/ui/terminal/automake.mk	14 Dec 2006 10:45:20 -0000	1.12
+++ src/ui/terminal/automake.mk	21 Dec 2006 00:40:35 -0000
@@ -18,12 +18,12 @@
 
 src_ui_terminal_pspp_LDADD =					\
 	src/ui/terminal/libui.a \
-	src/ui/libuicommon.a \
 	src/language/liblanguage.a \
 	src/output/charts/libcharts.a \
 	src/output/liboutput.a \
 	src/math/libpspp_math.a  \
 	src/math/linreg/libpspp_linreg.a  \
+	src/ui/libuicommon.a \
 	lib/linreg/liblinreg.a	\
 	lib/gsl-extras/libgsl-extras.a	\
 	src/data/libdata.a \
Index: src/ui/terminal/main.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/terminal/main.c,v
retrieving revision 1.27
diff -b -w -U3 -r1.27 main.c
--- src/ui/terminal/main.c	16 Dec 2006 03:40:41 -0000	1.27
+++ src/ui/terminal/main.c	21 Dec 2006 00:40:35 -0000
@@ -27,7 +27,7 @@
 #include "progname.h"
 #include "read-line.h"
 
-
+#include <data/fastfile-factory.h>
 #include <data/dictionary.h>
 #include <data/file-handle-def.h>
 #include <libpspp/getl.h>
@@ -82,6 +82,7 @@
 int
 main (int argc, char **argv)
 {
+  struct casefile_factory *factory;
   signal (SIGABRT, bug_handler);
   signal (SIGSEGV, bug_handler);
   signal (SIGFPE, bug_handler);
@@ -104,7 +105,10 @@
   readln_initialize ();
   settings_init ();
   random_init ();
-  the_dataset = create_dataset ();
+
+  factory = fastfile_factory_create ();
+
+  the_dataset = create_dataset (factory);
 
   if (parse_command_line (argc, argv, the_source_stream))
     {
