From c41f14854e73ad44824b54933ae96eb52f781fc2 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Wed, 2 Jan 2008 03:46:42 +0000 Subject: [PATCH] Closes patch #6359 --- doc/dev/concepts.texi | 14 +- po/de.po | 496 +++++++++++++++---------------- po/en_GB.po | 492 +++++++++++++++--------------- src/data/ChangeLog | 6 + src/data/variable.c | 23 +- src/data/variable.h | 8 +- src/language/stats/ChangeLog | 5 + src/language/stats/binomial.c | 18 +- src/language/stats/chisquare.c | 15 +- src/language/stats/examine.q | 177 +++++++---- src/language/stats/frequencies.q | 9 +- src/language/stats/oneway.q | 20 +- src/language/stats/regression.q | 24 +- src/output/charts/piechart.c | 4 +- src/output/charts/piechart.h | 4 +- 15 files changed, 711 insertions(+), 604 deletions(-) diff --git a/doc/dev/concepts.texi b/doc/dev/concepts.texi index b1d8583b..29d2b584 100644 --- a/doc/dev/concepts.texi +++ b/doc/dev/concepts.texi @@ -1359,16 +1359,12 @@ Looks for a label for @var{value} in @var{var}'s set of value labels. Returns the label if one exists, otherwise a null pointer. @end deftypefun -@deftypefun {const char *} var_get_value_name (const struct variable *@var{var}, const union value *@var{value}) +@deftypefun void var_append_value_name (const struct variable *@var{var}, const union value *@var{value}, struct string *@var{str}) Looks for a label for @var{value} in @var{var}'s set of value labels. -Returns the label if one exists. If none exists, formats @var{label} -using @var{var}'s print format (@pxref{Input and Output Formats}) in a -static buffer and returns the buffer. - -@quotation Important -This function's use of a static buffer means that it must be used with -care. -@end quotation +If a label exists, it will be appended to the string pointed to by @var{str}. +Otherwise, it formats @var{value} +using @var{var}'s print format (@pxref{Input and Output Formats}) +and appends the formatted string. @end deftypefun The underlying @struct{val_labs} structure may also be accessed diff --git a/po/de.po b/po/de.po index 0a475991..4e9bb2ff 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: PSPP 0.4.3\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2007-12-19 08:29+0900\n" +"POT-Creation-Date: 2008-01-02 12:21+0900\n" "PO-Revision-Date: 2006-07-28 19:32+0800\n" "Last-Translator: John Darrington \n" "Language-Team: German \n" @@ -47,12 +47,6 @@ msgstr "Tag %d muß zwischen 0 bit 31 sein." msgid "Date %04d-%d-%d is before the earliest acceptable date of 1582-10-15." msgstr "" -#: src/data/casereader-filter.c:221 -msgid "" -"At least one case in the data read had a weight value that was user-missing, " -"system-missing, zero, or negative. These case(s) were ignored." -msgstr "" - #: src/data/case-tmpfile.c:57 msgid "failed to create temporary file" msgstr "" @@ -73,6 +67,12 @@ msgstr "plotzlich ist der Datei beendet" msgid "writing to temporary file" msgstr "" +#: src/data/casereader-filter.c:221 +msgid "" +"At least one case in the data read had a weight value that was user-missing, " +"system-missing, zero, or negative. These case(s) were ignored." +msgstr "" + #: src/data/data-in.c:287 src/data/data-in.c:477 msgid "Field contents are not numeric." msgstr "" @@ -320,14 +320,14 @@ msgid "%s variables are not compatible with %s format %s." msgstr "" #: src/data/format.c:318 src/data/sys-file-reader.c:639 -#: src/ui/gui/data-editor.glade:1304 src/ui/gui/psppire.glade:2176 -#: src/ui/gui/psppire-var-store.c:493 +#: src/ui/gui/data-editor.glade:1304 src/ui/gui/psppire-var-store.c:493 +#: src/ui/gui/psppire.glade:2176 msgid "String" msgstr "Zeichenkette" #: src/data/format.c:318 src/data/sys-file-reader.c:639 -#: src/ui/gui/data-editor.glade:1193 src/ui/gui/psppire.glade:2131 -#: src/ui/gui/psppire-var-store.c:486 +#: src/ui/gui/data-editor.glade:1193 src/ui/gui/psppire-var-store.c:486 +#: src/ui/gui/psppire.glade:2131 msgid "Numeric" msgstr "Nummer" @@ -477,92 +477,92 @@ msgstr "" msgid "%s: Not a portable file." msgstr "" -#: src/data/por-file-reader.c:518 +#: src/data/por-file-reader.c:519 #, c-format msgid "Unrecognized version code `%c'." msgstr "" -#: src/data/por-file-reader.c:527 +#: src/data/por-file-reader.c:528 #, c-format msgid "Bad date string length %zu." msgstr "" -#: src/data/por-file-reader.c:529 +#: src/data/por-file-reader.c:530 #, c-format msgid "Bad time string length %zu." msgstr "" -#: src/data/por-file-reader.c:571 +#: src/data/por-file-reader.c:572 #, c-format msgid "" "%s: Bad format specifier byte (%d). Variable will be assigned a default " "format." msgstr "" -#: src/data/por-file-reader.c:592 +#: src/data/por-file-reader.c:593 #, c-format msgid "Numeric variable %s has invalid format specifier %s." msgstr "" -#: src/data/por-file-reader.c:596 +#: src/data/por-file-reader.c:597 #, c-format msgid "String variable %s with width %d has invalid format specifier %s." msgstr "" -#: src/data/por-file-reader.c:620 +#: src/data/por-file-reader.c:621 msgid "Expected variable count record." msgstr "" -#: src/data/por-file-reader.c:624 +#: src/data/por-file-reader.c:625 #, c-format msgid "Invalid number of variables %d." msgstr "" -#: src/data/por-file-reader.c:634 +#: src/data/por-file-reader.c:635 #, c-format msgid "Weight variable name (%s) truncated." msgstr "" -#: src/data/por-file-reader.c:649 +#: src/data/por-file-reader.c:650 msgid "Expected variable record." msgstr "" -#: src/data/por-file-reader.c:653 +#: src/data/por-file-reader.c:654 #, c-format msgid "Invalid variable width %d." msgstr "" -#: src/data/por-file-reader.c:661 +#: src/data/por-file-reader.c:662 #, c-format msgid "Invalid variable name `%s' in position %d." msgstr "" -#: src/data/por-file-reader.c:665 +#: src/data/por-file-reader.c:666 #, c-format msgid "Bad width %d for variable %s." msgstr "" -#: src/data/por-file-reader.c:680 +#: src/data/por-file-reader.c:681 #, c-format msgid "Duplicate variable name %s in position %d." msgstr "" -#: src/data/por-file-reader.c:681 +#: src/data/por-file-reader.c:682 #, c-format msgid "Duplicate variable name %s in position %d renamed to %s." msgstr "" -#: src/data/por-file-reader.c:724 +#: src/data/por-file-reader.c:725 #, c-format msgid "Weighting variable %s not present in dictionary." msgstr "" -#: src/data/por-file-reader.c:771 +#: src/data/por-file-reader.c:772 #, c-format msgid "Unknown variable %s while parsing value labels." msgstr "" -#: src/data/por-file-reader.c:774 +#: src/data/por-file-reader.c:775 #, c-format msgid "" "Cannot assign value labels to %s and %s, which have different variable types." @@ -1368,6 +1368,61 @@ msgstr "" msgid "Handle for %s not allowed here." msgstr "" +#: src/language/data-io/get-data.c:57 +#, c-format +msgid "Unsupported TYPE %s" +msgstr "" + +#: src/language/data-io/get-data.c:181 +#, c-format +msgid "" +"%s is allowed only with %s arrangement, but %s arrangement was stated or " +"implied earlier in this command." +msgstr "" + +#: src/language/data-io/get-data.c:236 +msgid "expecting FIXED or DELIMITED" +msgstr "" + +#: src/language/data-io/get-data.c:249 +msgid "Value of FIRSTCASE must be 1 or greater." +msgstr "" + +#: src/language/data-io/get-data.c:274 +msgid "expecting LINE or VARIABLES" +msgstr "" + +#: src/language/data-io/get-data.c:287 +msgid "Value of FIXCASE must be at least 1." +msgstr "" + +#: src/language/data-io/get-data.c:307 +msgid "Value of FIRST must be at least 1." +msgstr "" + +#: src/language/data-io/get-data.c:319 +msgid "Value of PERCENT must be between 1 and 100." +msgstr "" + +#: src/language/data-io/get-data.c:372 +msgid "expecting VARIABLES" +msgstr "" + +#: src/language/data-io/get-data.c:394 +#: src/language/data-io/placement-parser.c:376 +#, c-format +msgid "" +"The record number specified, %ld, is at or before the previous record, %d. " +"Data fields must be listed in order of increasing record number." +msgstr "" + +#: src/language/data-io/get-data.c:403 +#, c-format +msgid "" +"The record number specified, %ld, exceeds the number of records per case " +"specified on FIXCASE, %d." +msgstr "" + #: src/language/data-io/get.c:99 msgid "expecting COMM or TAPE" msgstr "" @@ -1457,61 +1512,6 @@ msgid "" "variable in earlier file (%s)." msgstr "" -#: src/language/data-io/get-data.c:57 -#, c-format -msgid "Unsupported TYPE %s" -msgstr "" - -#: src/language/data-io/get-data.c:181 -#, c-format -msgid "" -"%s is allowed only with %s arrangement, but %s arrangement was stated or " -"implied earlier in this command." -msgstr "" - -#: src/language/data-io/get-data.c:236 -msgid "expecting FIXED or DELIMITED" -msgstr "" - -#: src/language/data-io/get-data.c:249 -msgid "Value of FIRSTCASE must be 1 or greater." -msgstr "" - -#: src/language/data-io/get-data.c:274 -msgid "expecting LINE or VARIABLES" -msgstr "" - -#: src/language/data-io/get-data.c:287 -msgid "Value of FIXCASE must be at least 1." -msgstr "" - -#: src/language/data-io/get-data.c:307 -msgid "Value of FIRST must be at least 1." -msgstr "" - -#: src/language/data-io/get-data.c:319 -msgid "Value of PERCENT must be between 1 and 100." -msgstr "" - -#: src/language/data-io/get-data.c:372 -msgid "expecting VARIABLES" -msgstr "" - -#: src/language/data-io/get-data.c:394 -#: src/language/data-io/placement-parser.c:376 -#, c-format -msgid "" -"The record number specified, %ld, is at or before the previous record, %d. " -"Data fields must be listed in order of increasing record number." -msgstr "" - -#: src/language/data-io/get-data.c:403 -#, c-format -msgid "" -"The record number specified, %ld, exceeds the number of records per case " -"specified on FIXCASE, %d." -msgstr "" - #: src/language/data-io/inpt-pgm.c:129 msgid "Unexpected end-of-file within INPUT PROGRAM." msgstr "" @@ -1601,6 +1601,20 @@ msgstr "" msgid "The ending column for a field must be greater than the starting column." msgstr "" +#: src/language/data-io/print-space.c:73 src/language/lexer/lexer.c:476 +#: src/language/stats/autorecode.c:154 src/language/xforms/select-if.c:60 +msgid "expecting end of command" +msgstr "" + +#: src/language/data-io/print-space.c:116 +msgid "The expression on PRINT SPACE evaluated to the system-missing value." +msgstr "" + +#: src/language/data-io/print-space.c:119 +#, c-format +msgid "The expression on PRINT SPACE evaluated to %g." +msgstr "" + #: src/language/data-io/print.c:265 #, c-format msgid "Output calls for %d records but %zu specified on RECORDS subcommand." @@ -1620,20 +1634,6 @@ msgid_plural "Writing %d records." msgstr[0] "" msgstr[1] "" -#: src/language/data-io/print-space.c:73 src/language/lexer/lexer.c:476 -#: src/language/stats/autorecode.c:154 src/language/xforms/select-if.c:60 -msgid "expecting end of command" -msgstr "" - -#: src/language/data-io/print-space.c:116 -msgid "The expression on PRINT SPACE evaluated to the system-missing value." -msgstr "" - -#: src/language/data-io/print-space.c:119 -#, c-format -msgid "The expression on PRINT SPACE evaluated to %g." -msgstr "" - #: src/language/dictionary/apply-dictionary.c:75 #, c-format msgid "Variable %s is %s in target file, but %s in source file." @@ -1811,7 +1811,7 @@ msgstr "" #: src/language/dictionary/sys-file-info.c:563 #: src/language/stats/crosstabs.q:1153 src/language/stats/crosstabs.q:1180 #: src/language/stats/crosstabs.q:1200 src/language/stats/crosstabs.q:1222 -#: src/language/stats/examine.q:1192 src/language/stats/frequencies.q:1060 +#: src/language/stats/examine.q:1210 src/language/stats/frequencies.q:1060 #: src/language/stats/frequencies.q:1184 msgid "Value" msgstr "" @@ -2553,45 +2553,45 @@ msgstr "" msgid "Binomial Test" msgstr "" -#: src/language/stats/binomial.c:193 +#: src/language/stats/binomial.c:202 msgid "Group1" msgstr "" -#: src/language/stats/binomial.c:194 +#: src/language/stats/binomial.c:203 msgid "Group2" msgstr "" -#: src/language/stats/binomial.c:195 src/language/stats/chisquare.c:223 +#: src/language/stats/binomial.c:204 src/language/stats/chisquare.c:223 #: src/language/stats/chisquare.c:283 src/language/stats/crosstabs.q:860 #: src/language/stats/crosstabs.q:1060 src/language/stats/crosstabs.q:1783 -#: src/language/stats/examine.q:912 src/language/stats/frequencies.q:1137 -#: src/language/stats/oneway.q:306 src/language/stats/oneway.q:470 -#: src/language/stats/regression.q:318 +#: src/language/stats/examine.q:918 src/language/stats/frequencies.q:1137 +#: src/language/stats/oneway.q:306 src/language/stats/oneway.q:476 +#: src/language/stats/regression.q:319 msgid "Total" msgstr "" -#: src/language/stats/binomial.c:226 src/language/stats/chisquare.c:246 +#: src/language/stats/binomial.c:236 src/language/stats/chisquare.c:246 #: src/language/stats/crosstabs.q:1178 src/language/stats/crosstabs.q:1219 msgid "Category" msgstr "" -#: src/language/stats/binomial.c:227 src/language/stats/crosstabs.q:870 -#: src/language/stats/examine.q:988 src/language/stats/frequencies.q:1405 +#: src/language/stats/binomial.c:237 src/language/stats/crosstabs.q:870 +#: src/language/stats/examine.q:994 src/language/stats/frequencies.q:1405 #: src/language/stats/npar-summary.c:122 src/language/stats/oneway.q:391 #: src/language/stats/t-test.q:693 src/language/stats/t-test.q:716 #: src/language/stats/t-test.q:850 src/language/stats/t-test.q:1387 msgid "N" msgstr "" -#: src/language/stats/binomial.c:228 +#: src/language/stats/binomial.c:238 msgid "Observed Prop." msgstr "" -#: src/language/stats/binomial.c:229 +#: src/language/stats/binomial.c:239 msgid "Test Prop." msgstr "" -#: src/language/stats/binomial.c:232 +#: src/language/stats/binomial.c:242 #, c-format msgid "Exact Sig. (%d-tailed)" msgstr "" @@ -2612,7 +2612,7 @@ msgid "Expected N" msgstr "" #: src/language/stats/chisquare.c:209 src/language/stats/chisquare.c:249 -#: src/language/stats/regression.q:317 +#: src/language/stats/regression.q:318 msgid "Residual" msgstr "" @@ -2629,8 +2629,8 @@ msgid "Chi-Square" msgstr "" #: src/language/stats/chisquare.c:312 src/language/stats/crosstabs.q:1154 -#: src/language/stats/oneway.q:279 src/language/stats/oneway.q:680 -#: src/language/stats/regression.q:311 src/language/stats/t-test.q:1001 +#: src/language/stats/oneway.q:279 src/language/stats/oneway.q:694 +#: src/language/stats/regression.q:312 src/language/stats/t-test.q:1001 #: src/language/stats/t-test.q:1193 src/language/stats/t-test.q:1286 msgid "df" msgstr "" @@ -2669,22 +2669,22 @@ msgstr "" msgid "Summary." msgstr "" -#: src/language/stats/crosstabs.q:857 src/language/stats/examine.q:976 +#: src/language/stats/crosstabs.q:857 src/language/stats/examine.q:982 msgid "Cases" msgstr "" -#: src/language/stats/crosstabs.q:858 src/language/stats/examine.q:910 +#: src/language/stats/crosstabs.q:858 src/language/stats/examine.q:916 #: src/language/stats/frequencies.q:1058 src/language/stats/frequencies.q:1406 msgid "Valid" msgstr "" -#: src/language/stats/crosstabs.q:859 src/language/stats/examine.q:911 +#: src/language/stats/crosstabs.q:859 src/language/stats/examine.q:917 #: src/language/stats/frequencies.q:1128 src/language/stats/frequencies.q:1407 #: src/ui/gui/var-sheet.c:71 msgid "Missing" msgstr "Löse" -#: src/language/stats/crosstabs.q:871 src/language/stats/examine.q:991 +#: src/language/stats/crosstabs.q:871 src/language/stats/examine.q:997 #: src/language/stats/frequencies.q:1062 src/language/stats/frequencies.q:1063 #: src/language/stats/frequencies.q:1064 msgid "Percent" @@ -2728,7 +2728,7 @@ msgstr "" #: src/language/stats/crosstabs.q:1152 src/language/stats/crosstabs.q:1179 #: src/language/stats/crosstabs.q:1199 src/language/stats/crosstabs.q:1220 -#: src/language/stats/examine.q:1423 src/ui/gui/checkbox-treeview.c:115 +#: src/language/stats/examine.q:1454 src/ui/gui/checkbox-treeview.c:115 msgid "Statistic" msgstr "" @@ -2918,7 +2918,7 @@ msgstr "" msgid "%s Dependent" msgstr "" -#: src/language/stats/descriptives.c:102 src/language/stats/examine.q:1524 +#: src/language/stats/descriptives.c:102 src/language/stats/examine.q:1568 #: src/language/stats/frequencies.q:123 src/language/stats/npar-summary.c:125 #: src/language/stats/oneway.q:392 src/language/stats/t-test.q:694 #: src/language/stats/t-test.q:717 src/language/stats/t-test.q:849 @@ -2935,13 +2935,13 @@ msgstr "" msgid "Std Dev" msgstr "" -#: src/language/stats/descriptives.c:105 src/language/stats/examine.q:1604 +#: src/language/stats/descriptives.c:105 src/language/stats/examine.q:1648 #: src/language/stats/frequencies.q:128 src/ui/gui/descriptives-dialog.c:47 #: src/ui/gui/frequencies-dialog.c:46 msgid "Variance" msgstr "" -#: src/language/stats/descriptives.c:106 src/language/stats/examine.q:1711 +#: src/language/stats/descriptives.c:106 src/language/stats/examine.q:1755 #: src/language/stats/frequencies.q:129 src/ui/gui/descriptives-dialog.c:48 #: src/ui/gui/frequencies-dialog.c:51 msgid "Kurtosis" @@ -2951,7 +2951,7 @@ msgstr "" msgid "S E Kurt" msgstr "" -#: src/language/stats/descriptives.c:108 src/language/stats/examine.q:1691 +#: src/language/stats/descriptives.c:108 src/language/stats/examine.q:1735 #: src/language/stats/frequencies.q:131 src/ui/gui/descriptives-dialog.c:49 #: src/ui/gui/frequencies-dialog.c:47 msgid "Skewness" @@ -2961,20 +2961,20 @@ msgstr "" msgid "S E Skew" msgstr "" -#: src/language/stats/descriptives.c:110 src/language/stats/examine.q:1652 +#: src/language/stats/descriptives.c:110 src/language/stats/examine.q:1696 #: src/language/stats/frequencies.q:133 src/ui/gui/descriptives-dialog.c:44 #: src/ui/gui/frequencies-dialog.c:49 msgid "Range" msgstr "" -#: src/language/stats/descriptives.c:111 src/language/stats/examine.q:1629 +#: src/language/stats/descriptives.c:111 src/language/stats/examine.q:1673 #: src/language/stats/frequencies.q:134 src/language/stats/npar-summary.c:131 #: src/language/stats/oneway.q:404 src/ui/gui/descriptives-dialog.c:42 #: src/ui/gui/frequencies-dialog.c:43 msgid "Minimum" msgstr "" -#: src/language/stats/descriptives.c:112 src/language/stats/examine.q:1640 +#: src/language/stats/descriptives.c:112 src/language/stats/examine.q:1684 #: src/language/stats/frequencies.q:135 src/language/stats/npar-summary.c:134 #: src/language/stats/oneway.q:405 src/ui/gui/descriptives-dialog.c:43 #: src/ui/gui/frequencies-dialog.c:44 @@ -3031,116 +3031,116 @@ msgstr "" msgid "Valid cases = %g; cases with missing value(s) = %g." msgstr "" -#: src/language/stats/examine.q:286 src/language/stats/examine.q:289 +#: src/language/stats/examine.q:288 src/language/stats/examine.q:291 #, c-format msgid "%s is not currently supported." msgstr "" -#: src/language/stats/examine.q:495 src/language/stats/examine.q:508 +#: src/language/stats/examine.q:501 src/language/stats/examine.q:514 #, c-format msgid "%s and %s are mutually exclusive" msgstr "" -#: src/language/stats/examine.q:970 +#: src/language/stats/examine.q:976 msgid "Case Processing Summary" msgstr "" -#: src/language/stats/examine.q:1177 +#: src/language/stats/examine.q:1195 msgid "Extreme Values" msgstr "" -#: src/language/stats/examine.q:1193 +#: src/language/stats/examine.q:1211 msgid "Case Number" msgstr "" -#: src/language/stats/examine.q:1278 +#: src/language/stats/examine.q:1309 msgid "Highest" msgstr "" -#: src/language/stats/examine.q:1283 +#: src/language/stats/examine.q:1314 msgid "Lowest" msgstr "" -#: src/language/stats/examine.q:1424 src/language/stats/oneway.q:394 -#: src/language/stats/oneway.q:678 src/language/stats/regression.q:213 +#: src/language/stats/examine.q:1455 src/language/stats/oneway.q:394 +#: src/language/stats/oneway.q:692 src/language/stats/regression.q:211 msgid "Std. Error" msgstr "" -#: src/language/stats/examine.q:1426 src/language/stats/oneway.q:408 +#: src/language/stats/examine.q:1457 src/language/stats/oneway.q:408 msgid "Descriptives" msgstr "" -#: src/language/stats/examine.q:1542 src/language/stats/oneway.q:399 +#: src/language/stats/examine.q:1586 src/language/stats/oneway.q:399 #, c-format msgid "%g%% Confidence Interval for Mean" msgstr "" -#: src/language/stats/examine.q:1548 src/language/stats/oneway.q:401 +#: src/language/stats/examine.q:1592 src/language/stats/oneway.q:401 msgid "Lower Bound" msgstr "" -#: src/language/stats/examine.q:1559 src/language/stats/oneway.q:402 +#: src/language/stats/examine.q:1603 src/language/stats/oneway.q:402 msgid "Upper Bound" msgstr "" -#: src/language/stats/examine.q:1571 +#: src/language/stats/examine.q:1615 #, c-format msgid "5%% Trimmed Mean" msgstr "" -#: src/language/stats/examine.q:1582 src/language/stats/frequencies.q:125 +#: src/language/stats/examine.q:1626 src/language/stats/frequencies.q:125 #: src/ui/gui/frequencies-dialog.c:53 msgid "Median" msgstr "" -#: src/language/stats/examine.q:1616 src/language/stats/npar-summary.c:128 +#: src/language/stats/examine.q:1660 src/language/stats/npar-summary.c:128 #: src/language/stats/oneway.q:393 src/language/stats/t-test.q:695 #: src/language/stats/t-test.q:718 src/language/stats/t-test.q:851 #: src/language/stats/t-test.q:1188 msgid "Std. Deviation" msgstr "" -#: src/language/stats/examine.q:1664 +#: src/language/stats/examine.q:1708 msgid "Interquartile Range" msgstr "" -#: src/language/stats/examine.q:1816 +#: src/language/stats/examine.q:1862 #, c-format msgid "Boxplot of %s vs. %s" msgstr "" -#: src/language/stats/examine.q:1841 +#: src/language/stats/examine.q:1889 msgid "Boxplot" msgstr "" -#: src/language/stats/examine.q:1883 +#: src/language/stats/examine.q:1931 #, c-format msgid "Normal Q-Q Plot of %s" msgstr "" -#: src/language/stats/examine.q:1884 src/language/stats/examine.q:1890 +#: src/language/stats/examine.q:1932 src/language/stats/examine.q:1938 msgid "Observed Value" msgstr "" -#: src/language/stats/examine.q:1885 +#: src/language/stats/examine.q:1933 msgid "Expected Normal" msgstr "" -#: src/language/stats/examine.q:1888 +#: src/language/stats/examine.q:1936 #, c-format msgid "Detrended Normal Q-Q Plot of %s" msgstr "" -#: src/language/stats/examine.q:1891 +#: src/language/stats/examine.q:1939 msgid "Dev from Normal" msgstr "" -#: src/language/stats/examine.q:2010 src/language/stats/examine.q:2032 +#: src/language/stats/examine.q:2058 src/language/stats/examine.q:2080 #: src/language/stats/frequencies.q:1417 src/language/stats/npar-summary.c:141 msgid "Percentiles" msgstr "" -#: src/language/stats/examine.q:2156 +#: src/language/stats/examine.q:2216 msgid "Tukey's Hinges" msgstr "" @@ -3297,11 +3297,11 @@ msgstr "" msgid "Multivariate GLM not yet supported" msgstr "" -#: src/language/stats/glm.q:271 src/language/stats/regression.q:1164 +#: src/language/stats/glm.q:271 src/language/stats/regression.q:1170 msgid "Dependent variable must be numeric." msgstr "" -#: src/language/stats/glm.q:346 src/language/stats/regression.q:1261 +#: src/language/stats/glm.q:346 src/language/stats/regression.q:1267 msgid "No valid data found. This command was skipped." msgstr "" @@ -3313,6 +3313,22 @@ msgstr "" msgid "TABLES subcommand may not appear more than once." msgstr "" +#: src/language/stats/npar-summary.c:108 +msgid "Descriptive Statistics" +msgstr "" + +#: src/language/stats/npar-summary.c:145 +msgid "25th" +msgstr "" + +#: src/language/stats/npar-summary.c:148 +msgid "50th (Median)" +msgstr "" + +#: src/language/stats/npar-summary.c:151 +msgid "75th" +msgstr "" + #: src/language/stats/npar.q:98 msgid "NPAR subcommand not currently implemented." msgstr "" @@ -3337,22 +3353,6 @@ msgid "" "not match the number following (%zu)." msgstr "" -#: src/language/stats/npar-summary.c:108 -msgid "Descriptive Statistics" -msgstr "" - -#: src/language/stats/npar-summary.c:145 -msgid "25th" -msgstr "" - -#: src/language/stats/npar-summary.c:148 -msgid "50th (Median)" -msgstr "" - -#: src/language/stats/npar-summary.c:151 -msgid "75th" -msgstr "" - #: src/language/stats/oneway.q:169 msgid "Number of contrast coefficients must equal the number of groups" msgstr "" @@ -3367,21 +3367,21 @@ msgstr "" msgid "`%s' is not a variable name" msgstr "" -#: src/language/stats/oneway.q:278 src/language/stats/regression.q:310 +#: src/language/stats/oneway.q:278 src/language/stats/regression.q:311 msgid "Sum of Squares" msgstr "" -#: src/language/stats/oneway.q:280 src/language/stats/regression.q:312 +#: src/language/stats/oneway.q:280 src/language/stats/regression.q:313 msgid "Mean Square" msgstr "" -#: src/language/stats/oneway.q:281 src/language/stats/regression.q:313 +#: src/language/stats/oneway.q:281 src/language/stats/regression.q:314 #: src/language/stats/t-test.q:998 msgid "F" msgstr "" -#: src/language/stats/oneway.q:282 src/language/stats/oneway.q:536 -#: src/language/stats/regression.q:216 src/language/stats/regression.q:314 +#: src/language/stats/oneway.q:282 src/language/stats/oneway.q:542 +#: src/language/stats/regression.q:214 src/language/stats/regression.q:315 msgid "Significance" msgstr "" @@ -3393,58 +3393,58 @@ msgstr "" msgid "Within Groups" msgstr "" -#: src/language/stats/oneway.q:352 src/language/stats/regression.q:340 +#: src/language/stats/oneway.q:352 src/language/stats/regression.q:341 msgid "ANOVA" msgstr "" -#: src/language/stats/oneway.q:533 +#: src/language/stats/oneway.q:539 msgid "Levene Statistic" msgstr "" -#: src/language/stats/oneway.q:534 +#: src/language/stats/oneway.q:540 msgid "df1" msgstr "" -#: src/language/stats/oneway.q:535 +#: src/language/stats/oneway.q:541 msgid "df2" msgstr "" -#: src/language/stats/oneway.q:539 +#: src/language/stats/oneway.q:545 msgid "Test of Homogeneity of Variances" msgstr "" -#: src/language/stats/oneway.q:607 +#: src/language/stats/oneway.q:613 msgid "Contrast Coefficients" msgstr "" -#: src/language/stats/oneway.q:609 src/language/stats/oneway.q:676 +#: src/language/stats/oneway.q:615 src/language/stats/oneway.q:690 msgid "Contrast" msgstr "" -#: src/language/stats/oneway.q:674 +#: src/language/stats/oneway.q:688 msgid "Contrast Tests" msgstr "" -#: src/language/stats/oneway.q:677 +#: src/language/stats/oneway.q:691 msgid "Value of Contrast" msgstr "" -#: src/language/stats/oneway.q:679 src/language/stats/regression.q:215 +#: src/language/stats/oneway.q:693 src/language/stats/regression.q:213 #: src/language/stats/t-test.q:1000 src/language/stats/t-test.q:1192 #: src/language/stats/t-test.q:1285 msgid "t" msgstr "" -#: src/language/stats/oneway.q:681 src/language/stats/t-test.q:1002 +#: src/language/stats/oneway.q:695 src/language/stats/t-test.q:1002 #: src/language/stats/t-test.q:1194 src/language/stats/t-test.q:1287 msgid "Sig. (2-tailed)" msgstr "" -#: src/language/stats/oneway.q:725 +#: src/language/stats/oneway.q:739 msgid "Assume equal variances" msgstr "" -#: src/language/stats/oneway.q:729 +#: src/language/stats/oneway.q:743 msgid "Does not assume equal" msgstr "" @@ -3521,39 +3521,39 @@ msgstr "" msgid "Model Summary" msgstr "" -#: src/language/stats/regression.q:212 +#: src/language/stats/regression.q:210 msgid "B" msgstr "" -#: src/language/stats/regression.q:214 +#: src/language/stats/regression.q:212 msgid "Beta" msgstr "" -#: src/language/stats/regression.q:217 +#: src/language/stats/regression.q:215 msgid "(Constant)" msgstr "" -#: src/language/stats/regression.q:279 +#: src/language/stats/regression.q:281 msgid "Coefficients" msgstr "" -#: src/language/stats/regression.q:316 +#: src/language/stats/regression.q:317 msgid "Regression" msgstr "" -#: src/language/stats/regression.q:395 +#: src/language/stats/regression.q:396 msgid "Model" msgstr "" -#: src/language/stats/regression.q:396 +#: src/language/stats/regression.q:397 msgid "Covariances" msgstr "" -#: src/language/stats/regression.q:411 +#: src/language/stats/regression.q:412 msgid "Coefficient Correlations" msgstr "" -#: src/language/stats/regression.q:1038 +#: src/language/stats/regression.q:1044 msgid "" "The dependent variable is equal to the independent variable.The least " "squares line is therefore Y=X.Standard errors and related statistics may be " @@ -5378,15 +5378,6 @@ msgstr "xyzzy" msgid "Paste" msgstr "Datum" -#: src/ui/gui/psppire.c:199 -msgid "_Reset" -msgstr "_Zurücksetzen" - -#: src/ui/gui/psppire.c:200 -#, fuzzy -msgid "_Select" -msgstr "Schriftwahlung" - #: src/ui/gui/psppire-data-store.c:816 msgid "var" msgstr "" @@ -5396,6 +5387,33 @@ msgstr "" msgid "%ld" msgstr "" +#: src/ui/gui/psppire-var-store.c:479 src/ui/gui/var-display.c:14 +msgid "None" +msgstr "Keine" + +#: src/ui/gui/psppire-var-store.c:489 +msgid "Scientific" +msgstr "Wissenschäflich" + +#: src/ui/gui/psppire-var-store.c:492 +msgid "Custom" +msgstr "Spezial" + +#: src/ui/gui/psppire-var-store.c:563 src/ui/gui/psppire-var-store.c:573 +#: src/ui/gui/psppire-var-store.c:583 +#, c-format +msgid "%d" +msgstr "" + +#: src/ui/gui/psppire.c:199 +msgid "_Reset" +msgstr "_Zurücksetzen" + +#: src/ui/gui/psppire.c:200 +#, fuzzy +msgid "_Select" +msgstr "Schriftwahlung" + #: src/ui/gui/psppire.glade:11 #, fuzzy msgid "This is pre-alpha software. Use at your own risk." @@ -5635,24 +5653,6 @@ msgstr "" msgid "Search backward" msgstr "" -#: src/ui/gui/psppire-var-store.c:479 src/ui/gui/var-display.c:14 -msgid "None" -msgstr "Keine" - -#: src/ui/gui/psppire-var-store.c:489 -msgid "Scientific" -msgstr "Wissenschäflich" - -#: src/ui/gui/psppire-var-store.c:492 -msgid "Custom" -msgstr "Spezial" - -#: src/ui/gui/psppire-var-store.c:563 src/ui/gui/psppire-var-store.c:573 -#: src/ui/gui/psppire-var-store.c:583 -#, c-format -msgid "%d" -msgstr "" - #: src/ui/gui/rank.glade:111 msgid "By:" msgstr "" @@ -5932,6 +5932,11 @@ msgstr "" msgid "To End" msgstr "" +#: src/ui/gui/t-test-options.c:60 +#, c-format +msgid "Confidence Interval: %2d %%" +msgstr "" + #: src/ui/gui/t-test.glade:53 src/ui/gui/t-test.glade:161 msgid "Define Groups" msgstr "" @@ -5974,10 +5979,25 @@ msgstr "" msgid "Test Value: " msgstr "Werte:" -#: src/ui/gui/t-test-options.c:60 -#, c-format -msgid "Confidence Interval: %2d %%" -msgstr "" +#: src/ui/gui/var-sheet.c:65 +msgid "Name" +msgstr "Name" + +#: src/ui/gui/var-sheet.c:68 +msgid "Decimals" +msgstr "Dezimalstellen" + +#: src/ui/gui/var-sheet.c:70 +msgid "Values" +msgstr "Werten" + +#: src/ui/gui/var-sheet.c:73 +msgid "Align" +msgstr "Einstellung" + +#: src/ui/gui/var-sheet.c:74 +msgid "Measure" +msgstr "Messe" #: src/ui/gui/variable-info-dialog.c:88 #, fuzzy, c-format @@ -6009,26 +6029,6 @@ msgstr "Werten" msgid "%s %s\n" msgstr "" -#: src/ui/gui/var-sheet.c:65 -msgid "Name" -msgstr "Name" - -#: src/ui/gui/var-sheet.c:68 -msgid "Decimals" -msgstr "Dezimalstellen" - -#: src/ui/gui/var-sheet.c:70 -msgid "Values" -msgstr "Werten" - -#: src/ui/gui/var-sheet.c:73 -msgid "Align" -msgstr "Einstellung" - -#: src/ui/gui/var-sheet.c:74 -msgid "Measure" -msgstr "Messe" - #: src/ui/gui/weight-cases-dialog.c:88 #, c-format msgid "Weight cases by %s" diff --git a/po/en_GB.po b/po/en_GB.po index 2d66d5a7..53653817 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PSPP 0.4.3\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2007-12-19 08:29+0900\n" +"POT-Creation-Date: 2008-01-02 12:21+0900\n" "PO-Revision-Date: 2007-09-15 08:29+0800\n" "Last-Translator: John Darrington \n" "Language-Team: John Darrington \n" @@ -44,12 +44,6 @@ msgstr "" msgid "Date %04d-%d-%d is before the earliest acceptable date of 1582-10-15." msgstr "" -#: src/data/casereader-filter.c:221 -msgid "" -"At least one case in the data read had a weight value that was user-missing, " -"system-missing, zero, or negative. These case(s) were ignored." -msgstr "" - #: src/data/case-tmpfile.c:57 msgid "failed to create temporary file" msgstr "" @@ -70,6 +64,12 @@ msgstr "" msgid "writing to temporary file" msgstr "" +#: src/data/casereader-filter.c:221 +msgid "" +"At least one case in the data read had a weight value that was user-missing, " +"system-missing, zero, or negative. These case(s) were ignored." +msgstr "" + #: src/data/data-in.c:287 src/data/data-in.c:477 msgid "Field contents are not numeric." msgstr "" @@ -315,14 +315,14 @@ msgid "%s variables are not compatible with %s format %s." msgstr "" #: src/data/format.c:318 src/data/sys-file-reader.c:639 -#: src/ui/gui/data-editor.glade:1304 src/ui/gui/psppire.glade:2176 -#: src/ui/gui/psppire-var-store.c:493 +#: src/ui/gui/data-editor.glade:1304 src/ui/gui/psppire-var-store.c:493 +#: src/ui/gui/psppire.glade:2176 msgid "String" msgstr "" #: src/data/format.c:318 src/data/sys-file-reader.c:639 -#: src/ui/gui/data-editor.glade:1193 src/ui/gui/psppire.glade:2131 -#: src/ui/gui/psppire-var-store.c:486 +#: src/ui/gui/data-editor.glade:1193 src/ui/gui/psppire-var-store.c:486 +#: src/ui/gui/psppire.glade:2131 msgid "Numeric" msgstr "" @@ -471,92 +471,92 @@ msgstr "" msgid "%s: Not a portable file." msgstr "" -#: src/data/por-file-reader.c:518 +#: src/data/por-file-reader.c:519 #, c-format msgid "Unrecognized version code `%c'." msgstr "" -#: src/data/por-file-reader.c:527 +#: src/data/por-file-reader.c:528 #, c-format msgid "Bad date string length %zu." msgstr "" -#: src/data/por-file-reader.c:529 +#: src/data/por-file-reader.c:530 #, c-format msgid "Bad time string length %zu." msgstr "" -#: src/data/por-file-reader.c:571 +#: src/data/por-file-reader.c:572 #, c-format msgid "" "%s: Bad format specifier byte (%d). Variable will be assigned a default " "format." msgstr "" -#: src/data/por-file-reader.c:592 +#: src/data/por-file-reader.c:593 #, c-format msgid "Numeric variable %s has invalid format specifier %s." msgstr "" -#: src/data/por-file-reader.c:596 +#: src/data/por-file-reader.c:597 #, c-format msgid "String variable %s with width %d has invalid format specifier %s." msgstr "" -#: src/data/por-file-reader.c:620 +#: src/data/por-file-reader.c:621 msgid "Expected variable count record." msgstr "" -#: src/data/por-file-reader.c:624 +#: src/data/por-file-reader.c:625 #, c-format msgid "Invalid number of variables %d." msgstr "" -#: src/data/por-file-reader.c:634 +#: src/data/por-file-reader.c:635 #, c-format msgid "Weight variable name (%s) truncated." msgstr "" -#: src/data/por-file-reader.c:649 +#: src/data/por-file-reader.c:650 msgid "Expected variable record." msgstr "" -#: src/data/por-file-reader.c:653 +#: src/data/por-file-reader.c:654 #, c-format msgid "Invalid variable width %d." msgstr "" -#: src/data/por-file-reader.c:661 +#: src/data/por-file-reader.c:662 #, c-format msgid "Invalid variable name `%s' in position %d." msgstr "" -#: src/data/por-file-reader.c:665 +#: src/data/por-file-reader.c:666 #, c-format msgid "Bad width %d for variable %s." msgstr "" -#: src/data/por-file-reader.c:680 +#: src/data/por-file-reader.c:681 #, c-format msgid "Duplicate variable name %s in position %d." msgstr "" -#: src/data/por-file-reader.c:681 +#: src/data/por-file-reader.c:682 #, c-format msgid "Duplicate variable name %s in position %d renamed to %s." msgstr "" -#: src/data/por-file-reader.c:724 +#: src/data/por-file-reader.c:725 #, c-format msgid "Weighting variable %s not present in dictionary." msgstr "" -#: src/data/por-file-reader.c:771 +#: src/data/por-file-reader.c:772 #, c-format msgid "Unknown variable %s while parsing value labels." msgstr "" -#: src/data/por-file-reader.c:774 +#: src/data/por-file-reader.c:775 #, c-format msgid "" "Cannot assign value labels to %s and %s, which have different variable types." @@ -1359,6 +1359,61 @@ msgstr "" msgid "Handle for %s not allowed here." msgstr "" +#: src/language/data-io/get-data.c:57 +#, c-format +msgid "Unsupported TYPE %s" +msgstr "" + +#: src/language/data-io/get-data.c:181 +#, c-format +msgid "" +"%s is allowed only with %s arrangement, but %s arrangement was stated or " +"implied earlier in this command." +msgstr "" + +#: src/language/data-io/get-data.c:236 +msgid "expecting FIXED or DELIMITED" +msgstr "" + +#: src/language/data-io/get-data.c:249 +msgid "Value of FIRSTCASE must be 1 or greater." +msgstr "" + +#: src/language/data-io/get-data.c:274 +msgid "expecting LINE or VARIABLES" +msgstr "" + +#: src/language/data-io/get-data.c:287 +msgid "Value of FIXCASE must be at least 1." +msgstr "" + +#: src/language/data-io/get-data.c:307 +msgid "Value of FIRST must be at least 1." +msgstr "" + +#: src/language/data-io/get-data.c:319 +msgid "Value of PERCENT must be between 1 and 100." +msgstr "" + +#: src/language/data-io/get-data.c:372 +msgid "expecting VARIABLES" +msgstr "" + +#: src/language/data-io/get-data.c:394 +#: src/language/data-io/placement-parser.c:376 +#, c-format +msgid "" +"The record number specified, %ld, is at or before the previous record, %d. " +"Data fields must be listed in order of increasing record number." +msgstr "" + +#: src/language/data-io/get-data.c:403 +#, c-format +msgid "" +"The record number specified, %ld, exceeds the number of records per case " +"specified on FIXCASE, %d." +msgstr "" + #: src/language/data-io/get.c:99 msgid "expecting COMM or TAPE" msgstr "" @@ -1448,61 +1503,6 @@ msgid "" "variable in earlier file (%s)." msgstr "" -#: src/language/data-io/get-data.c:57 -#, c-format -msgid "Unsupported TYPE %s" -msgstr "" - -#: src/language/data-io/get-data.c:181 -#, c-format -msgid "" -"%s is allowed only with %s arrangement, but %s arrangement was stated or " -"implied earlier in this command." -msgstr "" - -#: src/language/data-io/get-data.c:236 -msgid "expecting FIXED or DELIMITED" -msgstr "" - -#: src/language/data-io/get-data.c:249 -msgid "Value of FIRSTCASE must be 1 or greater." -msgstr "" - -#: src/language/data-io/get-data.c:274 -msgid "expecting LINE or VARIABLES" -msgstr "" - -#: src/language/data-io/get-data.c:287 -msgid "Value of FIXCASE must be at least 1." -msgstr "" - -#: src/language/data-io/get-data.c:307 -msgid "Value of FIRST must be at least 1." -msgstr "" - -#: src/language/data-io/get-data.c:319 -msgid "Value of PERCENT must be between 1 and 100." -msgstr "" - -#: src/language/data-io/get-data.c:372 -msgid "expecting VARIABLES" -msgstr "" - -#: src/language/data-io/get-data.c:394 -#: src/language/data-io/placement-parser.c:376 -#, c-format -msgid "" -"The record number specified, %ld, is at or before the previous record, %d. " -"Data fields must be listed in order of increasing record number." -msgstr "" - -#: src/language/data-io/get-data.c:403 -#, c-format -msgid "" -"The record number specified, %ld, exceeds the number of records per case " -"specified on FIXCASE, %d." -msgstr "" - #: src/language/data-io/inpt-pgm.c:129 msgid "Unexpected end-of-file within INPUT PROGRAM." msgstr "" @@ -1592,6 +1592,20 @@ msgstr "" msgid "The ending column for a field must be greater than the starting column." msgstr "" +#: src/language/data-io/print-space.c:73 src/language/lexer/lexer.c:476 +#: src/language/stats/autorecode.c:154 src/language/xforms/select-if.c:60 +msgid "expecting end of command" +msgstr "" + +#: src/language/data-io/print-space.c:116 +msgid "The expression on PRINT SPACE evaluated to the system-missing value." +msgstr "" + +#: src/language/data-io/print-space.c:119 +#, c-format +msgid "The expression on PRINT SPACE evaluated to %g." +msgstr "" + #: src/language/data-io/print.c:265 #, c-format msgid "Output calls for %d records but %zu specified on RECORDS subcommand." @@ -1611,20 +1625,6 @@ msgid_plural "Writing %d records." msgstr[0] "" msgstr[1] "" -#: src/language/data-io/print-space.c:73 src/language/lexer/lexer.c:476 -#: src/language/stats/autorecode.c:154 src/language/xforms/select-if.c:60 -msgid "expecting end of command" -msgstr "" - -#: src/language/data-io/print-space.c:116 -msgid "The expression on PRINT SPACE evaluated to the system-missing value." -msgstr "" - -#: src/language/data-io/print-space.c:119 -#, c-format -msgid "The expression on PRINT SPACE evaluated to %g." -msgstr "" - #: src/language/dictionary/apply-dictionary.c:75 #, c-format msgid "Variable %s is %s in target file, but %s in source file." @@ -1802,7 +1802,7 @@ msgstr "" #: src/language/dictionary/sys-file-info.c:563 #: src/language/stats/crosstabs.q:1153 src/language/stats/crosstabs.q:1180 #: src/language/stats/crosstabs.q:1200 src/language/stats/crosstabs.q:1222 -#: src/language/stats/examine.q:1192 src/language/stats/frequencies.q:1060 +#: src/language/stats/examine.q:1210 src/language/stats/frequencies.q:1060 #: src/language/stats/frequencies.q:1184 msgid "Value" msgstr "" @@ -2544,45 +2544,45 @@ msgstr "" msgid "Binomial Test" msgstr "" -#: src/language/stats/binomial.c:193 +#: src/language/stats/binomial.c:202 msgid "Group1" msgstr "" -#: src/language/stats/binomial.c:194 +#: src/language/stats/binomial.c:203 msgid "Group2" msgstr "" -#: src/language/stats/binomial.c:195 src/language/stats/chisquare.c:223 +#: src/language/stats/binomial.c:204 src/language/stats/chisquare.c:223 #: src/language/stats/chisquare.c:283 src/language/stats/crosstabs.q:860 #: src/language/stats/crosstabs.q:1060 src/language/stats/crosstabs.q:1783 -#: src/language/stats/examine.q:912 src/language/stats/frequencies.q:1137 -#: src/language/stats/oneway.q:306 src/language/stats/oneway.q:470 -#: src/language/stats/regression.q:318 +#: src/language/stats/examine.q:918 src/language/stats/frequencies.q:1137 +#: src/language/stats/oneway.q:306 src/language/stats/oneway.q:476 +#: src/language/stats/regression.q:319 msgid "Total" msgstr "" -#: src/language/stats/binomial.c:226 src/language/stats/chisquare.c:246 +#: src/language/stats/binomial.c:236 src/language/stats/chisquare.c:246 #: src/language/stats/crosstabs.q:1178 src/language/stats/crosstabs.q:1219 msgid "Category" msgstr "" -#: src/language/stats/binomial.c:227 src/language/stats/crosstabs.q:870 -#: src/language/stats/examine.q:988 src/language/stats/frequencies.q:1405 +#: src/language/stats/binomial.c:237 src/language/stats/crosstabs.q:870 +#: src/language/stats/examine.q:994 src/language/stats/frequencies.q:1405 #: src/language/stats/npar-summary.c:122 src/language/stats/oneway.q:391 #: src/language/stats/t-test.q:693 src/language/stats/t-test.q:716 #: src/language/stats/t-test.q:850 src/language/stats/t-test.q:1387 msgid "N" msgstr "" -#: src/language/stats/binomial.c:228 +#: src/language/stats/binomial.c:238 msgid "Observed Prop." msgstr "" -#: src/language/stats/binomial.c:229 +#: src/language/stats/binomial.c:239 msgid "Test Prop." msgstr "" -#: src/language/stats/binomial.c:232 +#: src/language/stats/binomial.c:242 #, c-format msgid "Exact Sig. (%d-tailed)" msgstr "" @@ -2603,7 +2603,7 @@ msgid "Expected N" msgstr "" #: src/language/stats/chisquare.c:209 src/language/stats/chisquare.c:249 -#: src/language/stats/regression.q:317 +#: src/language/stats/regression.q:318 msgid "Residual" msgstr "" @@ -2620,8 +2620,8 @@ msgid "Chi-Square" msgstr "" #: src/language/stats/chisquare.c:312 src/language/stats/crosstabs.q:1154 -#: src/language/stats/oneway.q:279 src/language/stats/oneway.q:680 -#: src/language/stats/regression.q:311 src/language/stats/t-test.q:1001 +#: src/language/stats/oneway.q:279 src/language/stats/oneway.q:694 +#: src/language/stats/regression.q:312 src/language/stats/t-test.q:1001 #: src/language/stats/t-test.q:1193 src/language/stats/t-test.q:1286 msgid "df" msgstr "" @@ -2660,22 +2660,22 @@ msgstr "" msgid "Summary." msgstr "" -#: src/language/stats/crosstabs.q:857 src/language/stats/examine.q:976 +#: src/language/stats/crosstabs.q:857 src/language/stats/examine.q:982 msgid "Cases" msgstr "" -#: src/language/stats/crosstabs.q:858 src/language/stats/examine.q:910 +#: src/language/stats/crosstabs.q:858 src/language/stats/examine.q:916 #: src/language/stats/frequencies.q:1058 src/language/stats/frequencies.q:1406 msgid "Valid" msgstr "" -#: src/language/stats/crosstabs.q:859 src/language/stats/examine.q:911 +#: src/language/stats/crosstabs.q:859 src/language/stats/examine.q:917 #: src/language/stats/frequencies.q:1128 src/language/stats/frequencies.q:1407 #: src/ui/gui/var-sheet.c:71 msgid "Missing" msgstr "" -#: src/language/stats/crosstabs.q:871 src/language/stats/examine.q:991 +#: src/language/stats/crosstabs.q:871 src/language/stats/examine.q:997 #: src/language/stats/frequencies.q:1062 src/language/stats/frequencies.q:1063 #: src/language/stats/frequencies.q:1064 msgid "Percent" @@ -2719,7 +2719,7 @@ msgstr "" #: src/language/stats/crosstabs.q:1152 src/language/stats/crosstabs.q:1179 #: src/language/stats/crosstabs.q:1199 src/language/stats/crosstabs.q:1220 -#: src/language/stats/examine.q:1423 src/ui/gui/checkbox-treeview.c:115 +#: src/language/stats/examine.q:1454 src/ui/gui/checkbox-treeview.c:115 msgid "Statistic" msgstr "" @@ -2909,7 +2909,7 @@ msgstr "" msgid "%s Dependent" msgstr "" -#: src/language/stats/descriptives.c:102 src/language/stats/examine.q:1524 +#: src/language/stats/descriptives.c:102 src/language/stats/examine.q:1568 #: src/language/stats/frequencies.q:123 src/language/stats/npar-summary.c:125 #: src/language/stats/oneway.q:392 src/language/stats/t-test.q:694 #: src/language/stats/t-test.q:717 src/language/stats/t-test.q:849 @@ -2926,13 +2926,13 @@ msgstr "" msgid "Std Dev" msgstr "" -#: src/language/stats/descriptives.c:105 src/language/stats/examine.q:1604 +#: src/language/stats/descriptives.c:105 src/language/stats/examine.q:1648 #: src/language/stats/frequencies.q:128 src/ui/gui/descriptives-dialog.c:47 #: src/ui/gui/frequencies-dialog.c:46 msgid "Variance" msgstr "" -#: src/language/stats/descriptives.c:106 src/language/stats/examine.q:1711 +#: src/language/stats/descriptives.c:106 src/language/stats/examine.q:1755 #: src/language/stats/frequencies.q:129 src/ui/gui/descriptives-dialog.c:48 #: src/ui/gui/frequencies-dialog.c:51 msgid "Kurtosis" @@ -2942,7 +2942,7 @@ msgstr "" msgid "S E Kurt" msgstr "" -#: src/language/stats/descriptives.c:108 src/language/stats/examine.q:1691 +#: src/language/stats/descriptives.c:108 src/language/stats/examine.q:1735 #: src/language/stats/frequencies.q:131 src/ui/gui/descriptives-dialog.c:49 #: src/ui/gui/frequencies-dialog.c:47 msgid "Skewness" @@ -2952,20 +2952,20 @@ msgstr "" msgid "S E Skew" msgstr "" -#: src/language/stats/descriptives.c:110 src/language/stats/examine.q:1652 +#: src/language/stats/descriptives.c:110 src/language/stats/examine.q:1696 #: src/language/stats/frequencies.q:133 src/ui/gui/descriptives-dialog.c:44 #: src/ui/gui/frequencies-dialog.c:49 msgid "Range" msgstr "" -#: src/language/stats/descriptives.c:111 src/language/stats/examine.q:1629 +#: src/language/stats/descriptives.c:111 src/language/stats/examine.q:1673 #: src/language/stats/frequencies.q:134 src/language/stats/npar-summary.c:131 #: src/language/stats/oneway.q:404 src/ui/gui/descriptives-dialog.c:42 #: src/ui/gui/frequencies-dialog.c:43 msgid "Minimum" msgstr "" -#: src/language/stats/descriptives.c:112 src/language/stats/examine.q:1640 +#: src/language/stats/descriptives.c:112 src/language/stats/examine.q:1684 #: src/language/stats/frequencies.q:135 src/language/stats/npar-summary.c:134 #: src/language/stats/oneway.q:405 src/ui/gui/descriptives-dialog.c:43 #: src/ui/gui/frequencies-dialog.c:44 @@ -3022,116 +3022,116 @@ msgstr "" msgid "Valid cases = %g; cases with missing value(s) = %g." msgstr "" -#: src/language/stats/examine.q:286 src/language/stats/examine.q:289 +#: src/language/stats/examine.q:288 src/language/stats/examine.q:291 #, c-format msgid "%s is not currently supported." msgstr "" -#: src/language/stats/examine.q:495 src/language/stats/examine.q:508 +#: src/language/stats/examine.q:501 src/language/stats/examine.q:514 #, c-format msgid "%s and %s are mutually exclusive" msgstr "" -#: src/language/stats/examine.q:970 +#: src/language/stats/examine.q:976 msgid "Case Processing Summary" msgstr "" -#: src/language/stats/examine.q:1177 +#: src/language/stats/examine.q:1195 msgid "Extreme Values" msgstr "" -#: src/language/stats/examine.q:1193 +#: src/language/stats/examine.q:1211 msgid "Case Number" msgstr "" -#: src/language/stats/examine.q:1278 +#: src/language/stats/examine.q:1309 msgid "Highest" msgstr "" -#: src/language/stats/examine.q:1283 +#: src/language/stats/examine.q:1314 msgid "Lowest" msgstr "" -#: src/language/stats/examine.q:1424 src/language/stats/oneway.q:394 -#: src/language/stats/oneway.q:678 src/language/stats/regression.q:213 +#: src/language/stats/examine.q:1455 src/language/stats/oneway.q:394 +#: src/language/stats/oneway.q:692 src/language/stats/regression.q:211 msgid "Std. Error" msgstr "" -#: src/language/stats/examine.q:1426 src/language/stats/oneway.q:408 +#: src/language/stats/examine.q:1457 src/language/stats/oneway.q:408 msgid "Descriptives" msgstr "" -#: src/language/stats/examine.q:1542 src/language/stats/oneway.q:399 +#: src/language/stats/examine.q:1586 src/language/stats/oneway.q:399 #, c-format msgid "%g%% Confidence Interval for Mean" msgstr "" -#: src/language/stats/examine.q:1548 src/language/stats/oneway.q:401 +#: src/language/stats/examine.q:1592 src/language/stats/oneway.q:401 msgid "Lower Bound" msgstr "" -#: src/language/stats/examine.q:1559 src/language/stats/oneway.q:402 +#: src/language/stats/examine.q:1603 src/language/stats/oneway.q:402 msgid "Upper Bound" msgstr "" -#: src/language/stats/examine.q:1571 +#: src/language/stats/examine.q:1615 #, c-format msgid "5%% Trimmed Mean" msgstr "" -#: src/language/stats/examine.q:1582 src/language/stats/frequencies.q:125 +#: src/language/stats/examine.q:1626 src/language/stats/frequencies.q:125 #: src/ui/gui/frequencies-dialog.c:53 msgid "Median" msgstr "" -#: src/language/stats/examine.q:1616 src/language/stats/npar-summary.c:128 +#: src/language/stats/examine.q:1660 src/language/stats/npar-summary.c:128 #: src/language/stats/oneway.q:393 src/language/stats/t-test.q:695 #: src/language/stats/t-test.q:718 src/language/stats/t-test.q:851 #: src/language/stats/t-test.q:1188 msgid "Std. Deviation" msgstr "" -#: src/language/stats/examine.q:1664 +#: src/language/stats/examine.q:1708 msgid "Interquartile Range" msgstr "" -#: src/language/stats/examine.q:1816 +#: src/language/stats/examine.q:1862 #, c-format msgid "Boxplot of %s vs. %s" msgstr "" -#: src/language/stats/examine.q:1841 +#: src/language/stats/examine.q:1889 msgid "Boxplot" msgstr "" -#: src/language/stats/examine.q:1883 +#: src/language/stats/examine.q:1931 #, c-format msgid "Normal Q-Q Plot of %s" msgstr "" -#: src/language/stats/examine.q:1884 src/language/stats/examine.q:1890 +#: src/language/stats/examine.q:1932 src/language/stats/examine.q:1938 msgid "Observed Value" msgstr "" -#: src/language/stats/examine.q:1885 +#: src/language/stats/examine.q:1933 msgid "Expected Normal" msgstr "" -#: src/language/stats/examine.q:1888 +#: src/language/stats/examine.q:1936 #, c-format msgid "Detrended Normal Q-Q Plot of %s" msgstr "" -#: src/language/stats/examine.q:1891 +#: src/language/stats/examine.q:1939 msgid "Dev from Normal" msgstr "" -#: src/language/stats/examine.q:2010 src/language/stats/examine.q:2032 +#: src/language/stats/examine.q:2058 src/language/stats/examine.q:2080 #: src/language/stats/frequencies.q:1417 src/language/stats/npar-summary.c:141 msgid "Percentiles" msgstr "" -#: src/language/stats/examine.q:2156 +#: src/language/stats/examine.q:2216 msgid "Tukey's Hinges" msgstr "" @@ -3288,11 +3288,11 @@ msgstr "" msgid "Multivariate GLM not yet supported" msgstr "" -#: src/language/stats/glm.q:271 src/language/stats/regression.q:1164 +#: src/language/stats/glm.q:271 src/language/stats/regression.q:1170 msgid "Dependent variable must be numeric." msgstr "" -#: src/language/stats/glm.q:346 src/language/stats/regression.q:1261 +#: src/language/stats/glm.q:346 src/language/stats/regression.q:1267 msgid "No valid data found. This command was skipped." msgstr "" @@ -3304,6 +3304,22 @@ msgstr "" msgid "TABLES subcommand may not appear more than once." msgstr "" +#: src/language/stats/npar-summary.c:108 +msgid "Descriptive Statistics" +msgstr "" + +#: src/language/stats/npar-summary.c:145 +msgid "25th" +msgstr "" + +#: src/language/stats/npar-summary.c:148 +msgid "50th (Median)" +msgstr "" + +#: src/language/stats/npar-summary.c:151 +msgid "75th" +msgstr "" + #: src/language/stats/npar.q:98 msgid "NPAR subcommand not currently implemented." msgstr "" @@ -3328,22 +3344,6 @@ msgid "" "not match the number following (%zu)." msgstr "" -#: src/language/stats/npar-summary.c:108 -msgid "Descriptive Statistics" -msgstr "" - -#: src/language/stats/npar-summary.c:145 -msgid "25th" -msgstr "" - -#: src/language/stats/npar-summary.c:148 -msgid "50th (Median)" -msgstr "" - -#: src/language/stats/npar-summary.c:151 -msgid "75th" -msgstr "" - #: src/language/stats/oneway.q:169 msgid "Number of contrast coefficients must equal the number of groups" msgstr "" @@ -3358,21 +3358,21 @@ msgstr "" msgid "`%s' is not a variable name" msgstr "" -#: src/language/stats/oneway.q:278 src/language/stats/regression.q:310 +#: src/language/stats/oneway.q:278 src/language/stats/regression.q:311 msgid "Sum of Squares" msgstr "" -#: src/language/stats/oneway.q:280 src/language/stats/regression.q:312 +#: src/language/stats/oneway.q:280 src/language/stats/regression.q:313 msgid "Mean Square" msgstr "" -#: src/language/stats/oneway.q:281 src/language/stats/regression.q:313 +#: src/language/stats/oneway.q:281 src/language/stats/regression.q:314 #: src/language/stats/t-test.q:998 msgid "F" msgstr "" -#: src/language/stats/oneway.q:282 src/language/stats/oneway.q:536 -#: src/language/stats/regression.q:216 src/language/stats/regression.q:314 +#: src/language/stats/oneway.q:282 src/language/stats/oneway.q:542 +#: src/language/stats/regression.q:214 src/language/stats/regression.q:315 msgid "Significance" msgstr "" @@ -3384,58 +3384,58 @@ msgstr "" msgid "Within Groups" msgstr "" -#: src/language/stats/oneway.q:352 src/language/stats/regression.q:340 +#: src/language/stats/oneway.q:352 src/language/stats/regression.q:341 msgid "ANOVA" msgstr "" -#: src/language/stats/oneway.q:533 +#: src/language/stats/oneway.q:539 msgid "Levene Statistic" msgstr "" -#: src/language/stats/oneway.q:534 +#: src/language/stats/oneway.q:540 msgid "df1" msgstr "" -#: src/language/stats/oneway.q:535 +#: src/language/stats/oneway.q:541 msgid "df2" msgstr "" -#: src/language/stats/oneway.q:539 +#: src/language/stats/oneway.q:545 msgid "Test of Homogeneity of Variances" msgstr "" -#: src/language/stats/oneway.q:607 +#: src/language/stats/oneway.q:613 msgid "Contrast Coefficients" msgstr "" -#: src/language/stats/oneway.q:609 src/language/stats/oneway.q:676 +#: src/language/stats/oneway.q:615 src/language/stats/oneway.q:690 msgid "Contrast" msgstr "" -#: src/language/stats/oneway.q:674 +#: src/language/stats/oneway.q:688 msgid "Contrast Tests" msgstr "" -#: src/language/stats/oneway.q:677 +#: src/language/stats/oneway.q:691 msgid "Value of Contrast" msgstr "" -#: src/language/stats/oneway.q:679 src/language/stats/regression.q:215 +#: src/language/stats/oneway.q:693 src/language/stats/regression.q:213 #: src/language/stats/t-test.q:1000 src/language/stats/t-test.q:1192 #: src/language/stats/t-test.q:1285 msgid "t" msgstr "" -#: src/language/stats/oneway.q:681 src/language/stats/t-test.q:1002 +#: src/language/stats/oneway.q:695 src/language/stats/t-test.q:1002 #: src/language/stats/t-test.q:1194 src/language/stats/t-test.q:1287 msgid "Sig. (2-tailed)" msgstr "" -#: src/language/stats/oneway.q:725 +#: src/language/stats/oneway.q:739 msgid "Assume equal variances" msgstr "" -#: src/language/stats/oneway.q:729 +#: src/language/stats/oneway.q:743 msgid "Does not assume equal" msgstr "" @@ -3512,39 +3512,39 @@ msgstr "" msgid "Model Summary" msgstr "" -#: src/language/stats/regression.q:212 +#: src/language/stats/regression.q:210 msgid "B" msgstr "" -#: src/language/stats/regression.q:214 +#: src/language/stats/regression.q:212 msgid "Beta" msgstr "" -#: src/language/stats/regression.q:217 +#: src/language/stats/regression.q:215 msgid "(Constant)" msgstr "" -#: src/language/stats/regression.q:279 +#: src/language/stats/regression.q:281 msgid "Coefficients" msgstr "" -#: src/language/stats/regression.q:316 +#: src/language/stats/regression.q:317 msgid "Regression" msgstr "" -#: src/language/stats/regression.q:395 +#: src/language/stats/regression.q:396 msgid "Model" msgstr "" -#: src/language/stats/regression.q:396 +#: src/language/stats/regression.q:397 msgid "Covariances" msgstr "" -#: src/language/stats/regression.q:411 +#: src/language/stats/regression.q:412 msgid "Coefficient Correlations" msgstr "" -#: src/language/stats/regression.q:1038 +#: src/language/stats/regression.q:1044 msgid "" "The dependent variable is equal to the independent variable.The least " "squares line is therefore Y=X.Standard errors and related statistics may be " @@ -5322,14 +5322,6 @@ msgstr "" msgid "Paste" msgstr "" -#: src/ui/gui/psppire.c:199 -msgid "_Reset" -msgstr "" - -#: src/ui/gui/psppire.c:200 -msgid "_Select" -msgstr "" - #: src/ui/gui/psppire-data-store.c:816 msgid "var" msgstr "" @@ -5339,6 +5331,32 @@ msgstr "" msgid "%ld" msgstr "" +#: src/ui/gui/psppire-var-store.c:479 src/ui/gui/var-display.c:14 +msgid "None" +msgstr "" + +#: src/ui/gui/psppire-var-store.c:489 +msgid "Scientific" +msgstr "" + +#: src/ui/gui/psppire-var-store.c:492 +msgid "Custom" +msgstr "" + +#: src/ui/gui/psppire-var-store.c:563 src/ui/gui/psppire-var-store.c:573 +#: src/ui/gui/psppire-var-store.c:583 +#, c-format +msgid "%d" +msgstr "" + +#: src/ui/gui/psppire.c:199 +msgid "_Reset" +msgstr "" + +#: src/ui/gui/psppire.c:200 +msgid "_Select" +msgstr "" + #: src/ui/gui/psppire.glade:11 msgid "This is pre-alpha software. Use at your own risk." msgstr "" @@ -5563,24 +5581,6 @@ msgstr "" msgid "Search backward" msgstr "" -#: src/ui/gui/psppire-var-store.c:479 src/ui/gui/var-display.c:14 -msgid "None" -msgstr "" - -#: src/ui/gui/psppire-var-store.c:489 -msgid "Scientific" -msgstr "" - -#: src/ui/gui/psppire-var-store.c:492 -msgid "Custom" -msgstr "" - -#: src/ui/gui/psppire-var-store.c:563 src/ui/gui/psppire-var-store.c:573 -#: src/ui/gui/psppire-var-store.c:583 -#, c-format -msgid "%d" -msgstr "" - #: src/ui/gui/rank.glade:111 msgid "By:" msgstr "" @@ -5837,6 +5837,11 @@ msgstr "" msgid "To End" msgstr "" +#: src/ui/gui/t-test-options.c:60 +#, c-format +msgid "Confidence Interval: %2d %%" +msgstr "" + #: src/ui/gui/t-test.glade:53 src/ui/gui/t-test.glade:161 msgid "Define Groups" msgstr "" @@ -5877,9 +5882,24 @@ msgstr "" msgid "Test Value: " msgstr "" -#: src/ui/gui/t-test-options.c:60 -#, c-format -msgid "Confidence Interval: %2d %%" +#: src/ui/gui/var-sheet.c:65 +msgid "Name" +msgstr "" + +#: src/ui/gui/var-sheet.c:68 +msgid "Decimals" +msgstr "" + +#: src/ui/gui/var-sheet.c:70 +msgid "Values" +msgstr "" + +#: src/ui/gui/var-sheet.c:73 +msgid "Align" +msgstr "" + +#: src/ui/gui/var-sheet.c:74 +msgid "Measure" msgstr "" #: src/ui/gui/variable-info-dialog.c:88 @@ -5911,26 +5931,6 @@ msgstr "" msgid "%s %s\n" msgstr "" -#: src/ui/gui/var-sheet.c:65 -msgid "Name" -msgstr "" - -#: src/ui/gui/var-sheet.c:68 -msgid "Decimals" -msgstr "" - -#: src/ui/gui/var-sheet.c:70 -msgid "Values" -msgstr "" - -#: src/ui/gui/var-sheet.c:73 -msgid "Align" -msgstr "" - -#: src/ui/gui/var-sheet.c:74 -msgid "Measure" -msgstr "" - #: src/ui/gui/weight-cases-dialog.c:88 #, c-format msgid "Weight cases by %s" diff --git a/src/data/ChangeLog b/src/data/ChangeLog index 25d67925..c11dce5f 100644 --- a/src/data/ChangeLog +++ b/src/data/ChangeLog @@ -1,3 +1,9 @@ +2008-01-02 John Darrington + + * variable.c variable.h: Replaced var_get_value_name with + var_append_value_name which doesn't use any static data. + Thanks to Ben for review. + 2007-12-07 Ben Pfaff Patch #6302. diff --git a/src/data/variable.c b/src/data/variable.c index 4623b77b..0b8079ca 100644 --- a/src/data/variable.c +++ b/src/data/variable.c @@ -567,23 +567,26 @@ var_lookup_value_label (const struct variable *v, const union value *value) return val_labs_find (v->val_labs, *value); } -/* Get a string representing VALUE for variable V. - That is, if VALUE has a label, return that label, - otherwise format VALUE and return the formatted string. */ -const char * -var_get_value_name (const struct variable *v, const union value *value) +/* Append STR with a string representing VALUE for variable V. + That is, if VALUE has a label, append that label, + otherwise format VALUE and append the formatted string. + STR must be a pointer to an initialised struct string. +*/ +void +var_append_value_name (const struct variable *v, const union value *value, + struct string *str) { const char *name = var_lookup_value_label (v, value); if (name == NULL) { - static char buf[MAX_STRING + 1]; - data_out (value, &v->print, buf); - buf[v->print.w] = '\0'; - name = buf; + char *s = ds_put_uninit (str, v->print.w); + data_out (value, &v->print, s); } - return name; + else + ds_put_cstr (str, name); } + /* Print and write formats. */ /* Returns V's print format specification. */ diff --git a/src/data/variable.h b/src/data/variable.h index 66257e0e..ccfdd7f8 100644 --- a/src/data/variable.h +++ b/src/data/variable.h @@ -74,7 +74,13 @@ bool var_is_str_missing (const struct variable *, const char[], enum mv_class); /* Value labels. */ const char *var_lookup_value_label (const struct variable *, const union value *); -const char *var_get_value_name (const struct variable *, const union value *); +struct string; +void var_append_value_name (const struct variable *, const union value *, + struct string *); + +const char * +var_get_value_name (const struct variable *v, const union value *value); + bool var_has_value_labels (const struct variable *); const struct val_labs *var_get_value_labels (const struct variable *); diff --git a/src/language/stats/ChangeLog b/src/language/stats/ChangeLog index fda8c935..50478b4e 100644 --- a/src/language/stats/ChangeLog +++ b/src/language/stats/ChangeLog @@ -1,3 +1,8 @@ +2008-01-02 John Darrington + + * binomial.c chisquare.c examine.q frequencies.q oneway.q regression.q : updated + all users of var_get_value_name to use replacement function var_append_value_name. + 2007-12-07 Ben Pfaff Patch #6302. diff --git a/src/language/stats/binomial.c b/src/language/stats/binomial.c index f82647a4..39b8506d 100644 --- a/src/language/stats/binomial.c +++ b/src/language/stats/binomial.c @@ -185,7 +185,16 @@ binomial_execute (const struct dataset *ds, for (v = 0 ; v < ost->n_vars; ++v) { double n_total, sig; + struct string catstr1; + struct string catstr2; const struct variable *var = ost->vars[v]; + + ds_init_empty (&catstr1); + ds_init_empty (&catstr2); + + var_append_value_name (var, cat1[v].value, &catstr1); + var_append_value_name (var, cat2[v].value, &catstr2); + tab_hline (table, TAL_1, 0, tab_nc (table) -1, 1 + v * 3); /* Titles */ @@ -198,10 +207,8 @@ binomial_execute (const struct dataset *ds, tab_float (table, 5, 1 + v * 3, TAB_NONE, bst->p, 8, 3); /* Category labels */ - tab_text (table, 2, 1 + v * 3, TAB_NONE, - var_get_value_name (var, cat1[v].value)); - tab_text (table, 2, 2 + v * 3, TAB_NONE, - var_get_value_name (var, cat2[v].value)); + tab_text (table, 2, 1 + v * 3, TAB_NONE, ds_cstr (&catstr1)); + tab_text (table, 2, 2 + v * 3, TAB_NONE, ds_cstr (&catstr2)); /* Observed N */ tab_float (table, 3, 1 + v * 3, TAB_NONE, cat1[v].count, 8, 0); @@ -221,6 +228,9 @@ binomial_execute (const struct dataset *ds, /* Significance */ sig = calculate_binomial (cat1[v].count, cat2[v].count, bst->p); tab_float (table, 6, 1 + v * 3, TAB_NONE, sig, 8, 3); + + ds_destroy (&catstr1); + ds_destroy (&catstr2); } tab_text (table, 2, 0, TAB_CENTER, _("Category")); diff --git a/src/language/stats/chisquare.c b/src/language/stats/chisquare.c index 337203f1..158064dc 100644 --- a/src/language/stats/chisquare.c +++ b/src/language/stats/chisquare.c @@ -362,12 +362,17 @@ chisquare_execute (const struct dataset *ds, xsq[v] = 0.0; for ( i = 0 ; i < n_cells ; ++i ) { + struct string str; double exp; const union value *observed_value = ff[i]->value; + ds_init_empty (&str); + var_append_value_name (ost->vars[v], observed_value, &str); + /* The key */ - tab_text (freq_table, 0, i + 1, TAB_LEFT, - var_get_value_name (ost->vars[v], observed_value)); + tab_text (freq_table, 0, i + 1, TAB_LEFT, ds_cstr (&str)); + ds_destroy (&str); + /* The observed N */ tab_float (freq_table, 1, i + 1, TAB_NONE, @@ -428,13 +433,17 @@ chisquare_execute (const struct dataset *ds, xsq[v] = 0.0; for ( i = 0 ; i < hsh_count (freq_hash) ; ++i ) { + struct string str; double exp; const union value *observed_value = ff[i]->value; + ds_init_empty (&str); + var_append_value_name (ost->vars[v], observed_value, &str); /* The key */ tab_text (freq_table, v * 4 + 1, i + 2 , TAB_LEFT, - var_get_value_name (ost->vars[v], observed_value)); + ds_cstr (&str)); + ds_destroy (&str); /* The observed N */ tab_float (freq_table, v * 4 + 2, i + 2 , TAB_NONE, diff --git a/src/language/stats/examine.q b/src/language/stats/examine.q index 9d7ed136..fe762d33 100644 --- a/src/language/stats/examine.q +++ b/src/language/stats/examine.q @@ -161,16 +161,18 @@ void factor_calc (const struct ccase *c, int case_no, /* Represent a factor as a string, so it can be printed in a human readable fashion */ -const char * factor_to_string (const struct factor *fctr, +static void factor_to_string (const struct factor *fctr, const struct factor_statistics *fs, - const struct variable *var); - + const struct variable *var, + struct string *str + ); /* Represent a factor as a string, so it can be printed in a human readable fashion, but sacrificing some readablility for the sake of brevity */ -const char *factor_to_string_concise (const struct factor *fctr, - struct factor_statistics *fs); +static void factor_to_string_concise (const struct factor *fctr, + const struct factor_statistics *fs, + struct string *); @@ -370,10 +372,12 @@ output_examine (void) for ( fs = fctr->fs ; *fs ; ++fs ) { - const char *s = factor_to_string (fctr, *fs, dependent_vars[v]); + struct string str; + ds_init_empty (&str); + factor_to_string (fctr, *fs, dependent_vars[v], &str); if ( cmd.a_plot[XMN_PLT_NPPLOT] ) - np_plot (& (*fs)->m[v], s); + np_plot (& (*fs)->m[v], ds_cstr (&str)); if ( cmd.a_plot[XMN_PLT_HISTOGRAM] ) { @@ -384,9 +388,11 @@ output_examine (void) normal.stddev = (*fs)->m[v].stddev; histogram_plot ((*fs)->m[v].histogram, - s, &normal, 0); + ds_cstr (&str) , &normal, 0); } + ds_destroy (&str); + } /* for ( fs .... */ } /* for ( v = 0 ..... */ @@ -1053,15 +1059,21 @@ show_summary (const struct variable **dependent_var, int n_dep_var, 0 != compare_values (prev, (*fs)->id[0], var_get_width (fctr->indep_var[0]))) { + struct string vstr; + ds_init_empty (&vstr); + var_append_value_name (fctr->indep_var[0], + (*fs)->id[0], &vstr); + tab_text (tbl, 1, (i * n_factors ) + count + heading_rows, TAB_LEFT | TAT_TITLE, - var_get_value_name (fctr->indep_var[0], - (*fs)->id[0]) + ds_cstr (&vstr) ); + ds_destroy (&vstr); + if (fctr->indep_var[1] && count > 0 ) tab_hline (tbl, TAL_1, 1, n_cols - 1, (i * n_factors ) + count + heading_rows); @@ -1070,15 +1082,21 @@ show_summary (const struct variable **dependent_var, int n_dep_var, prev = (*fs)->id[0]; - if ( fctr->indep_var[1]) + { + struct string vstr; + ds_init_empty (&vstr); + var_append_value_name (fctr->indep_var[1], + (*fs)->id[1], &vstr); tab_text (tbl, 2, (i * n_factors ) + count + heading_rows, TAB_LEFT | TAT_TITLE, - var_get_value_name (fctr->indep_var[1], (*fs)->id[1]) + ds_cstr (&vstr) ); + ds_destroy (&vstr); + } populate_summary (tbl, heading_columns, (i * n_factors) + count @@ -1226,6 +1244,10 @@ show_extremes (const struct variable **dependent_var, int n_dep_var, if ( !prev || 0 != compare_values (prev, (*fs)->id[0], var_get_width (fctr->indep_var[0]))) { + struct string vstr; + ds_init_empty (&vstr); + var_append_value_name (fctr->indep_var[0], + (*fs)->id[0], &vstr); if ( count > 0 ) tab_hline (tbl, TAL_1, 1, n_cols - 1, row); @@ -1233,9 +1255,10 @@ show_extremes (const struct variable **dependent_var, int n_dep_var, tab_text (tbl, 1, row, TAB_LEFT | TAT_TITLE, - var_get_value_name (fctr->indep_var[0], - (*fs)->id[0]) + ds_cstr (&vstr) ); + + ds_destroy (&vstr); } prev = (*fs)->id[0]; @@ -1244,11 +1267,19 @@ show_extremes (const struct variable **dependent_var, int n_dep_var, tab_hline (tbl, TAL_1, 2, n_cols - 1, row); if ( fctr->indep_var[1]) + { + struct string vstr; + ds_init_empty (&vstr); + var_append_value_name (fctr->indep_var[1], (*fs)->id[1], &vstr); + tab_text (tbl, 2, row, TAB_LEFT | TAT_TITLE, - var_get_value_name (fctr->indep_var[1], (*fs)->id[1]) + ds_cstr (&vstr) ); + ds_destroy (&vstr); + } + populate_extremes (tbl, heading_columns - 2, row, n_extremities, & (*fs)->m[i]); @@ -1464,6 +1495,10 @@ show_descriptives (const struct variable **dependent_var, if ( !prev || 0 != compare_values (prev, (*fs)->id[0], var_get_width (fctr->indep_var[0]))) { + struct string vstr; + ds_init_empty (&vstr); + var_append_value_name (fctr->indep_var[0], + (*fs)->id[0], &vstr); if ( count > 0 ) tab_hline (tbl, TAL_1, 1, n_cols - 1, row); @@ -1471,9 +1506,10 @@ show_descriptives (const struct variable **dependent_var, tab_text (tbl, 1, row, TAB_LEFT | TAT_TITLE, - var_get_value_name (fctr->indep_var[0], - (*fs)->id[0]) + ds_cstr (&vstr) ); + + ds_destroy (&vstr); } prev = (*fs)->id[0]; @@ -1482,11 +1518,19 @@ show_descriptives (const struct variable **dependent_var, tab_hline (tbl, TAL_1, 2, n_cols - 1, row); if ( fctr->indep_var[1]) + { + struct string vstr; + ds_init_empty (&vstr); + var_append_value_name (fctr->indep_var[1], (*fs)->id[1], &vstr); + tab_text (tbl, 2, row, TAB_LEFT | TAT_TITLE, - var_get_value_name (fctr->indep_var[1], (*fs)->id[1]) + ds_cstr (&vstr) ); + ds_destroy (&vstr); + } + populate_descriptives (tbl, heading_columns - 2, row, & (*fs)->m[i]); @@ -1746,12 +1790,14 @@ box_plot_variables (const struct factor *fctr, for ( fs = fctr->fs ; *fs ; ++fs ) { + struct string str; double y_min = DBL_MAX; double y_max = -DBL_MAX; struct chart *ch = chart_create (); - const char *s = factor_to_string (fctr, *fs, 0 ); + ds_init_empty (&str); + factor_to_string (fctr, *fs, 0, &str ); - chart_write_title (ch, s); + chart_write_title (ch, ds_cstr (&str)); for ( i = 0 ; i < n_vars ; ++i ) { @@ -1779,7 +1825,7 @@ box_plot_variables (const struct factor *fctr, } chart_submit (ch); - + ds_destroy (&str); } } @@ -1818,19 +1864,21 @@ box_plot_group (const struct factor *fctr, for ( fs = fctr->fs ; *fs ; ++fs ) { - - const char *s = factor_to_string_concise (fctr, *fs); - + struct string str; const double box_width = (ch->data_right - ch->data_left) / (n_factors * 2.0 ) ; const double box_centre = ( f++ * 2 + 1) * box_width + ch->data_left; + ds_init_empty (&str); + factor_to_string_concise (fctr, *fs, &str); + boxplot_draw_boxplot (ch, box_centre, box_width, & (*fs)->m[i], - s); + ds_cstr (&str)); + ds_destroy (&str); } } else if ( ch ) @@ -2087,6 +2135,11 @@ show_percentiles (const struct variable **dependent_var, if ( !prev || 0 != compare_values (prev, (*fs)->id[0], var_get_width (fctr->indep_var[0]))) { + struct string vstr; + ds_init_empty (&vstr); + var_append_value_name (fctr->indep_var[0], + (*fs)->id[0], &vstr); + if ( count > 0 ) tab_hline (tbl, TAL_1, 1, n_cols - 1, row); @@ -2094,11 +2147,10 @@ show_percentiles (const struct variable **dependent_var, tab_text (tbl, 1, row, TAB_LEFT | TAT_TITLE, - var_get_value_name (fctr->indep_var[0], - (*fs)->id[0]) + ds_cstr (&vstr) ); - + ds_destroy (&vstr); } prev = (*fs)->id[0]; @@ -2107,11 +2159,19 @@ show_percentiles (const struct variable **dependent_var, tab_hline (tbl, TAL_1, 2, n_cols - 1, row); if ( fctr->indep_var[1]) + { + struct string vstr; + ds_init_empty (&vstr); + var_append_value_name (fctr->indep_var[1], (*fs)->id[1], &vstr); + tab_text (tbl, 2, row, TAB_LEFT | TAT_TITLE, - var_get_value_name (fctr->indep_var[1], (*fs)->id[1]) + ds_cstr (&vstr) ); + ds_destroy (&vstr); + } + populate_percentiles (tbl, n_heading_columns - 1, row, & (*fs)->m[i]); @@ -2192,69 +2252,54 @@ populate_percentiles (struct tab_table *tbl, int col, int row, } - - -const char * +static void factor_to_string (const struct factor *fctr, const struct factor_statistics *fs, - const struct variable *var) + const struct variable *var, + struct string *str + ) { - - static char buf1[100]; - char buf2[100]; - - strcpy (buf1,""); - if (var) - sprintf (buf1, "%s (",var_to_string (var) ); + ds_put_format (str, "%s (",var_to_string (var) ); - snprintf (buf2, 100, "%s = %s", - var_to_string (fctr->indep_var[0]), - var_get_value_name (fctr->indep_var[0], fs->id[0])); + ds_put_format (str, "%s = ", + var_to_string (fctr->indep_var[0])); - strcat (buf1, buf2); + var_append_value_name (fctr->indep_var[0], fs->id[0], str); if ( fctr->indep_var[1] ) { - sprintf (buf2, "; %s = %s)", - var_to_string (fctr->indep_var[1]), - var_get_value_name (fctr->indep_var[1], fs->id[1])); - strcat (buf1, buf2); + ds_put_format (str, "; %s = )", + var_to_string (fctr->indep_var[1])); + + var_append_value_name (fctr->indep_var[1], fs->id[1], str); } else { if ( var ) - strcat (buf1, ")"); + ds_put_cstr (str, ")"); } - - return buf1; } - -const char * +static void factor_to_string_concise (const struct factor *fctr, - struct factor_statistics *fs) + const struct factor_statistics *fs, + struct string *str + ) { - - static char buf[100]; - - char buf2[100]; - - snprintf (buf, 100, "%s", - var_get_value_name (fctr->indep_var[0], fs->id[0])); + var_append_value_name (fctr->indep_var[0], fs->id[0], str); if ( fctr->indep_var[1] ) { - sprintf (buf2, ",%s)", var_get_value_name (fctr->indep_var[1], - fs->id[1]) ); - strcat (buf, buf2); - } + ds_put_cstr (str, ","); + var_append_value_name (fctr->indep_var[1],fs->id[1], str); - return buf; + ds_put_cstr (str, ")"); + } } /* diff --git a/src/language/stats/frequencies.q b/src/language/stats/frequencies.q index ef4769b6..3857bd85 100644 --- a/src/language/stats/frequencies.q +++ b/src/language/stats/frequencies.q @@ -1499,7 +1499,7 @@ freq_tab_to_slice_array(const struct freq_tab *frq_tab, { const struct freq *frq = &frq_tab->valid[i]; - slices[i].label = var_get_value_name (var, frq->value); + var_append_value_name (var, frq->value, &slices[i].label); slices[i].magnetude = frq->count; } @@ -1513,12 +1513,17 @@ static void do_piechart(const struct variable *var, const struct freq_tab *frq_tab) { struct slice *slices; - int n_slices; + int n_slices, i; slices = freq_tab_to_slice_array(frq_tab, var, &n_slices); piechart_plot(var_to_string(var), slices, n_slices); + for (i = 0 ; i < n_slices ; ++i ) + { + ds_destroy (&slices[i].label); + } + free(slices); } diff --git a/src/language/stats/oneway.q b/src/language/stats/oneway.q index 8215d6b8..7da99227 100644 --- a/src/language/stats/oneway.q +++ b/src/language/stats/oneway.q @@ -431,11 +431,17 @@ show_descriptives(void) for (count = 0 ; count < hsh_count(gp->group_hash) ; ++count) { + struct string vstr; + ds_init_empty (&vstr); gs = gs_array[count]; + var_append_value_name (indep_var, &gs->id, &vstr); + tab_text (t, 1, row + count, - TAB_LEFT | TAT_TITLE, var_get_value_name(indep_var, - &gs->id)); + TAB_LEFT | TAT_TITLE, + ds_cstr (&vstr)); + + ds_destroy (&vstr); /* Now fill in the numbers ... */ @@ -618,10 +624,18 @@ show_contrast_coeffs (short *bad_contrast) ++count) { int i; + struct string vstr; group_value = group_values[count]; + ds_init_empty (&vstr); + + var_append_value_name (indep_var, group_value, &vstr); + tab_text (t, count + 2, 1, TAB_CENTER | TAT_TITLE, - var_get_value_name (indep_var, group_value)); + ds_cstr (&vstr)); + + ds_destroy (&vstr); + for (i = 0 ; i < cmd.sbc_contrast ; ++i ) { diff --git a/src/language/stats/regression.q b/src/language/stats/regression.q index 12a7cf5e..bed4f79d 100644 --- a/src/language/stats/regression.q +++ b/src/language/stats/regression.q @@ -191,14 +191,12 @@ reg_stats_coeff (pspp_linreg_cache * c) double std_err; double beta; const char *label; - char *tmp; + const struct variable *v; const union value *val; - const char *val_s; struct tab_table *t; assert (c != NULL); - tmp = xnmalloc (MAX_STRING, sizeof (*tmp)); n_rows = c->n_coeffs + 2; t = tab_create (n_cols, n_rows, 0); @@ -227,10 +225,13 @@ reg_stats_coeff (pspp_linreg_cache * c) tab_float (t, 6, 1, 0, pval, 10, 2); for (j = 1; j <= c->n_indeps; j++) { + struct string tstr; + ds_init_empty (&tstr); + v = pspp_coeff_get_var (c->coeff[j], 0); label = var_to_string (v); /* Do not overwrite the variable's name. */ - strncpy (tmp, label, MAX_STRING); + ds_put_cstr (&tstr, label); if (var_is_alpha (v)) { /* @@ -240,11 +241,11 @@ reg_stats_coeff (pspp_linreg_cache * c) */ val = pspp_coeff_get_value (c->coeff[j], v); - val_s = var_get_value_name (v, val); - strncat (tmp, val_s, MAX_STRING); + + var_append_value_name (v, val, &tstr); } - tab_text (t, 1, j + 1, TAB_CENTER, tmp); + tab_text (t, 1, j + 1, TAB_CENTER, ds_cstr (&tstr)); /* Regression coefficients. */ @@ -275,10 +276,10 @@ reg_stats_coeff (pspp_linreg_cache * c) 2 * gsl_cdf_tdist_Q (fabs (t_stat), (double) (c->n_obs - c->n_coeffs)); tab_float (t, 6, j + 1, 0, pval, 10, 2); + ds_destroy (&tstr); } tab_title (t, _("Coefficients")); tab_submit (t); - free (tmp); } /* @@ -782,10 +783,15 @@ reg_print_categorical_encoding (FILE * fp, pspp_linreg_cache * c) for (j = 0; j < n_categories; j++) { + struct string vstr; const union value *val = cat_subscript_to_value (j, varlist[i]); + ds_init_empty (&vstr); + var_append_value_name (varlist[i], val, &vstr); fprintf (fp, "%s.values[%d] = \"%s\";\n\t", var_get_name (varlist[i]), j, - var_get_value_name (varlist[i], val)); + ds_cstr (&vstr)); + + ds_destroy (&vstr); } } fprintf (fp, "%s", reg_export_categorical_encode_2); diff --git a/src/output/charts/piechart.c b/src/output/charts/piechart.c index aeac555c..c4dc0e67 100644 --- a/src/output/charts/piechart.c +++ b/src/output/charts/piechart.c @@ -104,7 +104,7 @@ piechart_plot(const char *title, const struct slice *slices, int n_slices) pl_line_r(ch->lp, label_x, label_y, left_label, label_y ); pl_moverel_r(ch->lp,0,5); - pl_alabel_r(ch->lp,0,0,slices[i].label); + pl_alabel_r (ch->lp, 0, 0, ds_cstr (&slices[i].label)); } else { @@ -113,7 +113,7 @@ piechart_plot(const char *title, const struct slice *slices, int n_slices) right_label, label_y ); pl_moverel_r(ch->lp,0,5); - pl_alabel_r(ch->lp,'r',0,slices[i].label); + pl_alabel_r (ch->lp, 'r', 0, ds_cstr (&slices[i].label)); } angle += segment_angle; diff --git a/src/output/charts/piechart.h b/src/output/charts/piechart.h index d17ecec4..96540401 100644 --- a/src/output/charts/piechart.h +++ b/src/output/charts/piechart.h @@ -17,8 +17,10 @@ #ifndef PIECHART_H #define PIECHART_H +#include + struct slice { - const char *label; + struct string label; double magnetude; }; -- 2.30.2