Clean-ups.
More AGGREGATE fixes.
msgstr ""
"Project-Id-Version: PSPP 0.3.1\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2005-03-13 09:00+0800\n"
+"POT-Creation-Date: 2005-03-13 22:49-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"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
-#: src/aggregate.c:180 src/aggregate.c:213 src/data-list.c:1424
-#: src/data-list.c:1459 src/data-list.c:1472 src/data-list.c:1485
-#: src/data-list.c:1518
-#, c-format
-msgid "%s subcommand given multiple times."
+#: src/aggregate.c:193
+msgid "while expecting COLUMNWISE"
msgstr ""
-#: src/aggregate.c:198
-msgid "while expecting COLUMNWISE"
+#: src/aggregate.c:225
+msgid "expecting BREAK"
msgstr ""
-#: src/aggregate.c:236
-msgid "BREAK subcommand not specified."
+#: src/aggregate.c:230
+msgid ""
+"When PRESORTED is specified, specifying sorting directions with (A) or (D) "
+"has no effect. Output data will be sorted the same way as the input data."
msgstr ""
-#: src/aggregate.c:390
+#: src/aggregate.c:387
msgid "expecting aggregation function"
msgstr ""
-#: src/aggregate.c:406
+#: src/aggregate.c:403
#, c-format
msgid "Unknown aggregation function %s."
msgstr ""
-#: src/aggregate.c:421
+#: src/aggregate.c:418
msgid "expecting `('"
msgstr ""
-#: src/aggregate.c:458
+#: src/aggregate.c:455
#, c-format
msgid "Missing argument %d to %s."
msgstr ""
-#: src/aggregate.c:466
+#: src/aggregate.c:463
#, c-format
msgid "Arguments to %s must be of same type as source variables."
msgstr ""
-#: src/aggregate.c:476
+#: src/aggregate.c:473
msgid "expecting `)'"
msgstr ""
-#: src/aggregate.c:488
+#: src/aggregate.c:485
#, c-format
msgid ""
"Number of source variables (%d) does not match number of target variables (%"
"d)."
msgstr ""
-#: src/aggregate.c:556
+#: src/aggregate.c:502
+#, 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/aggregate.c:570
#, c-format
msgid ""
"Variable name %s is not unique within the aggregate file dictionary, which "
msgstr ""
#: src/autorecode.c:139 src/command.c:791 src/compute.c:277
-#: src/data-list.c:410 src/data-list.c:900 src/data-list.c:1751
+#: src/data-list.c:409 src/data-list.c:899 src/data-list.c:1750
#: src/do-if.c:253 src/get.c:406 src/lexer.c:420 src/loop.c:241
#: src/matrix-data.c:527 src/print.c:335 src/print.c:1045 src/recode.c:405
#: src/sel-if.c:54 src/sel-if.c:131 src/vector.c:193 src/file-handle.q:140
msgid "Only one of FIXED, FREE, or LIST may be specified."
msgstr ""
-#: src/data-list.c:357 src/print.c:296
+#: src/data-list.c:356 src/print.c:296
#, c-format
msgid ""
"The record number specified, %ld, is before the previous record, %d. Data "
"fields must be listed in order of increasing record number."
msgstr ""
-#: src/data-list.c:386 src/data-list.c:1740
+#: src/data-list.c:385 src/data-list.c:1739
msgid ""
"SPSS-like or FORTRAN-like format specification expected after variable names."
msgstr ""
-#: src/data-list.c:397
+#: src/data-list.c:396
msgid "At least one variable must be specified."
msgstr ""
-#: src/data-list.c:402 src/print.c:328
+#: src/data-list.c:401 src/print.c:328
msgid ""
"Variables are specified on records that should not exist according to "
"RECORDS subcommand."
msgstr ""
-#: src/data-list.c:440 src/data-list.c:454 src/print.c:520 src/print.c:533
+#: src/data-list.c:439 src/data-list.c:453 src/print.c:520 src/print.c:533
msgid "Column positions for fields must be positive."
msgstr ""
-#: src/data-list.c:459
+#: src/data-list.c:458
msgid "The ending column for a field must be greater than the starting column."
msgstr ""
-#: src/data-list.c:473 src/print.c:610
+#: src/data-list.c:472 src/print.c:610
#, c-format
msgid "The %d columns %d-%d can't be evenly divided into %d fields."
msgstr ""
-#: src/data-list.c:493 src/print.c:561
+#: src/data-list.c:492 src/print.c:561
msgid "A format specifier on this line has extra characters on the end."
msgstr ""
-#: src/data-list.c:508 src/print.c:577
+#: src/data-list.c:507 src/print.c:577
msgid "The value for number of decimal places must be at least 1."
msgstr ""
-#: src/data-list.c:522 src/print.c:590
+#: src/data-list.c:521 src/print.c:590
#, c-format
msgid "Input format %s doesn't accept decimal places."
msgstr ""
-#: src/data-list.c:569 src/data-list.c:665 src/data-list.c:879
+#: src/data-list.c:568 src/data-list.c:664 src/data-list.c:878
#, c-format
msgid "%s is a duplicate variable name."
msgstr ""
-#: src/data-list.c:574
+#: src/data-list.c:573
#, c-format
msgid "There is already a variable %s of a different type."
msgstr ""
-#: src/data-list.c:581
+#: src/data-list.c:580
#, c-format
msgid "There is already a string variable %s of a different width."
msgstr ""
-#: src/data-list.c:656
+#: src/data-list.c:655
msgid ""
"The number of format specifications exceeds the given number of variable "
"names."
msgstr ""
-#: src/data-list.c:769 src/print.c:765
+#: src/data-list.c:768 src/print.c:765
msgid ""
"There aren't enough format specifications to match the number of variable "
"names given."
msgstr ""
-#: src/data-list.c:796 src/data-list.c:922 src/descript.c:880 src/print.c:796
-#: src/sysfile-info.c:134 src/sysfile-info.c:367 src/vfm.c:873
+#: src/data-list.c:795 src/data-list.c:921 src/descript.c:880 src/print.c:796
+#: src/sysfile-info.c:134 src/sysfile-info.c:367 src/vfm.c:830
msgid "Variable"
msgstr ""
-#: src/data-list.c:797 src/print.c:797
+#: src/data-list.c:796 src/print.c:797
msgid "Record"
msgstr ""
-#: src/data-list.c:798 src/print.c:798
+#: src/data-list.c:797 src/print.c:798
msgid "Columns"
msgstr ""
-#: src/data-list.c:799 src/data-list.c:923 src/print.c:799
+#: src/data-list.c:798 src/data-list.c:922 src/print.c:799
msgid "Format"
msgstr ""
-#: src/data-list.c:815
+#: src/data-list.c:814
#, c-format
msgid "Reading %d record from file %s."
msgid_plural "Reading %d records from file %s."
msgstr[0] ""
msgstr[1] ""
-#: src/data-list.c:819
+#: src/data-list.c:818
#, c-format
msgid "Reading %d record from the command file."
msgid_plural "Reading %d records from the command file."
msgstr[0] ""
msgstr[1] ""
-#: src/data-list.c:939
+#: src/data-list.c:938
#, c-format
msgid "Reading free-form data from file %s."
msgstr ""
-#: src/data-list.c:942
+#: src/data-list.c:941
msgid "Reading free-form data from the command file."
msgstr ""
-#: src/data-list.c:993
+#: src/data-list.c:992
#, c-format
msgid "Quoted string missing terminating `%c'."
msgstr ""
-#: src/data-list.c:1102
+#: src/data-list.c:1101
#, c-format
msgid "Partial case of %d of %d records discarded."
msgstr ""
-#: src/data-list.c:1156
+#: src/data-list.c:1155
#, c-format
msgid "Partial case discarded. The first variable missing was %s."
msgstr ""
-#: src/data-list.c:1200
+#: src/data-list.c:1199
#, c-format
msgid ""
"Missing value(s) for all variables from %s onward. These will be filled "
"with the system-missing value or blanks, as appropriate."
msgstr ""
-#: src/data-list.c:1278
+#: src/data-list.c:1277
msgid "Attempt to read past end of file."
msgstr ""
-#: src/data-list.c:1414
+#: src/data-list.c:1413
msgid ""
"REPEATING DATA must use the same file as its corresponding DATA LIST or FILE "
"TYPE."
msgstr ""
-#: src/data-list.c:1448
+#: src/data-list.c:1423 src/data-list.c:1458 src/data-list.c:1471
+#: src/data-list.c:1484 src/data-list.c:1517
+#, c-format
+msgid "%s subcommand given multiple times."
+msgstr ""
+
+#: src/data-list.c:1447
#, c-format
msgid "STARTS beginning column (%d) exceeds STARTS ending column (%d)."
msgstr ""
-#: src/data-list.c:1504
+#: src/data-list.c:1503
#, c-format
msgid "CONTINUED beginning column (%d) exceeds CONTINUED ending column (%d)."
msgstr ""
-#: src/data-list.c:1527
+#: src/data-list.c:1526
#, c-format
msgid "ID beginning column (%ld) must be positive."
msgstr ""
-#: src/data-list.c:1542
+#: src/data-list.c:1541
#, c-format
msgid "ID ending column (%ld) must be positive."
msgstr ""
-#: src/data-list.c:1548
+#: src/data-list.c:1547
#, c-format
msgid "ID ending column (%ld) cannot be less than ID beginning column (%d)."
msgstr ""
-#: src/data-list.c:1588
+#: src/data-list.c:1587
msgid "Missing required specification STARTS."
msgstr ""
-#: src/data-list.c:1590
+#: src/data-list.c:1589
msgid "Missing required specification OCCURS."
msgstr ""
-#: src/data-list.c:1597
+#: src/data-list.c:1596
msgid "ID specified without CONTINUED."
msgstr ""
-#: src/data-list.c:1689
+#: src/data-list.c:1688
msgid "String variable not allowed here."
msgstr ""
-#: src/data-list.c:1699
+#: src/data-list.c:1698
#, c-format
msgid "%s (%d) must be at least 1."
msgstr ""
-#: src/data-list.c:1705
+#: src/data-list.c:1704
#, c-format
msgid "Variable or integer expected for %s."
msgstr ""
-#: src/data-list.c:1843
+#: src/data-list.c:1842
#, c-format
msgid "Encountered mismatched record ID \"%s\" expecting \"%s\"."
msgstr ""
-#: src/data-list.c:1875
+#: src/data-list.c:1874
#, c-format
msgid ""
"Variable %s starting in column %d extends beyond physical record length of %"
"d."
msgstr ""
-#: src/data-list.c:1943
+#: src/data-list.c:1942
#, c-format
msgid "Invalid value %d for OCCURS."
msgstr ""
-#: src/data-list.c:1949
+#: src/data-list.c:1948
#, c-format
msgid "Beginning column for STARTS (%d) must be at least 1."
msgstr ""
-#: src/data-list.c:1957
+#: src/data-list.c:1956
#, c-format
msgid "Ending column for STARTS (%d) is less than beginning column (%d)."
msgstr ""
-#: src/data-list.c:1965
+#: src/data-list.c:1964
#, c-format
msgid "Invalid value %d for LENGTH."
msgstr ""
-#: src/data-list.c:1972
+#: src/data-list.c:1971
#, c-format
msgid "Beginning column for CONTINUED (%d) must be at least 1."
msgstr ""
-#: src/data-list.c:1980
+#: src/data-list.c:1979
#, c-format
msgid "Ending column for CONTINUED (%d) is less than beginning column (%d)."
msgstr ""
-#: src/data-list.c:2012
+#: src/data-list.c:2011
#, c-format
msgid ""
"Number of repetitions specified on OCCURS (%d) exceed number of repetitions "
"available in space on STARTS (%d), and CONTINUED not specified."
msgstr ""
-#: src/data-list.c:2030
+#: src/data-list.c:2029
#, c-format
msgid "Unexpected end of file with %d repetitions remaining out of %d."
msgstr ""
msgid "installation error"
msgstr ""
-#: src/filename.c:221
-#, c-format
-msgid "Searching for `%s'..."
-msgstr ""
-
-#: src/filename.c:229 src/filename.c:261
-msgid "Search unsuccessful!"
-msgstr ""
-
-#: src/filename.c:254
-#, c-format
-msgid "Found `%s'."
-msgstr ""
-
-#: src/filename.c:686
-#, c-format
-msgid "Not opening pipe file `%s' because SAFER option set."
-msgstr ""
-
#: src/file-type.c:129
msgid "MIXED, GROUPED, or NESTED expected."
msgstr ""
msgid "Unknown record type %g."
msgstr ""
-#: src/flip.c:81
+#: src/filename.c:221
+#, c-format
+msgid "Searching for `%s'..."
+msgstr ""
+
+#: src/filename.c:229 src/filename.c:261
+msgid "Search unsuccessful!"
+msgstr ""
+
+#: src/filename.c:254
+#, c-format
+msgid "Found `%s'."
+msgstr ""
+
+#: src/filename.c:686
+#, c-format
+msgid "Not opening pipe file `%s' because SAFER option set."
+msgstr ""
+
+#: src/flip.c:82
msgid ""
"FLIP ignores TEMPORARY. Temporary transformations will be made permanent."
msgstr ""
-#: src/flip.c:221
+#: src/flip.c:224
#, c-format
msgid "Could not create acceptable variant for variable %s."
msgstr ""
-#: src/flip.c:237
+#: src/flip.c:240
msgid "Cannot create more than 99999 variable names."
msgstr ""
-#: src/flip.c:281
+#: src/flip.c:284
msgid "Could not create temporary file for FLIP."
msgstr ""
-#: src/flip.c:288 src/flip.c:356
+#: src/flip.c:291 src/flip.c:359
#, c-format
msgid "Error writing FLIP file: %s."
msgstr ""
-#: src/flip.c:398
+#: src/flip.c:401
#, c-format
msgid "Error rewinding FLIP file: %s."
msgstr ""
-#: src/flip.c:402
+#: src/flip.c:405
msgid "Error creating FLIP source file."
msgstr ""
-#: src/flip.c:411
+#: src/flip.c:414
#, c-format
msgid "Error reading FLIP file: %s."
msgstr ""
-#: src/flip.c:432
+#: src/flip.c:435
#, c-format
msgid "Error seeking FLIP source file: %s."
msgstr ""
-#: src/flip.c:437
+#: src/flip.c:440
#, c-format
msgid "Error writing FLIP source file: %s."
msgstr ""
-#: src/flip.c:448
+#: src/flip.c:451
#, c-format
msgid "Error rewind FLIP source file: %s."
msgstr ""
-#: src/flip.c:500
+#: src/flip.c:503
#, c-format
msgid "Error reading FLIP temporary file: %s."
msgstr ""
-#: src/flip.c:503
+#: src/flip.c:506
msgid "Unexpected end of file reading FLIP temporary file."
msgstr ""
msgid "expecting filename"
msgstr ""
-#: src/inpt-pgm.c:82
+#: src/inpt-pgm.c:81
msgid "No matching INPUT PROGRAM command."
msgstr ""
-#: src/inpt-pgm.c:87
+#: src/inpt-pgm.c:86
msgid ""
"No data-input or transformation commands specified between INPUT PROGRAM and "
"END INPUT PROGRAM."
msgstr ""
-#: src/inpt-pgm.c:288 src/inpt-pgm.c:416
+#: src/inpt-pgm.c:284 src/inpt-pgm.c:412
msgid ""
"This command may only be executed between INPUT PROGRAM and END INPUT "
"PROGRAM."
msgstr ""
-#: src/inpt-pgm.c:338
+#: src/inpt-pgm.c:334
msgid "COLUMN subcommand multiply specified."
msgstr ""
-#: src/inpt-pgm.c:389
+#: src/inpt-pgm.c:385
msgid ""
"REREAD: Column numbers must be positive finite numbers. Column set to 1."
msgstr ""
msgid "End of line expected %s while reading %s."
msgstr ""
-#: src/matrix-data.c:1106
+#: src/matrix-data.c:1105
#, c-format
msgid "expecting value for %s %s"
msgstr ""
-#: src/matrix-data.c:1270
+#: src/matrix-data.c:1269
#, c-format
msgid "Syntax error expecting SPLIT FILE value %s."
msgstr ""
-#: src/matrix-data.c:1279
+#: src/matrix-data.c:1278
#, c-format
msgid "Expecting value %g for %s."
msgstr ""
-#: src/matrix-data.c:1320 src/matrix-data.c:1787
+#: src/matrix-data.c:1319 src/matrix-data.c:1786
#, c-format
msgid "Syntax error expecting factor value %s."
msgstr ""
-#: src/matrix-data.c:1329
+#: src/matrix-data.c:1328
#, c-format
msgid "Syntax error expecting value %g for %s %s."
msgstr ""
-#: src/matrix-data.c:1564
+#: src/matrix-data.c:1563
#, c-format
msgid "Syntax error %s expecting SPLIT FILE value."
msgstr ""
-#: src/matrix-data.c:1694
+#: src/matrix-data.c:1693
#, c-format
msgid ""
"Expected %d lines of data for %s content; actually saw %d lines. No data "
"will be output for this content."
msgstr ""
-#: src/matrix-data.c:1729
+#: src/matrix-data.c:1728
#, c-format
msgid "Multiply specified ROWTYPE_ %s."
msgstr ""
-#: src/matrix-data.c:1734
+#: src/matrix-data.c:1733
#, c-format
msgid "Syntax error %s expecting ROWTYPE_ string."
msgstr ""
-#: src/matrix-data.c:1754
+#: src/matrix-data.c:1753
#, c-format
msgid "Syntax error %s."
msgstr ""
-#: src/matrix-data.c:1904
+#: src/matrix-data.c:1903
#, c-format
msgid "Duplicate specification for %s."
msgstr ""
-#: src/matrix-data.c:1916
+#: src/matrix-data.c:1915
#, c-format
msgid "Too many rows of matrix data for %s."
msgstr ""
-#: src/matrix-data.c:1964
+#: src/matrix-data.c:1963
#, c-format
msgid "Syntax error expecting value for %s %s."
msgstr ""
msgid "%s: Writing system file: %s."
msgstr ""
-#: src/sort.c:197
+#: src/sort.c:203
msgid "`A' or `D' expected inside parentheses."
msgstr ""
-#: src/sort.c:202
+#: src/sort.c:208
msgid "`)' expected."
msgstr ""
-#: src/sort.c:552 src/sort.c:730
+#: src/sort.c:572 src/sort.c:750
#, c-format
msgid ""
"Out of memory. Could not allocate room for minimum of %d cases of %d bytes "
msgid "Documents in the active file:"
msgstr ""
-#: src/sysfile-info.c:374 src/sysfile-info.c:532 src/vfm.c:875
+#: src/sysfile-info.c:374 src/sysfile-info.c:532 src/vfm.c:832
msgid "Label"
msgstr ""
msgid "Missing Values: "
msgstr ""
-#: src/sysfile-info.c:531 src/vfm.c:874 src/crosstabs.q:1099
+#: src/sysfile-info.c:531 src/vfm.c:831 src/crosstabs.q:1099
#: src/crosstabs.q:1126 src/crosstabs.q:1146 src/crosstabs.q:1168
#: src/examine.q:1129 src/frequencies.q:1138 src/frequencies.q:1259
msgid "Value"
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2005-03-13 09:00+0800\n"
+"POT-Creation-Date: 2005-03-13 22:49-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"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-#: src/aggregate.c:180 src/aggregate.c:213 src/data-list.c:1424
-#: src/data-list.c:1459 src/data-list.c:1472 src/data-list.c:1485
-#: src/data-list.c:1518
-#, c-format
-msgid "%s subcommand given multiple times."
+#: src/aggregate.c:193
+msgid "while expecting COLUMNWISE"
msgstr ""
-#: src/aggregate.c:198
-msgid "while expecting COLUMNWISE"
+#: src/aggregate.c:225
+msgid "expecting BREAK"
msgstr ""
-#: src/aggregate.c:236
-msgid "BREAK subcommand not specified."
+#: src/aggregate.c:230
+msgid ""
+"When PRESORTED is specified, specifying sorting directions with (A) or (D) "
+"has no effect. Output data will be sorted the same way as the input data."
msgstr ""
-#: src/aggregate.c:390
+#: src/aggregate.c:387
msgid "expecting aggregation function"
msgstr ""
-#: src/aggregate.c:406
+#: src/aggregate.c:403
#, c-format
msgid "Unknown aggregation function %s."
msgstr ""
-#: src/aggregate.c:421
+#: src/aggregate.c:418
msgid "expecting `('"
msgstr ""
-#: src/aggregate.c:458
+#: src/aggregate.c:455
#, c-format
msgid "Missing argument %d to %s."
msgstr ""
-#: src/aggregate.c:466
+#: src/aggregate.c:463
#, c-format
msgid "Arguments to %s must be of same type as source variables."
msgstr ""
-#: src/aggregate.c:476
+#: src/aggregate.c:473
msgid "expecting `)'"
msgstr ""
-#: src/aggregate.c:488
+#: src/aggregate.c:485
#, c-format
msgid ""
"Number of source variables (%d) does not match number of target variables (%"
"d)."
msgstr ""
-#: src/aggregate.c:556
+#: src/aggregate.c:502
+#, 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/aggregate.c:570
#, c-format
msgid ""
"Variable name %s is not unique within the aggregate file dictionary, which "
msgstr ""
#: src/autorecode.c:139 src/command.c:791 src/compute.c:277
-#: src/data-list.c:410 src/data-list.c:900 src/data-list.c:1751
+#: src/data-list.c:409 src/data-list.c:899 src/data-list.c:1750
#: src/do-if.c:253 src/get.c:406 src/lexer.c:420 src/loop.c:241
#: src/matrix-data.c:527 src/print.c:335 src/print.c:1045 src/recode.c:405
#: src/sel-if.c:54 src/sel-if.c:131 src/vector.c:193 src/file-handle.q:140
msgid "Only one of FIXED, FREE, or LIST may be specified."
msgstr ""
-#: src/data-list.c:357 src/print.c:296
+#: src/data-list.c:356 src/print.c:296
#, c-format
msgid ""
"The record number specified, %ld, is before the previous record, %d. Data "
"fields must be listed in order of increasing record number."
msgstr ""
-#: src/data-list.c:386 src/data-list.c:1740
+#: src/data-list.c:385 src/data-list.c:1739
msgid ""
"SPSS-like or FORTRAN-like format specification expected after variable names."
msgstr ""
-#: src/data-list.c:397
+#: src/data-list.c:396
msgid "At least one variable must be specified."
msgstr ""
-#: src/data-list.c:402 src/print.c:328
+#: src/data-list.c:401 src/print.c:328
msgid ""
"Variables are specified on records that should not exist according to "
"RECORDS subcommand."
msgstr ""
-#: src/data-list.c:440 src/data-list.c:454 src/print.c:520 src/print.c:533
+#: src/data-list.c:439 src/data-list.c:453 src/print.c:520 src/print.c:533
msgid "Column positions for fields must be positive."
msgstr ""
-#: src/data-list.c:459
+#: src/data-list.c:458
msgid "The ending column for a field must be greater than the starting column."
msgstr ""
-#: src/data-list.c:473 src/print.c:610
+#: src/data-list.c:472 src/print.c:610
#, c-format
msgid "The %d columns %d-%d can't be evenly divided into %d fields."
msgstr ""
-#: src/data-list.c:493 src/print.c:561
+#: src/data-list.c:492 src/print.c:561
msgid "A format specifier on this line has extra characters on the end."
msgstr ""
-#: src/data-list.c:508 src/print.c:577
+#: src/data-list.c:507 src/print.c:577
msgid "The value for number of decimal places must be at least 1."
msgstr ""
-#: src/data-list.c:522 src/print.c:590
+#: src/data-list.c:521 src/print.c:590
#, c-format
msgid "Input format %s doesn't accept decimal places."
msgstr ""
-#: src/data-list.c:569 src/data-list.c:665 src/data-list.c:879
+#: src/data-list.c:568 src/data-list.c:664 src/data-list.c:878
#, c-format
msgid "%s is a duplicate variable name."
msgstr ""
-#: src/data-list.c:574
+#: src/data-list.c:573
#, c-format
msgid "There is already a variable %s of a different type."
msgstr ""
-#: src/data-list.c:581
+#: src/data-list.c:580
#, c-format
msgid "There is already a string variable %s of a different width."
msgstr ""
-#: src/data-list.c:656
+#: src/data-list.c:655
msgid ""
"The number of format specifications exceeds the given number of variable "
"names."
msgstr ""
-#: src/data-list.c:769 src/print.c:765
+#: src/data-list.c:768 src/print.c:765
msgid ""
"There aren't enough format specifications to match the number of variable "
"names given."
msgstr ""
-#: src/data-list.c:796 src/data-list.c:922 src/descript.c:880 src/print.c:796
-#: src/sysfile-info.c:134 src/sysfile-info.c:367 src/vfm.c:873
+#: src/data-list.c:795 src/data-list.c:921 src/descript.c:880 src/print.c:796
+#: src/sysfile-info.c:134 src/sysfile-info.c:367 src/vfm.c:830
msgid "Variable"
msgstr ""
-#: src/data-list.c:797 src/print.c:797
+#: src/data-list.c:796 src/print.c:797
msgid "Record"
msgstr ""
-#: src/data-list.c:798 src/print.c:798
+#: src/data-list.c:797 src/print.c:798
msgid "Columns"
msgstr ""
-#: src/data-list.c:799 src/data-list.c:923 src/print.c:799
+#: src/data-list.c:798 src/data-list.c:922 src/print.c:799
msgid "Format"
msgstr ""
-#: src/data-list.c:815
+#: src/data-list.c:814
#, c-format
msgid "Reading %d record from file %s."
msgid_plural "Reading %d records from file %s."
msgstr[0] ""
msgstr[1] ""
-#: src/data-list.c:819
+#: src/data-list.c:818
#, c-format
msgid "Reading %d record from the command file."
msgid_plural "Reading %d records from the command file."
msgstr[0] ""
msgstr[1] ""
-#: src/data-list.c:939
+#: src/data-list.c:938
#, c-format
msgid "Reading free-form data from file %s."
msgstr ""
-#: src/data-list.c:942
+#: src/data-list.c:941
msgid "Reading free-form data from the command file."
msgstr ""
-#: src/data-list.c:993
+#: src/data-list.c:992
#, c-format
msgid "Quoted string missing terminating `%c'."
msgstr ""
-#: src/data-list.c:1102
+#: src/data-list.c:1101
#, c-format
msgid "Partial case of %d of %d records discarded."
msgstr ""
-#: src/data-list.c:1156
+#: src/data-list.c:1155
#, c-format
msgid "Partial case discarded. The first variable missing was %s."
msgstr ""
-#: src/data-list.c:1200
+#: src/data-list.c:1199
#, c-format
msgid ""
"Missing value(s) for all variables from %s onward. These will be filled "
"with the system-missing value or blanks, as appropriate."
msgstr ""
-#: src/data-list.c:1278
+#: src/data-list.c:1277
msgid "Attempt to read past end of file."
msgstr ""
-#: src/data-list.c:1414
+#: src/data-list.c:1413
msgid ""
"REPEATING DATA must use the same file as its corresponding DATA LIST or FILE "
"TYPE."
msgstr ""
-#: src/data-list.c:1448
+#: src/data-list.c:1423 src/data-list.c:1458 src/data-list.c:1471
+#: src/data-list.c:1484 src/data-list.c:1517
+#, c-format
+msgid "%s subcommand given multiple times."
+msgstr ""
+
+#: src/data-list.c:1447
#, c-format
msgid "STARTS beginning column (%d) exceeds STARTS ending column (%d)."
msgstr ""
-#: src/data-list.c:1504
+#: src/data-list.c:1503
#, c-format
msgid "CONTINUED beginning column (%d) exceeds CONTINUED ending column (%d)."
msgstr ""
-#: src/data-list.c:1527
+#: src/data-list.c:1526
#, c-format
msgid "ID beginning column (%ld) must be positive."
msgstr ""
-#: src/data-list.c:1542
+#: src/data-list.c:1541
#, c-format
msgid "ID ending column (%ld) must be positive."
msgstr ""
-#: src/data-list.c:1548
+#: src/data-list.c:1547
#, c-format
msgid "ID ending column (%ld) cannot be less than ID beginning column (%d)."
msgstr ""
-#: src/data-list.c:1588
+#: src/data-list.c:1587
msgid "Missing required specification STARTS."
msgstr ""
-#: src/data-list.c:1590
+#: src/data-list.c:1589
msgid "Missing required specification OCCURS."
msgstr ""
-#: src/data-list.c:1597
+#: src/data-list.c:1596
msgid "ID specified without CONTINUED."
msgstr ""
-#: src/data-list.c:1689
+#: src/data-list.c:1688
msgid "String variable not allowed here."
msgstr ""
-#: src/data-list.c:1699
+#: src/data-list.c:1698
#, c-format
msgid "%s (%d) must be at least 1."
msgstr ""
-#: src/data-list.c:1705
+#: src/data-list.c:1704
#, c-format
msgid "Variable or integer expected for %s."
msgstr ""
-#: src/data-list.c:1843
+#: src/data-list.c:1842
#, c-format
msgid "Encountered mismatched record ID \"%s\" expecting \"%s\"."
msgstr ""
-#: src/data-list.c:1875
+#: src/data-list.c:1874
#, c-format
msgid ""
"Variable %s starting in column %d extends beyond physical record length of %"
"d."
msgstr ""
-#: src/data-list.c:1943
+#: src/data-list.c:1942
#, c-format
msgid "Invalid value %d for OCCURS."
msgstr ""
-#: src/data-list.c:1949
+#: src/data-list.c:1948
#, c-format
msgid "Beginning column for STARTS (%d) must be at least 1."
msgstr ""
-#: src/data-list.c:1957
+#: src/data-list.c:1956
#, c-format
msgid "Ending column for STARTS (%d) is less than beginning column (%d)."
msgstr ""
-#: src/data-list.c:1965
+#: src/data-list.c:1964
#, c-format
msgid "Invalid value %d for LENGTH."
msgstr ""
-#: src/data-list.c:1972
+#: src/data-list.c:1971
#, c-format
msgid "Beginning column for CONTINUED (%d) must be at least 1."
msgstr ""
-#: src/data-list.c:1980
+#: src/data-list.c:1979
#, c-format
msgid "Ending column for CONTINUED (%d) is less than beginning column (%d)."
msgstr ""
-#: src/data-list.c:2012
+#: src/data-list.c:2011
#, c-format
msgid ""
"Number of repetitions specified on OCCURS (%d) exceed number of repetitions "
"available in space on STARTS (%d), and CONTINUED not specified."
msgstr ""
-#: src/data-list.c:2030
+#: src/data-list.c:2029
#, c-format
msgid "Unexpected end of file with %d repetitions remaining out of %d."
msgstr ""
msgid "installation error"
msgstr ""
-#: src/filename.c:221
-#, c-format
-msgid "Searching for `%s'..."
-msgstr ""
-
-#: src/filename.c:229 src/filename.c:261
-msgid "Search unsuccessful!"
-msgstr ""
-
-#: src/filename.c:254
-#, c-format
-msgid "Found `%s'."
-msgstr ""
-
-#: src/filename.c:686
-#, c-format
-msgid "Not opening pipe file `%s' because SAFER option set."
-msgstr ""
-
#: src/file-type.c:129
msgid "MIXED, GROUPED, or NESTED expected."
msgstr ""
msgid "Unknown record type %g."
msgstr ""
-#: src/flip.c:81
+#: src/filename.c:221
+#, c-format
+msgid "Searching for `%s'..."
+msgstr ""
+
+#: src/filename.c:229 src/filename.c:261
+msgid "Search unsuccessful!"
+msgstr ""
+
+#: src/filename.c:254
+#, c-format
+msgid "Found `%s'."
+msgstr ""
+
+#: src/filename.c:686
+#, c-format
+msgid "Not opening pipe file `%s' because SAFER option set."
+msgstr ""
+
+#: src/flip.c:82
msgid ""
"FLIP ignores TEMPORARY. Temporary transformations will be made permanent."
msgstr ""
-#: src/flip.c:221
+#: src/flip.c:224
#, c-format
msgid "Could not create acceptable variant for variable %s."
msgstr ""
-#: src/flip.c:237
+#: src/flip.c:240
msgid "Cannot create more than 99999 variable names."
msgstr ""
-#: src/flip.c:281
+#: src/flip.c:284
msgid "Could not create temporary file for FLIP."
msgstr ""
-#: src/flip.c:288 src/flip.c:356
+#: src/flip.c:291 src/flip.c:359
#, c-format
msgid "Error writing FLIP file: %s."
msgstr ""
-#: src/flip.c:398
+#: src/flip.c:401
#, c-format
msgid "Error rewinding FLIP file: %s."
msgstr ""
-#: src/flip.c:402
+#: src/flip.c:405
msgid "Error creating FLIP source file."
msgstr ""
-#: src/flip.c:411
+#: src/flip.c:414
#, c-format
msgid "Error reading FLIP file: %s."
msgstr ""
-#: src/flip.c:432
+#: src/flip.c:435
#, c-format
msgid "Error seeking FLIP source file: %s."
msgstr ""
-#: src/flip.c:437
+#: src/flip.c:440
#, c-format
msgid "Error writing FLIP source file: %s."
msgstr ""
-#: src/flip.c:448
+#: src/flip.c:451
#, c-format
msgid "Error rewind FLIP source file: %s."
msgstr ""
-#: src/flip.c:500
+#: src/flip.c:503
#, c-format
msgid "Error reading FLIP temporary file: %s."
msgstr ""
-#: src/flip.c:503
+#: src/flip.c:506
msgid "Unexpected end of file reading FLIP temporary file."
msgstr ""
msgid "expecting filename"
msgstr ""
-#: src/inpt-pgm.c:82
+#: src/inpt-pgm.c:81
msgid "No matching INPUT PROGRAM command."
msgstr ""
-#: src/inpt-pgm.c:87
+#: src/inpt-pgm.c:86
msgid ""
"No data-input or transformation commands specified between INPUT PROGRAM and "
"END INPUT PROGRAM."
msgstr ""
-#: src/inpt-pgm.c:288 src/inpt-pgm.c:416
+#: src/inpt-pgm.c:284 src/inpt-pgm.c:412
msgid ""
"This command may only be executed between INPUT PROGRAM and END INPUT "
"PROGRAM."
msgstr ""
-#: src/inpt-pgm.c:338
+#: src/inpt-pgm.c:334
msgid "COLUMN subcommand multiply specified."
msgstr ""
-#: src/inpt-pgm.c:389
+#: src/inpt-pgm.c:385
msgid ""
"REREAD: Column numbers must be positive finite numbers. Column set to 1."
msgstr ""
msgid "End of line expected %s while reading %s."
msgstr ""
-#: src/matrix-data.c:1106
+#: src/matrix-data.c:1105
#, c-format
msgid "expecting value for %s %s"
msgstr ""
-#: src/matrix-data.c:1270
+#: src/matrix-data.c:1269
#, c-format
msgid "Syntax error expecting SPLIT FILE value %s."
msgstr ""
-#: src/matrix-data.c:1279
+#: src/matrix-data.c:1278
#, c-format
msgid "Expecting value %g for %s."
msgstr ""
-#: src/matrix-data.c:1320 src/matrix-data.c:1787
+#: src/matrix-data.c:1319 src/matrix-data.c:1786
#, c-format
msgid "Syntax error expecting factor value %s."
msgstr ""
-#: src/matrix-data.c:1329
+#: src/matrix-data.c:1328
#, c-format
msgid "Syntax error expecting value %g for %s %s."
msgstr ""
-#: src/matrix-data.c:1564
+#: src/matrix-data.c:1563
#, c-format
msgid "Syntax error %s expecting SPLIT FILE value."
msgstr ""
-#: src/matrix-data.c:1694
+#: src/matrix-data.c:1693
#, c-format
msgid ""
"Expected %d lines of data for %s content; actually saw %d lines. No data "
"will be output for this content."
msgstr ""
-#: src/matrix-data.c:1729
+#: src/matrix-data.c:1728
#, c-format
msgid "Multiply specified ROWTYPE_ %s."
msgstr ""
-#: src/matrix-data.c:1734
+#: src/matrix-data.c:1733
#, c-format
msgid "Syntax error %s expecting ROWTYPE_ string."
msgstr ""
-#: src/matrix-data.c:1754
+#: src/matrix-data.c:1753
#, c-format
msgid "Syntax error %s."
msgstr ""
-#: src/matrix-data.c:1904
+#: src/matrix-data.c:1903
#, c-format
msgid "Duplicate specification for %s."
msgstr ""
-#: src/matrix-data.c:1916
+#: src/matrix-data.c:1915
#, c-format
msgid "Too many rows of matrix data for %s."
msgstr ""
-#: src/matrix-data.c:1964
+#: src/matrix-data.c:1963
#, c-format
msgid "Syntax error expecting value for %s %s."
msgstr ""
msgid "%s: Writing system file: %s."
msgstr ""
-#: src/sort.c:197
+#: src/sort.c:203
msgid "`A' or `D' expected inside parentheses."
msgstr ""
-#: src/sort.c:202
+#: src/sort.c:208
msgid "`)' expected."
msgstr ""
-#: src/sort.c:552 src/sort.c:730
+#: src/sort.c:572 src/sort.c:750
#, c-format
msgid ""
"Out of memory. Could not allocate room for minimum of %d cases of %d bytes "
msgid "Documents in the active file:"
msgstr ""
-#: src/sysfile-info.c:374 src/sysfile-info.c:532 src/vfm.c:875
+#: src/sysfile-info.c:374 src/sysfile-info.c:532 src/vfm.c:832
msgid "Label"
msgstr ""
msgid "Missing Values: "
msgstr ""
-#: src/sysfile-info.c:531 src/vfm.c:874 src/crosstabs.q:1099
+#: src/sysfile-info.c:531 src/vfm.c:831 src/crosstabs.q:1099
#: src/crosstabs.q:1126 src/crosstabs.q:1146 src/crosstabs.q:1168
#: src/examine.q:1129 src/frequencies.q:1138 src/frequencies.q:1259
msgid "Value"
+Sun Mar 13 22:52:05 2005 Ben Pfaff <blp@gnu.org>
+
+ * file-handle.q: (struct file_handle) `open_mode' should not be
+ const.
+
+Sun Mar 13 22:40:54 2005 Ben Pfaff <blp@gnu.org>
+
+ First phase of making SORT CASES stable (PR 12035).
+
+ * sort.c: (struct indexed_case) New structure.
+ (do_internal_sort) Rewrite to make internal sorting stable.
+ (compare_case_dblptrs) Removed.
+ (compare_indexed_cases) New function.
+
+Sun Mar 13 22:38:40 2005 Ben Pfaff <blp@gnu.org>
+
+ Clean-ups.
+
+ * casefile.c: (casereader_read_xfer_assert) New function.
+
+ * dictionary.c: (dict_compact_case) New function.
+
+ * flip.c: (struct flip_pgm) New member idx_to_fv.
+ (cmd_flip) Initialize idx_to_fv member.
+ (destroy_flip_pgm) Free idx_to_fv member.
+ (flip_sink_write) Use struct flip_pgm member instead of case_sink
+ member.
+ (flip_sink_write) Ditto.
+
+ * vfm.c: (write_case) Use dict_compact_case() instead of
+ compact_case().
+ (compact_case) Removed.
+ (storage_source_create) Removed `dict' parameter. All references
+ updated.
+
+ * vfm.h: (struct case_source) Removed `value_cnt' member. All
+ references removed.
+ (struct case_sink) Removed `dict', `idx_to_fv' members. All
+ references removed.
+
+Sun Mar 13 22:35:55 2005 Ben Pfaff <blp@gnu.org>
+
+ More AGGREGATE fixes.
+
+ * aggregate.c: (accumulate_aggregate_info) Implement NMISS and
+ NUMISS for strings. Fix FOUT, POUT, FGT, FLT, FIN, FOUT for
+ strings.
+ (initialize_aggregate_info) Fix initialization for MIN, MAX for
+ strings.
+
Sat Mar 12 23:26:21 2005 Ben Pfaff <blp@gnu.org>
Start work on testing and debugging AGGREGATE.
switch (iter->function)
{
case NMISS:
+ case NMISS | FSTRING:
iter->dbl[0] += weight;
break;
case NUMISS:
+ case NUMISS | FSTRING:
iter->int1++;
break;
}
case FOUT | FSTRING:
case POUT | FSTRING:
if (memcmp (iter->arg[0].c, v->s, iter->src->width) > 0
- && memcmp (iter->arg[1].c, v->s, iter->src->width) < 0)
+ || memcmp (iter->arg[1].c, v->s, iter->src->width) < 0)
iter->dbl[0] += weight;
iter->dbl[1] += weight;
break;
else
memset (v->s, ' ', i->dest->width);
break;
- case FGT | FSTRING:
- case FLT | FSTRING:
- case FIN | FSTRING:
- case FOUT | FSTRING:
- v->f = i->int2 ? (double) i->int1 / (double) i->int2 : SYSMIS;
- break;
case FGT:
+ case FGT | FSTRING:
case FLT:
+ case FLT | FSTRING:
case FIN:
+ case FIN | FSTRING:
case FOUT:
+ case FOUT | FSTRING:
v->f = i->dbl[1] ? i->dbl[0] / i->dbl[1] : SYSMIS;
break;
case PGT:
for (iter = agr->agr_vars; iter; iter = iter->next)
{
iter->missing = 0;
+ iter->dbl[0] = iter->dbl[1] = iter->dbl[2] = 0.0;
+ iter->int1 = iter->int2 = 0;
switch (iter->function)
{
case MIN:
iter->dbl[0] = DBL_MAX;
- iter->int1 = 0;
break;
case MIN | FSTRING:
memset (iter->string, 255, iter->src->width);
break;
case MAX:
iter->dbl[0] = -DBL_MAX;
- iter->int1 = 0;
break;
case MAX | FSTRING:
memset (iter->string, 0, iter->src->width);
else
moments1_clear (iter->moments);
break;
- default:
- iter->dbl[0] = iter->dbl[1] = iter->dbl[2] = 0.0;
- iter->int1 = iter->int2 = 0;
- break;
+ default:
+ break;
}
}
}
}
/* Reads a copy of the next case from READER into C.
- Caller is responsible for destroying C. */
+ Caller is responsible for destroying C.
+ Returns true if successful, false at end of file. */
int
casereader_read (struct casereader *reader, struct ccase *c)
{
}
/* Reads the next case from READER into C and transfers ownership
- to the caller. Caller is responsible for destroying C. */
+ to the caller. Caller is responsible for destroying C.
+ Returns true if successful, false at end of file. */
int
casereader_read_xfer (struct casereader *reader, struct ccase *c)
{
}
}
+/* Reads the next case from READER into C and transfers ownership
+ to the caller. Caller is responsible for destroying C.
+ Assert-fails at end of file. */
+void
+casereader_read_xfer_assert (struct casereader *reader, struct ccase *c)
+{
+ bool success = casereader_read_xfer (reader, c);
+ assert (success);
+}
+
/* Destroys READER. */
void
casereader_destroy (struct casereader *reader)
#define HEADER_CASEFILE
#include <stddef.h>
+#include "bool.h"
struct ccase;
struct casefile;
const struct casefile *casereader_get_casefile (const struct casereader *);
int casereader_read (struct casereader *, struct ccase *);
int casereader_read_xfer (struct casereader *, struct ccase *);
+void casereader_read_xfer_assert (struct casereader *, struct ccase *);
void casereader_destroy (struct casereader *);
unsigned long casereader_cnum(const struct casereader *);
add_transformation (&new_pgm->h);
}
else
- vfm_source = create_case_source (&data_list_source_class,
- default_dict, dls);
+ vfm_source = create_case_source (&data_list_source_class, dls);
return CMD_SUCCESS;
}
}
+/* Copies values from SRC, which represents a case arranged
+ according to dictionary D, to DST, which represents a case
+ arranged according to the dictionary that will be produced by
+ dict_compact_values(D). */
+void
+dict_compact_case (const struct dictionary *d,
+ struct ccase *dst, const struct ccase *src)
+{
+ size_t i;
+ size_t value_idx;
+
+ value_idx = 0;
+ for (i = 0; i < d->var_cnt; i++)
+ {
+ struct variable *v = d->var[i];
+
+ if (dict_class_from_id (v->name) != DC_SCRATCH)
+ {
+ case_copy (dst, value_idx, src, v->fv, v->nv);
+ value_idx += v->nv;
+ }
+ }
+}
+
/* Returns the number of values that would be used by a case if
dict_compact_values() were called. */
size_t
size_t dict_get_case_size (const struct dictionary *);
void dict_compact_values (struct dictionary *);
+void dict_compact_case (const struct dictionary *,
+ struct ccase *, const struct ccase *);
size_t dict_get_compacted_value_cnt (const struct dictionary *);
int *dict_get_compacted_idx_to_fv (const struct dictionary *);
int open_cnt; /* 0=not open, otherwise # of openers. */
const char *type; /* If open, type of file. */
- const char open_mode[3]; /* "[rw][se]". */
+ char open_mode[3]; /* "[rw][se]". */
void *aux; /* Aux data pointer for owner if any. */
};
create_col_var (&fty->record);
if (fty->case_sbc.name[0])
create_col_var (&fty->case_sbc);
- vfm_source = create_case_source (&file_type_source_class, default_dict, fty);
+ vfm_source = create_case_source (&file_type_source_class, fty);
return CMD_SUCCESS;
struct flip_pgm
{
struct variable **var; /* Variables to transpose. */
+ int *idx_to_fv; /* var[]->index to compacted sink case fv. */
int var_cnt; /* Number of elements in `var'. */
int case_cnt; /* Pre-flip case count. */
size_t case_size; /* Post-flip bytes per case. */
flip = xmalloc (sizeof *flip);
flip->var = NULL;
+ flip->idx_to_fv = dict_get_compacted_idx_to_fv (default_dict);
flip->var_cnt = 0;
flip->case_cnt = 0;
flip->new_names = NULL;
struct varname *iter, *next;
free (flip->var);
+ free (flip->idx_to_fv);
for (iter = flip->new_names_head; iter != NULL; iter = next)
{
next = iter->next;
v->next = NULL;
if (flip->new_names->type == NUMERIC)
{
- double f = case_num (c, sink->idx_to_fv[flip->new_names->index]);
+ double f = case_num (c, flip->idx_to_fv[flip->new_names->index]);
if (f == SYSMIS)
strcpy (v->name, "VSYSMIS");
else
{
int width = min (flip->new_names->width, 8);
- memcpy (v->name, case_str (c, sink->idx_to_fv[flip->new_names->index]),
+ memcpy (v->name, case_str (c, flip->idx_to_fv[flip->new_names->index]),
width);
v->name[width] = 0;
}
double out;
if (flip->var[i]->type == NUMERIC)
- out = case_num (c, sink->idx_to_fv[flip->var[i]->index]);
+ out = case_num (c, flip->idx_to_fv[flip->var[i]->index]);
else
out = SYSMIS;
info->output_buf[i].f = out;
static struct case_source *
flip_source_create (struct flip_pgm *pgm)
{
- return create_case_source (&flip_source_class, default_dict, pgm);
+ return create_case_source (&flip_source_class, pgm);
}
/* Reads the FLIP stream. Copies each case into C and calls
dict_destroy (default_dict);
default_dict = dict;
- vfm_source = create_case_source (&get_source_class, default_dict, pgm);
+ vfm_source = create_case_source (&get_source_class, pgm);
return CMD_SUCCESS;
dict_destroy (default_dict);
default_dict = dict;
- vfm_source = create_case_source (&import_source_class, default_dict, pgm);
+ vfm_source = create_case_source (&import_source_class, pgm);
return CMD_SUCCESS;
/* FIXME: we shouldn't do this here, but I'm afraid that other
code will check the class of vfm_source. */
- vfm_source = create_case_source (&input_program_source_class,
- default_dict, NULL);
+ vfm_source = create_case_source (&input_program_source_class, NULL);
return lex_end_of_command ();
}
/* Put inp into vfm_source for later use. */
vfm_source->aux = inp;
- /* FIXME: we should use create_case_source() here. */
- vfm_source->value_cnt = dict_get_next_value_idx (default_dict);
-
return lex_end_of_command ();
}
nr.split_values = xmalloc (sizeof *nr.split_values
* dict_get_split_cnt (default_dict));
- vfm_source = create_case_source (&matrix_data_without_rowtype_source_class,
- default_dict, &nr);
+ vfm_source = create_case_source (&matrix_data_without_rowtype_source_class, &nr);
procedure (NULL, NULL);
mx->cells = 0;
vfm_source = create_case_source (&matrix_data_with_rowtype_source_class,
- default_dict, &wr);
+ &wr);
procedure (NULL, NULL);
free (wr.split_values);
size_t crit_cnt;
};
-static int compare_case_dblptrs (const void *, const void *, void *);
static int compare_record (const struct ccase *, const struct ccase *,
const struct sort_criteria *);
static struct casefile *do_internal_sort (struct casereader *,
if (dst == NULL)
return 0;
- vfm_source = storage_source_create (dst, default_dict);
+ vfm_source = storage_source_create (dst);
return 1;
}
return output;
}
\f
+/* A case and its index. */
+struct indexed_case
+ {
+ struct ccase c; /* Case. */
+ unsigned long idx; /* Index to allow for stable sorting. */
+ };
+
+static int compare_indexed_cases (const void *, const void *, void *);
+
/* If the data is in memory, do an internal sort and return a new
casefile for the data. */
static struct casefile *
{
const struct casefile *src;
struct casefile *dst;
- struct ccase *cases, **case_ptrs;
unsigned long case_cnt;
src = casereader_get_casefile (reader);
return NULL;
case_cnt = casefile_get_case_cnt (src);
- cases = malloc (sizeof *cases * case_cnt);
- case_ptrs = malloc (sizeof *case_ptrs * case_cnt);
- if ((cases != NULL && case_ptrs != NULL) || case_cnt == 0)
+ dst = casefile_create (casefile_get_value_cnt (src));
+ if (case_cnt != 0)
{
- unsigned long case_idx;
+ struct indexed_case *cases = malloc (sizeof *cases * case_cnt);
+ if (cases != NULL)
+ {
+ unsigned long i;
+
+ for (i = 0; i < case_cnt; i++)
+ {
+ casereader_read_xfer_assert (reader, &cases[i].c);
+ cases[i].idx = i;
+ }
+
+ sort (cases, case_cnt, sizeof *cases, compare_indexed_cases,
+ (void *) criteria);
- for (case_idx = 0; case_idx < case_cnt; case_idx++)
+ for (i = 0; i < case_cnt; i++)
+ casefile_append_xfer (dst, &cases[i].c);
+
+ free (cases);
+ }
+ else
{
- int success = casereader_read_xfer (reader, &cases[case_idx]);
- assert (success);
- case_ptrs[case_idx] = &cases[case_idx];
+ /* Failure. */
+ casefile_destroy (dst);
+ dst = NULL;
}
-
- sort (case_ptrs, case_cnt, sizeof *case_ptrs, compare_case_dblptrs,
- (void *) criteria);
-
- dst = casefile_create (casefile_get_value_cnt (src));
- for (case_idx = 0; case_idx < case_cnt; case_idx++)
- casefile_append_xfer (dst, case_ptrs[case_idx]);
}
- else
- dst = NULL;
-
- free (case_ptrs);
- free (cases);
return dst;
}
/* Compares the variables specified by CRITERIA between the cases
- at A and B, and returns a strcmp()-type result. */
+ at A and B, with a "last resort" comparison for stability, and
+ returns a strcmp()-type result. */
static int
-compare_case_dblptrs (const void *a_, const void *b_, void *criteria_)
+compare_indexed_cases (const void *a_, const void *b_, void *criteria_)
{
struct sort_criteria *criteria = criteria_;
- struct ccase *const *pa = a_;
- struct ccase *const *pb = b_;
- struct ccase *a = *pa;
- struct ccase *b = *pb;
-
- return compare_record (a, b, criteria);
+ const struct indexed_case *a = a_;
+ const struct indexed_case *b = b_;
+ int result = compare_record (&a->c, &b->c, criteria);
+ if (result == 0)
+ result = a->idx < b->idx ? -1 : a->idx > b->idx;
+ return result;
}
\f
/* External sort. */
int case_num);
static int filter_case (const struct ccase *c, int case_num);
static void lag_case (const struct ccase *c);
-static void compact_case (struct ccase *dest, const struct ccase *src);
static void clear_case (struct ccase *c);
static void close_active_file (void);
\f
{
if (compaction_necessary)
{
- compact_case (&wc_data->sink_case, &wc_data->trns_case);
+ dict_compact_case (temp_dict, &wc_data->sink_case, &wc_data->trns_case);
vfm_sink->class->write (vfm_sink, &wc_data->sink_case);
}
else
lag_head = 0;
}
-/* Copies case SRC to case DEST, compacting it in the process. */
-static void
-compact_case (struct ccase *dest, const struct ccase *src)
-{
- int i;
- int nval = 0;
- size_t var_cnt;
-
- assert (compaction_necessary);
-
- /* Copy all the variables except scratch variables from SRC to
- DEST. */
- /* FIXME: this should be temp_dict not default_dict I guess. */
- var_cnt = dict_get_var_cnt (default_dict);
- for (i = 0; i < var_cnt; i++)
- {
- struct variable *v = dict_get_var (default_dict, i);
-
- if (dict_class_from_id (v->name) == DC_SCRATCH)
- continue;
-
- if (v->type == NUMERIC)
- {
- case_data_rw (dest, nval)->f = case_num (src, v->fv);
- nval++;
- }
- else
- {
- int w = DIV_RND_UP (v->width, sizeof (union value));
-
- memcpy (case_data_rw (dest, nval), case_str (src, v->fv),
- w * sizeof (union value));
- nval += w;
- }
- }
-}
-
/* Clears the variables in C that need to be cleared between
processing cases. */
static void
storage_sink_make_source (struct case_sink *sink)
{
struct case_source *source
- = create_case_source (&storage_source_class, sink->dict, sink->aux);
+ = create_case_source (&storage_source_class, sink->aux);
sink->aux = NULL;
return source;
}
}
struct case_source *
-storage_source_create (struct casefile *cf, const struct dictionary *dict)
+storage_source_create (struct casefile *cf)
{
struct storage_stream_info *info;
info = xmalloc (sizeof *info);
info->casefile = cf;
- return create_case_source (&storage_source_class, dict, info);
+ return create_case_source (&storage_source_class, info);
}
\f
/* Null sink. Used by a few procedures that keep track of output
and based on dictionary DICT. */
struct case_source *
create_case_source (const struct case_source_class *class,
- const struct dictionary *dict,
void *aux)
{
struct case_source *source = xmalloc (sizeof *source);
source->class = class;
- source->value_cnt = dict_get_next_value_idx (dict);
source->aux = aux;
return source;
}
return source != NULL && source->class == class;
}
-/* Creates a case sink with class CLASS and auxiliary data
- AUX. */
+/* Creates a case sink to accept cases from the given DICT with
+ class CLASS and auxiliary data AUX. */
struct case_sink *
create_case_sink (const struct case_sink_class *class,
const struct dictionary *dict,
{
struct case_sink *sink = xmalloc (sizeof *sink);
sink->class = class;
- sink->dict = dict;
- sink->idx_to_fv = dict_get_compacted_idx_to_fv (dict);
sink->value_cnt = dict_get_compacted_value_cnt (dict);
sink->aux = aux;
return sink;
{
if (sink->class->destroy != NULL)
sink->class->destroy (sink);
- free (sink->idx_to_fv);
free (sink);
}
}
struct case_source
{
const struct case_source_class *class; /* Class. */
- size_t value_cnt; /* Number of `union value's in case. */
void *aux; /* Auxiliary data. */
};
struct dictionary;
struct case_source *create_case_source (const struct case_source_class *,
- const struct dictionary *,
void *);
void free_case_source (struct case_source *);
const struct case_source_class *);
struct casefile *storage_source_get_casefile (struct case_source *);
-struct case_source *storage_source_create (struct casefile *,
- const struct dictionary *);
+struct case_source *storage_source_create (struct casefile *);
\f
/* The replacement active file, to which cases are written. */
extern struct case_sink *vfm_sink;
{
const struct case_sink_class *class; /* Class. */
void *aux; /* Auxiliary data. */
-
- /* Cases written to a case sink belong to a dictionary, but
- their data is compacted to drop scratch variables. */
- const struct dictionary *dict; /* Dictionary for cases. */
- int *idx_to_fv; /* `dict' index -> case `data' index. */
size_t value_cnt; /* Number of `union value's in case. */
};