msgstr ""
"Project-Id-Version: PSPP 0.3.1\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2005-01-09 16:22+0800\n"
+"POT-Creation-Date: 2005-01-14 11:58+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"
"by %d lines."
msgstr ""
-#: src/ascii.c:390 src/devind.c:167 src/html.c:102 src/postscript.c:458
+#: src/ascii.c:390 src/devind.c:167 src/html.c:103 src/postscript.c:458
#, c-format
msgid "%s: Initialization complete."
msgstr ""
-#: src/ascii.c:402 src/devind.c:179 src/html.c:114 src/postscript.c:471
+#: src/ascii.c:402 src/devind.c:179 src/html.c:115 src/postscript.c:471
#, c-format
msgid "%s: Beginning closing..."
msgstr ""
-#: src/ascii.c:424 src/devind.c:184 src/html.c:119 src/postscript.c:490
+#: src/ascii.c:424 src/devind.c:184 src/html.c:120 src/postscript.c:490
#, c-format
msgid "%s: Finished closing."
msgstr ""
msgid "%s - Page %d"
msgstr ""
+#: src/ascii.c:1646
+msgid "Charts are unsupported with ascii drivers."
+msgstr ""
+
#: src/autorecode.c:122
#, c-format
msgid "Source variable count (%d) does not match target variable count (%d)."
msgid "Error writing temporary file: %s."
msgstr ""
-#: src/casefile.c:363
-#, c-format
-msgid "%s: Creating temporary file: %s."
-msgstr ""
-
-#: src/casefile.c:507
+#: src/casefile.c:478
#, c-format
msgid "%s: Opening temporary file: %s."
msgstr ""
-#: src/casefile.c:533
+#: src/casefile.c:504
#, c-format
msgid "%s: Seeking temporary file: %s."
msgstr ""
-#: src/casefile.c:549
+#: src/casefile.c:520
#, c-format
msgid "%s: Reading temporary file: %s."
msgstr ""
-#: src/casefile.c:552
+#: src/casefile.c:523
#, c-format
msgid "%s: Temporary file ended unexpectedly."
msgstr ""
-#: src/cmdline.c:141 src/cmdline.c:160 src/cmdline.c:172 src/command.c:161
+#: src/cmdline.c:142 src/cmdline.c:161 src/cmdline.c:173 src/command.c:161
#: src/set.q:415 src/set.q:417 src/set.q:956
#, c-format
msgid "%s is not yet implemented."
msgstr ""
-#: src/cmdline.c:186
-msgid ""
-"\n"
-"Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.\n"
-"This is free software; see the source for copying conditions. There is NO\n"
-"WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
-"\n"
-"Written by Ben Pfaff <blp@gnu.org>."
-msgstr ""
-
-#: src/cmdline.c:248
+#: src/cmdline.c:243
#, c-format
msgid ""
"PSPP, a program for statistical analysis of sample data.\n"
"\n"
msgstr ""
-#: src/cmdline.c:286
+#: src/cmdline.c:281
#, c-format
msgid ""
"\n"
"to the command prompt. Use EXIT if you really want to quit."
msgstr ""
-#: src/command.c:626 src/command.c:757
+#: src/command.c:626 src/command.c:757 src/permissions.c:101
msgid "This command not allowed when the SAFER option is set."
msgstr ""
msgid "Only USE ALL is currently implemented."
msgstr ""
-#: src/descript.c:99 src/examine.q:1422 src/frequencies.q:112 src/oneway.q:396
+#: src/descript.c:99 src/examine.q:1418 src/frequencies.q:112 src/oneway.q:396
#: src/t-test.q:690 src/t-test.q:713 src/t-test.q:836 src/t-test.q:1173
msgid "Mean"
msgstr ""
msgid "Std Dev"
msgstr ""
-#: src/descript.c:102 src/examine.q:1500 src/frequencies.q:117
+#: src/descript.c:102 src/examine.q:1496 src/frequencies.q:117
msgid "Variance"
msgstr ""
-#: src/descript.c:103 src/examine.q:1607 src/frequencies.q:118
+#: src/descript.c:103 src/examine.q:1603 src/frequencies.q:118
msgid "Kurtosis"
msgstr ""
msgid "S E Kurt"
msgstr ""
-#: src/descript.c:105 src/examine.q:1587 src/frequencies.q:120
+#: src/descript.c:105 src/examine.q:1583 src/frequencies.q:120
msgid "Skewness"
msgstr ""
msgid "S E Skew"
msgstr ""
-#: src/descript.c:107 src/examine.q:1548 src/frequencies.q:122
+#: src/descript.c:107 src/examine.q:1544 src/frequencies.q:122
msgid "Range"
msgstr ""
-#: src/descript.c:108 src/examine.q:1525 src/frequencies.q:123
+#: src/descript.c:108 src/examine.q:1521 src/frequencies.q:123
#: src/oneway.q:408
msgid "Minimum"
msgstr ""
-#: src/descript.c:109 src/examine.q:1536 src/frequencies.q:124
+#: src/descript.c:109 src/examine.q:1532 src/frequencies.q:124
#: src/oneway.q:409
msgid "Maximum"
msgstr ""
msgid "Opening `%s': %s."
msgstr ""
-#: src/getline.c:335 src/html.c:331 src/postscript.c:1463
+#: src/getline.c:335 src/html.c:348 src/postscript.c:1463
#, c-format
msgid "Reading `%s': %s."
msgstr ""
msgid "hash table:"
msgstr ""
-#: src/html.c:66
+#: src/html.c:67
#, c-format
msgid "HTML driver initializing as `%s'..."
msgstr ""
-#: src/html.c:154
+#: src/html.c:171
#, c-format
msgid "Unknown configuration parameter `%s' for HTML device driver."
msgstr ""
-#: src/html.c:237
+#: src/html.c:254
msgid ""
"Cannot find HTML prologue. The use of `-vv' on the command line is "
"suggested as a debugging aid."
msgstr ""
-#: src/html.c:242
+#: src/html.c:259
#, c-format
msgid "%s: %s: Opening HTML prologue..."
msgstr ""
-#: src/html.c:269 src/html.c:280 src/postscript.c:1355 src/postscript.c:1366
+#: src/html.c:286 src/html.c:297 src/postscript.c:1355 src/postscript.c:1366
msgid "nobody"
msgstr ""
-#: src/html.c:276 src/html.c:281 src/postscript.c:1362 src/postscript.c:1367
+#: src/html.c:293 src/html.c:298 src/postscript.c:1362 src/postscript.c:1367
msgid "nowhere"
msgstr ""
-#: src/html.c:340
+#: src/html.c:357
#, c-format
msgid "%s: HTML prologue read successfully."
msgstr ""
-#: src/html.c:344
+#: src/html.c:361
#, c-format
msgid "%s: Error reading HTML prologue."
msgstr ""
-#: src/html.c:372
+#: src/html.c:389
#, c-format
msgid "HTML output driver: %s: %s"
msgstr ""
-#: src/html.c:403 src/list.q:252
+#: src/html.c:420 src/list.q:252
#, c-format
msgid "Cannot open first page on HTML device %s."
msgstr ""
msgid "%s without %s."
msgstr ""
-#: src/main.c:77
+#: src/main.c:86
msgid "Error initializing output drivers."
msgstr ""
-#: src/main.c:147
+#: src/main.c:156
msgid "This command not executed."
msgstr ""
-#: src/main.c:151
+#: src/main.c:160
msgid ""
"Skipping the rest of this command. Part of this command may have been "
"executed."
msgstr ""
-#: src/main.c:156
+#: src/main.c:165
msgid ""
"Skipping the rest of this command. This command was fully executed up to "
"this point."
msgstr ""
-#: src/main.c:161
+#: src/main.c:170
msgid ""
"Trailing garbage was encountered following this command. The command was "
"fully executed to this point."
msgstr ""
-#: src/main.c:178
+#: src/main.c:187
msgid "The rest of this command has been discarded."
msgstr ""
msgid "String expected."
msgstr ""
+#: src/mkfile.c:52
+#, c-format
+msgid "%s: Creating temporary file: %s."
+msgstr ""
+
+#: src/mkfile.c:94
+#, c-format
+msgid "%s: Creating file: %s."
+msgstr ""
+
#: src/modify-vars.c:89
msgid ""
"MODIFY VARS may not be used after TEMPORARY. Temporary transformations will "
msgid "Empirical with averaging"
msgstr ""
-#: src/permissions.c:75
+#: src/permissions.c:76
#, c-format
msgid "Expecting %s or %s."
msgstr ""
-#: src/permissions.c:101
+#: src/permissions.c:109
#, c-format
msgid "Cannot stat %s: %s"
msgstr ""
-#: src/permissions.c:114
+#: src/permissions.c:122
#, c-format
msgid "Cannot change mode of %s: %s"
msgstr ""
msgid "%s: Writing portable file: %s."
msgstr ""
-#: src/plot-hist.c:115
+#: src/plot-hist.c:118
msgid "HISTOGRAM"
msgstr ""
-#: src/plot-hist.c:117 src/frequencies.q:1139
+#: src/plot-hist.c:120 src/frequencies.q:1139
msgid "Frequency"
msgstr ""
#: src/sysfile-info.c:531 src/vfm.c:875 src/crosstabs.q:1099
#: src/crosstabs.q:1126 src/crosstabs.q:1146 src/crosstabs.q:1168
-#: src/examine.q:1086 src/frequencies.q:1138 src/frequencies.q:1259
+#: src/examine.q:1082 src/frequencies.q:1138 src/frequencies.q:1259
msgid "Value"
msgstr ""
msgid "Summary."
msgstr ""
-#: src/crosstabs.q:802 src/examine.q:871
+#: src/crosstabs.q:802 src/examine.q:867
msgid "Cases"
msgstr ""
-#: src/crosstabs.q:803 src/examine.q:805 src/frequencies.q:1136
+#: src/crosstabs.q:803 src/examine.q:801 src/frequencies.q:1136
#: src/frequencies.q:1509
msgid "Valid"
msgstr ""
-#: src/crosstabs.q:804 src/examine.q:806 src/frequencies.q:1204
+#: src/crosstabs.q:804 src/examine.q:802 src/frequencies.q:1204
#: src/frequencies.q:1510
msgid "Missing"
msgstr ""
#: src/crosstabs.q:805 src/crosstabs.q:1008 src/crosstabs.q:1722
-#: src/examine.q:807 src/frequencies.q:1213 src/oneway.q:307 src/oneway.q:476
+#: src/examine.q:803 src/frequencies.q:1213 src/oneway.q:307 src/oneway.q:476
msgid "Total"
msgstr ""
-#: src/crosstabs.q:815 src/examine.q:883 src/frequencies.q:1508
+#: src/crosstabs.q:815 src/examine.q:879 src/frequencies.q:1508
#: src/oneway.q:395 src/t-test.q:689 src/t-test.q:712 src/t-test.q:837
#: src/t-test.q:1372
msgid "N"
msgstr ""
-#: src/crosstabs.q:816 src/examine.q:886 src/frequencies.q:1140
+#: src/crosstabs.q:816 src/examine.q:882 src/frequencies.q:1140
#: src/frequencies.q:1141 src/frequencies.q:1142
msgid "Percent"
msgstr ""
msgstr ""
#: src/crosstabs.q:1098 src/crosstabs.q:1125 src/crosstabs.q:1145
-#: src/crosstabs.q:1166 src/examine.q:1317
+#: src/crosstabs.q:1166 src/examine.q:1313
msgid "Statistic"
msgstr ""
msgid "%s Dependent"
msgstr ""
-#: src/examine.q:450 src/examine.q:462
+#: src/examine.q:446 src/examine.q:458
#, c-format
msgid "%s and %s are mutually exclusive"
msgstr ""
-#: src/examine.q:865
+#: src/examine.q:861
msgid "Case Processing Summary"
msgstr ""
-#: src/examine.q:1071
+#: src/examine.q:1067
msgid "Extreme Values"
msgstr ""
-#: src/examine.q:1087
+#: src/examine.q:1083
msgid "Case Number"
msgstr ""
-#: src/examine.q:1172
+#: src/examine.q:1168
msgid "Highest"
msgstr ""
-#: src/examine.q:1177
+#: src/examine.q:1173
msgid "Lowest"
msgstr ""
-#: src/examine.q:1318 src/oneway.q:398 src/oneway.q:695
+#: src/examine.q:1314 src/oneway.q:398 src/oneway.q:695
msgid "Std. Error"
msgstr ""
-#: src/examine.q:1320 src/oneway.q:412
+#: src/examine.q:1316 src/oneway.q:412
msgid "Descriptives"
msgstr ""
-#: src/examine.q:1440 src/oneway.q:403
+#: src/examine.q:1436 src/oneway.q:403
#, c-format
msgid "%g%% Confidence Interval for Mean"
msgstr ""
-#: src/examine.q:1446 src/oneway.q:405
+#: src/examine.q:1442 src/oneway.q:405
msgid "Lower Bound"
msgstr ""
-#: src/examine.q:1457 src/oneway.q:406
+#: src/examine.q:1453 src/oneway.q:406
msgid "Upper Bound"
msgstr ""
-#: src/examine.q:1469
+#: src/examine.q:1465
msgid "5% Trimmed Mean"
msgstr ""
-#: src/examine.q:1480 src/frequencies.q:114
+#: src/examine.q:1476 src/frequencies.q:114
msgid "Median"
msgstr ""
-#: src/examine.q:1512 src/oneway.q:397 src/t-test.q:691 src/t-test.q:714
+#: src/examine.q:1508 src/oneway.q:397 src/t-test.q:691 src/t-test.q:714
#: src/t-test.q:838 src/t-test.q:1174
msgid "Std. Deviation"
msgstr ""
-#: src/examine.q:1560
+#: src/examine.q:1556
msgid "Interquartile Range"
msgstr ""
-#: src/examine.q:1716
+#: src/examine.q:1711
#, c-format
msgid "Boxplot of %s vs. %s"
msgstr ""
-#: src/examine.q:1741
+#: src/examine.q:1736
msgid "Boxplot"
msgstr ""
-#: src/examine.q:1780
+#: src/examine.q:1778
#, c-format
msgid "Normal Q-Q Plot of %s"
msgstr ""
-#: src/examine.q:1781 src/examine.q:1787
+#: src/examine.q:1779 src/examine.q:1785
msgid "Observed Value"
msgstr ""
-#: src/examine.q:1782
+#: src/examine.q:1780
msgid "Expected Normal"
msgstr ""
-#: src/examine.q:1785
+#: src/examine.q:1783
#, c-format
msgid "Detrended Normal Q-Q Plot of %s"
msgstr ""
-#: src/examine.q:1788
+#: src/examine.q:1786
msgid "Dev from Normal"
msgstr ""
-#: src/examine.q:1909 src/examine.q:1931 src/frequencies.q:1520
+#: src/examine.q:1906 src/examine.q:1928 src/frequencies.q:1520
msgid "Percentiles"
msgstr ""
-#: src/examine.q:2056
+#: src/examine.q:2053
msgid "Tukey's Hinges"
msgstr ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2005-01-09 16:22+0800\n"
+"POT-Creation-Date: 2005-01-14 11:58+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"
"by %d lines."
msgstr ""
-#: src/ascii.c:390 src/devind.c:167 src/html.c:102 src/postscript.c:458
+#: src/ascii.c:390 src/devind.c:167 src/html.c:103 src/postscript.c:458
#, c-format
msgid "%s: Initialization complete."
msgstr ""
-#: src/ascii.c:402 src/devind.c:179 src/html.c:114 src/postscript.c:471
+#: src/ascii.c:402 src/devind.c:179 src/html.c:115 src/postscript.c:471
#, c-format
msgid "%s: Beginning closing..."
msgstr ""
-#: src/ascii.c:424 src/devind.c:184 src/html.c:119 src/postscript.c:490
+#: src/ascii.c:424 src/devind.c:184 src/html.c:120 src/postscript.c:490
#, c-format
msgid "%s: Finished closing."
msgstr ""
msgid "%s - Page %d"
msgstr ""
+#: src/ascii.c:1646
+msgid "Charts are unsupported with ascii drivers."
+msgstr ""
+
#: src/autorecode.c:122
#, c-format
msgid "Source variable count (%d) does not match target variable count (%d)."
msgid "Error writing temporary file: %s."
msgstr ""
-#: src/casefile.c:363
-#, c-format
-msgid "%s: Creating temporary file: %s."
-msgstr ""
-
-#: src/casefile.c:507
+#: src/casefile.c:478
#, c-format
msgid "%s: Opening temporary file: %s."
msgstr ""
-#: src/casefile.c:533
+#: src/casefile.c:504
#, c-format
msgid "%s: Seeking temporary file: %s."
msgstr ""
-#: src/casefile.c:549
+#: src/casefile.c:520
#, c-format
msgid "%s: Reading temporary file: %s."
msgstr ""
-#: src/casefile.c:552
+#: src/casefile.c:523
#, c-format
msgid "%s: Temporary file ended unexpectedly."
msgstr ""
-#: src/cmdline.c:141 src/cmdline.c:160 src/cmdline.c:172 src/command.c:161
+#: src/cmdline.c:142 src/cmdline.c:161 src/cmdline.c:173 src/command.c:161
#: src/set.q:415 src/set.q:417 src/set.q:956
#, c-format
msgid "%s is not yet implemented."
msgstr ""
-#: src/cmdline.c:186
-msgid ""
-"\n"
-"Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.\n"
-"This is free software; see the source for copying conditions. There is NO\n"
-"WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
-"\n"
-"Written by Ben Pfaff <blp@gnu.org>."
-msgstr ""
-
-#: src/cmdline.c:248
+#: src/cmdline.c:243
#, c-format
msgid ""
"PSPP, a program for statistical analysis of sample data.\n"
"\n"
msgstr ""
-#: src/cmdline.c:286
+#: src/cmdline.c:281
#, c-format
msgid ""
"\n"
"to the command prompt. Use EXIT if you really want to quit."
msgstr ""
-#: src/command.c:626 src/command.c:757
+#: src/command.c:626 src/command.c:757 src/permissions.c:101
msgid "This command not allowed when the SAFER option is set."
msgstr ""
msgid "Only USE ALL is currently implemented."
msgstr ""
-#: src/descript.c:99 src/examine.q:1422 src/frequencies.q:112 src/oneway.q:396
+#: src/descript.c:99 src/examine.q:1418 src/frequencies.q:112 src/oneway.q:396
#: src/t-test.q:690 src/t-test.q:713 src/t-test.q:836 src/t-test.q:1173
msgid "Mean"
msgstr ""
msgid "Std Dev"
msgstr ""
-#: src/descript.c:102 src/examine.q:1500 src/frequencies.q:117
+#: src/descript.c:102 src/examine.q:1496 src/frequencies.q:117
msgid "Variance"
msgstr ""
-#: src/descript.c:103 src/examine.q:1607 src/frequencies.q:118
+#: src/descript.c:103 src/examine.q:1603 src/frequencies.q:118
msgid "Kurtosis"
msgstr ""
msgid "S E Kurt"
msgstr ""
-#: src/descript.c:105 src/examine.q:1587 src/frequencies.q:120
+#: src/descript.c:105 src/examine.q:1583 src/frequencies.q:120
msgid "Skewness"
msgstr ""
msgid "S E Skew"
msgstr ""
-#: src/descript.c:107 src/examine.q:1548 src/frequencies.q:122
+#: src/descript.c:107 src/examine.q:1544 src/frequencies.q:122
msgid "Range"
msgstr ""
-#: src/descript.c:108 src/examine.q:1525 src/frequencies.q:123
+#: src/descript.c:108 src/examine.q:1521 src/frequencies.q:123
#: src/oneway.q:408
msgid "Minimum"
msgstr ""
-#: src/descript.c:109 src/examine.q:1536 src/frequencies.q:124
+#: src/descript.c:109 src/examine.q:1532 src/frequencies.q:124
#: src/oneway.q:409
msgid "Maximum"
msgstr ""
msgid "Opening `%s': %s."
msgstr ""
-#: src/getline.c:335 src/html.c:331 src/postscript.c:1463
+#: src/getline.c:335 src/html.c:348 src/postscript.c:1463
#, c-format
msgid "Reading `%s': %s."
msgstr ""
msgid "hash table:"
msgstr ""
-#: src/html.c:66
+#: src/html.c:67
#, c-format
msgid "HTML driver initializing as `%s'..."
msgstr ""
-#: src/html.c:154
+#: src/html.c:171
#, c-format
msgid "Unknown configuration parameter `%s' for HTML device driver."
msgstr ""
-#: src/html.c:237
+#: src/html.c:254
msgid ""
"Cannot find HTML prologue. The use of `-vv' on the command line is "
"suggested as a debugging aid."
msgstr ""
-#: src/html.c:242
+#: src/html.c:259
#, c-format
msgid "%s: %s: Opening HTML prologue..."
msgstr ""
-#: src/html.c:269 src/html.c:280 src/postscript.c:1355 src/postscript.c:1366
+#: src/html.c:286 src/html.c:297 src/postscript.c:1355 src/postscript.c:1366
msgid "nobody"
msgstr ""
-#: src/html.c:276 src/html.c:281 src/postscript.c:1362 src/postscript.c:1367
+#: src/html.c:293 src/html.c:298 src/postscript.c:1362 src/postscript.c:1367
msgid "nowhere"
msgstr ""
-#: src/html.c:340
+#: src/html.c:357
#, c-format
msgid "%s: HTML prologue read successfully."
msgstr ""
-#: src/html.c:344
+#: src/html.c:361
#, c-format
msgid "%s: Error reading HTML prologue."
msgstr ""
-#: src/html.c:372
+#: src/html.c:389
#, c-format
msgid "HTML output driver: %s: %s"
msgstr ""
-#: src/html.c:403 src/list.q:252
+#: src/html.c:420 src/list.q:252
#, c-format
msgid "Cannot open first page on HTML device %s."
msgstr ""
msgid "%s without %s."
msgstr ""
-#: src/main.c:77
+#: src/main.c:86
msgid "Error initializing output drivers."
msgstr ""
-#: src/main.c:147
+#: src/main.c:156
msgid "This command not executed."
msgstr ""
-#: src/main.c:151
+#: src/main.c:160
msgid ""
"Skipping the rest of this command. Part of this command may have been "
"executed."
msgstr ""
-#: src/main.c:156
+#: src/main.c:165
msgid ""
"Skipping the rest of this command. This command was fully executed up to "
"this point."
msgstr ""
-#: src/main.c:161
+#: src/main.c:170
msgid ""
"Trailing garbage was encountered following this command. The command was "
"fully executed to this point."
msgstr ""
-#: src/main.c:178
+#: src/main.c:187
msgid "The rest of this command has been discarded."
msgstr ""
msgid "String expected."
msgstr ""
+#: src/mkfile.c:52
+#, c-format
+msgid "%s: Creating temporary file: %s."
+msgstr ""
+
+#: src/mkfile.c:94
+#, c-format
+msgid "%s: Creating file: %s."
+msgstr ""
+
#: src/modify-vars.c:89
msgid ""
"MODIFY VARS may not be used after TEMPORARY. Temporary transformations will "
msgid "Empirical with averaging"
msgstr ""
-#: src/permissions.c:75
+#: src/permissions.c:76
#, c-format
msgid "Expecting %s or %s."
msgstr ""
-#: src/permissions.c:101
+#: src/permissions.c:109
#, c-format
msgid "Cannot stat %s: %s"
msgstr ""
-#: src/permissions.c:114
+#: src/permissions.c:122
#, c-format
msgid "Cannot change mode of %s: %s"
msgstr ""
msgid "%s: Writing portable file: %s."
msgstr ""
-#: src/plot-hist.c:115
+#: src/plot-hist.c:118
msgid "HISTOGRAM"
msgstr ""
-#: src/plot-hist.c:117 src/frequencies.q:1139
+#: src/plot-hist.c:120 src/frequencies.q:1139
msgid "Frequency"
msgstr ""
#: src/sysfile-info.c:531 src/vfm.c:875 src/crosstabs.q:1099
#: src/crosstabs.q:1126 src/crosstabs.q:1146 src/crosstabs.q:1168
-#: src/examine.q:1086 src/frequencies.q:1138 src/frequencies.q:1259
+#: src/examine.q:1082 src/frequencies.q:1138 src/frequencies.q:1259
msgid "Value"
msgstr ""
msgid "Summary."
msgstr ""
-#: src/crosstabs.q:802 src/examine.q:871
+#: src/crosstabs.q:802 src/examine.q:867
msgid "Cases"
msgstr ""
-#: src/crosstabs.q:803 src/examine.q:805 src/frequencies.q:1136
+#: src/crosstabs.q:803 src/examine.q:801 src/frequencies.q:1136
#: src/frequencies.q:1509
msgid "Valid"
msgstr ""
-#: src/crosstabs.q:804 src/examine.q:806 src/frequencies.q:1204
+#: src/crosstabs.q:804 src/examine.q:802 src/frequencies.q:1204
#: src/frequencies.q:1510
msgid "Missing"
msgstr ""
#: src/crosstabs.q:805 src/crosstabs.q:1008 src/crosstabs.q:1722
-#: src/examine.q:807 src/frequencies.q:1213 src/oneway.q:307 src/oneway.q:476
+#: src/examine.q:803 src/frequencies.q:1213 src/oneway.q:307 src/oneway.q:476
msgid "Total"
msgstr ""
-#: src/crosstabs.q:815 src/examine.q:883 src/frequencies.q:1508
+#: src/crosstabs.q:815 src/examine.q:879 src/frequencies.q:1508
#: src/oneway.q:395 src/t-test.q:689 src/t-test.q:712 src/t-test.q:837
#: src/t-test.q:1372
msgid "N"
msgstr ""
-#: src/crosstabs.q:816 src/examine.q:886 src/frequencies.q:1140
+#: src/crosstabs.q:816 src/examine.q:882 src/frequencies.q:1140
#: src/frequencies.q:1141 src/frequencies.q:1142
msgid "Percent"
msgstr ""
msgstr ""
#: src/crosstabs.q:1098 src/crosstabs.q:1125 src/crosstabs.q:1145
-#: src/crosstabs.q:1166 src/examine.q:1317
+#: src/crosstabs.q:1166 src/examine.q:1313
msgid "Statistic"
msgstr ""
msgid "%s Dependent"
msgstr ""
-#: src/examine.q:450 src/examine.q:462
+#: src/examine.q:446 src/examine.q:458
#, c-format
msgid "%s and %s are mutually exclusive"
msgstr ""
-#: src/examine.q:865
+#: src/examine.q:861
msgid "Case Processing Summary"
msgstr ""
-#: src/examine.q:1071
+#: src/examine.q:1067
msgid "Extreme Values"
msgstr ""
-#: src/examine.q:1087
+#: src/examine.q:1083
msgid "Case Number"
msgstr ""
-#: src/examine.q:1172
+#: src/examine.q:1168
msgid "Highest"
msgstr ""
-#: src/examine.q:1177
+#: src/examine.q:1173
msgid "Lowest"
msgstr ""
-#: src/examine.q:1318 src/oneway.q:398 src/oneway.q:695
+#: src/examine.q:1314 src/oneway.q:398 src/oneway.q:695
msgid "Std. Error"
msgstr ""
-#: src/examine.q:1320 src/oneway.q:412
+#: src/examine.q:1316 src/oneway.q:412
msgid "Descriptives"
msgstr ""
-#: src/examine.q:1440 src/oneway.q:403
+#: src/examine.q:1436 src/oneway.q:403
#, c-format
msgid "%g%% Confidence Interval for Mean"
msgstr ""
-#: src/examine.q:1446 src/oneway.q:405
+#: src/examine.q:1442 src/oneway.q:405
msgid "Lower Bound"
msgstr ""
-#: src/examine.q:1457 src/oneway.q:406
+#: src/examine.q:1453 src/oneway.q:406
msgid "Upper Bound"
msgstr ""
-#: src/examine.q:1469
+#: src/examine.q:1465
msgid "5% Trimmed Mean"
msgstr ""
-#: src/examine.q:1480 src/frequencies.q:114
+#: src/examine.q:1476 src/frequencies.q:114
msgid "Median"
msgstr ""
-#: src/examine.q:1512 src/oneway.q:397 src/t-test.q:691 src/t-test.q:714
+#: src/examine.q:1508 src/oneway.q:397 src/t-test.q:691 src/t-test.q:714
#: src/t-test.q:838 src/t-test.q:1174
msgid "Std. Deviation"
msgstr ""
-#: src/examine.q:1560
+#: src/examine.q:1556
msgid "Interquartile Range"
msgstr ""
-#: src/examine.q:1716
+#: src/examine.q:1711
#, c-format
msgid "Boxplot of %s vs. %s"
msgstr ""
-#: src/examine.q:1741
+#: src/examine.q:1736
msgid "Boxplot"
msgstr ""
-#: src/examine.q:1780
+#: src/examine.q:1778
#, c-format
msgid "Normal Q-Q Plot of %s"
msgstr ""
-#: src/examine.q:1781 src/examine.q:1787
+#: src/examine.q:1779 src/examine.q:1785
msgid "Observed Value"
msgstr ""
-#: src/examine.q:1782
+#: src/examine.q:1780
msgid "Expected Normal"
msgstr ""
-#: src/examine.q:1785
+#: src/examine.q:1783
#, c-format
msgid "Detrended Normal Q-Q Plot of %s"
msgstr ""
-#: src/examine.q:1788
+#: src/examine.q:1786
msgid "Dev from Normal"
msgstr ""
-#: src/examine.q:1909 src/examine.q:1931 src/frequencies.q:1520
+#: src/examine.q:1906 src/examine.q:1928 src/frequencies.q:1520
msgid "Percentiles"
msgstr ""
-#: src/examine.q:2056
+#: src/examine.q:2053
msgid "Tukey's Hinges"
msgstr ""
+Mon Jan 10 14:43:45 WST 2005 John Darrington <john@darrington.wattle.id.au>
+
+ * ascii.c cartesian.c casefile.c chart.h devind.c
+ examine.q frequencies.q
+ html.c output.h piechart.c plot-chart.c plot-hist.c
+
+ Integrated the chart rendering into the output stream
+ (currently only works for html).
+
+ Removed gratuitous use of ifndef NO_CHARTS, and replaced with
+ dummy-chart.c for compiling without charts.
+
+ * mkfile.[ch] Created.
+
+ * som.[ch] tab.[ch]: Changed name of som_table to som_entity
+ Added type element so we can tell if it's a chart or a table.
+
+ * chart.h examine.q piechart.c plot-chart.c plot-hist.c: changed the
+ API of charts to be more like that of tables.
+
Thu Jan 13 21:00:02 WST 2005 John Darrington <john@darrington.wattle.id.au>
* casefile.c main.c: Moved the SIGINT handler from casefile.c to
Mon Jan 10 14:43:45 WST 2005 John Darrington <john@darrington.wattle.id.au>
- * casefile.c: Added a signal handler to delete temp files on SIGINT and SIGQUIT
+ * casefile.c: Added a signal handler to delete temp files on
+ SIGINT and SIGQUIT
* permissions.c Inhibited the PERMISSIONS command when SAFER is on.
plot-chart.c \
plot-hist.c \
piechart.c
+else
+chart_sources = dummy-chart.c
endif
pspp_SOURCES = $(q_sources_c) $(chart_sources) \
pool.c pool.h postscript.c print.c recode.c \
rename-vars.c repeat.c repeat.h sample.c sel-if.c settings.h \
sfm-read.c sfm-read.h sfm-write.c sfm-write.h sfmP.h som.c som.h \
-sort.c sort.h \
-split-file.c str.c str.h subclist.c subclist.h \
-sysfile-info.c tab.c tab.h temporary.c stat.h \
+sort.c sort.h split-file.c str.c str.h subclist.c subclist.h \
+sysfile-info.c tab.c tab.h temporary.c stat.h mkfile.c mkfile.h \
title.c val.h val-labs.c value-labels.c value-labels.h \
var-labs.c var.h vars-atr.c vars-prs.c vector.c version.c version.h \
vfm.c vfm.h vfmP.h weight.c
pspp_LDADD = ../lib/julcal/libjulcal.a \
../lib/misc/libmisc.a \
- -lplot \
@LIBINTL@
version.c:
return 1;
}
+
+
+void ascii_chart_initialise(struct outp_class *c UNUSED,
+ struct chart *ch UNUSED);
+
+void ascii_chart_finalise(struct outp_class *c UNUSED,
+ struct chart *ch UNUSED);
+
+
+void
+ascii_chart_initialise(struct outp_class *c UNUSED, struct chart *ch )
+{
+ msg(MW, _("Charts are unsupported with ascii drivers."));
+ ch->lp = 0;
+}
+
+void
+ascii_chart_finalise(struct outp_class *c UNUSED, struct chart *ch UNUSED)
+{
+
+}
+
struct outp_class ascii_class =
{
"ascii",
ascii_text_get_size,
ascii_text_metrics,
ascii_text_draw,
+
+ ascii_chart_initialise,
+ ascii_chart_finalise
};
void
chart_write_xlabel(struct chart *ch, const char *label)
{
+ if ( ! ch )
+ return ;
pl_savestate_r(ch->lp);
void
chart_write_ylabel(struct chart *ch, const char *label)
{
+ if ( ! ch )
+ return ;
+
pl_savestate_r(ch->lp);
pl_move_r(ch->lp, ch->data_bottom, ch->ordinate_right);
{
int ds;
+ if ( ! chart )
+ return ;
+
+
pl_savestate_r(chart->lp);
pl_filltype_r(chart->lp,1);
void
chart_datum(struct chart *ch, int dataset UNUSED, double x, double y)
{
+
+ if ( ! ch )
+ return ;
+
+
+
const double x_pos =
(x - ch->x_min) * ch->abscissa_scale + ch->data_left ;
const double y_pos =
(y - ch->y_min) * ch->ordinate_scale + ch->data_bottom ;
-
pl_savestate_r(ch->lp);
pl_fmarker_r(ch->lp, x_pos, y_pos, 6, 15);
double x1, y1;
double x2, y2 ;
+ if ( ! ch )
+ return ;
+
+
if ( lim_dim == CHART_DIM_Y )
{
x1 = ( limit1 - intercept ) / slope ;
}
}
-/* Creates a temporary file and stores its name in *FILENAME and
- a file descriptor for it in *FD. Returns success. Caller is
- responsible for freeing *FILENAME. */
-static int
-make_temp_file (int *fd, char **filename)
-{
- const char *parent_dir;
-
- assert (filename != NULL);
- assert (fd != NULL);
-
- if (getenv ("TMPDIR") != NULL)
- parent_dir = getenv ("TMPDIR");
- else
- parent_dir = P_tmpdir;
-
- *filename = xmalloc (strlen (parent_dir) + 32);
- sprintf (*filename, "%s%cpsppXXXXXX", parent_dir, DIR_SEPARATOR);
- *fd = mkstemp (*filename);
- if (*fd < 0)
- {
- msg (FE, _("%s: Creating temporary file: %s."),
- *filename, strerror (errno));
- free (*filename);
- *filename = NULL;
- return 0;
- }
- return 1;
-}
/* If CF is currently stored in memory, writes it to disk. Readers, if any,
retain their current positions. */
#ifndef NO_CHARTS
plPlotter *lp ;
plPlotterParams *pl_params;
+#else
+ void *lp;
#endif
+ char *filename;
/* The geometry of the chart
See diagram at the foot of this file.
};
-int chart_initialise(struct chart *ch);
-
-void chart_finalise(struct chart *ch);
-
+struct chart * chart_create(void);
+void chart_submit(struct chart *ch);
double chart_rounded_tick(double tick);
static void output_tab_table (struct outp_driver *, struct tab_table *);
static void
-devind_submit (struct outp_driver *this, struct som_table *s)
+devind_submit (struct outp_driver *this, struct som_entity *s)
{
extern struct som_table_class tab_table_class;
struct devind_driver_ext *x = this->ext;
return;
}
- if (s->class == &tab_table_class)
+ assert (s->class == &tab_table_class);
+
+ if ( s->type == SOM_TABLE )
output_tab_table (this, s->ext);
- else
- assert (0);
}
/* Write string S of length LEN to file F, escaping characters as
NULL,
NULL,
NULL,
+
+ NULL,
+ NULL,
};
--- /dev/null
+/* PSPP - computes sample statistics.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ Written by John Darrington <john@darrington.wattle.id.au>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+
+/* Stubs for plotting routines.
+ This module is linked only when charts are not supported */
+
+#include "config.h"
+#include "chart.h"
+
+
+#ifndef NO_CHARTS
+#error This file should be used only when compiling without charts.
+#endif
+
+struct chart *
+chart_create(void)
+{
+ return 0;
+}
+
+
+void
+chart_write_title(struct chart *chart, const char *title, ...)
+{
+}
+
+
+void
+chart_submit(struct chart *chart)
+{
+}
+
+
+void
+chart_write_xscale(struct chart *ch, double min, double max, int ticks)
+{
+}
+
+
+void
+chart_write_yscale(struct chart *ch, double smin, double smax, int ticks)
+{
+}
+
+
+void
+chart_write_xlabel(struct chart *ch, const char *label)
+{
+}
+
+void
+chart_write_ylabel(struct chart *ch, const char *label)
+{
+}
+
+
+void
+chart_line(struct chart *ch, double slope, double intercept,
+ double limit1, double limit2, enum CHART_DIM lim_dim)
+{
+}
+
+
+void
+chart_datum(struct chart *ch, int dataset UNUSED, double x, double y)
+{
+}
+
+
+void
+histogram_plot(const gsl_histogram *hist,
+ const char *factorname,
+ const struct normal_curve *norm, short show_normal)
+{
+}
+
+void
+boxplot_draw_yscale(struct chart *ch , double y_max, double y_min)
+{
+}
+
+void
+boxplot_draw_boxplot(struct chart *ch,
+ double box_centre,
+ double box_width,
+ struct metrics *m,
+ const char *name)
+{
+}
+
+
+
+void
+piechart_plot(const char *title, const struct slice *slices, int n_slices)
+{
+}
cmd.v_id);
}
-#ifndef NO_CHARTS
if ( cmd.a_plot[XMN_PLT_HISTOGRAM] )
{
for ( v = 0 ; v < n_dependent_vars; ++v )
&normal, 0);
}
}
-#endif
}
if ( cmd.a_plot[XMN_PLT_NPPLOT] )
np_plot(&(*fs)->m[v], s);
-#ifndef NO_CHARTS
if ( cmd.a_plot[XMN_PLT_HISTOGRAM] )
{
struct normal_curve normal;
histogram_plot((*fs)->m[v].histogram,
s, &normal, 0);
}
-#endif
} /* for ( fs .... */
struct variable **vars, int n_vars,
const struct variable *id)
{
-#ifndef NO_CHARTS
+
int i;
struct factor_statistics **fs ;
{
double y_min = DBL_MAX;
double y_max = -DBL_MAX;
- struct chart ch;
+ struct chart *ch;
- chart_initialise(&ch);
+ ch = chart_create();
const char *s = factor_to_string(fctr, *fs, 0 );
- chart_write_title(&ch, s);
+ chart_write_title(ch, s);
for ( i = 0 ; i < n_vars ; ++i )
{
y_min = min(y_min, (*fs)->m[i].min);
}
- boxplot_draw_yscale(&ch, y_max, y_min);
+ boxplot_draw_yscale(ch, y_max, y_min);
for ( i = 0 ; i < n_vars ; ++i )
{
- const double box_width = (ch.data_right - ch.data_left)
+ const double box_width = (ch->data_right - ch->data_left)
/ (n_vars * 2.0 ) ;
const double box_centre = ( i * 2 + 1) * box_width
- + ch.data_left;
+ + ch->data_left;
- boxplot_draw_boxplot(&ch,
+ boxplot_draw_boxplot(ch,
box_centre, box_width,
&(*fs)->m[i],
var_to_string(vars[i]));
}
- chart_finalise(&ch);
+ chart_submit(ch);
}
-#endif
}
int n_vars,
const struct variable *id)
{
-#ifndef NO_CHARTS
+
int i;
for ( i = 0 ; i < n_vars ; ++i )
{
struct factor_statistics **fs ;
- struct chart ch;
+ struct chart *ch;
- chart_initialise(&ch);
+ ch = chart_create();
- boxplot_draw_yscale(&ch, totals[i].max, totals[i].min);
+ boxplot_draw_yscale(ch, totals[i].max, totals[i].min);
if ( fctr )
{
for ( fs = fctr->fs ; *fs ; ++fs )
++n_factors;
- chart_write_title(&ch, _("Boxplot of %s vs. %s"),
+ chart_write_title(ch, _("Boxplot of %s vs. %s"),
var_to_string(vars[i]), var_to_string(fctr->indep_var[0]) );
for ( fs = fctr->fs ; *fs ; ++fs )
const char *s = factor_to_string_concise(fctr, *fs);
- const double box_width = (ch.data_right - ch.data_left)
+ 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;
+ + ch->data_left;
- boxplot_draw_boxplot(&ch,
+ boxplot_draw_boxplot(ch,
box_centre, box_width,
&(*fs)->m[i],
s);
}
else
{
- const double box_width = (ch.data_right - ch.data_left) / 3.0;
- const double box_centre = (ch.data_right + ch.data_left) / 2.0;
+ const double box_width = (ch->data_right - ch->data_left) / 3.0;
+ const double box_centre = (ch->data_right + ch->data_left) / 2.0;
- chart_write_title(&ch, _("Boxplot"));
+ chart_write_title(ch, _("Boxplot"));
- boxplot_draw_boxplot(&ch,
+ boxplot_draw_boxplot(ch,
box_centre, box_width,
&totals[i],
var_to_string(vars[i]) );
}
- chart_finalise(&ch);
+ chart_submit(ch);
}
-#endif
}
void
np_plot(const struct metrics *m, const char *factorname)
{
-#ifndef NO_CHARTS
int i;
double yfirst=0, ylast=0;
/* Normal Plot */
- struct chart np_chart;
+ struct chart *np_chart;
/* Detrended Normal Plot */
- struct chart dnp_chart;
+ struct chart *dnp_chart;
/* The slope and intercept of the ideal normal probability line */
const double slope = 1.0 / m->stddev;
if ( m->n_data == 0 )
return ;
- chart_initialise(&np_chart);
- chart_write_title(&np_chart, _("Normal Q-Q Plot of %s"), factorname);
- chart_write_xlabel(&np_chart, _("Observed Value"));
- chart_write_ylabel(&np_chart, _("Expected Normal"));
+ np_chart = chart_create();
+ dnp_chart = chart_create();
+
+ if ( !np_chart || ! dnp_chart )
+ return ;
+
+ chart_write_title(np_chart, _("Normal Q-Q Plot of %s"), factorname);
+ chart_write_xlabel(np_chart, _("Observed Value"));
+ chart_write_ylabel(np_chart, _("Expected Normal"));
+
- chart_initialise(&dnp_chart);
- chart_write_title(&dnp_chart, _("Detrended Normal Q-Q Plot of %s"),
+ chart_write_title(dnp_chart, _("Detrended Normal Q-Q Plot of %s"),
factorname);
- chart_write_xlabel(&dnp_chart, _("Observed Value"));
- chart_write_ylabel(&dnp_chart, _("Dev from Normal"));
+ chart_write_xlabel(dnp_chart, _("Observed Value"));
+ chart_write_ylabel(dnp_chart, _("Dev from Normal"));
yfirst = gsl_cdf_ugaussian_Pinv (m->wvp[0]->rank / ( m->n + 1));
ylast = gsl_cdf_ugaussian_Pinv (m->wvp[m->n_data-1]->rank / ( m->n + 1));
double x_upper = max(m->max, (ylast - intercept) / slope) ;
double slack = (x_upper - x_lower) * 0.05 ;
- chart_write_xscale(&np_chart, x_lower - slack, x_upper + slack, 5);
+ chart_write_xscale(np_chart, x_lower - slack, x_upper + slack, 5);
- chart_write_xscale(&dnp_chart, m->min, m->max, 5);
+ chart_write_xscale(dnp_chart, m->min, m->max, 5);
}
- chart_write_yscale(&np_chart, yfirst, ylast, 5);
+ chart_write_yscale(np_chart, yfirst, ylast, 5);
{
- /* We have to cache the detrended data, beacause we need to
- find its limits before we can plot it */
- double *d_data;
- d_data = xmalloc (m->n_data * sizeof(double));
- double d_max = -DBL_MAX;
- double d_min = DBL_MAX;
- for ( i = 0 ; i < m->n_data; ++i )
- {
- const double ns = gsl_cdf_ugaussian_Pinv (m->wvp[i]->rank / ( m->n + 1));
+ /* We have to cache the detrended data, beacause we need to
+ find its limits before we can plot it */
+ double *d_data;
+ d_data = xmalloc (m->n_data * sizeof(double));
+ double d_max = -DBL_MAX;
+ double d_min = DBL_MAX;
+ for ( i = 0 ; i < m->n_data; ++i )
+ {
+ const double ns = gsl_cdf_ugaussian_Pinv (m->wvp[i]->rank / ( m->n + 1));
- chart_datum(&np_chart, 0, m->wvp[i]->v.f, ns);
+ chart_datum(np_chart, 0, m->wvp[i]->v.f, ns);
- d_data[i] = (m->wvp[i]->v.f - m->mean) / m->stddev - ns;
+ d_data[i] = (m->wvp[i]->v.f - m->mean) / m->stddev - ns;
- if ( d_data[i] < d_min ) d_min = d_data[i];
- if ( d_data[i] > d_max ) d_max = d_data[i];
- }
- chart_write_yscale(&dnp_chart, d_min, d_max, 5);
+ if ( d_data[i] < d_min ) d_min = d_data[i];
+ if ( d_data[i] > d_max ) d_max = d_data[i];
+ }
+ chart_write_yscale(dnp_chart, d_min, d_max, 5);
- for ( i = 0 ; i < m->n_data; ++i )
- chart_datum(&dnp_chart, 0, m->wvp[i]->v.f, d_data[i]);
+ for ( i = 0 ; i < m->n_data; ++i )
+ chart_datum(dnp_chart, 0, m->wvp[i]->v.f, d_data[i]);
- free(d_data);
+ free(d_data);
}
- chart_line(&np_chart, slope, intercept, yfirst, ylast , CHART_DIM_Y);
- chart_line(&dnp_chart, 0, 0, m->min, m->max , CHART_DIM_X);
+ chart_line(np_chart, slope, intercept, yfirst, ylast , CHART_DIM_Y);
+ chart_line(dnp_chart, 0, 0, m->min, m->max , CHART_DIM_X);
- chart_finalise(&np_chart);
- chart_finalise(&dnp_chart);
-#endif
+ chart_submit(np_chart);
+ chart_submit(dnp_chart);
}
dump_statistics (v, !dumped_freq_tab);
-#ifndef NO_CHARTS
+
if ( chart == GFT_HIST)
{
double d[frq_n_stats];
{
do_piechart(v_variables[i], ft);
}
-#endif
+
cleanup_freq_tab (v);
-#ifndef NO_CHARTS
+
static void
do_piechart(const struct variable *var, const struct freq_tab *frq_tab)
{
free(slices);
}
-#endif
+
/*
Local Variables:
#include "som.h"
#include "tab.h"
#include "version.h"
+#include "mkfile.h"
/* Prototypes. */
static int postopen (struct file_ext *);
return 1;
}
+
+/* Link the image contained in FILENAME to the
+ HTML stream in file F. */
+static int
+link_image (struct file_ext *f, char *filename)
+{
+ fprintf (f->file,
+ "<IMG SRC=\"%s\"/>", filename);
+
+ if (ferror (f->file))
+ return 0;
+
+ return 1;
+}
+
+
/* Generic option types. */
enum
{
static void output_tab_table (struct outp_driver *, struct tab_table *);
static void
-html_submit (struct outp_driver *this, struct som_table *s)
+html_submit (struct outp_driver *this, struct som_entity *s)
{
extern struct som_table_class tab_table_class;
struct html_driver_ext *x = this->ext;
return;
}
- if (s->class == &tab_table_class)
- output_tab_table (this, (struct tab_table *) s->ext);
- else
- assert (0);
+ assert ( s->class == &tab_table_class ) ;
+
+ switch (s->type)
+ {
+ case SOM_TABLE:
+ output_tab_table ( this, (struct tab_table *) s->ext);
+ break;
+ case SOM_CHART:
+ link_image( &x->file, ((struct chart *)s->ext)->filename);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+
}
/* Write string S of length LEN to file F, escaping characters as
fputs ("</TABLE>\n\n", x->file.file);
}
+
+void html_initialise_chart(struct outp_class *c, struct chart *ch);
+void html_finalise_chart(struct outp_class *c, struct chart *ch);
+
+
+void
+html_initialise_chart(struct outp_class *c UNUSED, struct chart *ch)
+{
+
+ FILE *fp;
+
+ make_unique_file_stream(&fp, &ch->filename);
+
+#ifdef NO_CHARTS
+ ch->lp = 0;
+#else
+ ch->pl_params = pl_newplparams();
+ ch->lp = pl_newpl_r ("png", 0, fp, stderr, ch->pl_params);
+#endif
+
+}
+
+void
+html_finalise_chart(struct outp_class *c UNUSED, struct chart *ch)
+{
+ free(ch->filename);
+}
+
+
+
/* HTML driver class. */
struct outp_class html_class =
{
NULL,
NULL,
NULL,
+
+ html_initialise_chart,
+ html_finalise_chart
+
};
#endif /* !NO_HTML */
--- /dev/null
+/* PSPP - computes sample statistics.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ Written by Ben Pfaff <blp@gnu.org>.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include <config.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <stdio.h>
+
+#include "mkfile.h"
+#include "error.h"
+#include "alloc.h"
+
+/* Creates a temporary file and stores its name in *FILENAME and
+ a file descriptor for it in *FD. Returns success. Caller is
+ responsible for freeing *FILENAME. */
+int
+make_temp_file (int *fd, char **filename)
+{
+ const char *parent_dir;
+
+ assert (filename != NULL);
+ assert (fd != NULL);
+
+ if (getenv ("TMPDIR") != NULL)
+ parent_dir = getenv ("TMPDIR");
+ else
+ parent_dir = P_tmpdir;
+
+ *filename = xmalloc (strlen (parent_dir) + 32);
+ sprintf (*filename, "%s%cpsppXXXXXX", parent_dir, DIR_SEPARATOR);
+ *fd = mkstemp (*filename);
+ if (*fd < 0)
+ {
+ msg (FE, _("%s: Creating temporary file: %s."),
+ *filename, strerror (errno));
+ free (*filename);
+ *filename = NULL;
+ return 0;
+ }
+ return 1;
+}
+
+
+/* Creates a temporary file and stores its name in *FILENAME and
+ a file stream for it in *FP. Returns success. Caller is
+ responsible for freeing *FILENAME and for closing *FP */
+int
+make_unique_file_stream (FILE **fp, char **filename)
+{
+ static int serial = 0;
+ const char *parent_dir;
+
+
+ /* FIXME:
+ Need to check for pre-existing file name.
+ Need also to pass in the directory instead of using /tmp
+ */
+
+ assert (filename != NULL);
+ assert (fp != NULL);
+
+ if (getenv ("TMPDIR") != NULL)
+ parent_dir = getenv ("TMPDIR");
+ else
+ parent_dir = P_tmpdir;
+
+ *filename = xmalloc (strlen (parent_dir) + 32);
+
+
+ sprintf (*filename, "%s%cpspp%d.png", parent_dir, DIR_SEPARATOR, serial++);
+
+ *fp = fopen(*filename, "w");
+
+ if (! *fp )
+ {
+ msg (FE, _("%s: Creating file: %s."), *filename, strerror (errno));
+ free (*filename);
+ *filename = NULL;
+ return 0;
+ }
+
+ return 1;
+}
+
+
+
+
--- /dev/null
+/* PSPP - computes sample statistics.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ Written by Ben Pfaff <blp@gnu.org>.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#ifndef MKFILE_H
+#define MKFILE_H
+
+
+/* Creates a temporary file and stores its name in *FILENAME and
+ a file descriptor for it in *FD. Returns success. Caller is
+ responsible for freeing *FILENAME. */
+int make_temp_file (int *fd, char **filename);
+
+
+/* Creates a temporary file and stores its name in *FILENAME and
+ a file stream for it in *FP. Returns success. Caller is
+ responsible for freeing *FILENAME. */
+int make_unique_file_stream (FILE **fp, char **filename) ;
+
+#endif /* mkfile.h */
#define output_h 1
#include "str.h"
+#include "config.h"
+
+#include "chart.h"
/* A rectangle. */
struct rect
int w, l; /* Width, length. */
};
-struct som_table;
+struct som_entity;
struct outp_driver;
/* Defines a class of output driver. */
int (*open_page) (struct outp_driver *);
int (*close_page) (struct outp_driver *);
- /* special != 0: Used to submit tables for output. */
- void (*submit) (struct outp_driver *, struct som_table *);
+ /* special != 0: Used to submit entities for output. */
+ void (*submit) (struct outp_driver *, struct som_entity *);
/* special != 0: Methods below need not be defined. */
int (*text_get_size) (struct outp_driver *, int *em_width);
void (*text_metrics) (struct outp_driver *, struct outp_text *);
void (*text_draw) (struct outp_driver *, struct outp_text *);
+
+ void (*initialise_chart)(struct outp_class *, struct chart *);
+ void (*finialise_chart)(struct outp_class *, struct chart *);
+
};
/* Device types. */
-#ifndef NO_CHARTS
-
/* Draw a piechart */
void
piechart_plot(const char *title, const struct slice *slices, int n_slices)
int i;
double total_magnetude=0;
- struct chart ch;
+ struct chart *ch;
- chart_initialise(&ch);
+ ch = chart_create();
- const double left_label = ch.data_left +
- (ch.data_right - ch.data_left)/10.0;
+ const double left_label = ch->data_left +
+ (ch->data_right - ch->data_left)/10.0;
- const double right_label = ch.data_right -
- (ch.data_right - ch.data_left)/10.0;
+ const double right_label = ch->data_right -
+ (ch->data_right - ch->data_left)/10.0;
- const double centre_x = (ch.data_right + ch.data_left ) / 2.0 ;
- const double centre_y = (ch.data_top + ch.data_bottom ) / 2.0 ;
+ const double centre_x = (ch->data_right + ch->data_left ) / 2.0 ;
+ const double centre_y = (ch->data_top + ch->data_bottom ) / 2.0 ;
const double radius = min(
- 5.0 / 12.0 * (ch.data_top - ch.data_bottom),
- 1.0 / 4.0 * (ch.data_right - ch.data_left)
+ 5.0 / 12.0 * (ch->data_top - ch->data_bottom),
+ 1.0 / 4.0 * (ch->data_right - ch->data_left)
);
- chart_write_title(&ch, title);
+ chart_write_title(ch, title);
for (i = 0 ; i < n_slices ; ++i )
total_magnetude += slices[i].magnetude;
radius * cos(angle + segment_angle/2.0);
/* Fill the segment */
- draw_segment(&ch,
+ draw_segment(ch,
centre_x, centre_y, radius,
angle, segment_angle,
data_colour[i]);
/* Now add the labels */
if ( label_x < centre_x )
{
- pl_line_r(ch.lp, label_x, label_y,
+ 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_moverel_r(ch->lp,0,5);
+ pl_alabel_r(ch->lp,0,0,slices[i].label);
}
else
{
- pl_line_r(ch.lp,
+ pl_line_r(ch->lp,
label_x, label_y,
right_label, label_y
);
- pl_moverel_r(ch.lp,0,5);
- pl_alabel_r(ch.lp,'r',0,slices[i].label);
+ pl_moverel_r(ch->lp,0,5);
+ pl_alabel_r(ch->lp,'r',0,slices[i].label);
}
angle += segment_angle;
}
/* Draw an outline to the pie */
- pl_filltype_r(ch.lp,0);
- pl_fcircle_r (ch.lp, centre_x, centre_y, radius);
+ pl_filltype_r(ch->lp,0);
+ pl_fcircle_r (ch->lp, centre_x, centre_y, radius);
- chart_finalise(&ch);
+ chart_submit(ch);
}
static void
pl_restorestate_r(ch->lp);
}
-#else
-
-
-void
-piechart_plot(const char *title, const struct slice *slices, int n_slices)
-{
-}
-
-#endif
#include "chart.h"
#include "str.h"
+#include "alloc.h"
+#include "som.h"
+#include "output.h"
const char *data_colour[] = {
-int
-chart_initialise(struct chart *chart)
+struct chart *
+chart_create(void)
{
+ struct chart *chart;
- chart->pl_params = pl_newplparams();
+ struct outp_driver *d;
- chart->lp = pl_newpl_r ("X",0,stdout,stderr,chart->pl_params);
+ chart = xmalloc(sizeof(struct chart) );
+
+ for (d = outp_drivers (NULL); d; d = outp_drivers (d))
+ {
+ assert(d->class->initialise_chart);
+ d->class->initialise_chart(d, chart);
+ break; /* KLUDGE!! */
+ }
+
+ if ( ! chart->lp )
+ return 0;
if (pl_openpl_r (chart->lp) < 0) /* open Plotter */
- return 1;
+ return 0;
pl_fspace_r (chart->lp, 0.0, 0.0, 1000.0, 1000.0); /* set coordinate system */
pl_flinewidth_r (chart->lp, 0.25); /* set line thickness */
chart->data_left, chart->data_bottom,
chart->data_right, chart->data_top);
- return 0;
+ return chart;
}
{
const int tickSize = 10;
+ assert(chart);
+
pl_savestate_r(chart->lp);
pl_move_r(chart->lp, chart->data_left, chart->data_bottom);
va_list ap;
char buf[100];
+ assert(chart);
+
pl_savestate_r(chart->lp);
pl_ffontsize_r(chart->lp,chart->font_size * 1.5);
pl_move_r(chart->lp,chart->data_left, chart->title_bottom);
}
+extern struct som_table_class tab_table_class;
void
-chart_finalise(struct chart *chart)
+chart_submit(struct chart *chart)
{
+ struct som_entity s;
+
+ assert(chart);
+
pl_restorestate_r(chart->lp);
+ s.class = &tab_table_class;
+ s.ext = chart;
+ s.type = SOM_CHART;
+ som_submit (&s);
+
if (pl_closepl_r (chart->lp) < 0) /* close Plotter */
{
fprintf (stderr, "Couldn't close Plotter\n");
}
-
pl_deletepl_r(chart->lp);
pl_deleteplparams(chart->pl_params);
+ free(chart);
+
}
const double tick_interval =
chart_rounded_tick( (max - min) / (double) ticks);
+ assert ( ch );
+
+
ch->x_max = ceil( max / tick_interval ) * tick_interval ;
ch->x_min = floor ( min / tick_interval ) * tick_interval ;
+
ch->abscissa_scale = fabs(ch->data_right - ch->data_left) /
fabs(ch->x_max - ch->x_min);
const double tick_interval =
chart_rounded_tick( (smax - smin) / (double) ticks);
+
+ assert (ch) ;
+
+
ch->y_max = ceil ( smax / tick_interval ) * tick_interval ;
ch->y_min = floor ( smin / tick_interval ) * tick_interval ;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+/* If you add/modify any public symbols in this file, don't forget to
+ change the stubs in dummy-chart.c */
+
#include <config.h>
#include <stdio.h>
int i;
int bins;
- struct chart ch;
+ struct chart *ch;
bins = gsl_histogram_bins(hist);
- chart_initialise(&ch);
- chart_write_title(&ch, _("HISTOGRAM"));
+ ch = chart_create();
+ chart_write_title(ch, _("HISTOGRAM"));
- chart_write_ylabel(&ch, _("Frequency"));
- chart_write_xlabel(&ch, factorname);
+ chart_write_ylabel(ch, _("Frequency"));
+ chart_write_xlabel(ch, factorname);
- chart_write_yscale(&ch, 0, gsl_histogram_max_val(hist), 5);
+ chart_write_yscale(ch, 0, gsl_histogram_max_val(hist), 5);
for ( i = 0 ; i < bins ; ++i )
- hist_draw_bar(&ch, hist, i);
+ hist_draw_bar(ch, hist, i);
- histogram_write_legend(&ch, norm);
+ histogram_write_legend(ch, norm);
if ( show_normal )
{
gsl_histogram_get_range(hist, bins - 1, ¬_used, &x_max);
assert(range == x_max - not_used);
- abscissa_scale = (ch.data_right - ch.data_left) / (x_max - x_min);
- ordinate_scale = (ch.data_top - ch.data_bottom) /
+ abscissa_scale = (ch->data_right - ch->data_left) / (x_max - x_min);
+ ordinate_scale = (ch->data_top - ch->data_bottom) /
gsl_histogram_max_val(hist) ;
- pl_move_r(ch.lp, ch.data_left, ch.data_bottom);
- for( d = ch.data_left;
- d <= ch.data_right ;
- d += (ch.data_right - ch.data_left) / 100.0)
+ pl_move_r(ch->lp, ch->data_left, ch->data_bottom);
+ for( d = ch->data_left;
+ d <= ch->data_right ;
+ d += (ch->data_right - ch->data_left) / 100.0)
{
- const double x = (d - ch.data_left) / abscissa_scale + x_min ;
+ const double x = (d - ch->data_left) / abscissa_scale + x_min ;
const double y = norm->N * range *
gsl_ran_gaussian_pdf(x - norm->mean, norm->stddev);
- pl_fcont_r(ch.lp, d, ch.data_bottom + y * ordinate_scale);
+ pl_fcont_r(ch->lp, d, ch->data_bottom + y * ordinate_scale);
}
- pl_endpath_r(ch.lp);
+ pl_endpath_r(ch->lp);
}
- chart_finalise(&ch);
+ chart_submit(ch);
}
static struct outp_driver *d=0;
/* Table. */
-static struct som_table *t=0;
+static struct som_entity *t=0;
/* Flags. */
static unsigned flags;
static void render_simple (void);
static void render_segments (void);
-static void output_table (struct outp_driver *, struct som_table *);
+static void output_entity (struct outp_driver *, struct som_entity *);
/* Output table T to appropriate output devices. */
void
-som_submit (struct som_table *t)
+som_submit (struct som_entity *t)
{
#if GLOBAL_DEBUGGING
static int entry;
assert (entry++ == 0);
#endif
- t->class->table (t);
- t->class->flags (&flags);
- t->class->count (&nc, &nr);
- t->class->headers (&hl, &hr, &ht, &hb);
+ if ( t->type == SOM_TABLE)
+ {
+ t->class->table (t);
+ t->class->flags (&flags);
+ t->class->count (&nc, &nr);
+ t->class->headers (&hl, &hr, &ht, &hb);
+
#if GLOBAL_DEBUGGING
- if (hl + hr > nc || ht + hb > nr)
- {
- printf ("headers: (l,r)=(%d,%d), (t,b)=(%d,%d) in table size (%d,%d)\n",
- hl, hr, ht, hb, nc, nr);
- abort ();
- }
- else if (hl + hr == nc)
- printf ("warning: headers (l,r)=(%d,%d) in table width %d\n", hl, hr, nc);
- else if (ht + hb == nr)
- printf ("warning: headers (t,b)=(%d,%d) in table height %d\n", ht, hb, nr);
+ if (hl + hr > nc || ht + hb > nr)
+ {
+ printf ("headers: (l,r)=(%d,%d), (t,b)=(%d,%d) in table size (%d,%d)\n",
+ hl, hr, ht, hb, nc, nr);
+ abort ();
+ }
+ else if (hl + hr == nc)
+ printf ("warning: headers (l,r)=(%d,%d) in table width %d\n", hl, hr, nc);
+ else if (ht + hb == nr)
+ printf ("warning: headers (t,b)=(%d,%d) in table height %d\n", ht, hb, nr);
#endif
- t->class->columns (&cs);
+ t->class->columns (&cs);
- if (!(flags & SOMF_NO_TITLE))
- subtable_num++;
-
+ if (!(flags & SOMF_NO_TITLE))
+ subtable_num++;
+
+ }
+
{
struct outp_driver *d;
-
+
for (d = outp_drivers (NULL); d; d = outp_drivers (d))
- output_table (d, t);
+ output_entity (d, t);
+
}
#if GLOBAL_DEBUGGING
#endif
}
-/* Output table TABLE to driver DRIVER. */
+/* Output entity ENTITY to driver DRIVER. */
static void
-output_table (struct outp_driver *driver, struct som_table *table)
+output_entity (struct outp_driver *driver, struct som_entity *entity)
{
d = driver;
- t = table;
assert (d->driver_open);
if (!d->page_open && !d->class->open_page (d))
return;
}
- if (d->class->special)
+ if (d->class->special || entity->type == SOM_CHART)
{
- driver->class->submit (d, t);
+ driver->class->submit (d, entity);
return;
}
+
+ t = entity;
t->class->driver (d);
t->class->area (&tw, &th);
desired, and in fact almost every operation performed by som may be
overridden in a table class. */
-/* Table. */
-struct som_table
+enum som_type
+ {
+ SOM_TABLE,
+ SOM_CHART
+ } ;
+
+/* Entity (Table or Chart) . */
+struct som_entity
{
struct som_table_class *class; /* Table class. */
- void *ext; /* Owned by table class. */
+ enum som_type type; /* Table or Chart */
+ void *ext; /* Owned by */
};
/* Group styles. */
struct som_table_class
{
/* Set table, driver. */
- void (*table) (struct som_table *);
+ void (*table) (struct som_entity *);
void (*driver) (struct outp_driver *);
/* Query columns and rows. */
/* Submission. */
void som_new_series (void);
-void som_submit (struct som_table *t);
+void som_submit (struct som_entity *t);
/* Miscellaneous. */
void som_eject_page (void);
void
tab_submit (struct tab_table *t)
{
- struct som_table s;
+ struct som_entity s;
assert (t != NULL);
s.class = &tab_table_class;
s.ext = t;
+ s.type = SOM_TABLE;
som_submit (&s);
tab_destroy (t);
}
/* Set the current table to TABLE. */
static void
-tabi_table (struct som_table *table)
+tabi_table (struct som_entity *table)
{
assert (table != NULL);
+ assert (table->type == SOM_TABLE);
+
t = table->ext;
tab_offset (t, 0, 0);